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
Constraints: Not nullable, Maximum length: 220 Original property name from the Odata EDM: CustomerFullName
public void setCustomerFullName( @Nullable final String customerFullName) { rememberChangedField("CustomerFullName", this.customerFullName); this.customerFullName = customerFullName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@ApiModelProperty(value = \"Name of the customer\")\n public String getCustomerName() {\n return customerName;\n }", "public void setFullName(String fullName) { this.fullName = fullName; }", "public String getCustomerName(){\n return customerName;\n }", "public String getCustomerName() \n {\n return customerName;\n }", "@Override\n public java.lang.String getLastName() {\n return _entityCustomer.getLastName();\n }", "public String friendlyName() {\n return this.innerProperties() == null ? null : this.innerProperties().friendlyName();\n }", "@Override\n public java.lang.String getFirstName() {\n return _entityCustomer.getFirstName();\n }", "@ApiModelProperty(value = \"Software Statement client name\")\n\n@Size(max=40) \n public String getClientName() {\n return clientName;\n }", "public String getName()\n {\n return customer;\n }", "protected abstract String getAddressPropertyName();", "public String getDoubleByteCustomerName() {\n String sNameSeperator = res.getString(\"NAME_SEPERATOR\");\n if(sNameSeperator.equals(\"NAME_SEPERATOR\")) sNameSeperator = \",\";\n if (compositePOSTransaction.getCustomer() != null) {\n CMSCustomer cmsCustomer = (CMSCustomer) compositePOSTransaction.getCustomer();\n String sName = \"\";\n if(cmsCustomer.getDBFirstName()!=null &&\n cmsCustomer.getDBFirstName().indexOf(\"null\")==-1)\n sName += cmsCustomer.getDBFirstName();\n\n if(cmsCustomer.getDBLastName()!=null &&\n cmsCustomer.getDBLastName().indexOf(\"null\")==-1)\n {\n if(sName.length()>1) sName += sNameSeperator;\n sName += cmsCustomer.getDBLastName();\n }\n return sName;\n }\n return \"\";\n }", "@Override\n\tpublic String getName(){\n\t\treturn customer.getName();\n\t}", "public Customer()\n{\n this.firstName = \"noFName\";\n this.lastName = \"noLName\";\n this.address = \"noAddress\";\n this.phoneNumber = 0;\n this.emailAddress = \"noEmail\";\n \n}", "@Override\n\tpublic String getName() {\n\t\treturn customerName;\n\t}", "public String getContactFirstName() {\n\n \n return contactFirstName;\n\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getGivenName() {\n return givenName;\n }", "public String getCustomer_Name() {\n return customer_Name;\n }", "public String getContactLastName() {\n\n \n return contactLastName;\n\n }", "public String getCustomerName()\n {\n return customerName;\n }", "public String getName()\n/* */ {\n/* 336 */ return this.fullName;\n/* */ }", "public String getFullName() { return fullName; }", "@Column(length = 50, nullable = false)\n public String getFirstName() {\n return firstName;\n }", "public String getCustomerName() {\r\n return name.getName();\r\n }", "public String getCustomerName()\n\t{\n\t\treturn getColumn(OFF_CUSTOMER_NAME, LEN_CUSTOMER_NAME) ;\n\t}", "String getName() {\n\t\treturn customer.getName();\n\t}", "public void setCustomerName(String customerName) \n {\n this.customerName = customerName;\n }", "@NotNull\n String simpleName();", "@Transient\r\n public String getFullName() {\r\n return getLastName() + \", \" + getFirstName();\r\n }", "@Test\n public void testFirstNameMaxLength()\n {\n String invalid = repeatM(21);\n owner.setFirstName(invalid);\n assertInvalid(owner, \"firstName\", \"First name must be between 2 and 20 characters\", invalid);\n }", "public String getCustName() \r\n\t{\r\n\t\t\r\n\t\treturn custName;\r\n\t\t\r\n\t}", "public String getCustomerName() {\n return customerName;\n }", "public String getCustomerName() {\n return customerName;\n }", "@Test\n public void testFirstNameUpperBound() {\n owner.setFirstName(repeatM(20));\n assertEquals(0, validator.validate(owner).size());\n }", "String getCustomerNameById(int customerId);", "public void setCustomer_Name(String customer_Name) {\n this.customer_Name = customer_Name;\n }", "public interface AdminMainEntity {\n\n public static final String MAIN_ENTITY_NAME_PROPERTY = \"__adminMainEntity\";\n\n public String getMainEntityName();\n\n}", "@Override\n public java.lang.String getPhone() {\n return _entityCustomer.getPhone();\n }", "public String getCustomersName()\r\n {\r\n return customersName;\r\n }", "@ApiModelProperty(value = \"The name of the company that is the administrative authority for the space within this Service Site. (For example, the company leasing space in a multi-tenant building).\")\n\n\n public String getSiteCustomerName() {\n return siteCustomerName;\n }", "@Size(min=1, max=50)\n public String getName() {\n return name;\n }", "@Override\n public String getCustomer() {\n return this.customerName;\n }", "@ApiModelProperty(required = true, value = \"User's first name. Effect: Controls the value of the corresponding CfgPerson attribute \")\n public String getFirstName() {\n return firstName;\n }", "public String getCustomerName()\n\t{\n\t\treturn name;\n\t}", "@NotNull\n String getName();", "@Test\n public void testClaimOthPhysLname() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setOthPhysLname,\n RdaFissClaim::getOthPhysLname,\n RdaFissClaim.Fields.othPhysLname,\n 17);\n }", "public Customer getCustomerByName(String customerName);", "@Override\r\n\tprotected String getParentPropertyName(Class beanClass) {\n\t\treturn null;\r\n\t}", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getFamilyName() {\n return familyName;\n }", "public void setFullName(String fullName) {\n this.fullName = fullName;\n }", "public void setFullName(String fullName) {\n this.fullName = fullName;\n }", "public void setFullName(String fullName) {\n this.fullName = fullName;\n }", "public CustomerViewModel convertCustomer(Customer customer) {\n String firstLetter = \"\";\n if (!TextUtils.isEmpty(customer.getLastName())) {\n firstLetter = customer.getLastName().substring(0, 1);\n } else if (!TextUtils.isEmpty(customer.getFirstName())) {\n firstLetter = customer.getFirstName().substring(0, 1);\n }\n\n return new CustomerViewModel(\n customer.getId(),\n firstLetter,\n String.format(\"%s %s\", customer.getFirstName(), customer.getLastName()).trim()\n );\n }", "@Override\n public void setFirstName(java.lang.String firstName) {\n _entityCustomer.setFirstName(firstName);\n }", "@Override\n public String getFullName() {\n return fullName;\n }", "@Test\n public void testClaimOthPhysFname() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setOthPhysFname,\n RdaFissClaim::getOthPhysFname,\n RdaFissClaim.Fields.othPhysFname,\n 18);\n }", "@ApiModelProperty(value = \"Phone number of customer\")\n public String getCustomerPhoneNumber() {\n return customerPhoneNumber;\n }", "@JSProperty(\"name\")\n @Nullable\n String getName();", "private void formatCustomerName(String customerName) {\n\t\t// if the customer has a first and last name, separate them and\n\t\t// instantiate the respective instance variable\n\t\t// if the customer only has a first name, declare the last name to \"\"\n\t\t// (blank string)\n\t\tif (customerName.contains(\" \")) {\n\t\t\tthis.firstName = customerName.substring(0, customerName.indexOf(\" \")).toLowerCase();\n\t\t\tthis.lastName = customerName.substring(customerName.indexOf(\" \") + 1).toLowerCase();\n\t\t} else {\n\t\t\tthis.firstName = customerName.toLowerCase();\n\t\t\tthis.lastName = Customer.EMPTY_LAST_NAME;\n\t\t}\n\n\t\t// update the customer's username\n\t\tthis.updateUserName();\n\t}", "public void setFirstName(String firstName) {\n if(firstName.length()>0)\n this.firstName = firstName;\n else this.firstName =\"undefined\";\n }", "public String getFullName(){\n\t\treturn fullName;\n\t}", "@Test\n @ExpectedException(BusinessRuleException.class)\n public final void testMinLengthValidation() {\n\n SimpleCustomerDto customer = new SimpleCustomerDto();\n customer.setFirstName(\"Alfred\");\n customer.setLastName(\"Sloan\");\n customer.setCustomerNr(-1);\n customer.setUsername(\"a\"); // violates minlength = 3 constraint\n customer.setBirthDate(new DateTime(2008, 1, 1, 1, 1, 0, 0));\n\n customerServiceModelService.createCustomer(customer);\n }", "void setFullName(String fullName);", "public String getCustName() {\n\t\treturn custName;\n\t}", "public String getCustName() {\n\t\treturn custName;\n\t}", "String getCustomerLastName(String bookingRef);", "public void setFirstName(String firstName);", "public String getPropertyName();", "String getEntityName();", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "HasValue<String> getLastName();", "String getTypeDefn(String shortName, boolean assoc) {\n if (assoc) {\n // PLong<R>\n return propertyType + \"<R>\";\n\n } else {\n // PLong<QCustomer>\n return propertyType + \"<Q\" + shortName + \">\";\n }\n }", "public String getFullName()\n {\n return fullName;\n }", "HasValue<String> getFirstName();", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "public Customer() {\n name = \"N.A.\";\n surname = \"N.A.\";\n address = \"N.A.\";\n email = \"N.A.\";\n }", "public String getFullName() {\n\treturn(fullName);\n }", "java.lang.String getField1401();", "public void setFullName(String fullName) {\r\n\t\tthis.fullName = fullName;\r\n\t}", "public void setFirstName( String name ) {\n if ( name == null ) \r\n throw new NullPointerException( \"Customer first name can't be null.\" );\r\n else \r\n\t this.firstName = name; \r\n }", "String getFirstName( String key ) {\n return developer.firstName;\n }", "public String getFullName() {\n return fullName;\n }", "public String getFullName() {\n return fullName;\n }", "public String getFullName() {\n return fullName;\n }", "public void setFullName(java.lang.String fullName) {\r\n this.fullName = fullName;\r\n }", "public PersonFactLastNameRecord() {\n\t\tsuper(opus.address.database.jooq.generated.tables.PersonFactLastName.PersonFactLastName);\n\t}", "public void setFirstName(String firstName) {\n if (firstName.length() >= 3 && firstName.length() <= 20)\n this.firstName = firstName;\n }", "public void setFirstName(String fname){ firstName.set(fname); }", "public String getCustomerName() {\n\t\treturn customerName;\n\t}", "public String getCustomerName() {\n\t\treturn customerName;\n\t}", "@AutoEscape\n\tpublic String getFirst_name();", "@Test\n public void testClaimAttendPhysLname() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setAttendPhysLname,\n RdaFissClaim::getAttendPhysLname,\n RdaFissClaim.Fields.attendPhysLname,\n 17);\n }", "@Test\n public void testLastNameUpperBound()\n {\n owner.setLastName(repeatM(30));\n assertEquals(0, validator.validate(owner).size());\n }", "@Test\n public void testLastNameMaxLength()\n {\n String invalid = repeatM(31);\n owner.setLastName(invalid);\n assertInvalid(owner, \"lastName\", \"Last name must be between 2 and 30 characters\", invalid);\n }", "java.lang.String getField1035();", "@Override\n //Override method to the to-string for the concatenation of the customer name and ID\n public String toString() {\n return customerName + \" [\" + customerId + \"]\";\n }", "String getPropertyName();", "@Override\n\tpublic String associatedEntityName(String field) {\n\t\treturn null;\n\t}", "String managedBy();", "private String fullName(){\n\t\tFullName=firstName+\" \"+lastName;\n\t\treturn (initial.toUpperCase()+\".\"+\" \"+firstName.toUpperCase()+\" \"+lastName.toUpperCase());\n\t}" ]
[ "0.5708579", "0.5688987", "0.56741804", "0.56294364", "0.5623445", "0.5617837", "0.56176233", "0.56022847", "0.56021655", "0.5601745", "0.5588813", "0.5534998", "0.5525151", "0.55237466", "0.5517353", "0.5513042", "0.5511316", "0.54973733", "0.5474726", "0.5456398", "0.5442691", "0.5431754", "0.5413802", "0.54068816", "0.5394913", "0.5391468", "0.5386863", "0.53830254", "0.5378975", "0.53755623", "0.5365629", "0.53137887", "0.53137887", "0.5298626", "0.52965873", "0.52856076", "0.5276625", "0.5274926", "0.52726406", "0.5271612", "0.52532035", "0.52529675", "0.5250796", "0.52416", "0.52398396", "0.52351725", "0.52196836", "0.52163285", "0.5211426", "0.5203381", "0.5203381", "0.5203381", "0.5200902", "0.5191481", "0.51896393", "0.51819295", "0.5155358", "0.51448506", "0.5140171", "0.5123633", "0.5115173", "0.5112239", "0.51094896", "0.51093394", "0.51093394", "0.5108804", "0.51060134", "0.5103516", "0.50951976", "0.5093278", "0.5084971", "0.5084094", "0.50830704", "0.5080673", "0.50783324", "0.5070916", "0.5069075", "0.50657964", "0.506103", "0.505791", "0.50473297", "0.5044323", "0.5044323", "0.5044323", "0.5043249", "0.50372505", "0.50196755", "0.5019323", "0.5019117", "0.5019117", "0.50185823", "0.50155616", "0.5012053", "0.5012011", "0.5003218", "0.5001497", "0.499743", "0.49968642", "0.49908343", "0.49853942" ]
0.53919953
25
Constraints: Not nullable, Maximum length: 80 Original property name from the Odata EDM: CustomerName
public void setCustomerName( @Nullable final String customerName) { rememberChangedField("CustomerName", this.customerName); this.customerName = customerName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCustomerName(String customerName) \n {\n this.customerName = customerName;\n }", "@ApiModelProperty(value = \"Name of the customer\")\n public String getCustomerName() {\n return customerName;\n }", "public void setCustomer_Name(String customer_Name) {\n this.customer_Name = customer_Name;\n }", "public String getCustomerName(){\n return customerName;\n }", "public String getCustomerName() \n {\n return customerName;\n }", "public Customer(String name) {\n this.name=name;\n }", "public Customer getCustomerByName(String customerName);", "public Customer(String name) {\n this.name = name;\n }", "public Customer()\n{\n this.firstName = \"noFName\";\n this.lastName = \"noLName\";\n this.address = \"noAddress\";\n this.phoneNumber = 0;\n this.emailAddress = \"noEmail\";\n \n}", "@Override\n\tpublic String getName() {\n\t\treturn customerName;\n\t}", "public String getName()\n {\n return customer;\n }", "public void setCustomerName(String customerName) {\n this.customerName = customerName;\n }", "public String getCustomerName()\n {\n return customerName;\n }", "public String getCustomerName()\n\t{\n\t\treturn getColumn(OFF_CUSTOMER_NAME, LEN_CUSTOMER_NAME) ;\n\t}", "@Override\n\tpublic String getName(){\n\t\treturn customer.getName();\n\t}", "public void setCustName(String custName) throws IllegalArgumentException\r\n\t{\r\n\t\tif(custName == null || custName.isEmpty())\r\n\t\t{\r\n\t\t\t\r\n\t\t\tthrow new IllegalArgumentException(\"Customer name must not be empty.\");\r\n\t\t\t\r\n\t\t}\t// End of if statement\r\n\t\t\r\n\t\tthis.custName = custName;\r\n\t\t\r\n\t}", "public String getCustomer_Name() {\n return customer_Name;\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "public String getCustomerName()\n\t{\n\t\treturn name;\n\t}", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "public String getCustomerName() {\n return customerName;\n }", "public String getCustomerName() {\n return customerName;\n }", "public void setCustomerName(String customerName) {\n\t\tthis.customerName = customerName == null ? null : customerName.trim();\n\t}", "public String getCustomersName()\r\n {\r\n return customersName;\r\n }", "public void setCustomersName(String customersName)\r\n {\r\n this.customersName = customersName;\r\n }", "public void setExistingCustomer(Customer existingCustomer) { this.existingCustomer = existingCustomer; }", "public void setCustomer(String Cus){\n\n this.customer = Cus;\n }", "@Override\n public String getCustomer() {\n return this.customerName;\n }", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "public Customer() {\n name = \"N.A.\";\n surname = \"N.A.\";\n address = \"N.A.\";\n email = \"N.A.\";\n }", "public String getCustomerName() {\r\n return name.getName();\r\n }", "public Customer() {\r\n\t\tthis.name = \"\";\r\n\t\tthis.parcelID = \"\";\r\n\t\tthis.seqNo = 0;\r\n\t}", "@Test\n @ExpectedException(BusinessRuleException.class)\n public final void testMinLengthValidation() {\n\n SimpleCustomerDto customer = new SimpleCustomerDto();\n customer.setFirstName(\"Alfred\");\n customer.setLastName(\"Sloan\");\n customer.setCustomerNr(-1);\n customer.setUsername(\"a\"); // violates minlength = 3 constraint\n customer.setBirthDate(new DateTime(2008, 1, 1, 1, 1, 0, 0));\n\n customerServiceModelService.createCustomer(customer);\n }", "String getCustomerNameById(int customerId);", "@ApiModelProperty(value = \"Software Statement client name\")\n\n@Size(max=40) \n public String getClientName() {\n return clientName;\n }", "@DOpt(type = DOpt.Type.ObjectFormConstructor)\n\t@DOpt(type = DOpt.Type.RequiredConstructor)\n\tpublic Customer( @AttrRef(\"name\") String name,\n\t\t\t@AttrRef(\"gender\") Gender gender,\n\t\t\t@AttrRef(\"dob\") Date dob, \n\t\t\t@AttrRef(\"address\") Address address, \n\t\t\t@AttrRef(\"email\") String email,\n\t\t\t@AttrRef(\"phone\") String phone) {\n\t\tthis(null, name, gender,dob, address, email, phone, null);\n\t}", "@Size(min=1, max=50)\n public String getName() {\n return name;\n }", "@ApiModelProperty(value = \"The name of the company that is the administrative authority for the space within this Service Site. (For example, the company leasing space in a multi-tenant building).\")\n\n\n public String getSiteCustomerName() {\n return siteCustomerName;\n }", "String getName() {\n\t\treturn customer.getName();\n\t}", "public void setCustomerName(String customerName)\n\t{\n\t\tsetColumn(customerName, OFF_CUSTOMER_NAME, LEN_CUSTOMER_NAME) ;\n\t}", "public String getCustName() \r\n\t{\r\n\t\t\r\n\t\treturn custName;\r\n\t\t\r\n\t}", "public String getCustomerName() {\n\t\treturn customerName;\n\t}", "public String getCustomerName() {\n\t\treturn customerName;\n\t}", "public PhoneBill(String customerName) {\n this.customerName = customerName;\n }", "protected abstract String getAddressPropertyName();", "public void setCustomerType(String customerType) \n {\n this.customerType = customerType;\n }", "public void setCustomer(String customer) {\n this.customer = customer;\n }", "@Override\n public java.lang.String getLastName() {\n return _entityCustomer.getLastName();\n }", "public void setCustName(String custName) {\n\t\tthis.custName = custName;\n\t}", "java.lang.String getCustomerId();", "java.lang.String getCustomerId();", "@ApiModelProperty(value = \"Phone number of customer\")\n public String getCustomerPhoneNumber() {\n return customerPhoneNumber;\n }", "io.opencannabis.schema.commerce.OrderCustomer.CustomerOrBuilder getCustomerOrBuilder();", "public void setCustomerId(String customerId) {\n this.customerId = customerId == null ? null : customerId.trim();\n }", "public void setCustNo(java.lang.String custNo) {\n this.custNo = custNo;\n }", "public interface CustomerInfo extends EObject {\n\t/**\n\t * Returns the name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerLastName(String bookingRef);\n\n\t/**\n\t * Returns the age of the customer associated to the booking reference. \n\t * Returns -1 if the booking reference does not exist.\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getCustomerAge(String bookingRef);\n\n\t/**\n\t * Returns the email of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */ \n\tString getCustomerEmail(String bookingRef);\n\n\t/**\n\t * Returns the ccnr of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcNr(String bookingRef);\n\n\t/**\n\t * Returns the ccv of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcV(String bookingRef);\n\n\t/**\n\t * Returns the expiry month of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpMonth(String bookingRef);\n\n\t/**\n\t * Returns the expiry year of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpYear(String bookingRef);\n\n\t/**\n\t * Returns the first name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardFirstName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardLastName(String bookingRef);\n\n}", "public String getCustName() {\n\t\treturn custName;\n\t}", "public String getCustName() {\n\t\treturn custName;\n\t}", "public String getDoubleByteCustomerName() {\n String sNameSeperator = res.getString(\"NAME_SEPERATOR\");\n if(sNameSeperator.equals(\"NAME_SEPERATOR\")) sNameSeperator = \",\";\n if (compositePOSTransaction.getCustomer() != null) {\n CMSCustomer cmsCustomer = (CMSCustomer) compositePOSTransaction.getCustomer();\n String sName = \"\";\n if(cmsCustomer.getDBFirstName()!=null &&\n cmsCustomer.getDBFirstName().indexOf(\"null\")==-1)\n sName += cmsCustomer.getDBFirstName();\n\n if(cmsCustomer.getDBLastName()!=null &&\n cmsCustomer.getDBLastName().indexOf(\"null\")==-1)\n {\n if(sName.length()>1) sName += sNameSeperator;\n sName += cmsCustomer.getDBLastName();\n }\n return sName;\n }\n return \"\";\n }", "Customer(){}", "public void setOrgCustomer(java.lang.String newOrgCustomer) {\n\torgCustomer = newOrgCustomer;\n}", "@Test\n public void testFirstNameMaxLength()\n {\n String invalid = repeatM(21);\n owner.setFirstName(invalid);\n assertInvalid(owner, \"firstName\", \"First name must be between 2 and 20 characters\", invalid);\n }", "@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 String getCustomerType() \n {\n return customerType;\n }", "public void setCustName(String custName) {\n\t\tcustName = custName == null ? null : custName.trim();\n\n\t\tsetField(\"custName\", custName);\n\t}", "public void setCustomerId(int customerId) \n {\n this.customerId = customerId;\n }", "@Override\n public java.lang.String getPhone() {\n return _entityCustomer.getPhone();\n }", "public void setCustomerId(String customerId) {\n\t\tthis.customerId = customerId == null ? null : customerId.trim();\n\t}", "@Test\n public void testFirstNameUpperBound() {\n owner.setFirstName(repeatM(20));\n assertEquals(0, validator.validate(owner).size());\n }", "public Customer(String name)\n {\n this.name = name;\n this.happy = 5;\n }", "public CustomerViewModel convertCustomer(Customer customer) {\n String firstLetter = \"\";\n if (!TextUtils.isEmpty(customer.getLastName())) {\n firstLetter = customer.getLastName().substring(0, 1);\n } else if (!TextUtils.isEmpty(customer.getFirstName())) {\n firstLetter = customer.getFirstName().substring(0, 1);\n }\n\n return new CustomerViewModel(\n customer.getId(),\n firstLetter,\n String.format(\"%s %s\", customer.getFirstName(), customer.getLastName()).trim()\n );\n }", "public void setCustAddress(String custAddress) throws IllegalArgumentException\r\n\t{\r\n\t\tif(custAddress == null || custAddress.isEmpty())\r\n\t\t{\r\n\t\t\t\r\n\t\t\tthrow new IllegalArgumentException(\"Customer address must not be empty.\");\r\n\t\t\t\r\n\t\t}\t// End of if statement\r\n\t\t\r\n\t\tthis.custAddress = custAddress;\r\n\t\t\r\n\t}", "public void testCustomerProperties()\n {\n final String KEY = \"Schlüssel ä\";\n final String VALUE_1 = \"Wert 1\";\n final String VALUE_2 = \"Wert 2\";\n\n CustomProperty cp;\n CustomProperties cps = new CustomProperties();\n assertEquals(0, cps.size());\n\n /* After adding a custom property the size must be 1 and it must be\n * possible to extract the custom property from the map. */\n cps.put(KEY, VALUE_1);\n assertEquals(1, cps.size());\n Object v1 = cps.get(KEY);\n assertEquals(VALUE_1, v1);\n \n /* After adding a custom property with the same name the size must still\n * be one. */\n cps.put(KEY, VALUE_2);\n assertEquals(1, cps.size());\n Object v2 = cps.get(KEY);\n assertEquals(VALUE_2, v2);\n \n /* Removing the custom property must return the remove property and\n * reduce the size to 0. */\n cp = (CustomProperty) cps.remove(KEY);\n assertEquals(KEY, cp.getName());\n assertEquals(VALUE_2, cp.getValue());\n assertEquals(0, cps.size());\n }", "@Override\n public java.lang.String getFirstName() {\n return _entityCustomer.getFirstName();\n }", "public void setFirstName( String name ) {\n if ( name == null ) \r\n throw new NullPointerException( \"Customer first name can't be null.\" );\r\n else \r\n\t this.firstName = name; \r\n }", "public OrderBuilder name(String customerName) {\r\n\t\tthis.customerName = customerName;\r\n\t\treturn this;\r\n\t}", "@Override\n public ExtensionResult modifyCustomerName(ExtensionRequest extensionRequest) {\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n Map<String, String> clearEntities = new HashMap<>();\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n if (name.equalsIgnoreCase(\"reja\")) {\n clearEntities.put(\"name\", \"budi\");\n extensionResult.setEntities(clearEntities);\n }\n return extensionResult;\n }", "public Customer (String customerName, String address,\n String telephoneNumber){\n this.customerName = customerName;\n this.address = address;\n this.telephoneNumber = telephoneNumber;\n }", "public String getCustomer() {\n return customer;\n }", "@NotNull\n String getName();", "@JSProperty(\"name\")\n @Nullable\n String getName();", "public String getCustomerName() {\n\t\treturn this.customer.getCustomerName();\n\t}", "public interface AdminMainEntity {\n\n public static final String MAIN_ENTITY_NAME_PROPERTY = \"__adminMainEntity\";\n\n public String getMainEntityName();\n\n}", "public void setCustomerType(int v) \n {\n \n if (this.customerType != v)\n {\n this.customerType = v;\n setModified(true);\n }\n \n \n }", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getGivenName() {\n return givenName;\n }", "public void setCustCode(String custCode) {\n this.custCode = custCode == null ? null : custCode.trim();\n }", "public void setCustCode(String custCode) {\n this.custCode = custCode == null ? null : custCode.trim();\n }", "public void setCustomerAddr(String customerAddr) {\n this.customerAddr = customerAddr;\n }", "@Override\n //Override method to the to-string for the concatenation of the customer name and ID\n public String toString() {\n return customerName + \" [\" + customerId + \"]\";\n }", "public Customer(@NotBlank(message = \"Name can't be blank\") String name, @NotBlank(message = \"Surname can't be blank\") String surname, @NotBlank(message = \"Phone can't be blank\") String phone, @NotNull(message = \"Date of birth can't be blank\") LocalDate dateOfBirth, int numberOfOffices, @NotNull(message = \"level of privilege can't be blank\") int levelOfPrivilege) {\n super(name, surname, phone, dateOfBirth);\n this.numberOfOffices = numberOfOffices;\n this.levelOfPrivilege = levelOfPrivilege;\n }", "public String getCustomer(String custId);", "@NotNull\n String simpleName();", "private void formatCustomerName(String customerName) {\n\t\t// if the customer has a first and last name, separate them and\n\t\t// instantiate the respective instance variable\n\t\t// if the customer only has a first name, declare the last name to \"\"\n\t\t// (blank string)\n\t\tif (customerName.contains(\" \")) {\n\t\t\tthis.firstName = customerName.substring(0, customerName.indexOf(\" \")).toLowerCase();\n\t\t\tthis.lastName = customerName.substring(customerName.indexOf(\" \") + 1).toLowerCase();\n\t\t} else {\n\t\t\tthis.firstName = customerName.toLowerCase();\n\t\t\tthis.lastName = Customer.EMPTY_LAST_NAME;\n\t\t}\n\n\t\t// update the customer's username\n\t\tthis.updateUserName();\n\t}", "@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}", "CustomerDTO getUserForProof(String name,CustomerDTO customerDTO) throws EOTException;", "public CustomerObj(String user_first_name, String user_last_name, String user_email) {\n \n this.user_first_name = user_first_name;\n this.user_last_name = user_last_name;\n this.user_email = user_email;\n \n }", "public void setName(String value)\n {\n // Since this value is marked as \"mandatory,\" the BC4J Framework will take\n // care of ensuring that it's a non-null value. However, if it is null, we\n // don't want to proceed with any validation that could result in a NPE.\n \n if ((value != null) || (!(\"\".equals(value.trim()))))\n {\n // Verify that the name is unique. To do this, we must check both the entity\n // cache and the database. We begin with the entity cache.\n\n com.sun.java.util.collections.Iterator supplierIterator = \n getEntityDef().getAllEntityInstancesIterator(getDBTransaction());\n \n Number currentId = getSupplierId();\n \n while ( supplierIterator.hasNext() )\n {\n SupplierEOImpl cachedSupplier = (SupplierEOImpl)supplierIterator.next();\n\n String cachedName = cachedSupplier.getName();\n Number cachedId = cachedSupplier.getSupplierId();\n\n // We found a match for the name we're trying to set, so throw an\n // exception. Note that we need to exclude this EO from our test.\n \n if (cachedName != null && value.equalsIgnoreCase(cachedName) && \n cachedId.compareTo(currentId) != 0 )\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name \n }\n } \n\n // Now we want to check the database for any occurences of the supplier\n // name. The most efficient way to check this is with a validation view\n // object to which we add to a special \"Validation\" application module.\n // We then added a \"supplierExists\" method to this entity's expert. This\n // method leverages the VAM and the VVO.\n\n OADBTransaction transaction = getOADBTransaction();\n SupplierEntityExpert expert = getSupplierEntityExpert(transaction);\n\n if (expert.supplierExists(value))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name\n }\n }\n \n setAttributeInternal(NAME, value);\n \n }", "public void setCustID(String custID) {\r\n this.custID = custID;\r\n }", "public void setCustomerId(String customerId) {\n this.customerId = customerId;\n }", "public void setCustomerId(String customerId) {\n this.customerId = customerId;\n }", "public void setCustomerCode(String customerCode)\n\t{\n\t\tsetColumn(customerCode, OFF_CUSTOMER_CODE, LEN_CUSTOMER_CODE) ;\n\t}" ]
[ "0.61298656", "0.61189085", "0.59850293", "0.5835936", "0.5833124", "0.5828128", "0.5807597", "0.57782704", "0.5760269", "0.57326347", "0.57158005", "0.56959516", "0.56782514", "0.5672701", "0.566126", "0.56607306", "0.5659095", "0.5634802", "0.5598245", "0.5589331", "0.5588472", "0.5588472", "0.558676", "0.55731285", "0.5558571", "0.5549327", "0.55490494", "0.5544705", "0.5538668", "0.5536201", "0.55354553", "0.55354476", "0.55334294", "0.5489385", "0.54844385", "0.5475029", "0.54670954", "0.545517", "0.5451825", "0.54336697", "0.54261476", "0.53945816", "0.53945816", "0.5384251", "0.53828853", "0.53793114", "0.5371812", "0.5365409", "0.532813", "0.5310938", "0.5310938", "0.5308093", "0.5291408", "0.5283513", "0.5281458", "0.52790993", "0.5277843", "0.5277843", "0.5245054", "0.524004", "0.5235865", "0.5221002", "0.5217626", "0.5191968", "0.5188928", "0.51831305", "0.5177804", "0.5176031", "0.516733", "0.51666605", "0.5156949", "0.5152333", "0.51435536", "0.5139783", "0.5137881", "0.51222706", "0.5119997", "0.5113338", "0.5101925", "0.5098786", "0.5096316", "0.50678104", "0.50667477", "0.505776", "0.5055016", "0.50471324", "0.50471324", "0.5043257", "0.50374776", "0.50230235", "0.50230145", "0.5020394", "0.5012034", "0.50062674", "0.49948665", "0.4994245", "0.49936497", "0.49916467", "0.4987916", "0.4987916", "0.4985871" ]
0.0
-1
Constraints: Not nullable, Maximum length: 2 Original property name from the Odata EDM: DeliveryIsBlocked
public void setDeliveryIsBlocked( @Nullable final String deliveryIsBlocked) { rememberChangedField("DeliveryIsBlocked", this.deliveryIsBlocked); this.deliveryIsBlocked = deliveryIsBlocked; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setGuaranteedDelivery(boolean value) {\r\n this.guaranteedDelivery = value;\r\n }", "public boolean isGuaranteedDelivery() {\r\n return guaranteedDelivery;\r\n }", "@Override\n\tpublic List<DataDictionaryValueEntity> queryInternalDeliveryType() {\n\t\treturn null;\n\t}", "public void setAmDelivery(boolean value) {\r\n this.amDelivery = value;\r\n }", "@Override\n\tpublic void hideGuaranteedDeliverySection() {\n\n\t}", "public String getDeliverytype() {\n return deliverytype;\n }", "im.turms.common.constant.MessageDeliveryStatus getDeliveryStatus();", "public String getContactBlocked() {\n return contactBlocked;\n }", "@Override\r\n\tpublic void makeDeliveryFree() {\n\t\t\r\n\t}", "public String getDeliveryclass() {\n return deliveryclass;\n }", "public boolean getBlocked() { return this.blocked; }", "String getDisableRedelivery();", "public int getDeliveryMode() {\n return deliveryMode;\n }", "public Boolean getBlocked() {\n return this.blocked;\n }", "public void setDeliveryMode(int value) {\n this.deliveryMode = value;\n }", "public java.lang.String getDeliveryOption() {\r\n return deliveryOption;\r\n }", "@Override\n\tpublic boolean isDeliverable() {\n\t\treturn true;\n\t}", "@Test\r\n\tpublic void testDeliveryChuteFull() {\r\n\t\tdcListen.chuteFull(vend.getDeliveryChute());\r\n\t\tassertTrue(vend.getDeliveryChute().isDisabled());\r\n\t}", "@Override\n\tpublic void showGuaranteedDeliverySection() {\n\n\t}", "public boolean isAmDelivery() {\r\n return amDelivery;\r\n }", "public boolean isDelivered() {\n return !getMode().isCollection() && !isCarried();\n }", "int getDeliveryStatusValue();", "public abstract boolean isDelivered();", "public Builder setBlocked(boolean value) {\n copyOnWrite();\n instance.setBlocked(value);\n return this;\n }", "public void setDeliveryFee(int deliveryFee)\n {\n this.deliveryFee = deliveryFee;\n }", "public void setDeliveryOption(java.lang.String deliveryOption) {\r\n this.deliveryOption = deliveryOption;\r\n }", "public void setDeliveryTime(String pDeliveryTime) {\n mDeliveryTime = pDeliveryTime;\n }", "@Test\r\n\tpublic void testDeliveryChuteDisable() {\r\n\t\tdcListen.doorOpened(vend.getDeliveryChute());\r\n\t\tassertTrue(vend.getDeliveryChute().isDisabled());\r\n\t}", "public void setDeliveryStatus(int Id,String status,boolean pending,boolean completed);", "@java.lang.Override\n public boolean getBlocked() {\n return blocked_;\n }", "java.util.List<? extends WorldUps.UDeliveryMadeOrBuilder> \n getDeliveredOrBuilderList();", "public abstract void msgCanOnlyDeliverPartial(Market market, Food food, int amountDeliverable);", "public void setSendingReferrersAsNotSent() {\n }", "public String getDeliverTo(){\n\t\treturn deliverTo;\n\t}", "public String getBlockedMssg() { return this.blockedMssg; }", "public Boolean isBlocked() {\n return this.blocked;\n }", "void enforceCollectiveDeliveryPolicy(Message msg){ \r\n\t\t//from the message obtained from msg.getRefersTo() get the message id, while from msg.getSenderId() we get the sender to look up the entry in the data structure\r\n\t\ttry{\r\n\t\t\tboolean policySucceeded = checkCollectiveDeliveryPolicy(msg); //return true if policy conclusively succeeded, false if still valid but still not succeeded, Exception if conclusively failed. \r\n\t\t\tif (policySucceeded){ //collective policy conclusively succeeded. Purge entries from corresponding data structures.\r\n\t\t\t\t//collectiveDiscardCondition.lock(); //with the concurrent map should also work without this\r\n\t\t\t\tdiscardEntriesInPeerDeliveryPolicyDataStructure(msg.getRefersTo(), msg.getReceiverId());\r\n\t\t\t\tdiscardCollectivePolicyEntry(msg.getRefersTo(), msg.getReceiverId());\r\n\t\t\t\t//TODO if (DeliveryPolicy.Message.ACKNOWLEDGE is set for the initial message)\r\n\t\t\t\tsend(PredefinedMessageHelper.createAcknowledgeMessageFromAdaptersAcknowledgeMessage(msg)); //or send to TEE directly\r\n\t\t\t}\r\n\t\t}catch(Exception e){ //collective policy conclusively failed. Purge entries, and inform the original sender of the ERR.\r\n\t\t\t//if (!collectiveDiscardCondition.isHeldByCurrentThread()) collectiveDiscardCondition.lock();\r\n\t\t\t\r\n\t\t\tdiscardEntriesInPeerDeliveryPolicyDataStructure(msg.getRefersTo(), msg.getReceiverId());\r\n\t\t\tdiscardCollectivePolicyEntry(msg.getRefersTo(), msg.getReceiverId());\r\n\t\t\t\r\n\t\t\t//this implies that I want the broker to deliver me messages which will have: \r\n\t\t\t//sender=the actual peer that failed/succeeded, receiver: the component who originally sent the message to which they are replying to\r\n\t\t\t//plus refersTo field, containing the id of the original message - check with Philipp\r\n\t\t\tsend(PredefinedMessageHelper.createDeliveryErrorMessageFromAdaptersCommunicationErrorMessage(msg)); \r\n\t\t}finally{\r\n\t\t\t//collectiveDiscardCondition.unlock();\r\n\t\t}\r\n\r\n\t}", "public void setDeliveryDeadline(XMLGregorianCalendar deliveryDeadline) {\n this.deliveryDeadline = deliveryDeadline;\n }", "public void setC_Subscription_Delivery_ID (int C_Subscription_Delivery_ID)\n{\nset_ValueNoCheck (\"C_Subscription_Delivery_ID\", new Integer(C_Subscription_Delivery_ID));\n}", "PartyType getFinalDeliveryParty();", "WorldUps.UDeliveryMadeOrBuilder getDeliveredOrBuilder(\n int index);", "@java.lang.Override\n public boolean hasDeliver() {\n return stepInfoCase_ == 12;\n }", "public void setDeliverTo(String deliverTo){\n\t\tthis.deliverTo = deliverTo;\n\t}", "private void setBlocked(boolean value) {\n\n blocked_ = value;\n }", "public Address getDeliveryAddress() {\n return deliveryAddress;\n }", "public CanceledServiceDelivery getCanceledServiceDelivery() {\n return this.canceledServiceDelivery;\n }", "public GiftCardDeliveryCreate getDelivery() {\n return this.delivery;\n }", "public java.lang.String getSzCdPaymentDelivery()\r\n {\r\n return this._szCdPaymentDelivery;\r\n }", "@java.lang.Override\n public boolean hasDeliver() {\n return stepInfoCase_ == 12;\n }", "@Override\n public final boolean hasForfeitAttribute() {\n return true;\n }", "public void setDeliveryclass(String deliveryclass) {\n this.deliveryclass = deliveryclass == null ? null : deliveryclass.trim();\n }", "public void setDeliverytype(String deliverytype) {\n this.deliverytype = deliverytype == null ? null : deliverytype.trim();\n }", "public void setLBR_PaymentAllocationPriority (String LBR_PaymentAllocationPriority);", "public void setDelivery(double pDelivery) {\n mDelivery = pDelivery;\n }", "public XMLGregorianCalendar getDeliveryDeadline() {\n return deliveryDeadline;\n }", "public String getIsEntityRequired() {\n return Boolean.TRUE.toString();\n }", "String getMaximumRedeliveryDelay();", "public List<String> getPaymentRequestInReceivingStatus();", "@java.lang.Override\n public boolean hasDidcommInvitation() {\n return deliveryMethodCase_ == 3;\n }", "@java.lang.Override\n public boolean hasDidcommInvitation() {\n return deliveryMethodCase_ == 3;\n }", "@Override\r\n\tpublic boolean isBlocked() {\r\n\t\tif (this.status.equals(Status.BLOCKED)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "java.lang.String getBrokerCommission();", "public DeliveryParcelDraft buildUnchecked() {\n return new DeliveryParcelDraftImpl(measurements, trackingData, items);\n }", "@FXML\n\tpublic void setOrderToDelivered() {\n\t\tString orderNumber = Integer.toString(order.getOrderNum());\n\t\tboolean isSeen = order.isSeen();\n\t\tboolean isPreparable = order.isPreparable();\n\t\tboolean isPrepared = order.isPrepared();\n\t\tboolean isDelivered = order.isDelivered();\n\t\tif ((isSeen == true) && (isPreparable == true) && (isPrepared == true) && (isDelivered == false)) {\n\t\t\tString[] parameters = new String[1];\n\t\t\tparameters[0] = orderNumber;\n\t\t\tmainController.getPost().notifyMainController(\"SetOrderToDeliveredStrategy\", parameters);\n\t\t\tmainController.modifyOrderStatus(order.getOrderNum(), OrderStatus.DELIVERED);\n\t\t\tmainController.removeOrderFromTableView(order);\n\t\t} else {\n\t\t\tdeliveredCheckBox.setSelected(false);\n\t\t}\n\t}", "private boolean isBlocked() {\n return block_state <= 1;\n }", "Delivery createDelivery();", "public String getLBR_PaymentAllocationPriority();", "public String getDisablebuyerrequirements() {\r\n return disablebuyerrequirements;\r\n }", "public String getReasonRejection()\n\t{\n\t\treturn reasonRejection;\n\t}", "public void setContactBlocked(String contactBlocked) {\n this.contactBlocked = contactBlocked;\n }", "public java.util.List<? extends WorldUps.UDeliveryMadeOrBuilder> \n getDeliveredOrBuilderList() {\n return delivered_;\n }", "public int getDeliveryFee()\n {\n return deliveryFee;\n }", "@JsonSetter(\"deliveryId\")\r\n public void setDeliveryId (int value) { \r\n this.deliveryId = value;\r\n }", "public msg_safety_allowed_area() {\n msgid = MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA;\n }", "public java.util.List<? extends WorldUps.UDeliveryMadeOrBuilder> \n getDeliveredOrBuilderList() {\n if (deliveredBuilder_ != null) {\n return deliveredBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(delivered_);\n }\n }", "public void setBlocked(Boolean blocked) {\n this.blocked = blocked;\n }", "java.util.List<WorldUps.UDeliveryMade> \n getDeliveredList();", "DeliveryTermsType getDeliveryTerms();", "@JsonGetter(\"deliveryId\")\r\n public int getDeliveryId ( ) { \r\n return this.deliveryId;\r\n }", "public void setLBR_PartialPayment (String LBR_PartialPayment);", "public void setDeliveryItems(List<RepositoryItem> pDeliveryItems) {\n mDeliveryItems = pDeliveryItems;\n }", "@Override\r\n\tpublic boolean checkBudget() {\n\t\treturn false;\r\n\t}", "WorldUps.UDeliveryMade getDelivered(int index);", "@Override\n\tpublic boolean isPending() {\n\t\treturn model.isPending();\n\t}", "boolean collectiveDeliveryPolicyHasEntry(Message msg){\n\t\treturn collectiveDatastruct.containsKey(new DeliveryPolicyDataStructureKey(msg.getId(), msg.getSenderId()));\r\n\t}", "@Override\r\n public boolean canDisapprove(Document document) {\n return false;\r\n }", "public String getReject() {\n return reject;\n }", "@java.lang.Override\n public boolean hasEmail() {\n return deliveryMethodCase_ == 1;\n }", "@Override\n public boolean supportsIntegrityEnhancementFacility() {\n return false;\n }", "public void setDeliveryDate(String deliveryDate) {\r\n\t\tthis.deliveryDate = deliveryDate;\r\n\t}", "public void setAvailableForDelivery(boolean available) {\n this.availableForDelivery = available;\n if (this.availableForDelivery) {\n this.sendStatusMessageToDispatch(\"Vehicle \" + this.VIN + \" is now available for deliveries\");\n } else {\n this.sendStatusMessageToDispatch(\n \"Vehicle \" + this.VIN + \" has a new order and is no longer available for deliveries\");\n }\n }", "@JSProperty\n boolean isRequired();", "@Override\n\tpublic boolean checkEWaybillNoExceptPDAPending(String waybillNo) {\n\t\treturn true;\n\t}", "@Override\n\tpublic DeliveryQuery loadDeliveryQuery() {\n\t\treturn null;\n\t}", "public String getRejectReason() {\n\t\treturn rejectReason;\n\t}", "@Test\r\n\tpublic void testDeliveryChuteEnable() {\r\n\t\tdcListen.doorOpened(vend.getDeliveryChute());\r\n\t\tdcListen.doorClosed(vend.getDeliveryChute());\r\n\t\tassertFalse(vend.getDeliveryChute().isDisabled());\r\n\t}", "@java.lang.Override\n public boolean getBlocked() {\n return instance.getBlocked();\n }", "public boolean isDeliverable() {\n if (getMode().isCollection() || !isCarried()) return false;\n return Map.isSameLocation(plan.cdst, carrier.getLocation());\n }", "@Ignore\n public void testDisapproveReason() throws Exception {\n\n }", "public Boolean allowGatewayTransit() {\n return this.innerProperties() == null ? null : this.innerProperties().allowGatewayTransit();\n }" ]
[ "0.61436373", "0.5652298", "0.5641743", "0.5622068", "0.55734915", "0.5529375", "0.5424209", "0.537821", "0.5357844", "0.5317581", "0.53157485", "0.52799416", "0.5275785", "0.5259397", "0.52525157", "0.522501", "0.52231425", "0.5220889", "0.5182214", "0.51693684", "0.5163936", "0.5124003", "0.5117203", "0.50961477", "0.5082427", "0.5078006", "0.5066544", "0.50649863", "0.50644976", "0.50636595", "0.50593424", "0.50590193", "0.50523084", "0.5038807", "0.50314647", "0.49695557", "0.49578437", "0.49510688", "0.49445492", "0.49385774", "0.49281186", "0.49280024", "0.49239492", "0.49183074", "0.49149024", "0.4914378", "0.4906808", "0.49032158", "0.48991796", "0.4893688", "0.4892366", "0.48776874", "0.48567078", "0.48528975", "0.48517466", "0.48488414", "0.48387095", "0.48339027", "0.48231542", "0.4823072", "0.48123354", "0.4799983", "0.47954774", "0.47879544", "0.4771118", "0.47602078", "0.4758366", "0.47503495", "0.47484314", "0.47463885", "0.47445983", "0.4725273", "0.47240686", "0.47061402", "0.47056264", "0.47041383", "0.46989512", "0.4698863", "0.46934536", "0.4676603", "0.46745896", "0.46580347", "0.4647643", "0.46412086", "0.46411183", "0.46380764", "0.46318075", "0.46281493", "0.46199578", "0.46163207", "0.46154556", "0.46143052", "0.46128818", "0.46114123", "0.4610861", "0.4610836", "0.46075013", "0.4603395", "0.45893112", "0.45874876" ]
0.55699927
5
Constraints: Not nullable, Maximum length: 1 Original property name from the Odata EDM: NFPartnerIsNaturalPerson
public void setNFPartnerIsNaturalPerson( @Nullable final String nFPartnerIsNaturalPerson) { rememberChangedField("NFPartnerIsNaturalPerson", this.nFPartnerIsNaturalPerson); this.nFPartnerIsNaturalPerson = nFPartnerIsNaturalPerson; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getNaturalIdentity();", "public void setPersonType(PersonType_Tp type) { this.personType = type; }", "public void test_findUniqueByProperty() {\r\n\t\tPerson person = (Person) this.persistenceService.findUniqueByProperty(Person.class, NAME_PROPERTY, NAME_PARAM[2]);\r\n\t\tassertForFindUniquePerson(person);\r\n\t}", "protected abstract String getAddressPropertyName();", "@Override\n public java.lang.String getPersonType() {\n return _entityCustomer.getPersonType();\n }", "boolean getSearchPersonTypeIdNull();", "@Test\n public void testFirstNameUpperBound() {\n owner.setFirstName(repeatM(20));\n assertEquals(0, validator.validate(owner).size());\n }", "boolean hasIsPersonType();", "public Person() {\r\n setPersonID(null);\r\n setAssocUserName(null);\r\n setFirstName(null);\r\n setLastName(null);\r\n setGender(null);\r\n setFatherID(null);\r\n setMotherID(null);\r\n setSpouseID(null);\r\n }", "public java.lang.String getSzNmPersonFull()\r\n {\r\n return this._szNmPersonFull;\r\n }", "public PersonType_Tp getPersonType() { return personType; }", "public PersonFactLastNameRecord() {\n\t\tsuper(opus.address.database.jooq.generated.tables.PersonFactLastName.PersonFactLastName);\n\t}", "boolean getOrderPersonIdNull();", "public boolean hasPerson() {\n return dataBodyCase_ == 2;\n }", "@ProviderType\npublic interface PersonModel extends BaseModel<Person> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a person model instance should use the {@link Person} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this person.\n\t *\n\t * @return the primary key of this person\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this person.\n\t *\n\t * @param primaryKey the primary key of this person\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the uuid of this person.\n\t *\n\t * @return the uuid of this person\n\t */\n\t@AutoEscape\n\tpublic String getUuid();\n\n\t/**\n\t * Sets the uuid of this person.\n\t *\n\t * @param uuid the uuid of this person\n\t */\n\tpublic void setUuid(String uuid);\n\n\t/**\n\t * Returns the person ID of this person.\n\t *\n\t * @return the person ID of this person\n\t */\n\tpublic long getPersonId();\n\n\t/**\n\t * Sets the person ID of this person.\n\t *\n\t * @param personId the person ID of this person\n\t */\n\tpublic void setPersonId(long personId);\n\n\t/**\n\t * Returns the name of this person.\n\t *\n\t * @return the name of this person\n\t */\n\t@AutoEscape\n\tpublic String getName();\n\n\t/**\n\t * Sets the name of this person.\n\t *\n\t * @param name the name of this person\n\t */\n\tpublic void setName(String name);\n\n\t/**\n\t * Returns the age of this person.\n\t *\n\t * @return the age of this person\n\t */\n\tpublic int getAge();\n\n\t/**\n\t * Sets the age of this person.\n\t *\n\t * @param age the age of this person\n\t */\n\tpublic void setAge(int age);\n\n\t/**\n\t * Returns the gender of this person.\n\t *\n\t * @return the gender of this person\n\t */\n\t@AutoEscape\n\tpublic String getGender();\n\n\t/**\n\t * Sets the gender of this person.\n\t *\n\t * @param gender the gender of this person\n\t */\n\tpublic void setGender(String gender);\n\n\t/**\n\t * Returns the email ID of this person.\n\t *\n\t * @return the email ID of this person\n\t */\n\t@AutoEscape\n\tpublic String getEmailId();\n\n\t/**\n\t * Sets the email ID of this person.\n\t *\n\t * @param emailId the email ID of this person\n\t */\n\tpublic void setEmailId(String emailId);\n\n\t/**\n\t * Returns the nationality of this person.\n\t *\n\t * @return the nationality of this person\n\t */\n\t@AutoEscape\n\tpublic String getNationality();\n\n\t/**\n\t * Sets the nationality of this person.\n\t *\n\t * @param nationality the nationality of this person\n\t */\n\tpublic void setNationality(String nationality);\n\n\t/**\n\t * Returns the occupation of this person.\n\t *\n\t * @return the occupation of this person\n\t */\n\t@AutoEscape\n\tpublic String getOccupation();\n\n\t/**\n\t * Sets the occupation of this person.\n\t *\n\t * @param occupation the occupation of this person\n\t */\n\tpublic void setOccupation(String occupation);\n\n}", "public void setPersonId(long personId);", "public boolean isValidPerson() {\n\t \n\t final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();\n\t \n\t final Set<ConstraintViolation<Pessoa>> violations = validator.validate(this);\n\t \n\t errors = \"\";\n\t if (!violations.isEmpty()) {\n\t for (ConstraintViolation violation : violations) {\n\t \tif(!errors.isEmpty()){\n\t \t\terrors += System.lineSeparator();\n\t \t}\n\t \t\n\t errors += \"- \" + violation.getMessage();\n\t }\n\t return false;\n\t }\n\t return true;\n\t}", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getGivenName() {\n return givenName;\n }", "Name findNameByPersonPrimary(int idPerson);", "public boolean hasPerson() {\n return dataBodyCase_ == 2;\n }", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getFamilyName() {\n return familyName;\n }", "@Test\n public void testWithUnknownProperty() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n List<EPGMVertex> vertices = socialGraph\n .callForGraph(new VertexDeduplication<>(\"Person\", Collections.singletonList(\"notSet\")))\n .getVerticesByLabel(\"Person\").collect();\n assertEquals(1, vertices.size());\n }", "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 boolean isNaturalEntity() {\n return this.isNaturalEntity;\n }", "@Test\n public void testLastNameLowerBound()\n {\n owner.setLastName(repeatM(2));\n assertEquals(0, validator.validate(owner).size());\n }", "public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}", "@Override\n\tpublic boolean isRealPerson(Customer customer) {\n\t\treturn true;\n\t}", "@Schema(hidden = true)\n public Person getPerson() {\n return person;\n }", "public void setNomProvincia(String nomProvincia);", "@Override\n\tpublic SurnameType getSurname() {\n\t\treturn null;\n\t}", "@Schema(hidden = true)\n public void setPerson(Person person) {\n this.person = person;\n }", "public String getPersonNum(){\n return personNum;\n }", "public void setContactPerson(String contactPerson) {\n this.contactPerson = contactPerson;\n }", "@Test\n public void testLastNameUpperBound()\n {\n owner.setLastName(repeatM(30));\n assertEquals(0, validator.validate(owner).size());\n }", "public interface AEntityProperty {\n}", "public static void checkNonPersonalProperName(Token t) {\r\n\t\tIterator<String> it = WordLists.nonPersonalIdentifierCues().iterator();\r\n\t\t\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tString npic = it.next();\r\n\t\t\t\r\n\t\t\tif(t.getName().equalsIgnoreCase(npic)) {\r\n\t\t\t\tt.getFeatures().setNonPersonalProperName(true);\r\n\t\t\t\treturn;\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "@Override\n public boolean isLenientProperties() {\n return true;\n }", "void crearNuevaPersona(Persona persona);", "@Test\n public void testFirstNameMaxLength()\n {\n String invalid = repeatM(21);\n owner.setFirstName(invalid);\n assertInvalid(owner, \"firstName\", \"First name must be between 2 and 20 characters\", invalid);\n }", "public void setLegalPerson(String legalPerson) {\n this.legalPerson = legalPerson;\n }", "@Override\n public java.lang.String getLegalPersonality() {\n return _entityCustomer.getLegalPersonality();\n }", "public abstract String getBelongsToPersonOrDepartment();", "public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}", "boolean hasSearchPersonTypeId();", "@Override\n\tpublic boolean isNameField(String field, String associatedEntity) {\n\t\treturn false;\n\t}", "public void setSzNmPersonFull(java.lang.String szNmPersonFull)\r\n {\r\n this._szNmPersonFull = szNmPersonFull;\r\n }", "public void test_findUniqueByPropertys() {\r\n\t\tPerson person = (Person) this.persistenceService.findUniqueByPropertys(Person.class, getParamMap(2));\r\n\t\tassertForFindUniquePerson(person);\r\n\t}", "@RDFSubject(prefix = \"persons:\")\n\tString getId();", "private TypicalPersons() {}", "private TypicalPersons() {}", "@Override\r\n public boolean isNameProperty() throws Exception\r\n {\n return false;\r\n }", "public boolean isSubjectField(CharField cf) {\n return cf.getName().equals(\"AnnotatedEntity\");\n }", "HasValue<String> getFirstName();", "@ProviderType\npublic interface StringConstraint extends BaseConstraint, FormatConstraint {\n\n /**\n * Returns the minimum length of the data. The constraint is applicable only for field with type string\n *\n * @return minimum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMinLength();\n\n /**\n * Returns the maximum length of the data. The constraint is applicable only for field with type string\n *\n * @return maximum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMaxLength();\n\n /**\n * As specified in the JSON Schema specification, the regex against which the value of the field should be tested with.\n *\n * Returns the regex. The constraint is applicable only for field with type string\n *\n * @return string represented as pattern\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n default String getPattern() {\n return null;\n }\n}", "@Test\n public void getOtherPersonTestPerson() throws ParsingException, NoSuchFieldException, ParseException, IllegalAccessException {\n //Init\n Person person = new Person(null);\n Person partner = new Person(null);\n Person otherPerson = new Person(null);\n Union union = new Union(person, partner, new FullDate(\"05 MAR 2020\"), new Town(\"Saintes\", \"Charente-Maritime\"), UnionType.HETERO_MAR);\n\n //Reflection init\n Field idField = person.getClass().getDeclaredField(\"id\");\n idField.setAccessible(true);\n\n //Reflection set\n idField.set(person, \"1\");\n idField.set(partner, \"2\");\n\n //Verification\n assertEquals(partner, union.getOtherPerson(person));\n assertEquals(person, union.getOtherPerson(partner));\n assertNull(union.getOtherPerson(otherPerson));\n }", "public String getInverseRelationshipName ();", "public String getPersonID(){\n return personID;\n }", "public CompositePersonne() {\n\t\tthis.nomGroupe = \" \";\n\t\tthis.personnel = new ArrayList<InterfacePersonne>();\n\n\t}", "public String getPropertyName()\n {\n return Integer.toString(getLowNbrParticipants());\n }", "com.zzsong.netty.protobuff.two.ProtoData.PersonOrBuilder getPersonOrBuilder();", "public long getPersonId();", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "public void setPersonnelArea(String personnelArea);", "public void setPersonID(String personID){\n this.personID = personID;\n }", "String getPersonalityIdentifier();", "List<Person> persons(final PersonStringAware person,final AddressStringAware address, final Contact contact, final Circle distance, final Paging paging);", "public String getType() {\n\t\t\treturn \"person\";\n\t\t}", "public void setNumeroPersona(String numeroPersona) {\n\t\tthis.numeroPersona = numeroPersona;\n\t}", "public String getNotchianName();", "RecordPropertyType createRecordPropertyType();", "@JsonProperty(\"nfName\")\r\n public String getNfName() {\r\n return nfName;\r\n }", "public String getPrimitiveEntity();", "com.zzsong.netty.protobuff.two.ProtoData.Person getPerson();", "protected void validateProperty(String name, PolylineMapObject line) throws RuntimeException {\n if (line.getProperties().get(name) == null)\n throw new RuntimeException(\"Property '\" + name + \"' not found when loading platform\");\n\n String value = line.getProperties().get(name).toString();\n\n /*if (value == null)\n throw new RuntimeException(\"Property '\" + name + \"' must be != NULL\");*/\n\n if (value.trim().length() == 0)\n throw new RuntimeException(\"Property '\" + name + \"' cannot be empty\");\n }", "@Override\n\tpublic CrPsnDetailVo queryPersonDetail(String psnid) throws BusinessException {\n\t\treturn null;\n\t}", "@Override\n\tpublic String associatedEntityName(String field) {\n\t\treturn null;\n\t}", "public interface Location extends Identity {\n\n Property<String> commonName();\n}", "public String getPartnerName() {\n\t\treturn partnerName;\n\t}", "public String getLegalPerson() {\n return legalPerson;\n }", "@Schema(description = \"El nombre del negocio\")\n public String getBusinessName() {\n return businessName;\n }", "public PersonBuilderName noID()\n {\n edma_value[0] = null;\n return this;\n }", "public boolean isCnpRightLength(Person person) {\n\t\tString cnp = person.getCnp();\n\t\tif (cnp.length() < 12) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\n\t}", "@Test\n public void testLastNameMaxLength()\n {\n String invalid = repeatM(31);\n owner.setLastName(invalid);\n assertInvalid(owner, \"lastName\", \"Last name must be between 2 and 30 characters\", invalid);\n }", "HasValue<String> getPhoneNumber();", "public Person()\n {\n this.name = \"John Doe\";\n this.address = \"1234 Somewhere Dr.\";\n this.phoneNumber = \"309-555-1234\";\n this.emailAddress = \"john.doe@organization.com\";\n }", "@Override\n\tpublic boolean isIdProperty() {\n\n\t\tif (super.isIdProperty()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// We need to support a wider range of ID types than just the ones that can be\n\t\t// converted to an ObjectId\n\t\t// but still we need to check if there happens to be an explicit name set\n\t\treturn SUPPORTED_ID_PROPERTY_NAMES.contains(getName()) && !hasExplicitFieldName();\n\t}", "PropertyRealization createPropertyRealization();", "@AutoEscape\n\tpublic String getNomProvincia();", "@ApiModelProperty(value = \"姓氏\")\n public String getSurname() {\n return surname;\n }", "String propose() {\r\n Person person = preferences[pointer];\r\n partner = determinePartner(person);\r\n String result;\r\n if (partner == null) {\r\n result = person.name + \" rejects. \";\r\n } else if (ex == null || ex.isEmpty()) {\r\n result = person.name + \" accepts. \";\r\n } else {\r\n result = person.name + \" dumps \" + ex + \", gets engaged to \" + name + \".\";\r\n }\r\n pointer++;\r\n ex = \"\";\r\n return name + \" proposes to \" + person.name + \". \" + result;\r\n }", "public void setDPWeiterePersonen(String value){\n\t\tthis.m_bIsDirty = (this.m_bIsDirty || (!value.equals(this.m_sDPWeiterePersonen)));\n\t\tthis.m_sDPWeiterePersonen=value;\n\t}", "com.demo.springprotobuff.Demoproto.Student.PhoneType getType();", "public Person() {\n\t\tthis.name = \"Unknown\"; \n\t}", "private static org.opencds.vmr.v1_0.schema.ENXP eNXPInternal2ENXP(ENXP pENXP) \n\t\t\tthrows DataFormatException, InvalidDataException {\n\n\t\tString _METHODNAME = \"eNXPInternal2ENXP(): \";\n\t\tif (pENXP == null)\n\t\t\treturn null;\n\n\t\torg.opencds.vmr.v1_0.schema.ENXP lENXPExt = new org.opencds.vmr.v1_0.schema.ENXP();\n\n\t\t// set external XP.value \n\t\tlENXPExt.setValue(pENXP.getValue());\n\n\t\t// Now translate the internal EntityNamePartType to external EntityNamePartType\n\t\tEntityNamePartType lEntityNamePartTypeInt = pENXP.getType();\n\t\tif (lEntityNamePartTypeInt == null) {\n\t\t\tString errStr = _METHODNAME + \"EntityPartType of external ENXP datatype not populated; required by vmr spec\";\n\t\t\tthrow new DataFormatException(errStr);\n\t\t}\n\t\tString lEntityNamePartTypeStrInt = lEntityNamePartTypeInt.toString();\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"Internal EntityNamePartType value: \" + lEntityNamePartTypeStrInt);\n\t\t}\n\n\t\torg.opencds.vmr.v1_0.schema.EntityNamePartType lEntityNamePartTypeExt = null;\n\t\ttry {\n\t\t\tlEntityNamePartTypeExt = org.opencds.vmr.v1_0.schema.EntityNamePartType.valueOf(lEntityNamePartTypeStrInt);\n\t\t}\n\t\tcatch (IllegalArgumentException iae) {\n\t\t\tString errStr = _METHODNAME + \"there was no direct value mapping from the internal to external enumeration\";\n\t\t\tthrow new InvalidDataException(errStr);\n\t\t}\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"External EntityNamePartType value: \" + lEntityNamePartTypeExt);\n\t\t}\n\t\tlENXPExt.setType(lEntityNamePartTypeExt);\n\n\t\t// Finally create the list of external EntityNamePartQualifiers (optional in spec)\n\t\tList<EntityNamePartQualifier> lPartQualifierListInt = pENXP.getQualifier();\n\t\tif (lPartQualifierListInt != null) {\n\t\t\tIterator<EntityNamePartQualifier> lPartQualifierIterInt = lPartQualifierListInt.iterator();\n\t\t\twhile (lPartQualifierIterInt.hasNext()) {\n\t\t\t\t// Take each internal EntityNamePartQualifier and convert to internal EntityNamePartQualifier for addition to internal EN\n\t\t\t\tEntityNamePartQualifier lPartQualifierInt = lPartQualifierIterInt.next();\n\t\t\t\torg.opencds.vmr.v1_0.schema.EntityNamePartQualifier lPartQualifierExt = eNPartQualifierInternal2ENPartQualifier(lPartQualifierInt);\n\t\t\t\tlENXPExt.getQualifier().add(lPartQualifierExt);\n\t\t\t}\n\t\t}\t\t\n\n\t\treturn lENXPExt;\n\t}", "@NotNull\n String simpleName();", "public interface SimpleRestriction extends SchemaComponent {\n public static final String ENUMERATION_PROPERTY = \"enumerations\";\n public static final String PATTERN_PROPERTY = \"patterns\";\n public static final String MIN_EXCLUSIVE_PROPERTY = \"minExclusives\";\n public static final String MIN_LENGTH_PROPERTY = \"minLengths\";\n public static final String MAX_LENGTH_PROPERTY = \"maxLengths\";\n public static final String FRACTION_DIGITS_PROPERTY = \"fractionDigits\";\n public static final String WHITESPACE_PROPERTY = \"whitespaces\";\n public static final String MAX_INCLUSIVE_PROPERTY = \"maxInclusives\";\n public static final String TOTAL_DIGITS_PROPERTY = \"totalDigits\";\n public static final String LENGTH_PROPERTY = \"lengths\";\n public static final String MIN_INCLUSIVE_PROPERTY = \"minInclusives\";\n public static final String MAX_EXCLUSIVE_PROPERTY = \"maxExclusives\";\n public static final String BASE_PROPERTY = \"base\";\n public static final String INLINETYPE_PROPERTY = \"inlinetype\";\n \n Collection<TotalDigits> getTotalDigits();\n void addTotalDigit(TotalDigits td);\n void removeTotalDigit(TotalDigits td);\n \n Collection<MinExclusive> getMinExclusives();\n void addMinExclusive(MinExclusive me);\n void removeMinExclusive(MinExclusive me);\n \n Collection<MinInclusive> getMinInclusives();\n void addMinInclusive(MinInclusive me);\n void removeMinInclusive(MinInclusive me);\n \n Collection<MinLength> getMinLengths();\n void addMinLength(MinLength ml);\n void removeMinLength(MinLength ml);\n \n Collection<MaxLength> getMaxLengths();\n void addMaxLength(MaxLength ml);\n void removeMaxLength(MaxLength ml);\n \n Collection<Pattern> getPatterns();\n void addPattern(Pattern p);\n void removePattern(Pattern p);\n \n Collection<MaxExclusive> getMaxExclusives();\n void addMaxExclusive(MaxExclusive me);\n void removeMaxExclusive(MaxExclusive me);\n \n Collection<MaxInclusive> getMaxInclusives();\n void addMaxInclusive(MaxInclusive me);\n void removeMaxInclusive(MaxInclusive me);\n \n Collection<Length> getLengths();\n void addLength(Length me);\n void removeLength(Length me);\n \n Collection<Whitespace> getWhitespaces();\n void addWhitespace(Whitespace me);\n void removeWhitespace(Whitespace me);\n \n Collection<FractionDigits> getFractionDigits();\n void addFractionDigits(FractionDigits fd);\n void removeFractionDigits(FractionDigits fd);\n \n Collection<Enumeration> getEnumerations();\n void addEnumeration(Enumeration fd);\n void removeEnumeration(Enumeration fd);\n \n LocalSimpleType getInlineType();\n void setInlineType(LocalSimpleType aSimpleType);\n \n}", "public void test_hk_03() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n OntProperty property = ontModel.createObjectProperty(\"http://www.aldi.de#property\");\n /* MinCardinalityRestriction testClass = */\n ontModel.createMinCardinalityRestriction(null, property, 42);\n \n }", "@Test // DATAREST-1321\n\tvoid serializesNonStringLookupValues() throws Exception {\n\t\tPersistentProperty<?> property = persistentEntities.getRequiredPersistentEntity(PetOwner.class)\n\t\t\t\t.getRequiredPersistentProperty(\"home\");\n\t\twhen(associations.isLookupType(property)).thenReturn(true);\n\n\t\t// When a Pet is rendered\n\t\tPetOwner owner = new PetOwner();\n\t\towner.home = new Home();\n\n\t\tString result = mapper.writeValueAsString(owner);\n\n\t\t// The it appears as numeric value\n\t\tassertThat(JsonPath.parse(result).read(\"$.home\", Integer.class)) //\n\t\t\t\t.isEqualTo(41);\n\t}", "@Override\n\tpublic int modifierPersonne(Personne p) {\n\t\treturn dao.modifierPersonne(p);\n\t}", "@ApiModelProperty(value = \"External ID. Effect: Controls the value of the corresponding CfgPerson attribute \")\n public String getExternalID() {\n return externalID;\n }" ]
[ "0.5671094", "0.53498864", "0.53302586", "0.52974063", "0.52188694", "0.5212988", "0.5180648", "0.5165805", "0.5162531", "0.5159423", "0.514124", "0.5125274", "0.51236516", "0.51200366", "0.5101602", "0.50720114", "0.50688255", "0.50683135", "0.50613886", "0.50594217", "0.50495285", "0.504712", "0.5039575", "0.5034783", "0.5024864", "0.50121033", "0.50079054", "0.5005655", "0.49991387", "0.49905932", "0.49852312", "0.49641013", "0.49621946", "0.49531078", "0.49474016", "0.49470142", "0.4944587", "0.4944061", "0.49353573", "0.49189222", "0.4914124", "0.49114907", "0.49091023", "0.49038273", "0.48935705", "0.48856893", "0.48774502", "0.48579568", "0.4856664", "0.4856664", "0.48546776", "0.48269546", "0.48237425", "0.48234722", "0.48111323", "0.4810777", "0.47966412", "0.47920713", "0.4791241", "0.47904822", "0.47719306", "0.47657523", "0.47536555", "0.47483984", "0.47438988", "0.47427726", "0.47420275", "0.47410926", "0.47359562", "0.4734741", "0.47346878", "0.47214857", "0.4720322", "0.47191307", "0.47191244", "0.4718421", "0.471793", "0.47178882", "0.4717469", "0.47154126", "0.47145525", "0.47099492", "0.47021842", "0.4700021", "0.4698824", "0.46988082", "0.46983534", "0.46968174", "0.46951762", "0.46948463", "0.46925232", "0.46863252", "0.46856037", "0.46854955", "0.46851772", "0.46844876", "0.46837893", "0.46822077", "0.46817482", "0.4675738" ]
0.5817922
0
Constraints: Not nullable, Maximum length: 2 Original property name from the Odata EDM: OrderIsBlockedForCustomer
public void setOrderIsBlockedForCustomer( @Nullable final String orderIsBlockedForCustomer) { rememberChangedField("OrderIsBlockedForCustomer", this.orderIsBlockedForCustomer); this.orderIsBlockedForCustomer = orderIsBlockedForCustomer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getIsEntityRequired() {\n return Boolean.TRUE.toString();\n }", "public String getContactBlocked() {\n return contactBlocked;\n }", "public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}", "io.opencannabis.schema.commerce.OrderCustomer.CustomerOrBuilder getCustomerOrBuilder();", "public String getCustomerType() \n {\n return customerType;\n }", "@Test\n @ExpectedException(BusinessRuleException.class)\n public final void testMinLengthValidation() {\n\n SimpleCustomerDto customer = new SimpleCustomerDto();\n customer.setFirstName(\"Alfred\");\n customer.setLastName(\"Sloan\");\n customer.setCustomerNr(-1);\n customer.setUsername(\"a\"); // violates minlength = 3 constraint\n customer.setBirthDate(new DateTime(2008, 1, 1, 1, 1, 0, 0));\n\n customerServiceModelService.createCustomer(customer);\n }", "@JSProperty\n boolean isRequired();", "boolean getOrderPersonIdNull();", "@Override\n\tpublic boolean queryReturnGoodsRequestEntityByCondition(String waybillNo) {\n\t\treturn false;\n\t}", "@ApiModelProperty(example = \"false\", value = \"If true, this means you want to leave us and that's sad... :'-(\")\n public Boolean getIsCustomerWantsToTerminateHisContract() {\n return isCustomerWantsToTerminateHisContract;\n }", "@ApiModelProperty(value = \"If this is true, then there is an entity with this identifier/type combination, but BNet is not yet allowed to show it. Sorry!\")\n public Boolean isRedacted() {\n return redacted;\n }", "boolean hasCustomerNegativeCriterion();", "public abstract boolean isAllowCustomProperties();", "public void setBillingIsBlockedForCustomer(\n @Nullable\n final String billingIsBlockedForCustomer) {\n rememberChangedField(\"BillingIsBlockedForCustomer\", this.billingIsBlockedForCustomer);\n this.billingIsBlockedForCustomer = billingIsBlockedForCustomer;\n }", "public void setCustomerType(int v) \n {\n \n if (this.customerType != v)\n {\n this.customerType = v;\n setModified(true);\n }\n \n \n }", "boolean getRequired();", "boolean getRequired();", "boolean getRequired();", "public Boolean getBlocked() {\n return this.blocked;\n }", "void rejectNewOrders();", "public String getDisablebuyerrequirements() {\r\n return disablebuyerrequirements;\r\n }", "void rejectOrder(String orderId);", "boolean checkOrderNotAcceptedYet(int idOrder);", "public boolean getBlocked() { return this.blocked; }", "public void setContactBlocked(String contactBlocked) {\n this.contactBlocked = contactBlocked;\n }", "@Override\n public java.lang.String getLegalPersonality() {\n return _entityCustomer.getLegalPersonality();\n }", "@Schema(description = \"El nombre del negocio\")\n public String getBusinessName() {\n return businessName;\n }", "public boolean shouldSkipField(FieldAttributes f) {\n\t\t return f.getName().equals(\"user_id\")\n || f.getName().equals(\"owner\")\n || f.getName().equals(\"recipient\")\n || f.getName().equals(\"isGood\")\n || f.getName().equals(\"reward\");\n\t\t}", "public Value restrictToNonAttributes() {\n Value r = new Value(this);\n r.flags &= ~(PROPERTYDATA | ABSENT | PRESENT_DATA | PRESENT_ACCESSOR);\n return canonicalize(r);\n }", "boolean hasCustomerExtensionSetting();", "public void setGuaranteedDelivery(boolean value) {\r\n this.guaranteedDelivery = value;\r\n }", "String getBlockPolicy();", "public int getForbidCondition() {\n\t\t\treturn forbidCondition;\n\t\t}", "boolean hasCustomerUserAccessInvitation();", "@ApiModelProperty(value = \"The user that canceled the auto order\")\r\n public String getCanceledByUser() {\r\n return canceledByUser;\r\n }", "public void findOrderCanceledOrValidate() {\n log.info(\"OrdersBean : findOrderCanceledOrValidate\");\n\n FacesContext context = FacesContext.getCurrentInstance();\n\n log.info(\"requestOrdersList : \" + requestOrdersList);\n if ((requestOrdersList.equals(\"\")) || (!findOrdersCanceledOrValidateByIdOrder()) && (!findOrdersCanceledOrValidateByIdUser()) && (!findOrdersCanceledOrValidateByUsername())) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"fxs.ordersList.requestError\"), null));\n ordersEntities = Collections.emptyList();\n }\n }", "public interface CustomerInfo extends EObject {\n\t/**\n\t * Returns the name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerLastName(String bookingRef);\n\n\t/**\n\t * Returns the age of the customer associated to the booking reference. \n\t * Returns -1 if the booking reference does not exist.\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getCustomerAge(String bookingRef);\n\n\t/**\n\t * Returns the email of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */ \n\tString getCustomerEmail(String bookingRef);\n\n\t/**\n\t * Returns the ccnr of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcNr(String bookingRef);\n\n\t/**\n\t * Returns the ccv of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcV(String bookingRef);\n\n\t/**\n\t * Returns the expiry month of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpMonth(String bookingRef);\n\n\t/**\n\t * Returns the expiry year of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpYear(String bookingRef);\n\n\t/**\n\t * Returns the first name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardFirstName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardLastName(String bookingRef);\n\n}", "boolean isSetIsManaged();", "public Builder setBlocked(boolean value) {\n copyOnWrite();\n instance.setBlocked(value);\n return this;\n }", "@ApiModelProperty(required = true, value = \"editable flag; true if user can modify payment order\")\n public Boolean getEditableByUser() {\n return editableByUser;\n }", "public void setCustomerType(String customerType) \n {\n this.customerType = customerType;\n }", "@Test\n\tpublic void shouldNotGetCustomerWithWrongOrder()\n\t{\n\t\tfinal Response get = performGetCustomersWithDifferentQueries(\n\t\t\t\tImmutableMap.of(BASE_SITE_PARAM, BASE_SITE_ID, \"orderId\", \"wrong_order\"));\n\t\tassertResponse(Status.BAD_REQUEST, get);\n\t}", "public boolean getMethodConstraintsSpecifiedField() {\n\treturn methodConstraintsSpecified;\n }", "public boolean isOverPaymentAllowed() {\n\t\treturn false;\n\t}", "public OrderType getCodeOrderType() {\nreturn this.codeOrderType;\n}", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "@Override\n\tpublic boolean createOrderBill(OrderBill orderBill) {\n\t\treturn false;\n\t}", "@Override\n public int characteristics() {\n return ORDERED | NONNULL | IMMUTABLE;\n }", "public CustomerPolicyProperties() {\n }", "public default boolean shouldHideEntity(){ return false; }", "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 getExempt();", "public boolean requiresPropertyOrdering()\n/* */ {\n/* 377 */ return false;\n/* */ }", "Optional<Customer> findByIdAndIsDisabledFalse(Long id);", "java.lang.String getBrokerCommission();", "@ApiModelProperty(example = \"null\", value = \"Internal usage: Old offer type. Is the current contract model needs to be converted into a new contract type\")\n public Boolean getIsModelMustBeTransmittedInNewContract() {\n return isModelMustBeTransmittedInNewContract;\n }", "@Test\n public void testSetAdminCommentsOverflow() {\n System.out.println(\"setAdminComments Test (Overflow value)\");\n String adminComments = \".\".repeat(65536);\n user.setAdminComments(adminComments);\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertFalse(violations.isEmpty());\n }", "@Enumerated(EnumType.STRING)\n@Column(name = \"STATUS\", length = EntityWithId.COLUMNLENGTH)\n \n @NotNull(message = \"{NotNull.gov.nih.nci.calims2.domain.administration.customerservice.BillingInformation.status}\")\n public gov.nih.nci.calims2.domain.administration.customerservice.enumeration.BillingInformationStatus getStatus() {\n return status;\n }", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "boolean hasCustomerClient();", "List<CustomerOrderBroadbandASID> selectCustomerOrderBroadbandASID(CustomerOrderBroadbandASID cobasid);", "public Customer()\n{\n this.firstName = \"noFName\";\n this.lastName = \"noLName\";\n this.address = \"noAddress\";\n this.phoneNumber = 0;\n this.emailAddress = \"noEmail\";\n \n}", "@TransactionAttribute(TransactionAttributeType.SUPPORTS)\n protected Criteria<Customer, Customer> configRestrictions(Filter<Customer> filter) {\n Criteria<Customer, Customer> criteria = criteria();\n \n if (filter.hasParam(Customer_.id.getName())) {\n criteria.eq(Customer_.id, filter.getLongParam(Customer_.id.getName())); \n } \n if (filter.hasParam(Customer_.name.getName())) {\n criteria.eq(Customer_.name, (String)filter.getParam(Customer_.name.getName())); \n } \n if (filter.hasParam(Customer_.email.getName())) {\n criteria.eq(Customer_.email, (String)filter.getParam(Customer_.email.getName())); \n } \n if (filter.hasParam(Customer_.dateOfBirth.getName())) {\n criteria.eq(Customer_.dateOfBirth, (Date)filter.getParam(Customer_.dateOfBirth.getName())); \n } \n if (filter.hasParam(Customer_.city.getName())) {\n criteria.join(Customer_.city,\n where(City.class, JoinType.LEFT)\n .eq(City_.id, ((City) filter.getParam(\"city\")).getId()));\n } \n if (filter.hasParam(Customer_.state.getName())) {\n criteria.join(Customer_.state,\n where(State.class, JoinType.LEFT)\n .eq(State_.id, ((State) filter.getParam(\"state\")).getId()));\n } \n\n //create restrictions based on filter entity\n if (has(filter.getEntity())) {\n Customer filterEntity = filter.getEntity();\n \n\t if (has(filterEntity.getId())) {\n criteria.eq(Customer_.id, filterEntity.getId()); \n\t } \n\t if (has(filterEntity.getName())) {\n criteria.eq(Customer_.name, filterEntity.getName()); \n\t } \n\t if (has(filterEntity.getEmail())) {\n criteria.eq(Customer_.email, filterEntity.getEmail()); \n\t } \n\t if (has(filterEntity.getDateOfBirth())) {\n criteria.eq(Customer_.dateOfBirth, filterEntity.getDateOfBirth()); \n\t } \n\t if (has(filterEntity.getCity())) {\n criteria.join(Customer_.city,\n where(City.class, JoinType.LEFT)\n .eq(City_.id, filterEntity.getCity().getId()));\n\t } \n\t if (has(filterEntity.getState())) {\n criteria.join(Customer_.state,\n where(State.class, JoinType.LEFT)\n .eq(State_.id, filterEntity.getState().getId()));\n\t } \n }\n return criteria;\n }", "boolean setConfirmationCode(OrderBean orderToUpdate);", "public AllowedKey getAllowedKey() {\r\n\t\treturn fieldAllowedKey;\r\n\t}", "protected void validateEntity() {\n super.validateEntity();\n }", "@java.lang.Override\n public boolean getBlocked() {\n return blocked_;\n }", "List<Customer> findByFirstNameAndIsDisabledFalse(String firstName);", "@Override\n public boolean isValid(Claim claim, ConstraintValidatorContext constraintValidatorContext) {\n if (claim == null || claim.getType() == null) \n return true; \n if (claim.getType().equals(ClaimType.Auto) && claim.getAutoClaim() == null) \n return false; \n if (claim.getType().equals(ClaimType.Property) && claim.getPropertyClaim() == null)\n return false;\n \n \n if (claim.getPropertyClaim() != null && claim.getAutoClaim() != null) {\n return false;\n } \n \n return true;\n }", "public List<String> getPaymentRequestInReceivingStatus();", "@ApiModelProperty(required = true, value = \"A unique and immutable identifier used to identify the customer resource. This identifier has no meaning to the account owner.\")\n @NotNull\n\n@Size(min=1,max=40) \n public String getPartyId() {\n return partyId;\n }", "private void setBlocked(boolean value) {\n\n blocked_ = value;\n }", "@Column(name = \"BUSINESS_KEY_\", length = 250)\n public String getBusinessKey() {\n return businessKey;\n }", "@Override\r\n public boolean canDisapprove(Document document) {\n return false;\r\n }", "public void setSendingReferrersAsNotSent() {\n }", "@Override\r\n\tprotected Set<String>[] getForbidSetArray() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic boolean checkExclusive(MMkEntity makerEntity) {\n\t\treturn false;\r\n\t}", "@JsonGetter(\"blockPayphone\")\r\n public boolean getBlockPayphone ( ) { \r\n return this.blockPayphone;\r\n }", "public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}", "public void setExistingCustomer(Customer existingCustomer) { this.existingCustomer = existingCustomer; }", "boolean hasOrderPersonId();", "@Then(\"^customer seleting the right contact in the contact list$\")\r\n\tpublic void customer_seleting_the_right_contact_in_the_contact_list() throws Throwable {\n\t\tthrow new PendingException();\r\n\t}", "List<Receipt> getNotApproved() throws DbException;", "@ApiModelProperty(value = \"Phone number of customer\")\n public String getCustomerPhoneNumber() {\n return customerPhoneNumber;\n }", "public Customer(@NotBlank(message = \"Name can't be blank\") String name, @NotBlank(message = \"Surname can't be blank\") String surname, @NotBlank(message = \"Phone can't be blank\") String phone, @NotNull(message = \"Date of birth can't be blank\") LocalDate dateOfBirth, int numberOfOffices, @NotNull(message = \"level of privilege can't be blank\") int levelOfPrivilege) {\n super(name, surname, phone, dateOfBirth);\n this.numberOfOffices = numberOfOffices;\n this.levelOfPrivilege = levelOfPrivilege;\n }", "Boolean isConsumeLockEntity();", "boolean getValidateOnly();", "boolean getValidateOnly();", "public String getLBR_PaymentAllocationPriority();", "public void setC_Subscription_Delivery_ID (int C_Subscription_Delivery_ID)\n{\nset_ValueNoCheck (\"C_Subscription_Delivery_ID\", new Integer(C_Subscription_Delivery_ID));\n}", "public boolean isRequired();", "public OrderOffered() {\r\n }", "public void setRequired(boolean required) {\n this.required = required;\n }", "public msg_safety_allowed_area() {\n msgid = MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA;\n }", "@Override\n\tpublic boolean checkEWaybillNoExceptPDAPending(String waybillNo) {\n\t\treturn true;\n\t}", "@PropertyGetter(role = IS_IMPLICIT)\n\tboolean isImplicit();", "@Override\n\tpublic Boolean validate(Object obj) throws BusinessException {\n\t\treturn null;\n\t}", "default boolean renderRequired() {\n // if (!isPrimaryKey() && isRequired() && ) constraints.add(JdlUtils.validationRequired());\n return isRequired() && !(getName().equals(\"id\") && getType().equals(JdlFieldEnum.UUID));\n }", "@DynamoDBIgnore\n @Override\n public String getConsentNotificationEmail() {\n return consentNotificationEmail;\n }", "@Override\n\tpublic List<PropertyFilter> buildPropertyFilter(CcNoticereceive entity) {\n\t\treturn null;\n\t}" ]
[ "0.51743037", "0.5147947", "0.50873774", "0.49637145", "0.49188074", "0.49183246", "0.48891348", "0.48769754", "0.4873206", "0.48697862", "0.48696896", "0.483124", "0.482837", "0.47932336", "0.47793868", "0.4773289", "0.4773289", "0.4773289", "0.47653517", "0.47479877", "0.47458237", "0.47367993", "0.47346905", "0.47318116", "0.47214982", "0.47192705", "0.46710008", "0.46581966", "0.46419072", "0.46360436", "0.4630054", "0.46277487", "0.46234667", "0.46145377", "0.45997742", "0.45965305", "0.4593769", "0.45834157", "0.45791715", "0.45724338", "0.45640543", "0.4563738", "0.4550567", "0.4549768", "0.45493725", "0.45433366", "0.45370165", "0.45293304", "0.45212817", "0.452104", "0.45197362", "0.45179927", "0.45141706", "0.45069063", "0.45051506", "0.4500808", "0.44972694", "0.4495393", "0.449453", "0.44912675", "0.44882014", "0.448293", "0.44801593", "0.44795933", "0.4471522", "0.4471421", "0.44668913", "0.4463859", "0.44637245", "0.4460546", "0.44604075", "0.4456512", "0.4456001", "0.4454885", "0.44526052", "0.44500306", "0.44489914", "0.44473514", "0.44438732", "0.44432792", "0.44424766", "0.44404462", "0.44303983", "0.44230393", "0.4421068", "0.44191027", "0.44169822", "0.44169822", "0.4411986", "0.44079688", "0.44046864", "0.43970573", "0.43965852", "0.4389595", "0.4388143", "0.43873078", "0.43868175", "0.43814722", "0.43812537", "0.43811044" ]
0.59957796
0
Constraints: noneOriginal property name from the Odata EDM: PostingIsBlocked
public void setPostingIsBlocked( @Nullable final Boolean postingIsBlocked) { rememberChangedField("PostingIsBlocked", this.postingIsBlocked); this.postingIsBlocked = postingIsBlocked; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getBlocked() { return this.blocked; }", "public Boolean getBlocked() {\n return this.blocked;\n }", "@Override\r\n public boolean canDisapprove(Document document) {\n return false;\r\n }", "@java.lang.Override\n public boolean getBlocked() {\n return blocked_;\n }", "public void setSendingReferrersAsNotSent() {\n }", "public boolean requiresPostApproval() {\n return true;\n }", "public Boolean isBlocked() {\n return this.blocked;\n }", "private Permit saveToPermitObject() {\n\n\n\n return null;\n\n }", "@Override\r\n\tpublic boolean isBlocked() {\r\n\t\tif (this.status.equals(Status.BLOCKED)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private boolean isBlocked() {\n return block_state <= 1;\n }", "@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean canBeRidden(Entity entityIn)\n\t{\n\t\treturn false;\n\t}", "public void setBlocked(Boolean blocked) {\n this.blocked = blocked;\n }", "private void setBlocked(boolean value) {\n\n blocked_ = value;\n }", "@java.lang.Override\n public boolean getBlocked() {\n return instance.getBlocked();\n }", "@Override\n protected void validateSave(Fornecedor post) {\n\n }", "public Builder setBlocked(boolean value) {\n copyOnWrite();\n instance.setBlocked(value);\n return this;\n }", "@Override\n\tpublic boolean isBlocked() {\n\t\treturn this.parent.isBlocked(this);\n\t}", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Controls whether the incident will have postmortem.\")\n\n public Boolean getPostmortemIgnored() {\n return postmortemIgnored;\n }", "@Override\n\tpublic boolean isPending() {\n\t\treturn model.isPending();\n\t}", "public String getContactBlocked() {\n return contactBlocked;\n }", "public Boolean isProhibited() {\n throw new NotImplementedException();\n }", "@Override\n\tprotected boolean canModifyField(ResourceInformation resourceInformation, String fieldName, ResourceField field) {\n\t\treturn field == null || field.getAccess().isPostable();\n\t}", "public boolean hasRejected() {\n return fieldSetFlags()[19];\n }", "public default boolean shouldHideEntity(){ return false; }", "public boolean getRejected() {\n return rejected;\n }", "public void setBlockedTime() {\r\n\t\t\tthis.blockedTime = 0;\r\n\t\t}", "@Override\n\tpublic boolean isDenied() {\n\t\treturn model.isDenied();\n\t}", "public int getForbidCondition() {\n\t\t\treturn forbidCondition;\n\t\t}", "public boolean getAllowModifications() {\n return true;\n }", "protected void markAsInappropriate(Post p, Boolean b) {\n this.setFlag(p, \"inappropriate\", b);\n }", "public boolean isAllowed() {\n \t\treturn isAllowed;\n \t}", "public boolean getRejected() {\n return rejected;\n }", "@Override\n public Response throttlingDenyPoliciesPost(String contentType, BlockingConditionDTO body,\n MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n //Add the block condition. It will throw BlockConditionAlreadyExistsException if the condition already\n // exists in the system\n String uuid = null;\n if (ConditionTypeEnum.API.equals(body.getConditionType()) ||\n ConditionTypeEnum.APPLICATION.equals(body.getConditionType()) ||\n ConditionTypeEnum.USER.equals(body.getConditionType())) {\n uuid = apiProvider.addBlockCondition(body.getConditionType().toString(),\n (String) body.getConditionValue(), body.isConditionStatus());\n } else if (ConditionTypeEnum.IP.equals(body.getConditionType()) ||\n ConditionTypeEnum.IPRANGE.equals(body.getConditionType())) {\n if (body.getConditionValue() instanceof Map) {\n JSONObject jsonObject = new JSONObject();\n jsonObject.putAll((Map) body.getConditionValue());\n\n if (ConditionTypeEnum.IP.equals(body.getConditionType())) {\n RestApiAdminUtils.validateIPAddress(jsonObject.get(\"fixedIp\").toString());\n }\n if (ConditionTypeEnum.IPRANGE.equals(body.getConditionType())) {\n RestApiAdminUtils.validateIPAddress(jsonObject.get(\"startingIp\").toString());\n RestApiAdminUtils.validateIPAddress(jsonObject.get(\"endingIp\").toString());\n }\n uuid = apiProvider.addBlockCondition(body.getConditionType().toString(),\n jsonObject.toJSONString(), body.isConditionStatus());\n }\n }\n\n //retrieve the new blocking condition and send back as the response\n BlockConditionsDTO newBlockingCondition = apiProvider.getBlockConditionByUUID(uuid);\n BlockingConditionDTO dto = BlockingConditionMappingUtil.fromBlockingConditionToDTO(newBlockingCondition);\n return Response.created(new URI(RestApiConstants.RESOURCE_PATH_THROTTLING_BLOCK_CONDITIONS + \"/\"\n + uuid)).entity(dto).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceAlreadyExists(e)) {\n RestApiUtil.handleResourceAlreadyExistsError(\"A black list item with type: \"\n + body.getConditionType() + \", value: \" + body.getConditionValue() + \" already exists\", e, log);\n } else {\n String errorMessage = \"Error while adding Blocking Condition. Condition type: \"\n + body.getConditionType() + \", \" + \"value: \" + body.getConditionValue() + \". \" + e.getMessage();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n } catch (URISyntaxException | ParseException e) {\n String errorMessage = \"Error while retrieving Blocking Condition resource location: Condition type: \"\n + body.getConditionType() + \", \" + \"value: \" + body.getConditionValue() + \". \" + e.getMessage();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n return null;\n }", "public boolean isOverPaymentAllowed() {\n\t\treturn false;\n\t}", "public fbStatusPostingValidation() {\n\t\tsuper();\t\n\t}", "@ApiModelProperty(value = \"If this is true, then there is an entity with this identifier/type combination, but BNet is not yet allowed to show it. Sorry!\")\n public Boolean isRedacted() {\n return redacted;\n }", "@Override\n\tpublic boolean isDenied();", "public boolean isProhibited() {\n return getFlow().isProhibited();\n }", "final boolean isRobotBlocked() {\n return mIsBlocked;\n }", "public void setRejected(boolean value) {\n this.rejected = value;\n }", "public void setIsApproved (boolean IsApproved);", "public void setIsApproved (boolean IsApproved);", "public boolean isAllowed() {\n return isAllowed;\n }", "@Override\r\n public boolean isRequest() {\n return false;\r\n }", "public void setIsFromMassUpdate (boolean IsFromMassUpdate);", "@Override\n\tpublic boolean isApproved();", "public boolean isSleepingAllowed () {\n\t\treturn body.isSleepingAllowed();\n\t}", "@SystemAPI\n\tboolean needsApproval();", "public boolean isPostingAllowed() {\n if (currentUser == null || activeTopic == null) {\n return false;\n }\n if (currentUser.isPublicAccount()) {\n return false;\n }\n return activeTopic.isEditable();\n }", "public String getIsEntityRequired() {\n return Boolean.TRUE.toString();\n }", "public boolean getExempt();", "@Override\n\tprotected Set<RequestTypeEnum> provideAllowableRequestTypes() {\n\t\treturn Collections.singleton(RequestTypeEnum.POST);\n\t}", "public void setPostOnly(boolean postOnly) {\n this.postOnly = postOnly;\n }", "public boolean isPost();", "public boolean isPost();", "@Override\n protected String requiredPostPermission() {\n return \"admin\";\n }", "@Override\n\tpublic boolean isApproved() {\n\t\treturn model.isApproved();\n\t}", "@PrePersist\n public void initializeEntity() {\n this.isApproved = null;\n }", "boolean isBlockedBy(Task otherTask);", "public boolean isRequest(){\n return false;\n }", "@Override\r\n\tprotected boolean shouldBlock(Entity e) {\n\t\treturn super.shouldBlock(e);\r\n\t}", "public boolean shouldSkipField(FieldAttributes f) {\n\t\t return f.getName().equals(\"user_id\")\n || f.getName().equals(\"owner\")\n || f.getName().equals(\"recipient\")\n || f.getName().equals(\"isGood\")\n || f.getName().equals(\"reward\");\n\t\t}", "@VTID(39)\n boolean getRequireManualUpdate();", "@Override\n\tpublic boolean ignoreForeignItems() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean ignoreForeignItems() {\n\t\treturn true;\n\t}", "public Boolean getBspReconciled(){\n return bspReconciled;\n }", "public String getNotAcceptReason() {\r\n\t\treturn notAcceptReason;\r\n\t}", "public java.lang.Boolean getRejected () {\n\t\treturn rejected;\n\t}", "@Override\r\n\tpublic boolean isDisabled() throws NotesApiException {\n\t\treturn false;\r\n\t}", "public boolean isApproved();", "public boolean isApproved();", "public Boolean getNotHasPermission()\r\n {\r\n return notHasPermission;\r\n }", "public void setNegativePermissions();", "@Override\n\tprotected List<Message> validateUpdate(SecUser entity) {\n\t\treturn null;\n\t}", "public void setDenied() {\r\n\t\tstatus = \"Denied\";\r\n\t}", "public void setNotPersisted(boolean value) {\n this.notPersisted = value;\n }", "public boolean isSendOnlyUpdatedField() {\n return sendOnlyUpdatedField;\n }", "@Override\n\tpublic boolean isDraft() {\n\t\treturn model.isDraft();\n\t}", "public boolean getSendsParametersOnlyOnSendCurrentPatch()\n {\n return false;\n }", "@ApiModelProperty(value = \"Top level domains that you do not want to allow access to, e.g. mydomain.com - will block all subdomains as well\")\n public List<String> getBlockedDomains() {\n return blockedDomains;\n }", "@JsonIgnore\n public boolean isPreemptibleSet() {\n return isSet.contains(\"preemptible\");\n }", "public void setContactBlocked(String contactBlocked) {\n this.contactBlocked = contactBlocked;\n }", "public String getBlockedMssg() { return this.blockedMssg; }", "public boolean isExempt();", "@Override\n public boolean isDisableMetadataField() {\n return false;\n }", "public String getREJECTED_BY() {\r\n return REJECTED_BY;\r\n }", "public String getREJECTED_BY() {\r\n return REJECTED_BY;\r\n }", "@Override\n public boolean supportsIntegrityEnhancementFacility() {\n return false;\n }", "@Test\n public void testValidApplyWithBlockedUser() {\n with().parameters(\"loanAmount\", \"10\", \"term\", \"12 month\", \"name\", \"kung-fu\", \"surname\", \"panda\", \"personalId\", \"kung-fu-666-panda\").expect().body(\"passed\", equalTo(false), \"errors.size()\", is(1)).when().post(\"/apply\");\n //No additional user created, we have one from fixture sql\n assertEquals(1, userDataRepository.count());\n }", "@Override\n protected void validateEdit(Fornecedor post) {\n\n }", "public boolean shouldPreventFlow(Block b) {\n\t\treturn !b.hasMetadata(\"flow\");\n\t}", "@ApiModelProperty(example = \"null\", value = \"Internal usage: Old offer type. Is the current contract model needs to be converted into a new contract type\")\n public Boolean getIsModelMustBeTransmittedInNewContract() {\n return isModelMustBeTransmittedInNewContract;\n }", "Boolean getIsPosted();", "public boolean canSave()\n\t{\n\t\treturn false;\n\t}", "public boolean isFromMassUpdate();", "public String getReasonRejection()\n\t{\n\t\treturn reasonRejection;\n\t}", "@java.lang.Override\n public boolean hasReason() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "@Ignore\n public void testDisapproveReason() throws Exception {\n\n }", "boolean isReturnEntityRequested();" ]
[ "0.6280338", "0.61979806", "0.61125624", "0.606567", "0.6012332", "0.59951746", "0.5981738", "0.59441984", "0.59198785", "0.5835524", "0.57821167", "0.578016", "0.5720785", "0.5694173", "0.5634946", "0.56129295", "0.56087446", "0.5554399", "0.5439083", "0.54266363", "0.5407254", "0.54001445", "0.53771347", "0.53710675", "0.53462875", "0.5345099", "0.53425074", "0.5325977", "0.5319066", "0.5315609", "0.5306212", "0.5295031", "0.5286225", "0.5264051", "0.5230339", "0.52221066", "0.5215189", "0.5214516", "0.5208245", "0.5207734", "0.5200836", "0.5197059", "0.5197059", "0.51941234", "0.51768", "0.51650035", "0.5164939", "0.5142059", "0.5139951", "0.5128047", "0.51228476", "0.5113621", "0.5109392", "0.507556", "0.50668025", "0.50668025", "0.505272", "0.5038535", "0.503026", "0.502667", "0.50183064", "0.50153893", "0.5015302", "0.5010223", "0.50096774", "0.5008394", "0.50027585", "0.49999037", "0.49994457", "0.49979103", "0.49950308", "0.49950308", "0.49940202", "0.49914986", "0.4988732", "0.4979476", "0.4967765", "0.49637255", "0.4953471", "0.4947351", "0.49469998", "0.49435988", "0.49419832", "0.49380338", "0.49378914", "0.49372452", "0.49356428", "0.49356428", "0.49297157", "0.49272722", "0.49248305", "0.49236712", "0.49135232", "0.48977005", "0.48935053", "0.48912737", "0.48696446", "0.48682976", "0.48616758", "0.48604864" ]
0.6076885
3
Constraints: Not nullable, Maximum length: 10 Original property name from the Odata EDM: Supplier
public void setSupplier( @Nullable final String supplier) { rememberChangedField("Supplier", this.supplier); this.supplier = supplier; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setName(String value)\n {\n // Since this value is marked as \"mandatory,\" the BC4J Framework will take\n // care of ensuring that it's a non-null value. However, if it is null, we\n // don't want to proceed with any validation that could result in a NPE.\n \n if ((value != null) || (!(\"\".equals(value.trim()))))\n {\n // Verify that the name is unique. To do this, we must check both the entity\n // cache and the database. We begin with the entity cache.\n\n com.sun.java.util.collections.Iterator supplierIterator = \n getEntityDef().getAllEntityInstancesIterator(getDBTransaction());\n \n Number currentId = getSupplierId();\n \n while ( supplierIterator.hasNext() )\n {\n SupplierEOImpl cachedSupplier = (SupplierEOImpl)supplierIterator.next();\n\n String cachedName = cachedSupplier.getName();\n Number cachedId = cachedSupplier.getSupplierId();\n\n // We found a match for the name we're trying to set, so throw an\n // exception. Note that we need to exclude this EO from our test.\n \n if (cachedName != null && value.equalsIgnoreCase(cachedName) && \n cachedId.compareTo(currentId) != 0 )\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name \n }\n } \n\n // Now we want to check the database for any occurences of the supplier\n // name. The most efficient way to check this is with a validation view\n // object to which we add to a special \"Validation\" application module.\n // We then added a \"supplierExists\" method to this entity's expert. This\n // method leverages the VAM and the VVO.\n\n OADBTransaction transaction = getOADBTransaction();\n SupplierEntityExpert expert = getSupplierEntityExpert(transaction);\n\n if (expert.supplierExists(value))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name\n }\n }\n \n setAttributeInternal(NAME, value);\n \n }", "public abstract String metadata(String property);", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "public String getSupplierName() {\n return supplierName;\n }", "@Optional\n Property<String> bhkz();", "@ProviderType\npublic interface StringConstraint extends BaseConstraint, FormatConstraint {\n\n /**\n * Returns the minimum length of the data. The constraint is applicable only for field with type string\n *\n * @return minimum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMinLength();\n\n /**\n * Returns the maximum length of the data. The constraint is applicable only for field with type string\n *\n * @return maximum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMaxLength();\n\n /**\n * As specified in the JSON Schema specification, the regex against which the value of the field should be tested with.\n *\n * Returns the regex. The constraint is applicable only for field with type string\n *\n * @return string represented as pattern\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n default String getPattern() {\n return null;\n }\n}", "public interface AllergyModelProperties extends PropertyAccess<AllergyModel> {\n ModelKeyProvider<AllergyModel> id();\n}", "public interface AdminMainEntity {\n\n public static final String MAIN_ENTITY_NAME_PROPERTY = \"__adminMainEntity\";\n\n public String getMainEntityName();\n\n}", "java.lang.String getField1401();", "public interface UnitTypeProperties extends PropertyAccess<UnitTypeDTO> {\n @Editor.Path(\"id\")\n ModelKeyProvider<UnitTypeDTO> key();\n ValueProvider<UnitTypeDTO, String> id();\n ValueProvider<UnitTypeDTO, String> name();\n @Editor.Path(\"name\")\n LabelProvider<UnitTypeDTO> nameLabel();\n}", "protected static void initPropertyKey() {\n String path = URL_PREFIX + SCHEMA_PKS;\n\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"name\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"age\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"city\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"lang\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"date\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"price\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"weight\\\",\\n\"\n + \"\\\"data_type\\\": \\\"DOUBLE\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n }", "java.lang.String getField1406();", "public void setSupplier(String supplier) {\n this.supplier = supplier == null ? null : supplier.trim();\n }", "ReadOnlyStringProperty unitsProperty();", "public void getName(Supplier supplier) {\n\t\r\n}", "String getSupplierID();", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getGivenName() {\n return givenName;\n }", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getFamilyName() {\n return familyName;\n }", "@Optional\n @ImportColumn(\"VOLLGESCHX\")\n Property<String> zulaessigeVollgeschosse();", "public void setSupplierName(String supplierName) {\n this.supplierName = supplierName == null ? null : supplierName.trim();\n }", "public interface HighlightsColumns {\n\n @DataType(TEXT) @NotNull String VIDEO_TITLE = \"title\";\n @DataType(TEXT) @NotNull String VIDEO_ID = \"id\";\n @DataType(TEXT) @NotNull String THUMBNAIL_URL = \"url\";\n\n}", "protected abstract String getAddressPropertyName();", "public java.lang.String getOldProperty_description(){\n return localOldProperty_description;\n }", "public String getEntityTypeName() { return \"org.doxer.app.db.dbflute.exentity.StShhnKnyMs\"; }", "public interface AEntityProperty {\n}", "java.lang.String getField1025();", "public java.lang.String getNewProperty_description(){\n return localNewProperty_description;\n }", "@Override\n\t\t\tpublic String getPropertyId() {\n\t\t\t\treturn null;\n\t\t\t}", "public void setDocumentNo (String DocumentNo)\n{\nif (DocumentNo == null) throw new IllegalArgumentException (\"DocumentNo is mandatory\");\nif (DocumentNo.length() > 30)\n{\nlog.warning(\"Length > 30 - truncated\");\nDocumentNo = DocumentNo.substring(0,30);\n}\nset_Value (\"DocumentNo\", DocumentNo);\n}", "java.lang.String getField1035();", "@Size(min=1, max=50)\n public String getName() {\n return name;\n }", "java.lang.String getField1402();", "public int getNewProperty_descriptionType(){\n return localNewProperty_descriptionType;\n }", "java.lang.String getField1048();", "public void setOldProperty_description(java.lang.String param){\n localOldProperty_descriptionTracker = true;\n \n this.localOldProperty_description=param;\n \n\n }", "public Supplier() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public interface ElPropertyValue extends ElPropertyDeploy {\r\n\r\n /**\r\n * Return the Id values for the given bean value.\r\n */\r\n public Object[] getAssocOneIdValues(Object bean);\r\n\r\n /**\r\n * Return the Id expression string.\r\n * <p>\r\n * Typically used to produce id = ? expression strings.\r\n * </p>\r\n */\r\n public String getAssocOneIdExpr(String prefix, String operator);\r\n\r\n /**\r\n * Return the logical id value expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInValueExpr(int size);\r\n \r\n /**\r\n * Return the logical id in expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInExpr(String prefix);\r\n \r\n /**\r\n * Return true if this is an ManyToOne or OneToOne associated bean property.\r\n */\r\n public boolean isAssocId();\r\n\r\n /**\r\n * Return true if any path of this path contains a Associated One or Many.\r\n */\r\n public boolean isAssocProperty();\r\n\r\n /**\r\n * Return true if the property is encrypted via Java.\r\n */\r\n public boolean isLocalEncrypted();\r\n \r\n /**\r\n * Return true if the property is encrypted in the DB.\r\n */\r\n public boolean isDbEncrypted();\r\n\r\n /**\r\n * Return the deploy order for the property.\r\n */\r\n public int getDeployOrder();\r\n \r\n /**\r\n * Return the default StringParser for the scalar property.\r\n */\r\n public StringParser getStringParser();\r\n\r\n /**\r\n * Return the default StringFormatter for the scalar property.\r\n */\r\n public StringFormatter getStringFormatter();\r\n\r\n /**\r\n * Return true if the last type is \"DateTime capable\" - can support\r\n * {@link #parseDateTime(long)}.\r\n */\r\n public boolean isDateTimeCapable();\r\n\r\n /**\r\n * Return the underlying JDBC type or 0 if this is not a scalar type.\r\n */\r\n public int getJdbcType();\r\n \r\n /**\r\n * For DateTime capable scalar types convert the long systemTimeMillis into\r\n * an appropriate java time (Date,Timestamp,Time,Calendar, JODA type etc).\r\n */\r\n public Object parseDateTime(long systemTimeMillis);\r\n\r\n /**\r\n * Return the value from a given entity bean.\r\n */\r\n public Object elGetValue(Object bean);\r\n\r\n /**\r\n * Return the value ensuring objects prior to the top scalar property are\r\n * automatically populated.\r\n */\r\n public Object elGetReference(Object bean);\r\n\r\n /**\r\n * Set a value given a root level bean.\r\n * <p>\r\n * If populate then\r\n * </p>\r\n */\r\n public void elSetValue(Object bean, Object value, boolean populate, boolean reference);\r\n\r\n /**\r\n * Make the owning bean of this property a reference (as in not new/dirty).\r\n */\r\n public void elSetReference(Object bean);\r\n\r\n /**\r\n * Convert the value to the expected type.\r\n * <p>\r\n * Typically useful for converting strings to the appropriate number type\r\n * etc.\r\n * </p>\r\n */\r\n public Object elConvertType(Object value);\r\n}", "@NotNull\n @Digits(integer=10,fraction=0)\n\t@Override\n\tpublic String getEname() {\n\t\treturn super.getEname();\n\t}", "String getTypeDefn(String shortName, boolean assoc) {\n if (assoc) {\n // PLong<R>\n return propertyType + \"<R>\";\n\n } else {\n // PLong<QCustomer>\n return propertyType + \"<Q\" + shortName + \">\";\n }\n }", "@DefaultMessage(\"Please enter a unique value for this field\")\n @Key(\"gen.fieldUniqueOnlyException\")\n String gen_fieldUniqueOnlyException();", "java.lang.String getField1016();", "java.lang.String getField1600();", "@Override\n public String getProperty(String s) {\n return null;\n }", "java.lang.String getField1272();", "void declare(String name, Supplier<T> propertySupplier);", "java.lang.String getField1040();", "java.lang.String getField1005();", "public EntityPropertyBean() {}", "java.lang.String getField1078();", "java.lang.String getField1372();", "public void setSupplierId(Number value)\n {\n\n // BC4J validates that this can be updated only on a new line, and that this\n // mandatory attribute is not null. This code adds the additional check \n // of only allowing an update if the value is null to prevent changes while \n // the object is in memory.\n\n if (getSupplierId() != null)\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"SupplierId\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_ID_NO_UPDATE\"); // Message name\n\n }\n\n if (value != null)\n {\n // Supplier id must be unique. To verify this, you must check both the\n // entity cache and the database. In this case, it's appropriate\n // to use findByPrimaryKey( ) because you're unlikely to get a match, and\n // and are therefore unlikely to pull a bunch of large objects into memory.\n\n // Note that findByPrimaryKey() is guaranteed to check all suppliers. \n // First it checks the entity cache, then it checks the database.\n\n OADBTransaction transaction = getOADBTransaction();\n Object[] supplierKey = {value};\n EntityDefImpl supplierDefinition = SupplierEOImpl.getDefinitionObject();\n SupplierEOImpl supplier = \n (SupplierEOImpl)supplierDefinition.findByPrimaryKey(transaction, new Key(supplierKey));\n\n if (supplier != null)\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"SupplierId\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_ID_UNIQUE\"); // Message name \n }\n } \n \n setAttributeInternal(SUPPLIERID, value);\n \n }", "java.lang.String getField1026();", "java.lang.String getField1015();", "@Size(max=4)\n\t@Override\n\tpublic Integer getEmpno() {\n\t\treturn super.getEmpno();\n\t}", "java.lang.String getField1352();", "java.lang.String getField1064();", "public interface CustomerInfo extends EObject {\n\t/**\n\t * Returns the name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerLastName(String bookingRef);\n\n\t/**\n\t * Returns the age of the customer associated to the booking reference. \n\t * Returns -1 if the booking reference does not exist.\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getCustomerAge(String bookingRef);\n\n\t/**\n\t * Returns the email of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */ \n\tString getCustomerEmail(String bookingRef);\n\n\t/**\n\t * Returns the ccnr of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcNr(String bookingRef);\n\n\t/**\n\t * Returns the ccv of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcV(String bookingRef);\n\n\t/**\n\t * Returns the expiry month of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpMonth(String bookingRef);\n\n\t/**\n\t * Returns the expiry year of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpYear(String bookingRef);\n\n\t/**\n\t * Returns the first name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardFirstName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardLastName(String bookingRef);\n\n}", "public interface Location extends Identity {\n\n Property<String> commonName();\n}", "java.lang.String getField1472();", "java.lang.String getField1475();", "public interface RecipeColumns {\n\n @DataType(INTEGER) @PrimaryKey @AutoIncrement String _ID = \"_id\";\n @DataType(TEXT) @NotNull String COLUMN_RECIPE_NAME = \"recipe_name\";\n @DataType(TEXT) String COLUMN_IMAGE_URL = \"recipe_image_url\";\n @DataType(INTEGER) @NotNull String COLUMN_SERVING_COUNT = \"serving_id\";\n @DataType(INTEGER) @NotNull String COLUMN_MARK_FAVORITE = \"mark_as_favorite\";\n\n}", "public void setNewProperty_description(java.lang.String param){\n localNewProperty_descriptionTracker = true;\n \n this.localNewProperty_description=param;\n \n\n }", "java.lang.String getField1301();", "public void setSupplierNum(String supplierNum) {\n this.supplierNum = supplierNum == null ? null : supplierNum.trim();\n }", "java.lang.String getField1489();", "java.lang.String getField1221();", "java.lang.String getField1462();", "java.lang.String getField1237();", "java.lang.String getField1452();", "java.lang.String getField1172();", "java.lang.String getField1125();", "java.lang.String getField1240();", "java.lang.String getField1002();", "public void test_hk_03() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n OntProperty property = ontModel.createObjectProperty(\"http://www.aldi.de#property\");\n /* MinCardinalityRestriction testClass = */\n ontModel.createMinCardinalityRestriction(null, property, 42);\n \n }", "java.lang.String getField1772();", "java.lang.String getField1075();", "java.lang.String getField1262();", "ReadOnlyStringProperty labelMaximumProperty();", "@Test\n public void testFirstNameMaxLength()\n {\n String invalid = repeatM(21);\n owner.setFirstName(invalid);\n assertInvalid(owner, \"firstName\", \"First name must be between 2 and 20 characters\", invalid);\n }", "public void setSupplierName(String pSupplierName) {\n mSupplierName = pSupplierName;\n }", "java.lang.String getField1421();", "java.lang.String getField1552();", "@JSProperty(\"name\")\n @Nullable\n String getName();", "java.lang.String getField1437();", "java.lang.String getField1056();", "java.lang.String getField1241();", "java.lang.String getField1021();", "@JSProperty\n int getMaxLength();", "void setMaxStringLiteralSize(int value);", "@ApiModelProperty(value = \"The initials of an Individual. eg. M.K.\")\n\n@Size(min=1,max=70) \n public String getInitials() {\n return initials;\n }", "@ProviderType\npublic interface EmployeeModel extends BaseModel<Employee> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a employee model instance should use the {@link Employee} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this employee.\n\t *\n\t * @return the primary key of this employee\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this employee.\n\t *\n\t * @param primaryKey the primary key of this employee\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the uuid of this employee.\n\t *\n\t * @return the uuid of this employee\n\t */\n\t@AutoEscape\n\tpublic String getUuid();\n\n\t/**\n\t * Sets the uuid of this employee.\n\t *\n\t * @param uuid the uuid of this employee\n\t */\n\tpublic void setUuid(String uuid);\n\n\t/**\n\t * Returns the employee ID of this employee.\n\t *\n\t * @return the employee ID of this employee\n\t */\n\tpublic long getEmployeeId();\n\n\t/**\n\t * Sets the employee ID of this employee.\n\t *\n\t * @param employeeId the employee ID of this employee\n\t */\n\tpublic void setEmployeeId(long employeeId);\n\n\t/**\n\t * Returns the first name of this employee.\n\t *\n\t * @return the first name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getFirstName();\n\n\t/**\n\t * Sets the first name of this employee.\n\t *\n\t * @param firstName the first name of this employee\n\t */\n\tpublic void setFirstName(String firstName);\n\n\t/**\n\t * Returns the last name of this employee.\n\t *\n\t * @return the last name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getLastName();\n\n\t/**\n\t * Sets the last name of this employee.\n\t *\n\t * @param lastName the last name of this employee\n\t */\n\tpublic void setLastName(String lastName);\n\n\t/**\n\t * Returns the middle name of this employee.\n\t *\n\t * @return the middle name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getMiddleName();\n\n\t/**\n\t * Sets the middle name of this employee.\n\t *\n\t * @param middleName the middle name of this employee\n\t */\n\tpublic void setMiddleName(String middleName);\n\n\t/**\n\t * Returns the birth date of this employee.\n\t *\n\t * @return the birth date of this employee\n\t */\n\tpublic Date getBirthDate();\n\n\t/**\n\t * Sets the birth date of this employee.\n\t *\n\t * @param birthDate the birth date of this employee\n\t */\n\tpublic void setBirthDate(Date birthDate);\n\n\t/**\n\t * Returns the post ID of this employee.\n\t *\n\t * @return the post ID of this employee\n\t */\n\tpublic long getPostId();\n\n\t/**\n\t * Sets the post ID of this employee.\n\t *\n\t * @param postId the post ID of this employee\n\t */\n\tpublic void setPostId(long postId);\n\n\t/**\n\t * Returns the sex of this employee.\n\t *\n\t * @return the sex of this employee\n\t */\n\tpublic Boolean getSex();\n\n\t/**\n\t * Sets the sex of this employee.\n\t *\n\t * @param sex the sex of this employee\n\t */\n\tpublic void setSex(Boolean sex);\n\n}", "java.lang.String getField1050();", "java.lang.String getField1337();", "java.lang.String getField1752();", "public String getSupplier() {\n return supplier;\n }", "PropertyType createPropertyType();", "java.lang.String getProperty();", "java.lang.String getField1425();", "java.lang.String getField1041();", "java.lang.String getField1175();" ]
[ "0.5967969", "0.5463962", "0.5459469", "0.5386337", "0.5372544", "0.53576", "0.5350888", "0.5346232", "0.5343418", "0.5316331", "0.52865064", "0.5260755", "0.52540416", "0.52424794", "0.523622", "0.5231948", "0.52285904", "0.5224292", "0.52022743", "0.5188239", "0.51876825", "0.5181989", "0.51798785", "0.5176991", "0.51746756", "0.5168325", "0.5158035", "0.5154687", "0.5145259", "0.5117775", "0.51154786", "0.5103201", "0.5077957", "0.50640684", "0.5060507", "0.50593144", "0.50559735", "0.5038161", "0.5035063", "0.50226635", "0.5017266", "0.5005498", "0.49898785", "0.49832165", "0.49820897", "0.49811813", "0.49785903", "0.49715978", "0.49652115", "0.49591634", "0.49568367", "0.49564424", "0.495521", "0.49466982", "0.49453834", "0.49438933", "0.4938474", "0.493624", "0.49356282", "0.49334714", "0.49323812", "0.49238122", "0.49237874", "0.49235505", "0.4921977", "0.49154562", "0.4913845", "0.49135754", "0.491332", "0.49108663", "0.49101913", "0.49074596", "0.49059933", "0.4905759", "0.4904543", "0.49038285", "0.49015832", "0.49009466", "0.48993632", "0.48985124", "0.48968762", "0.48946562", "0.48902377", "0.48868984", "0.4886781", "0.4885225", "0.4885084", "0.48849392", "0.48847124", "0.4883377", "0.48819986", "0.48810375", "0.4879531", "0.48778483", "0.4875718", "0.4874642", "0.487416", "0.4873966", "0.48737127", "0.48721334", "0.48715413" ]
0.0
-1
Constraints: Not nullable, Maximum length: 10 Original property name from the Odata EDM: CustomerCorporateGroup
public void setCustomerCorporateGroup( @Nullable final String customerCorporateGroup) { rememberChangedField("CustomerCorporateGroup", this.customerCorporateGroup); this.customerCorporateGroup = customerCorporateGroup; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getEntityName() {\n return \"LicenseRoleGroup\";\n }", "public void setGroup(entity.Group value);", "public String getGroupName();", "java.lang.String getProductGroup();", "public String getGroupName(){\r\n return Validator.unescapeJava(this.groupName);\r\n }", "@Nullable\n // Safe as we want to provide all getters being public for POJOs\n @SuppressWarnings({\"unused\", \"WeakerAccess\"})\n public final String getGroupName() {\n return groupName;\n }", "void setGroupName(String groupName) {\n this.groupName = new String(groupName);\n }", "@Test\n public void testComAdobeCqSocialGroupClientImplCommunityGroupCollectionComponenProperties() {\n // TODO: test ComAdobeCqSocialGroupClientImplCommunityGroupCollectionComponenProperties\n }", "public interface GroupReference extends ComplexExtensionDefinition,\n SequenceDefinition, ComplexTypeDefinition, SchemaComponent {\n public static final String REF_PROPERTY = \"ref\";\n public static final String MAX_OCCURS_PROPERTY = \"maxOccurs\";\n public static final String MIN_OCCURS_PROPERTY = \"minOccurs\";\n\n String getMaxOccurs();\n void setMaxOccurs(String max);\n String getMaxOccursDefault();\n String getMaxOccursEffective();\n \n Integer getMinOccurs();\n void setMinOccurs(Integer min);\n int getMinOccursDefault();\n int getMinOccursEffective();\n \n NamedComponentReference<GlobalGroup> getRef();\n void setRef(NamedComponentReference<GlobalGroup> def);\n}", "java.lang.String getGroupId();", "java.lang.String getGroupId();", "public void setGroupId(String newValue);", "public String getGroupName() {\n return groupName;\n }", "public void setGroupName(String newGroupName)\n {\n this.groupName = newGroupName;\n }", "@Override\n\tpublic String getGroup() {\n\t\treturn \"Group_\"+SliceName(stdClass);\n\t}", "protected String get_object_name() {\n\t\treturn this.servicegroupname;\n\t}", "public String getDefaultPaymentGroupName();", "String getGroupId();", "String getGroupId();", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax50Car xgetProductGroup();", "public String getGroupName() {\n return this.GroupName;\n }", "String organizationName();", "public interface GroupDescription {\n /**\n * Types of the group supported by ONOS.\n */\n enum Type {\n /**\n * Load-balancing among different buckets in a group.\n */\n SELECT,\n /**\n * Single Bucket Group.\n */\n INDIRECT,\n /**\n * Multicast to all buckets in a group.\n */\n ALL,\n /**\n * Similar to {@link Type#ALL} but used for cloning of packets\n * independently of the egress decision (singleton treatment or other\n * group).\n */\n CLONE,\n /**\n * Uses the first live bucket in a group.\n */\n FAILOVER\n }\n\n /**\n * Returns type of a group object.\n *\n * @return GroupType group type\n */\n Type type();\n\n /**\n * Returns device identifier on which this group object is created.\n *\n * @return DeviceId device identifier\n */\n DeviceId deviceId();\n\n /**\n * Returns application identifier that has created this group object.\n *\n * @return ApplicationId application identifier\n */\n ApplicationId appId();\n\n /**\n * Returns application cookie associated with a group object.\n *\n * @return GroupKey application cookie\n */\n GroupKey appCookie();\n\n /**\n * Returns groupId passed in by caller.\n *\n * @return Integer group id passed in by caller. May be null if caller\n * passed in null to let groupService determine the group id.\n */\n Integer givenGroupId();\n\n /**\n * Returns group buckets of a group.\n *\n * @return GroupBuckets immutable list of group bucket\n */\n GroupBuckets buckets();\n}", "public java.lang.String getServiceGroupName(){\n return localServiceGroupName;\n }", "ContactGroup getServerStoredContactListRoot();", "public String getGroupName() {\n return groupName;\n }", "private static String extractGroupName(FloodyGroup floodyGroup) {\n return isBlank(floodyGroup.name())\n ? (\"FloodyGroup-\"\n +\n // append random long number to ensure unique group name\n new Random().nextLong())\n : floodyGroup.name();\n }", "public abstract String getDefaultGroup();", "Key getEntityGroup() {\n\t\treturn entityGroup;\n\t}", "public ProductGroup beProductGroup();", "public String getExtendGroupName()\n {\n return this.extendGroup_name;\n }", "public Group getGroup_1_10() { return cGroup_1_10; }", "GroupType createGroupType();", "GroupType createGroupType();", "public void setRequiredGroupType(typekey.GroupType value);", "@DISPID(10)\r\n\t// = 0xa. The runtime will prefer the VTID if present\r\n\t@VTID(16)\r\n\tjava.lang.String groupName();", "public String getGroupName()\n {\n return groupName;\n }", "public void setCLMAILGROUP(java.lang.CharSequence value) {\n this.CL_MAIL_GROUP = value;\n }", "public String getSGroupName() {\n return sGroupName;\n }", "public GroupCreateBean() {\n\t\tsuper();\n\t\tthis.initializeNumbers();\t\t\n\t}", "public void setServiceGroupName(java.lang.String param){\n localServiceGroupNameTracker = true;\n \n this.localServiceGroupName=param;\n \n\n }", "public void setGroupOther(String groupOther) {\n this.groupOther = groupOther == null ? null : groupOther.trim();\n }", "String getOrganization();", "GroupRefType createGroupRefType();", "public String getGroupName() {\r\n return groupName;\r\n }", "private void createGrpClinicSelection() {\n\n\t}", "public String getOrganizationName() {\n\n \n return organizationName;\n\n }", "public String getClGrpId() {\r\n return clGrpId;\r\n }", "GroupQueryBuilder setName(String name);", "List<CmGroupRelIndustry> selectByExample(CmGroupRelIndustryExample example);", "void setProductGroup(java.lang.String productGroup);", "public Group getGroup_2_10() { return cGroup_2_10; }", "protected ValidationComponent createFieldDefaultFetchGroupComponent (\n\t\tfinal MappingFieldElement field)\n\t{\n\t\treturn new ValidationComponent ()\n\t\t{\n\t\t\tpublic void validate () throws ModelValidationException\n\t\t\t{\n\t\t\t\tif (field != null)\n\t\t\t\t{\n\t\t\t\t\tString fieldName = field.getName();\n\t\t\t\t\tPersistenceClassElement persistenceClass = \n\t\t\t\t\t\tgetPersistenceClass(getClassName());\n\t\t\t\t\tPersistenceFieldElement pElement = \n\t\t\t\t\t\t((persistenceClass != null) ? \n\t\t\t\t\t\tpersistenceClass.getField(fieldName) : null);\n\n\t\t\t\t\tif ((pElement != null) && !pElement.isKey() && \n\t\t\t\t\t\t(MappingFieldElement.GROUP_DEFAULT == \n\t\t\t\t\t\tfield.getFetchGroup()))\n\t\t\t\t\t{\n\t\t\t\t\t\tMappingClassElement mappingClass = \n\t\t\t\t\t\t\tfield.getDeclaringClass();\n\t\t\t\t\t\tboolean isVersionField = \n\t\t\t\t\t\t\t((MappingClassElement.VERSION_CONSISTENCY == \n\t\t\t\t\t\t\t\tmappingClass.getConsistencyLevel()) &&\n\t\t\t\t\t\t\t\tfield.isVersion());\n\t\t\t\t\t\tIterator iterator = mappingClass.getFields().iterator();\n\t\t\t\t\t\tString exceptionKey = (!isVersionField ?\n\t\t\t\t\t\t\t\"util.validation.field_fetch_group_invalid\"://NOI18N\n\t\t\t\t\t\t\t\"util.validation.version_field_column_invalid\");//NOI18N\n\n\t\t\t\t\t\t/* rules: \n\t\t\t\t\t\t *\tprimitive, primitive -> error if exact match of \n\t\t\t\t\t\t *\t\tcolumns\n\t\t\t\t\t\t *\tprimitive, relationship OR\n\t\t\t\t\t\t *\trelationship, primitive -> error if non-collection\n\t\t\t\t\t\t *\t\trelationship and none of the relationship's \n\t\t\t\t\t\t *\t\tcolumns are PK columns and any are present in \n\t\t\t\t\t\t *\t\tthe primitive's list\n\t\t\t\t\t\t *\trelationship, relationship -> error if exact \n\t\t\t\t\t\t *\t\tmatch of mapping (local, join, associated), \n\t\t\t\t\t\t *\t\tbut order is not important\n\t\t\t\t\t\t */\n\t\t\t\t\t\twhile (iterator.hasNext())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMappingFieldElement testField =\n\t\t\t\t\t\t\t\t(MappingFieldElement)iterator.next();\n\n\t\t\t\t\t\t\tif (isManaged(field, testField) || \n\t\t\t\t\t\t\t\tisManaged(testField, field))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthrow constructFieldException(\n\t\t\t\t\t\t\t\t\tfieldName, exceptionKey);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (!testField.equals(field) && isExactMatch(\n\t\t\t\t\t\t\t\tfield, testField))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthrow constructFieldException(\n\t\t\t\t\t\t\t\t\tfieldName, exceptionKey);\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\tprivate boolean isManaged (MappingFieldElement primField, \n\t\t\t\tMappingFieldElement relField)\t\t\t\t\n\t\t\t{\n\t\t\t\tString className = getClassName();\n\n\t\t\t\tif (!isRelationship(primField) && isRelationship(relField) && \n\t\t\t\t\t!isCollection(className, relField.getName()))\n\t\t\t\t{\n\t\t\t\t\tArrayList columns = primField.getColumns();\n\t\t\t\t\tIterator iterator = relField.getColumns().iterator();\n\t\t\t\t\tString databaseRoot = getSchemaForClass(className);\n\n\t\t\t\t\twhile (iterator.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!testColumn(getLocalColumn((String)iterator.next(), \n\t\t\t\t\t\t\tdatabaseRoot), columns))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tprivate boolean testColumn (ColumnElement column, \n\t\t\t\tArrayList masterList)\n\t\t\t{\n\t\t\t\tif ((column != null) && !isPrimaryKeyColumn(column))\n\t\t\t\t{\n\t\t\t\t\treturn !masterList.contains(NameUtil.\n\t\t\t\t\t\tgetRelativeMemberName(column.getName().getFullName()));\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tprivate ColumnElement getLocalColumn (String pairName, \n\t\t\t\tString databaseRoot)\n\t\t\t{\n\t\t\t\tColumnPairElement pair = getPair(pairName, databaseRoot);\n\n\t\t\t\treturn ((pair != null) ? pair.getLocalColumn() : null);\n\t\t\t}\n\t\t\tprivate boolean isPrimaryKeyColumn (ColumnElement column)\n\t\t\t{\n\t\t\t\tif (column != null)\n\t\t\t\t{\n\t\t\t\t\tKeyElement key = column.getDeclaringTable().getPrimaryKey();\n\n\t\t\t\t\treturn ((key != null) && \n\t\t\t\t\t\t(key.getColumn(column.getName()) != null));\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tprivate boolean isExactMatch (ArrayList columns1, \n\t\t\t\tArrayList columns2)\n\t\t\t{\n\t\t\t\tint count = columns1.size();\n\n\t\t\t\tif ((count > 0) && (count == columns2.size()))\n\t\t\t\t\treturn getDifference(columns1, columns2).isEmpty();\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tprivate boolean isExactMatch (MappingFieldElement field1, \n\t\t\t\tMappingFieldElement field2)\n\t\t\t{\n\t\t\t\tboolean field1IsRel = isRelationship(field1);\n\t\t\t\tboolean match = false;\n\n\t\t\t\t// both primitives, or both relationships\n\t\t\t\tif (field1IsRel == isRelationship(field2))\n\t\t\t\t{\n\t\t\t\t\tmatch = isExactMatch(field1.getColumns(), \n\t\t\t\t\t\tfield2.getColumns());\n\n\t\t\t\t\tif (match && field1IsRel)\n\t\t\t\t\t{\n\t\t\t\t\t\tMappingRelationshipElement rel1 =\n\t\t\t\t\t\t\t(MappingRelationshipElement)field1;\n\t\t\t\t\t\tMappingRelationshipElement rel2 =\n\t\t\t\t\t\t\t(MappingRelationshipElement)field2;\n\t\t\t\t\t\tboolean field1IsJoin = isJoin(rel1);\n\n\t\t\t\t\t\t// both join relationships or both direct\n\t\t\t\t\t\tif (field1IsJoin == isJoin(rel2))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (field1IsJoin)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tmatch = isExactMatch(\n\t\t\t\t\t\t\t\t\trel1.getAssociatedColumns(), \n\t\t\t\t\t\t\t\t\trel2.getAssociatedColumns());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmatch = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn match;\n\t\t\t}\n\t\t};\n\t}", "String organizationId();", "public org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder setCLMAILGROUP(java.lang.CharSequence value) {\n validate(fields()[6], value);\n this.CL_MAIL_GROUP = value;\n fieldSetFlags()[6] = true;\n return this;\n }", "public String getGroupName() {\n return groupName;\n }", "public String getGroupName() {\n return groupName;\n }", "@Deprecated\npublic interface SecGroupExtension extends ModelEntity {\n\n /**\n * Gets the identifier for the Security Group\n *\n * @return the identifier\n */\n String getId();\n\n /**\n * Gets the name of the Security Group\n *\n * @return the name of the Group\n */\n String getName();\n\n /**\n * Gets the description.\n *\n * @return the description of the Security Group\n */\n String getDescription();\n\n /**\n * Gets the tenant id associated with the group\n *\n * @return the tenant identifier\n */\n String getTenantId();\n\n /**\n * Gets the rules that make up this security group\n *\n * @return the list of rules\n */\n List<? extends Rule> getRules();\n\n /**\n * Gets the reference / external links\n *\n * @return external/reference list of links\n */\n List<? extends Link> getLinks();\n\n /**\n * Security Group Rule\n */\n @Deprecated\n public interface Rule extends ModelEntity, Buildable<SecurityGroupRuleBuilder> {\n\n /**\n * @return the IPProtocol for this rule\n */\n IPProtocol getIPProtocol();\n\n /**\n * @return the referenced security group which contains the name and tenant identifier\n */\n Group getGroup();\n\n /**\n * @return the IP Range\n */\n IpRange getRange();\n\n /**\n * @return the port at the start of the range\n */\n int getToPort();\n\n /**\n * @return the port at the end of the range\n */\n int getFromPort();\n\n /**\n * Gets the parent group id.\n *\n * @return the parent group id\n */\n String getParentGroupId();\n\n /**\n * @return the name of the rule\n */\n String getName();\n\n /**\n * @return the identifier for the rule\n */\n String getId();\n\n /**\n * Rule Group\n */\n @Deprecated\n public interface Group {\n\n /**\n * @return the name of the group\n */\n String getName();\n\n /**\n * Gets the tenant id.\n *\n * @return the tenant id\n */\n String getTenantId();\n }\n\n /**\n * Rule IP Range\n */\n @Deprecated\n public interface IpRange {\n\n /**\n * Gets the CIDR address range\n *\n * @return the CIDR address range\n */\n String getCidr();\n }\n }\n\n}", "@Test\n public void testInsuredPayerInsuredGroupName() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setInsuredGroupName,\n RdaFissPayer::getInsuredGroupName,\n RdaFissPayer.Fields.insuredGroupName,\n 17);\n }", "public String getGroupId(String name);", "UserGroup createGroup(String companyId, String name, String groupLead);", "public void setGroupname(java.lang.String newGroupname) {\n\tgroupname = newGroupname;\n}", "public Group getGroup_3_10() { return cGroup_3_10; }", "Object getGroupID(String groupName) throws Exception;", "default String getGroup() {\n return null;\n }", "public final boolean isGroupNameSetted() {\n\t\treturn engine.isPropertySetted(Properties.GROUP_NAME);\n\t}", "GroupsType createGroupsType();", "CsticGroupModel createInstanceOfCsticGroupModel();", "public static String specifyGroup() {\n return holder.format(\"specifyGroup\");\n }", "public Group getGroup_12() { return cGroup_12; }", "String getParentGroupId();", "void handleComplexChangeOrg(String complexId);", "public Group getGroup_11() { return cGroup_11; }", "@Schema(description = \"Specifies the grouping attribute to use when rolling several instances. Instances that share the same value for the provided attribute key are rolled together as a unit. Examples that make sense to use are '\\\\_\\\\_all\\\\_\\\\_' (roll all instances as a single unit), 'logical_zone_name' (roll instances by zone), '\\\\_\\\\_name\\\\_\\\\_' (roll one instance at a time, the default if not specified). Note that '\\\\_\\\\_all\\\\_\\\\_' is required when performing a major version upgrade\")\n public String getGroupBy() {\n return groupBy;\n }", "public String getGroupInput() {\r\n String result = null;\r\n boolean creation = this.getGroupController().getIsCreation();\r\n\r\n if (creation) {\r\n result = \"creation\";\r\n } else {\r\n // else we are in modification\r\n result = \"modification\";\r\n }\r\n\r\n return result;\r\n }", "public String getVechicleGroupNamePlaceholder() {\r\n\t\tString VechicleGroupNamePlaceholderText = safeGetAttribute(vehicleNameField.replace(\"vehicle_name\", \"group_name\"), \"placeholder\", SHORTWAIT);\r\n\t\tlog.info(\"get Vechicle Group Name placeholder \");\r\n\t\treturn VechicleGroupNamePlaceholderText;\r\n\t}", "void xsetProductGroup(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax50Car productGroup);", "sync_group_definition getSync_group_definition();", "public Group getGroup_10() { return cGroup_10; }", "private String generateLnfKey(Class<? extends Control> controlClass, PropertyDescriptor property) {\n \n \t\tString controlName = getSimpleClassName(controlClass);\n \t\tStringBuilder lnfKey = new StringBuilder(controlName);\n \t\tlnfKey.append(\".\"); //$NON-NLS-1$\n \t\tlnfKey.append(property.getName());\n \n \t\treturn lnfKey.toString();\n \n \t}", "private void createGrpContactDetails() {\n\n\t\tgrpContactDetails = new Group(grpPharmacyDetails, SWT.NONE);\n\t\tgrpContactDetails.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tgrpContactDetails.setBounds(new Rectangle(20, 40, 350, 230));\n\n\t\tlblInstructions = new Label(grpContactDetails, SWT.CENTER);\n\t\tlblInstructions.setBounds(new org.eclipse.swt.graphics.Rectangle(50,\n\t\t\t\t20, 260, 20));\n\t\tlblInstructions.setText(\"All fields marked with * are compulsory\");\n\t\tlblInstructions.setFont(ResourceUtils\n\t\t\t\t.getFont(iDartFont.VERASANS_8_ITALIC));\n\n\t\tlblPharmacyName = new Label(grpContactDetails, SWT.NONE);\n\t\tlblPharmacyName.setBounds(new org.eclipse.swt.graphics.Rectangle(18, 45, 120,\n\t\t\t\t20));\n\t\tlblPharmacyName.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblPharmacyName.setText(\"* Facility Name:\");\n\t\ttxtPharmacyName = new Text(grpContactDetails, SWT.BORDER);\n\t\ttxtPharmacyName.setBounds(new org.eclipse.swt.graphics.Rectangle(150, 45, 180,\n\t\t\t\t20));\n\t\ttxtPharmacyName.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtPharmacyName.setFocus();\n\t\ttxtPharmacyName.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\ttxtNameKeyReleased();\n\t\t\t\tfieldsChanged = true;\n\t\t\t}\n\n\t\t});\n\t\ttxtPharmacyName.setEnabled(false);\n\n\t\tlblStreetAdd = new Label(grpContactDetails, SWT.NONE);\n\t\tlblStreetAdd.setBounds(new org.eclipse.swt.graphics.Rectangle(18, 75,\n\t\t\t\t120, 20));\n\t\tlblStreetAdd.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblStreetAdd.setText(\"* Street Address:\");\n\t\ttxtStreetAdd = new Text(grpContactDetails, SWT.BORDER);\n\t\ttxtStreetAdd.setBounds(new org.eclipse.swt.graphics.Rectangle(150, 75,\n\t\t\t\t180, 20));\n\t\ttxtStreetAdd.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtStreetAdd.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\ttxtStreetKeyReleased();\n\t\t\t\tfieldsChanged = true;\n\t\t\t}\n\t\t});\n\t\ttxtStreetAdd.setEnabled(false);\n\n\t\tlblCity = new Label(grpContactDetails, SWT.NONE);\n\t\tlblCity.setBounds(new org.eclipse.swt.graphics.Rectangle(18, 105, 120,\n\t\t\t\t20));\n\t\tlblCity.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblCity.setText(\"* City:\");\n\t\ttxtCity = new Text(grpContactDetails, SWT.BORDER);\n\t\ttxtCity.setBounds(new org.eclipse.swt.graphics.Rectangle(150, 105, 180,\n\t\t\t\t20));\n\t\ttxtCity.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtCity.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\ttxtCityKeyReleased();\n\t\t\t\tfieldsChanged = true;\n\t\t\t}\n\t\t});\n\t\ttxtCity.setEnabled(false);\n\n\t\tlblTel = new Label(grpContactDetails, SWT.NONE);\n\t\tlblTel.setBounds(new org.eclipse.swt.graphics.Rectangle(18, 135, 124,\n\t\t\t\t20));\n\t\tlblTel.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblTel.setText(\"* Telephone Number:\");\n\t\ttxtTel = new Text(grpContactDetails, SWT.BORDER);\n\t\ttxtTel.setBounds(new org.eclipse.swt.graphics.Rectangle(150, 135, 180,\n\t\t\t\t20));\n\t\ttxtTel.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtTel.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\ttxtTelNoKeyReleased();\n\t\t\t\tfieldsChanged = true;\n\t\t\t}\n\t\t});\n\t\ttxtTel.setEnabled(false);\n\n\t\tlblPharmacistName1 = new Label(grpContactDetails, SWT.NONE);\n\t\tlblPharmacistName1.setBounds(new org.eclipse.swt.graphics.Rectangle(18,\n\t\t\t\t165, 120, 20));\n\t\tlblPharmacistName1.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblPharmacistName1.setText(\"* Head Pharmacist:\");\n\t\ttxtPharmacistName1 = new Text(grpContactDetails, SWT.BORDER);\n\t\ttxtPharmacistName1.setBounds(new org.eclipse.swt.graphics.Rectangle(\n\t\t\t\t150, 165, 180, 20));\n\t\ttxtPharmacistName1.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtPharmacistName1.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\ttxtPharmacistKeyReleased();\n\t\t\t\tfieldsChanged = true;\n\t\t\t}\n\t\t});\n\t\ttxtPharmacistName1.setEnabled(false);\n\n\t\tlblPharmacyAssistant = new Label(grpContactDetails, SWT.NONE);\n\t\tlblPharmacyAssistant.setBounds(new org.eclipse.swt.graphics.Rectangle(18,\n\t\t\t\t195, 120, 20));\n\t\tlblPharmacyAssistant.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblPharmacyAssistant.setText(\" Pharmacy Assistant:\");\n\t\ttxtPharmacyAssistant = new Text(grpContactDetails, SWT.BORDER);\n\t\ttxtPharmacyAssistant.setBounds(new org.eclipse.swt.graphics.Rectangle(\n\t\t\t\t150, 195, 180, 20));\n\t\ttxtPharmacyAssistant.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtPharmacyAssistant.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\ttxtPharmacistKeyReleased();\n\t\t\t\tfieldsChanged = true;\n\t\t\t}\n\t\t});\n\t\ttxtPharmacyAssistant.setEnabled(false);\n\n\t}", "public String getEntityGroupName(String entityName) {\n Map<String, String> gc = getGroupCache();\n\n if (gc != null)\n return gc.get(entityName);\n else\n return null;\n }", "@Test\n public void ownerArgumentNotAddedIfOwnerIsInCustomGroup() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.OPENID_CONNECT;\n\n // OwnerInCustomGroup class uses combined owner and group-based auth,\n // and user is in the read-restricted custom group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerInCustomGroup> originalRequest =\n createRequest(OwnerInCustomGroup.class, subscriptionType);\n GraphQLRequest<OwnerInCustomGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n }", "public void setGroupName(String groupName) {\r\n this.groupName = groupName == null ? null : groupName.trim();\r\n }", "public Group getGroup_0_10() { return cGroup_0_10; }", "UserGroup createGroup(String companyId, String name);", "public String getClGrpId() {\r\n\t\treturn clGrpId;\r\n\t}", "public Group getGroup_4_10() { return cGroup_4_10; }", "void renameServerStoredContactGroup(ContactGroup group, String newName);", "@Test\n public void testBeneZPayerInsuredGroupName() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setInsuredGroupName,\n RdaFissPayer::getInsuredGroupName,\n RdaFissPayer.Fields.insuredGroupName,\n 17);\n }", "private NameBuilderGroup(int groupNumber, String minimalWidth) {\r\n\t\t\tthis.groupNumber = groupNumber;\r\n\t\t\tthis.minimalWidth = minimalWidth;\r\n\t\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Group \" + groupName + \" (\" + shapes.size() + \") \";\n\t}", "private static void validateEntity(KindGroup entity) throws ValidationException {\n\t Validator.validateStringField(\"code\", entity.getCode(), 10, true);\n\t Validator.validateStringField(\"description\", entity.getDescription(), 75,true);\n\t Validator.validateBooleanField(\"isStandard\", entity.isStandard(), true);\n }", "public void setInValidGroup(boolean inValidGroup){this.inValidGroup = inValidGroup;}", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getFamilyName() {\n return familyName;\n }", "public void setBookGroup(java.lang.String value);", "public void setOrgCustomer(java.lang.String newOrgCustomer) {\n\torgCustomer = newOrgCustomer;\n}", "public String getGroupOther() {\n return groupOther;\n }", "public long getGroupId();", "public long getGroupId();" ]
[ "0.6088048", "0.5667458", "0.5530867", "0.5453666", "0.54249567", "0.5407774", "0.53264225", "0.5296867", "0.52420574", "0.52011573", "0.52011573", "0.5198458", "0.51761127", "0.51701415", "0.51275593", "0.51105607", "0.51061213", "0.5096142", "0.5096142", "0.5083531", "0.5067543", "0.50640696", "0.5043287", "0.50268793", "0.5015635", "0.5013295", "0.5003893", "0.4991373", "0.49872452", "0.49738792", "0.49694347", "0.49650392", "0.49588725", "0.49588725", "0.49558347", "0.4951369", "0.49492848", "0.49440992", "0.49354944", "0.49340376", "0.4929919", "0.49243653", "0.49056655", "0.49041635", "0.49020863", "0.4893107", "0.48778808", "0.48684844", "0.4867993", "0.48558232", "0.48557174", "0.48452055", "0.48193398", "0.48094016", "0.48087236", "0.48046717", "0.48046717", "0.48044685", "0.47991186", "0.4792362", "0.47922316", "0.47859436", "0.47832906", "0.47762373", "0.47745746", "0.4748025", "0.4746791", "0.47444177", "0.47433054", "0.4740371", "0.47392824", "0.47361922", "0.47311234", "0.47290763", "0.47277823", "0.4726187", "0.47230703", "0.47172424", "0.4711184", "0.4708447", "0.4703225", "0.46826774", "0.46822172", "0.46797764", "0.46724954", "0.4670827", "0.46621698", "0.46568552", "0.46463558", "0.46366856", "0.4635559", "0.46352795", "0.46313682", "0.46291354", "0.4626618", "0.46240425", "0.4623247", "0.46206963", "0.46169102", "0.46169102" ]
0.5223474
9
Constraints: Not nullable, Maximum length: 10 Original property name from the Odata EDM: FiscalAddress
public void setFiscalAddress( @Nullable final String fiscalAddress) { rememberChangedField("FiscalAddress", this.fiscalAddress); this.fiscalAddress = fiscalAddress; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String getAddressPropertyName();", "@ApiModelProperty(required = true, value = \"The aliased address in hexadecimal.\")\n public String getAddress() {\n return address;\n }", "public String getOrganizationAddress() {\n\n \n return organizationAddress;\n\n }", "public String getFormattedAddress() {\n return formattedAddress;\n }", "@ApiModelProperty(value = \"Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail.\")\n\n@Size(min=1,max=16) \n public String getPostalCode() {\n return postalCode;\n }", "@Override\n public java.lang.Object getProperty(int propertyIndex) {\n if(propertyIndex==0)\n {\n return this.FormOfAddressCode!=null?this.FormOfAddressCode.getSimpleValue():null;\n }\n if(propertyIndex==1)\n {\n return this.FormOfAddressName!=null?this.FormOfAddressName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==2)\n {\n return this.GivenName!=null?this.GivenName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==3)\n {\n return this.MiddleName!=null?this.MiddleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==4)\n {\n return this.FamilyName!=null?this.FamilyName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==5)\n {\n return this.AdditionalFamilyName!=null?this.AdditionalFamilyName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==6)\n {\n return this.BirthName!=null?this.BirthName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==7)\n {\n return this.NickName!=null?this.NickName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==8)\n {\n return this.InitialsName!=null?this.InitialsName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==9)\n {\n return this.AcademicTitleCode!=null?this.AcademicTitleCode.getSimpleValue():null;\n }\n if(propertyIndex==10)\n {\n return this.AcademicTitleName!=null?this.AcademicTitleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==11)\n {\n return this.AdditionalAcademicTitleCode!=null?this.AdditionalAcademicTitleCode.getSimpleValue():null;\n }\n if(propertyIndex==12)\n {\n return this.AdditionalAcademicTitleName!=null?this.AdditionalAcademicTitleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==13)\n {\n return this.NamePrefixCode!=null?this.NamePrefixCode.getSimpleValue():null;\n }\n if(propertyIndex==14)\n {\n return this.NamePrefixName!=null?this.NamePrefixName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==15)\n {\n return this.AdditionalNamePrefixCode!=null?this.AdditionalNamePrefixCode.getSimpleValue():null;\n }\n if(propertyIndex==16)\n {\n return this.AdditionalNamePrefixName!=null?this.AdditionalNamePrefixName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==17)\n {\n return this.NameSupplementCode!=null?this.NameSupplementCode.getSimpleValue():null;\n }\n if(propertyIndex==18)\n {\n return this.NameSupplementName!=null?this.NameSupplementName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==19)\n {\n return this.DeviatingFullName!=null?this.DeviatingFullName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==20)\n {\n return this.NameFormatCountryCode!=null?this.NameFormatCountryCode:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==21)\n {\n return this.NameFormatCode!=null?this.NameFormatCode.getSimpleValue():null;\n }\n return null;\n }", "java.lang.String getField1231();", "@Override\n public String toString() {\n return \"\\n TelephoneFax {\"\n + (fax != null ? \" fax [\" + fax + \"]\" : \"\")\n + (maxCls != null ? \" maxCls [\" + maxCls + \"]\" : \"\")\n + (number != null ? \" number [\" + number + \"]\" : \"\")\n + (preferred != null ? \" preferred [\" + preferred + \"]\" : \"\")\n + (type != null ? \" type [\" + type + \"]\" : \"\")\n + \"}\";\n }", "public String getContactAddress() {\n\n \n return contactAddress;\n\n }", "java.lang.String getField1123();", "public String getFormattedAddress() {\n return formattedAddress;\n }", "public String getFaxNo() {\n return faxNo;\n }", "java.lang.String getField1035();", "public static Buyer.Address aPaylineAddress() {\n return Buyer.Address.AddressBuilder.anAddress()\n .withCity(\"Aix-en-Provence\")\n .withCountry(\"FR\")\n .withEmail(\"john.doe@mythalesgroup.io\")\n .withFullName(new Buyer.FullName(\"Thales\", \"Services\", \"M.\"))\n .withStreet1(\"150 rue dont le nom est le plus long que j'ai jamais vu. Y'a pas idée d'habiter un endroit pareil !\")\n .withStreet2(\"Le grand bâtiment orange, avec les fenêtres un peu hautes mais un peu larges aussi, et un toit bleu\")\n .withZipCode(\"13100\")\n .build();\n }", "public String getAddress() {\n return definition.getString(ADDRESS);\n }", "java.lang.String getField1221();", "public String getAddress()\r\n\t{\r\n\t\treturn address.getModelObjectAsString();\r\n\t}", "java.lang.String getField1710();", "public PortugueseAddressContactDTO() {\r\n\t\tsuper();\r\n\t}", "public String getAddress() {return address;}", "public String getAddress()\r\n {\r\n return address.getFullAddress();\r\n }", "public String getAddress()\r\n {\r\n return address.getFullAddress();\r\n }", "public interface Address {\n public static final String ADDRESS = \"ADDR\";\n public static final String CONTINUATION = \"CONT\";\n public static final String ADDRESS_LINE1 = \"ADR1\";\n public static final String ADDRESS_LINE2 = \"ADR2\";\n public static final String CITY = \"CITY\";\n public static final String STATE = \"STAE\";\n public static final String POSTAL_CODE = \"POST\";\n public static final String COUNTRY = \"CTRY\";\n public static final String PHONE = \"PHON\";\n\n public List getAddressLines(); // List of String\n\n public void setAddressLines(List addressLines);\n\n public String getAddressLine1();\n\n public void setAddressLine1(String line1);\n\n public String getAddressLine2();\n\n public void setAddressLine2(String line2);\n\n public String getCity();\n\n public void setCity(String city);\n\n public String getState();\n\n public void setState(String state);\n\n public String getPostalCode();\n\n public void setPostalCode(String postalCode);\n\n public String getCountry();\n\n public void setCountry(String country);\n\n public String getPhoneNumber();\n\n public void setPhoneNumber(String phoneNumber);\n\n public List getPhoneNumbers(); // List of String\n\n public void setPhoneNumbers(List phoneNumbers);\n}", "public CustomerAddressQuery fax() {\n startField(\"fax\");\n\n return this;\n }", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getFamilyName() {\n return familyName;\n }", "java.lang.String getField1004();", "java.lang.String getField1202();", "public void setFaxNo(String faxNo) {\n this.faxNo = faxNo;\n }", "java.lang.String getField1207();", "java.lang.String getField1230();", "@Override\n public void setRfc(java.lang.String rfc) {\n _entityCustomer.setRfc(rfc);\n }", "java.lang.String getField1843();", "public Address getDefaultBillingAddress();", "public interface Address {\n\n String getAddressLine1();\n\n String getAddressLine2();\n\n String getAddressLine3();\n\n String getAddressLine4();\n\n String getAddressLine5();\n\n String getPostCode();\n\n}", "public String address() {\n return Codegen.stringProp(\"address\").config(config).require();\n }", "public void testAddAddress4() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getCountry().setId(-1);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\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 Address getAddress() { return address; }", "java.lang.String getField1301();", "public String getAddress(){\n return address;\n\n }", "public void setBillingAddressInCart(Address addr);", "String getAddress() {\n\t\treturn customer.getAddress();\n\t}", "public String getAddress(){\r\n return address;\r\n }", "java.lang.String getField1240();", "public DefaultCustAddress() {\n\t\tsetAddress1(\"\");\n\t\tsetAddress2(\"\");\n\t\tsetAddress3(\"\");\n\t\tsetCity(\"\");\n\t\tsetState(\"\");\n\t\tsetZip(\"\");\n\t\tsetCountryCode(PROVISION.SERVICE.COUNTRY.shortValue());\n\t\tsetFranchiseTaxCode(PROVISION.SERVICE.SERVICE_FRANCHISE_TAX.shortValue());\n\t\tsetCounty(\"\");\n\n\t\t// setAddress1(\"355 S Grand Ave\");\n\t\t// setAddress2(\"\");\n\t\t// setAddress3(\"\");\n\t\t// setCity(\"Los Angeles\");\n\t\t// setCountryCode(BILLING.customerCountryCode.shortValue());\n\t\t// setCounty(\"Los Angeles\");\n\t\t// setFranchiseTaxCode(BILLING.customerFranchiseTaxCode.shortValue());\n\t\t// setState(\"CA\");\n\t\t// setZip(\"90071\");\n\t}", "public String getFax() {\n return fax;\n }", "public void setAddress(String address) { this.address = address; }", "java.lang.String getField1007();", "java.lang.String getField1200();", "java.lang.String getField1021();", "java.lang.String getField1833();", "java.lang.String getField1252();", "java.lang.String getField1412();", "java.lang.String getField1272();", "public String changeContactDetails(final EmployeeAddressDTO employeeAddressDTO) throws ApplicationCustomException;", "java.lang.String getField1206();", "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 }", "java.lang.String getField1830();", "java.lang.String getField1208();", "java.lang.String getField1402();", "@Override\n public java.lang.String getRfc() {\n return _entityCustomer.getRfc();\n }", "public String getCustAddress() \r\n\t{\r\n\t\t\r\n\t\treturn custAddress;\r\n\t\t\r\n\t}", "java.lang.String getField1237();", "java.lang.String getField1431();", "java.lang.String getField1032();", "java.lang.String getField1033();", "java.lang.String getField1430();", "public String getAddress(){\n return address;\n }", "public String getAddress(){\n return address;\n }", "public String getAddress(){\n return address;\n }", "java.lang.String getField1216();", "java.lang.String getField1406();", "public void editAttractionAddress(String address){\r\n this.address = address;\r\n }", "java.lang.String getField1270();", "java.lang.String getField1507();", "public String getAddress()\n{\n return this.address;\n}", "public interface AddressLabelDetails {\n String getFirstName();\n\n String getLastName();\n\n String getAddressline();\n\n String getAddressline2();\n\n String getAddressline3();\n\n String getPostalCode();\n\n String getCity();\n\n String getRegion();\n\n String getCountry();\n\n String getCountryCode();\n}", "java.lang.String getField1812();", "java.lang.String getField1003();", "java.lang.String getField1919();", "java.lang.String getField1220();", "java.lang.String getField1414();", "java.lang.String getField1164();", "java.lang.String getField1258();", "public void testUpdateAddress4() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getCountry().setId(-1);\r\n this.dao.updateAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public abstract String getAddressLine1();", "java.lang.String getField1041();", "java.lang.String getField1218();", "kr.pik.message.Profile.ProfileMessage.ContactAddress getContactAddress(int index);", "void fiscalCodeValidity(M person) {\n // Valid data\n assignValidData(person);\n assertDoesNotThrow(person::checkDataValidity);\n\n // Invalid data\n person.setFiscalCode(null);\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n person.setFiscalCode(\"A\");\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n }", "java.lang.String getHotelAddress();", "java.lang.String getField1401();", "java.lang.String getField1831();", "java.lang.String getField1700();", "java.lang.String getField1407();", "java.lang.String getField1236();", "java.lang.String getField1030();", "public String getBENEF_ADDRESS_3() {\r\n return BENEF_ADDRESS_3;\r\n }", "java.lang.String getField1232();", "java.lang.String getField1899();" ]
[ "0.64734787", "0.5647961", "0.54136527", "0.5407362", "0.5394943", "0.53782827", "0.5375742", "0.53666997", "0.5293854", "0.5253822", "0.5246647", "0.5235527", "0.5222349", "0.52178794", "0.5214703", "0.51998585", "0.51981366", "0.51870495", "0.51840836", "0.51726973", "0.5141096", "0.5141096", "0.51306045", "0.511505", "0.51079005", "0.51056594", "0.510279", "0.51024616", "0.5102093", "0.50972724", "0.50831264", "0.50746095", "0.5070595", "0.5064553", "0.50631917", "0.5061824", "0.50545585", "0.5046706", "0.5046561", "0.5045326", "0.50382876", "0.503697", "0.5036031", "0.5035613", "0.5027277", "0.5023543", "0.5015168", "0.5014909", "0.50134826", "0.50123584", "0.5008142", "0.5006492", "0.50059", "0.5003163", "0.500218", "0.499649", "0.4993726", "0.4989504", "0.49894568", "0.49887186", "0.4988687", "0.49871328", "0.49858356", "0.49853092", "0.49820256", "0.49813786", "0.49795046", "0.49786383", "0.49786383", "0.49786383", "0.4977132", "0.49722317", "0.49703357", "0.49692848", "0.49677297", "0.4966291", "0.49624217", "0.4962311", "0.49584356", "0.4955899", "0.494619", "0.4946137", "0.49441198", "0.49403912", "0.4940306", "0.49393132", "0.49333605", "0.49318877", "0.49311346", "0.4929405", "0.492752", "0.49269512", "0.49256837", "0.49255955", "0.4925387", "0.492514", "0.49237597", "0.49234703", "0.49180245", "0.49165377" ]
0.58423424
1
Constraints: Not nullable, Maximum length: 4 Original property name from the Odata EDM: Industry
public void setIndustry( @Nullable final String industry) { rememberChangedField("Industry", this.industry); this.industry = industry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIndustry(String industry) {\n this.industry = industry;\n }", "public void setIndustry(String industry) {\n\t\tthis.industry = industry;\n\t}", "public String getIndustry() {\n return industry;\n }", "public String getIndustryName() {\r\n return industryName;\r\n }", "public String getIndustryType() {\r\n return industryType;\r\n }", "public String getIndustryCode() {\r\n return industryCode;\r\n }", "public void setIndustryName(String industryName) {\r\n this.industryName = industryName == null ? null : industryName.trim();\r\n }", "public String getIndustry() {\n\t\treturn industry;\n\t}", "public void setSupEntIndustry(String supEntIndustry) {\n this.supEntIndustry = supEntIndustry == null ? null : supEntIndustry.trim();\n }", "public void setIndustryCode(String industryCode) {\r\n this.industryCode = industryCode == null ? null : industryCode.trim();\r\n }", "public String getSupEntIndustry() {\n return supEntIndustry;\n }", "public void setIndustryCode(String industryCode) {\r\n\t\tthis.industryCode = industryCode;\r\n\t}", "public void setUWCompany(entity.UWCompany value);", "public void setIndustryType(String industryType) {\r\n this.industryType = industryType == null ? null : industryType.trim();\r\n }", "public String getIndustryCode() {\r\n\t\treturn industryCode;\r\n\t}", "@Override\n\tpublic List<DataDictionaryValueEntity> queryIndustrySourceCategory4Dict() {\n\t\treturn null;\n\t}", "CmIndustryConfig selectByPrimaryKey(String industryId);", "public void setOccupation(String occupation);", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "@ProviderType\npublic interface StringConstraint extends BaseConstraint, FormatConstraint {\n\n /**\n * Returns the minimum length of the data. The constraint is applicable only for field with type string\n *\n * @return minimum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMinLength();\n\n /**\n * Returns the maximum length of the data. The constraint is applicable only for field with type string\n *\n * @return maximum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMaxLength();\n\n /**\n * As specified in the JSON Schema specification, the regex against which the value of the field should be tested with.\n *\n * Returns the regex. The constraint is applicable only for field with type string\n *\n * @return string represented as pattern\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n default String getPattern() {\n return null;\n }\n}", "public String getLongType() { return \"Technology\"; }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.UWCompany getUWCompany();", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "@Size(max=4)\n\t@Override\n\tpublic Integer getEmpno() {\n\t\treturn super.getEmpno();\n\t}", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "public String getSupEntCorporate() {\n return supEntCorporate;\n }", "public void setProductOwner(String productOwner);", "public interface HighlightsColumns {\n\n @DataType(TEXT) @NotNull String VIDEO_TITLE = \"title\";\n @DataType(TEXT) @NotNull String VIDEO_ID = \"id\";\n @DataType(TEXT) @NotNull String THUMBNAIL_URL = \"url\";\n\n}", "public abstract @NotNull String getEquipmentType();", "void xsetProductCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productCode);", "public void test_hk_03() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n OntProperty property = ontModel.createObjectProperty(\"http://www.aldi.de#property\");\n /* MinCardinalityRestriction testClass = */\n ontModel.createMinCardinalityRestriction(null, property, 42);\n \n }", "@Override\r\n public Class<UserSoftware> getEntityType() {\n return null;\r\n }", "public void setName(String value)\n {\n // Since this value is marked as \"mandatory,\" the BC4J Framework will take\n // care of ensuring that it's a non-null value. However, if it is null, we\n // don't want to proceed with any validation that could result in a NPE.\n \n if ((value != null) || (!(\"\".equals(value.trim()))))\n {\n // Verify that the name is unique. To do this, we must check both the entity\n // cache and the database. We begin with the entity cache.\n\n com.sun.java.util.collections.Iterator supplierIterator = \n getEntityDef().getAllEntityInstancesIterator(getDBTransaction());\n \n Number currentId = getSupplierId();\n \n while ( supplierIterator.hasNext() )\n {\n SupplierEOImpl cachedSupplier = (SupplierEOImpl)supplierIterator.next();\n\n String cachedName = cachedSupplier.getName();\n Number cachedId = cachedSupplier.getSupplierId();\n\n // We found a match for the name we're trying to set, so throw an\n // exception. Note that we need to exclude this EO from our test.\n \n if (cachedName != null && value.equalsIgnoreCase(cachedName) && \n cachedId.compareTo(currentId) != 0 )\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name \n }\n } \n\n // Now we want to check the database for any occurences of the supplier\n // name. The most efficient way to check this is with a validation view\n // object to which we add to a special \"Validation\" application module.\n // We then added a \"supplierExists\" method to this entity's expert. This\n // method leverages the VAM and the VVO.\n\n OADBTransaction transaction = getOADBTransaction();\n SupplierEntityExpert expert = getSupplierEntityExpert(transaction);\n\n if (expert.supplierExists(value))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name\n }\n }\n \n setAttributeInternal(NAME, value);\n \n }", "public void setSupEntCorporate(String supEntCorporate) {\n this.supEntCorporate = supEntCorporate == null ? null : supEntCorporate.trim();\n }", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getFamilyName() {\n return familyName;\n }", "public interface AllergyModelProperties extends PropertyAccess<AllergyModel> {\n ModelKeyProvider<AllergyModel> id();\n}", "public void setUWIssueType(entity.UWIssueType value);", "public Integer getIsindustry() {\n return isindustry;\n }", "public void setOrganization(String organization);", "protected static void initPropertyKey() {\n String path = URL_PREFIX + SCHEMA_PKS;\n\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"name\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"age\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"city\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"lang\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"date\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"price\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"weight\\\",\\n\"\n + \"\\\"data_type\\\": \\\"DOUBLE\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n }", "public void setProduct(entity.APDProduct value);", "public void setIndustryCode4(\n @Nullable\n final String industryCode4) {\n rememberChangedField(\"IndustryCode4\", this.industryCode4);\n this.industryCode4 = industryCode4;\n }", "public interface ResourceSku {\n /**\n * Gets the resourceType property: The type of resource the SKU applies to.\n *\n * @return the resourceType value.\n */\n String resourceType();\n\n /**\n * Gets the name property: The name of SKU.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the tier property: Specifies the tier of DMS in a scale set.\n *\n * @return the tier value.\n */\n String tier();\n\n /**\n * Gets the size property: The Size of the SKU.\n *\n * @return the size value.\n */\n String size();\n\n /**\n * Gets the family property: The Family of this particular SKU.\n *\n * @return the family value.\n */\n String family();\n\n /**\n * Gets the kind property: The Kind of resources that are supported in this SKU.\n *\n * @return the kind value.\n */\n String kind();\n\n /**\n * Gets the capacity property: Not used.\n *\n * @return the capacity value.\n */\n ResourceSkuCapacity capacity();\n\n /**\n * Gets the locations property: The set of locations that the SKU is available.\n *\n * @return the locations value.\n */\n List<String> locations();\n\n /**\n * Gets the apiVersions property: The api versions that support this SKU.\n *\n * @return the apiVersions value.\n */\n List<String> apiVersions();\n\n /**\n * Gets the costs property: Metadata for retrieving price info.\n *\n * @return the costs value.\n */\n List<ResourceSkuCosts> costs();\n\n /**\n * Gets the capabilities property: A name value pair to describe the capability.\n *\n * @return the capabilities value.\n */\n List<ResourceSkuCapabilities> capabilities();\n\n /**\n * Gets the restrictions property: The restrictions because of which SKU cannot be used. This is empty if there are\n * no restrictions.\n *\n * @return the restrictions value.\n */\n List<ResourceSkuRestrictions> restrictions();\n\n /**\n * Gets the inner com.azure.resourcemanager.datamigration.fluent.models.ResourceSkuInner object.\n *\n * @return the inner object.\n */\n ResourceSkuInner innerModel();\n}", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax50Car xgetProductGroup();", "public void setDocumentNo (String DocumentNo)\n{\nif (DocumentNo == null) throw new IllegalArgumentException (\"DocumentNo is mandatory\");\nif (DocumentNo.length() > 30)\n{\nlog.warning(\"Length > 30 - truncated\");\nDocumentNo = DocumentNo.substring(0,30);\n}\nset_Value (\"DocumentNo\", DocumentNo);\n}", "public void setM_Production_ID (int M_Production_ID);", "List<CmIndustryConfig> selectByExample(CmIndustryConfigExample example);", "Builder addEducationalUse(Text value);", "public interface AEntityProperty {\n}", "@ProviderType\npublic interface EmployeeModel extends BaseModel<Employee> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a employee model instance should use the {@link Employee} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this employee.\n\t *\n\t * @return the primary key of this employee\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this employee.\n\t *\n\t * @param primaryKey the primary key of this employee\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the uuid of this employee.\n\t *\n\t * @return the uuid of this employee\n\t */\n\t@AutoEscape\n\tpublic String getUuid();\n\n\t/**\n\t * Sets the uuid of this employee.\n\t *\n\t * @param uuid the uuid of this employee\n\t */\n\tpublic void setUuid(String uuid);\n\n\t/**\n\t * Returns the employee ID of this employee.\n\t *\n\t * @return the employee ID of this employee\n\t */\n\tpublic long getEmployeeId();\n\n\t/**\n\t * Sets the employee ID of this employee.\n\t *\n\t * @param employeeId the employee ID of this employee\n\t */\n\tpublic void setEmployeeId(long employeeId);\n\n\t/**\n\t * Returns the first name of this employee.\n\t *\n\t * @return the first name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getFirstName();\n\n\t/**\n\t * Sets the first name of this employee.\n\t *\n\t * @param firstName the first name of this employee\n\t */\n\tpublic void setFirstName(String firstName);\n\n\t/**\n\t * Returns the last name of this employee.\n\t *\n\t * @return the last name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getLastName();\n\n\t/**\n\t * Sets the last name of this employee.\n\t *\n\t * @param lastName the last name of this employee\n\t */\n\tpublic void setLastName(String lastName);\n\n\t/**\n\t * Returns the middle name of this employee.\n\t *\n\t * @return the middle name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getMiddleName();\n\n\t/**\n\t * Sets the middle name of this employee.\n\t *\n\t * @param middleName the middle name of this employee\n\t */\n\tpublic void setMiddleName(String middleName);\n\n\t/**\n\t * Returns the birth date of this employee.\n\t *\n\t * @return the birth date of this employee\n\t */\n\tpublic Date getBirthDate();\n\n\t/**\n\t * Sets the birth date of this employee.\n\t *\n\t * @param birthDate the birth date of this employee\n\t */\n\tpublic void setBirthDate(Date birthDate);\n\n\t/**\n\t * Returns the post ID of this employee.\n\t *\n\t * @return the post ID of this employee\n\t */\n\tpublic long getPostId();\n\n\t/**\n\t * Sets the post ID of this employee.\n\t *\n\t * @param postId the post ID of this employee\n\t */\n\tpublic void setPostId(long postId);\n\n\t/**\n\t * Returns the sex of this employee.\n\t *\n\t * @return the sex of this employee\n\t */\n\tpublic Boolean getSex();\n\n\t/**\n\t * Sets the sex of this employee.\n\t *\n\t * @param sex the sex of this employee\n\t */\n\tpublic void setSex(Boolean sex);\n\n}", "@Override\r\n\tpublic void validateIntegrityConstraint() {\n\t\tvalidatorEngine.validate(entity);\r\n\t}", "@Override\n public String getEntityName() {\n return \"LicenseRoleGroup\";\n }", "@Repository\npublic interface MedicalAidRepository extends JpaRepository<MedicalAid, String> {\n\n}", "@Required\n @ValidStrings({\n \"STANDARD_SMALL\",\n \"STANDARD_MEDIUM\",\n \"STANDARD_LARGE\",\n \"WAF_MEDIUM\",\n \"WAF_LARGE\",\n \"STANDARD_V2\",\n \"WAF_V2\" })\n @Updatable\n public String getSkuSize() {\n return skuSize != null ? skuSize.toUpperCase() : null;\n }", "public interface PoliticalPartyTableSchema {\n\n\tString POLITICAL_PARTY_TABLE = \"political_parties\";\n\t\n\tString POLITICAL_PARTY_ID_COL = \"political_party_id\";\n\tString POLITICAL_PARTY_NAME_COL = \"political_party_name\";\n}", "public void setIndustryCode3(\n @Nullable\n final String industryCode3) {\n rememberChangedField(\"IndustryCode3\", this.industryCode3);\n this.industryCode3 = industryCode3;\n }", "@ApiModelProperty(value = \"Software Statement client name\")\n\n@Size(max=40) \n public String getClientName() {\n return clientName;\n }", "Builder addProperty(String name, SchemaOrgType value);", "@NotNull\n @Valid\n @JsonProperty(\"product\")\n public ProductReference getProduct();", "private static void validateEntity(AdminOffice entity) throws ValidationException {\n\t\t//Validator.validateStringField(\"officeName\", entity.getOfficeName(), 55, true);\n\t\t//Validator.validateStringField(\"phone\", entity.getPhone(), 12, false);\t\t\n\t}", "@UML(identifier=\"issueIdentification\", obligation=OPTIONAL, specification=ISO_19115)\n String getIssueIdentification();", "public interface CustomerInfo extends EObject {\n\t/**\n\t * Returns the name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerLastName(String bookingRef);\n\n\t/**\n\t * Returns the age of the customer associated to the booking reference. \n\t * Returns -1 if the booking reference does not exist.\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getCustomerAge(String bookingRef);\n\n\t/**\n\t * Returns the email of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */ \n\tString getCustomerEmail(String bookingRef);\n\n\t/**\n\t * Returns the ccnr of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcNr(String bookingRef);\n\n\t/**\n\t * Returns the ccv of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcV(String bookingRef);\n\n\t/**\n\t * Returns the expiry month of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpMonth(String bookingRef);\n\n\t/**\n\t * Returns the expiry year of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpYear(String bookingRef);\n\n\t/**\n\t * Returns the first name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardFirstName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardLastName(String bookingRef);\n\n}", "@Override\n\tpublic String associatedEntityName(String field) {\n\t\treturn null;\n\t}", "public boolean isSubjectField(CharField cf) {\n return cf.getName().equals(\"AnnotatedEntity\");\n }", "@NotNull\n @Valid\n @JsonProperty(\"productType\")\n public ProductTypeReference getProductType();", "@Test\n\tpublic void testSuppCompany() {\n\n\t\tSuppCompany suppCompany =new SuppCompany();\n\t\tsuppCompany.setName(\"www\");\n\t\tsuppCompanyService.update(suppCompany,new EntityWrapper<SuppCompany>().eq(false,\"name\",\"yyy\"));\n\t}", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getGivenName() {\n return givenName;\n }", "String getOrganization();", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"One of the following values will be provided: Payment Settlement Entity (PSE), Electronic Payment Facilitator (EPF), Other Third Party\")\n\n public String getType() {\n return type;\n }", "@Override\n\tpublic String getEntityModelName() {\n\t\treturn null;\n\t}", "public void setIndustryCode1(\n @Nullable\n final String industryCode1) {\n rememberChangedField(\"IndustryCode1\", this.industryCode1);\n this.industryCode1 = industryCode1;\n }", "void xsetProductNumberCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productNumberCode);", "private void validatePersistenceFieldAttributes (String className, \n\t\t\t\tString fieldName) throws ModelValidationException\n\t\t\t{\n\t\t\t\tClass fieldType = JavaTypeHelper.getPrimitiveClass(\n\t\t\t\t\tgetModel().getFieldType(className, fieldName));\n\t\t\t\tString keyName = null;\n\n\t\t\t\t// must not be a key field\n\t\t\t\tif (getPersistenceClass(className).getField(fieldName).isKey())\n\t\t\t\t\tkeyName = \"util.validation.version_field_key_field_not_allowed\";//NOI18N\n\t\t\t\telse if (Long.TYPE != fieldType)\t// must be type long\n\t\t\t\t\tkeyName = \"util.validation.version_field_type_not_allowed\";//NOI18N\n\n\t\t\t\tif (keyName != null)\n\t\t\t\t\tthrow constructFieldException(fieldName, keyName);\n\t\t\t}", "@Optional\n Property<String> bhkz();", "public String getOrganizationName() {\n\n \n return organizationName;\n\n }", "@Size(min=1, max=50)\n public String getName() {\n return name;\n }", "public String getProductOwner();", "public java.lang.String getPresentity(){\r\n return localPresentity;\r\n }", "Builder addEducationalUse(String value);", "public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}", "@Override\n\t\tpublic String getPKFieldName() {\n\t\t\treturn null;\n\t\t}", "String organizationName();", "public interface SpecialityRepository extends CrudRepository<Speciality,Long> {\n\n}", "@ApiModelProperty(required = true, value = \"A unique and immutable identifier used to identify the customer resource. This identifier has no meaning to the account owner.\")\n @NotNull\n\n@Size(min=1,max=40) \n public String getPartyId() {\n return partyId;\n }", "@ProviderType\npublic interface LichChiTietModel\n\textends BaseModel<LichChiTiet>, GroupedModel, ShardedModel {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a lich chi tiet model instance should use the {@link LichChiTiet} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this lich chi tiet.\n\t *\n\t * @return the primary key of this lich chi tiet\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this lich chi tiet.\n\t *\n\t * @param primaryKey the primary key of this lich chi tiet\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the lich chi tiet ID of this lich chi tiet.\n\t *\n\t * @return the lich chi tiet ID of this lich chi tiet\n\t */\n\tpublic long getLichChiTietId();\n\n\t/**\n\t * Sets the lich chi tiet ID of this lich chi tiet.\n\t *\n\t * @param lichChiTietId the lich chi tiet ID of this lich chi tiet\n\t */\n\tpublic void setLichChiTietId(long lichChiTietId);\n\n\t/**\n\t * Returns the group ID of this lich chi tiet.\n\t *\n\t * @return the group ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic long getGroupId();\n\n\t/**\n\t * Sets the group ID of this lich chi tiet.\n\t *\n\t * @param groupId the group ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setGroupId(long groupId);\n\n\t/**\n\t * Returns the language of this lich chi tiet.\n\t *\n\t * @return the language of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getLanguage();\n\n\t/**\n\t * Sets the language of this lich chi tiet.\n\t *\n\t * @param language the language of this lich chi tiet\n\t */\n\tpublic void setLanguage(String language);\n\n\t/**\n\t * Returns the company ID of this lich chi tiet.\n\t *\n\t * @return the company ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic long getCompanyId();\n\n\t/**\n\t * Sets the company ID of this lich chi tiet.\n\t *\n\t * @param companyId the company ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setCompanyId(long companyId);\n\n\t/**\n\t * Returns the user ID of this lich chi tiet.\n\t *\n\t * @return the user ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic long getUserId();\n\n\t/**\n\t * Sets the user ID of this lich chi tiet.\n\t *\n\t * @param userId the user ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setUserId(long userId);\n\n\t/**\n\t * Returns the user uuid of this lich chi tiet.\n\t *\n\t * @return the user uuid of this lich chi tiet\n\t */\n\t@Override\n\tpublic String getUserUuid();\n\n\t/**\n\t * Sets the user uuid of this lich chi tiet.\n\t *\n\t * @param userUuid the user uuid of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setUserUuid(String userUuid);\n\n\t/**\n\t * Returns the user name of this lich chi tiet.\n\t *\n\t * @return the user name of this lich chi tiet\n\t */\n\t@AutoEscape\n\t@Override\n\tpublic String getUserName();\n\n\t/**\n\t * Sets the user name of this lich chi tiet.\n\t *\n\t * @param userName the user name of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setUserName(String userName);\n\n\t/**\n\t * Returns the create date of this lich chi tiet.\n\t *\n\t * @return the create date of this lich chi tiet\n\t */\n\t@Override\n\tpublic Date getCreateDate();\n\n\t/**\n\t * Sets the create date of this lich chi tiet.\n\t *\n\t * @param createDate the create date of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setCreateDate(Date createDate);\n\n\t/**\n\t * Returns the created by user of this lich chi tiet.\n\t *\n\t * @return the created by user of this lich chi tiet\n\t */\n\tpublic long getCreatedByUser();\n\n\t/**\n\t * Sets the created by user of this lich chi tiet.\n\t *\n\t * @param createdByUser the created by user of this lich chi tiet\n\t */\n\tpublic void setCreatedByUser(long createdByUser);\n\n\t/**\n\t * Returns the modified date of this lich chi tiet.\n\t *\n\t * @return the modified date of this lich chi tiet\n\t */\n\t@Override\n\tpublic Date getModifiedDate();\n\n\t/**\n\t * Sets the modified date of this lich chi tiet.\n\t *\n\t * @param modifiedDate the modified date of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setModifiedDate(Date modifiedDate);\n\n\t/**\n\t * Returns the modified by user of this lich chi tiet.\n\t *\n\t * @return the modified by user of this lich chi tiet\n\t */\n\tpublic long getModifiedByUser();\n\n\t/**\n\t * Sets the modified by user of this lich chi tiet.\n\t *\n\t * @param modifiedByUser the modified by user of this lich chi tiet\n\t */\n\tpublic void setModifiedByUser(long modifiedByUser);\n\n\t/**\n\t * Returns the gio bat dau of this lich chi tiet.\n\t *\n\t * @return the gio bat dau of this lich chi tiet\n\t */\n\tpublic Date getGioBatDau();\n\n\t/**\n\t * Sets the gio bat dau of this lich chi tiet.\n\t *\n\t * @param gioBatDau the gio bat dau of this lich chi tiet\n\t */\n\tpublic void setGioBatDau(Date gioBatDau);\n\n\t/**\n\t * Returns the mo ta of this lich chi tiet.\n\t *\n\t * @return the mo ta of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getMoTa();\n\n\t/**\n\t * Sets the mo ta of this lich chi tiet.\n\t *\n\t * @param moTa the mo ta of this lich chi tiet\n\t */\n\tpublic void setMoTa(String moTa);\n\n\t/**\n\t * Returns the nguoi tham du of this lich chi tiet.\n\t *\n\t * @return the nguoi tham du of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getNguoiThamDu();\n\n\t/**\n\t * Sets the nguoi tham du of this lich chi tiet.\n\t *\n\t * @param nguoiThamDu the nguoi tham du of this lich chi tiet\n\t */\n\tpublic void setNguoiThamDu(String nguoiThamDu);\n\n\t/**\n\t * Returns the nguoi chu tri of this lich chi tiet.\n\t *\n\t * @return the nguoi chu tri of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getNguoiChuTri();\n\n\t/**\n\t * Sets the nguoi chu tri of this lich chi tiet.\n\t *\n\t * @param nguoiChuTri the nguoi chu tri of this lich chi tiet\n\t */\n\tpublic void setNguoiChuTri(String nguoiChuTri);\n\n\t/**\n\t * Returns the selected date of this lich chi tiet.\n\t *\n\t * @return the selected date of this lich chi tiet\n\t */\n\tpublic Date getSelectedDate();\n\n\t/**\n\t * Sets the selected date of this lich chi tiet.\n\t *\n\t * @param selectedDate the selected date of this lich chi tiet\n\t */\n\tpublic void setSelectedDate(Date selectedDate);\n\n\t/**\n\t * Returns the trangthai chi tiet of this lich chi tiet.\n\t *\n\t * @return the trangthai chi tiet of this lich chi tiet\n\t */\n\tpublic int getTrangthaiChiTiet();\n\n\t/**\n\t * Sets the trangthai chi tiet of this lich chi tiet.\n\t *\n\t * @param trangthaiChiTiet the trangthai chi tiet of this lich chi tiet\n\t */\n\tpublic void setTrangthaiChiTiet(int trangthaiChiTiet);\n\n\t/**\n\t * Returns the lich cong tac ID of this lich chi tiet.\n\t *\n\t * @return the lich cong tac ID of this lich chi tiet\n\t */\n\tpublic long getLichCongTacId();\n\n\t/**\n\t * Sets the lich cong tac ID of this lich chi tiet.\n\t *\n\t * @param lichCongTacId the lich cong tac ID of this lich chi tiet\n\t */\n\tpublic void setLichCongTacId(long lichCongTacId);\n\n\t/**\n\t * Returns the address of this lich chi tiet.\n\t *\n\t * @return the address of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getAddress();\n\n\t/**\n\t * Sets the address of this lich chi tiet.\n\t *\n\t * @param address the address of this lich chi tiet\n\t */\n\tpublic void setAddress(String address);\n\n\t/**\n\t * Returns the note of this lich chi tiet.\n\t *\n\t * @return the note of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getNote();\n\n\t/**\n\t * Sets the note of this lich chi tiet.\n\t *\n\t * @param note the note of this lich chi tiet\n\t */\n\tpublic void setNote(String note);\n\n\t/**\n\t * Returns the lydo tra ve of this lich chi tiet.\n\t *\n\t * @return the lydo tra ve of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getLydoTraVe();\n\n\t/**\n\t * Sets the lydo tra ve of this lich chi tiet.\n\t *\n\t * @param lydoTraVe the lydo tra ve of this lich chi tiet\n\t */\n\tpublic void setLydoTraVe(String lydoTraVe);\n\n\t/**\n\t * Returns the organization ID of this lich chi tiet.\n\t *\n\t * @return the organization ID of this lich chi tiet\n\t */\n\tpublic long getOrganizationId();\n\n\t/**\n\t * Sets the organization ID of this lich chi tiet.\n\t *\n\t * @param organizationId the organization ID of this lich chi tiet\n\t */\n\tpublic void setOrganizationId(long organizationId);\n\n}", "boolean isNilAttributeTypeDisplayName();", "public void setOccupancy(int value) {\n this.occupancy = value;\n }", "public interface AcUpuTagSummaryVoPkIF\n extends ScWebKeyIF, Serializable\n{\n //##################################################\n //# fields\n //##################################################//\n\n String getOriginCountryCode();\n String getOriginLocationCode();\n String getOriginOfficeOfExchangeQualifier();\n String getDestinationCountryCode();\n String getDestinationLocationCode();\n String getDestinationOfficeOfExchangeQualifier();\n String getMailCategoryCode();\n String getMailSubClassCode();\n String getMailClassCode();\n String getDispatchYear();\n String getDispatchSerialNumber();\n String getReceptacleSerialNumber();\n String getHighestNumberedReceptacleIndicator();\n String getInsuredOrRegisteredIndicator();\n JwKilogram getWeight();\n\n}", "public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}", "private void validateApiProductInfo(APIProduct product) throws APIManagementException {\n String apiName = product.getId().getName();\n if (apiName == null) {\n handleException(\"API Name is required.\");\n } else if (containsIllegals(apiName)) {\n handleException(\"API Name contains one or more illegal characters \" +\n \"( \" + APIConstants.REGEX_ILLEGAL_CHARACTERS_FOR_API_METADATA + \" )\");\n }\n //version is not a mandatory field for now\n if (!hasValidLength(apiName, APIConstants.MAX_LENGTH_API_NAME)\n || !hasValidLength(product.getId().getVersion(), APIConstants.MAX_LENGTH_VERSION)\n || !hasValidLength(product.getId().getProviderName(), APIConstants.MAX_LENGTH_PROVIDER)\n || !hasValidLength(product.getContext(), APIConstants.MAX_LENGTH_CONTEXT)) {\n throw new APIManagementException(\"Character length exceeds the allowable limit\",\n ExceptionCodes.LENGTH_EXCEEDS);\n }\n }", "@Override\n public String getHighEdu() {\n return high_education;\n }", "public void setMaxCommunityLength(int value) {\n this.maxCommunityLength = value;\n }", "public AdobeVendorID(\n final String in_value)\n {\n this.value = Objects.requireNonNull(in_value);\n }", "@Override\n public int characteristics() {\n return ORDERED | NONNULL | IMMUTABLE;\n }", "@EntityProperty\npublic interface DoubanIdentifier {\n\n /**\n * Returns the identifier on douban.\n *\n * @return the identifier\n */\n Long getDbId();\n}", "public interface TestInstrumentVOInterface {\n\n\n public int getSizeOfInstrumentIDArray();\n\n public void setSizeOfInstrumentIDArray(int sizeOfInstrumentIDArray);\n\n\n public String getSymbol();\n\n public void setSymbol(@MaxSize(20) String symbol);\n\n\n\n\n public String getCurrencyCode();\n\n public void setCurrencyCode(@MaxSize(4) String currencyCode);\n\n\n public void setInstrumentIDAt(@MaxSize(2) int location, TestInstrumentIDVOInterface instrumentID);\n\n public TestInstrumentIDVOInterface getInstrumentIDAt(int location);\n\n\n interface TestInstrumentIDVOInterface {\n\n\n public String getIdSource();\n\n public void setIdSource(@MaxSize(6) String idSource);\n\n public String getSecurityId();\n\n public void setSecurityId(@MaxSize(100) String securityId);\n\n }\n}", "public interface OrganizationResource {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.\n *\n * @return the systemData value.\n */\n SystemData systemData();\n\n /**\n * Gets the organizationId property: organization id.\n *\n * @return the organizationId value.\n */\n String organizationId();\n\n /**\n * Gets the organizationName property: organization name.\n *\n * @return the organizationName value.\n */\n String organizationName();\n\n /**\n * Gets the billingSource property: Billing source.\n *\n * @return the billingSource value.\n */\n BillingSource billingSource();\n\n /**\n * Gets the inner com.azure.resourcemanager.newrelicobservability.fluent.models.OrganizationResourceInner object.\n *\n * @return the inner object.\n */\n OrganizationResourceInner innerModel();\n}", "public OmOrgSrefNamePK() {\r\n\t}", "@Override\n\tpublic String getPKFieldName() {\n\t\treturn null;\n\t}" ]
[ "0.625918", "0.6042034", "0.60094017", "0.59674513", "0.5801921", "0.57977337", "0.5750599", "0.5748239", "0.574633", "0.5740235", "0.5665789", "0.5644049", "0.5599147", "0.5584218", "0.55560094", "0.5200375", "0.5150366", "0.5133681", "0.5064163", "0.50232893", "0.5017431", "0.50134915", "0.49395522", "0.48906824", "0.48872235", "0.48820695", "0.4860028", "0.48582074", "0.48504677", "0.48421246", "0.4837791", "0.48331034", "0.48222822", "0.48063087", "0.47979522", "0.47941545", "0.47645023", "0.47621274", "0.47592595", "0.47552282", "0.4726948", "0.4725382", "0.4712555", "0.4691714", "0.4656718", "0.46426013", "0.46388045", "0.46063155", "0.46001023", "0.45991272", "0.45927852", "0.45891872", "0.45845887", "0.45713225", "0.4567528", "0.45672292", "0.45597", "0.45565346", "0.45538604", "0.45528376", "0.45431793", "0.45424914", "0.45420855", "0.452654", "0.45203707", "0.4519649", "0.45174587", "0.4514598", "0.45143744", "0.45134866", "0.45065224", "0.45057058", "0.44988415", "0.44988024", "0.44960108", "0.44918284", "0.4491131", "0.44836864", "0.44835922", "0.44829786", "0.44822523", "0.44797292", "0.4473364", "0.44716245", "0.44698375", "0.44662768", "0.44640452", "0.44592816", "0.44566074", "0.44563198", "0.4454135", "0.44510123", "0.44510114", "0.4449045", "0.44405657", "0.44342512", "0.44338727", "0.44318983", "0.4427949", "0.4425623" ]
0.550214
15
Constraints: Not nullable, Maximum length: 10 Original property name from the Odata EDM: IndustryCode1
public void setIndustryCode1( @Nullable final String industryCode1) { rememberChangedField("IndustryCode1", this.industryCode1); this.industryCode1 = industryCode1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIndustryCode(String industryCode) {\r\n this.industryCode = industryCode == null ? null : industryCode.trim();\r\n }", "public void setIndustryCode(String industryCode) {\r\n\t\tthis.industryCode = industryCode;\r\n\t}", "public String getIndustryCode() {\r\n return industryCode;\r\n }", "public void setIndustry(String industry) {\n this.industry = industry;\n }", "public String getIndustryCode() {\r\n\t\treturn industryCode;\r\n\t}", "public String getIndustryName() {\r\n return industryName;\r\n }", "public void setIndustry(String industry) {\n\t\tthis.industry = industry;\n\t}", "public void setUWCompany(entity.UWCompany value);", "public void setIndustryName(String industryName) {\r\n this.industryName = industryName == null ? null : industryName.trim();\r\n }", "public String getIndustryType() {\r\n return industryType;\r\n }", "public void setIndustryType(String industryType) {\r\n this.industryType = industryType == null ? null : industryType.trim();\r\n }", "public String getIndustry() {\n return industry;\n }", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "public void setSupEntIndustry(String supEntIndustry) {\n this.supEntIndustry = supEntIndustry == null ? null : supEntIndustry.trim();\n }", "void xsetProductCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productCode);", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "public String getIndustry() {\n\t\treturn industry;\n\t}", "public String getSupEntIndustry() {\n return supEntIndustry;\n }", "public void setDocumentNo (String DocumentNo)\n{\nif (DocumentNo == null) throw new IllegalArgumentException (\"DocumentNo is mandatory\");\nif (DocumentNo.length() > 30)\n{\nlog.warning(\"Length > 30 - truncated\");\nDocumentNo = DocumentNo.substring(0,30);\n}\nset_Value (\"DocumentNo\", DocumentNo);\n}", "CmIndustryConfig selectByPrimaryKey(String industryId);", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "void xsetProductNumberCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productNumberCode);", "@Override\n\tpublic List<DataDictionaryValueEntity> queryIndustrySourceCategory4Dict() {\n\t\treturn null;\n\t}", "public void setIndustry(\n @Nullable\n final String industry) {\n rememberChangedField(\"Industry\", this.industry);\n this.industry = industry;\n }", "public void setIndustryCode3(\n @Nullable\n final String industryCode3) {\n rememberChangedField(\"IndustryCode3\", this.industryCode3);\n this.industryCode3 = industryCode3;\n }", "public void setName(String value)\n {\n // Since this value is marked as \"mandatory,\" the BC4J Framework will take\n // care of ensuring that it's a non-null value. However, if it is null, we\n // don't want to proceed with any validation that could result in a NPE.\n \n if ((value != null) || (!(\"\".equals(value.trim()))))\n {\n // Verify that the name is unique. To do this, we must check both the entity\n // cache and the database. We begin with the entity cache.\n\n com.sun.java.util.collections.Iterator supplierIterator = \n getEntityDef().getAllEntityInstancesIterator(getDBTransaction());\n \n Number currentId = getSupplierId();\n \n while ( supplierIterator.hasNext() )\n {\n SupplierEOImpl cachedSupplier = (SupplierEOImpl)supplierIterator.next();\n\n String cachedName = cachedSupplier.getName();\n Number cachedId = cachedSupplier.getSupplierId();\n\n // We found a match for the name we're trying to set, so throw an\n // exception. Note that we need to exclude this EO from our test.\n \n if (cachedName != null && value.equalsIgnoreCase(cachedName) && \n cachedId.compareTo(currentId) != 0 )\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name \n }\n } \n\n // Now we want to check the database for any occurences of the supplier\n // name. The most efficient way to check this is with a validation view\n // object to which we add to a special \"Validation\" application module.\n // We then added a \"supplierExists\" method to this entity's expert. This\n // method leverages the VAM and the VVO.\n\n OADBTransaction transaction = getOADBTransaction();\n SupplierEntityExpert expert = getSupplierEntityExpert(transaction);\n\n if (expert.supplierExists(value))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name\n }\n }\n \n setAttributeInternal(NAME, value);\n \n }", "public void setM_Production_ID (int M_Production_ID);", "public void setC_POSDocType_ID (int C_POSDocType_ID)\n{\nif (C_POSDocType_ID < 1) throw new IllegalArgumentException (\"C_POSDocType_ID is mandatory.\");\nset_ValueNoCheck (COLUMNNAME_C_POSDocType_ID, Integer.valueOf(C_POSDocType_ID));\n}", "public void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);", "public void setProductCode(String productCode) {\r\n/* 427 */ this._productCode = productCode;\r\n/* */ }", "public void setOccupation(String occupation);", "@Size(max=4)\n\t@Override\n\tpublic Integer getEmpno() {\n\t\treturn super.getEmpno();\n\t}", "public void setIndustryCode4(\n @Nullable\n final String industryCode4) {\n rememberChangedField(\"IndustryCode4\", this.industryCode4);\n this.industryCode4 = industryCode4;\n }", "public void test_hk_03() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n OntProperty property = ontModel.createObjectProperty(\"http://www.aldi.de#property\");\n /* MinCardinalityRestriction testClass = */\n ontModel.createMinCardinalityRestriction(null, property, 42);\n \n }", "public String getLongType() { return \"Technology\"; }", "java.lang.String getProductCode();", "public interface HighlightsColumns {\n\n @DataType(TEXT) @NotNull String VIDEO_TITLE = \"title\";\n @DataType(TEXT) @NotNull String VIDEO_ID = \"id\";\n @DataType(TEXT) @NotNull String THUMBNAIL_URL = \"url\";\n\n}", "@ProviderType\npublic interface StringConstraint extends BaseConstraint, FormatConstraint {\n\n /**\n * Returns the minimum length of the data. The constraint is applicable only for field with type string\n *\n * @return minimum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMinLength();\n\n /**\n * Returns the maximum length of the data. The constraint is applicable only for field with type string\n *\n * @return maximum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMaxLength();\n\n /**\n * As specified in the JSON Schema specification, the regex against which the value of the field should be tested with.\n *\n * Returns the regex. The constraint is applicable only for field with type string\n *\n * @return string represented as pattern\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n default String getPattern() {\n return null;\n }\n}", "public abstract @NotNull String getEquipmentType();", "public void setIndustryCode2(\n @Nullable\n final String industryCode2) {\n rememberChangedField(\"IndustryCode2\", this.industryCode2);\n this.industryCode2 = industryCode2;\n }", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "@Id\r\n @GeneratedValue(strategy = GenerationType.AUTO)\r\n @Column (name = \"CODE_ID\")\r\n public Long getCodeId() {\r\n return codeId;\r\n }", "public void setUWIssueType(entity.UWIssueType value);", "void setProductCode(java.lang.String productCode);", "protected static void initPropertyKey() {\n String path = URL_PREFIX + SCHEMA_PKS;\n\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"name\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"age\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"city\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"lang\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"date\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"price\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"weight\\\",\\n\"\n + \"\\\"data_type\\\": \\\"DOUBLE\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n }", "public void setCodProvincia(String codProvincia);", "public AdobeVendorID(\n final String in_value)\n {\n this.value = Objects.requireNonNull(in_value);\n }", "public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}", "public String onChangeResidenceCode()\r\n {\r\n\ttry\r\n\t{\r\n\r\n\t SessionCO sessionCO = returnSessionObject();\r\n\t residenceTypesSC.setCompCode(sessionCO.getCompanyCode());\r\n\t residenceTypesSC.setPreferredLanguage(sessionCO.getPreferredLanguage());\r\n\t residenceTypesVO = residenceTypesBO.returnDependencyByCode(residenceTypesSC);\r\n\t if(residenceTypesVO == null)\r\n\t {\r\n\t\tthrow new BOException(MessageCodes.INVALID_MISSING_CODE);\r\n\t }\r\n\r\n\t}\r\n\tcatch(Exception e)\r\n\t{\r\n\t residenceTypesVO = new RESIDENCE_TYPESVO();\r\n\t handleException(e, null, null);\r\n\t}\r\n\treturn SUCCESS;\r\n }", "java.lang.String getField1035();", "@Override\n\t\tpublic String getPKFieldName() {\n\t\t\treturn null;\n\t\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.UWCompany getUWCompany();", "public interface DocketCodeRepository extends JpaRepository<DocketCode,Long> {\n\n}", "public String getOrganizationCode() {\n return organizationCode;\n }", "public void setC_Subscription_Delivery_ID (int C_Subscription_Delivery_ID)\n{\nset_ValueNoCheck (\"C_Subscription_Delivery_ID\", new Integer(C_Subscription_Delivery_ID));\n}", "public void setCommodityCode(String commodityCode) {\n this.commodityCode = commodityCode == null ? null : commodityCode.trim();\n }", "public PurchaseType(java.lang.String code)\r\n {\r\n super(code);\r\n }", "@ApiModelProperty(value = \"Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail.\")\n\n@Size(min=1,max=16) \n public String getPostalCode() {\n return postalCode;\n }", "public void setMaxCommunityLength(int value) {\n this.maxCommunityLength = value;\n }", "java.lang.String getField1048();", "public void setOrganizationCode(String organizationCode) {\n this.organizationCode = organizationCode;\n }", "@UML(identifier=\"issueIdentification\", obligation=OPTIONAL, specification=ISO_19115)\n String getIssueIdentification();", "@Override\n\tpublic String getPKFieldName() {\n\t\treturn null;\n\t}", "public ProductCode() {\n }", "java.lang.String getField1406();", "java.lang.String getField1401();", "java.lang.String getField1999();", "public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}", "java.lang.String getField1152();", "public void setC_UOM_ID (int C_UOM_ID)\n{\nset_Value (\"C_UOM_ID\", new Integer(C_UOM_ID));\n}", "java.lang.String getField1600();", "java.lang.String getField1536();", "public void setM_Splitting_ID (int M_Splitting_ID)\n{\nset_ValueNoCheck (\"M_Splitting_ID\", new Integer(M_Splitting_ID));\n}", "java.lang.String getField1402();", "java.lang.String getField1202();", "java.lang.String getField1400();", "public void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);", "java.lang.String getField1998();", "java.lang.String getField1164();", "CarType(String carCode)\r\n {\r\n this.carCode = carCode;\r\n }", "java.lang.String getField1003();", "java.lang.String getField1008();", "public interface CustomerInfo extends EObject {\n\t/**\n\t * Returns the name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerLastName(String bookingRef);\n\n\t/**\n\t * Returns the age of the customer associated to the booking reference. \n\t * Returns -1 if the booking reference does not exist.\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getCustomerAge(String bookingRef);\n\n\t/**\n\t * Returns the email of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */ \n\tString getCustomerEmail(String bookingRef);\n\n\t/**\n\t * Returns the ccnr of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcNr(String bookingRef);\n\n\t/**\n\t * Returns the ccv of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcV(String bookingRef);\n\n\t/**\n\t * Returns the expiry month of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpMonth(String bookingRef);\n\n\t/**\n\t * Returns the expiry year of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpYear(String bookingRef);\n\n\t/**\n\t * Returns the first name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardFirstName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardLastName(String bookingRef);\n\n}", "java.lang.String getField1850();", "java.lang.String getField1016();", "@Override\n\t@XmlElement\n\tpublic void setAutoCode(String autoCode) {\n\t\t\n\t}", "public void setIndustryCode5(\n @Nullable\n final String industryCode5) {\n rememberChangedField(\"IndustryCode5\", this.industryCode5);\n this.industryCode5 = industryCode5;\n }", "@Override\n\tpublic String getCtarCode() {\n\t\treturn null;\n\t}", "public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}", "public void setCollegeCode(String collegeCode)\r\n\t{\r\n\t\tthis.collegeCode = collegeCode;\r\n\t}", "Optional<String> getOId();", "java.lang.String getField1500();", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getFamilyName() {\n return familyName;\n }", "public void setBookCode(java.lang.String value);", "public void setAccountNo (String AccountNo);", "java.lang.String getField1301();", "java.lang.String getField1015();", "cb.Careerbuilder.Company.PhoneType getType();", "java.lang.String getField1005();", "java.lang.String getField1028();" ]
[ "0.6039267", "0.591101", "0.5882409", "0.5684703", "0.56363624", "0.55139625", "0.5494303", "0.546077", "0.54510534", "0.54501665", "0.5415452", "0.54127276", "0.5308905", "0.5284092", "0.52434736", "0.5193929", "0.513647", "0.51239055", "0.5106611", "0.50945467", "0.5031301", "0.50181407", "0.49607697", "0.4953698", "0.49269283", "0.49138582", "0.49001908", "0.48979208", "0.48827577", "0.4879242", "0.48509875", "0.48372108", "0.4837075", "0.48061013", "0.4804916", "0.48028937", "0.4798043", "0.47899032", "0.47896925", "0.4783419", "0.47762927", "0.47727555", "0.47726578", "0.47648698", "0.47597995", "0.4756781", "0.47369128", "0.47352663", "0.4735121", "0.47281614", "0.47202876", "0.4714061", "0.47121343", "0.47082677", "0.47033206", "0.46936697", "0.46862426", "0.46859667", "0.46834564", "0.46693462", "0.46646756", "0.4663799", "0.4656051", "0.46554404", "0.4652833", "0.46525556", "0.4650285", "0.46500587", "0.4649003", "0.46453312", "0.46405423", "0.46342495", "0.46317783", "0.46282932", "0.46269882", "0.46243924", "0.46194434", "0.4617936", "0.46158677", "0.4615171", "0.46142632", "0.46002883", "0.45998445", "0.4597463", "0.45960313", "0.45944667", "0.459382", "0.45920807", "0.45913377", "0.45894155", "0.45869008", "0.45849314", "0.45814794", "0.4578575", "0.4578062", "0.4576719", "0.45751747", "0.45702747", "0.45698872", "0.45684746" ]
0.52345926
15
Constraints: Not nullable, Maximum length: 10 Original property name from the Odata EDM: IndustryCode2
public void setIndustryCode2( @Nullable final String industryCode2) { rememberChangedField("IndustryCode2", this.industryCode2); this.industryCode2 = industryCode2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIndustryCode(String industryCode) {\r\n this.industryCode = industryCode == null ? null : industryCode.trim();\r\n }", "public String getIndustryCode() {\r\n return industryCode;\r\n }", "public void setIndustryCode(String industryCode) {\r\n\t\tthis.industryCode = industryCode;\r\n\t}", "public String getIndustryCode() {\r\n\t\treturn industryCode;\r\n\t}", "public void setIndustry(String industry) {\n this.industry = industry;\n }", "public String getIndustryType() {\r\n return industryType;\r\n }", "public void setUWCompany(entity.UWCompany value);", "public String getIndustryName() {\r\n return industryName;\r\n }", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "public String getIndustry() {\n return industry;\n }", "public void setIndustry(String industry) {\n\t\tthis.industry = industry;\n\t}", "public void setIndustryType(String industryType) {\r\n this.industryType = industryType == null ? null : industryType.trim();\r\n }", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "public void setIndustryName(String industryName) {\r\n this.industryName = industryName == null ? null : industryName.trim();\r\n }", "void xsetProductCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productCode);", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "public void setSupEntIndustry(String supEntIndustry) {\n this.supEntIndustry = supEntIndustry == null ? null : supEntIndustry.trim();\n }", "public void setDocumentNo (String DocumentNo)\n{\nif (DocumentNo == null) throw new IllegalArgumentException (\"DocumentNo is mandatory\");\nif (DocumentNo.length() > 30)\n{\nlog.warning(\"Length > 30 - truncated\");\nDocumentNo = DocumentNo.substring(0,30);\n}\nset_Value (\"DocumentNo\", DocumentNo);\n}", "public String getSupEntIndustry() {\n return supEntIndustry;\n }", "public void setIndustryCode1(\n @Nullable\n final String industryCode1) {\n rememberChangedField(\"IndustryCode1\", this.industryCode1);\n this.industryCode1 = industryCode1;\n }", "public String getIndustry() {\n\t\treturn industry;\n\t}", "void xsetProductNumberCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productNumberCode);", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "CmIndustryConfig selectByPrimaryKey(String industryId);", "public String getLongType() { return \"Technology\"; }", "@Override\n\tpublic List<DataDictionaryValueEntity> queryIndustrySourceCategory4Dict() {\n\t\treturn null;\n\t}", "public void setC_POSDocType_ID (int C_POSDocType_ID)\n{\nif (C_POSDocType_ID < 1) throw new IllegalArgumentException (\"C_POSDocType_ID is mandatory.\");\nset_ValueNoCheck (COLUMNNAME_C_POSDocType_ID, Integer.valueOf(C_POSDocType_ID));\n}", "public void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);", "public void setName(String value)\n {\n // Since this value is marked as \"mandatory,\" the BC4J Framework will take\n // care of ensuring that it's a non-null value. However, if it is null, we\n // don't want to proceed with any validation that could result in a NPE.\n \n if ((value != null) || (!(\"\".equals(value.trim()))))\n {\n // Verify that the name is unique. To do this, we must check both the entity\n // cache and the database. We begin with the entity cache.\n\n com.sun.java.util.collections.Iterator supplierIterator = \n getEntityDef().getAllEntityInstancesIterator(getDBTransaction());\n \n Number currentId = getSupplierId();\n \n while ( supplierIterator.hasNext() )\n {\n SupplierEOImpl cachedSupplier = (SupplierEOImpl)supplierIterator.next();\n\n String cachedName = cachedSupplier.getName();\n Number cachedId = cachedSupplier.getSupplierId();\n\n // We found a match for the name we're trying to set, so throw an\n // exception. Note that we need to exclude this EO from our test.\n \n if (cachedName != null && value.equalsIgnoreCase(cachedName) && \n cachedId.compareTo(currentId) != 0 )\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name \n }\n } \n\n // Now we want to check the database for any occurences of the supplier\n // name. The most efficient way to check this is with a validation view\n // object to which we add to a special \"Validation\" application module.\n // We then added a \"supplierExists\" method to this entity's expert. This\n // method leverages the VAM and the VVO.\n\n OADBTransaction transaction = getOADBTransaction();\n SupplierEntityExpert expert = getSupplierEntityExpert(transaction);\n\n if (expert.supplierExists(value))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name\n }\n }\n \n setAttributeInternal(NAME, value);\n \n }", "java.lang.String getProductCode();", "@Size(max=4)\n\t@Override\n\tpublic Integer getEmpno() {\n\t\treturn super.getEmpno();\n\t}", "public interface HighlightsColumns {\n\n @DataType(TEXT) @NotNull String VIDEO_TITLE = \"title\";\n @DataType(TEXT) @NotNull String VIDEO_ID = \"id\";\n @DataType(TEXT) @NotNull String THUMBNAIL_URL = \"url\";\n\n}", "public String onChangeResidenceCode()\r\n {\r\n\ttry\r\n\t{\r\n\r\n\t SessionCO sessionCO = returnSessionObject();\r\n\t residenceTypesSC.setCompCode(sessionCO.getCompanyCode());\r\n\t residenceTypesSC.setPreferredLanguage(sessionCO.getPreferredLanguage());\r\n\t residenceTypesVO = residenceTypesBO.returnDependencyByCode(residenceTypesSC);\r\n\t if(residenceTypesVO == null)\r\n\t {\r\n\t\tthrow new BOException(MessageCodes.INVALID_MISSING_CODE);\r\n\t }\r\n\r\n\t}\r\n\tcatch(Exception e)\r\n\t{\r\n\t residenceTypesVO = new RESIDENCE_TYPESVO();\r\n\t handleException(e, null, null);\r\n\t}\r\n\treturn SUCCESS;\r\n }", "public void setM_Production_ID (int M_Production_ID);", "java.lang.String getField1035();", "public void setProductCode(String productCode) {\r\n/* 427 */ this._productCode = productCode;\r\n/* */ }", "public abstract @NotNull String getEquipmentType();", "public void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);", "public void setIndustryCode3(\n @Nullable\n final String industryCode3) {\n rememberChangedField(\"IndustryCode3\", this.industryCode3);\n this.industryCode3 = industryCode3;\n }", "java.lang.String getField1048();", "public interface CustomerInfo extends EObject {\n\t/**\n\t * Returns the name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerLastName(String bookingRef);\n\n\t/**\n\t * Returns the age of the customer associated to the booking reference. \n\t * Returns -1 if the booking reference does not exist.\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getCustomerAge(String bookingRef);\n\n\t/**\n\t * Returns the email of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */ \n\tString getCustomerEmail(String bookingRef);\n\n\t/**\n\t * Returns the ccnr of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcNr(String bookingRef);\n\n\t/**\n\t * Returns the ccv of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcV(String bookingRef);\n\n\t/**\n\t * Returns the expiry month of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpMonth(String bookingRef);\n\n\t/**\n\t * Returns the expiry year of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpYear(String bookingRef);\n\n\t/**\n\t * Returns the first name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardFirstName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardLastName(String bookingRef);\n\n}", "@ProviderType\npublic interface StringConstraint extends BaseConstraint, FormatConstraint {\n\n /**\n * Returns the minimum length of the data. The constraint is applicable only for field with type string\n *\n * @return minimum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMinLength();\n\n /**\n * Returns the maximum length of the data. The constraint is applicable only for field with type string\n *\n * @return maximum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMaxLength();\n\n /**\n * As specified in the JSON Schema specification, the regex against which the value of the field should be tested with.\n *\n * Returns the regex. The constraint is applicable only for field with type string\n *\n * @return string represented as pattern\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n default String getPattern() {\n return null;\n }\n}", "@Id\r\n @GeneratedValue(strategy = GenerationType.AUTO)\r\n @Column (name = \"CODE_ID\")\r\n public Long getCodeId() {\r\n return codeId;\r\n }", "public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}", "public void setHC_Org2_ID (int HC_Org2_ID);", "java.lang.String getField1536();", "public void setIndustry(\n @Nullable\n final String industry) {\n rememberChangedField(\"Industry\", this.industry);\n this.industry = industry;\n }", "@UML(identifier=\"issueIdentification\", obligation=OPTIONAL, specification=ISO_19115)\n String getIssueIdentification();", "java.lang.String getField1202();", "public String getOrganizationCode() {\n return organizationCode;\n }", "public void setCodProvincia(String codProvincia);", "java.lang.String getField1152();", "public void setUWIssueType(entity.UWIssueType value);", "public interface DocketCodeRepository extends JpaRepository<DocketCode,Long> {\n\n}", "private String getObjNameFromReasonForChangeAttr( Map< String, String > propValue2 ) throws TCException {\n\n String objNameAttrVal = null;\n String reasonForChangeAttrVal = propValue2.get( UL4Common.REASON_FOR_CHANGE_ATTR ).toString();\n\n TCPropertyDescriptor propDescObjName = getTCPropertyDescriptor( \"object_name\" );\n int maxLength = propDescObjName.getMaxLength();\n\n if ( reasonForChangeAttrVal.length() > 128 ) {\n objNameAttrVal = reasonForChangeAttrVal.substring( 0, maxLength );\n } else {\n objNameAttrVal = reasonForChangeAttrVal;\n }\n\n return objNameAttrVal;\n }", "java.lang.String getField1406();", "public void setC_Subscription_Delivery_ID (int C_Subscription_Delivery_ID)\n{\nset_ValueNoCheck (\"C_Subscription_Delivery_ID\", new Integer(C_Subscription_Delivery_ID));\n}", "public void test_hk_03() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n OntProperty property = ontModel.createObjectProperty(\"http://www.aldi.de#property\");\n /* MinCardinalityRestriction testClass = */\n ontModel.createMinCardinalityRestriction(null, property, 42);\n \n }", "java.lang.String getField1402();", "public ProductCode() {\n }", "public void setOccupation(String occupation);", "java.lang.String getField1401();", "public AdobeVendorID(\n final String in_value)\n {\n this.value = Objects.requireNonNull(in_value);\n }", "java.lang.String getField1850();", "protected static void initPropertyKey() {\n String path = URL_PREFIX + SCHEMA_PKS;\n\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"name\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"age\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"city\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"lang\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"date\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"price\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"weight\\\",\\n\"\n + \"\\\"data_type\\\": \\\"DOUBLE\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n }", "public void setMaxCommunityLength(int value) {\n this.maxCommunityLength = value;\n }", "java.lang.String getField1028();", "java.lang.String getField1008();", "Optional<String> getOId();", "@ApiModelProperty(value = \"Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail.\")\n\n@Size(min=1,max=16) \n public String getPostalCode() {\n return postalCode;\n }", "@Override\n\tpublic String getCtarCode() {\n\t\treturn null;\n\t}", "java.lang.String getField1999();", "public void setC_UOM_ID (int C_UOM_ID)\n{\nset_Value (\"C_UOM_ID\", new Integer(C_UOM_ID));\n}", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.UWCompany getUWCompany();", "java.lang.String getField1003();", "public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}", "java.lang.String getField1600();", "void setProductCode(java.lang.String productCode);", "public void setIndustryCode4(\n @Nullable\n final String industryCode4) {\n rememberChangedField(\"IndustryCode4\", this.industryCode4);\n this.industryCode4 = industryCode4;\n }", "java.lang.String getField1400();", "java.lang.String getField1998();", "public PurchaseType(java.lang.String code)\r\n {\r\n super(code);\r\n }", "java.lang.String getField1862();", "java.lang.String getField1016();", "java.lang.String getField1164();", "@Override\n\t\tpublic String getPKFieldName() {\n\t\t\treturn null;\n\t\t}", "public NameKey toUncodedNameKey() {\n if (this.scientificNameAuthorship == null && this.rank == RankType.UNRANKED && this.code == null)\n return this;\n Set<NameFlag> fl = this.flags;\n if (fl != null && fl.contains(NameFlag.AUTONYM)) {\n fl = new HashSet<>(this.flags);\n fl.remove(NameFlag.AUTONYM);\n fl = fl.isEmpty() ? null : fl;\n\n }\n return new NameKey(this.analyser, null, this.scientificName, null, RankType.UNRANKED, this.type, fl);\n }", "java.lang.String getField1710();", "java.lang.String getField1032();", "java.lang.String getField1852();", "java.lang.String getField1562();", "public OmOrgSrefNamePK() {\r\n\t}", "CarType(String carCode)\r\n {\r\n this.carCode = carCode;\r\n }", "@ApiModelProperty(value = \"Name by which a party is known and which is usually used to identify that party.\")\n\n@Size(min=1,max=70) \n public String getFamilyName() {\n return familyName;\n }", "java.lang.String getField1552();", "java.lang.String getField1462();", "public void setM_Splitting_ID (int M_Splitting_ID)\n{\nset_ValueNoCheck (\"M_Splitting_ID\", new Integer(M_Splitting_ID));\n}", "java.lang.String getField1450();", "public LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS() {}", "java.lang.String getField1702();" ]
[ "0.5865265", "0.5808786", "0.57269675", "0.55351526", "0.55073243", "0.5419848", "0.5418183", "0.54091483", "0.5398152", "0.5332844", "0.53086066", "0.5284271", "0.52815473", "0.523437", "0.52150965", "0.5123085", "0.5119509", "0.51059675", "0.51002336", "0.50796473", "0.5038648", "0.49934554", "0.49889085", "0.49832195", "0.49556255", "0.494587", "0.49454334", "0.49298587", "0.49269363", "0.4910099", "0.49045506", "0.4896726", "0.48912188", "0.4884528", "0.4881996", "0.48817974", "0.48795357", "0.48668867", "0.48601553", "0.48318756", "0.48156717", "0.48130134", "0.48054385", "0.479968", "0.4790309", "0.47899958", "0.47860795", "0.4784754", "0.47799537", "0.47795534", "0.4765434", "0.47610387", "0.475963", "0.4758167", "0.47574753", "0.47570243", "0.4754166", "0.47522914", "0.4748326", "0.47448158", "0.47441185", "0.47435603", "0.47416213", "0.4738551", "0.473466", "0.4734572", "0.4731724", "0.47310457", "0.47309613", "0.47294292", "0.47268343", "0.47256127", "0.47203064", "0.47199523", "0.47147548", "0.47124878", "0.47118035", "0.47086373", "0.47039837", "0.4701026", "0.46989676", "0.46948892", "0.46921092", "0.4685564", "0.46848845", "0.46841392", "0.46816042", "0.46749133", "0.4671689", "0.46716568", "0.46702883", "0.46648946", "0.46626753", "0.4659437", "0.4657882", "0.46557269", "0.4654839", "0.4654125", "0.46459004", "0.46443835" ]
0.5077963
20
Constraints: Not nullable, Maximum length: 10 Original property name from the Odata EDM: IndustryCode3
public void setIndustryCode3( @Nullable final String industryCode3) { rememberChangedField("IndustryCode3", this.industryCode3); this.industryCode3 = industryCode3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIndustryCode(String industryCode) {\r\n this.industryCode = industryCode == null ? null : industryCode.trim();\r\n }", "public String getIndustryCode() {\r\n return industryCode;\r\n }", "public void setIndustryCode(String industryCode) {\r\n\t\tthis.industryCode = industryCode;\r\n\t}", "public void setIndustry(String industry) {\n this.industry = industry;\n }", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "public void setUWCompany(entity.UWCompany value);", "public String getIndustryCode() {\r\n\t\treturn industryCode;\r\n\t}", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "public String getIndustryName() {\r\n return industryName;\r\n }", "public void setIndustry(String industry) {\n\t\tthis.industry = industry;\n\t}", "public void setDocumentNo (String DocumentNo)\n{\nif (DocumentNo == null) throw new IllegalArgumentException (\"DocumentNo is mandatory\");\nif (DocumentNo.length() > 30)\n{\nlog.warning(\"Length > 30 - truncated\");\nDocumentNo = DocumentNo.substring(0,30);\n}\nset_Value (\"DocumentNo\", DocumentNo);\n}", "void xsetProductCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productCode);", "public String getIndustryType() {\r\n return industryType;\r\n }", "public String getIndustry() {\n return industry;\n }", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "public void setIndustryName(String industryName) {\r\n this.industryName = industryName == null ? null : industryName.trim();\r\n }", "public void setIndustryType(String industryType) {\r\n this.industryType = industryType == null ? null : industryType.trim();\r\n }", "public void setSupEntIndustry(String supEntIndustry) {\n this.supEntIndustry = supEntIndustry == null ? null : supEntIndustry.trim();\n }", "void xsetProductNumberCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productNumberCode);", "public interface HighlightsColumns {\n\n @DataType(TEXT) @NotNull String VIDEO_TITLE = \"title\";\n @DataType(TEXT) @NotNull String VIDEO_ID = \"id\";\n @DataType(TEXT) @NotNull String THUMBNAIL_URL = \"url\";\n\n}", "java.lang.String getField1035();", "@Override\n\tpublic List<DataDictionaryValueEntity> queryIndustrySourceCategory4Dict() {\n\t\treturn null;\n\t}", "@Size(max=4)\n\t@Override\n\tpublic Integer getEmpno() {\n\t\treturn super.getEmpno();\n\t}", "public void test_hk_03() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n OntProperty property = ontModel.createObjectProperty(\"http://www.aldi.de#property\");\n /* MinCardinalityRestriction testClass = */\n ontModel.createMinCardinalityRestriction(null, property, 42);\n \n }", "public String getSupEntIndustry() {\n return supEntIndustry;\n }", "public String getIndustry() {\n\t\treturn industry;\n\t}", "protected static void initPropertyKey() {\n String path = URL_PREFIX + SCHEMA_PKS;\n\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"name\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"age\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"city\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"lang\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"date\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"price\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"weight\\\",\\n\"\n + \"\\\"data_type\\\": \\\"DOUBLE\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n }", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "public void setC_POSDocType_ID (int C_POSDocType_ID)\n{\nif (C_POSDocType_ID < 1) throw new IllegalArgumentException (\"C_POSDocType_ID is mandatory.\");\nset_ValueNoCheck (COLUMNNAME_C_POSDocType_ID, Integer.valueOf(C_POSDocType_ID));\n}", "java.lang.String getField1048();", "@ProviderType\npublic interface StringConstraint extends BaseConstraint, FormatConstraint {\n\n /**\n * Returns the minimum length of the data. The constraint is applicable only for field with type string\n *\n * @return minimum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMinLength();\n\n /**\n * Returns the maximum length of the data. The constraint is applicable only for field with type string\n *\n * @return maximum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMaxLength();\n\n /**\n * As specified in the JSON Schema specification, the regex against which the value of the field should be tested with.\n *\n * Returns the regex. The constraint is applicable only for field with type string\n *\n * @return string represented as pattern\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n default String getPattern() {\n return null;\n }\n}", "public String getLongType() { return \"Technology\"; }", "java.lang.String getField1536();", "public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}", "public void setName(String value)\n {\n // Since this value is marked as \"mandatory,\" the BC4J Framework will take\n // care of ensuring that it's a non-null value. However, if it is null, we\n // don't want to proceed with any validation that could result in a NPE.\n \n if ((value != null) || (!(\"\".equals(value.trim()))))\n {\n // Verify that the name is unique. To do this, we must check both the entity\n // cache and the database. We begin with the entity cache.\n\n com.sun.java.util.collections.Iterator supplierIterator = \n getEntityDef().getAllEntityInstancesIterator(getDBTransaction());\n \n Number currentId = getSupplierId();\n \n while ( supplierIterator.hasNext() )\n {\n SupplierEOImpl cachedSupplier = (SupplierEOImpl)supplierIterator.next();\n\n String cachedName = cachedSupplier.getName();\n Number cachedId = cachedSupplier.getSupplierId();\n\n // We found a match for the name we're trying to set, so throw an\n // exception. Note that we need to exclude this EO from our test.\n \n if (cachedName != null && value.equalsIgnoreCase(cachedName) && \n cachedId.compareTo(currentId) != 0 )\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name \n }\n } \n\n // Now we want to check the database for any occurences of the supplier\n // name. The most efficient way to check this is with a validation view\n // object to which we add to a special \"Validation\" application module.\n // We then added a \"supplierExists\" method to this entity's expert. This\n // method leverages the VAM and the VVO.\n\n OADBTransaction transaction = getOADBTransaction();\n SupplierEntityExpert expert = getSupplierEntityExpert(transaction);\n\n if (expert.supplierExists(value))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name\n }\n }\n \n setAttributeInternal(NAME, value);\n \n }", "@Override\n\t\tpublic String getPKFieldName() {\n\t\t\treturn null;\n\t\t}", "java.lang.String getField1003();", "public void setM_Production_ID (int M_Production_ID);", "java.lang.String getField1406();", "CmIndustryConfig selectByPrimaryKey(String industryId);", "java.lang.String getField1401();", "public void setMaxCommunityLength(int value) {\n this.maxCommunityLength = value;\n }", "java.lang.String getField1850();", "java.lang.String getField1600();", "java.lang.String getField1028();", "java.lang.String getField1152();", "public void setProductCode(String productCode) {\r\n/* 427 */ this._productCode = productCode;\r\n/* */ }", "@Override\n\tpublic String getPKFieldName() {\n\t\treturn null;\n\t}", "java.lang.String getField1999();", "java.lang.String getField1202();", "java.lang.String getField1402();", "public void setUWIssueType(entity.UWIssueType value);", "public abstract @NotNull String getEquipmentType();", "java.lang.String getField1016();", "@UML(identifier=\"issueIdentification\", obligation=OPTIONAL, specification=ISO_19115)\n String getIssueIdentification();", "public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}", "@JSProperty\n int getMaxLength();", "java.lang.String getField1008();", "java.lang.String getField1998();", "public void setC_Subscription_Delivery_ID (int C_Subscription_Delivery_ID)\n{\nset_ValueNoCheck (\"C_Subscription_Delivery_ID\", new Integer(C_Subscription_Delivery_ID));\n}", "java.lang.String getField1400();", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.UWCompany getUWCompany();", "java.lang.String getField1562();", "public void setIndustryCode1(\n @Nullable\n final String industryCode1) {\n rememberChangedField(\"IndustryCode1\", this.industryCode1);\n this.industryCode1 = industryCode1;\n }", "java.lang.String getField1710();", "public void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);", "java.lang.String getField1862();", "public void setC_UOM_ID (int C_UOM_ID)\n{\nset_Value (\"C_UOM_ID\", new Integer(C_UOM_ID));\n}", "java.lang.String getField1450();", "java.lang.String getField1489();", "public void setIndustry(\n @Nullable\n final String industry) {\n rememberChangedField(\"Industry\", this.industry);\n this.industry = industry;\n }", "java.lang.String getField1531();", "java.lang.String getField1500();", "java.lang.String getProductCode();", "@Override\n\tpublic String getCtarCode() {\n\t\treturn null;\n\t}", "java.lang.String getField1301();", "java.lang.String getField1702();", "java.lang.String getField1032();", "java.lang.String getField1830();", "java.lang.String getField1462();", "public AdobeVendorID(\n final String in_value)\n {\n this.value = Objects.requireNonNull(in_value);\n }", "public void setOccupation(String occupation);", "java.lang.String getField1800();", "java.lang.String getField1015();", "java.lang.String getField1164();", "java.lang.String getField1899();", "java.lang.String getField1005();", "@ApiModelProperty(value = \"Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail.\")\n\n@Size(min=1,max=16) \n public String getPostalCode() {\n return postalCode;\n }", "java.lang.String getField1572();", "java.lang.String getField1552();", "java.lang.String getField1824();", "java.lang.String getField1833();", "java.lang.String getField1852();", "java.lang.String getField1920();", "java.lang.String getField1231();", "java.lang.String getField1040();", "java.lang.String getField1538();", "public M csrtTypeNameNull(){if(this.get(\"csrtTypeNameNot\")==null)this.put(\"csrtTypeNameNot\", \"\");this.put(\"csrtTypeName\", null);return this;}", "java.lang.String getField1530();", "public void setIndustryCode4(\n @Nullable\n final String industryCode4) {\n rememberChangedField(\"IndustryCode4\", this.industryCode4);\n this.industryCode4 = industryCode4;\n }" ]
[ "0.5754259", "0.56151265", "0.55529505", "0.5431232", "0.5422351", "0.5396047", "0.5370538", "0.53299296", "0.52870834", "0.52522177", "0.5242813", "0.52342844", "0.5231941", "0.51939183", "0.5175318", "0.5169073", "0.51609194", "0.5092719", "0.50522465", "0.5024595", "0.4987376", "0.49833953", "0.49814725", "0.495463", "0.4943782", "0.49348328", "0.49346212", "0.49305835", "0.49293703", "0.49137688", "0.49065536", "0.49018395", "0.48955148", "0.48907647", "0.48814753", "0.48646194", "0.48645952", "0.4862348", "0.4852207", "0.48495334", "0.4839811", "0.4837464", "0.4825594", "0.48238283", "0.48215055", "0.48187944", "0.48006955", "0.4800435", "0.47933424", "0.47889668", "0.47887152", "0.4784653", "0.47840574", "0.4780497", "0.477441", "0.47703862", "0.47685215", "0.4767292", "0.47633892", "0.47626677", "0.47613156", "0.47570187", "0.475517", "0.47486478", "0.47460216", "0.47427157", "0.4740841", "0.4737278", "0.47351283", "0.4731285", "0.47291797", "0.47285438", "0.4726081", "0.47255096", "0.4723886", "0.47236437", "0.47211924", "0.47185907", "0.4717812", "0.4716835", "0.47094494", "0.47065437", "0.4705454", "0.47047144", "0.4704513", "0.4702185", "0.46962464", "0.46960458", "0.46947175", "0.46924108", "0.46922186", "0.4691602", "0.4691323", "0.46896818", "0.4688486", "0.46859595", "0.46844202", "0.46843395", "0.46811295", "0.46808687" ]
0.50506544
19
Constraints: Not nullable, Maximum length: 10 Original property name from the Odata EDM: IndustryCode4
public void setIndustryCode4( @Nullable final String industryCode4) { rememberChangedField("IndustryCode4", this.industryCode4); this.industryCode4 = industryCode4; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIndustryCode(String industryCode) {\r\n this.industryCode = industryCode == null ? null : industryCode.trim();\r\n }", "public String getIndustryCode() {\r\n return industryCode;\r\n }", "public void setIndustryCode(String industryCode) {\r\n\t\tthis.industryCode = industryCode;\r\n\t}", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "public String getIndustryCode() {\r\n\t\treturn industryCode;\r\n\t}", "public void setIndustry(String industry) {\n this.industry = industry;\n }", "public void setUWCompany(entity.UWCompany value);", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "public String getIndustryName() {\r\n return industryName;\r\n }", "void xsetProductCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productCode);", "public String getIndustryType() {\r\n return industryType;\r\n }", "public void setIndustry(String industry) {\n\t\tthis.industry = industry;\n\t}", "public String getIndustry() {\n return industry;\n }", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "public void setIndustryName(String industryName) {\r\n this.industryName = industryName == null ? null : industryName.trim();\r\n }", "@Override\n\tpublic List<DataDictionaryValueEntity> queryIndustrySourceCategory4Dict() {\n\t\treturn null;\n\t}", "public void setDocumentNo (String DocumentNo)\n{\nif (DocumentNo == null) throw new IllegalArgumentException (\"DocumentNo is mandatory\");\nif (DocumentNo.length() > 30)\n{\nlog.warning(\"Length > 30 - truncated\");\nDocumentNo = DocumentNo.substring(0,30);\n}\nset_Value (\"DocumentNo\", DocumentNo);\n}", "public void setIndustryType(String industryType) {\r\n this.industryType = industryType == null ? null : industryType.trim();\r\n }", "void xsetProductNumberCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productNumberCode);", "@Size(max=4)\n\t@Override\n\tpublic Integer getEmpno() {\n\t\treturn super.getEmpno();\n\t}", "public void setSupEntIndustry(String supEntIndustry) {\n this.supEntIndustry = supEntIndustry == null ? null : supEntIndustry.trim();\n }", "java.lang.String getField1035();", "public String getSupEntIndustry() {\n return supEntIndustry;\n }", "public interface HighlightsColumns {\n\n @DataType(TEXT) @NotNull String VIDEO_TITLE = \"title\";\n @DataType(TEXT) @NotNull String VIDEO_ID = \"id\";\n @DataType(TEXT) @NotNull String THUMBNAIL_URL = \"url\";\n\n}", "public String getIndustry() {\n\t\treturn industry;\n\t}", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "java.lang.String getField1048();", "public void setProductCode(String productCode) {\r\n/* 427 */ this._productCode = productCode;\r\n/* */ }", "java.lang.String getField1536();", "public void setName(String value)\n {\n // Since this value is marked as \"mandatory,\" the BC4J Framework will take\n // care of ensuring that it's a non-null value. However, if it is null, we\n // don't want to proceed with any validation that could result in a NPE.\n \n if ((value != null) || (!(\"\".equals(value.trim()))))\n {\n // Verify that the name is unique. To do this, we must check both the entity\n // cache and the database. We begin with the entity cache.\n\n com.sun.java.util.collections.Iterator supplierIterator = \n getEntityDef().getAllEntityInstancesIterator(getDBTransaction());\n \n Number currentId = getSupplierId();\n \n while ( supplierIterator.hasNext() )\n {\n SupplierEOImpl cachedSupplier = (SupplierEOImpl)supplierIterator.next();\n\n String cachedName = cachedSupplier.getName();\n Number cachedId = cachedSupplier.getSupplierId();\n\n // We found a match for the name we're trying to set, so throw an\n // exception. Note that we need to exclude this EO from our test.\n \n if (cachedName != null && value.equalsIgnoreCase(cachedName) && \n cachedId.compareTo(currentId) != 0 )\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name \n }\n } \n\n // Now we want to check the database for any occurences of the supplier\n // name. The most efficient way to check this is with a validation view\n // object to which we add to a special \"Validation\" application module.\n // We then added a \"supplierExists\" method to this entity's expert. This\n // method leverages the VAM and the VVO.\n\n OADBTransaction transaction = getOADBTransaction();\n SupplierEntityExpert expert = getSupplierEntityExpert(transaction);\n\n if (expert.supplierExists(value))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name\n }\n }\n \n setAttributeInternal(NAME, value);\n \n }", "@Override\n\t\tpublic String getPKFieldName() {\n\t\t\treturn null;\n\t\t}", "@ProviderType\npublic interface StringConstraint extends BaseConstraint, FormatConstraint {\n\n /**\n * Returns the minimum length of the data. The constraint is applicable only for field with type string\n *\n * @return minimum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMinLength();\n\n /**\n * Returns the maximum length of the data. The constraint is applicable only for field with type string\n *\n * @return maximum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMaxLength();\n\n /**\n * As specified in the JSON Schema specification, the regex against which the value of the field should be tested with.\n *\n * Returns the regex. The constraint is applicable only for field with type string\n *\n * @return string represented as pattern\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n default String getPattern() {\n return null;\n }\n}", "java.lang.String getProductCode();", "public void setC_POSDocType_ID (int C_POSDocType_ID)\n{\nif (C_POSDocType_ID < 1) throw new IllegalArgumentException (\"C_POSDocType_ID is mandatory.\");\nset_ValueNoCheck (COLUMNNAME_C_POSDocType_ID, Integer.valueOf(C_POSDocType_ID));\n}", "public String getLongType() { return \"Technology\"; }", "java.lang.String getField1406();", "public void setM_Production_ID (int M_Production_ID);", "java.lang.String getField1600();", "CmIndustryConfig selectByPrimaryKey(String industryId);", "protected static void initPropertyKey() {\n String path = URL_PREFIX + SCHEMA_PKS;\n\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"name\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"age\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"city\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"lang\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"date\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"price\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"weight\\\",\\n\"\n + \"\\\"data_type\\\": \\\"DOUBLE\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n }", "java.lang.String getField1401();", "public void test_hk_03() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n OntProperty property = ontModel.createObjectProperty(\"http://www.aldi.de#property\");\n /* MinCardinalityRestriction testClass = */\n ontModel.createMinCardinalityRestriction(null, property, 42);\n \n }", "public AdobeVendorID(\n final String in_value)\n {\n this.value = Objects.requireNonNull(in_value);\n }", "java.lang.String getField1152();", "java.lang.String getField1850();", "@Override\n\tpublic String getPKFieldName() {\n\t\treturn null;\n\t}", "java.lang.String getField1402();", "@UML(identifier=\"issueIdentification\", obligation=OPTIONAL, specification=ISO_19115)\n String getIssueIdentification();", "java.lang.String getField1028();", "java.lang.String getField1003();", "public abstract @NotNull String getEquipmentType();", "java.lang.String getField1400();", "java.lang.String getField1202();", "@Override\n\tpublic String getCtarCode() {\n\t\treturn null;\n\t}", "public interface CustomerInfo extends EObject {\n\t/**\n\t * Returns the name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerLastName(String bookingRef);\n\n\t/**\n\t * Returns the age of the customer associated to the booking reference. \n\t * Returns -1 if the booking reference does not exist.\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getCustomerAge(String bookingRef);\n\n\t/**\n\t * Returns the email of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */ \n\tString getCustomerEmail(String bookingRef);\n\n\t/**\n\t * Returns the ccnr of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcNr(String bookingRef);\n\n\t/**\n\t * Returns the ccv of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcV(String bookingRef);\n\n\t/**\n\t * Returns the expiry month of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpMonth(String bookingRef);\n\n\t/**\n\t * Returns the expiry year of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpYear(String bookingRef);\n\n\t/**\n\t * Returns the first name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardFirstName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardLastName(String bookingRef);\n\n}", "public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}", "java.lang.String getField1016();", "java.lang.String getField1999();", "java.lang.String getField1008();", "java.lang.String getField1450();", "java.lang.String getField1998();", "@Override\n\t\t\tpublic String getPropertyId() {\n\t\t\t\treturn null;\n\t\t\t}", "public void setMaxCommunityLength(int value) {\n this.maxCommunityLength = value;\n }", "java.lang.String getField1489();", "java.lang.String getField1710();", "java.lang.String getField1562();", "java.lang.String getField1862();", "java.lang.String getField1462();", "java.lang.String getField1572();", "Optional<String> getOId();", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.UWCompany getUWCompany();", "java.lang.String getField1920();", "java.lang.String getField1004();", "java.lang.String getField1500();", "java.lang.String getField1852();", "java.lang.String getField1301();", "java.lang.String getField1552();", "java.lang.String getField1164();", "java.lang.String getField1032();", "public void setC_Subscription_Delivery_ID (int C_Subscription_Delivery_ID)\n{\nset_ValueNoCheck (\"C_Subscription_Delivery_ID\", new Integer(C_Subscription_Delivery_ID));\n}", "java.lang.String getField1015();", "java.lang.String getField1540();", "java.lang.String getField1531();", "@Id\r\n @GeneratedValue(strategy = GenerationType.AUTO)\r\n @Column (name = \"CODE_ID\")\r\n public Long getCodeId() {\r\n return codeId;\r\n }", "java.lang.String getField1800();", "public interface TestInstrumentVOInterface {\n\n\n public int getSizeOfInstrumentIDArray();\n\n public void setSizeOfInstrumentIDArray(int sizeOfInstrumentIDArray);\n\n\n public String getSymbol();\n\n public void setSymbol(@MaxSize(20) String symbol);\n\n\n\n\n public String getCurrencyCode();\n\n public void setCurrencyCode(@MaxSize(4) String currencyCode);\n\n\n public void setInstrumentIDAt(@MaxSize(2) int location, TestInstrumentIDVOInterface instrumentID);\n\n public TestInstrumentIDVOInterface getInstrumentIDAt(int location);\n\n\n interface TestInstrumentIDVOInterface {\n\n\n public String getIdSource();\n\n public void setIdSource(@MaxSize(6) String idSource);\n\n public String getSecurityId();\n\n public void setSecurityId(@MaxSize(100) String securityId);\n\n }\n}", "java.lang.String getField1452();", "java.lang.String getField1899();", "public void setCodProvincia(String codProvincia);", "public ProductCode() {\n }", "java.lang.String getField1040();", "public interface AllergyModelProperties extends PropertyAccess<AllergyModel> {\n ModelKeyProvider<AllergyModel> id();\n}", "java.lang.String getField1824();", "java.lang.String getField1702();", "java.lang.String getField1005();", "@ApiModelProperty(value = \"Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail.\")\n\n@Size(min=1,max=16) \n public String getPostalCode() {\n return postalCode;\n }", "public OmOrgSrefNamePK() {\r\n\t}", "java.lang.String getField1538();", "java.lang.String getField1200();", "java.lang.String getField1830();" ]
[ "0.5785046", "0.57307684", "0.56136316", "0.5504748", "0.5476893", "0.54701424", "0.54024035", "0.5394666", "0.5382429", "0.5366319", "0.53239787", "0.5282235", "0.52681255", "0.5211808", "0.5208826", "0.52025944", "0.5184458", "0.51527333", "0.51381207", "0.5128328", "0.5099708", "0.5036125", "0.5021382", "0.5014688", "0.50014323", "0.49856845", "0.49751285", "0.49710408", "0.4964212", "0.49584565", "0.49556336", "0.4949317", "0.49456397", "0.494289", "0.4939244", "0.4928464", "0.49231562", "0.49215585", "0.49196073", "0.49154302", "0.49065608", "0.490364", "0.49016777", "0.48994556", "0.48978117", "0.489498", "0.48870102", "0.48821497", "0.48818797", "0.48782676", "0.48684824", "0.48596215", "0.4855789", "0.48483866", "0.48482823", "0.48476705", "0.48378393", "0.48369277", "0.48335344", "0.48287535", "0.48251486", "0.48184097", "0.48152757", "0.4812692", "0.48105335", "0.48067808", "0.48043853", "0.4802596", "0.47964618", "0.4795192", "0.47932285", "0.478955", "0.4787134", "0.47854832", "0.4784397", "0.47841915", "0.4784031", "0.4782469", "0.47808683", "0.47779936", "0.4776489", "0.4775302", "0.47745308", "0.47610438", "0.4760034", "0.47590974", "0.47577867", "0.47576264", "0.47570804", "0.47556886", "0.47555634", "0.47540793", "0.47534817", "0.4750877", "0.47506785", "0.47489545", "0.47470227", "0.47445634", "0.47438765", "0.47437444" ]
0.4979862
26
Constraints: Not nullable, Maximum length: 10 Original property name from the Odata EDM: IndustryCode5
public void setIndustryCode5( @Nullable final String industryCode5) { rememberChangedField("IndustryCode5", this.industryCode5); this.industryCode5 = industryCode5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIndustryCode(String industryCode) {\r\n this.industryCode = industryCode == null ? null : industryCode.trim();\r\n }", "public String getIndustryCode() {\r\n return industryCode;\r\n }", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "public void setIndustryCode(String industryCode) {\r\n\t\tthis.industryCode = industryCode;\r\n\t}", "public void setDocumentNo (String DocumentNo)\n{\nif (DocumentNo == null) throw new IllegalArgumentException (\"DocumentNo is mandatory\");\nif (DocumentNo.length() > 30)\n{\nlog.warning(\"Length > 30 - truncated\");\nDocumentNo = DocumentNo.substring(0,30);\n}\nset_Value (\"DocumentNo\", DocumentNo);\n}", "public void setUWCompany(entity.UWCompany value);", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "public void setIndustry(String industry) {\n this.industry = industry;\n }", "public String getIndustryCode() {\r\n\t\treturn industryCode;\r\n\t}", "void xsetProductCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productCode);", "@Size(max=4)\n\t@Override\n\tpublic Integer getEmpno() {\n\t\treturn super.getEmpno();\n\t}", "java.lang.String getField1035();", "public String getIndustryName() {\r\n return industryName;\r\n }", "public String getIndustryType() {\r\n return industryType;\r\n }", "java.lang.String getField1048();", "public interface HighlightsColumns {\n\n @DataType(TEXT) @NotNull String VIDEO_TITLE = \"title\";\n @DataType(TEXT) @NotNull String VIDEO_ID = \"id\";\n @DataType(TEXT) @NotNull String THUMBNAIL_URL = \"url\";\n\n}", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "public void test_hk_03() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n OntProperty property = ontModel.createObjectProperty(\"http://www.aldi.de#property\");\n /* MinCardinalityRestriction testClass = */\n ontModel.createMinCardinalityRestriction(null, property, 42);\n \n }", "@ProviderType\npublic interface StringConstraint extends BaseConstraint, FormatConstraint {\n\n /**\n * Returns the minimum length of the data. The constraint is applicable only for field with type string\n *\n * @return minimum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMinLength();\n\n /**\n * Returns the maximum length of the data. The constraint is applicable only for field with type string\n *\n * @return maximum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMaxLength();\n\n /**\n * As specified in the JSON Schema specification, the regex against which the value of the field should be tested with.\n *\n * Returns the regex. The constraint is applicable only for field with type string\n *\n * @return string represented as pattern\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n default String getPattern() {\n return null;\n }\n}", "public void setName(String value)\n {\n // Since this value is marked as \"mandatory,\" the BC4J Framework will take\n // care of ensuring that it's a non-null value. However, if it is null, we\n // don't want to proceed with any validation that could result in a NPE.\n \n if ((value != null) || (!(\"\".equals(value.trim()))))\n {\n // Verify that the name is unique. To do this, we must check both the entity\n // cache and the database. We begin with the entity cache.\n\n com.sun.java.util.collections.Iterator supplierIterator = \n getEntityDef().getAllEntityInstancesIterator(getDBTransaction());\n \n Number currentId = getSupplierId();\n \n while ( supplierIterator.hasNext() )\n {\n SupplierEOImpl cachedSupplier = (SupplierEOImpl)supplierIterator.next();\n\n String cachedName = cachedSupplier.getName();\n Number cachedId = cachedSupplier.getSupplierId();\n\n // We found a match for the name we're trying to set, so throw an\n // exception. Note that we need to exclude this EO from our test.\n \n if (cachedName != null && value.equalsIgnoreCase(cachedName) && \n cachedId.compareTo(currentId) != 0 )\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name \n }\n } \n\n // Now we want to check the database for any occurences of the supplier\n // name. The most efficient way to check this is with a validation view\n // object to which we add to a special \"Validation\" application module.\n // We then added a \"supplierExists\" method to this entity's expert. This\n // method leverages the VAM and the VVO.\n\n OADBTransaction transaction = getOADBTransaction();\n SupplierEntityExpert expert = getSupplierEntityExpert(transaction);\n\n if (expert.supplierExists(value))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name\n }\n }\n \n setAttributeInternal(NAME, value);\n \n }", "public void setIndustryName(String industryName) {\r\n this.industryName = industryName == null ? null : industryName.trim();\r\n }", "java.lang.String getField1536();", "public void setIndustry(String industry) {\n\t\tthis.industry = industry;\n\t}", "void xsetProductNumberCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productNumberCode);", "public void setIndustryType(String industryType) {\r\n this.industryType = industryType == null ? null : industryType.trim();\r\n }", "java.lang.String getField1401();", "public void setSupEntIndustry(String supEntIndustry) {\n this.supEntIndustry = supEntIndustry == null ? null : supEntIndustry.trim();\n }", "public String getIndustry() {\n return industry;\n }", "public void setC_POSDocType_ID (int C_POSDocType_ID)\n{\nif (C_POSDocType_ID < 1) throw new IllegalArgumentException (\"C_POSDocType_ID is mandatory.\");\nset_ValueNoCheck (COLUMNNAME_C_POSDocType_ID, Integer.valueOf(C_POSDocType_ID));\n}", "java.lang.String getField1406();", "protected static void initPropertyKey() {\n String path = URL_PREFIX + SCHEMA_PKS;\n\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"name\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"age\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"city\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"lang\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"date\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"price\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"weight\\\",\\n\"\n + \"\\\"data_type\\\": \\\"DOUBLE\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n }", "java.lang.String getField1850();", "public void setMaxCommunityLength(int value) {\n this.maxCommunityLength = value;\n }", "@Override\n\t\tpublic String getPKFieldName() {\n\t\t\treturn null;\n\t\t}", "java.lang.String getField1028();", "java.lang.String getField1152();", "java.lang.String getField1600();", "@JSProperty\n int getMaxLength();", "java.lang.String getField1003();", "public String getLongType() { return \"Technology\"; }", "java.lang.String getField1562();", "java.lang.String getField1016();", "@Override\n\tpublic String getPKFieldName() {\n\t\treturn null;\n\t}", "java.lang.String getField1402();", "java.lang.String getField1450();", "java.lang.String getField1008();", "java.lang.String getField1202();", "@Override\n\tpublic List<DataDictionaryValueEntity> queryIndustrySourceCategory4Dict() {\n\t\treturn null;\n\t}", "java.lang.String getField1824();", "public void setM_Production_ID (int M_Production_ID);", "java.lang.String getField1862();", "java.lang.String getField1400();", "java.lang.String getField1572();", "java.lang.String getField1462();", "java.lang.String getField1025();", "java.lang.String getField1710();", "java.lang.String getField1540();", "java.lang.String getField1489();", "java.lang.String getField1005();", "java.lang.String getField1552();", "java.lang.String getField1500();", "public interface CustomerInfo extends EObject {\n\t/**\n\t * Returns the name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerLastName(String bookingRef);\n\n\t/**\n\t * Returns the age of the customer associated to the booking reference. \n\t * Returns -1 if the booking reference does not exist.\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getCustomerAge(String bookingRef);\n\n\t/**\n\t * Returns the email of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */ \n\tString getCustomerEmail(String bookingRef);\n\n\t/**\n\t * Returns the ccnr of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcNr(String bookingRef);\n\n\t/**\n\t * Returns the ccv of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcV(String bookingRef);\n\n\t/**\n\t * Returns the expiry month of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpMonth(String bookingRef);\n\n\t/**\n\t * Returns the expiry year of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpYear(String bookingRef);\n\n\t/**\n\t * Returns the first name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardFirstName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardLastName(String bookingRef);\n\n}", "java.lang.String getField1531();", "public String getSupEntIndustry() {\n return supEntIndustry;\n }", "java.lang.String getField1852();", "java.lang.String getField1032();", "public Builder setField1150(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1150_ = value;\n onChanged();\n return this;\n }", "java.lang.String getField1015();", "java.lang.String getField1164();", "@Size(min=1, max=50)\n public String getName() {\n return name;\n }", "java.lang.String getField1301();", "java.lang.String getField1040();", "public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}", "@Test\n public void setPrimaryKey_length_good_case_max()\n {\n // Arrange\n String key = \"0123456789012345678901234567890123456789012345678901234567890123\";\n SymmetricKey symmetricKey = new SymmetricKey();\n // Act\n symmetricKey.setPrimaryKeyFinal(key);\n // Assert\n assertEquals(key, Deencapsulation.getField(symmetricKey, \"primaryKey\"));\n }", "@UML(identifier=\"issueIdentification\", obligation=OPTIONAL, specification=ISO_19115)\n String getIssueIdentification();", "public void setC_Subscription_Delivery_ID (int C_Subscription_Delivery_ID)\n{\nset_ValueNoCheck (\"C_Subscription_Delivery_ID\", new Integer(C_Subscription_Delivery_ID));\n}", "public void setProductCode(String productCode) {\r\n/* 427 */ this._productCode = productCode;\r\n/* */ }", "java.lang.String getField1920();", "java.lang.String getField1830();", "java.lang.String getField1899();", "java.lang.String getField1538();", "java.lang.String getField1452();", "java.lang.String getField1999();", "int getMaxVarcharSize();", "public AdobeVendorID(\n final String in_value)\n {\n this.value = Objects.requireNonNull(in_value);\n }", "java.lang.String getField1530();", "java.lang.String getField1541();", "@ApiModelProperty(value = \"Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail.\")\n\n@Size(min=1,max=16) \n public String getPostalCode() {\n return postalCode;\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n String string0 = SQLUtil.ownerDotComponent(dBUniqueConstraint0);\n assertEquals(\"null.null\", string0);\n }", "@Override\n\t\t\tpublic String getPropertyId() {\n\t\t\t\treturn null;\n\t\t\t}", "java.lang.String getField1436();", "java.lang.String getField1800();", "java.lang.String getField1062();", "java.lang.String getField1702();", "public void setC_UOM_ID (int C_UOM_ID)\n{\nset_Value (\"C_UOM_ID\", new Integer(C_UOM_ID));\n}", "java.lang.String getField1833();", "java.lang.String getField1425();", "java.lang.String getField1200();", "java.lang.String getField1550();", "@Test\n public void testFirstNameMaxLength()\n {\n String invalid = repeatM(21);\n owner.setFirstName(invalid);\n assertInvalid(owner, \"firstName\", \"First name must be between 2 and 20 characters\", invalid);\n }" ]
[ "0.5558599", "0.5424669", "0.53597325", "0.533478", "0.53037554", "0.5293261", "0.52798843", "0.5204815", "0.51829565", "0.5174485", "0.5155702", "0.51358235", "0.5114165", "0.51063126", "0.5067639", "0.50671446", "0.50587136", "0.5041737", "0.50338024", "0.5025959", "0.50222343", "0.5008638", "0.49975383", "0.49974597", "0.49813095", "0.4972628", "0.49656206", "0.49559072", "0.49555248", "0.49528548", "0.49482244", "0.49452838", "0.49421608", "0.49320891", "0.49254233", "0.4924165", "0.4923117", "0.49219024", "0.49125123", "0.489618", "0.48939937", "0.48830098", "0.4875533", "0.48698375", "0.48609963", "0.4858571", "0.48562068", "0.4853976", "0.48538312", "0.4850957", "0.48507658", "0.48500994", "0.48473018", "0.48303023", "0.4829126", "0.4826782", "0.48261753", "0.4822729", "0.48192155", "0.4818321", "0.4818157", "0.48175642", "0.48130184", "0.4810488", "0.48098922", "0.4808692", "0.48063844", "0.4806223", "0.4802754", "0.48023412", "0.48022866", "0.48021576", "0.4798792", "0.47909188", "0.4789805", "0.47880456", "0.47879088", "0.4787667", "0.47863388", "0.47858614", "0.47821996", "0.47772616", "0.47755432", "0.47743922", "0.47719237", "0.47714433", "0.47706363", "0.4769411", "0.4769364", "0.47672272", "0.47661287", "0.4764968", "0.4764099", "0.4763887", "0.47630647", "0.47630024", "0.47613108", "0.47612736", "0.4755835", "0.4754", "0.47536477" ]
0.0
-1
Constraints: Not nullable, Maximum length: 7 Original property name from the Odata EDM: InternationalLocationNumber1
public void setInternationalLocationNumber1( @Nullable final String internationalLocationNumber1) { rememberChangedField("InternationalLocationNumber1", this.internationalLocationNumber1); this.internationalLocationNumber1 = internationalLocationNumber1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String getAddressPropertyName();", "public interface Location extends Identity {\n\n Property<String> commonName();\n}", "@ApiModelProperty(value = \"The company location associated with the claim.\")\n public DtoValueString getLocation() {\n return location;\n }", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "java.lang.String getField1035();", "public void setLocationId(String value) { _locationId = value; }", "public void setFixed(entity.LocationNamedInsured value);", "java.lang.String getField1301();", "java.lang.String getField1231();", "@ApiModelProperty(example = \"null\", value = \"Optional field in case the dial-in number is associated with a particular location\")\n public String getLocation() {\n return location;\n }", "java.lang.String getField1164();", "java.lang.String getField1040();", "java.lang.String getField1127();", "public void setDocumentNo (String DocumentNo)\n{\nif (DocumentNo == null) throw new IllegalArgumentException (\"DocumentNo is mandatory\");\nif (DocumentNo.length() > 30)\n{\nlog.warning(\"Length > 30 - truncated\");\nDocumentNo = DocumentNo.substring(0,30);\n}\nset_Value (\"DocumentNo\", DocumentNo);\n}", "java.lang.String getField1833();", "java.lang.String getField1843();", "java.lang.String getField1016();", "java.lang.String getField1818();", "public void setLocationId(String locationId);", "java.lang.String getField1600();", "public QueryLocusLocusSetter() {\n super(\"org.tair.db.locusdetail\", 2147483647);\n }", "java.lang.String getField1007();", "java.lang.String getField1300();", "@DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:12.107 -0500\", hash_original_method = \"958E0B7EB30F5353747022B831D2FD74\", hash_generated_method = \"ADF84B7CD584A3086AA314B699B00CEF\")\n \npublic String getLocation() {\n return location;\n }", "ReadOnlyStringProperty unitsProperty();", "java.lang.String getField1862();", "java.lang.String getField1272();", "java.lang.String getField1883();", "java.lang.String getField1123();", "public ReadLociSetter() {\n super(\"org.tair.db.locusdetail\", 2147483647);\n }", "@ApiModelProperty(value = \"Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail.\")\n\n@Size(min=1,max=16) \n public String getPostalCode() {\n return postalCode;\n }", "java.lang.String getField1700();", "java.lang.String getField1489();", "java.lang.String getField1003();", "java.lang.String getField1414();", "java.lang.String getField1710();", "java.lang.String getField1852();", "java.lang.String getField1372();", "java.lang.String getField1202();", "public QueryLociSetter() {\n super(\"org.tair.db.locusdetail\", 2147483647);\n }", "java.lang.String getField1831();", "java.lang.String getField1008();", "java.lang.String getField1919();", "java.lang.String getField1646();", "java.lang.String getField1772();", "java.lang.String getField1221();", "java.lang.String getField1702();", "java.lang.String getField1402();", "java.lang.String getField1382();", "java.lang.String getField1865();", "java.lang.String getField1050();", "@AutoEscape\n\tpublic String getLocationId();", "java.lang.String getField1263();", "java.lang.String getField1830();", "protected LocationPK() {\n super();\n }", "public int getNewProperty_descriptionType(){\n return localNewProperty_descriptionType;\n }", "java.lang.String getField1401();", "java.lang.String getField1824();", "java.lang.String getField1406();", "java.lang.String getField1572();", "java.lang.String getField1362();", "java.lang.String getField1400();", "java.lang.String getField1882();", "java.lang.String getField1282();", "@Test\n public void shouldHaveProperNames() {\n assertEquals(\"B1\", Location.B1.toString());\n assertEquals(\"B5\", Location.B5.toString());\n assertEquals(\"R12\", Location.R12.toString());\n assertEquals(\"R4\", Location.R4.toString());\n assertEquals(\"B_BEAR_OFF\", Location.B_BEAR_OFF.toString());\n assertEquals(\"R_BEAR_OFF\", Location.R_BEAR_OFF.toString());\n assertEquals(\"R_BAR\", Location.R_BAR.toString());\n assertEquals(\"B_BAR\", Location.B_BAR.toString());\n }", "java.lang.String getField1900();", "java.lang.String getField1872();", "java.lang.String getField1762();", "java.lang.String getField1033();", "java.lang.String getField1338();", "java.lang.String getField1531();", "public void setM_Locator_ID (int M_Locator_ID)\n{\nset_Value (\"M_Locator_ID\", new Integer(M_Locator_ID));\n}", "public Property(String owners,int estvalue, String location,char PPR2,String yearsowned,String eircode,String address) {\r\n this.owners = owners;\r\n this.estValue = estvalue;\r\n this.Address = address;\r\n this.postcode = eircode;\r\n this.PPR = PPR2;\r\n this.locationCategory = location;\r\n }", "java.lang.String getField1352();", "java.lang.String getField1262();", "java.lang.String getField1172();", "java.lang.String getField1307();", "java.lang.String getField1832();", "java.lang.String getField1871();", "java.lang.String getField1752();", "java.lang.String getField1062();", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "java.lang.String getField1431();", "java.lang.String getField1462();", "java.lang.String getField1041();", "java.lang.String getField1712();", "java.lang.String getField1237();", "@Override\n public java.lang.Object getProperty(int propertyIndex) {\n if(propertyIndex==0)\n {\n return this.FormOfAddressCode!=null?this.FormOfAddressCode.getSimpleValue():null;\n }\n if(propertyIndex==1)\n {\n return this.FormOfAddressName!=null?this.FormOfAddressName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==2)\n {\n return this.GivenName!=null?this.GivenName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==3)\n {\n return this.MiddleName!=null?this.MiddleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==4)\n {\n return this.FamilyName!=null?this.FamilyName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==5)\n {\n return this.AdditionalFamilyName!=null?this.AdditionalFamilyName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==6)\n {\n return this.BirthName!=null?this.BirthName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==7)\n {\n return this.NickName!=null?this.NickName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==8)\n {\n return this.InitialsName!=null?this.InitialsName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==9)\n {\n return this.AcademicTitleCode!=null?this.AcademicTitleCode.getSimpleValue():null;\n }\n if(propertyIndex==10)\n {\n return this.AcademicTitleName!=null?this.AcademicTitleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==11)\n {\n return this.AdditionalAcademicTitleCode!=null?this.AdditionalAcademicTitleCode.getSimpleValue():null;\n }\n if(propertyIndex==12)\n {\n return this.AdditionalAcademicTitleName!=null?this.AdditionalAcademicTitleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==13)\n {\n return this.NamePrefixCode!=null?this.NamePrefixCode.getSimpleValue():null;\n }\n if(propertyIndex==14)\n {\n return this.NamePrefixName!=null?this.NamePrefixName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==15)\n {\n return this.AdditionalNamePrefixCode!=null?this.AdditionalNamePrefixCode.getSimpleValue():null;\n }\n if(propertyIndex==16)\n {\n return this.AdditionalNamePrefixName!=null?this.AdditionalNamePrefixName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==17)\n {\n return this.NameSupplementCode!=null?this.NameSupplementCode.getSimpleValue():null;\n }\n if(propertyIndex==18)\n {\n return this.NameSupplementName!=null?this.NameSupplementName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==19)\n {\n return this.DeviatingFullName!=null?this.DeviatingFullName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==20)\n {\n return this.NameFormatCountryCode!=null?this.NameFormatCountryCode:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==21)\n {\n return this.NameFormatCode!=null?this.NameFormatCode.getSimpleValue():null;\n }\n return null;\n }", "@JsonProperty(\"location_id\")\n public String getLocationId() { return _locationId; }", "java.lang.String getField1230();", "java.lang.String getField1800();", "java.lang.String getField1381();", "java.lang.String getField1015();", "java.lang.String getField1851();", "java.lang.String getField1552();", "java.lang.String getField1240();", "java.lang.String getField1321();", "public interface CustomerInfo extends EObject {\n\t/**\n\t * Returns the name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerLastName(String bookingRef);\n\n\t/**\n\t * Returns the age of the customer associated to the booking reference. \n\t * Returns -1 if the booking reference does not exist.\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getCustomerAge(String bookingRef);\n\n\t/**\n\t * Returns the email of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */ \n\tString getCustomerEmail(String bookingRef);\n\n\t/**\n\t * Returns the ccnr of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcNr(String bookingRef);\n\n\t/**\n\t * Returns the ccv of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcV(String bookingRef);\n\n\t/**\n\t * Returns the expiry month of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpMonth(String bookingRef);\n\n\t/**\n\t * Returns the expiry year of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpYear(String bookingRef);\n\n\t/**\n\t * Returns the first name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardFirstName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardLastName(String bookingRef);\n\n}", "java.lang.String getField1327();", "public int getM_Locator_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Locator_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}" ]
[ "0.56462586", "0.56439084", "0.54709727", "0.5452473", "0.5434161", "0.5373052", "0.53548676", "0.5241372", "0.522652", "0.5197121", "0.518751", "0.5184996", "0.5180335", "0.5178942", "0.51753867", "0.51748955", "0.5161358", "0.51519555", "0.5148005", "0.51295084", "0.5122751", "0.51213765", "0.5109273", "0.51082146", "0.50988877", "0.5095145", "0.5092299", "0.5090963", "0.5085056", "0.5084126", "0.50793123", "0.5073534", "0.505986", "0.5057476", "0.5054561", "0.5053673", "0.50527716", "0.50369555", "0.50347865", "0.503446", "0.50336826", "0.50279945", "0.50276315", "0.502571", "0.5025614", "0.50248617", "0.5024347", "0.50214565", "0.5020223", "0.5016374", "0.5015941", "0.5015773", "0.50141674", "0.50139993", "0.5008842", "0.5005236", "0.5005012", "0.5001693", "0.49993378", "0.49957556", "0.4995594", "0.49930108", "0.49923465", "0.49915472", "0.49872467", "0.49860182", "0.4985397", "0.49799895", "0.49748933", "0.4974611", "0.49741966", "0.4973284", "0.49723387", "0.49699596", "0.49685267", "0.4967634", "0.49665484", "0.49632704", "0.4962593", "0.49599302", "0.49572164", "0.49568984", "0.49568287", "0.49552923", "0.49551472", "0.49549162", "0.49541283", "0.49482566", "0.49481815", "0.4947202", "0.49468797", "0.49467155", "0.49454102", "0.49448997", "0.49444774", "0.4944464", "0.49435636", "0.4940111", "0.4939987", "0.49381435" ]
0.53072536
7
Constraints: Not nullable, Maximum length: 2 Original property name from the Odata EDM: NielsenRegion
public void setNielsenRegion( @Nullable final String nielsenRegion) { rememberChangedField("NielsenRegion", this.nielsenRegion); this.nielsenRegion = nielsenRegion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getRegionId();", "public String getRegionno() {\n return regionno;\n }", "public String getValidRegionDesc();", "public String getRegionNo() {\n return regionNo;\n }", "java.lang.String getRegionCode();", "public String getRegionName() {\r\n return regionName;\r\n }", "public void setRegion(String region);", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegionid() {\n return regionid;\n }", "public String getRegionName() {\n return regionName;\n }", "String regionName();", "String regionName();", "String regionName();", "String regionName();", "kr.pik.message.Profile.HowMe.Region getRegion();", "public int getRegionid() {\n\treturn regionid;\n}", "public int getC_Region_ID();", "public java.lang.String getRegionname() {\n\treturn regionname;\n}", "Integer getRegionId();", "public String getRegionId() {\r\n return regionId;\r\n }", "public void setRegionNo(String regionNo) {\n this.regionNo = regionNo == null ? null : regionNo.trim();\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "@AutoEscape\n public String getRegion();", "public byte [] getRegionName() {\n return regionName;\n }", "public void setRegionno(String regionno) {\n this.regionno = regionno == null ? null : regionno.trim();\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setC_Region_ID (int C_Region_ID);", "public String getRegion() {\n return this.region;\n }", "public String getRegionId() {\n return regionId;\n }", "public String getRegionId() {\n return regionId;\n }", "public String getRegionId() {\n return regionId;\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public String getRegion_id() {\n return region_id;\n }", "public int getRegionid() {\n return regionid;\n }", "public String getRegionFullName() {\n return regionFullName;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "@ApiModelProperty(value = \"State/region of IP address\")\n public String getRegionName() {\n return regionName;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void changeRegion(ValueChangeEvent valueChangeEvent) {\n WABEAN mybean = new WABEAN();\r\n mybean.AccessAttribute(\"Country\").setInputValue(null);// second level attribunte\r\n // makes also the third level attribute to null \r\n // mybean.AccessAttribute(\"City\").setInputValue(null);// thierd level no need to make it null\r\n }", "public interface IRegion extends IEntity {\n\n String getName();\n void setName(String name);\n ICountry getCountry();\n void setCountry(ICountry country);\n \n}", "public interface RegionColumns extends ExtendedColumns {\n\n String NAME = \"name\";\n String COUNTRY_ID = \"country_id\";\n}", "public String getRegion() {\n return region;\n }", "public long getRegionId() {\r\n return regionId;\r\n }", "public void setValidRegionDesc(String validRegionDesc);", "public Builder setRegionId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n regionId_ = value;\n onChanged();\n return this;\n }", "public TypeOfRegion getRegion();", "public void setRegion(String region) {\n this.region = region;\n }", "int getRegionValue();", "public void setRegionname(java.lang.String newRegionname) {\n\tregionname = newRegionname;\n}", "public CloudinsRegionRecord() {\n super(CloudinsRegion.CLOUDINS_REGION);\n }", "public Long getRegionId() {\n return this.regionId;\n }", "@ApiModelProperty(value = \"State/region code of IP address\")\n public String getRegionCode() {\n return regionCode;\n }", "public void setRegion(String region) {\n this.region = region == null ? null : region.trim();\n }", "public void setRegion(String region) {\n this.region = region == null ? null : region.trim();\n }", "public void setRegionName(String regionName) {\r\n this.regionName = regionName == null ? null : regionName.trim();\r\n }", "public void setNomregion(String value) {\n setAttributeInternal(NOMREGION, value);\n }", "public String getNomregion() {\n return (String) getAttributeInternal(NOMREGION);\n }", "public java.lang.String getREGION()\n {\n \n return __REGION;\n }", "public void setRegionFullName(String regionFullName) {\n this.regionFullName = regionFullName == null ? null : regionFullName.trim();\n }", "public void setRegionId(String regionId) {\r\n this.regionId = regionId == null ? null : regionId.trim();\r\n }", "protected abstract String getAddressPropertyName();", "public void setREGION(java.lang.String value)\n {\n if ((__REGION == null) != (value == null) || (value != null && ! value.equals(__REGION)))\n {\n _isDirty = true;\n }\n __REGION = value;\n }", "public void setRegion_id(String region_id) {\n this.region_id = region_id;\n }", "public void setRegion(Region region) {\n this.region = region;\n }", "public EnumRegion getRegion()\n {\n return region;\n }", "public void setRegionId(String regionId) {\n this.regionId = regionId == null ? null : regionId.trim();\n }", "public void setRegionId(String regionId) {\n this.regionId = regionId == null ? null : regionId.trim();\n }", "public void setRegionId(String regionId) {\n this.regionId = regionId == null ? null : regionId.trim();\n }", "public Region() { }", "protected String defaultJNDIName() {\n return \"com/hps/july/persistence/SuperRegion\";\n }", "public void setRegionid(String regionid) {\n this.regionid = regionid;\n }", "@ApiModelProperty(value = \"Nation with its own government, occupying a particular territory.\")\n\n@Pattern(regexp=\"^[A-Z]{2,2}$\") \n public String getCountry() {\n return country;\n }", "@Column(name = \"rgn_famil\")\n public String getRegionFamiliarity() {\n return regionFamiliarity;\n }", "public void setRegionId(long regionId) {\r\n this.regionId = regionId;\r\n }", "public void testGetRegion() {\r\n\t\tregionBuilder = getRegionTestBuilder();\r\n\t\ttry {\r\n\t\t\tRegion region = regionMgr.getRegion(RegionTestBuilder.REGION_ID_INDIA);\r\n\t\t\tassertTrue(\"Unable to get country list\", region.getName()\r\n\t\t\t\t\t.equalsIgnoreCase(\"India\"));\r\n\t\t} catch (Exception ex) {\r\n\t\t\tassertTrue(\"An excpetion has occured\", false);\r\n\t\t}\r\n\t}", "public interface Location extends Identity {\n\n Property<String> commonName();\n}", "public void setRegionid(int newRegionid) {\n regionid = newRegionid;\n }", "public int getRegionValue() {\n return region_;\n }", "public void setRegion(EnumRegion region)\n {\n this.region = region;\n }", "public Region getRegion() {\n return region;\n }", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public java.lang.String getRegionId() {\n java.lang.Object ref = regionId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n regionId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Region() {\n }", "public SysRegionVo getSysRegionBytNo(String tNo);", "public List getZonasRegion(String feriadoRegion);", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public java.lang.String getRegionId() {\n java.lang.Object ref = regionId_;\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 regionId_ = s;\n return s;\n }\n }", "public RegionProjection(Long regionId, Long countryId, String description) {\n this.regionId = regionId;\n this.countryId = countryId;\n this.description = description;\n }" ]
[ "0.6541368", "0.65092725", "0.6473073", "0.6390365", "0.61819756", "0.6179207", "0.6123777", "0.61159813", "0.61159813", "0.61089313", "0.60856414", "0.608203", "0.608203", "0.608203", "0.608203", "0.6073283", "0.6047003", "0.6039109", "0.6031174", "0.60047936", "0.5997976", "0.59785455", "0.59774303", "0.5973411", "0.5973411", "0.5973411", "0.5968772", "0.5959575", "0.5958488", "0.5954288", "0.591348", "0.5910393", "0.59095657", "0.59095657", "0.59095657", "0.5904052", "0.5904052", "0.5904052", "0.5892753", "0.5886219", "0.5881377", "0.58715755", "0.58715755", "0.58715755", "0.58715755", "0.58715755", "0.58061236", "0.5804856", "0.5804856", "0.5804856", "0.5786113", "0.5769405", "0.5760177", "0.5751786", "0.57469165", "0.5742093", "0.5717084", "0.57109576", "0.57005525", "0.5684848", "0.565063", "0.56480014", "0.5632725", "0.56257", "0.56167203", "0.56167203", "0.5612824", "0.5601189", "0.55515987", "0.55488753", "0.54892766", "0.5468971", "0.54671097", "0.5462666", "0.54614735", "0.544263", "0.538648", "0.5368319", "0.5368319", "0.5368319", "0.5351752", "0.5348822", "0.53411424", "0.5339496", "0.53262395", "0.53185123", "0.5306315", "0.5299798", "0.5298871", "0.5294393", "0.52933806", "0.52771896", "0.5271436", "0.52688867", "0.5267895", "0.52588624", "0.52497166", "0.5247845", "0.5245702", "0.52438205" ]
0.5721582
56
Constraints: Not nullable, Maximum length: 2 Original property name from the Odata EDM: ResponsibleType
public void setResponsibleType( @Nullable final String responsibleType) { rememberChangedField("ResponsibleType", this.responsibleType); this.responsibleType = responsibleType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TypeDescription validated();", "@Override\n public final Integer getOwnerType() {\n return null;\n }", "public interface HighlightsColumns {\n\n @DataType(TEXT) @NotNull String VIDEO_TITLE = \"title\";\n @DataType(TEXT) @NotNull String VIDEO_ID = \"id\";\n @DataType(TEXT) @NotNull String THUMBNAIL_URL = \"url\";\n\n}", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"One of the following values will be provided: Payment Settlement Entity (PSE), Electronic Payment Facilitator (EPF), Other Third Party\")\n\n public String getType() {\n return type;\n }", "public void setPersonType(PersonType_Tp type) { this.personType = type; }", "fi.kapsi.koti.jpa.nanopb.Nanopb.FieldType getType();", "@Override\n public String getType() {\n return \"\";\n }", "String getResponsible();", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "public abstract @NotNull String getEquipmentType();", "@NotNull\n/* 42 */ public PolicyType getType() { return this.myType; }", "PiEntityType entityType();", "RecordPropertyType createRecordPropertyType();", "@NotNull(message = \"{NotNull.gov.nih.nci.calims2.domain.administration.customerservice.BillingInformation.type}\")\n \n @ManyToOne(fetch = FetchType.LAZY)\n@JoinColumn(name = \"TYPE_FK\")\n@org.hibernate.annotations.ForeignKey(name = \"BILLINTYPE_FK\")\n\n public gov.nih.nci.calims2.domain.common.Type getType() {\n return type;\n }", "public interface OwnedModel {\n\n\t/**\n\t * Returns the owner id.\n\t * \n\t * @return {@link String}. Can be {@code null}.\n\t */\n\tpublic String getOwnerId();\n\n}", "@Override\n public String getCondimentType() {\n return TYPE;\n }", "public PersonType_Tp getPersonType() { return personType; }", "@ProviderType\npublic interface StringConstraint extends BaseConstraint, FormatConstraint {\n\n /**\n * Returns the minimum length of the data. The constraint is applicable only for field with type string\n *\n * @return minimum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMinLength();\n\n /**\n * Returns the maximum length of the data. The constraint is applicable only for field with type string\n *\n * @return maximum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMaxLength();\n\n /**\n * As specified in the JSON Schema specification, the regex against which the value of the field should be tested with.\n *\n * Returns the regex. The constraint is applicable only for field with type string\n *\n * @return string represented as pattern\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n default String getPattern() {\n return null;\n }\n}", "@Override\npublic String getType() {\n\treturn null;\n}", "public void setNewProperty_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localNewProperty_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewProperty_descriptionType=param;\n \n\n }", "public void setOldProperty_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localOldProperty_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localOldProperty_descriptionType=param;\n \n\n }", "@ProviderType\npublic interface PersonModel extends BaseModel<Person> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a person model instance should use the {@link Person} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this person.\n\t *\n\t * @return the primary key of this person\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this person.\n\t *\n\t * @param primaryKey the primary key of this person\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the uuid of this person.\n\t *\n\t * @return the uuid of this person\n\t */\n\t@AutoEscape\n\tpublic String getUuid();\n\n\t/**\n\t * Sets the uuid of this person.\n\t *\n\t * @param uuid the uuid of this person\n\t */\n\tpublic void setUuid(String uuid);\n\n\t/**\n\t * Returns the person ID of this person.\n\t *\n\t * @return the person ID of this person\n\t */\n\tpublic long getPersonId();\n\n\t/**\n\t * Sets the person ID of this person.\n\t *\n\t * @param personId the person ID of this person\n\t */\n\tpublic void setPersonId(long personId);\n\n\t/**\n\t * Returns the name of this person.\n\t *\n\t * @return the name of this person\n\t */\n\t@AutoEscape\n\tpublic String getName();\n\n\t/**\n\t * Sets the name of this person.\n\t *\n\t * @param name the name of this person\n\t */\n\tpublic void setName(String name);\n\n\t/**\n\t * Returns the age of this person.\n\t *\n\t * @return the age of this person\n\t */\n\tpublic int getAge();\n\n\t/**\n\t * Sets the age of this person.\n\t *\n\t * @param age the age of this person\n\t */\n\tpublic void setAge(int age);\n\n\t/**\n\t * Returns the gender of this person.\n\t *\n\t * @return the gender of this person\n\t */\n\t@AutoEscape\n\tpublic String getGender();\n\n\t/**\n\t * Sets the gender of this person.\n\t *\n\t * @param gender the gender of this person\n\t */\n\tpublic void setGender(String gender);\n\n\t/**\n\t * Returns the email ID of this person.\n\t *\n\t * @return the email ID of this person\n\t */\n\t@AutoEscape\n\tpublic String getEmailId();\n\n\t/**\n\t * Sets the email ID of this person.\n\t *\n\t * @param emailId the email ID of this person\n\t */\n\tpublic void setEmailId(String emailId);\n\n\t/**\n\t * Returns the nationality of this person.\n\t *\n\t * @return the nationality of this person\n\t */\n\t@AutoEscape\n\tpublic String getNationality();\n\n\t/**\n\t * Sets the nationality of this person.\n\t *\n\t * @param nationality the nationality of this person\n\t */\n\tpublic void setNationality(String nationality);\n\n\t/**\n\t * Returns the occupation of this person.\n\t *\n\t * @return the occupation of this person\n\t */\n\t@AutoEscape\n\tpublic String getOccupation();\n\n\t/**\n\t * Sets the occupation of this person.\n\t *\n\t * @param occupation the occupation of this person\n\t */\n\tpublic void setOccupation(String occupation);\n\n}", "@Override\n public HangarMessages addConstraintsTypeLongMessage(String property) {\n assertPropertyNotNull(property);\n add(property, new UserMessage(CONSTRAINTS_TypeLong_MESSAGE));\n return this;\n }", "public int getDescriptionType(){\n return localDescriptionType;\n }", "@Override\n\tpublic String getType() {\n\t\treturn \"nominal\";\n\t}", "public int getNewProperty_descriptionType(){\n return localNewProperty_descriptionType;\n }", "@Override\n\tpublic List<DataDictionaryValueEntity> queryInternalDeliveryType() {\n\t\treturn null;\n\t}", "public interface JdlFieldView extends JdlField, JdlCommentView {\n //TODO This validation should be handled in JdlService\n default String getTypeName() {\n JdlFieldEnum type = getType();\n return switch (type) {\n case ENUM -> getEnumEntityName()\n .orElseThrow(() -> new IllegalStateException(\"An enum field must have its enum entity name set\"));\n default -> ((\"UUID\".equals(type.name())) ? type.name() : type.toCamelUpper());\n };\n }\n\n default String constraints() {\n List<String> constraints = new ArrayList<>();\n if (renderRequired()) constraints.add(requiredConstraint());\n if (isUnique()) constraints.add(uniqueConstraint());\n getMin().ifPresent(min -> constraints.add(minConstraint(min)));\n getMax().ifPresent(max -> constraints.add(maxConstraint(max)));\n getPattern().ifPresent(pattern -> constraints.add(patternConstraint(pattern)));\n return (!constraints.isEmpty()) ? \" \".concat(Joiner.on(\" \").join(constraints)) : null;\n }\n\n // TODO do not write required when field is primary key\n default boolean renderRequired() {\n // if (!isPrimaryKey() && isRequired() && ) constraints.add(JdlUtils.validationRequired());\n return isRequired() && !(getName().equals(\"id\") && getType().equals(JdlFieldEnum.UUID));\n }\n\n @NotNull\n default String requiredConstraint() {\n return \"required\";\n }\n\n @NotNull\n default String uniqueConstraint() {\n return \"unique\";\n }\n\n default String minConstraint(int min) {\n return switch (getType()) {\n case STRING -> validationMinLength(min);\n default -> validationMin(min);\n };\n }\n\n default String maxConstraint(int max) {\n return switch (getType()) {\n case STRING -> validationMaxLength(max);\n default -> validationMax(max);\n };\n }\n\n //TODO This validation should be handled in JdlService\n default String patternConstraint(String pattern) {\n return switch (getType()) {\n case STRING -> validationPattern(pattern);\n default -> throw new RuntimeException(\"Only String can have a pattern\");\n };\n }\n\n @NotNull\n default String validationMax(final int max) {\n return \"max(\" + max + \")\";\n }\n\n @NotNull\n default String validationMin(final int min) {\n return \"min(\" + min + \")\";\n }\n\n default String validationMaxLength(final int max) {\n return \"maxlength(\" + max + \")\";\n }\n\n @NotNull\n default String validationMinLength(final int min) {\n return \"minlength(\" + min + \")\";\n }\n\n @NotNull\n default String validationPattern(final String pattern) {\n return \"pattern(/\" + pattern + \"/)\";\n }\n}", "@Override\r\n\tpublic String getType() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getType() {\n\t\treturn null;\r\n\t}", "public void setUWIssueType(entity.UWIssueType value);", "private String getType(){\r\n return type;\r\n }", "@Override\r\n public Class<UserSoftware> getEntityType() {\n return null;\r\n }", "DomainType createDomainType();", "entities.Torrent.Message.Type getType();", "@JsonGetter(\"restrictionType\")\r\n public String getRestrictionType ( ) { \r\n return this.restrictionType;\r\n }", "@Override\n public int characteristics() {\n return ORDERED | NONNULL | IMMUTABLE;\n }", "public String getType() {return type;}", "cb.Careerbuilder.Company.PhoneType getType();", "@Override\n public String getType(){\n return Type;\n }", "public String getPrincipalType(){\n return principalType;\n }", "public interface SimpleRestriction extends SchemaComponent {\n public static final String ENUMERATION_PROPERTY = \"enumerations\";\n public static final String PATTERN_PROPERTY = \"patterns\";\n public static final String MIN_EXCLUSIVE_PROPERTY = \"minExclusives\";\n public static final String MIN_LENGTH_PROPERTY = \"minLengths\";\n public static final String MAX_LENGTH_PROPERTY = \"maxLengths\";\n public static final String FRACTION_DIGITS_PROPERTY = \"fractionDigits\";\n public static final String WHITESPACE_PROPERTY = \"whitespaces\";\n public static final String MAX_INCLUSIVE_PROPERTY = \"maxInclusives\";\n public static final String TOTAL_DIGITS_PROPERTY = \"totalDigits\";\n public static final String LENGTH_PROPERTY = \"lengths\";\n public static final String MIN_INCLUSIVE_PROPERTY = \"minInclusives\";\n public static final String MAX_EXCLUSIVE_PROPERTY = \"maxExclusives\";\n public static final String BASE_PROPERTY = \"base\";\n public static final String INLINETYPE_PROPERTY = \"inlinetype\";\n \n Collection<TotalDigits> getTotalDigits();\n void addTotalDigit(TotalDigits td);\n void removeTotalDigit(TotalDigits td);\n \n Collection<MinExclusive> getMinExclusives();\n void addMinExclusive(MinExclusive me);\n void removeMinExclusive(MinExclusive me);\n \n Collection<MinInclusive> getMinInclusives();\n void addMinInclusive(MinInclusive me);\n void removeMinInclusive(MinInclusive me);\n \n Collection<MinLength> getMinLengths();\n void addMinLength(MinLength ml);\n void removeMinLength(MinLength ml);\n \n Collection<MaxLength> getMaxLengths();\n void addMaxLength(MaxLength ml);\n void removeMaxLength(MaxLength ml);\n \n Collection<Pattern> getPatterns();\n void addPattern(Pattern p);\n void removePattern(Pattern p);\n \n Collection<MaxExclusive> getMaxExclusives();\n void addMaxExclusive(MaxExclusive me);\n void removeMaxExclusive(MaxExclusive me);\n \n Collection<MaxInclusive> getMaxInclusives();\n void addMaxInclusive(MaxInclusive me);\n void removeMaxInclusive(MaxInclusive me);\n \n Collection<Length> getLengths();\n void addLength(Length me);\n void removeLength(Length me);\n \n Collection<Whitespace> getWhitespaces();\n void addWhitespace(Whitespace me);\n void removeWhitespace(Whitespace me);\n \n Collection<FractionDigits> getFractionDigits();\n void addFractionDigits(FractionDigits fd);\n void removeFractionDigits(FractionDigits fd);\n \n Collection<Enumeration> getEnumerations();\n void addEnumeration(Enumeration fd);\n void removeEnumeration(Enumeration fd);\n \n LocalSimpleType getInlineType();\n void setInlineType(LocalSimpleType aSimpleType);\n \n}", "public interface RecipeColumns {\n\n @DataType(INTEGER) @PrimaryKey @AutoIncrement String _ID = \"_id\";\n @DataType(TEXT) @NotNull String COLUMN_RECIPE_NAME = \"recipe_name\";\n @DataType(TEXT) String COLUMN_IMAGE_URL = \"recipe_image_url\";\n @DataType(INTEGER) @NotNull String COLUMN_SERVING_COUNT = \"serving_id\";\n @DataType(INTEGER) @NotNull String COLUMN_MARK_FAVORITE = \"mark_as_favorite\";\n\n}", "PropertyType createPropertyType();", "@Override\n\tpublic String getType() {\n\t\treturn this.description.getType();\n\t}", "public void setDescriptionType(int param){\n \n // setting primitive attribute tracker to true\n localDescriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localDescriptionType=param;\n \n\n }", "@Test\n\tpublic void testNewInvalidNoTargetType() {\n\t\ttry {\n\t\t\tthis.createCollectionProperty(\"<property name=\\\"locales\\\"/>\");\n\t\t\tAssert.fail(\"expected ModelValidationException\");\n\t\t} catch (ModelValidationException e) {\n\t\t\tAssert.assertTrue(e.getMessage().contains(\"no targettype specified\"));\n\t\t}\n\t}", "@JSProperty(\"type\")\n @Nullable\n Type getType();", "@Override\n public String getType() {\n return this.name; \n }", "public void setNewValues_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localNewValues_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewValues_descriptionType=param;\n \n\n }", "public String getResponsible() {\n\t\treturn this.responsible;\n\t}", "com.demo.springprotobuff.Demoproto.Student.PhoneType getType();", "public void setResponsible(String responsible) {\n\t\tthis.responsible = responsible;\n\t}", "@JsonSetter(\"restrictionType\")\r\n public void setRestrictionType (String value) { \r\n this.restrictionType = value;\r\n }", "public Class<Camp> getEntityType() { return Camp.class; }", "@JSProperty\n String getType();", "@NonNull\n @Override\n public String getType() {\n return \"\";\n }", "@ValueMapping(source = \"UNKNOWN\", target = MappingConstants.NULL)\n @ValueMapping(source = \"UNRECOGNIZED\", target = MappingConstants.NULL)\n PhoneDTO.Type fromProtobuf(Customer.Phone.PhoneType type);", "public SequenceType getRequiredType();", "@Override\n\t@Column(name = \"leadTypeDescription\", length = 128, nullable = true)\n\tpublic String getDescription()\n\t{\n\t\treturn super.getDescription();\n\t}", "public abstract Class<BE> getBukkitEntityType();", "com.rpg.framework.database.Protocol.ItemType getType();", "public String getType() {\n\t\tString type = C;\n\t\t// Modify if constrained\n\t\tParameterConstraint constraint = this.constraint;\n\t\tif (constraint != null) type = \"Constrained\" + type;\n\t\treturn type;\n\t}", "public ModelObjectType getType() {\n return type;\n }", "public PacienteModel() {\r\n this.codigo = new SimpleIntegerProperty();\r\n this.nome = new SimpleStringProperty();\r\n this.nascimento = new SimpleStringProperty();\r\n this.endereco = new SimpleStringProperty();\r\n this.telefone = new SimpleStringProperty();\r\n this.cep = new SimpleStringProperty();\r\n this.documento = new SimpleStringProperty();\r\n this.sexo = new SimpleStringProperty();\r\n this.data_cliente = new SimpleStringProperty();\r\n this.tipo = new SimpleStringProperty();\r\n this.email = new SimpleStringProperty();\r\n this.obs = new SimpleStringProperty();\r\n this.status = new SimpleBooleanProperty();\r\n }", "public String getType() { return type; }", "Type.Remote<SomeRemoteType, SomeRemoteThing> key(AttributeType<?> attributeType);", "public String getObjectTypeId();", "interface Remote<\n SomeRemoteType extends Type<SomeRemoteType, SomeRemoteThing>,\n SomeRemoteThing extends Thing<SomeRemoteThing, SomeRemoteType>>\n extends SchemaConcept.Remote<SomeRemoteType>, Type<SomeRemoteType, SomeRemoteThing> {\n\n //------------------------------------- Modifiers ----------------------------------\n\n /**\n * Changes the Label of this Concept to a new one.\n *\n * @param label The new Label.\n * @return The Concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> label(Label label);\n\n /**\n * Sets the Type to be abstract - which prevents it from having any instances.\n *\n * @param isAbstract Specifies if the concept is to be abstract (true) or not (false).\n * @return The concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> isAbstract(Boolean isAbstract);\n\n /**\n * @param role The Role Type which the instances of this Type are allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> plays(Role role);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked in a strictly one-to-one mapping.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> key(AttributeType<?> attributeType);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> has(AttributeType<?> attributeType);\n\n //------------------------------------- Accessors ---------------------------------\n\n /**\n * @return A list of Role Types which instances of this Type can indirectly play.\n */\n Stream<Role.Remote> playing();\n\n /**\n * @return The AttributeTypes which this Type is linked with.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> attributes();\n\n /**\n * @return The AttributeTypes which this Type is linked with as a key.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> keys();\n\n /**\n * @return All the the super-types of this Type\n */\n @Override\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> sups();\n\n /**\n * Get all indirect sub-types of this type.\n * The indirect sub-types are the type itself and all indirect sub-types of direct sub-types.\n *\n * @return All the indirect sub-types of this Type\n */\n @Override\n @CheckReturnValue\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> subs();\n\n /**\n * Get all indirect instances of this type.\n * The indirect instances are the direct instances and all indirect instances of direct sub-types.\n *\n * @return All the indirect instances of this type.\n */\n @CheckReturnValue\n Stream<? extends Thing.Remote<SomeRemoteThing, SomeRemoteType>> instances();\n\n /**\n * Return if the type is set to abstract.\n * By default, types are not abstract.\n *\n * @return returns true if the type is set to be abstract.\n */\n @CheckReturnValue\n Boolean isAbstract();\n\n //------------------------------------- Other ----------------------------------\n\n /**\n * Removes the ability of this Type to play a specific Role\n *\n * @param role The Role which the Things of this Type should no longer be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unplay(Role role);\n\n /**\n * Removes the ability for Things of this Type to have Attributes of type AttributeType\n *\n * @param attributeType the AttributeType which this Type can no longer have\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unhas(AttributeType<?> attributeType);\n\n /**\n * Removes AttributeType as a key to this Type\n *\n * @param attributeType the AttributeType which this Type can no longer have as a key\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unkey(AttributeType<?> attributeType);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type.Remote<SomeRemoteType, SomeRemoteThing> asType() {\n return this;\n }\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n }", "com.google.cloud.tpu.v1.Symptom.SymptomType getSymptomType();", "boolean hasHasRestraintType();", "public String getLongType() { return \"Technology\"; }", "@Override\n\tpublic int getType() {\n\t\treturn 1;\n\t}", "public interface NotMappedCause extends Cause {\n}", "public M csrtTypeNameNull(){if(this.get(\"csrtTypeNameNot\")==null)this.put(\"csrtTypeNameNot\", \"\");this.put(\"csrtTypeName\", null);return this;}", "messages.Basemessage.BaseMessage.Type getType();", "@ApiModelProperty(value = \"A categorization of the relationship (e.g.: migration, substitution, dependency, exclusivity)\")\n public String getType() {\n return type;\n }", "private String resolveAttrType(String aType){\n\t\tif(aType == \"int\" || aType == \"Int\") return \"int\";\n\t\telse if(aType == \"String\") return \"String\";\n\t\telse if(aType == \"univ\") assertMessage(\"TODO: Map univ with Java type\");\n\t\telse if(aType == \"none\") assertMessage(\"TODO: Map none with Java type\");\n\t\telse if(aType.contains(\"seq\")) assertMessage(\"TODO: Map seqInt with Java type\");\n\n\t\treturn aType;\n\t}", "@ProviderType\npublic interface EmployeeModel extends BaseModel<Employee> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a employee model instance should use the {@link Employee} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this employee.\n\t *\n\t * @return the primary key of this employee\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this employee.\n\t *\n\t * @param primaryKey the primary key of this employee\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the uuid of this employee.\n\t *\n\t * @return the uuid of this employee\n\t */\n\t@AutoEscape\n\tpublic String getUuid();\n\n\t/**\n\t * Sets the uuid of this employee.\n\t *\n\t * @param uuid the uuid of this employee\n\t */\n\tpublic void setUuid(String uuid);\n\n\t/**\n\t * Returns the employee ID of this employee.\n\t *\n\t * @return the employee ID of this employee\n\t */\n\tpublic long getEmployeeId();\n\n\t/**\n\t * Sets the employee ID of this employee.\n\t *\n\t * @param employeeId the employee ID of this employee\n\t */\n\tpublic void setEmployeeId(long employeeId);\n\n\t/**\n\t * Returns the first name of this employee.\n\t *\n\t * @return the first name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getFirstName();\n\n\t/**\n\t * Sets the first name of this employee.\n\t *\n\t * @param firstName the first name of this employee\n\t */\n\tpublic void setFirstName(String firstName);\n\n\t/**\n\t * Returns the last name of this employee.\n\t *\n\t * @return the last name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getLastName();\n\n\t/**\n\t * Sets the last name of this employee.\n\t *\n\t * @param lastName the last name of this employee\n\t */\n\tpublic void setLastName(String lastName);\n\n\t/**\n\t * Returns the middle name of this employee.\n\t *\n\t * @return the middle name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getMiddleName();\n\n\t/**\n\t * Sets the middle name of this employee.\n\t *\n\t * @param middleName the middle name of this employee\n\t */\n\tpublic void setMiddleName(String middleName);\n\n\t/**\n\t * Returns the birth date of this employee.\n\t *\n\t * @return the birth date of this employee\n\t */\n\tpublic Date getBirthDate();\n\n\t/**\n\t * Sets the birth date of this employee.\n\t *\n\t * @param birthDate the birth date of this employee\n\t */\n\tpublic void setBirthDate(Date birthDate);\n\n\t/**\n\t * Returns the post ID of this employee.\n\t *\n\t * @return the post ID of this employee\n\t */\n\tpublic long getPostId();\n\n\t/**\n\t * Sets the post ID of this employee.\n\t *\n\t * @param postId the post ID of this employee\n\t */\n\tpublic void setPostId(long postId);\n\n\t/**\n\t * Returns the sex of this employee.\n\t *\n\t * @return the sex of this employee\n\t */\n\tpublic Boolean getSex();\n\n\t/**\n\t * Sets the sex of this employee.\n\t *\n\t * @param sex the sex of this employee\n\t */\n\tpublic void setSex(Boolean sex);\n\n}", "public String getOwnerEntityType()\r\n\t{\r\n\t\treturn ownerEntityType;\r\n\t}", "public String getObjectiveType() {\n return _objectiveType;\n }", "@Override\n public java.lang.String getPersonType() {\n return _entityCustomer.getPersonType();\n }", "public ScGridColumn<AcActionAutoCorrectedLog> newActualTypeColumn()\n {\n return newActualTypeColumn(\"Actual Type\");\n }", "public void setC_POSDocType_ID (int C_POSDocType_ID)\n{\nif (C_POSDocType_ID < 1) throw new IllegalArgumentException (\"C_POSDocType_ID is mandatory.\");\nset_ValueNoCheck (COLUMNNAME_C_POSDocType_ID, Integer.valueOf(C_POSDocType_ID));\n}", "public String getType(){\n return this.type;\n }", "String getTestFieldTypeId();", "default @org.jetbrains.annotations.Nullable java.lang.String getType() {\n return null;\n }", "@NotNull\n @Valid\n @JsonProperty(\"productType\")\n public ProductTypeReference getProductType();", "@ApiModelProperty(value = \"class type of target specification\")\n\n\n public String getType() {\n return type;\n }", "public int constraintType()\n\t{\n\t\treturn _constraintType;\n\t}", "public String getType() {\n return relationshipName;\n }", "protected abstract String getType();", "java.lang.String getField1025();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();" ]
[ "0.53558284", "0.53180027", "0.5267491", "0.52643126", "0.52512616", "0.52148896", "0.51919836", "0.518759", "0.51857847", "0.51516813", "0.51397616", "0.5132329", "0.51136047", "0.5100177", "0.5083202", "0.50534177", "0.503115", "0.5025674", "0.502215", "0.5019059", "0.5006426", "0.4991502", "0.49750906", "0.49528658", "0.49476802", "0.491842", "0.49147254", "0.4897092", "0.48961207", "0.48961207", "0.48913354", "0.488689", "0.48715132", "0.4863909", "0.48555797", "0.48486957", "0.48402405", "0.48369443", "0.48247385", "0.4818643", "0.480578", "0.48028496", "0.47872534", "0.4785962", "0.4782871", "0.47667393", "0.47549433", "0.47533283", "0.4748412", "0.47407797", "0.473986", "0.47317317", "0.47313002", "0.47239727", "0.47229207", "0.4717605", "0.471742", "0.47076857", "0.47044477", "0.4702342", "0.47001138", "0.46973088", "0.46942472", "0.46915677", "0.46824068", "0.4679074", "0.46771404", "0.46680647", "0.46633416", "0.46580458", "0.46549985", "0.4649425", "0.46478102", "0.46459073", "0.4642154", "0.4642059", "0.4637851", "0.4636157", "0.46347275", "0.46321878", "0.46320838", "0.46318486", "0.46308473", "0.4626691", "0.46261936", "0.46254975", "0.46190357", "0.4618396", "0.46147448", "0.46116602", "0.4605991", "0.46051574", "0.4603956", "0.4600927", "0.4600927", "0.4600927", "0.4600927", "0.4600927", "0.4600927", "0.4600927" ]
0.5508352
0
Constraints: Not nullable, Maximum length: 16 Original property name from the Odata EDM: TaxNumber1
public void setTaxNumber1( @Nullable final String taxNumber1) { rememberChangedField("TaxNumber1", this.taxNumber1); this.taxNumber1 = taxNumber1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTaxId();", "public String getTaxId()\n {\n return taxId;\n }", "java.lang.String getField1401();", "public String getLBR_ICMS_TaxBaseType();", "public String getLBR_ICMSST_TaxBaseType();", "public void setLBR_ICMS_TaxBaseType (String LBR_ICMS_TaxBaseType);", "java.lang.String getField1164();", "private Taxon validateTaxon( String taxonName ) throws IllegalArgumentException {\n Taxon taxon = taxonService.findByCommonName( taxonName );\n if ( taxon == null ) {\n throw new IllegalArgumentException( \"No taxon with common name \" + taxonName + \" found\" );\n }\n return taxon;\n }", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "public void setLBR_ICMSST_TaxBaseType (String LBR_ICMSST_TaxBaseType);", "java.lang.String getField1035();", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"The bank account holder's tax ID.\")\n\n public String getTaxId() {\n return taxId;\n }", "@Valid\n @JsonProperty(\"externalTaxRate\")\n public ExternalTaxRateDraft getExternalTaxRate();", "java.lang.String getField1301();", "String getTypeDefn(String shortName, boolean assoc) {\n if (assoc) {\n // PLong<R>\n return propertyType + \"<R>\";\n\n } else {\n // PLong<QCustomer>\n return propertyType + \"<Q\" + shortName + \">\";\n }\n }", "java.lang.String getField1710();", "java.lang.String getField1500();", "public int getLBR_ICMSST_TaxUFDue_ID();", "@Override\t\n\tpublic double getTax() {\n\t\treturn 0;\n\t}", "java.lang.String getField1402();", "@ApiModelProperty(value = \"Amount of tax expressed in the given currency\")\n\n @Valid\n\n public Money getTaxAmount() {\n return taxAmount;\n }", "java.lang.String getField1406();", "public ISalesTax getTaxObject();", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "java.lang.String getField1489();", "java.lang.String getField1125();", "@Valid\n @JsonProperty(\"taxCategory\")\n public TaxCategoryReference getTaxCategory();", "java.lang.String getField1824();", "@Test\n public void testClaimFedTaxNb() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setFedTaxNb,\n RdaFissClaim::getFedTaxNumber,\n RdaFissClaim.Fields.fedTaxNumber,\n 10);\n }", "java.lang.String getField1599();", "java.lang.String getField1499();", "@Override\n public java.lang.Object getProperty(int propertyIndex) {\n if(propertyIndex==0)\n {\n return this.FormOfAddressCode!=null?this.FormOfAddressCode.getSimpleValue():null;\n }\n if(propertyIndex==1)\n {\n return this.FormOfAddressName!=null?this.FormOfAddressName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==2)\n {\n return this.GivenName!=null?this.GivenName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==3)\n {\n return this.MiddleName!=null?this.MiddleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==4)\n {\n return this.FamilyName!=null?this.FamilyName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==5)\n {\n return this.AdditionalFamilyName!=null?this.AdditionalFamilyName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==6)\n {\n return this.BirthName!=null?this.BirthName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==7)\n {\n return this.NickName!=null?this.NickName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==8)\n {\n return this.InitialsName!=null?this.InitialsName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==9)\n {\n return this.AcademicTitleCode!=null?this.AcademicTitleCode.getSimpleValue():null;\n }\n if(propertyIndex==10)\n {\n return this.AcademicTitleName!=null?this.AcademicTitleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==11)\n {\n return this.AdditionalAcademicTitleCode!=null?this.AdditionalAcademicTitleCode.getSimpleValue():null;\n }\n if(propertyIndex==12)\n {\n return this.AdditionalAcademicTitleName!=null?this.AdditionalAcademicTitleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==13)\n {\n return this.NamePrefixCode!=null?this.NamePrefixCode.getSimpleValue():null;\n }\n if(propertyIndex==14)\n {\n return this.NamePrefixName!=null?this.NamePrefixName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==15)\n {\n return this.AdditionalNamePrefixCode!=null?this.AdditionalNamePrefixCode.getSimpleValue():null;\n }\n if(propertyIndex==16)\n {\n return this.AdditionalNamePrefixName!=null?this.AdditionalNamePrefixName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==17)\n {\n return this.NameSupplementCode!=null?this.NameSupplementCode.getSimpleValue():null;\n }\n if(propertyIndex==18)\n {\n return this.NameSupplementName!=null?this.NameSupplementName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==19)\n {\n return this.DeviatingFullName!=null?this.DeviatingFullName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==20)\n {\n return this.NameFormatCountryCode!=null?this.NameFormatCountryCode:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==21)\n {\n return this.NameFormatCode!=null?this.NameFormatCode.getSimpleValue():null;\n }\n return null;\n }", "java.lang.String getField1549();", "java.lang.String getField1430();", "java.lang.String getField1362();", "java.lang.String getField1899();", "@Override\n\tpublic double getTax() {\n\t\treturn 0.04;\n\t}", "java.lang.String getField1530();", "public String toString()\r\n\t{\r\n\t\tStringBuilder sb = new StringBuilder(\"Tax=(\");\r\n\t\tsb.append(m_name);\r\n\t\tsb.append(\" Amt=\").append(m_amount);\r\n\t\tsb.append(\")\");\r\n\t\treturn sb.toString();\r\n\t}", "java.lang.String getField1450();", "java.lang.String getField1449();", "java.lang.String getField1475();", "java.lang.String getField1799();", "@ApiModelProperty(value = \"Total amount of TAX paid(or should be paid)\")\n @JsonProperty(\"tax\")\n public String getTax() {\n return tax;\n }", "x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType xgetProductType();", "java.lang.String getField1598();", "public String getLBR_ICMS_TaxStatusTN();", "java.lang.String getField1830();", "java.lang.String getField1231();", "java.lang.String getField1425();", "public void setTaxAmount(MMDecimal taxAmount) {\r\n this.taxAmount = taxAmount;\r\n }", "java.lang.String getField1400();", "public void setTaxAmount(double _taxAmount){\n\t\ttaxAmount = _taxAmount;\n\t}", "java.lang.String getField1048();", "java.lang.String getField1399();", "java.lang.String getField1552();", "protected abstract String getAddressPropertyName();", "java.lang.String getField1040();", "public double getTax(){\n\n return this.tax;\n }", "java.lang.String getField1850();", "java.lang.String getField1531();", "java.lang.String getField1462();", "java.lang.String getField1540();", "java.lang.String getField1414();", "java.lang.String getField1075();", "java.lang.String getField1700();", "java.lang.String getField1465();", "java.lang.String getField1551();", "java.lang.String getField1537();", "public void setLBR_ICMS_TaxStatusTN (String LBR_ICMS_TaxStatusTN);", "java.lang.String getField1600();", "java.lang.String getField1498();", "java.lang.String getField1098();", "java.lang.String getField1495();", "java.lang.String getField1352();", "java.lang.String getField1575();", "java.lang.String getField1049();", "java.lang.String getField1452();", "java.lang.String getField1230();", "java.lang.String getField1541();", "java.lang.String getField1437();", "java.lang.String getField1521();", "java.lang.String getField1702();", "java.lang.String getField1431();", "java.lang.String getField1237();", "java.lang.String getField1497();", "java.lang.String getField1535();", "public void setLBR_ICMSST_TaxUFDue_ID (int LBR_ICMSST_TaxUFDue_ID);", "java.lang.String getField1646();", "java.lang.String getField1538();", "java.lang.String getField1078();", "java.lang.String getField1221();", "public String getLBR_ICMS_TaxStatusSN();", "java.lang.String getField1849();", "java.lang.String getField1030();", "java.lang.String getField1021();", "java.lang.String getField1349();", "java.lang.String getField1610();", "java.lang.String getField1200();" ]
[ "0.62304157", "0.591709", "0.5749115", "0.5717263", "0.56529117", "0.56115764", "0.5580915", "0.5512056", "0.551169", "0.55034584", "0.54569525", "0.5442516", "0.54354894", "0.53970027", "0.5385615", "0.5383043", "0.5364976", "0.53636855", "0.53559524", "0.5337437", "0.5328052", "0.5326522", "0.53257656", "0.53207517", "0.53109246", "0.52979916", "0.5285587", "0.52765083", "0.5275453", "0.5267243", "0.52667385", "0.5265154", "0.5264545", "0.5263866", "0.5263155", "0.5262243", "0.52621174", "0.52615553", "0.5257294", "0.5253735", "0.5245277", "0.5237259", "0.5237022", "0.5234147", "0.52288836", "0.52284044", "0.52259344", "0.52169544", "0.52163017", "0.5215984", "0.5214444", "0.52143145", "0.52112675", "0.52107745", "0.5209373", "0.52093583", "0.52083075", "0.5208021", "0.52077866", "0.52053016", "0.5200405", "0.5200209", "0.5196473", "0.519059", "0.5190572", "0.5190121", "0.51897687", "0.5185492", "0.51844686", "0.518371", "0.5183444", "0.51804477", "0.5179318", "0.5177001", "0.51765186", "0.5176425", "0.51755565", "0.51746863", "0.51707476", "0.51705116", "0.5169674", "0.5168185", "0.51681453", "0.5167258", "0.5165881", "0.51648813", "0.5162931", "0.51615816", "0.5161396", "0.516083", "0.5160819", "0.5160707", "0.51585925", "0.51565355", "0.5156317", "0.515388", "0.5153851", "0.51518154", "0.51515836", "0.5150218" ]
0.5629681
5
Constraints: Not nullable, Maximum length: 11 Original property name from the Odata EDM: TaxNumber2
public void setTaxNumber2( @Nullable final String taxNumber2) { rememberChangedField("TaxNumber2", this.taxNumber2); this.taxNumber2 = taxNumber2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTaxId();", "public String getTaxId()\n {\n return taxId;\n }", "java.lang.String getField1401();", "public String getLBR_ICMS_TaxBaseType();", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "public String getLBR_ICMSST_TaxBaseType();", "@Valid\n @JsonProperty(\"externalTaxRate\")\n public ExternalTaxRateDraft getExternalTaxRate();", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "public void setLBR_ICMS_TaxBaseType (String LBR_ICMS_TaxBaseType);", "public void setTaxNumber1(\n @Nullable\n final String taxNumber1) {\n rememberChangedField(\"TaxNumber1\", this.taxNumber1);\n this.taxNumber1 = taxNumber1;\n }", "java.lang.String getField1164();", "java.lang.String getField1035();", "private Taxon validateTaxon( String taxonName ) throws IllegalArgumentException {\n Taxon taxon = taxonService.findByCommonName( taxonName );\n if ( taxon == null ) {\n throw new IllegalArgumentException( \"No taxon with common name \" + taxonName + \" found\" );\n }\n return taxon;\n }", "public void setLBR_ICMSST_TaxBaseType (String LBR_ICMSST_TaxBaseType);", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "public ISalesTax getTaxObject();", "public int getLBR_ICMSST_TaxUFDue_ID();", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"The bank account holder's tax ID.\")\n\n public String getTaxId() {\n return taxId;\n }", "java.lang.String getField1301();", "java.lang.String getField1402();", "java.lang.String getField1710();", "java.lang.String getField1500();", "@ApiModelProperty(value = \"Amount of tax expressed in the given currency\")\n\n @Valid\n\n public Money getTaxAmount() {\n return taxAmount;\n }", "java.lang.String getField1406();", "java.lang.String getField1430();", "java.lang.String getField1231();", "java.lang.String getField1530();", "@Valid\n @JsonProperty(\"taxCategory\")\n public TaxCategoryReference getTaxCategory();", "@Override\t\n\tpublic double getTax() {\n\t\treturn 0;\n\t}", "java.lang.String getField1899();", "java.lang.String getField1830();", "String getTypeDefn(String shortName, boolean assoc) {\n if (assoc) {\n // PLong<R>\n return propertyType + \"<R>\";\n\n } else {\n // PLong<QCustomer>\n return propertyType + \"<Q\" + shortName + \">\";\n }\n }", "java.lang.String getField1489();", "java.lang.String getField1499();", "java.lang.String getField1599();", "x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType xgetProductType();", "java.lang.String getField1549();", "java.lang.String getField1552();", "java.lang.String getField1824();", "public String getLBR_ICMS_TaxStatusTN();", "java.lang.String getField1048();", "java.lang.String getField1230();", "java.lang.String getField1531();", "java.lang.String getField1450();", "java.lang.String getField1449();", "java.lang.String getField1221();", "java.lang.String getField1030();", "java.lang.String getField1462();", "java.lang.String getField1021();", "@Test\n public void testClaimFedTaxNb() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setFedTaxNb,\n RdaFissClaim::getFedTaxNumber,\n RdaFissClaim.Fields.fedTaxNumber,\n 10);\n }", "java.lang.String getField1425();", "java.lang.String getField1125();", "java.lang.String getField1362();", "java.lang.String getField1414();", "public String getLBR_ICMS_TaxStatusSN();", "java.lang.String getField1598();", "java.lang.String getField1452();", "java.lang.String getField1431();", "java.lang.String getField1040();", "java.lang.String getField1400();", "public double getTax(){\n\n return this.tax;\n }", "java.lang.String getField1799();", "java.lang.String getField1399();", "java.lang.String getField1352();", "java.lang.String getField1521();", "java.lang.String getField1850();", "@Override\n\tpublic double getTax() {\n\t\treturn 0.04;\n\t}", "public void setLBR_ICMS_TaxStatusTN (String LBR_ICMS_TaxStatusTN);", "java.lang.String getField1098();", "public void setLBR_ICMSST_TaxUFDue_ID (int LBR_ICMSST_TaxUFDue_ID);", "java.lang.String getField1078();", "java.lang.String getField1475();", "java.lang.String getField1052();", "java.lang.String getField1049();", "java.lang.String getField1421();", "protected abstract String getAddressPropertyName();", "java.lang.String getField1700();", "java.lang.String getField1551();", "java.lang.String getField1099();", "java.lang.String getField1498();", "java.lang.String getField1540();", "java.lang.String getField1702();", "java.lang.String getField1541();", "java.lang.String getField1075();", "public String toString()\r\n\t{\r\n\t\tStringBuilder sb = new StringBuilder(\"Tax=(\");\r\n\t\tsb.append(m_name);\r\n\t\tsb.append(\" Amt=\").append(m_amount);\r\n\t\tsb.append(\")\");\r\n\t\treturn sb.toString();\r\n\t}", "java.lang.String getField1833();", "java.lang.String getField1852();", "java.lang.String getField1849();", "public String getLBR_ICMS_TaxReliefType();", "java.lang.String getField1898();", "java.lang.String getField1418();", "java.lang.String getField1999();", "java.lang.String getField1465();", "java.lang.String getField1240();", "java.lang.String getField1200();", "java.lang.String getField1063();", "java.lang.String getField1537();", "public Double getTax();", "java.lang.String getField1562();", "java.lang.String getField1518();" ]
[ "0.6058646", "0.5750094", "0.5702564", "0.56696403", "0.562579", "0.56107736", "0.5562962", "0.55619824", "0.55374646", "0.55370945", "0.5499549", "0.54930335", "0.53941697", "0.53904444", "0.5387843", "0.53718424", "0.53509855", "0.53461415", "0.5342223", "0.53407913", "0.53352416", "0.5315468", "0.53141606", "0.5298357", "0.52815056", "0.5279624", "0.52757233", "0.5274283", "0.5265207", "0.5258871", "0.5256835", "0.5256272", "0.5247163", "0.5243864", "0.52367526", "0.5228001", "0.52258515", "0.52232903", "0.5220124", "0.52193105", "0.5216181", "0.5214131", "0.5211013", "0.5205586", "0.5203107", "0.5202762", "0.5199885", "0.5196353", "0.5194369", "0.51931643", "0.5190126", "0.51896876", "0.51873356", "0.5186992", "0.51856", "0.51850545", "0.51849884", "0.51849574", "0.5183323", "0.51822424", "0.51820403", "0.5181352", "0.5178036", "0.5175172", "0.5174576", "0.5174255", "0.51727176", "0.5170474", "0.51690096", "0.51676005", "0.51652527", "0.5165013", "0.5163733", "0.5161539", "0.51605225", "0.5158423", "0.51556194", "0.51548284", "0.5151871", "0.5151248", "0.51466215", "0.51454043", "0.51433545", "0.5143324", "0.51430655", "0.5140763", "0.5140376", "0.5140149", "0.5139918", "0.51372266", "0.5137041", "0.5136431", "0.51354456", "0.5134913", "0.51348424", "0.5132711", "0.5131123", "0.513112", "0.5130353", "0.5130067" ]
0.5374442
15
Constraints: Not nullable, Maximum length: 18 Original property name from the Odata EDM: TaxNumber3
public void setTaxNumber3( @Nullable final String taxNumber3) { rememberChangedField("TaxNumber3", this.taxNumber3); this.taxNumber3 = taxNumber3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTaxId();", "public String getTaxId()\n {\n return taxId;\n }", "java.lang.String getField1401();", "public String getLBR_ICMS_TaxBaseType();", "public String getLBR_ICMSST_TaxBaseType();", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "public void setLBR_ICMS_TaxBaseType (String LBR_ICMS_TaxBaseType);", "@Valid\n @JsonProperty(\"externalTaxRate\")\n public ExternalTaxRateDraft getExternalTaxRate();", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "java.lang.String getField1035();", "@Valid\n @JsonProperty(\"taxCategory\")\n public TaxCategoryReference getTaxCategory();", "java.lang.String getField1164();", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "public void setLBR_ICMSST_TaxBaseType (String LBR_ICMSST_TaxBaseType);", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"The bank account holder's tax ID.\")\n\n public String getTaxId() {\n return taxId;\n }", "@ApiModelProperty(value = \"Amount of tax expressed in the given currency\")\n\n @Valid\n\n public Money getTaxAmount() {\n return taxAmount;\n }", "java.lang.String getField1406();", "java.lang.String getField1830();", "public ISalesTax getTaxObject();", "public int getLBR_ICMSST_TaxUFDue_ID();", "java.lang.String getField1500();", "java.lang.String getField1530();", "java.lang.String getField1710();", "java.lang.String getField1430();", "java.lang.String getField1301();", "java.lang.String getField1899();", "@Override\t\n\tpublic double getTax() {\n\t\treturn 0;\n\t}", "java.lang.String getField1402();", "java.lang.String getField1489();", "private Taxon validateTaxon( String taxonName ) throws IllegalArgumentException {\n Taxon taxon = taxonService.findByCommonName( taxonName );\n if ( taxon == null ) {\n throw new IllegalArgumentException( \"No taxon with common name \" + taxonName + \" found\" );\n }\n return taxon;\n }", "java.lang.String getField1599();", "java.lang.String getField1549();", "java.lang.String getField1850();", "public String getLBR_ICMS_TaxStatusTN();", "java.lang.String getField1499();", "java.lang.String getField1833();", "@Override\n\tpublic double getTax() {\n\t\treturn 0.04;\n\t}", "public void setLBR_ICMS_TaxStatusTN (String LBR_ICMS_TaxStatusTN);", "java.lang.String getField1450();", "java.lang.String getField1799();", "java.lang.String getField1531();", "java.lang.String getField1449();", "java.lang.String getField1048();", "java.lang.String getField1475();", "java.lang.String getField1030();", "@ApiModelProperty(value = \"Total amount of TAX paid(or should be paid)\")\n @JsonProperty(\"tax\")\n public String getTax() {\n return tax;\n }", "java.lang.String getField1230();", "java.lang.String getField1399();", "java.lang.String getField1598();", "java.lang.String getField1231();", "java.lang.String getField1362();", "java.lang.String getField1730();", "java.lang.String getField1849();", "java.lang.String getField1040();", "java.lang.String getField1537();", "String getTypeDefn(String shortName, boolean assoc) {\n if (assoc) {\n // PLong<R>\n return propertyType + \"<R>\";\n\n } else {\n // PLong<QCustomer>\n return propertyType + \"<Q\" + shortName + \">\";\n }\n }", "java.lang.String getField1425();", "java.lang.String getField1843();", "java.lang.String getField1400();", "java.lang.String getField1535();", "protected abstract String getAddressPropertyName();", "java.lang.String getField1075();", "java.lang.String getField1824();", "java.lang.String getField1538();", "java.lang.String getField1431();", "x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType xgetProductType();", "java.lang.String getField1898();", "@Override\n public java.lang.Object getProperty(int propertyIndex) {\n if(propertyIndex==0)\n {\n return this.FormOfAddressCode!=null?this.FormOfAddressCode.getSimpleValue():null;\n }\n if(propertyIndex==1)\n {\n return this.FormOfAddressName!=null?this.FormOfAddressName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==2)\n {\n return this.GivenName!=null?this.GivenName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==3)\n {\n return this.MiddleName!=null?this.MiddleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==4)\n {\n return this.FamilyName!=null?this.FamilyName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==5)\n {\n return this.AdditionalFamilyName!=null?this.AdditionalFamilyName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==6)\n {\n return this.BirthName!=null?this.BirthName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==7)\n {\n return this.NickName!=null?this.NickName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==8)\n {\n return this.InitialsName!=null?this.InitialsName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==9)\n {\n return this.AcademicTitleCode!=null?this.AcademicTitleCode.getSimpleValue():null;\n }\n if(propertyIndex==10)\n {\n return this.AcademicTitleName!=null?this.AcademicTitleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==11)\n {\n return this.AdditionalAcademicTitleCode!=null?this.AdditionalAcademicTitleCode.getSimpleValue():null;\n }\n if(propertyIndex==12)\n {\n return this.AdditionalAcademicTitleName!=null?this.AdditionalAcademicTitleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==13)\n {\n return this.NamePrefixCode!=null?this.NamePrefixCode.getSimpleValue():null;\n }\n if(propertyIndex==14)\n {\n return this.NamePrefixName!=null?this.NamePrefixName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==15)\n {\n return this.AdditionalNamePrefixCode!=null?this.AdditionalNamePrefixCode.getSimpleValue():null;\n }\n if(propertyIndex==16)\n {\n return this.AdditionalNamePrefixName!=null?this.AdditionalNamePrefixName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==17)\n {\n return this.NameSupplementCode!=null?this.NameSupplementCode.getSimpleValue():null;\n }\n if(propertyIndex==18)\n {\n return this.NameSupplementName!=null?this.NameSupplementName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==19)\n {\n return this.DeviatingFullName!=null?this.DeviatingFullName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==20)\n {\n return this.NameFormatCountryCode!=null?this.NameFormatCountryCode:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==21)\n {\n return this.NameFormatCode!=null?this.NameFormatCode.getSimpleValue():null;\n }\n return null;\n }", "java.lang.String getField1540();", "public void setLBR_ICMSST_TaxUFDue_ID (int LBR_ICMSST_TaxUFDue_ID);", "java.lang.String getField1418();", "java.lang.String getField1702();", "java.lang.String getField1552();", "java.lang.String getField1462();", "java.lang.String getField1518();", "java.lang.String getField1437();", "java.lang.String getField1999();", "public void setTaxNumber1(\n @Nullable\n final String taxNumber1) {\n rememberChangedField(\"TaxNumber1\", this.taxNumber1);\n this.taxNumber1 = taxNumber1;\n }", "java.lang.String getField1465();", "java.lang.String getField1541();", "java.lang.String getField1831();", "java.lang.String getField1049();", "java.lang.String getField1575();", "java.lang.String getField1700();", "public String getLBR_ICMS_TaxReliefType();", "java.lang.String getField1078();", "java.lang.String getField1495();", "java.lang.String getField1318();", "java.lang.String getField1063();", "java.lang.String getField1551();", "java.lang.String getField1835();", "public String getJP_OrgTrx_Value();", "public String toString()\r\n\t{\r\n\t\tStringBuilder sb = new StringBuilder(\"Tax=(\");\r\n\t\tsb.append(m_name);\r\n\t\tsb.append(\" Amt=\").append(m_amount);\r\n\t\tsb.append(\")\");\r\n\t\treturn sb.toString();\r\n\t}", "java.lang.String getField1498();", "public double getTax(){\n\n return this.tax;\n }", "java.lang.String getField1810();", "java.lang.String getField1349();", "java.lang.String getField1098();", "java.lang.String getField1237();", "java.lang.String getField1352();" ]
[ "0.6092807", "0.58431774", "0.5777377", "0.5741914", "0.56644046", "0.5649561", "0.56274295", "0.5611793", "0.5611147", "0.5521454", "0.5495052", "0.5488515", "0.54628843", "0.5460523", "0.5443293", "0.5422506", "0.5408812", "0.5405643", "0.5404599", "0.5400603", "0.53918153", "0.5389718", "0.53801197", "0.5376746", "0.5376244", "0.5374686", "0.53697366", "0.5364717", "0.5338551", "0.5330353", "0.5319254", "0.53183764", "0.5312047", "0.5306858", "0.53048927", "0.5297768", "0.5294326", "0.5292927", "0.52924705", "0.5288372", "0.5281833", "0.52780145", "0.52748674", "0.5274759", "0.52731216", "0.5272136", "0.5268368", "0.52670956", "0.52648413", "0.52646244", "0.5260297", "0.5260273", "0.52569133", "0.52563065", "0.525336", "0.5251893", "0.5249187", "0.52483976", "0.52469486", "0.5243465", "0.5242448", "0.52410966", "0.5240558", "0.5240362", "0.5240073", "0.5239679", "0.5238058", "0.5237658", "0.5237471", "0.52367735", "0.5235327", "0.52339613", "0.52330506", "0.52328044", "0.5230843", "0.52291405", "0.5226656", "0.52257365", "0.5225322", "0.5224344", "0.52240944", "0.5222814", "0.52215326", "0.52191776", "0.5218484", "0.52177584", "0.52159345", "0.52153224", "0.52153206", "0.5214736", "0.5212026", "0.5211412", "0.52112186", "0.52106804", "0.52089155", "0.52087474", "0.52085066", "0.52061546", "0.5205039", "0.52030677" ]
0.5356418
28
Constraints: Not nullable, Maximum length: 18 Original property name from the Odata EDM: TaxNumber4
public void setTaxNumber4( @Nullable final String taxNumber4) { rememberChangedField("TaxNumber4", this.taxNumber4); this.taxNumber4 = taxNumber4; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTaxId();", "public String getTaxId()\n {\n return taxId;\n }", "java.lang.String getField1401();", "public String getLBR_ICMS_TaxBaseType();", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "public String getLBR_ICMSST_TaxBaseType();", "public void setLBR_ICMS_TaxBaseType (String LBR_ICMS_TaxBaseType);", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "java.lang.String getField1035();", "java.lang.String getField1164();", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "@Valid\n @JsonProperty(\"externalTaxRate\")\n public ExternalTaxRateDraft getExternalTaxRate();", "java.lang.String getField1406();", "java.lang.String getField1402();", "java.lang.String getField1500();", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"The bank account holder's tax ID.\")\n\n public String getTaxId() {\n return taxId;\n }", "java.lang.String getField1710();", "java.lang.String getField1301();", "public void setLBR_ICMSST_TaxBaseType (String LBR_ICMSST_TaxBaseType);", "java.lang.String getField1899();", "java.lang.String getField1430();", "java.lang.String getField1830();", "public int getLBR_ICMSST_TaxUFDue_ID();", "java.lang.String getField1489();", "public ISalesTax getTaxObject();", "@Override\t\n\tpublic double getTax() {\n\t\treturn 0;\n\t}", "java.lang.String getField1530();", "@Override\n\tpublic double getTax() {\n\t\treturn 0.04;\n\t}", "java.lang.String getField1450();", "java.lang.String getField1499();", "java.lang.String getField1850();", "java.lang.String getField1549();", "java.lang.String getField1599();", "java.lang.String getField1449();", "java.lang.String getField1475();", "private Taxon validateTaxon( String taxonName ) throws IllegalArgumentException {\n Taxon taxon = taxonService.findByCommonName( taxonName );\n if ( taxon == null ) {\n throw new IllegalArgumentException( \"No taxon with common name \" + taxonName + \" found\" );\n }\n return taxon;\n }", "java.lang.String getField1425();", "java.lang.String getField1400();", "java.lang.String getField1040();", "java.lang.String getField1799();", "java.lang.String getField1540();", "java.lang.String getField1598();", "java.lang.String getField1418();", "java.lang.String getField1048();", "java.lang.String getField1362();", "x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType xgetProductType();", "java.lang.String getField1399();", "java.lang.String getField1824();", "@Valid\n @JsonProperty(\"taxCategory\")\n public TaxCategoryReference getTaxCategory();", "java.lang.String getField1849();", "java.lang.String getField1462();", "java.lang.String getField1552();", "@ApiModelProperty(value = \"Amount of tax expressed in the given currency\")\n\n @Valid\n\n public Money getTaxAmount() {\n return taxAmount;\n }", "java.lang.String getField1495();", "java.lang.String getField1465();", "java.lang.String getField1531();", "java.lang.String getField1898();", "java.lang.String getField1431();", "java.lang.String getField1498();", "java.lang.String getField1518();", "java.lang.String getField1537();", "java.lang.String getField1437();", "java.lang.String getField1452();", "java.lang.String getField1833();", "java.lang.String getField1075();", "java.lang.String getField1231();", "String getTypeDefn(String shortName, boolean assoc) {\n if (assoc) {\n // PLong<R>\n return propertyType + \"<R>\";\n\n } else {\n // PLong<QCustomer>\n return propertyType + \"<Q\" + shortName + \">\";\n }\n }", "java.lang.String getField1535();", "java.lang.String getField1541();", "java.lang.String getField1230();", "java.lang.String getField1078();", "java.lang.String getField1240();", "java.lang.String getField1600();", "java.lang.String getField1538();", "java.lang.String getField1472();", "java.lang.String getField1030();", "java.lang.String getField1810();", "java.lang.String getField1840();", "java.lang.String getField1352();", "java.lang.String getField1318();", "java.lang.String getField1049();", "@Override\n public java.lang.Object getProperty(int propertyIndex) {\n if(propertyIndex==0)\n {\n return this.FormOfAddressCode!=null?this.FormOfAddressCode.getSimpleValue():null;\n }\n if(propertyIndex==1)\n {\n return this.FormOfAddressName!=null?this.FormOfAddressName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==2)\n {\n return this.GivenName!=null?this.GivenName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==3)\n {\n return this.MiddleName!=null?this.MiddleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==4)\n {\n return this.FamilyName!=null?this.FamilyName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==5)\n {\n return this.AdditionalFamilyName!=null?this.AdditionalFamilyName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==6)\n {\n return this.BirthName!=null?this.BirthName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==7)\n {\n return this.NickName!=null?this.NickName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==8)\n {\n return this.InitialsName!=null?this.InitialsName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==9)\n {\n return this.AcademicTitleCode!=null?this.AcademicTitleCode.getSimpleValue():null;\n }\n if(propertyIndex==10)\n {\n return this.AcademicTitleName!=null?this.AcademicTitleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==11)\n {\n return this.AdditionalAcademicTitleCode!=null?this.AdditionalAcademicTitleCode.getSimpleValue():null;\n }\n if(propertyIndex==12)\n {\n return this.AdditionalAcademicTitleName!=null?this.AdditionalAcademicTitleName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==13)\n {\n return this.NamePrefixCode!=null?this.NamePrefixCode.getSimpleValue():null;\n }\n if(propertyIndex==14)\n {\n return this.NamePrefixName!=null?this.NamePrefixName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==15)\n {\n return this.AdditionalNamePrefixCode!=null?this.AdditionalNamePrefixCode.getSimpleValue():null;\n }\n if(propertyIndex==16)\n {\n return this.AdditionalNamePrefixName!=null?this.AdditionalNamePrefixName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==17)\n {\n return this.NameSupplementCode!=null?this.NameSupplementCode.getSimpleValue():null;\n }\n if(propertyIndex==18)\n {\n return this.NameSupplementName!=null?this.NameSupplementName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==19)\n {\n return this.DeviatingFullName!=null?this.DeviatingFullName:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==20)\n {\n return this.NameFormatCountryCode!=null?this.NameFormatCountryCode:SoapPrimitive.NullSkip;\n }\n if(propertyIndex==21)\n {\n return this.NameFormatCode!=null?this.NameFormatCode.getSimpleValue():null;\n }\n return null;\n }", "java.lang.String getField1575();", "java.lang.String getField1646();", "java.lang.String getField1551();", "java.lang.String getField1098();", "java.lang.String getField1700();", "java.lang.String getField1730();", "java.lang.String getField1004();", "java.lang.String getField1999();", "java.lang.String getField1815();", "java.lang.String getField1372();", "java.lang.String getField1063();", "java.lang.String getField1497();", "java.lang.String getField1845();", "java.lang.String getField1421();", "java.lang.String getField1435();", "java.lang.String getField1349();", "java.lang.String getField1835();", "java.lang.String getField1852();", "java.lang.String getField1831();" ]
[ "0.6222838", "0.59692717", "0.5893149", "0.5801695", "0.576863", "0.5725376", "0.56552076", "0.5638035", "0.5637936", "0.5630404", "0.5590549", "0.55824494", "0.5541343", "0.55201036", "0.5518943", "0.55113375", "0.550449", "0.5498354", "0.54948294", "0.5488077", "0.54857284", "0.5479087", "0.5478099", "0.5474419", "0.54682636", "0.5466118", "0.5455448", "0.54492074", "0.54492074", "0.5447663", "0.5441597", "0.543258", "0.5428967", "0.54182494", "0.54097116", "0.5402272", "0.5400802", "0.5400188", "0.5397029", "0.5396004", "0.5393967", "0.5389746", "0.53874075", "0.5385933", "0.5384616", "0.5383678", "0.5377475", "0.53773546", "0.5376514", "0.5372632", "0.53725487", "0.53719383", "0.5371179", "0.53704077", "0.53693944", "0.536815", "0.53671885", "0.53653425", "0.53636456", "0.5362062", "0.5360731", "0.53591496", "0.5357581", "0.5357008", "0.53563386", "0.535442", "0.5351408", "0.5350906", "0.5349225", "0.5347991", "0.53470594", "0.53464293", "0.53458154", "0.53437394", "0.53436357", "0.5342861", "0.53425753", "0.5340149", "0.5338178", "0.53370285", "0.5336952", "0.53342897", "0.5333456", "0.5331597", "0.53306323", "0.5330536", "0.53304154", "0.5330105", "0.5329397", "0.53290075", "0.5328859", "0.5328746", "0.5328332", "0.53262967", "0.53262115", "0.5324594", "0.5324163", "0.5322742", "0.5322554", "0.53212523", "0.53207284" ]
0.0
-1
Constraints: Not nullable, Maximum length: 60 Original property name from the Odata EDM: TaxNumber5
public void setTaxNumber5( @Nullable final String taxNumber5) { rememberChangedField("TaxNumber5", this.taxNumber5); this.taxNumber5 = taxNumber5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTaxId();", "public String getTaxId()\n {\n return taxId;\n }", "java.lang.String getField1401();", "public String getLBR_ICMS_TaxBaseType();", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "public void setLBR_ICMS_TaxBaseType (String LBR_ICMS_TaxBaseType);", "public String getLBR_ICMSST_TaxBaseType();", "java.lang.String getField1035();", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "java.lang.String getField1164();", "java.lang.String getField1500();", "public void setLBR_ICMSST_TaxBaseType (String LBR_ICMSST_TaxBaseType);", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"The bank account holder's tax ID.\")\n\n public String getTaxId() {\n return taxId;\n }", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "java.lang.String getField1530();", "@Valid\n @JsonProperty(\"externalTaxRate\")\n public ExternalTaxRateDraft getExternalTaxRate();", "@ApiModelProperty(value = \"Amount of tax expressed in the given currency\")\n\n @Valid\n\n public Money getTaxAmount() {\n return taxAmount;\n }", "java.lang.String getField1430();", "java.lang.String getField1710();", "java.lang.String getField1450();", "java.lang.String getField1406();", "java.lang.String getField1301();", "java.lang.String getField1850();", "java.lang.String getField1830();", "java.lang.String getField1824();", "java.lang.String getField1599();", "java.lang.String getField1048();", "java.lang.String getField1899();", "java.lang.String getField1489();", "java.lang.String getField1075();", "java.lang.String getField1475();", "java.lang.String getField1549();", "java.lang.String getField1499();", "java.lang.String getField1030();", "java.lang.String getField1540();", "private Taxon validateTaxon( String taxonName ) throws IllegalArgumentException {\n Taxon taxon = taxonService.findByCommonName( taxonName );\n if ( taxon == null ) {\n throw new IllegalArgumentException( \"No taxon with common name \" + taxonName + \" found\" );\n }\n return taxon;\n }", "java.lang.String getField1550();", "java.lang.String getField1040();", "java.lang.String getField1425();", "public int getLBR_ICMSST_TaxUFDue_ID();", "java.lang.String getField1402();", "java.lang.String getField1799();", "java.lang.String getField1575();", "java.lang.String getField1125();", "java.lang.String getField1598();", "java.lang.String getField1230();", "java.lang.String getField1449();", "@Override\t\n\tpublic double getTax() {\n\t\treturn 0;\n\t}", "java.lang.String getField1400();", "java.lang.String getField1535();", "@Test\n public void testClaimFedTaxNb() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setFedTaxNb,\n RdaFissClaim::getFedTaxNumber,\n RdaFissClaim.Fields.fedTaxNumber,\n 10);\n }", "java.lang.String getField1399();", "public void setTaxNumber1(\n @Nullable\n final String taxNumber1) {\n rememberChangedField(\"TaxNumber1\", this.taxNumber1);\n this.taxNumber1 = taxNumber1;\n }", "java.lang.String getField1350();", "java.lang.String getField1600();", "java.lang.String getField1049();", "java.lang.String getField1465();", "java.lang.String getField1531();", "java.lang.String getField1730();", "java.lang.String getField1552();", "java.lang.String getField1240();", "java.lang.String getField1200();", "java.lang.String getField1462();", "@Valid\n @JsonProperty(\"taxCategory\")\n public TaxCategoryReference getTaxCategory();", "java.lang.String getField1362();", "java.lang.String getField1099();", "java.lang.String getField1537();", "java.lang.String getField1231();", "java.lang.String getField1551();", "java.lang.String getField1495();", "java.lang.String getField1098();", "java.lang.String getField1570();", "java.lang.String getField1700();", "java.lang.String getField1005();", "java.lang.String getField1541();", "java.lang.String getField1562();", "protected abstract String getAddressPropertyName();", "@Override\n\tpublic double getTax() {\n\t\treturn 0.04;\n\t}", "java.lang.String getField1435();", "java.lang.String getField1595();", "java.lang.String getField1063();", "java.lang.String getField1498();", "java.lang.String getField1538();", "java.lang.String getField1437();", "java.lang.String getField1849();", "java.lang.String getField1078();", "java.lang.String getField1052();", "java.lang.String getField1452();", "java.lang.String getField1414();", "public void setLBR_ICMS_TaxStatusTN (String LBR_ICMS_TaxStatusTN);", "@ApiModelProperty(value = \"Total amount of TAX paid(or should be paid)\")\n @JsonProperty(\"tax\")\n public String getTax() {\n return tax;\n }", "java.lang.String getField1565();", "java.lang.String getField1545();", "java.lang.String getField1050();", "java.lang.String getField1525();", "java.lang.String getField1431();", "java.lang.String getField1352();", "java.lang.String getField1175();", "java.lang.String getField1833();", "String getTypeDefn(String shortName, boolean assoc) {\n if (assoc) {\n // PLong<R>\n return propertyType + \"<R>\";\n\n } else {\n // PLong<QCustomer>\n return propertyType + \"<Q\" + shortName + \">\";\n }\n }", "java.lang.String getField1237();" ]
[ "0.5998597", "0.575536", "0.5730028", "0.56355417", "0.5625059", "0.55826837", "0.5567053", "0.553091", "0.549276", "0.5484922", "0.54571295", "0.54384243", "0.5434904", "0.5419369", "0.540286", "0.5388498", "0.53762126", "0.53600127", "0.5359121", "0.53589106", "0.535579", "0.5344078", "0.5333723", "0.53316236", "0.53286195", "0.53263825", "0.5321825", "0.5313887", "0.53045666", "0.5303512", "0.5299798", "0.5299705", "0.5297797", "0.52969307", "0.5292932", "0.5279242", "0.5277869", "0.52761", "0.52744806", "0.52686113", "0.5267446", "0.52669144", "0.5265358", "0.52593637", "0.52586496", "0.52575195", "0.52571213", "0.52562267", "0.5253753", "0.5253258", "0.5251843", "0.5246432", "0.52444756", "0.5238693", "0.5232957", "0.523185", "0.52291423", "0.5227725", "0.52269846", "0.5224158", "0.5222819", "0.52205336", "0.5219883", "0.5219438", "0.52193105", "0.5217358", "0.5214695", "0.5213556", "0.52121377", "0.5211257", "0.5210124", "0.5203866", "0.52038157", "0.5202583", "0.5200423", "0.51980203", "0.5197907", "0.5197218", "0.51963407", "0.5191645", "0.51909745", "0.5190473", "0.5190302", "0.5189117", "0.5189002", "0.5188984", "0.51884884", "0.51882684", "0.51879", "0.5187775", "0.5186096", "0.51855963", "0.5184242", "0.5182364", "0.5179581", "0.5179404", "0.51789284", "0.51779747", "0.5177747", "0.5176509", "0.51764274" ]
0.0
-1
Constraints: Not nullable, Maximum length: 2 Original property name from the Odata EDM: TaxNumberType
public void setTaxNumberType( @Nullable final String taxNumberType) { rememberChangedField("TaxNumberType", this.taxNumberType); this.taxNumberType = taxNumberType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLBR_ICMS_TaxBaseType();", "public String getLBR_ICMSST_TaxBaseType();", "public void setLBR_ICMS_TaxBaseType (String LBR_ICMS_TaxBaseType);", "fi.kapsi.koti.jpa.nanopb.Nanopb.FieldType getType();", "public String getLBR_ICMS_TaxReliefType();", "x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType xgetProductType();", "public void setLBR_ICMSST_TaxBaseType (String LBR_ICMSST_TaxBaseType);", "String getTaxId();", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "cb.Careerbuilder.Company.PhoneType getType();", "String getTypeDefn(String shortName, boolean assoc) {\n if (assoc) {\n // PLong<R>\n return propertyType + \"<R>\";\n\n } else {\n // PLong<QCustomer>\n return propertyType + \"<Q\" + shortName + \">\";\n }\n }", "public int getAPTaxType()\r\n\t{\r\n\t\tif (isSalesTax())\r\n\t\t\treturn ACCTTYPE_TaxExpense;\r\n\t\treturn ACCTTYPE_TaxCredit;\r\n\t}", "public com.vodafone.global.er.decoupling.binding.request.TaxType createTaxType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.TaxTypeImpl();\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderType getType();", "@Override\n\tpublic String getType() {\n\t\treturn \"nominal\";\n\t}", "public String getTaxId()\n {\n return taxId;\n }", "public void setLBR_ICMS_TaxReliefType (String LBR_ICMS_TaxReliefType);", "@Valid\n @JsonProperty(\"externalTaxRate\")\n public ExternalTaxRateDraft getExternalTaxRate();", "@NotNull\n @Valid\n @JsonProperty(\"productType\")\n public ProductTypeReference getProductType();", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\t@javax.validation.constraints.Size(max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\t@javax.validation.constraints.Size(max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\t@javax.validation.constraints.Size(max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "public String getEntityTypeName() { return \"jp.sourceforge.ea2ddl.dao.exentity.TTrxtypes\"; }", "public void test_NUMBER_AutoMapping_DomainEntity() throws Exception {\r\n // ## Arrange ##\r\n VendorCheck vendorCheck = new VendorCheck();\r\n\r\n // ## Act & Assert ##\r\n final Integer typeOfNumberInteger = vendorCheck.getTypeOfNumberInteger();\r\n final Long typeOfNumberBigint = vendorCheck.getTypeOfNumberBigint();\r\n final BigDecimal typeOfNumberDecimal = vendorCheck.getTypeOfNumberDecimal();\r\n final Integer typeOfNumberIntegerMin = vendorCheck.getTypeOfNumberIntegerMin();\r\n final Integer typeOfNumberIntegerMax = vendorCheck.getTypeOfNumberIntegerMax();\r\n final Long typeOfNumberBigintMin = vendorCheck.getTypeOfNumberBigintMin();\r\n final Long typeOfNumberBigintMax = vendorCheck.getTypeOfNumberBigintMax();\r\n final BigDecimal typeOfNumberSuperintMin = vendorCheck.getTypeOfNumberSuperintMin();\r\n final BigDecimal typeOfNumberSuperintMax = vendorCheck.getTypeOfNumberSuperintMax();\r\n assertNull(typeOfNumberBigint);\r\n assertNull(typeOfNumberInteger);\r\n assertNull(typeOfNumberDecimal);\r\n assertNull(typeOfNumberIntegerMin);\r\n assertNull(typeOfNumberIntegerMax);\r\n assertNull(typeOfNumberBigintMin);\r\n assertNull(typeOfNumberBigintMax);\r\n assertNull(typeOfNumberSuperintMin);\r\n assertNull(typeOfNumberSuperintMax);\r\n }", "@ApiModelProperty(value = \"Amount of tax expressed in the given currency\")\n\n @Valid\n\n public Money getTaxAmount() {\n return taxAmount;\n }", "java.lang.String getField1401();", "com.demo.springprotobuff.Demoproto.Student.PhoneType getType();", "public void setLBR_ICMS_TaxStatusTN (String LBR_ICMS_TaxStatusTN);", "public String getLBR_ICMS_TaxStatusTN();", "public TProductRentType() {\n this(DSL.name(\"t_product_rent_type\"), null);\n }", "@Valid\n @JsonProperty(\"taxCategory\")\n public TaxCategoryReference getTaxCategory();", "@NotNull(message = \"{NotNull.gov.nih.nci.calims2.domain.administration.customerservice.BillingInformation.type}\")\n \n @ManyToOne(fetch = FetchType.LAZY)\n@JoinColumn(name = \"TYPE_FK\")\n@org.hibernate.annotations.ForeignKey(name = \"BILLINTYPE_FK\")\n\n public gov.nih.nci.calims2.domain.common.Type getType() {\n return type;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"One of the following values will be provided: Payment Settlement Entity (PSE), Electronic Payment Facilitator (EPF), Other Third Party\")\n\n public String getType() {\n return type;\n }", "public ISalesTax getTaxObject();", "@Override\t\n\tpublic double getTax() {\n\t\treturn 0;\n\t}", "x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType.Enum getProductType();", "public Class<TTrxtypes> getEntityType() { return TTrxtypes.class; }", "public ID getPharmacyOrderType() { \r\n\t\tID retVal = this.getTypedField(26, 0);\r\n\t\treturn retVal;\r\n }", "io.dstore.values.IntegerValue getFieldTypeId();", "public String getLBR_ICMS_TaxStatusSN();", "int getPhoneTypeValue();", "@ApiModelProperty(value = \"Total amount of TAX paid(or should be paid)\")\n @JsonProperty(\"tax\")\n public String getTax() {\n return tax;\n }", "@Override\n\tpublic double getTax() {\n\t\treturn 0.04;\n\t}", "public void setPersonType(PersonType_Tp type) { this.personType = type; }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"The bank account holder's tax ID.\")\n\n public String getTaxId() {\n return taxId;\n }", "java.lang.String getField1035();", "private static void initDatatypeProperties() {\n OntModel ontologie = ModelFactory.createOntologyModel();\n OntologyFactory.readOntology(ontologyPath, ontologie);\n ontologie.add(ontologie);\n datatypeProperties.addAll(ontologie.listDatatypeProperties().toList());\n }", "@Override\n public java.lang.String getPersonType() {\n return _entityCustomer.getPersonType();\n }", "void xsetProductType(x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType productType);", "@Override\n public abstract JsonParser.NumberType numberType();", "public ID getRxa26_PharmacyOrderType() { \r\n\t\tID retVal = this.getTypedField(26, 0);\r\n\t\treturn retVal;\r\n }", "int getSymptomTypeValue();", "public void setLBR_ICMS_OwnTaxStatus (String LBR_ICMS_OwnTaxStatus);", "DomainValuesType createDomainValuesType();", "com.google.cloud.datacatalog.FieldType getType();", "@NotNull\r\n public Type getFoxType();", "java.lang.String getField1164();", "public String getLBR_ICMS_OwnTaxStatus();", "public void setFoxType(@NotNull Type type);", "public PurchaseType(java.lang.String code)\r\n {\r\n super(code);\r\n }", "public String getTaxTypeGroup() {\n return this.taxTypeGroup;\n }", "public void setTaxAmount(MMDecimal taxAmount) {\r\n this.taxAmount = taxAmount;\r\n }", "@Override\r\n\tpublic double getTaxValue() {\n\t\treturn 0;\r\n\t}", "public void setTax(Double tax);", "public void setLBR_ICMS_TaxStatusSN (String LBR_ICMS_TaxStatusSN);", "void xsetProductNumberCode(x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car productNumberCode);", "public Double getTax();", "@Override\n\tpublic String queryWaybillTypeByOrderNo(String orderNo) {\n\t\treturn null;\n\t}", "public void setTaxAmount(double _taxAmount){\n\t\ttaxAmount = _taxAmount;\n\t}", "public double getTax(){\n\n return this.tax;\n }", "public void setLBR_TaxBase (BigDecimal LBR_TaxBase);", "public int getLBR_ICMSST_TaxUFDue_ID();", "public BigDecimal getTax() {\n return tax;\n }", "public BrchrLineNrTypMtrx() {\n\t\tthis(\"BRCHR_LINE_NR_TYP_MTRX\", null);\n\t}", "private Taxon validateTaxon( String taxonName ) throws IllegalArgumentException {\n Taxon taxon = taxonService.findByCommonName( taxonName );\n if ( taxon == null ) {\n throw new IllegalArgumentException( \"No taxon with common name \" + taxonName + \" found\" );\n }\n return taxon;\n }", "DomainType createDomainType();", "java.lang.String getField1710();", "public java.lang.String getTAX_CODE() {\r\n return TAX_CODE;\r\n }", "java.lang.String getField1402();", "DeclaredCustomsValueAmountType getDeclaredCustomsValueAmount();", "java.lang.String getField1824();", "public String getJP_BankAccountType();", "public void setLBR_ICMSST_TaxUFDue_ID (int LBR_ICMSST_TaxUFDue_ID);", "java.lang.String getField1899();", "java.lang.String getField1406();", "public StateTaxes()\n {\n this.stateAbbr = \"\";\n }", "public void setTaxAmtPriceLimit (BigDecimal TaxAmtPriceLimit);", "public void setLBR_TaxBaseOwnOperation (BigDecimal LBR_TaxBaseOwnOperation);", "void setProductType(x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType.Enum productType);", "BigDecimal getTax();", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "public PersonType_Tp getPersonType() { return personType; }", "public MMDecimal getTaxAmount() {\r\n return this.taxAmount;\r\n }", "java.lang.String getField1301();", "public String getTaxcategory() {\r\n return taxcategory;\r\n }", "java.lang.String getField1048();", "com.google.cloud.tpu.v1.Symptom.SymptomType getSymptomType();", "@ApiModelProperty(value = \"Type of phone number, must be one of: home, business, mobile, fax, pager. Default is home.\")\n public String getType() {\n return type;\n }", "io.dstore.values.IntegerValue getSearchPersonTypeId();", "public static String getDatatypeSuffix(Object object){\n\t\tString javaName = getJavaDatatype(object);\n\t\tString[] split = javaName.split(\"\\\\.\");\n\t\tString javaType = split[split.length -1].toLowerCase();\n\t\tif(javaType.equals(\"string\")) return \"\";\n\t\tif(javaType.equals(\"integer\")) return \"^^xsd:int\";\n\t\treturn \"^^xsd:\"+javaType;\n\t}", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax50Car xgetProductGroup();" ]
[ "0.6215785", "0.61301893", "0.60587865", "0.5952223", "0.5942947", "0.59384036", "0.59026074", "0.5793455", "0.57835513", "0.5774749", "0.56780803", "0.567776", "0.5668005", "0.56515896", "0.5601048", "0.5594023", "0.5570131", "0.55682886", "0.5565054", "0.55590045", "0.5489099", "0.54817224", "0.54679704", "0.54388434", "0.53663933", "0.5364331", "0.5362289", "0.5359897", "0.53556794", "0.5350522", "0.53483117", "0.53392947", "0.5335369", "0.5309584", "0.52854943", "0.52853966", "0.5248263", "0.52303505", "0.52132344", "0.52111137", "0.52097565", "0.5208103", "0.52050084", "0.51799583", "0.5177173", "0.5156363", "0.51558745", "0.51545405", "0.51356626", "0.5133315", "0.51311827", "0.51306003", "0.5126642", "0.5122872", "0.5116861", "0.5115893", "0.5109281", "0.5103984", "0.51021713", "0.5101413", "0.51007265", "0.509326", "0.5088695", "0.5088321", "0.5079967", "0.507496", "0.5067821", "0.50670254", "0.50589263", "0.50523716", "0.50498474", "0.5048212", "0.5039834", "0.5038962", "0.5032969", "0.5020419", "0.50174284", "0.50150937", "0.5004528", "0.5003195", "0.49985844", "0.49978662", "0.4996429", "0.4993019", "0.49885362", "0.49807513", "0.49781233", "0.496992", "0.49688527", "0.4966621", "0.4961726", "0.49604926", "0.4956568", "0.49548882", "0.49538544", "0.4949453", "0.49480802", "0.49415037", "0.4941183", "0.49378827" ]
0.5545755
20
Constraints: Not nullable, Maximum length: 20 Original property name from the Odata EDM: VATRegistration
public void setVATRegistration( @Nullable final String vATRegistration) { rememberChangedField("VATRegistration", this.vATRegistration); this.vATRegistration = vATRegistration; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PurchaseVATCode() {\n this.setEmcLabel(\"Purchase VAT Code\");\n this.setMandatory(false);\n }", "@Schema(required = true, description = \"An identifier that is unique within a NS descriptor. Representation: string of variable length. \")\n public String getVnffgdId() {\n return vnffgdId;\n }", "@ApiModelProperty(value = \"Total amount of VAT paid(or should be paid)\")\n @JsonProperty(\"vat\")\n public String getVat() {\n return vat;\n }", "public String getVatId()\n {\n return vatId;\n }", "public void setVigencia(String vigencia) { this.vigencia = vigencia; }", "java.lang.String getField1536();", "@Optional\n @ImportColumn(\"VOLLGESCHX\")\n Property<String> zulaessigeVollgeschosse();", "@DISPID(21)\n\t// = 0x15. The runtime will prefer the VTID if present\n\t@VTID(21)\n\tjava.lang.String value();", "public interface HighlightsColumns {\n\n @DataType(TEXT) @NotNull String VIDEO_TITLE = \"title\";\n @DataType(TEXT) @NotNull String VIDEO_ID = \"id\";\n @DataType(TEXT) @NotNull String THUMBNAIL_URL = \"url\";\n\n}", "public interface CustomerInfo extends EObject {\n\t/**\n\t * Returns the name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCustomerLastName(String bookingRef);\n\n\t/**\n\t * Returns the age of the customer associated to the booking reference. \n\t * Returns -1 if the booking reference does not exist.\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getCustomerAge(String bookingRef);\n\n\t/**\n\t * Returns the email of the customer associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */ \n\tString getCustomerEmail(String bookingRef);\n\n\t/**\n\t * Returns the ccnr of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcNr(String bookingRef);\n\n\t/**\n\t * Returns the ccv of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCcV(String bookingRef);\n\n\t/**\n\t * Returns the expiry month of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpMonth(String bookingRef);\n\n\t/**\n\t * Returns the expiry year of the bank card associated to the booking reference\n\t * @model dataType=\"types.Integer\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tint getExpYear(String bookingRef);\n\n\t/**\n\t * Returns the first name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardFirstName(String bookingRef);\n\n\t/**\n\t * Returns the last name of the bank card associated to the booking reference\n\t * @model dataType=\"types.String\" required=\"true\" ordered=\"false\" bookingRefDataType=\"types.String\" bookingRefRequired=\"true\" bookingRefOrdered=\"false\"\n\t * @generated NOT\n\t */\n\tString getCardLastName(String bookingRef);\n\n}", "public interface CfgAntenna extends javax.ejb.EJBObject, com.ibm.ivj.ejb.runtime.CopyHelper {\n\n\n\n\n\n\t/**\n\t * Get accessor for persistent attribute: resource\n\t */\n\tpublic int getResource() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: resource\n\t */\n\tpublic void setResource(int newResource) throws java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: num_ant\n\t */\n\tpublic java.lang.String getNum_ant() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: num_ant\n\t */\n\tpublic void setNum_ant(java.lang.String newNum_ant)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: kind_ant\n\t */\n\tpublic java.lang.String getKind_ant() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: kind_ant\n\t */\n\tpublic void setKind_ant(java.lang.String newKind_ant)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: nakl\n\t */\n\tpublic java.math.BigDecimal getNakl() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: nakl\n\t */\n\tpublic void setNakl(java.math.BigDecimal newNakl)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: az_ant\n\t */\n\tpublic java.math.BigDecimal getAz_ant() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: az_ant\n\t */\n\tpublic void setAz_ant(java.math.BigDecimal newAz_ant)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: kswn\n\t */\n\tpublic java.math.BigDecimal getKswn() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: kswn\n\t */\n\tpublic void setKswn(java.math.BigDecimal newKswn)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: h_set1\n\t */\n\tpublic java.math.BigDecimal getH_set1() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: h_set1\n\t */\n\tpublic void setH_set1(java.math.BigDecimal newH_set1)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: len_cable\n\t */\n\tpublic java.math.BigDecimal getLen_cable() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: len_cable\n\t */\n\tpublic void setLen_cable(java.math.BigDecimal newLen_cable)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: cableres\n\t */\n\tpublic java.lang.Integer getCableres() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: cableres\n\t */\n\tpublic void setCableres(java.lang.Integer newCableres)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: equipment\n\t */\n\tpublic int getEquipment() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: equipment\n\t */\n\tpublic void setEquipment(int newEquipment) throws java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: az_variation\n\t */\n\tpublic java.lang.String getAz_variation() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: az_variation\n\t */\n\tpublic void setAz_variation(java.lang.String newAz_variation)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: nakl_variation\n\t */\n\tpublic java.lang.String getNakl_variation()\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: nakl_variation\n\t */\n\tpublic void setNakl_variation(java.lang.String newNakl_variation)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: input_power\n\t */\n\tpublic java.math.BigDecimal getInput_power()\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: input_power\n\t */\n\tpublic void setInput_power(java.math.BigDecimal newInput_power)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: operator\n\t */\n\tpublic java.lang.Integer getOperator() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: operator\n\t */\n\tpublic void setOperator(java.lang.Integer newOperator)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: byhand\n\t */\n\tpublic java.lang.Boolean getByhand() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: byhand\n\t */\n\tpublic void setByhand(java.lang.Boolean newByhand)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: groundresource\n\t */\n\tpublic java.lang.Integer getGroundresource()\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: groundresource\n\t */\n\tpublic void setGroundresource(java.lang.Integer newGroundresource)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: groundcnt\n\t */\n\tpublic java.lang.Integer getGroundcnt() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: groundcnt\n\t */\n\tpublic void setGroundcnt(java.lang.Integer newGroundcnt)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: locationtype\n\t */\n\tpublic java.lang.String getLocationtype() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: locationtype\n\t */\n\tpublic void setLocationtype(java.lang.String newLocationtype)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: electricaltilt\n\t */\n\tpublic java.math.BigDecimal getElectricaltilt()\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: electricaltilt\n\t */\n\tpublic void setElectricaltilt(java.math.BigDecimal newElectricaltilt)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: StorageCard\n\t */\n\tpublic java.lang.Integer getStorageCard() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: StorageCard\n\t */\n\tpublic void setStorageCard(java.lang.Integer newStorageCard)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: qty\n\t */\n\tpublic java.math.BigDecimal getQty() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: qty\n\t */\n\tpublic void setQty(java.math.BigDecimal newQty)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: datasource\n\t */\n\tpublic int getDatasource() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: datasource\n\t */\n\tpublic void setDatasource(int newDatasource)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: ObjectStatus\n\t */\n\tpublic java.lang.String getObjectStatus() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: ObjectStatus\n\t */\n\tpublic void setObjectStatus(java.lang.String newObjectStatus)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * @return\n\t */\n\tpublic int getId_anten() throws java.rmi.RemoteException;\n\t/**\n\t * @return\n\t */\n\tpublic int getSavconfigid() throws java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: commcable\n\t */\n\tpublic java.lang.Boolean getCommcable() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: commcable\n\t */\n\tpublic void setCommcable(java.lang.Boolean newCommcable)\n\t\tthrows java.rmi.RemoteException;\n}", "public VVentasRecord() {\n super(VVentas.V_VENTAS);\n }", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "java.lang.String getField1401();", "@VTID(17)\n java.lang.String getName();", "@Override\n\tpublic java.lang.String getVcampo() {\n\t\treturn _esfShooterAffiliationChrono.getVcampo();\n\t}", "@Test\n public void testClaimMedaProv6() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setMedaProv6,\n RdaFissClaim::getMedaProv_6,\n RdaFissClaim.Fields.medaProv_6,\n 6);\n }", "java.lang.String getField1436();", "public String getVATNumber() {\n if (isVATRegistered) {\n return \"BG\" + this.eik;\n }\n return \"\";\n }", "@Test\n public void testClaimProvEmerInd() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setProvEmerInd,\n RdaFissClaim::getProvEmerInd,\n RdaFissClaim.Fields.provEmerInd,\n 1);\n }", "@ProviderType\npublic interface StringConstraint extends BaseConstraint, FormatConstraint {\n\n /**\n * Returns the minimum length of the data. The constraint is applicable only for field with type string\n *\n * @return minimum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMinLength();\n\n /**\n * Returns the maximum length of the data. The constraint is applicable only for field with type string\n *\n * @return maximum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMaxLength();\n\n /**\n * As specified in the JSON Schema specification, the regex against which the value of the field should be tested with.\n *\n * Returns the regex. The constraint is applicable only for field with type string\n *\n * @return string represented as pattern\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n default String getPattern() {\n return null;\n }\n}", "@Test\n public void testClaimAttendPhysFname() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setAttendPhysFname,\n RdaFissClaim::getAttendPhysFname,\n RdaFissClaim.Fields.attendPhysFname,\n 18);\n }", "@Test\n public void testClaimAttendPhysId() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setAttendPhysId,\n RdaFissClaim::getAttendPhysId,\n RdaFissClaim.Fields.attendPhysId,\n 16);\n }", "private String validateVersionFieldMapping (\n\t\t\t\tMappingFieldElement versionField) \n\t\t\t\tthrows ModelValidationException\n\t\t\t{\n\t\t\t\tList columns = versionField.getColumns();\n\n\t\t\t\t// must be mapped to exactly 1 column (for this release)\n\t\t\t\tif (columns.size() != 1)\n\t\t\t\t{\n\t\t\t\t\tthrow constructFieldException(versionField.getName(), \n\t\t\t\t\t\t\"util.validation.version_field_not_mapped\");\t//NOI18N\n\t\t\t\t}\n\n\t\t\t\treturn (String)columns.get(0);\n\t\t\t}", "protected abstract String getAddressPropertyName();", "public interface Vip extends ModelEntity, Buildable<VipBuilder> {\n /**\n * @return The IP address of the VIP.\n */\n public String getAddress();\n\n /**\n * @return The administrative state of the VIP. A valid value is true (UP)\n * or false (DOWN).\n */\n public boolean isAdminStateUp();\n\n /**\n * @return connectionLimit.The maximum number of connections allowed for the\n * VIP. Default is -1, meaning no limit.\n */\n public Integer getConnectionLimit();\n\n /**\n * @return Human-readable description for the VIP\n */\n public String getDescription();\n\n /**\n * @return The unique ID for the VIP.\n */\n public String getId();\n\n /**\n * @return Human-readable name for the VIP. Does not have to be unique.\n */\n public String getName();\n\n /**\n * @return The ID of the pool with which the VIP is associated.\n */\n public String getPoolId();\n\n /**\n * @return The protocol of the VIP address. A valid value is TCP, HTTP, or\n * HTTPS.\n */\n public Protocol getProtocol();\n\n /**\n * @return The port on which to listen to client traffic that is associated\n * with the VIP address. A valid value is from 1 to 65535.\n */\n public Integer getProtocolPort();\n\n /**\n * @return SessionPersistence.Session persistence parameters for the VIP.\n * Omit the session_persistence parameter to prevent session\n * persistence. When no session persistence is used, the\n * session_persistence parameter does not appear in the API\n * response. To clear session persistence for the VIP, set the\n * session_persistence parameter to null in a VIP update request.\n */\n public SessionPersistence getSessionPersistence();\n\n /**\n * @return status.The status of the VIP. Indicates whether the VIP is\n * operational.\n */\n public String getStatus();\n\n /**\n * @return The ID of the subnet on which to allocate the VIP address.\n */\n public String getSubnetId();\n\n /**\n * @return The Tenant Id.Owner of the VIP.\n */\n public String getTenantId();\n\n\n}", "public int getVATNumber() {\n\t\treturn vatNumber;\n\t}", "java.lang.String getField1712();", "java.lang.String getField1836();", "public void setNomProvincia(String nomProvincia);", "@Schema(required = true, description = \"An identifier that is unique for the respective type within a VNF instance, but may not be globally unique. \")\n public String getId() {\n return id;\n }", "@VTID(7)\r\n java.lang.String name();", "@Test\n public void testClaimProvTypFacilCd() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setProvTypFacilCd,\n RdaFissClaim::getProvTypFacilCd,\n RdaFissClaim.Fields.provTypFacilCd,\n 1);\n }", "@Test\n public void testClaimProvDeptId() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setProvDeptId,\n RdaFissClaim::getProvDeptId,\n RdaFissClaim.Fields.provDeptId,\n 3);\n }", "@Test\n public void testClaimMedaProvId() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setMedaProvId,\n RdaFissClaim::getMedaProvId,\n RdaFissClaim.Fields.medaProvId,\n 13);\n }", "@Test\n public void testClaimOthPhysFname() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setOthPhysFname,\n RdaFissClaim::getOthPhysFname,\n RdaFissClaim.Fields.othPhysFname,\n 18);\n }", "java.lang.String getField1750();", "public void setAccountNo (String AccountNo);", "java.lang.String getField1236();", "java.lang.String getField1418();", "java.lang.String getField1736();", "@Test\n public void testClaimOthPhysId() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setOthPhysId,\n RdaFissClaim::getOthPhysId,\n RdaFissClaim.Fields.othPhysId,\n 16);\n }", "java.lang.String getField1920();", "@Test\n public void testClaimAttendPhysLname() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setAttendPhysLname,\n RdaFissClaim::getAttendPhysLname,\n RdaFissClaim.Fields.attendPhysLname,\n 17);\n }", "java.lang.String getField1406();", "java.lang.String getField1840();", "java.lang.String getField1035();", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductNumberCode();", "java.lang.String getField1402();", "java.lang.String getField1164();", "java.lang.String getField1540();", "java.lang.String getField1425();", "java.lang.String getField1800();", "java.lang.String getField1432();", "java.lang.String getField1416();", "java.lang.String getField1716();", "java.lang.String getField1812();", "java.lang.String getField1518();", "void validateCreate(ClaudiaData claudiaData, EnvironmentDto environmentDto, String vdc) throws \r\n AlreadyExistEntityException, InvalidEntityException;", "private String getAltRegType() { // TODO - fix Register reference hardcoded in reg defines parm default?\n\t\tString firstChar = regProperties.getId().substring(0, 1);\n\t\t// change case of first character in name to create type\n\t\tString regTypeParam;\n\t\tif (firstChar.equals(firstChar.toUpperCase()))\n\t\t regTypeParam = regProperties.getId().replaceFirst(firstChar, firstChar.toLowerCase()); // change to lc\n\t\telse\n\t\t regTypeParam = regProperties.getId().replaceFirst(firstChar, firstChar.toUpperCase()); // change to uc \n\t\tString regBaseType = regProperties.isReplicated()? \"RegisterArray\" : \"Register\";\n\t\treturn regBaseType + \" #(\" + getAltBlockType() + \"::\" + regTypeParam + \")\"; // TODO - make parameterizable, getAddressMapName() + \"_\" + regProperties.getBaseName() + \"_t\" \n\t}", "@Override\n\tpublic void setVcampo(java.lang.String Vcampo) {\n\t\t_esfShooterAffiliationChrono.setVcampo(Vcampo);\n\t}", "java.lang.String getField1820();", "java.lang.String getField1465();", "java.lang.String getField1362();", "java.lang.String getField1862();", "java.lang.String getField1830();", "java.lang.String getField1516();", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "java.lang.String getField1718();", "public String getVacationForm() {\n\t\treturn \"pinkpinkpinkpink\";\n\t}", "java.lang.String getField1412();", "java.lang.String getField1865();", "@Test\n public void testClaimOthPhysLname() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setOthPhysLname,\n RdaFissClaim::getOthPhysLname,\n RdaFissClaim.Fields.othPhysLname,\n 17);\n }", "java.lang.String getField1562();", "protected static void initPropertyKey() {\n String path = URL_PREFIX + SCHEMA_PKS;\n\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"name\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"age\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"city\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"lang\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"date\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"price\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"weight\\\",\\n\"\n + \"\\\"data_type\\\": \\\"DOUBLE\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n }", "java.lang.String getField1430();", "private void setPropertyID(String v)\n {\n this.setFieldValue(FLD_propertyID, StringTools.trim(v));\n }", "java.lang.String getField1600();", "java.lang.String getField1825();", "java.lang.String getField1815();", "private static void validateEntity(AdminOffice entity) throws ValidationException {\n\t\t//Validator.validateStringField(\"officeName\", entity.getOfficeName(), 55, true);\n\t\t//Validator.validateStringField(\"phone\", entity.getPhone(), 12, false);\t\t\n\t}", "java.lang.String getField1240();", "java.lang.String getField1512();", "java.lang.String getField1517();", "java.lang.String getField1617();", "public String getVehiclename() {\r\n\t\treturn vehiclename;\r\n\t}", "java.lang.String getFortId();", "java.lang.String getField1850();", "java.lang.String getField1700();", "java.lang.String getField1514();", "java.lang.String getField1126();", "java.lang.String getField1541();", "java.lang.String getField1168();", "java.lang.String getField1218();", "java.lang.String getField1817();", "java.lang.String getField1740();", "java.lang.String getField1462();", "java.lang.String getField1538();", "java.lang.String getField1816();", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }" ]
[ "0.5571843", "0.5248462", "0.49652523", "0.4955488", "0.48749632", "0.48624647", "0.48491156", "0.483993", "0.48280025", "0.4810031", "0.47986072", "0.47793198", "0.4764413", "0.47299603", "0.4726025", "0.4711458", "0.469727", "0.46962795", "0.46944752", "0.46911672", "0.46842098", "0.46745145", "0.46730113", "0.46447822", "0.46242324", "0.4621274", "0.46194473", "0.4616054", "0.46065247", "0.4603255", "0.4602997", "0.45988312", "0.45877132", "0.45866743", "0.45814323", "0.45788416", "0.45654503", "0.4564926", "0.45648798", "0.4563744", "0.45625582", "0.45606217", "0.45604667", "0.4560028", "0.4556945", "0.45564833", "0.45552936", "0.45546526", "0.4547729", "0.45470035", "0.4544715", "0.45406982", "0.45394215", "0.4536786", "0.45356646", "0.45334798", "0.45299855", "0.45260444", "0.45254573", "0.4524926", "0.4523889", "0.45211673", "0.45180824", "0.45162636", "0.45122012", "0.45118776", "0.45054585", "0.45051977", "0.4503922", "0.45038864", "0.45032358", "0.45027888", "0.4500723", "0.44974715", "0.4491698", "0.44910964", "0.44894534", "0.4488488", "0.4486739", "0.44848317", "0.44839424", "0.4481283", "0.44803512", "0.44765103", "0.44749367", "0.44732478", "0.44716224", "0.44696248", "0.44655687", "0.4465109", "0.4464317", "0.44621", "0.4461919", "0.4461376", "0.4459383", "0.44590384", "0.44582888", "0.44578758", "0.4455591", "0.44545797" ]
0.5428986
1
Constraints: noneOriginal property name from the Odata EDM: DeletionIndicator
public void setDeletionIndicator( @Nullable final Boolean deletionIndicator) { rememberChangedField("DeletionIndicator", this.deletionIndicator); this.deletionIndicator = deletionIndicator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDeleted();", "@Override\n \t\t\t\tpublic boolean isDeleted() {\n \t\t\t\t\treturn false;\n \t\t\t\t}", "@Override\n public void validateOnDelete(Object object) {\n }", "public java.lang.Boolean getDeleted();", "@Override\r\n\tprotected boolean beforeDelete() {\r\n\t\t\r\n\t\tString valida = DB.getSQLValueString(null,\"SELECT DocStatus FROM C_Hes WHERE C_Hes_ID=\" + getC_Hes_ID());\r\n if (!valida.contains(\"DR\")){\r\n \t\r\n \tthrow new AdempiereException(\"No se puede Eliminar este documento por motivos de Auditoria\");\r\n\r\n }\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@DISPID(13)\n\t// = 0xd. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tboolean deleted();", "@Override\r\n public void deleteEntity(String entityName) {\n\r\n }", "public void attributDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}", "io.dstore.values.IntegerValue getForceDelete();", "public boolean isDeleted();", "@Override\n public boolean isDeleteCascaded(ManagedType<?> ownerType, String elementCollectionPath, String attributeName) {\n return false;\n }", "@DELETE\n public void delete() {\n }", "@java.lang.Override\n public boolean getDeleted() {\n return deleted_;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "@Override\r\n\tpublic void validateDelete() throws Exception {\n\r\n\t}", "public void setPropertyOnDelete(String propertyOnDelete) {\n \t\tpropertyOnDelete = propertyOnDelete;\n }", "@Override\n protected void validateDelete(UUID id) {\n\n }", "@Override\n\tpublic void deleteEntityObj(StdMilkRate e) {\n\t\t\n\t}", "@Override\n\tpublic boolean preDelete() {\n\t\treturn false;\n\t}", "public void operationDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}", "public void setDeleted(boolean deleted);", "public void remove()\n { \n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_NO_DELETE\"); // Message name\n \n }", "@IcalProperty(pindex = PropertyInfoIndex.DELETED)\n public void setDeleted(final boolean val) {\n deleted = val;\n }", "boolean isDeleted();", "@DELETE\n public void delete() {\n }", "@DELETE\n public void delete() {\n }", "DeleteType createDeleteType();", "@DISPID(13)\n\t// = 0xd. The runtime will prefer the VTID if present\n\t@VTID(24)\n\tvoid deleted(boolean pVal);", "public DateTime getDeletionTime() {\n return deleted;\n }", "protected boolean afterDelete() throws DBSIOException{return true;}", "@PreRemove\r\n public void preRemove(){\r\n this.isDeleted=true;\r\n }", "public void setDeletionTime(DateTime deletionTime) {\n this.deleted = deletionTime;\n }", "@Override\n\tpublic void entityDeleted(TGEntity entity) {\n \tOptional<TGAttribute> attr = entity.getAttributes().stream().findFirst();\n gLogger.log(TGLogger.TGLevel.Debug, \"Entity is deleted - \" + (attr.isPresent() ? attr.get().getValue() : \"no attribute found\"));\n removedList.put(((AbstractEntity) entity).getVirtualId(), entity);\n\t}", "@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public boolean isDeleted() {\r\n\treturn isDeleted;\r\n}", "@java.lang.Override\n public boolean getDeleted() {\n return deleted_;\n }", "@Override\r\n\tpublic boolean isIgnoreDeletes() throws NotesApiException {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void delete(Field entity) {\n\t\t\n\t}", "void deleteDaftarhunianDtl(DaftarhunianDtl.MyCompositePK no) {\n }", "@Override\n public ActualProperties visitDelete(DeleteNode node, List<ActualProperties> inputProperties)\n {\n return Iterables.getOnlyElement(inputProperties).translateVariable(symbol -> Optional.empty());\n }", "@Test\n public void testDeleteMarksAttributeAsInactiveBeforeDeletingIt() throws Exception {\n\n testDelete(false, Optional.empty(), true);\n }", "public void MarkForDeletion();", "private void populateEntityToDeletetList()\r\n\t{\r\n\t\tentityNameListDelete = new ArrayList<String>();\r\n\t\tentityNameListDelete.add(\"edu.wustl.catissuecore.domain.Quantity\");\r\n\t\tentityNameListDelete\r\n\t\t\t\t.add(\"edu.wustl.catissuecore.domain.SpecimenCollectionRequirementGroup\");\r\n\t}", "@Override\n public boolean delete(Revue objet) {\n return false;\n }", "@Override\r\n\tpublic void delete(Plate entity) {\n\t\t\r\n\t}", "@Override\r\n\tpublic String delete() {\n\t\treturn \"delete\";\r\n\t}", "@Override\n\tpublic Representation deleteDetails() {\n\t\treturn null;\n\t}", "public Deleter deleteWithoutBackup() {\n return new AugmentedDeleter() {\n @Override\n protected void handleDeletion(Iterable<Key<?>> keys) {\n checkProhibitedAnnotations(keys, VirtualEntity.class);\n }\n };\n }", "@Test\n public void testDeleteReturnsEarlyIfAttributeBeingDeletedDoesNotExist_NoVersionNumber()\n throws Exception {\n doTestDeleteReturnsEarlyIfAttributeBeingDeletedDoesNotExist(false);\n }", "Ack deleteProperty(ProjectEntity entity, String propertyTypeName);", "public boolean getDeleted() {\n return deleted;\n }", "public boolean isDeleted()\r\n {\r\n return getSemanticObject().getBooleanProperty(swb_deleted);\r\n }", "@Override\n public void delete(LineEntity entity) {\n\n }", "public Integer getIsdeleted() {\n return isdeleted;\n }", "public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}", "Boolean allowDelete(Data target, String name);", "@Override\n\tpublic void delete(Translator entity) {\n\t\t\n\t}", "@Override\n \tpublic boolean canDelete() {\n \t\treturn false;\n \t}", "public Boolean getDeleted() {\r\n\t\treturn deleted;\r\n\t}", "private Delete() {}", "private Delete() {}", "@DISPID(75)\r\n\t// = 0x4b. The runtime will prefer the VTID if present\r\n\t@VTID(80)\r\n\tboolean isDeleted();", "@Override\n\tpublic void delete(Audit entity) {\n\t\t\n\t}", "boolean getDeletionProtection();", "@Transient\n\tpublic String getToDeleteFlg() {\n\t\treturn toDeleteFlg;\n\t}", "public void delete(ControlAcceso entity) {\n\n\t}", "@Override\n\tpublic void delete(Unidade obj) {\n\n\t}", "public Integer getDeleted() {\n return deleted;\n }", "io.dstore.values.BooleanValue getDeleteCharacteristic();", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "@Test\n public void testDeleteReturnsEarlyIfAttributeBeingDeletedDoesNotExist_VersionNumber()\n throws Exception {\n doTestDeleteReturnsEarlyIfAttributeBeingDeletedDoesNotExist(true);\n }", "public Byte getDeleted() {\n return deleted;\n }", "ArrayMap<Integer,DefinedProperty> relDelete( long relId );", "@Override\n\t\t\t\t\tpublic String getTitle() {\n\t\t\t\t\t\treturn item + \" deleted\";\n\t\t\t\t\t}", "public void setDeleted(java.lang.Boolean deleted);", "@Override\n\tpublic void delete() {\n\n\t}", "@java.lang.Override\n public boolean hasDeletedItemKey() {\n return inventoryItemCase_ == 2;\n }", "@java.lang.Override\n public boolean hasDeletedItemKey() {\n return inventoryItemCase_ == 2;\n }", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "@Override\r\n\tprotected void checkDelete(Serializable id) throws BusinessException {\n\t\t\r\n\t}", "@Override\n\tpublic Integer delete() {\n\t\treturn null;\n\t}", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Protection from accidental deletion of this item [true/false]\")\n\n public String getDeleteProtection() {\n return deleteProtection;\n }", "public boolean isDeleted() {\n return (this == RecordStatusEnum.DELETED);\n }", "public Integer getIsdelete() {\r\n return isdelete;\r\n }", "public Boolean getDeleted() {\n return mDeleted;\n }", "public Integer getIsdelete() {\n return isdelete;\n }", "boolean hasDeletionProtection();", "@Override\n public void delete(ClientAuditTrailHolder oldObj_) throws Exception\n {\n\n }", "Deleted(Boolean value, String name) {\n this.value = value;\n this.name = name;\n }", "Deleted(Boolean value, String name) {\n this.value = value;\n this.name = name;\n }", "Deleted(Boolean value, String name) {\n this.value = value;\n this.name = name;\n }", "@Override\n\tpublic int getIsDelete() {\n\t\treturn _dmGtStatus.getIsDelete();\n\t}", "public IBusinessObject softDelete()\n throws OculusException;", "@Override\n\tpublic void delete(Note e) {\n\t\t\n\t}", "@Override\n\tprotected boolean setDeleteAttributes() throws Exception {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean setDeleteAttributes() throws Exception {\n\t\treturn false;\n\t}", "public Byte getIsDeleted() {\r\n return isDeleted;\r\n }" ]
[ "0.6611844", "0.63491124", "0.6248637", "0.6086572", "0.60325986", "0.60307163", "0.6030136", "0.59711885", "0.59478587", "0.59208494", "0.5899708", "0.5886933", "0.5879191", "0.58711416", "0.586474", "0.5861471", "0.5856861", "0.5846092", "0.58449537", "0.5840123", "0.5838611", "0.5832211", "0.5831803", "0.58271456", "0.5823088", "0.5823088", "0.5813632", "0.5800959", "0.57866853", "0.5785096", "0.5778783", "0.57755166", "0.5765711", "0.57577723", "0.5757756", "0.5757756", "0.5757756", "0.5757756", "0.5752886", "0.57510966", "0.5748113", "0.5745621", "0.5725551", "0.57240295", "0.5723861", "0.5721976", "0.57043356", "0.5701886", "0.56992376", "0.56812996", "0.56808823", "0.56777966", "0.566865", "0.566807", "0.5661096", "0.5659879", "0.5645692", "0.56326884", "0.56243575", "0.5622364", "0.5622012", "0.56200004", "0.5614382", "0.5612143", "0.5612143", "0.56121343", "0.5604296", "0.5600537", "0.5597571", "0.55966467", "0.5595216", "0.55937284", "0.558961", "0.55870456", "0.5583127", "0.55611295", "0.55610126", "0.55577147", "0.5556634", "0.55462927", "0.5545065", "0.5542243", "0.5532755", "0.5532665", "0.55318654", "0.55312073", "0.55308676", "0.55292815", "0.55273306", "0.5526024", "0.5519883", "0.55165726", "0.5508747", "0.5508747", "0.5508747", "0.5506007", "0.550443", "0.55039984", "0.5502705", "0.5502705", "0.5501572" ]
0.0
-1
Use with available fluent helpers to apply an extension field to query operations.
@Nonnull public static<T >CustomerField<T> field( @Nonnull final String fieldName, @Nonnull final Class<T> fieldType) { return new CustomerField<T>(fieldName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void applyExtensions(ReaderContext context, Operation operation, Method method);", "public interface ExtraQuery {\n\n ExtraQuery setTypeName(String typeName);\n ExtraQuery setIndexName(String indexName);\n\n /**\n * Add condition for extraQuery\n * @see #eq(String, Object) for replace\n * @param name name of target field in repo.entity in <b>output channel</b>\n * @param value value of target field in repo.entity in <b>output channel</b>\n */\n @Deprecated\n ExtraQuery filter(String name, Object value);\n\n ExtraQuery eq(String name, Object value);\n\n /**\n * Add condition using primary key\n */\n ExtraQuery id(Object value);\n\n ExtraQuery select(String... field);\n\n /**\n * rename {@link #select(String...)} fields as new name\n * @param cols new name\n */\n ExtraQuery as(String... cols);\n\n /**\n * @see #as(String...) for replace\n */\n @Deprecated\n ExtraQuery addField(String... cols);\n\n @Override\n String toString();\n}", "public io.envoyproxy.envoy.config.core.v3.Extension.Builder addExtensionsBuilder() {\n return getExtensionsFieldBuilder().addBuilder(\n io.envoyproxy.envoy.config.core.v3.Extension.getDefaultInstance());\n }", "List<AttributeExtend> selectByExample(AttributeExtendExample example);", "public interface IQueryEntity extends IBaseQueryObject\r\n{\r\n\r\n /**\r\n\t * \r\n\t * @return The Dynamic Extension Entity reference corresponding to the QueryEntity.\r\n\t */\r\n\tEntityInterface getDynamicExtensionsEntity();\r\n\r\n}", "public interface IEditTextExt {\n\n /**\n * the extension feature that set the inputText length input filter\n * @param inputText the EditText to set.\n * @param context\n * @param maxLength\n */\n void setLengthInputFilter(EditText inputText, final Context context, final int maxLength);\n}", "public interface PathAliasHandler {\n String toAliasedColumn(FieldExpression fieldExpression);\n}", "List<CompanyExtend> selectByExample(CompanyExtendExample example);", "public CustomerAddressQuery extensionAttributes(CustomerAddressAttributeQueryDefinition queryDef) {\n startField(\"extension_attributes\");\n\n _queryBuilder.append('{');\n queryDef.define(new CustomerAddressAttributeQuery(_queryBuilder));\n _queryBuilder.append('}');\n\n return this;\n }", "protected Item addExtensions(Item item) {\n // this can happen if the fields extension was used but properties were not included\n if (item.getProperties() == null) {\n return item;\n }\n\n Class propertiesClass = item.getProperties().getClass();\n if (cache.containsKey(propertiesClass)) {\n return item.stacExtensions(cache.get(propertiesClass));\n }\n\n Set<String> extensions = new HashSet<>();\n Class[] interfaces = propertiesClass.getInterfaces();\n for (Class clazz : interfaces) {\n try {\n Field prefixField = clazz.getDeclaredField(\"EXTENSION_PREFIX\");\n if (prefixField != null) {\n String prefix = (String) prefixField.get(item.getProperties());\n extensions.add(prefix);\n }\n } catch (Exception e) {\n // field doesn't exist, do nothing\n }\n }\n cache.put(propertiesClass, extensions);\n item.setStacExtensions(extensions);\n return item;\n }", "public Builder addExtensions(io.envoyproxy.envoy.config.core.v3.Extension value) {\n if (extensionsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureExtensionsIsMutable();\n extensions_.add(value);\n onChanged();\n } else {\n extensionsBuilder_.addMessage(value);\n }\n return this;\n }", "public <T extends Message, V> T ext(String key, V value) {\n\t\tif (StringUtils.isNotBlank(key)) {\n\t\t\tcheckExt();\n\t\t\tthis.ext.put(key, value);\n\t\t}\n\t\treturn (T) this;\n\t}", "AlgOptTable extend( List<AlgDataTypeField> extendedFields );", "public abstract QueryElement addOrLike(String property, Object value);", "public QuarkusCodestartTestBuilder extension(ArtifactKey extension) {\n this.extensions.add(Extensions.toCoords(extension, null));\n return this;\n }", "public static Expression reduceExtensions(Expression expression) { throw Extensions.todo(); }", "public Builder addExtensions(\n int index, io.envoyproxy.envoy.config.core.v3.Extension value) {\n if (extensionsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureExtensionsIsMutable();\n extensions_.add(index, value);\n onChanged();\n } else {\n extensionsBuilder_.addMessage(index, value);\n }\n return this;\n }", "public DmcAttribute<?> addHsExtendedRef(SomeRelation value){\n DmcAttribute<?> attr = ((ExtendedRefHSDMO) core).addHsExtendedRef(value);\n return(attr);\n }", "private Query attributeQueryBuilder(String field, String queryText, SubQuery subQueryBuilder, AnalysisMode analysisMode, LuceneFunction luceneFunction) throws ParseException\n {\n String propertyFieldName = null;\n String ending = \"\";\n if (field.endsWith(FIELD_MIMETYPE_SUFFIX))\n {\n propertyFieldName = field.substring(1, field.length() - 9);\n ending = FIELD_MIMETYPE_SUFFIX;\n }\n else if (field.endsWith(FIELD_SIZE_SUFFIX))\n {\n propertyFieldName = field.substring(1, field.length() - 5);\n ending = FIELD_SIZE_SUFFIX;\n }\n else if (field.endsWith(FIELD_LOCALE_SUFFIX))\n {\n propertyFieldName = field.substring(1, field.length() - 7);\n ending = FIELD_LOCALE_SUFFIX;\n }\n else\n {\n propertyFieldName = field.substring(1);\n }\n \n String expandedFieldName;\n QName propertyQName;\n PropertyDefinition propertyDef = matchPropertyDefinition(propertyFieldName);\n IndexTokenisationMode tokenisationMode = IndexTokenisationMode.TRUE;\n if (propertyDef != null)\n {\n tokenisationMode = propertyDef.getIndexTokenisationMode();\n if (tokenisationMode == null)\n {\n tokenisationMode = IndexTokenisationMode.TRUE;\n }\n expandedFieldName = PROPERTY_FIELD_PREFIX+propertyDef.getName()+ending;\n propertyQName = propertyDef.getName();\n }\n else\n {\n expandedFieldName = expandAttributeFieldName(field);\n propertyQName = QName.createQName(propertyFieldName);\n }\n \n\n if (luceneFunction != LuceneFunction.FIELD)\n {\n if ((tokenisationMode == IndexTokenisationMode.FALSE) || (tokenisationMode == IndexTokenisationMode.BOTH))\n {\n return functionQueryBuilder(expandedFieldName, propertyQName, propertyDef, tokenisationMode, queryText, luceneFunction);\n }\n }\n\n // Mime type\n if (expandedFieldName.endsWith(FIELD_MIMETYPE_SUFFIX))\n {\n if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.CONTENT)))\n {\n return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n }\n\n }\n else if (expandedFieldName.endsWith(FIELD_SIZE_SUFFIX))\n {\n if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.CONTENT)))\n {\n return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n }\n\n }\n else if (expandedFieldName.endsWith(FIELD_LOCALE_SUFFIX))\n {\n if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.CONTENT)))\n {\n return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n }\n\n }\n\n // Already in expanded form\n\n // ML\n\n if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.MLTEXT)))\n {\n // Build a sub query for each locale and or the results together - the analysis will take care of\n // cross language matching for each entry\n BooleanQuery booleanQuery = new BooleanQuery();\n MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters.getMlAnalaysisMode();\n List<Locale> locales = searchParameters.getLocales();\n List<Locale> expandedLocales = new ArrayList<Locale>();\n for (Locale locale : (((locales == null) || (locales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : locales))\n {\n expandedLocales.addAll(MLAnalysisMode.getLocales(mlAnalysisMode, locale, false));\n }\n for (Locale locale : (((expandedLocales == null) || (expandedLocales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : expandedLocales))\n {\n String mlFieldName = expandedFieldName;\n\n if ((tokenisationMode == IndexTokenisationMode.BOTH) && ((analysisMode == AnalysisMode.IDENTIFIER) || (analysisMode == AnalysisMode.LIKE)))\n {\n {\n // text and ml text need locale\n IndexTokenisationMode tm = propertyDef.getIndexTokenisationMode();\n if ((tm != null) && (tm == IndexTokenisationMode.BOTH))\n {\n if (locale.toString().length() == 0)\n {\n mlFieldName = mlFieldName + FIELD_NO_LOCALE_SUFFIX;\n }\n else\n {\n mlFieldName = mlFieldName + \".\" + locale + FIELD_SORT_SUFFIX;\n }\n }\n\n }\n }\n\n boolean lowercaseExpandedTerms = getLowercaseExpandedTerms();\n try\n {\n switch (tokenisationMode)\n {\n case BOTH:\n switch (analysisMode)\n {\n default:\n case DEFAULT:\n case TOKENISE:\n addLocaleSpecificTokenisedMLOrTextAttribute(queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, locale, expandedFieldName);\n break;\n case IDENTIFIER:\n case FUZZY:\n case PREFIX:\n case WILD:\n case LIKE:\n setLowercaseExpandedTerms(false);\n addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale,\n mlFieldName);\n\n break;\n }\n break;\n case FALSE:\n setLowercaseExpandedTerms(false);\n addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale,\n mlFieldName);\n break;\n case TRUE:\n default:\n switch (analysisMode)\n {\n default:\n case DEFAULT:\n case TOKENISE:\n case IDENTIFIER:\n addLocaleSpecificTokenisedMLOrTextAttribute(queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, locale, expandedFieldName);\n break;\n case FUZZY:\n case PREFIX:\n case WILD:\n case LIKE:\n addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale,\n mlFieldName);\n break;\n }\n }\n }\n finally\n {\n setLowercaseExpandedTerms(lowercaseExpandedTerms);\n }\n }\n return booleanQuery;\n }\n // Content\n else if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.CONTENT)))\n {\n // Identifier request are ignored for content\n\n // Build a sub query for each locale and or the results together -\n // - add an explicit condition for the locale\n\n MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters.getMlAnalaysisMode();\n\n if (mlAnalysisMode.includesAll())\n {\n return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n }\n\n List<Locale> locales = searchParameters.getLocales();\n List<Locale> expandedLocales = new ArrayList<Locale>();\n for (Locale locale : (((locales == null) || (locales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : locales))\n {\n expandedLocales.addAll(MLAnalysisMode.getLocales(mlAnalysisMode, locale, true));\n }\n\n if (expandedLocales.size() > 0)\n {\n BooleanQuery booleanQuery = new BooleanQuery();\n Query contentQuery = subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n if (contentQuery != null)\n {\n booleanQuery.add(contentQuery, Occur.MUST);\n BooleanQuery subQuery = new BooleanQuery();\n for (Locale locale : (expandedLocales))\n {\n StringBuilder builder = new StringBuilder();\n builder.append(expandedFieldName).append(FIELD_LOCALE_SUFFIX);\n String localeString = locale.toString();\n if (localeString.indexOf(\"*\") == -1)\n {\n Query localeQuery = getFieldQuery(builder.toString(), localeString);\n if (localeQuery != null)\n {\n subQuery.add(localeQuery, Occur.SHOULD);\n }\n else\n {\n subQuery.add(createNoMatchQuery(), Occur.SHOULD);\n }\n }\n else\n {\n Query localeQuery = getWildcardQuery(builder.toString(), localeString);\n if (localeQuery != null)\n {\n subQuery.add(localeQuery, Occur.SHOULD);\n }\n else\n {\n subQuery.add(createNoMatchQuery(), Occur.SHOULD);\n }\n }\n }\n booleanQuery.add(subQuery, Occur.MUST);\n }\n return booleanQuery;\n }\n else\n {\n Query query = subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n if (query != null)\n {\n return query;\n }\n else\n {\n return createNoMatchQuery();\n }\n }\n\n }\n else if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.TEXT)))\n {\n if (propertyQName.equals(ContentModel.PROP_USER_USERNAME) || propertyQName.equals(ContentModel.PROP_USERNAME) || propertyQName.equals(ContentModel.PROP_AUTHORITY_NAME))\n {\n return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n }\n\n BooleanQuery booleanQuery = new BooleanQuery();\n MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters.getMlAnalaysisMode();\n List<Locale> locales = searchParameters.getLocales();\n List<Locale> expandedLocales = new ArrayList<Locale>();\n for (Locale locale : (((locales == null) || (locales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : locales))\n {\n expandedLocales.addAll(MLAnalysisMode.getLocales(mlAnalysisMode, locale, false));\n }\n for (Locale locale : (((expandedLocales == null) || (expandedLocales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : expandedLocales))\n {\n String textFieldName = expandedFieldName;\n\n if ((tokenisationMode == IndexTokenisationMode.BOTH) && ((analysisMode == AnalysisMode.IDENTIFIER) || (analysisMode == AnalysisMode.LIKE)))\n {\n {\n // text and ml text need locale\n IndexTokenisationMode tm = propertyDef.getIndexTokenisationMode();\n if ((tm != null) && (tm == IndexTokenisationMode.BOTH))\n {\n textFieldName = textFieldName + \".\" + locale + FIELD_SORT_SUFFIX;\n }\n\n }\n }\n\n boolean lowercaseExpandedTerms = getLowercaseExpandedTerms();\n try\n {\n switch (tokenisationMode)\n {\n case BOTH:\n switch (analysisMode)\n {\n default:\n case DEFAULT:\n case TOKENISE:\n addLocaleSpecificTokenisedMLOrTextAttribute(queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, locale, textFieldName);\n break;\n case IDENTIFIER:\n case FUZZY:\n case PREFIX:\n case WILD:\n case LIKE:\n setLowercaseExpandedTerms(false);\n addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale,\n textFieldName);\n break;\n }\n break;\n case FALSE:\n setLowercaseExpandedTerms(false);\n addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale,\n textFieldName);\n break;\n case TRUE:\n default:\n switch (analysisMode)\n {\n case DEFAULT:\n case TOKENISE:\n case IDENTIFIER:\n addLocaleSpecificTokenisedMLOrTextAttribute(queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, locale, expandedFieldName);\n break;\n case FUZZY:\n case PREFIX:\n case WILD:\n case LIKE:\n addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale,\n textFieldName);\n break;\n }\n break;\n }\n }\n finally\n {\n setLowercaseExpandedTerms(lowercaseExpandedTerms);\n }\n\n }\n return booleanQuery;\n }\n else\n {\n // Date does not support like\n if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.DATETIME)))\n {\n if (analysisMode == AnalysisMode.LIKE)\n {\n throw new UnsupportedOperationException(\"Wild cards are not supported for the datetime type\");\n }\n }\n\n // Sort and id is only special for MLText, text, and content\n // Dates are not special in this case\n Query query = subQueryBuilder.getQuery(expandedFieldName, queryText, AnalysisMode.DEFAULT, luceneFunction);\n if (query != null)\n {\n return query;\n }\n else\n {\n return createNoMatchQuery();\n }\n }\n }", "public void addCustExt() {\n String toAdd = customExt.getText();\n String[] extensions = toAdd.split(\",\");\n ExtensionsAdder.addExtensions(extensions);\n }", "public List getInputExtensions();", "protected String addMethodInfoField(int modifiers, CtClass addTo, MethodTransformation trans) throws NotFoundException, CannotCompileException\n {\n return addMethodInfoField(modifiers, addTo, trans, null);\n }", "public interface BindingExt extends ExtComponent {\n\n//TODO: define get/set methods for properties for BindingExt if the extension element has attributes.\n /**\n * This class is an implementation of BindingExt interface that provides java model\n * for binding extensibility element.\n */\n public static class BindingExtImpl extends ExtModelImpl implements BindingExt {\n\n public BindingExtImpl(WSDLModel model, Element e) {\n super(model, e);\n }\n\n public BindingExtImpl(WSDLModel model) {\n this(model, createPrefixedElement(QN_BINDING_EXT, model));\n }\n\n public void accept(ExtVisitor visitor) {\n visitor.visit(this);\n }\n\n @Override\n public boolean canBeAddedTo(Component target) {\n if (target instanceof Binding) {\n return true;\n }\n return false;\n }\n }\n}", "public interface Extension {\r\n\r\n /**\r\n *\r\n * @return the extension name\r\n */\r\n String getName();\r\n}", "public static MemberExpression field(Expression expression, Field field) { throw Extensions.todo(); }", "public abstract QueryElement addLike(String property, Object value);", "default FieldEnd<? extends CriteriaContainer> criteria(String field) {\n return legacyOperation();\n }", "@Deprecated\n ExtraQuery filter(String name, Object value);", "public Builder addExtensions(\n io.envoyproxy.envoy.config.core.v3.Extension.Builder builderForValue) {\n if (extensionsBuilder_ == null) {\n ensureExtensionsIsMutable();\n extensions_.add(builderForValue.build());\n onChanged();\n } else {\n extensionsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "Builder addExampleOfWork(String value);", "private Query getSuperFieldQuery(String field, String queryText, boolean quoted) throws ParseException {\n return super.getFieldQuery(field, queryText, quoted);\n }", "public Document abbrExtensionByDoc(Document doc) {\n\t\tif (doc.getInitial_event() != null) {\n\t\t\tList<Paragraph> originalp = doc.getInitial_event();\n\t\t\toriginalp = abbrExtension(originalp);\n\t\t\tdoc.setInitial_event(originalp);\n\t\t}\n\t\tif (doc.getInclusion_criteria() != null) {\n\t\t\tList<Paragraph> originalp = doc.getInclusion_criteria();\n\t\t\toriginalp = abbrExtension(originalp);\n\t\t\tdoc.setInclusion_criteria(originalp);\n\t\t}\n\t\tif (doc.getExclusion_criteria() != null) {\n\t\t\tList<Paragraph> originalp = doc.getExclusion_criteria();\n\t\t\toriginalp = abbrExtension(originalp);\n\t\t\tdoc.setExclusion_criteria(originalp);\n\t\t}\n\t\treturn doc;\n\t}", "public void addExtension(String extension) {\n\t if(filters == null) {\n\t filters = new Hashtable(5);\n\t }\n\t filters.put(extension.toLowerCase(), this);\n\t fullDescription = null;\n }", "Builder addDateModified(String value);", "@Override\n public Expression<?> getExpression(CriteriaBuilder cb) {\n return path;\n }", "Map<String, Field> extensionFieldsMap() {\n Map<String, Field> extensionsForType = new LinkedHashMap<>();\n for (Field field : extensionFields) {\n extensionsForType.put(field.qualifiedName(), field);\n }\n return extensionsForType;\n }", "public io.envoyproxy.envoy.config.core.v3.Extension.Builder getExtensionsBuilder(\n int index) {\n return getExtensionsFieldBuilder().getBuilder(index);\n }", "Extension createExtension();", "public EsIndexPropertyBuilder addField(String fieldName, AllowableFieldEntry field) {\n this.fieldMap.put(fieldName, field);\n return this;\n }", "public io.envoyproxy.envoy.config.core.v3.Extension.Builder addExtensionsBuilder(\n int index) {\n return getExtensionsFieldBuilder().addBuilder(\n index, io.envoyproxy.envoy.config.core.v3.Extension.getDefaultInstance());\n }", "InstrumentedType withField(FieldDescription.Token token);", "private ExtendedOperations(){}", "AttributeExtend selectByPrimaryKey(Long id);", "public FieldPredicate withModifiers(int... modifiers) {\n this.withModifiers = Arrays.stream(modifiers).boxed().collect(Collectors.toList());\n return this;\n }", "public interface GridExtension {\n\n /**\n * This method can be used to provide custom data based off the information\n * in the descriptor. For example it is possible to return data that is\n * based off of other resources that are loaded. This method can return null\n * indicating that no descriptor specific customizations are necessary, in\n * which case the data will be loaded through the {@link DataCubeContainer}.\n */\n public IDataRecord[] loadCustomData(GridRecord record,\n IDescriptor descriptor) throws VizException;\n\n /**\n * Modify the base grid {@link DataTree}. This method will generally add new\n * {@link AbstractBaseDataNode}s to the tree for a custom data type.\n */\n public void addToBaseTree(DataTree dataTree,\n Map<String, DerivParamDesc> derParLibrary);\n\n /**\n * This method needs to handle any {@link AbstractBaseDataNode}s that were\n * added in {@link #addToBaseTree(DataTree, Map)}. It should return a\n * {@link GridMapKey}that will be used by the {@link GridUpdater} to ensure\n * that updates work for derived parameters. If the node type was not\n * created by this extension then null should be returned.\n */\n public GridMapKey getUpdateKey(AbstractBaseDataNode node);\n\n /**\n * Handle a time query for a particular data source, implementation should\n * check the query to see if it applies to this extension and return null if\n * it does not.\n * \n * @see AbstractInventory#timeAgnosticQuery(Map)\n */\n public Set<DataTime> timeInvariantQuery(\n Map<String, RequestConstraint> query) throws VizException;\n\n /**\n * Get the appropriate {@link MasterLevel} name to use for 3D data queries\n * against a particular source. If the source is not managed by a particular\n * extension then null should be returned.\n */\n public String get3DMasterLevel(String model);\n\n /**\n * Generate a cube node for a specific model.\n */\n public LevelNode getCubeNode(String modelName,\n List<CubeLevel<AbstractRequestableNode, AbstractRequestableNode>> cubeLevels);\n\n /**\n * Resolve a static parameter.\n */\n public Object resolvePluginStaticData(SourceNode sNode,\n DerivParamField field, Level level);\n}", "public Object getExtension(){\n\t\treturn ext;\n\t}", "public Builder setExtension(char key, String value) {\n try {\n _locbld.setExtension(key, value);\n } catch (InvalidLocaleIdentifierException e) {\n throw new IllegalArgumentException(e);\n }\n return this;\n }", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface LocationExtensionRepository extends JpaRepository<Location, Long> {\n\n Location findByEventId(Long id);\n}", "public Field.Builder addFieldsBuilder() {\n return getFieldsFieldBuilder().addBuilder(\n Field.getDefaultInstance());\n }", "public QuarkusCodestartTestBuilder extension(ArtifactCoords extension) {\n this.extensions.add(extension);\n return this;\n }", "public ExpressionSearch addOps(Search... ops)\n\t\t{\n\t\t\tfor(Search op : ops)\n\t\t\t\tadd(op);\n\t\t\treturn this;\n\t\t}", "@Override\n\tpublic void addOperation(Operation op, ColumnOptMetadata optinfo) {\n\t}", "public Builder setExtensions(\n int index, io.envoyproxy.envoy.config.core.v3.Extension value) {\n if (extensionsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureExtensionsIsMutable();\n extensions_.set(index, value);\n onChanged();\n } else {\n extensionsBuilder_.setMessage(index, value);\n }\n return this;\n }", "Builder addDateModified(Date value);", "private void exposeExposedFieldsToJs() {\n if (fieldsWithNameExposed.isEmpty()) {\n return;\n }\n\n MethodSpec.Builder exposeFieldMethod = MethodSpec\n .methodBuilder(\"vg$ef\")\n .addAnnotation(JsMethod.class);\n\n fieldsWithNameExposed\n .forEach(field -> exposeFieldMethod\n .addStatement(\"this.$L = $T.v()\",\n field.getName(),\n FieldsExposer.class)\n );\n\n exposeFieldMethod\n .addStatement(\n \"$T.e($L)\",\n FieldsExposer.class,\n fieldsWithNameExposed.stream()\n .map(ExposedField::getName)\n .collect(Collectors.joining(\",\"))\n );\n componentExposedTypeBuilder.addMethod(exposeFieldMethod.build());\n }", "public ChangeFieldEf() {\r\n\t\tthis(null, null);\r\n\t}", "public <V extends Number> FluentExp<V> plus (V value)\n {\n return new Add<V>(this, value);\n }", "Builder addDateModified(DateTime value);", "public abstract QueryElement addOrEquals(String property, Object value);", "public void setExtended(boolean value) {\n this.extended = value;\n }", "private static FieldEQ insertFieldEQ(DocumentBuilder builder, String args) throws Exception {\n FieldEQ field = (FieldEQ) builder.insertField(FieldType.FIELD_EQUATION, true);\n builder.moveTo(field.getSeparator());\n builder.write(args);\n builder.moveTo(field.getStart().getParentNode());\n\n builder.insertParagraph();\n return field;\n }", "public interface WhereHqlGetter {\n /**\n * 生成查询的hql语句\n *\n * @param entityName 要查询的实体名称\n * @param modelName 实体在查询中的别名\n * @param enableSort 启用排序\n * @return\n */\n KeyValuePair<String, Map<String, Object>> getWhereHql(String entityName, String modelName, boolean enableSort);\n\n /**\n * 生成查询条数的语句\n * @param entityName\n * @param modelName\n * @return\n */\n KeyValuePair<String, Map<String, Object>> getCountHql(String entityName, String modelName);\n}", "void addRequestExtension(Class fromClass, UnmarshalledExtension extension);", "public Builder setExtension(char key, String value) {\n/* 1645 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "interface WithEncryption {\n /**\n * Specifies the encryption property: Encryption property can be used to encrypt data at rest with customer\n * managed keys or platform managed keys..\n *\n * @param encryption Encryption property can be used to encrypt data at rest with customer managed keys or\n * platform managed keys.\n * @return the next definition stage.\n */\n Update withEncryption(Encryption encryption);\n }", "GetExtensionsResponse getExtensions(GetExtensionsRequest request);", "private String getElementRefExt(Node elementRefNode, XmlProcessor simpleXmlProcessor)\n\t\t\tthrows XPathExpressionException {\n\t\tString extension = \"\";\n\t\tif (elementRefNode.hasChildNodes()) {\n\t\t\tNode childNode = elementRefNode.getFirstChild();\n\t\t\tif (\"attribute\".equals(childNode.getNodeName())) {\n\t\t\t\textension = childNode.getAttributes().getNamedItem(ATTR_UUID).getNodeValue();\n\t\t\t}\n\t\t} else {\n\t\t\tString id = elementRefNode.getAttributes().getNamedItem(ID).getNodeValue();\n\t\t\tNode qdmNode = simpleXmlProcessor.findNode(simpleXmlProcessor.getOriginalDoc(),\n\t\t\t\t\t\"/measure/elementLookUp/qdm[@uuid='\" + id + \"']\");\n\t\t\tif (qdmNode != null) {\n\t\t\t\tString dataType = qdmNode.getAttributes().getNamedItem(DATATYPE).getNodeValue();\n\t\t\t\tString qdmName = qdmNode.getAttributes().getNamedItem(NAME).getNodeValue();\n\t\t\t\textension = qdmName + \"_\" + dataType;\n\t\t\t\tif (qdmNode.getAttributes().getNamedItem(INSTANCE) != null) {\n\t\t\t\t\textension = qdmNode.getAttributes().getNamedItem(INSTANCE).getNodeValue() + \"_\" + extension;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn StringUtils.deleteWhitespace(extension);\n\t}", "private void addFeatureFieldGetSet(FeatureImpl fi) {\n this.fi = fi;\n featureFieldName = getFeatureFieldName(fi);\n rangeJavaDescriptor = fi.getRangeAsJavaDescriptor();\n \n addFeatureField(); // add declares for fields\n addFeatureGetSet();\n TypeImpl range = (TypeImpl) fi.getRange();\n if (range.isArray()) {\n rangeArrayElementJavaDescriptor = fi.getRangeArrayElementAsJavaDescriptor();\n addArrayFeatureGetSet();\n }\n }", "public static MemberExpression field(Expression expression, String fieldName) { throw Extensions.todo(); }", "public Collection<Collection<T>> getExtensions();", "@Override\r\n public void addExtension(String name, Class<? extends IExtension> cls) {\n this.DecoratedSortAlgo.addExtension(name, cls);\r\n }", "public Builder addExtensions(\n int index, io.envoyproxy.envoy.config.core.v3.Extension.Builder builderForValue) {\n if (extensionsBuilder_ == null) {\n ensureExtensionsIsMutable();\n extensions_.add(index, builderForValue.build());\n onChanged();\n } else {\n extensionsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }", "public interface CollectionField extends RelationField {\n\n}", "@Deprecated\n @Override\n public Having getQueryHaving() {\n throw new UnsupportedOperationException(\"Druid havings are being split from the ApiRequest model and should \" +\n \"be handled separately.\");\n }", "Builder addAdditionalType(String value);", "int updateByExampleSelective(@Param(\"record\") CompanyExtend record, @Param(\"example\") CompanyExtendExample example);", "@Override\r\n\tpublic BasicDBObject getExpression() {\n\t\treturn null;\r\n\t}", "default void add(Criteria... criteria) {\n legacyOperation();\n }", "public ListInfrastructure fieldSelector(String fieldSelector) {\n put(\"fieldSelector\", fieldSelector);\n return this;\n }", "@Override\n public Function<String, Predicate<String>> getFieldFilter() {\n return index -> field -> true;\n }", "public void fieldChanged(Field field, int context) {\n}", "public Extension getExtension() {\n return extension;\n }", "Builder addExampleOfWork(CreativeWork value);", "ExtensionsType getExtensions();", "DoSearch extension(String... extensions);", "public Binding setIsExtensible(BooleanDt theValue) {\n\t\tmyIsExtensible = theValue;\n\t\treturn this;\n\t}", "Extensions getExtensions() {\n return this.extensions;\n }", "void extend();", "private void addColumnInPath(String key) {\n _queryBuilder.addColumn(key);\n _queryBuilder.addTable(TableMetaData.KEY_TABLE_PATH);\n }", "public interface IPropertyQuery {\n\n\t/**\n\t * Add an equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic abstract QueryElement addEquals(String property, Object value);\n\n\t/**\n\t * Add an equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic abstract QueryElement addLike(String property, Object value);\n\n\t/**\n\t * Add an equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic abstract QueryElement addNotEquals(String property, Object value);\n\n\t/**\n\t * Add an OR equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic abstract QueryElement addOrEquals(String property, Object value);\n\n\t/**\n\t * Add an OR LIKE option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic abstract QueryElement addOrLike(String property, Object value);\n\n\t/**\n\t * Add an OR Not Equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic abstract QueryElement addOrNotEquals(String property, Object value);\n\n\t/**\n\t * Add a greater option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic QueryElement addGreaterThen(String property, Object value);\n\n\t/**\n\t * Add a greater equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic QueryElement addGreaterEqualsThen(String property, Object value);\n\n\t/**\n\t * Add a lower option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic QueryElement addLowerThen(String property, Object value);\n\n\t/**\n\t * Add a lower equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic QueryElement addLowerEqualsThen(String property, Object value);\n\n\t/**\n\t * Add a query element.\n\t * @param element\n\t */\n\tpublic void addQueryElement(QueryElement element);\n\n\t/**\n\t * Returns the number of elements.\n\t * @return\n\t */\n\tpublic abstract int size();\n\n\t/**\n\t * Removes all elements.\n\t *\n\t */\n\tpublic abstract void clear();\n\n\t/**\n\t * @return the hideDeleted\n\t */\n\tpublic abstract boolean isHideDeleted();\n\n\t/**\n\t * @param hideDeleted the hideDeleted to set\n\t */\n\tpublic abstract void setHideDeleted(boolean hideDeleted);\n\n\t/**\n\t * Same as <code>addLike(..)</code> but with checking clients wildcard preferences\n\t * for String searches. <p>\n\t * \n\t * If default constructor is used, this method acts exactly like the normal <code>addLike(..)</code> method.\n\t * \n\t * @param property\n\t * @param value\n\t */\n\tQueryElement addLikeWithWildcardSetting(String property, String value);\n\n\t/**\n\t * @param property\n\t * @param value\n\t */\n\tQueryElement addOrLikeWithWildcardSetting(String property, String value);\n\n\t/**\n\t * @param property\n\t * @param values\n\t */\n\tQueryElement addIn(String property, Collection<?> values);\n\n\t/**\n\t * @param property\n\t * @param values\n\t */\n\tQueryElement addNotIn(String property, Collection<?> values);\n\n\t/**\n\t * @param property\n\t * @param values\n\t */\n\tQueryElement addOrIn(String property, Collection<?> values);\n\n\t/**\n\t * @param property\n\t * @param values\n\t */\n\tQueryElement addOrNotIn(String property, Collection<?> values);\n\n\t/**\n\t * Add collection empty property.\n\t * @param collectionProperty\n\t */\n\tQueryElement addEmpty(String collectionProperty);\n\n\t/**\n\t * Add or collection empty property.\n\t * @param collectionProperty\n\t */\n\tQueryElement addOrEmpty(String collectionProperty);\n\n\t/**\n\t * Add collection not empty property.\n\t * @param collectionProperty\n\t */\n\tQueryElement addNotEmpty(String collectionProperty);\n\n\t/**\n\t * Add or collection not empty property.\n\t * @param collectionProperty\n\t */\n\tQueryElement addOrNotEmpty(String collectionProperty);\n\n}", "protected String buildFieldExp(Field field) {\n final StringBuilder sb = new StringBuilder();\n sb.append(field.getDeclaringClass().getSimpleName());\n final Type genericType = field.getGenericType();\n final String typeExp = genericType != null ? genericType.getTypeName() : field.getType().getSimpleName();\n sb.append(\"@\").append(field.getName()).append(\": \").append(typeExp);\n final Class<?> genericBeanType = getFieldGenericType(field);\n sb.append(genericBeanType != null ? \"<\" + genericBeanType.getSimpleName() + \">\" : \"\");\n return sb.toString();\n }", "public ExtensionPredicateEvaluationFailedErrorBuilder errorByExtension(\n final com.commercetools.api.models.error.ErrorByExtension errorByExtension) {\n this.errorByExtension = errorByExtension;\n return this;\n }", "public interface RegionColumns extends ExtendedColumns {\n\n String NAME = \"name\";\n String COUNTRY_ID = \"country_id\";\n}", "int updateByExample(@Param(\"record\") CompanyExtend record, @Param(\"example\") CompanyExtendExample example);", "Boolean supportsMultipleExtensions();", "public interface ICatalogExtension\r\n{\r\n /** Property changed keys */\r\n String PROPERTIES = \"properties\";\r\n\r\n /** Get title of extension */\r\n String getTitle();\r\n\r\n /** Get default alias of catalog */\r\n String getDefaultAlias();\r\n\r\n /**\r\n * Get properties for this extension. Is the properties that is stored/loaded ie. config/settings.\r\n */\r\n default Map<String, Object> getProperties()\r\n {\r\n return emptyMap();\r\n }\r\n\r\n /**\r\n * Load the extension with provided properties\r\n *\r\n * @param properties Propeties to load into extension\r\n */\r\n default void load(Map<String, Object> properties)\r\n {\r\n }\r\n\r\n /**\r\n * Setup session before query is executed. Ie. set selected database/index etc.\r\n *\r\n * @param catalogAlias Alias that this extension/catalog has been given\r\n * @param querySession Current query session\r\n **/\r\n default void setup(String catalogAlias, QuerySession querySession)\r\n {\r\n }\r\n\r\n /**\r\n * Update the extension based on the query session. Ie acting upon changed variables etc.\r\n *\r\n * @param catalogAlias Alias that this extension/catalog has been given\r\n * @param querySession Current query session\r\n **/\r\n default void update(String catalogAlias, QuerySession querySession)\r\n {\r\n }\r\n\r\n /**\r\n * Get configuration component. Will be showed in a dialog for setting up the extension\r\n */\r\n default Component getConfigComponent()\r\n {\r\n return null;\r\n }\r\n\r\n /**\r\n * Get quick properties component. Will be showed in extensions side bar with quick properties. Ie. selected. database/index.\r\n */\r\n default Component getQuickPropertiesComponent()\r\n {\r\n return null;\r\n }\r\n\r\n /** Get the actual catalog implementation for this extension */\r\n Catalog getCatalog();\r\n\r\n /** Handle provided exception\r\n * @param querySession Current query session\r\n * @param exception Exception to handle\r\n **/\r\n default ExceptionAction handleException(QuerySession querySession, CatalogException exception)\r\n {\r\n return ExceptionAction.NONE;\r\n }\r\n\r\n /**\r\n * Add property change listener\r\n *\r\n * @param listener Listener to add\r\n **/\r\n default void addPropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }\r\n\r\n /**\r\n * Remove property change listener\r\n *\r\n * @param listener Listener to remove\r\n **/\r\n default void removePropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }\r\n\r\n /** Action that should be performed after handling of an Exception */\r\n enum ExceptionAction\r\n {\r\n /** Do nothing action */\r\n NONE,\r\n /** Re-run query. */\r\n RERUN;\r\n }\r\n}", "String getViewExtension();", "QueryBuilder forFields(List<FieldUsage> fields);", "public OrderSetCustomTypeActionBuilder withFields(\n Function<com.commercetools.api.models.type.FieldContainerBuilder, com.commercetools.api.models.type.FieldContainer> builder) {\n this.fields = builder.apply(com.commercetools.api.models.type.FieldContainerBuilder.of());\n return this;\n }", "ExtensionType createExtensionType();", "protected String addMethodInfoField(int modifiers, CtClass addTo, MethodTransformation trans, CtField.Initializer init) throws NotFoundException, CannotCompileException\n {\n String name = getMethodInfoFieldName(trans.getOriginalName(), trans.getHash());\n TransformerCommon.addInfoField(instrumentor, METHOD_INFO_CLASS_NAME, name, modifiers, addTo, addInfoAsWeakReference(), init);\n \n return name;\n }" ]
[ "0.61224765", "0.5882069", "0.5504599", "0.5276789", "0.52350646", "0.5198318", "0.5171477", "0.49845332", "0.4977796", "0.4952428", "0.4909626", "0.4832812", "0.48099414", "0.47729287", "0.47682184", "0.47651827", "0.4761927", "0.47594452", "0.47567418", "0.47252786", "0.47220343", "0.47175723", "0.4715463", "0.47001898", "0.46722394", "0.46655947", "0.4654152", "0.46461776", "0.46460742", "0.46311843", "0.46309745", "0.4619446", "0.46114886", "0.45843175", "0.4583759", "0.4564256", "0.4555243", "0.45393094", "0.4536539", "0.45293123", "0.45223442", "0.4505824", "0.4488052", "0.44829565", "0.44716686", "0.44693297", "0.446088", "0.4449947", "0.44378108", "0.44348547", "0.4434708", "0.44281107", "0.44215447", "0.44198045", "0.44168875", "0.44136694", "0.4405578", "0.4403256", "0.43979394", "0.4395555", "0.43893066", "0.438839", "0.4384915", "0.43845618", "0.43828544", "0.4380464", "0.43781945", "0.43727577", "0.43724692", "0.43671936", "0.43655768", "0.43579566", "0.43550932", "0.43502814", "0.43461552", "0.43411604", "0.43375194", "0.43372053", "0.43346962", "0.43312535", "0.4326728", "0.43265873", "0.4322781", "0.43203607", "0.43187854", "0.43179494", "0.43155918", "0.43119335", "0.43093616", "0.43058503", "0.4304095", "0.43031126", "0.43029857", "0.4299652", "0.42934373", "0.4293071", "0.4290425", "0.4289981", "0.4289885", "0.42892203", "0.42881557" ]
0.0
-1
Use with available fluent helpers to apply an extension field to query operations.
@Nonnull public static<T,DomainT >CustomerField<T> field( @Nonnull final String fieldName, @Nonnull final TypeConverter<T, DomainT> typeConverter) { return new CustomerField<T>(fieldName, typeConverter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void applyExtensions(ReaderContext context, Operation operation, Method method);", "public interface ExtraQuery {\n\n ExtraQuery setTypeName(String typeName);\n ExtraQuery setIndexName(String indexName);\n\n /**\n * Add condition for extraQuery\n * @see #eq(String, Object) for replace\n * @param name name of target field in repo.entity in <b>output channel</b>\n * @param value value of target field in repo.entity in <b>output channel</b>\n */\n @Deprecated\n ExtraQuery filter(String name, Object value);\n\n ExtraQuery eq(String name, Object value);\n\n /**\n * Add condition using primary key\n */\n ExtraQuery id(Object value);\n\n ExtraQuery select(String... field);\n\n /**\n * rename {@link #select(String...)} fields as new name\n * @param cols new name\n */\n ExtraQuery as(String... cols);\n\n /**\n * @see #as(String...) for replace\n */\n @Deprecated\n ExtraQuery addField(String... cols);\n\n @Override\n String toString();\n}", "public io.envoyproxy.envoy.config.core.v3.Extension.Builder addExtensionsBuilder() {\n return getExtensionsFieldBuilder().addBuilder(\n io.envoyproxy.envoy.config.core.v3.Extension.getDefaultInstance());\n }", "List<AttributeExtend> selectByExample(AttributeExtendExample example);", "public interface IQueryEntity extends IBaseQueryObject\r\n{\r\n\r\n /**\r\n\t * \r\n\t * @return The Dynamic Extension Entity reference corresponding to the QueryEntity.\r\n\t */\r\n\tEntityInterface getDynamicExtensionsEntity();\r\n\r\n}", "public interface IEditTextExt {\n\n /**\n * the extension feature that set the inputText length input filter\n * @param inputText the EditText to set.\n * @param context\n * @param maxLength\n */\n void setLengthInputFilter(EditText inputText, final Context context, final int maxLength);\n}", "public interface PathAliasHandler {\n String toAliasedColumn(FieldExpression fieldExpression);\n}", "List<CompanyExtend> selectByExample(CompanyExtendExample example);", "public CustomerAddressQuery extensionAttributes(CustomerAddressAttributeQueryDefinition queryDef) {\n startField(\"extension_attributes\");\n\n _queryBuilder.append('{');\n queryDef.define(new CustomerAddressAttributeQuery(_queryBuilder));\n _queryBuilder.append('}');\n\n return this;\n }", "protected Item addExtensions(Item item) {\n // this can happen if the fields extension was used but properties were not included\n if (item.getProperties() == null) {\n return item;\n }\n\n Class propertiesClass = item.getProperties().getClass();\n if (cache.containsKey(propertiesClass)) {\n return item.stacExtensions(cache.get(propertiesClass));\n }\n\n Set<String> extensions = new HashSet<>();\n Class[] interfaces = propertiesClass.getInterfaces();\n for (Class clazz : interfaces) {\n try {\n Field prefixField = clazz.getDeclaredField(\"EXTENSION_PREFIX\");\n if (prefixField != null) {\n String prefix = (String) prefixField.get(item.getProperties());\n extensions.add(prefix);\n }\n } catch (Exception e) {\n // field doesn't exist, do nothing\n }\n }\n cache.put(propertiesClass, extensions);\n item.setStacExtensions(extensions);\n return item;\n }", "public Builder addExtensions(io.envoyproxy.envoy.config.core.v3.Extension value) {\n if (extensionsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureExtensionsIsMutable();\n extensions_.add(value);\n onChanged();\n } else {\n extensionsBuilder_.addMessage(value);\n }\n return this;\n }", "public <T extends Message, V> T ext(String key, V value) {\n\t\tif (StringUtils.isNotBlank(key)) {\n\t\t\tcheckExt();\n\t\t\tthis.ext.put(key, value);\n\t\t}\n\t\treturn (T) this;\n\t}", "AlgOptTable extend( List<AlgDataTypeField> extendedFields );", "public abstract QueryElement addOrLike(String property, Object value);", "public QuarkusCodestartTestBuilder extension(ArtifactKey extension) {\n this.extensions.add(Extensions.toCoords(extension, null));\n return this;\n }", "public static Expression reduceExtensions(Expression expression) { throw Extensions.todo(); }", "public Builder addExtensions(\n int index, io.envoyproxy.envoy.config.core.v3.Extension value) {\n if (extensionsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureExtensionsIsMutable();\n extensions_.add(index, value);\n onChanged();\n } else {\n extensionsBuilder_.addMessage(index, value);\n }\n return this;\n }", "public DmcAttribute<?> addHsExtendedRef(SomeRelation value){\n DmcAttribute<?> attr = ((ExtendedRefHSDMO) core).addHsExtendedRef(value);\n return(attr);\n }", "private Query attributeQueryBuilder(String field, String queryText, SubQuery subQueryBuilder, AnalysisMode analysisMode, LuceneFunction luceneFunction) throws ParseException\n {\n String propertyFieldName = null;\n String ending = \"\";\n if (field.endsWith(FIELD_MIMETYPE_SUFFIX))\n {\n propertyFieldName = field.substring(1, field.length() - 9);\n ending = FIELD_MIMETYPE_SUFFIX;\n }\n else if (field.endsWith(FIELD_SIZE_SUFFIX))\n {\n propertyFieldName = field.substring(1, field.length() - 5);\n ending = FIELD_SIZE_SUFFIX;\n }\n else if (field.endsWith(FIELD_LOCALE_SUFFIX))\n {\n propertyFieldName = field.substring(1, field.length() - 7);\n ending = FIELD_LOCALE_SUFFIX;\n }\n else\n {\n propertyFieldName = field.substring(1);\n }\n \n String expandedFieldName;\n QName propertyQName;\n PropertyDefinition propertyDef = matchPropertyDefinition(propertyFieldName);\n IndexTokenisationMode tokenisationMode = IndexTokenisationMode.TRUE;\n if (propertyDef != null)\n {\n tokenisationMode = propertyDef.getIndexTokenisationMode();\n if (tokenisationMode == null)\n {\n tokenisationMode = IndexTokenisationMode.TRUE;\n }\n expandedFieldName = PROPERTY_FIELD_PREFIX+propertyDef.getName()+ending;\n propertyQName = propertyDef.getName();\n }\n else\n {\n expandedFieldName = expandAttributeFieldName(field);\n propertyQName = QName.createQName(propertyFieldName);\n }\n \n\n if (luceneFunction != LuceneFunction.FIELD)\n {\n if ((tokenisationMode == IndexTokenisationMode.FALSE) || (tokenisationMode == IndexTokenisationMode.BOTH))\n {\n return functionQueryBuilder(expandedFieldName, propertyQName, propertyDef, tokenisationMode, queryText, luceneFunction);\n }\n }\n\n // Mime type\n if (expandedFieldName.endsWith(FIELD_MIMETYPE_SUFFIX))\n {\n if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.CONTENT)))\n {\n return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n }\n\n }\n else if (expandedFieldName.endsWith(FIELD_SIZE_SUFFIX))\n {\n if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.CONTENT)))\n {\n return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n }\n\n }\n else if (expandedFieldName.endsWith(FIELD_LOCALE_SUFFIX))\n {\n if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.CONTENT)))\n {\n return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n }\n\n }\n\n // Already in expanded form\n\n // ML\n\n if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.MLTEXT)))\n {\n // Build a sub query for each locale and or the results together - the analysis will take care of\n // cross language matching for each entry\n BooleanQuery booleanQuery = new BooleanQuery();\n MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters.getMlAnalaysisMode();\n List<Locale> locales = searchParameters.getLocales();\n List<Locale> expandedLocales = new ArrayList<Locale>();\n for (Locale locale : (((locales == null) || (locales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : locales))\n {\n expandedLocales.addAll(MLAnalysisMode.getLocales(mlAnalysisMode, locale, false));\n }\n for (Locale locale : (((expandedLocales == null) || (expandedLocales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : expandedLocales))\n {\n String mlFieldName = expandedFieldName;\n\n if ((tokenisationMode == IndexTokenisationMode.BOTH) && ((analysisMode == AnalysisMode.IDENTIFIER) || (analysisMode == AnalysisMode.LIKE)))\n {\n {\n // text and ml text need locale\n IndexTokenisationMode tm = propertyDef.getIndexTokenisationMode();\n if ((tm != null) && (tm == IndexTokenisationMode.BOTH))\n {\n if (locale.toString().length() == 0)\n {\n mlFieldName = mlFieldName + FIELD_NO_LOCALE_SUFFIX;\n }\n else\n {\n mlFieldName = mlFieldName + \".\" + locale + FIELD_SORT_SUFFIX;\n }\n }\n\n }\n }\n\n boolean lowercaseExpandedTerms = getLowercaseExpandedTerms();\n try\n {\n switch (tokenisationMode)\n {\n case BOTH:\n switch (analysisMode)\n {\n default:\n case DEFAULT:\n case TOKENISE:\n addLocaleSpecificTokenisedMLOrTextAttribute(queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, locale, expandedFieldName);\n break;\n case IDENTIFIER:\n case FUZZY:\n case PREFIX:\n case WILD:\n case LIKE:\n setLowercaseExpandedTerms(false);\n addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale,\n mlFieldName);\n\n break;\n }\n break;\n case FALSE:\n setLowercaseExpandedTerms(false);\n addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale,\n mlFieldName);\n break;\n case TRUE:\n default:\n switch (analysisMode)\n {\n default:\n case DEFAULT:\n case TOKENISE:\n case IDENTIFIER:\n addLocaleSpecificTokenisedMLOrTextAttribute(queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, locale, expandedFieldName);\n break;\n case FUZZY:\n case PREFIX:\n case WILD:\n case LIKE:\n addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale,\n mlFieldName);\n break;\n }\n }\n }\n finally\n {\n setLowercaseExpandedTerms(lowercaseExpandedTerms);\n }\n }\n return booleanQuery;\n }\n // Content\n else if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.CONTENT)))\n {\n // Identifier request are ignored for content\n\n // Build a sub query for each locale and or the results together -\n // - add an explicit condition for the locale\n\n MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters.getMlAnalaysisMode();\n\n if (mlAnalysisMode.includesAll())\n {\n return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n }\n\n List<Locale> locales = searchParameters.getLocales();\n List<Locale> expandedLocales = new ArrayList<Locale>();\n for (Locale locale : (((locales == null) || (locales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : locales))\n {\n expandedLocales.addAll(MLAnalysisMode.getLocales(mlAnalysisMode, locale, true));\n }\n\n if (expandedLocales.size() > 0)\n {\n BooleanQuery booleanQuery = new BooleanQuery();\n Query contentQuery = subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n if (contentQuery != null)\n {\n booleanQuery.add(contentQuery, Occur.MUST);\n BooleanQuery subQuery = new BooleanQuery();\n for (Locale locale : (expandedLocales))\n {\n StringBuilder builder = new StringBuilder();\n builder.append(expandedFieldName).append(FIELD_LOCALE_SUFFIX);\n String localeString = locale.toString();\n if (localeString.indexOf(\"*\") == -1)\n {\n Query localeQuery = getFieldQuery(builder.toString(), localeString);\n if (localeQuery != null)\n {\n subQuery.add(localeQuery, Occur.SHOULD);\n }\n else\n {\n subQuery.add(createNoMatchQuery(), Occur.SHOULD);\n }\n }\n else\n {\n Query localeQuery = getWildcardQuery(builder.toString(), localeString);\n if (localeQuery != null)\n {\n subQuery.add(localeQuery, Occur.SHOULD);\n }\n else\n {\n subQuery.add(createNoMatchQuery(), Occur.SHOULD);\n }\n }\n }\n booleanQuery.add(subQuery, Occur.MUST);\n }\n return booleanQuery;\n }\n else\n {\n Query query = subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n if (query != null)\n {\n return query;\n }\n else\n {\n return createNoMatchQuery();\n }\n }\n\n }\n else if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.TEXT)))\n {\n if (propertyQName.equals(ContentModel.PROP_USER_USERNAME) || propertyQName.equals(ContentModel.PROP_USERNAME) || propertyQName.equals(ContentModel.PROP_AUTHORITY_NAME))\n {\n return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction);\n }\n\n BooleanQuery booleanQuery = new BooleanQuery();\n MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters.getMlAnalaysisMode();\n List<Locale> locales = searchParameters.getLocales();\n List<Locale> expandedLocales = new ArrayList<Locale>();\n for (Locale locale : (((locales == null) || (locales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : locales))\n {\n expandedLocales.addAll(MLAnalysisMode.getLocales(mlAnalysisMode, locale, false));\n }\n for (Locale locale : (((expandedLocales == null) || (expandedLocales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : expandedLocales))\n {\n String textFieldName = expandedFieldName;\n\n if ((tokenisationMode == IndexTokenisationMode.BOTH) && ((analysisMode == AnalysisMode.IDENTIFIER) || (analysisMode == AnalysisMode.LIKE)))\n {\n {\n // text and ml text need locale\n IndexTokenisationMode tm = propertyDef.getIndexTokenisationMode();\n if ((tm != null) && (tm == IndexTokenisationMode.BOTH))\n {\n textFieldName = textFieldName + \".\" + locale + FIELD_SORT_SUFFIX;\n }\n\n }\n }\n\n boolean lowercaseExpandedTerms = getLowercaseExpandedTerms();\n try\n {\n switch (tokenisationMode)\n {\n case BOTH:\n switch (analysisMode)\n {\n default:\n case DEFAULT:\n case TOKENISE:\n addLocaleSpecificTokenisedMLOrTextAttribute(queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, locale, textFieldName);\n break;\n case IDENTIFIER:\n case FUZZY:\n case PREFIX:\n case WILD:\n case LIKE:\n setLowercaseExpandedTerms(false);\n addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale,\n textFieldName);\n break;\n }\n break;\n case FALSE:\n setLowercaseExpandedTerms(false);\n addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale,\n textFieldName);\n break;\n case TRUE:\n default:\n switch (analysisMode)\n {\n case DEFAULT:\n case TOKENISE:\n case IDENTIFIER:\n addLocaleSpecificTokenisedMLOrTextAttribute(queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, locale, expandedFieldName);\n break;\n case FUZZY:\n case PREFIX:\n case WILD:\n case LIKE:\n addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale,\n textFieldName);\n break;\n }\n break;\n }\n }\n finally\n {\n setLowercaseExpandedTerms(lowercaseExpandedTerms);\n }\n\n }\n return booleanQuery;\n }\n else\n {\n // Date does not support like\n if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.DATETIME)))\n {\n if (analysisMode == AnalysisMode.LIKE)\n {\n throw new UnsupportedOperationException(\"Wild cards are not supported for the datetime type\");\n }\n }\n\n // Sort and id is only special for MLText, text, and content\n // Dates are not special in this case\n Query query = subQueryBuilder.getQuery(expandedFieldName, queryText, AnalysisMode.DEFAULT, luceneFunction);\n if (query != null)\n {\n return query;\n }\n else\n {\n return createNoMatchQuery();\n }\n }\n }", "public void addCustExt() {\n String toAdd = customExt.getText();\n String[] extensions = toAdd.split(\",\");\n ExtensionsAdder.addExtensions(extensions);\n }", "public List getInputExtensions();", "protected String addMethodInfoField(int modifiers, CtClass addTo, MethodTransformation trans) throws NotFoundException, CannotCompileException\n {\n return addMethodInfoField(modifiers, addTo, trans, null);\n }", "public interface BindingExt extends ExtComponent {\n\n//TODO: define get/set methods for properties for BindingExt if the extension element has attributes.\n /**\n * This class is an implementation of BindingExt interface that provides java model\n * for binding extensibility element.\n */\n public static class BindingExtImpl extends ExtModelImpl implements BindingExt {\n\n public BindingExtImpl(WSDLModel model, Element e) {\n super(model, e);\n }\n\n public BindingExtImpl(WSDLModel model) {\n this(model, createPrefixedElement(QN_BINDING_EXT, model));\n }\n\n public void accept(ExtVisitor visitor) {\n visitor.visit(this);\n }\n\n @Override\n public boolean canBeAddedTo(Component target) {\n if (target instanceof Binding) {\n return true;\n }\n return false;\n }\n }\n}", "public interface Extension {\r\n\r\n /**\r\n *\r\n * @return the extension name\r\n */\r\n String getName();\r\n}", "public static MemberExpression field(Expression expression, Field field) { throw Extensions.todo(); }", "public abstract QueryElement addLike(String property, Object value);", "default FieldEnd<? extends CriteriaContainer> criteria(String field) {\n return legacyOperation();\n }", "@Deprecated\n ExtraQuery filter(String name, Object value);", "public Builder addExtensions(\n io.envoyproxy.envoy.config.core.v3.Extension.Builder builderForValue) {\n if (extensionsBuilder_ == null) {\n ensureExtensionsIsMutable();\n extensions_.add(builderForValue.build());\n onChanged();\n } else {\n extensionsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "Builder addExampleOfWork(String value);", "private Query getSuperFieldQuery(String field, String queryText, boolean quoted) throws ParseException {\n return super.getFieldQuery(field, queryText, quoted);\n }", "public Document abbrExtensionByDoc(Document doc) {\n\t\tif (doc.getInitial_event() != null) {\n\t\t\tList<Paragraph> originalp = doc.getInitial_event();\n\t\t\toriginalp = abbrExtension(originalp);\n\t\t\tdoc.setInitial_event(originalp);\n\t\t}\n\t\tif (doc.getInclusion_criteria() != null) {\n\t\t\tList<Paragraph> originalp = doc.getInclusion_criteria();\n\t\t\toriginalp = abbrExtension(originalp);\n\t\t\tdoc.setInclusion_criteria(originalp);\n\t\t}\n\t\tif (doc.getExclusion_criteria() != null) {\n\t\t\tList<Paragraph> originalp = doc.getExclusion_criteria();\n\t\t\toriginalp = abbrExtension(originalp);\n\t\t\tdoc.setExclusion_criteria(originalp);\n\t\t}\n\t\treturn doc;\n\t}", "public void addExtension(String extension) {\n\t if(filters == null) {\n\t filters = new Hashtable(5);\n\t }\n\t filters.put(extension.toLowerCase(), this);\n\t fullDescription = null;\n }", "Builder addDateModified(String value);", "@Override\n public Expression<?> getExpression(CriteriaBuilder cb) {\n return path;\n }", "Map<String, Field> extensionFieldsMap() {\n Map<String, Field> extensionsForType = new LinkedHashMap<>();\n for (Field field : extensionFields) {\n extensionsForType.put(field.qualifiedName(), field);\n }\n return extensionsForType;\n }", "public io.envoyproxy.envoy.config.core.v3.Extension.Builder getExtensionsBuilder(\n int index) {\n return getExtensionsFieldBuilder().getBuilder(index);\n }", "Extension createExtension();", "public EsIndexPropertyBuilder addField(String fieldName, AllowableFieldEntry field) {\n this.fieldMap.put(fieldName, field);\n return this;\n }", "public io.envoyproxy.envoy.config.core.v3.Extension.Builder addExtensionsBuilder(\n int index) {\n return getExtensionsFieldBuilder().addBuilder(\n index, io.envoyproxy.envoy.config.core.v3.Extension.getDefaultInstance());\n }", "InstrumentedType withField(FieldDescription.Token token);", "private ExtendedOperations(){}", "AttributeExtend selectByPrimaryKey(Long id);", "public FieldPredicate withModifiers(int... modifiers) {\n this.withModifiers = Arrays.stream(modifiers).boxed().collect(Collectors.toList());\n return this;\n }", "public interface GridExtension {\n\n /**\n * This method can be used to provide custom data based off the information\n * in the descriptor. For example it is possible to return data that is\n * based off of other resources that are loaded. This method can return null\n * indicating that no descriptor specific customizations are necessary, in\n * which case the data will be loaded through the {@link DataCubeContainer}.\n */\n public IDataRecord[] loadCustomData(GridRecord record,\n IDescriptor descriptor) throws VizException;\n\n /**\n * Modify the base grid {@link DataTree}. This method will generally add new\n * {@link AbstractBaseDataNode}s to the tree for a custom data type.\n */\n public void addToBaseTree(DataTree dataTree,\n Map<String, DerivParamDesc> derParLibrary);\n\n /**\n * This method needs to handle any {@link AbstractBaseDataNode}s that were\n * added in {@link #addToBaseTree(DataTree, Map)}. It should return a\n * {@link GridMapKey}that will be used by the {@link GridUpdater} to ensure\n * that updates work for derived parameters. If the node type was not\n * created by this extension then null should be returned.\n */\n public GridMapKey getUpdateKey(AbstractBaseDataNode node);\n\n /**\n * Handle a time query for a particular data source, implementation should\n * check the query to see if it applies to this extension and return null if\n * it does not.\n * \n * @see AbstractInventory#timeAgnosticQuery(Map)\n */\n public Set<DataTime> timeInvariantQuery(\n Map<String, RequestConstraint> query) throws VizException;\n\n /**\n * Get the appropriate {@link MasterLevel} name to use for 3D data queries\n * against a particular source. If the source is not managed by a particular\n * extension then null should be returned.\n */\n public String get3DMasterLevel(String model);\n\n /**\n * Generate a cube node for a specific model.\n */\n public LevelNode getCubeNode(String modelName,\n List<CubeLevel<AbstractRequestableNode, AbstractRequestableNode>> cubeLevels);\n\n /**\n * Resolve a static parameter.\n */\n public Object resolvePluginStaticData(SourceNode sNode,\n DerivParamField field, Level level);\n}", "public Object getExtension(){\n\t\treturn ext;\n\t}", "public Builder setExtension(char key, String value) {\n try {\n _locbld.setExtension(key, value);\n } catch (InvalidLocaleIdentifierException e) {\n throw new IllegalArgumentException(e);\n }\n return this;\n }", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface LocationExtensionRepository extends JpaRepository<Location, Long> {\n\n Location findByEventId(Long id);\n}", "public Field.Builder addFieldsBuilder() {\n return getFieldsFieldBuilder().addBuilder(\n Field.getDefaultInstance());\n }", "public QuarkusCodestartTestBuilder extension(ArtifactCoords extension) {\n this.extensions.add(extension);\n return this;\n }", "public ExpressionSearch addOps(Search... ops)\n\t\t{\n\t\t\tfor(Search op : ops)\n\t\t\t\tadd(op);\n\t\t\treturn this;\n\t\t}", "@Override\n\tpublic void addOperation(Operation op, ColumnOptMetadata optinfo) {\n\t}", "public Builder setExtensions(\n int index, io.envoyproxy.envoy.config.core.v3.Extension value) {\n if (extensionsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureExtensionsIsMutable();\n extensions_.set(index, value);\n onChanged();\n } else {\n extensionsBuilder_.setMessage(index, value);\n }\n return this;\n }", "Builder addDateModified(Date value);", "private void exposeExposedFieldsToJs() {\n if (fieldsWithNameExposed.isEmpty()) {\n return;\n }\n\n MethodSpec.Builder exposeFieldMethod = MethodSpec\n .methodBuilder(\"vg$ef\")\n .addAnnotation(JsMethod.class);\n\n fieldsWithNameExposed\n .forEach(field -> exposeFieldMethod\n .addStatement(\"this.$L = $T.v()\",\n field.getName(),\n FieldsExposer.class)\n );\n\n exposeFieldMethod\n .addStatement(\n \"$T.e($L)\",\n FieldsExposer.class,\n fieldsWithNameExposed.stream()\n .map(ExposedField::getName)\n .collect(Collectors.joining(\",\"))\n );\n componentExposedTypeBuilder.addMethod(exposeFieldMethod.build());\n }", "public ChangeFieldEf() {\r\n\t\tthis(null, null);\r\n\t}", "public <V extends Number> FluentExp<V> plus (V value)\n {\n return new Add<V>(this, value);\n }", "Builder addDateModified(DateTime value);", "public abstract QueryElement addOrEquals(String property, Object value);", "public void setExtended(boolean value) {\n this.extended = value;\n }", "private static FieldEQ insertFieldEQ(DocumentBuilder builder, String args) throws Exception {\n FieldEQ field = (FieldEQ) builder.insertField(FieldType.FIELD_EQUATION, true);\n builder.moveTo(field.getSeparator());\n builder.write(args);\n builder.moveTo(field.getStart().getParentNode());\n\n builder.insertParagraph();\n return field;\n }", "public interface WhereHqlGetter {\n /**\n * 生成查询的hql语句\n *\n * @param entityName 要查询的实体名称\n * @param modelName 实体在查询中的别名\n * @param enableSort 启用排序\n * @return\n */\n KeyValuePair<String, Map<String, Object>> getWhereHql(String entityName, String modelName, boolean enableSort);\n\n /**\n * 生成查询条数的语句\n * @param entityName\n * @param modelName\n * @return\n */\n KeyValuePair<String, Map<String, Object>> getCountHql(String entityName, String modelName);\n}", "void addRequestExtension(Class fromClass, UnmarshalledExtension extension);", "public Builder setExtension(char key, String value) {\n/* 1645 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "interface WithEncryption {\n /**\n * Specifies the encryption property: Encryption property can be used to encrypt data at rest with customer\n * managed keys or platform managed keys..\n *\n * @param encryption Encryption property can be used to encrypt data at rest with customer managed keys or\n * platform managed keys.\n * @return the next definition stage.\n */\n Update withEncryption(Encryption encryption);\n }", "GetExtensionsResponse getExtensions(GetExtensionsRequest request);", "private String getElementRefExt(Node elementRefNode, XmlProcessor simpleXmlProcessor)\n\t\t\tthrows XPathExpressionException {\n\t\tString extension = \"\";\n\t\tif (elementRefNode.hasChildNodes()) {\n\t\t\tNode childNode = elementRefNode.getFirstChild();\n\t\t\tif (\"attribute\".equals(childNode.getNodeName())) {\n\t\t\t\textension = childNode.getAttributes().getNamedItem(ATTR_UUID).getNodeValue();\n\t\t\t}\n\t\t} else {\n\t\t\tString id = elementRefNode.getAttributes().getNamedItem(ID).getNodeValue();\n\t\t\tNode qdmNode = simpleXmlProcessor.findNode(simpleXmlProcessor.getOriginalDoc(),\n\t\t\t\t\t\"/measure/elementLookUp/qdm[@uuid='\" + id + \"']\");\n\t\t\tif (qdmNode != null) {\n\t\t\t\tString dataType = qdmNode.getAttributes().getNamedItem(DATATYPE).getNodeValue();\n\t\t\t\tString qdmName = qdmNode.getAttributes().getNamedItem(NAME).getNodeValue();\n\t\t\t\textension = qdmName + \"_\" + dataType;\n\t\t\t\tif (qdmNode.getAttributes().getNamedItem(INSTANCE) != null) {\n\t\t\t\t\textension = qdmNode.getAttributes().getNamedItem(INSTANCE).getNodeValue() + \"_\" + extension;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn StringUtils.deleteWhitespace(extension);\n\t}", "private void addFeatureFieldGetSet(FeatureImpl fi) {\n this.fi = fi;\n featureFieldName = getFeatureFieldName(fi);\n rangeJavaDescriptor = fi.getRangeAsJavaDescriptor();\n \n addFeatureField(); // add declares for fields\n addFeatureGetSet();\n TypeImpl range = (TypeImpl) fi.getRange();\n if (range.isArray()) {\n rangeArrayElementJavaDescriptor = fi.getRangeArrayElementAsJavaDescriptor();\n addArrayFeatureGetSet();\n }\n }", "public static MemberExpression field(Expression expression, String fieldName) { throw Extensions.todo(); }", "public Collection<Collection<T>> getExtensions();", "@Override\r\n public void addExtension(String name, Class<? extends IExtension> cls) {\n this.DecoratedSortAlgo.addExtension(name, cls);\r\n }", "public Builder addExtensions(\n int index, io.envoyproxy.envoy.config.core.v3.Extension.Builder builderForValue) {\n if (extensionsBuilder_ == null) {\n ensureExtensionsIsMutable();\n extensions_.add(index, builderForValue.build());\n onChanged();\n } else {\n extensionsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }", "public interface CollectionField extends RelationField {\n\n}", "@Deprecated\n @Override\n public Having getQueryHaving() {\n throw new UnsupportedOperationException(\"Druid havings are being split from the ApiRequest model and should \" +\n \"be handled separately.\");\n }", "Builder addAdditionalType(String value);", "int updateByExampleSelective(@Param(\"record\") CompanyExtend record, @Param(\"example\") CompanyExtendExample example);", "@Override\r\n\tpublic BasicDBObject getExpression() {\n\t\treturn null;\r\n\t}", "default void add(Criteria... criteria) {\n legacyOperation();\n }", "public ListInfrastructure fieldSelector(String fieldSelector) {\n put(\"fieldSelector\", fieldSelector);\n return this;\n }", "@Override\n public Function<String, Predicate<String>> getFieldFilter() {\n return index -> field -> true;\n }", "public void fieldChanged(Field field, int context) {\n}", "public Extension getExtension() {\n return extension;\n }", "Builder addExampleOfWork(CreativeWork value);", "ExtensionsType getExtensions();", "DoSearch extension(String... extensions);", "public Binding setIsExtensible(BooleanDt theValue) {\n\t\tmyIsExtensible = theValue;\n\t\treturn this;\n\t}", "Extensions getExtensions() {\n return this.extensions;\n }", "void extend();", "private void addColumnInPath(String key) {\n _queryBuilder.addColumn(key);\n _queryBuilder.addTable(TableMetaData.KEY_TABLE_PATH);\n }", "public interface IPropertyQuery {\n\n\t/**\n\t * Add an equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic abstract QueryElement addEquals(String property, Object value);\n\n\t/**\n\t * Add an equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic abstract QueryElement addLike(String property, Object value);\n\n\t/**\n\t * Add an equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic abstract QueryElement addNotEquals(String property, Object value);\n\n\t/**\n\t * Add an OR equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic abstract QueryElement addOrEquals(String property, Object value);\n\n\t/**\n\t * Add an OR LIKE option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic abstract QueryElement addOrLike(String property, Object value);\n\n\t/**\n\t * Add an OR Not Equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic abstract QueryElement addOrNotEquals(String property, Object value);\n\n\t/**\n\t * Add a greater option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic QueryElement addGreaterThen(String property, Object value);\n\n\t/**\n\t * Add a greater equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic QueryElement addGreaterEqualsThen(String property, Object value);\n\n\t/**\n\t * Add a lower option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic QueryElement addLowerThen(String property, Object value);\n\n\t/**\n\t * Add a lower equals option.\n\t * @param property\n\t * @param value\n\t */\n\tpublic QueryElement addLowerEqualsThen(String property, Object value);\n\n\t/**\n\t * Add a query element.\n\t * @param element\n\t */\n\tpublic void addQueryElement(QueryElement element);\n\n\t/**\n\t * Returns the number of elements.\n\t * @return\n\t */\n\tpublic abstract int size();\n\n\t/**\n\t * Removes all elements.\n\t *\n\t */\n\tpublic abstract void clear();\n\n\t/**\n\t * @return the hideDeleted\n\t */\n\tpublic abstract boolean isHideDeleted();\n\n\t/**\n\t * @param hideDeleted the hideDeleted to set\n\t */\n\tpublic abstract void setHideDeleted(boolean hideDeleted);\n\n\t/**\n\t * Same as <code>addLike(..)</code> but with checking clients wildcard preferences\n\t * for String searches. <p>\n\t * \n\t * If default constructor is used, this method acts exactly like the normal <code>addLike(..)</code> method.\n\t * \n\t * @param property\n\t * @param value\n\t */\n\tQueryElement addLikeWithWildcardSetting(String property, String value);\n\n\t/**\n\t * @param property\n\t * @param value\n\t */\n\tQueryElement addOrLikeWithWildcardSetting(String property, String value);\n\n\t/**\n\t * @param property\n\t * @param values\n\t */\n\tQueryElement addIn(String property, Collection<?> values);\n\n\t/**\n\t * @param property\n\t * @param values\n\t */\n\tQueryElement addNotIn(String property, Collection<?> values);\n\n\t/**\n\t * @param property\n\t * @param values\n\t */\n\tQueryElement addOrIn(String property, Collection<?> values);\n\n\t/**\n\t * @param property\n\t * @param values\n\t */\n\tQueryElement addOrNotIn(String property, Collection<?> values);\n\n\t/**\n\t * Add collection empty property.\n\t * @param collectionProperty\n\t */\n\tQueryElement addEmpty(String collectionProperty);\n\n\t/**\n\t * Add or collection empty property.\n\t * @param collectionProperty\n\t */\n\tQueryElement addOrEmpty(String collectionProperty);\n\n\t/**\n\t * Add collection not empty property.\n\t * @param collectionProperty\n\t */\n\tQueryElement addNotEmpty(String collectionProperty);\n\n\t/**\n\t * Add or collection not empty property.\n\t * @param collectionProperty\n\t */\n\tQueryElement addOrNotEmpty(String collectionProperty);\n\n}", "protected String buildFieldExp(Field field) {\n final StringBuilder sb = new StringBuilder();\n sb.append(field.getDeclaringClass().getSimpleName());\n final Type genericType = field.getGenericType();\n final String typeExp = genericType != null ? genericType.getTypeName() : field.getType().getSimpleName();\n sb.append(\"@\").append(field.getName()).append(\": \").append(typeExp);\n final Class<?> genericBeanType = getFieldGenericType(field);\n sb.append(genericBeanType != null ? \"<\" + genericBeanType.getSimpleName() + \">\" : \"\");\n return sb.toString();\n }", "public ExtensionPredicateEvaluationFailedErrorBuilder errorByExtension(\n final com.commercetools.api.models.error.ErrorByExtension errorByExtension) {\n this.errorByExtension = errorByExtension;\n return this;\n }", "public interface RegionColumns extends ExtendedColumns {\n\n String NAME = \"name\";\n String COUNTRY_ID = \"country_id\";\n}", "int updateByExample(@Param(\"record\") CompanyExtend record, @Param(\"example\") CompanyExtendExample example);", "Boolean supportsMultipleExtensions();", "public interface ICatalogExtension\r\n{\r\n /** Property changed keys */\r\n String PROPERTIES = \"properties\";\r\n\r\n /** Get title of extension */\r\n String getTitle();\r\n\r\n /** Get default alias of catalog */\r\n String getDefaultAlias();\r\n\r\n /**\r\n * Get properties for this extension. Is the properties that is stored/loaded ie. config/settings.\r\n */\r\n default Map<String, Object> getProperties()\r\n {\r\n return emptyMap();\r\n }\r\n\r\n /**\r\n * Load the extension with provided properties\r\n *\r\n * @param properties Propeties to load into extension\r\n */\r\n default void load(Map<String, Object> properties)\r\n {\r\n }\r\n\r\n /**\r\n * Setup session before query is executed. Ie. set selected database/index etc.\r\n *\r\n * @param catalogAlias Alias that this extension/catalog has been given\r\n * @param querySession Current query session\r\n **/\r\n default void setup(String catalogAlias, QuerySession querySession)\r\n {\r\n }\r\n\r\n /**\r\n * Update the extension based on the query session. Ie acting upon changed variables etc.\r\n *\r\n * @param catalogAlias Alias that this extension/catalog has been given\r\n * @param querySession Current query session\r\n **/\r\n default void update(String catalogAlias, QuerySession querySession)\r\n {\r\n }\r\n\r\n /**\r\n * Get configuration component. Will be showed in a dialog for setting up the extension\r\n */\r\n default Component getConfigComponent()\r\n {\r\n return null;\r\n }\r\n\r\n /**\r\n * Get quick properties component. Will be showed in extensions side bar with quick properties. Ie. selected. database/index.\r\n */\r\n default Component getQuickPropertiesComponent()\r\n {\r\n return null;\r\n }\r\n\r\n /** Get the actual catalog implementation for this extension */\r\n Catalog getCatalog();\r\n\r\n /** Handle provided exception\r\n * @param querySession Current query session\r\n * @param exception Exception to handle\r\n **/\r\n default ExceptionAction handleException(QuerySession querySession, CatalogException exception)\r\n {\r\n return ExceptionAction.NONE;\r\n }\r\n\r\n /**\r\n * Add property change listener\r\n *\r\n * @param listener Listener to add\r\n **/\r\n default void addPropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }\r\n\r\n /**\r\n * Remove property change listener\r\n *\r\n * @param listener Listener to remove\r\n **/\r\n default void removePropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }\r\n\r\n /** Action that should be performed after handling of an Exception */\r\n enum ExceptionAction\r\n {\r\n /** Do nothing action */\r\n NONE,\r\n /** Re-run query. */\r\n RERUN;\r\n }\r\n}", "String getViewExtension();", "QueryBuilder forFields(List<FieldUsage> fields);", "public OrderSetCustomTypeActionBuilder withFields(\n Function<com.commercetools.api.models.type.FieldContainerBuilder, com.commercetools.api.models.type.FieldContainer> builder) {\n this.fields = builder.apply(com.commercetools.api.models.type.FieldContainerBuilder.of());\n return this;\n }", "ExtensionType createExtensionType();", "protected String addMethodInfoField(int modifiers, CtClass addTo, MethodTransformation trans, CtField.Initializer init) throws NotFoundException, CannotCompileException\n {\n String name = getMethodInfoFieldName(trans.getOriginalName(), trans.getHash());\n TransformerCommon.addInfoField(instrumentor, METHOD_INFO_CLASS_NAME, name, modifiers, addTo, addInfoAsWeakReference(), init);\n \n return name;\n }" ]
[ "0.61224765", "0.5882069", "0.5504599", "0.5276789", "0.52350646", "0.5198318", "0.5171477", "0.49845332", "0.4977796", "0.4952428", "0.4909626", "0.4832812", "0.48099414", "0.47729287", "0.47682184", "0.47651827", "0.4761927", "0.47594452", "0.47567418", "0.47252786", "0.47220343", "0.47175723", "0.4715463", "0.47001898", "0.46722394", "0.46655947", "0.4654152", "0.46461776", "0.46460742", "0.46311843", "0.46309745", "0.4619446", "0.46114886", "0.45843175", "0.4583759", "0.4564256", "0.4555243", "0.45393094", "0.4536539", "0.45293123", "0.45223442", "0.4505824", "0.4488052", "0.44829565", "0.44716686", "0.44693297", "0.446088", "0.4449947", "0.44378108", "0.44348547", "0.4434708", "0.44281107", "0.44215447", "0.44198045", "0.44168875", "0.44136694", "0.4405578", "0.4403256", "0.43979394", "0.4395555", "0.43893066", "0.438839", "0.4384915", "0.43845618", "0.43828544", "0.4380464", "0.43781945", "0.43727577", "0.43724692", "0.43671936", "0.43655768", "0.43579566", "0.43550932", "0.43502814", "0.43461552", "0.43411604", "0.43375194", "0.43372053", "0.43346962", "0.43312535", "0.4326728", "0.43265873", "0.4322781", "0.43203607", "0.43187854", "0.43179494", "0.43155918", "0.43119335", "0.43093616", "0.43058503", "0.4304095", "0.43031126", "0.43029857", "0.4299652", "0.42934373", "0.4293071", "0.4290425", "0.4289981", "0.4289885", "0.42892203", "0.42881557" ]
0.0
-1
Fetches the CustomerCompany entities (one to many) associated with this entity. This corresponds to the OData navigation property to_CustomerCompany. Please note: This method will not cache or persist the query results.
@Nonnull public List<CustomerCompany> fetchCustomerCompany() throws ODataException { if (erpConfigContext == null) { throw new ODataException(ODataExceptionType.OTHER, "Failed to fetch related objects of type CustomerCompany.", new IllegalStateException("Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.")); } final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection()); odataResourceUrl.append("("); odataResourceUrl.append("Customer="); odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer)); odataResourceUrl.append(")/"); odataResourceUrl.append("to_CustomerCompany"); final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata(); final ODataQuery query = builder.build(); final ODataQueryResult result = query.execute(erpConfigContext); final List<CustomerCompany> entityList = result.asList(CustomerCompany.class); for (CustomerCompany entity: entityList) { entity.setErpConfigContext(erpConfigContext); entity.setServicePathForFetch(getServicePathForFetch()); } return entityList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n public List<CustomerCompany> getCustomerCompanyOrFetch()\n throws ODataException\n {\n if (toCustomerCompany == null) {\n toCustomerCompany = fetchCustomerCompany();\n }\n return toCustomerCompany;\n }", "public List<CustomerCompany> getAllCustomerCompanies() \n\t{\n\t\treturn this.entityManager.createNamedQuery(\"CustomerCompany.listAll\", CustomerCompany.class).getResultList();\n\t}", "@Nonnull\n public Optional<List<CustomerCompany>> getCustomerCompanyIfPresent() {\n return Optional.ofNullable(toCustomerCompany);\n }", "public List<Company> getCompanys() {\n\t\treturn companyDao.findAll();\n//\t\treturn companies;\n\t}", "@Override\n\tpublic List<Company> queryCompanyAll() {\n\t\treturn companyDao.queryCompanyAll();\n\t}", "public CustomerCompany findCustomerCompany(Long id) \n\t{\n\t\treturn this.entityManager.find(CustomerCompany.class, id);\n\t}", "public java.util.Set<vn.com.phuclocbao.entity.CompanyEntity> getCompanies()\n {\n return companies;\n }", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "public java.util.List<contactsapi.company.CompanyResponse> getCompaniesList() {\n return companies_;\n }", "public List<ManagedCompany> getManagedCompanies() {\n \n List<ManagedCompany> results = new ArrayList<>();\n \n try {\n Connection conn = this.databaseUtils.getConnection();\n dao.setConnection(conn);\n results = dao.getItems();\n } catch (SQLException e) {\n Logger.getLogger(AppService.class.getName()).log(Level.SEVERE, null, e);\n }\n \n return results;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Company> loadAll() {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Company\").list();\r\n\t}", "public CompanyTO getCompany() {\n\t\t\r\n\t\treturn CompanyService.getInstance().getCompany();\r\n\t}", "public List<TmCompany> findAll() {\n\t\treturn tmCompanyDao.findAll();\r\n\t}", "@Override\n\tpublic List<Company> getAll() {\n\t\treturn dao.getAll();\n\t}", "public List<Company> companies() {\n StandardServiceRegistry registry = new StandardServiceRegistryBuilder().configure().build();\n SessionFactory sessionFactory = null;\n try {\n\n sessionFactory = new MetadataSources(registry).buildMetadata().buildSessionFactory();\n Session session = sessionFactory.getCurrentSession();\n session.beginTransaction();\n List<Company> listOfCompanies = session.createQuery(\"FROM Company\").getResultList();\n session.getTransaction().commit();\n return listOfCompanies;\n\n } finally {\n if (sessionFactory != null) {\n sessionFactory.close();\n }\n }\n }", "public void setCustomerCompany(\n @Nonnull\n final List<CustomerCompany> value) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.clear();\n toCustomerCompany.addAll(value);\n }", "protected List<CompaniesContactsEntity> findByIdCompany(CompaniesEntity companiesEntity) {\n\n log.info(\"CompaniesContactsBean => method : findByIdCompany()\");\n\n FacesMessage facesMessage;\n\n if (companiesContactsEntity == null) {\n log.error(\"Companies entity is null\");\n facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"company.error\"), null);\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\n return null;\n }\n\n EntityManager em = EMF.getEM();\n\n List<CompaniesContactsEntity> companiesContactsEntities = companiesContactsDao.findByIdCompany(em, companiesEntity.getId());\n\n em.clear();\n em.close();\n\n return companiesContactsEntities;\n }", "@Override\r\n\tpublic List<Company> getAllCompanies() {\r\n\t\tString methodName = \"getAllCompanies()\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\treturn companyRepository.findAll();\r\n\t\t\r\n\t}", "public List<Company> getAllCompanies() {\n\t\treturn Validations.VerifyNotEmpty(companyRepository.findAll());\n\t}", "public ArrayList<Company> getCompaniesFromCache() {\n\n ParseQuery<Company> query = ParseQuery.getQuery(PARSE_NAME);\n query.fromLocalDatastore();\n\n try {\n return new ArrayList<>(query.find());\n } catch (ParseException e) {\n Log.e(PARSE_NAME, \"Unable to find any merchants from local data store:\\n\" + e.getMessage());\n }\n\n return new ArrayList<>();\n }", "public List<Company> getCompanies() throws BusinessException {\n\t\tList<Company> lstCompanies = new ArrayList<Company>();\n\n\t\ttry {\n\n\t\t\tList<Object> list = UtilSession.getObjectsByNamedQuery(this.em, Company.FIND_COMPANIES, null);\n\n\t\t\tfor (Object object : list) {\n\t\t\t\tCompany vnt = (Company) object;\n\t\t\t\tlstCompanies.add(vnt);\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tString s = \"Error al consultar las compa�ias\";\n\t\t\t_logger.error(s, ex);\n\t\t\tthrow new BusinessException(s, ex);\n\t\t}\n\n\t\t\n\n\t\treturn lstCompanies;\n\n\t}", "public Company getCompany() {\n\t\treturn company;\n\t}", "public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }", "public java.util.List<contactsapi.company.CompanyResponse> getCompaniesList() {\n if (companiesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(companies_);\n } else {\n return companiesBuilder_.getMessageList();\n }\n }", "public List<Company> getAllCompanies() {\n\t\t \n\t List<Company> listOfCompanies = new ArrayList<Company>();\n\n\t Cursor cursor = mDatabase.query(MySQLiteHelper.TABLE_COMPANIES,\n\t mAllColumns, null, null, null, null, null);\n\n\t cursor.moveToFirst();\n\t while (!cursor.isAfterLast()) {\n\t Company hunt = cursorToCompany(cursor);\n\t listOfCompanies.add(hunt);\n\t cursor.moveToNext();\n\t }\n\t \n\t cursor.close();\n\t return listOfCompanies;\n\t }", "public List<Customer> getByCompanyName(String company) throws CustomerNotFoundException {\r\n try {\r\n return this.entityManager.createQuery(\"select customer from Customer as customer where customer.company=:company\")\r\n .setParameter(\"company\", company)\r\n .getResultList();\r\n } catch (Exception e) {\r\n throw new CustomerNotFoundException();\r\n }\r\n }", "@Override\n\tpublic Collection<String> getCompanyList() {\n\t\treturn getHibernateTemplate().execute(new HibernateCallback<String, Collection<String>>(\"getCompanyList\") {\n\t\t\t@Override\n\t\t\tpublic Collection<String> doInHibernate(final Session session) {\n\t\t\t\tfinal Criteria criteria = session.createCriteria(getEntityClass());\n\t\t\t\tcriteria.setProjection(Projections.property(\"name\"));\n\t\t\t\tcriteria.addOrder(Order.asc(\"name\"));\n\t\t\t\treturn criteria.list();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "Company getCompany(int id);", "@Override\r\n\tpublic ArrayList<Company> getAllCompanies() throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tArrayList<Company> allCompanies = new ArrayList<>();\r\n\t\t\tString sql = \"select * from companies\";\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tCompany comp = new Company(rs.getInt(\"companyId\"), rs.getString(\"companyName\"),\r\n\t\t\t\t\t\trs.getString(\"companyEmail\"), rs.getString(\"companyPass\"));\r\n\t\t\t\tallCompanies.add(comp);\r\n\t\t\t}\r\n\t\t\treturn allCompanies;\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"getAllCompanies Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Long getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "public static void showCompanies(){\n\t\tCompanyDao.getAllCompanies();\n\t}", "public Company getCompany() {\r\n return this.company;\r\n }", "List<Company> getCompanyList() throws DAOException ;", "public Long getCompanyId() {\n return companyId;\n }", "@Nonnull\n public List<CustomerSalesArea> fetchCustomerSalesArea()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerSalesArea.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerSalesArea\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerSalesArea> entityList = result.asList(CustomerSalesArea.class);\n for (CustomerSalesArea entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@GET\n\t@Path(\"getByName\")\n\tpublic List<Customer> getByName(@QueryParam(\"companyname\") String companyname) {\n\t\treturn ManagerHelper.getCustomerManager().getByName(companyname);\n\t}", "public java.util.List<? extends contactsapi.company.CompanyResponseOrBuilder> \n getCompaniesOrBuilderList() {\n return companies_;\n }", "public void addCustomerCompany(CustomerCompany... entity) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.addAll(Lists.newArrayList(entity));\n }", "public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "public CompanyEntity[] getAllCompanies() throws Exception {\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n\n try {\n //Establish a connection from the connection manager\n connection = JdbcUtils.getConnection();\n\n //Creating the SQL query\n String sqlStatement = \"SELECT * FROM companies\";\n\n //Combining between the syntax and our connection\n preparedStatement = connection.prepareStatement(sqlStatement);\n\n //Executing the update\n ResultSet resultSet = preparedStatement.executeQuery();\n\n if (!resultSet.next()) {\n throw new ApplicationException(ErrorType.GENERAL_ERROR, \"Cannot retrieve information\");\n }\n// getting the number of rows returned to create an array of companies\n int numberOfRows = MyUtils.getRowCount(resultSet);\n if (numberOfRows == 0) {\n throw new ApplicationException(ErrorType.GENERAL_ERROR, \"0 companies in the table\");\n }\n// creating an array of companies\n CompanyEntity[] companies = new CompanyEntity[numberOfRows];\n int i = 0;\n while (resultSet.next()) {\n companies[i].setCompanyId(resultSet.getLong(\"id\"));\n companies[i].setCompanyName(resultSet.getString(\"company_name\"));\n companies[i].setCompanyEmail(resultSet.getString(\"company_email\"));\n companies[i].setCompanyPhone(resultSet.getString(\"company_phone\"));\n companies[i].setCompanyAddress(resultSet.getString(\"company_address\"));\n i++;\n }\n\n return companies;\n\n } catch (Exception e) {\n //\t\t\te.printStackTrace();\n throw new Exception(\"Failed to retrieve data\", e);\n } finally {\n //Closing the resources\n JdbcUtils.closeResources(connection, preparedStatement);\n }\n }", "@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> customers() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QCustomer qcustomer = QCustomer.customer;\r\n List<Customer> customers = (List<Customer>) query.from(qcustomer).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn customers;\r\n }", "public ManagedCompany getManagedCompany(int id) {\n \n ManagedCompany result = null;\n \n try {\n Connection conn = this.databaseUtils.getConnection();\n dao.setConnection(conn);\n result = dao.getItemById(id);\n } catch (SQLException e) {\n Logger.getLogger(AppService.class.getName()).log(Level.SEVERE, null, e);\n }\n \n return result;\n }", "public Integer getCompanyId() {\n return this.companyId;\n }", "@Override\r\n\tpublic List<Company> getCompanyList() throws SQLException {\n\r\n\t\tList<Company> companies = new ArrayList<>();\r\n\t\tcompanyRepository.findAll().forEach(companies::add);\r\n\r\n\t\treturn companies;\r\n\t}", "@Override\n\tpublic List<Company> getAll(Page<Company,Long> page) {\n\t\t\treturn dao.getAll(companyPageMapper.pageToDaoRequestParameter(page));\n\t}", "public String getCompany() {\r\n\t\treturn company;\r\n\t}", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public ArrayList<Coupon> getCompanyCoupons() throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "@Override\r\n\tpublic List<Address> getAddressByCustomerId(int customerId, int companyId) {\n\t\treturn getAddressDAO().getAddressByCustomerId(customerId,companyId);\r\n\t}", "public String getCompany() {\n return (String) get(\"company\");\n }", "public String getCompany() {\n\t\treturn company;\n\t}", "public String getCompany() {\n\t\treturn company;\n\t}", "public String getCompanyId() {\n return companyId;\n }", "public ArrayList<Company> getAllCompanies() throws Exception {\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\t\t\tconnection = JdbcUtils.getConnection();\n\n\t\t\t// Creating the SQL query\n\t\t\tString sqlStatement = \"SELECT * FROM companies\";\n\n\t\t\t// Combining between the syntax and our connection\n\t\t\tpreparedStatement = connection.prepareStatement(sqlStatement);\t\t\t\n\n\t\t\t// Executing the query\n\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\tArrayList<Company> allCompanies = new ArrayList<Company>(); \n\t\t\t\n\t\t\twhile (resultSet.next()) {\n\t\t\t\t\n\t\t\t\tLong id = resultSet.getLong(\"Company_Id\");\n\t\t\t\tString name = resultSet.getString(\"Company_NAME\");\n\t\t\t\tallCompanies.add(new Company(id, name));\n\t\t\t}\n\t\t\treturn allCompanies;\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// **If there was an exception in the \"try\" block above, it is caught here and\n\t\t\t// notifies a level above.\n\t\t\te.printStackTrace();\n\t\t\tthrow new ApplicationException(e,ErrorType.GENERAL_ERROR,\n\t\t\t\t\tDateUtils.getCurrentDateAndTime() + \"FAILED to return all companies\");\n\n\t\t\t// Closing the resources\n\t\t\t} finally {\n\t\t\t\tJdbcUtils.closeResources(connection, preparedStatement,resultSet);\n\t\t\t}\t\n\t\t}", "public Company getCompany() {\n return company;\n }", "@Override\n\tpublic List<CompanyVO> getCompanyInfo(String c_name) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Uni<List<Customer>> findAllCustomer() {\n\t\treturn repo.findAll().list();\n\t}", "public long getCompanyId() {\n return companyId;\n }", "@Override\r\n\tpublic Company getAllCompaniesById(Integer id) {\r\n\t\tString methodName = \"getAllCompaniesById(Integer id)\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\tlog.debug(\"id value is::\"+id);\r\n\t\treturn companyRepository.findCompanyById(id.longValue());\r\n\t}", "public String getContactCompany() {\n return contactCompany;\n }", "@Override\n\tpublic ContactCompanyAg fetchByPrimaryKey(Serializable primaryKey)\n\t\tthrows SystemException {\n\t\treturn fetchByPrimaryKey((String)primaryKey);\n\t}", "public abstract List<Company> getAll();", "public String getCompany() {\n return company;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\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 company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Company findCompany(long id);", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _expandoColumn.getCompanyId();\n\t}", "public String getCompanyContact() {\n\t\treturn companyContact;\n\t}", "@Override\r\n\tpublic synchronized List<Company> getAllCompanies() throws Exception {\r\n\r\n\t\tconnectionPool = ConnectionPool.getInstance();\r\n\t\tConnection connection = connectionPool.getConnection();\r\n\t\tList<Company> list = new ArrayList<>();\r\n\t\tString sql = \"select * from Company\";\r\n\t\ttry (PreparedStatement preparedStatement = connection.prepareStatement(sql); ResultSet resultSet = preparedStatement.executeQuery()) {\r\n\r\n\t\t\twhile (resultSet.next()) {\r\n\t\t\t\tlong companyId = resultSet.getLong(1);\r\n\t\t\t\tString companyName = resultSet.getString(2);\r\n\t\t\t\tString companyPassword = resultSet.getString(3);\r\n\t\t\t\tString companyEmail = resultSet.getString(4);\r\n\r\n\t\t\t\tlist.add(new Company(companyId, companyName, companyPassword, companyEmail));\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new Exception(\"DB error - unable to get Company data\");\r\n\t\t}catch (Exception e) {\r\n\t\t\tthrow new Exception(\"unable to get Company data\");\r\n\t\t} \r\n\t\tfinally {\r\n\t\t\tconnection.close();\r\n\t\t\tconnectionPool.returnConnection(connection);\r\n\t\t}\r\n\t\treturn list;\r\n\r\n\t}", "public List<CustomerEntity> findAll() {\n\t\treturn customerRepository.findAll();\n\t}", "@RequestMapping(path = \"/listCompanies\", method = RequestMethod.GET)\n\tpublic ResponseEntity<RestResponse<ListCompaniesResponse>> listCompanies() {\n\n\t\tList<CompanyDTO> companies = companyService.listAll();\n\t\t\n\t\tListCompaniesResponse result = new ListCompaniesResponse(companies);\n\t\t\n\t\tRestResponse<ListCompaniesResponse> restResponse = \n\t\t\t\tnew RestResponse<ListCompaniesResponse>(RestResponseCodes.OK.getCode(), RestResponseCodes.OK.getDescription(), result);\n\t\t\n\t\treturn new ResponseEntity<RestResponse<ListCompaniesResponse>>(restResponse, HttpStatus.OK);\n\t\t\n\t}", "@Override\n\tpublic List<Company> getSome(Page<Company,Long> page) {\n\t\treturn dao.getSome(companyPageMapper.pageToDaoRequestParameter(page));\n\t}", "@Nonnull\n public Customer.CustomerBuilder customerCompany(CustomerCompany... value) {\n return toCustomerCompany(Lists.newArrayList(value));\n }", "public String getCompany()\n\t{\n\t\treturn getCompany( getSession().getSessionContext() );\n\t}", "public List<Customer> getAllCustomers() {\n Query query = em.createNamedQuery(\"Customer.findAll\");\r\n // return query result\r\n return query.getResultList();\r\n }", "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}", "@Override\n\tpublic List<Customer> findAllCustomer() {\n\t\treturn customerDao.findAllCustomer();\n\t}", "@OneToMany(mappedBy=\"tblContactperson\")\n\tpublic Set<TblCustomer> getTblCustomers() {\n\t\treturn this.tblCustomers;\n\t}", "public int getCompanyId() {\n return companyId;\n }", "@PreAuthorize(\"#oauth2.hasAnyScope('read','write','read-write')\")\n\t@RequestMapping(method = GET)\n\tpublic Mono<ResponseEntity<List<Customer>>> allCustomers() {\n\n\t\treturn repo.findAll().collectList()\n\t\t\t.filter(customers -> customers.size() > 0)\n\t\t\t.map(customers -> ok(customers))\n\t\t\t.defaultIfEmpty(noContent().build());\n\t}", "public contactsapi.company.CompanyResponse getCompanies(int index) {\n return companies_.get(index);\n }", "public void setCompanies(java.util.Set<vn.com.phuclocbao.entity.CompanyEntity> _companies)\n {\n companies = _companies;\n }", "@Transactional(readOnly = true)\n @PreAuthorize(\"hasRole('COMPANY_READER')\")\n public List<Company> getAll() {\n return companyRepository.findAll();\n }", "@Override\r\n\tpublic Company getDetailByCompanyName(String companyName) {\n\t\treturn companyRepository.findByCompanyName(companyName);\r\n\t}", "public List<Customermodel> getCustomers() {\n\t return customerdb.findAll();\n\t }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _second.getCompanyId();\n\t}", "@Secured({ })\n\t@RequestMapping(value = \"/contacts/findBycompany/{key}\", method = RequestMethod.GET, headers = \"Accept=application/json\")\n\tpublic List<Contact> findBycompany(@PathVariable(\"key\") Long idcompany) {\n\t\tList<Contact> list = contactService.findBycompany(idcompany);\n\t\treturn list;\n\t}", "@Accessor(qualifier = \"Customers\", type = Accessor.Type.GETTER)\n\tpublic Collection<B2BCustomerModel> getCustomers()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CUSTOMERS);\n\t}", "public java.lang.String getDocumentCompany() {\n return documentCompany;\n }", "public String getCompany() {\n return company;\n }", "public String getCompany() {\n return company;\n }", "@Nonnull\n public List<CustomerSalesArea> getCustomerSalesAreaOrFetch()\n throws ODataException\n {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = fetchCustomerSalesArea();\n }\n return toCustomerSalesArea;\n }", "public List<Customer> findAll(){\n\t\treturn custRepo.findAll();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _changesetEntry.getCompanyId();\n\t}" ]
[ "0.75135547", "0.6774072", "0.6482454", "0.62726074", "0.626441", "0.6234246", "0.61896634", "0.61328584", "0.6039623", "0.5982864", "0.59745353", "0.5958784", "0.5958217", "0.5920993", "0.5838481", "0.58315647", "0.5818488", "0.57849085", "0.57226574", "0.56861615", "0.567383", "0.56544054", "0.5634986", "0.5625119", "0.55959845", "0.5555947", "0.5508961", "0.55073965", "0.5481087", "0.5461873", "0.5460516", "0.5441957", "0.54296225", "0.5420322", "0.5408275", "0.5407436", "0.5388475", "0.5348323", "0.5338059", "0.533671", "0.53325826", "0.53272134", "0.5323391", "0.5313908", "0.53137237", "0.52868384", "0.5256892", "0.5248511", "0.5248511", "0.52457136", "0.52423406", "0.5240044", "0.5228718", "0.5228718", "0.52279836", "0.52200365", "0.52190775", "0.51968294", "0.5195903", "0.5194934", "0.51913184", "0.51807916", "0.5177181", "0.51765406", "0.516588", "0.5163544", "0.5163544", "0.5156762", "0.5152544", "0.5148432", "0.5148432", "0.5148432", "0.51323396", "0.5119699", "0.5110446", "0.5106652", "0.5104152", "0.5101644", "0.5100661", "0.5099862", "0.5096765", "0.508757", "0.50867456", "0.5085403", "0.5065675", "0.50575626", "0.5052211", "0.5050281", "0.50482917", "0.50389504", "0.5035755", "0.50313324", "0.50257814", "0.5025613", "0.5018179", "0.5004135", "0.5004135", "0.49856773", "0.49843323", "0.4981438" ]
0.8117027
0
Retrieval of associated CustomerCompany entities (one to many). This corresponds to the OData navigation property to_CustomerCompany. If the navigation property to_CustomerCompany of a queried Customer is operated lazily, an ODataException can be thrown in case of an OData query error. Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations.
@Nonnull public List<CustomerCompany> getCustomerCompanyOrFetch() throws ODataException { if (toCustomerCompany == null) { toCustomerCompany = fetchCustomerCompany(); } return toCustomerCompany; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n public List<CustomerCompany> fetchCustomerCompany()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerCompany.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerCompany\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerCompany> entityList = result.asList(CustomerCompany.class);\n for (CustomerCompany entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@Nonnull\n public Optional<List<CustomerCompany>> getCustomerCompanyIfPresent() {\n return Optional.ofNullable(toCustomerCompany);\n }", "public java.util.Set<vn.com.phuclocbao.entity.CompanyEntity> getCompanies()\n {\n return companies;\n }", "@Nonnull\n public List<CustomerSalesArea> fetchCustomerSalesArea()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerSalesArea.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerSalesArea\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerSalesArea> entityList = result.asList(CustomerSalesArea.class);\n for (CustomerSalesArea entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "public List<CustomerCompany> getAllCustomerCompanies() \n\t{\n\t\treturn this.entityManager.createNamedQuery(\"CustomerCompany.listAll\", CustomerCompany.class).getResultList();\n\t}", "public CompanyTO getCompany() {\n\t\t\r\n\t\treturn CompanyService.getInstance().getCompany();\r\n\t}", "public List<Company> getCompanys() {\n\t\treturn companyDao.findAll();\n//\t\treturn companies;\n\t}", "@Nonnull\n public List<CustomerSalesArea> getCustomerSalesAreaOrFetch()\n throws ODataException\n {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = fetchCustomerSalesArea();\n }\n return toCustomerSalesArea;\n }", "public List<ManagedCompany> getManagedCompanies() {\n \n List<ManagedCompany> results = new ArrayList<>();\n \n try {\n Connection conn = this.databaseUtils.getConnection();\n dao.setConnection(conn);\n results = dao.getItems();\n } catch (SQLException e) {\n Logger.getLogger(AppService.class.getName()).log(Level.SEVERE, null, e);\n }\n \n return results;\n }", "public java.util.List<contactsapi.company.CompanyResponse> getCompaniesList() {\n return companies_;\n }", "public CustomerCompany findCustomerCompany(Long id) \n\t{\n\t\treturn this.entityManager.find(CustomerCompany.class, id);\n\t}", "public List<Company> companies() {\n StandardServiceRegistry registry = new StandardServiceRegistryBuilder().configure().build();\n SessionFactory sessionFactory = null;\n try {\n\n sessionFactory = new MetadataSources(registry).buildMetadata().buildSessionFactory();\n Session session = sessionFactory.getCurrentSession();\n session.beginTransaction();\n List<Company> listOfCompanies = session.createQuery(\"FROM Company\").getResultList();\n session.getTransaction().commit();\n return listOfCompanies;\n\n } finally {\n if (sessionFactory != null) {\n sessionFactory.close();\n }\n }\n }", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "public Company getCompany() {\n\t\treturn company;\n\t}", "public Company getCompany() {\r\n return this.company;\r\n }", "public void setCustomerCompany(\n @Nonnull\n final List<CustomerCompany> value) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.clear();\n toCustomerCompany.addAll(value);\n }", "public List<Company> getCompanies() throws BusinessException {\n\t\tList<Company> lstCompanies = new ArrayList<Company>();\n\n\t\ttry {\n\n\t\t\tList<Object> list = UtilSession.getObjectsByNamedQuery(this.em, Company.FIND_COMPANIES, null);\n\n\t\t\tfor (Object object : list) {\n\t\t\t\tCompany vnt = (Company) object;\n\t\t\t\tlstCompanies.add(vnt);\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tString s = \"Error al consultar las compa�ias\";\n\t\t\t_logger.error(s, ex);\n\t\t\tthrow new BusinessException(s, ex);\n\t\t}\n\n\t\t\n\n\t\treturn lstCompanies;\n\n\t}", "public CustomerEOImpl getCustomerEO() {\r\n return (CustomerEOImpl) getEntity(2);\r\n }", "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 Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }", "@Override\n\tpublic List<Company> queryCompanyAll() {\n\t\treturn companyDao.queryCompanyAll();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Company> loadAll() {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Company\").list();\r\n\t}", "public java.util.List<contactsapi.company.CompanyResponse> getCompaniesList() {\n if (companiesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(companies_);\n } else {\n return companiesBuilder_.getMessageList();\n }\n }", "public Company getCompany() {\n return company;\n }", "public ArrayList<Company> getCompaniesFromCache() {\n\n ParseQuery<Company> query = ParseQuery.getQuery(PARSE_NAME);\n query.fromLocalDatastore();\n\n try {\n return new ArrayList<>(query.find());\n } catch (ParseException e) {\n Log.e(PARSE_NAME, \"Unable to find any merchants from local data store:\\n\" + e.getMessage());\n }\n\n return new ArrayList<>();\n }", "Company getCompany(int id);", "public String getCompany() {\n return (String) get(\"company\");\n }", "@Override\n\tpublic List<Company> getAll() {\n\t\treturn dao.getAll();\n\t}", "@Override\n\tpublic List<CompanyVO> getCompanyInfo(String c_name) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Collection<String> getCompanyList() {\n\t\treturn getHibernateTemplate().execute(new HibernateCallback<String, Collection<String>>(\"getCompanyList\") {\n\t\t\t@Override\n\t\t\tpublic Collection<String> doInHibernate(final Session session) {\n\t\t\t\tfinal Criteria criteria = session.createCriteria(getEntityClass());\n\t\t\t\tcriteria.setProjection(Projections.property(\"name\"));\n\t\t\t\tcriteria.addOrder(Order.asc(\"name\"));\n\t\t\t\treturn criteria.list();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public void addCustomerCompany(CustomerCompany... entity) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.addAll(Lists.newArrayList(entity));\n }", "List<Company> getCompanyList() throws DAOException ;", "public String getContactCompany() {\n return contactCompany;\n }", "public ManagedCompany getManagedCompany(int id) {\n \n ManagedCompany result = null;\n \n try {\n Connection conn = this.databaseUtils.getConnection();\n dao.setConnection(conn);\n result = dao.getItemById(id);\n } catch (SQLException e) {\n Logger.getLogger(AppService.class.getName()).log(Level.SEVERE, null, e);\n }\n \n return result;\n }", "public String getCompany() {\r\n\t\treturn company;\r\n\t}", "@OneToMany(mappedBy=\"tblContactperson\")\n\tpublic Set<TblCustomer> getTblCustomers() {\n\t\treturn this.tblCustomers;\n\t}", "@Override\r\n\tpublic List<Company> getAllCompanies() {\r\n\t\tString methodName = \"getAllCompanies()\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\treturn companyRepository.findAll();\r\n\t\t\r\n\t}", "@Accessor(qualifier = \"Customers\", type = Accessor.Type.GETTER)\n\tpublic Collection<B2BCustomerModel> getCustomers()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CUSTOMERS);\n\t}", "@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> customers() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QCustomer qcustomer = QCustomer.customer;\r\n List<Customer> customers = (List<Customer>) query.from(qcustomer).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn customers;\r\n }", "@Override\n\tpublic List<Company> getSome(Page<Company,Long> page) {\n\t\treturn dao.getSome(companyPageMapper.pageToDaoRequestParameter(page));\n\t}", "public String getCompany() {\n\t\treturn company;\n\t}", "public String getCompany() {\n\t\treturn company;\n\t}", "public java.util.List<? extends contactsapi.company.CompanyResponseOrBuilder> \n getCompaniesOrBuilderList() {\n return companies_;\n }", "@Override\r\n\tpublic List<Company> getCompanyList() throws SQLException {\n\r\n\t\tList<Company> companies = new ArrayList<>();\r\n\t\tcompanyRepository.findAll().forEach(companies::add);\r\n\r\n\t\treturn companies;\r\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _expandoColumn.getCompanyId();\n\t}", "@Override\n\tpublic ContactCompanyAg fetchByPrimaryKey(Serializable primaryKey)\n\t\tthrows SystemException {\n\t\treturn fetchByPrimaryKey((String)primaryKey);\n\t}", "public String getCompany() {\n return company;\n }", "public String getCompany()\n\t{\n\t\treturn getCompany( getSession().getSessionContext() );\n\t}", "public Long getCompanyId() {\n return companyId;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _second.getCompanyId();\n\t}", "public List<SalesOrderItem> fetchItem()\r\n throws ODataException\r\n {\r\n if (erpConfigContext == null) {\r\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type SalesOrderItem.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\r\n }\r\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\r\n odataResourceUrl.append(\"(\");\r\n odataResourceUrl.append(\"SalesOrder=\");\r\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(salesOrder));\r\n odataResourceUrl.append(\")/\");\r\n odataResourceUrl.append(\"to_Item\");\r\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getEndpointUrl(), odataResourceUrl.toString());\r\n final ODataQuery query = builder.build();\r\n final ErpEndpoint erpEndpoint = new ErpEndpoint(erpConfigContext);\r\n final ODataQueryResult result = query.execute(erpEndpoint);\r\n final List<SalesOrderItem> entityList = result.asList(SalesOrderItem.class);\r\n for (SalesOrderItem entity: entityList) {\r\n entity.setErpConfigContext(erpConfigContext);\r\n }\r\n return entityList;\r\n }", "public List<TmCompany> findAll() {\n\t\treturn tmCompanyDao.findAll();\r\n\t}", "public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Long getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "protected List<CompaniesContactsEntity> findByIdCompany(CompaniesEntity companiesEntity) {\n\n log.info(\"CompaniesContactsBean => method : findByIdCompany()\");\n\n FacesMessage facesMessage;\n\n if (companiesContactsEntity == null) {\n log.error(\"Companies entity is null\");\n facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"company.error\"), null);\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\n return null;\n }\n\n EntityManager em = EMF.getEM();\n\n List<CompaniesContactsEntity> companiesContactsEntities = companiesContactsDao.findByIdCompany(em, companiesEntity.getId());\n\n em.clear();\n em.close();\n\n return companiesContactsEntities;\n }", "public String getCompanyContact() {\n\t\treturn companyContact;\n\t}", "public String getCompany()\r\n {\r\n return (m_company);\r\n }", "public ArrayList<Coupon> getCompanyCoupons() throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "public List<Company> getAllCompanies() {\n\t\treturn Validations.VerifyNotEmpty(companyRepository.findAll());\n\t}", "public Integer getCompanyId() {\n return this.companyId;\n }", "public String getCompany() {\n return company;\n }", "public String getCompany() {\n return company;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _employee.getCompanyId();\n\t}", "public List<Company> getAllCompanies() {\n\t\t \n\t List<Company> listOfCompanies = new ArrayList<Company>();\n\n\t Cursor cursor = mDatabase.query(MySQLiteHelper.TABLE_COMPANIES,\n\t mAllColumns, null, null, null, null, null);\n\n\t cursor.moveToFirst();\n\t while (!cursor.isAfterLast()) {\n\t Company hunt = cursorToCompany(cursor);\n\t listOfCompanies.add(hunt);\n\t cursor.moveToNext();\n\t }\n\t \n\t cursor.close();\n\t return listOfCompanies;\n\t }", "public String getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "Optional<Company> getCompany(long id);", "@java.lang.Override\n public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\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 company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public java.lang.String getDocumentCompany() {\n return documentCompany;\n }", "public Customer getCustomer() {\n String __key = this.customerId;\n if (customer__resolvedKey == null || customer__resolvedKey != __key) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n CustomerDao targetDao = daoSession.getCustomerDao();\n Customer customerNew = targetDao.load(__key);\n synchronized (this) {\n customer = customerNew;\n \tcustomer__resolvedKey = __key;\n }\n }\n return customer;\n }", "public List<Customer> getByCompanyName(String company) throws CustomerNotFoundException {\r\n try {\r\n return this.entityManager.createQuery(\"select customer from Customer as customer where customer.company=:company\")\r\n .setParameter(\"company\", company)\r\n .getResultList();\r\n } catch (Exception e) {\r\n throw new CustomerNotFoundException();\r\n }\r\n }", "@Override\r\n\tpublic List<Address> getAddressByCustomerId(int customerId, int companyId) {\n\t\treturn getAddressDAO().getAddressByCustomerId(customerId,companyId);\r\n\t}", "public String getCompanyId() {\n return companyId;\n }", "public java.lang.String getCompany() {\n java.lang.Object ref = company_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n company_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.Integer getCompany() {\n\treturn company;\n}", "public long getCompanyId() {\n return companyId;\n }", "@Override\n\tpublic List<Company> getAll(Page<Company,Long> page) {\n\t\t\treturn dao.getAll(companyPageMapper.pageToDaoRequestParameter(page));\n\t}", "@Override\r\n\tpublic ArrayList<Company> getAllCompanies() throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tArrayList<Company> allCompanies = new ArrayList<>();\r\n\t\t\tString sql = \"select * from companies\";\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tCompany comp = new Company(rs.getInt(\"companyId\"), rs.getString(\"companyName\"),\r\n\t\t\t\t\t\trs.getString(\"companyEmail\"), rs.getString(\"companyPass\"));\r\n\t\t\t\tallCompanies.add(comp);\r\n\t\t\t}\r\n\t\t\treturn allCompanies;\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"getAllCompanies Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public CompanyEntity[] getAllCompanies() throws Exception {\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n\n try {\n //Establish a connection from the connection manager\n connection = JdbcUtils.getConnection();\n\n //Creating the SQL query\n String sqlStatement = \"SELECT * FROM companies\";\n\n //Combining between the syntax and our connection\n preparedStatement = connection.prepareStatement(sqlStatement);\n\n //Executing the update\n ResultSet resultSet = preparedStatement.executeQuery();\n\n if (!resultSet.next()) {\n throw new ApplicationException(ErrorType.GENERAL_ERROR, \"Cannot retrieve information\");\n }\n// getting the number of rows returned to create an array of companies\n int numberOfRows = MyUtils.getRowCount(resultSet);\n if (numberOfRows == 0) {\n throw new ApplicationException(ErrorType.GENERAL_ERROR, \"0 companies in the table\");\n }\n// creating an array of companies\n CompanyEntity[] companies = new CompanyEntity[numberOfRows];\n int i = 0;\n while (resultSet.next()) {\n companies[i].setCompanyId(resultSet.getLong(\"id\"));\n companies[i].setCompanyName(resultSet.getString(\"company_name\"));\n companies[i].setCompanyEmail(resultSet.getString(\"company_email\"));\n companies[i].setCompanyPhone(resultSet.getString(\"company_phone\"));\n companies[i].setCompanyAddress(resultSet.getString(\"company_address\"));\n i++;\n }\n\n return companies;\n\n } catch (Exception e) {\n //\t\t\te.printStackTrace();\n throw new Exception(\"Failed to retrieve data\", e);\n } finally {\n //Closing the resources\n JdbcUtils.closeResources(connection, preparedStatement);\n }\n }", "@java.lang.Override\n public java.lang.String getCompany() {\n java.lang.Object ref = company_;\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 company_ = s;\n return s;\n }\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _changesetEntry.getCompanyId();\n\t}", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "@Override\r\n\tpublic Company getDetailByCompanyName(String companyName) {\n\t\treturn companyRepository.findByCompanyName(companyName);\r\n\t}", "public java.util.List<? extends contactsapi.company.CompanyResponseOrBuilder> \n getCompaniesOrBuilderList() {\n if (companiesBuilder_ != null) {\n return companiesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(companies_);\n }\n }", "@Override\n\tpublic Uni<List<Customer>> findAllCustomer() {\n\t\treturn repo.findAll().list();\n\t}", "public int getCompanyId() {\n return companyId;\n }", "public List<SalesOrderItem> getItemOrFetch()\r\n throws ODataException\r\n {\r\n if (toItem == null) {\r\n toItem = fetchItem();\r\n }\r\n return toItem;\r\n }", "public static void showCompanies(){\n\t\tCompanyDao.getAllCompanies();\n\t}", "public ArrayList<Company> getAllCompanies() throws Exception {\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\t\t\tconnection = JdbcUtils.getConnection();\n\n\t\t\t// Creating the SQL query\n\t\t\tString sqlStatement = \"SELECT * FROM companies\";\n\n\t\t\t// Combining between the syntax and our connection\n\t\t\tpreparedStatement = connection.prepareStatement(sqlStatement);\t\t\t\n\n\t\t\t// Executing the query\n\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\tArrayList<Company> allCompanies = new ArrayList<Company>(); \n\t\t\t\n\t\t\twhile (resultSet.next()) {\n\t\t\t\t\n\t\t\t\tLong id = resultSet.getLong(\"Company_Id\");\n\t\t\t\tString name = resultSet.getString(\"Company_NAME\");\n\t\t\t\tallCompanies.add(new Company(id, name));\n\t\t\t}\n\t\t\treturn allCompanies;\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// **If there was an exception in the \"try\" block above, it is caught here and\n\t\t\t// notifies a level above.\n\t\t\te.printStackTrace();\n\t\t\tthrow new ApplicationException(e,ErrorType.GENERAL_ERROR,\n\t\t\t\t\tDateUtils.getCurrentDateAndTime() + \"FAILED to return all companies\");\n\n\t\t\t// Closing the resources\n\t\t\t} finally {\n\t\t\t\tJdbcUtils.closeResources(connection, preparedStatement,resultSet);\n\t\t\t}\t\n\t\t}", "List<Customer> findAllWithFetch();", "public ArrayList getCustomers(String lname, Connection con) {\n ArrayList c = null;;\n try {\n c = new BookingMapper().getCustomer(lname, con);\n } catch (Exception e) {\n System.out.println(\"fail in UnitOfWork - getOrder()\");\n System.err.println(e);\n }\n return c;\n\n }", "@GET\n\t@Path(\"getBigCustomer\")\n\tpublic List<Customer> getBigCustomer() {\n\t\treturn ManagerHelper.getCustomerManager().getBigCustomer();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _paper.getCompanyId();\n\t}", "public List<SalesOrderHeaderPartner> fetchPartner()\r\n throws ODataException\r\n {\r\n if (erpConfigContext == null) {\r\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type SalesOrderHeaderPartner.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\r\n }\r\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\r\n odataResourceUrl.append(\"(\");\r\n odataResourceUrl.append(\"SalesOrder=\");\r\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(salesOrder));\r\n odataResourceUrl.append(\")/\");\r\n odataResourceUrl.append(\"to_Partner\");\r\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getEndpointUrl(), odataResourceUrl.toString());\r\n final ODataQuery query = builder.build();\r\n final ErpEndpoint erpEndpoint = new ErpEndpoint(erpConfigContext);\r\n final ODataQueryResult result = query.execute(erpEndpoint);\r\n final List<SalesOrderHeaderPartner> entityList = result.asList(SalesOrderHeaderPartner.class);\r\n for (SalesOrderHeaderPartner entity: entityList) {\r\n entity.setErpConfigContext(erpConfigContext);\r\n }\r\n return entityList;\r\n }", "public void setCompanies(java.util.Set<vn.com.phuclocbao.entity.CompanyEntity> _companies)\n {\n companies = _companies;\n }" ]
[ "0.7973164", "0.63463837", "0.5777512", "0.5753813", "0.5687297", "0.5685938", "0.5637233", "0.5621466", "0.5619074", "0.546461", "0.5434424", "0.5422082", "0.53849596", "0.53722584", "0.5358442", "0.53551215", "0.5348735", "0.5329834", "0.5324818", "0.5311724", "0.5264351", "0.52521473", "0.522", "0.52055025", "0.51905817", "0.5149028", "0.5146399", "0.51399964", "0.5119108", "0.5106", "0.5100067", "0.5087499", "0.5072645", "0.50641114", "0.50595945", "0.50539017", "0.50513667", "0.5028052", "0.502635", "0.50254077", "0.5019531", "0.5019531", "0.50173503", "0.5016166", "0.5014499", "0.49980906", "0.4997556", "0.4984636", "0.4970139", "0.49693948", "0.49644974", "0.49594447", "0.49504733", "0.49433398", "0.49257544", "0.49234962", "0.49185997", "0.49074712", "0.49071953", "0.4898892", "0.48918408", "0.48918408", "0.48849905", "0.48729408", "0.48590362", "0.48520643", "0.48520643", "0.48520643", "0.48364568", "0.4833012", "0.4830391", "0.4830391", "0.4821213", "0.48197252", "0.48158616", "0.4813002", "0.4812105", "0.48067027", "0.4800277", "0.47941005", "0.47901466", "0.4783749", "0.47726467", "0.47643414", "0.47549593", "0.47512713", "0.47512713", "0.47429144", "0.4736338", "0.4725693", "0.47210872", "0.47077873", "0.4697483", "0.46922407", "0.46825045", "0.46792796", "0.46759167", "0.466704", "0.4664154", "0.4647693" ]
0.7638333
1
Retrieval of associated CustomerCompany entities (one to many). This corresponds to the OData navigation property to_CustomerCompany. If the navigation property for an entity Customer has not been resolved yet, this method will not query further information. Instead its Optional result state will be empty.
@Nonnull public Optional<List<CustomerCompany>> getCustomerCompanyIfPresent() { return Optional.ofNullable(toCustomerCompany); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n public List<CustomerCompany> fetchCustomerCompany()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerCompany.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerCompany\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerCompany> entityList = result.asList(CustomerCompany.class);\n for (CustomerCompany entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@Nonnull\n public List<CustomerCompany> getCustomerCompanyOrFetch()\n throws ODataException\n {\n if (toCustomerCompany == null) {\n toCustomerCompany = fetchCustomerCompany();\n }\n return toCustomerCompany;\n }", "public List<CustomerCompany> getAllCustomerCompanies() \n\t{\n\t\treturn this.entityManager.createNamedQuery(\"CustomerCompany.listAll\", CustomerCompany.class).getResultList();\n\t}", "public java.util.Set<vn.com.phuclocbao.entity.CompanyEntity> getCompanies()\n {\n return companies;\n }", "public java.util.List<contactsapi.company.CompanyResponse> getCompaniesList() {\n return companies_;\n }", "@Override\n\tpublic List<Company> queryCompanyAll() {\n\t\treturn companyDao.queryCompanyAll();\n\t}", "public List<Company> getCompanys() {\n\t\treturn companyDao.findAll();\n//\t\treturn companies;\n\t}", "public CompanyTO getCompany() {\n\t\t\r\n\t\treturn CompanyService.getInstance().getCompany();\r\n\t}", "public CustomerCompany findCustomerCompany(Long id) \n\t{\n\t\treturn this.entityManager.find(CustomerCompany.class, id);\n\t}", "public java.util.List<contactsapi.company.CompanyResponse> getCompaniesList() {\n if (companiesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(companies_);\n } else {\n return companiesBuilder_.getMessageList();\n }\n }", "public List<ManagedCompany> getManagedCompanies() {\n \n List<ManagedCompany> results = new ArrayList<>();\n \n try {\n Connection conn = this.databaseUtils.getConnection();\n dao.setConnection(conn);\n results = dao.getItems();\n } catch (SQLException e) {\n Logger.getLogger(AppService.class.getName()).log(Level.SEVERE, null, e);\n }\n \n return results;\n }", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "public List<Company> getAllCompanies() {\n\t\treturn Validations.VerifyNotEmpty(companyRepository.findAll());\n\t}", "public Company getCompany() {\n\t\treturn company;\n\t}", "@Override\n\tpublic List<Company> getAll() {\n\t\treturn dao.getAll();\n\t}", "public List<Company> companies() {\n StandardServiceRegistry registry = new StandardServiceRegistryBuilder().configure().build();\n SessionFactory sessionFactory = null;\n try {\n\n sessionFactory = new MetadataSources(registry).buildMetadata().buildSessionFactory();\n Session session = sessionFactory.getCurrentSession();\n session.beginTransaction();\n List<Company> listOfCompanies = session.createQuery(\"FROM Company\").getResultList();\n session.getTransaction().commit();\n return listOfCompanies;\n\n } finally {\n if (sessionFactory != null) {\n sessionFactory.close();\n }\n }\n }", "public void setCustomerCompany(\n @Nonnull\n final List<CustomerCompany> value) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.clear();\n toCustomerCompany.addAll(value);\n }", "public java.util.List<? extends contactsapi.company.CompanyResponseOrBuilder> \n getCompaniesOrBuilderList() {\n return companies_;\n }", "public List<TmCompany> findAll() {\n\t\treturn tmCompanyDao.findAll();\r\n\t}", "public List<Company> getCompanies() throws BusinessException {\n\t\tList<Company> lstCompanies = new ArrayList<Company>();\n\n\t\ttry {\n\n\t\t\tList<Object> list = UtilSession.getObjectsByNamedQuery(this.em, Company.FIND_COMPANIES, null);\n\n\t\t\tfor (Object object : list) {\n\t\t\t\tCompany vnt = (Company) object;\n\t\t\t\tlstCompanies.add(vnt);\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tString s = \"Error al consultar las compa�ias\";\n\t\t\t_logger.error(s, ex);\n\t\t\tthrow new BusinessException(s, ex);\n\t\t}\n\n\t\t\n\n\t\treturn lstCompanies;\n\n\t}", "public Company getCompany() {\r\n return this.company;\r\n }", "@Override\r\n\tpublic List<Company> getAllCompanies() {\r\n\t\tString methodName = \"getAllCompanies()\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\treturn companyRepository.findAll();\r\n\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Company> loadAll() {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Company\").list();\r\n\t}", "public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }", "public ArrayList<Company> getCompaniesFromCache() {\n\n ParseQuery<Company> query = ParseQuery.getQuery(PARSE_NAME);\n query.fromLocalDatastore();\n\n try {\n return new ArrayList<>(query.find());\n } catch (ParseException e) {\n Log.e(PARSE_NAME, \"Unable to find any merchants from local data store:\\n\" + e.getMessage());\n }\n\n return new ArrayList<>();\n }", "public List<Customer> getByCompanyName(String company) throws CustomerNotFoundException {\r\n try {\r\n return this.entityManager.createQuery(\"select customer from Customer as customer where customer.company=:company\")\r\n .setParameter(\"company\", company)\r\n .getResultList();\r\n } catch (Exception e) {\r\n throw new CustomerNotFoundException();\r\n }\r\n }", "@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> customers() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QCustomer qcustomer = QCustomer.customer;\r\n List<Customer> customers = (List<Customer>) query.from(qcustomer).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn customers;\r\n }", "@Override\n\tpublic List<CompanyVO> getCompanyInfo(String c_name) {\n\t\treturn null;\n\t}", "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}", "protected List<CompaniesContactsEntity> findByIdCompany(CompaniesEntity companiesEntity) {\n\n log.info(\"CompaniesContactsBean => method : findByIdCompany()\");\n\n FacesMessage facesMessage;\n\n if (companiesContactsEntity == null) {\n log.error(\"Companies entity is null\");\n facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"company.error\"), null);\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\n return null;\n }\n\n EntityManager em = EMF.getEM();\n\n List<CompaniesContactsEntity> companiesContactsEntities = companiesContactsDao.findByIdCompany(em, companiesEntity.getId());\n\n em.clear();\n em.close();\n\n return companiesContactsEntities;\n }", "public String getCompany() {\n return (String) get(\"company\");\n }", "public Company getCompany() {\n return company;\n }", "public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getCompany() {\r\n\t\treturn company;\r\n\t}", "public Long getCompanyId() {\n return companyId;\n }", "public Long getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "@Override\n\tpublic Collection<String> getCompanyList() {\n\t\treturn getHibernateTemplate().execute(new HibernateCallback<String, Collection<String>>(\"getCompanyList\") {\n\t\t\t@Override\n\t\t\tpublic Collection<String> doInHibernate(final Session session) {\n\t\t\t\tfinal Criteria criteria = session.createCriteria(getEntityClass());\n\t\t\t\tcriteria.setProjection(Projections.property(\"name\"));\n\t\t\t\tcriteria.addOrder(Order.asc(\"name\"));\n\t\t\t\treturn criteria.list();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "Optional<Company> getCompany(long id);", "public String getCompany() {\n\t\treturn company;\n\t}", "public String getCompany() {\n\t\treturn company;\n\t}", "@GET\n\t@Path(\"getByName\")\n\tpublic List<Customer> getByName(@QueryParam(\"companyname\") String companyname) {\n\t\treturn ManagerHelper.getCustomerManager().getByName(companyname);\n\t}", "@Override\r\n\tpublic List<Address> getAddressByCustomerId(int customerId, int companyId) {\n\t\treturn getAddressDAO().getAddressByCustomerId(customerId,companyId);\r\n\t}", "public String getContactCompany() {\n return contactCompany;\n }", "public java.util.List<? extends contactsapi.company.CompanyResponseOrBuilder> \n getCompaniesOrBuilderList() {\n if (companiesBuilder_ != null) {\n return companiesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(companies_);\n }\n }", "@Override\n\tpublic Uni<List<Customer>> findAllCustomer() {\n\t\treturn repo.findAll().list();\n\t}", "public Integer getCompanyId() {\n return this.companyId;\n }", "public List<Company> getAllCompanies() {\n\t\t \n\t List<Company> listOfCompanies = new ArrayList<Company>();\n\n\t Cursor cursor = mDatabase.query(MySQLiteHelper.TABLE_COMPANIES,\n\t mAllColumns, null, null, null, null, null);\n\n\t cursor.moveToFirst();\n\t while (!cursor.isAfterLast()) {\n\t Company hunt = cursorToCompany(cursor);\n\t listOfCompanies.add(hunt);\n\t cursor.moveToNext();\n\t }\n\t \n\t cursor.close();\n\t return listOfCompanies;\n\t }", "@Nonnull\n public Customer.CustomerBuilder customerCompany(CustomerCompany... value) {\n return toCustomerCompany(Lists.newArrayList(value));\n }", "public String getCompany() {\n return company;\n }", "public String getCompanyContact() {\n\t\treturn companyContact;\n\t}", "List<Company> getCompanyList() throws DAOException ;", "Company getCompany(int id);", "@PreAuthorize(\"#oauth2.hasAnyScope('read','write','read-write')\")\n\t@RequestMapping(method = GET)\n\tpublic Mono<ResponseEntity<List<Customer>>> allCustomers() {\n\n\t\treturn repo.findAll().collectList()\n\t\t\t.filter(customers -> customers.size() > 0)\n\t\t\t.map(customers -> ok(customers))\n\t\t\t.defaultIfEmpty(noContent().build());\n\t}", "@Override\r\n\tpublic List<Company> getCompanyList() throws SQLException {\n\r\n\t\tList<Company> companies = new ArrayList<>();\r\n\t\tcompanyRepository.findAll().forEach(companies::add);\r\n\r\n\t\treturn companies;\r\n\t}", "public String getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "@Nonnull\n public List<CustomerSalesArea> fetchCustomerSalesArea()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerSalesArea.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerSalesArea\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerSalesArea> entityList = result.asList(CustomerSalesArea.class);\n for (CustomerSalesArea entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@Override\r\n\tpublic ArrayList<Company> getAllCompanies() throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tArrayList<Company> allCompanies = new ArrayList<>();\r\n\t\t\tString sql = \"select * from companies\";\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tCompany comp = new Company(rs.getInt(\"companyId\"), rs.getString(\"companyName\"),\r\n\t\t\t\t\t\trs.getString(\"companyEmail\"), rs.getString(\"companyPass\"));\r\n\t\t\t\tallCompanies.add(comp);\r\n\t\t\t}\r\n\t\t\treturn allCompanies;\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"getAllCompanies Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\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 company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\n return companyId;\n }", "public ManagedCompany getManagedCompany(int id) {\n \n ManagedCompany result = null;\n \n try {\n Connection conn = this.databaseUtils.getConnection();\n dao.setConnection(conn);\n result = dao.getItemById(id);\n } catch (SQLException e) {\n Logger.getLogger(AppService.class.getName()).log(Level.SEVERE, null, e);\n }\n \n return result;\n }", "public String getCompany() {\n return company;\n }", "public String getCompany() {\n return company;\n }", "@Accessor(qualifier = \"Customers\", type = Accessor.Type.GETTER)\n\tpublic Collection<B2BCustomerModel> getCustomers()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CUSTOMERS);\n\t}", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "public String getCompany()\n\t{\n\t\treturn getCompany( getSession().getSessionContext() );\n\t}", "public long getCompanyId() {\n return companyId;\n }", "public CustomerEOImpl getCustomerEO() {\r\n return (CustomerEOImpl) getEntity(2);\r\n }", "public ArrayList<Coupon> getCompanyCoupons() throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "@Nonnull\n public List<CustomerSalesArea> getCustomerSalesAreaOrFetch()\n throws ODataException\n {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = fetchCustomerSalesArea();\n }\n return toCustomerSalesArea;\n }", "public contactsapi.company.CompanyResponse.Builder addCompaniesBuilder() {\n return getCompaniesFieldBuilder().addBuilder(\n contactsapi.company.CompanyResponse.getDefaultInstance());\n }", "public java.lang.String getCompany() {\n java.lang.Object ref = company_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n company_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public CompanyEntity[] getAllCompanies() throws Exception {\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n\n try {\n //Establish a connection from the connection manager\n connection = JdbcUtils.getConnection();\n\n //Creating the SQL query\n String sqlStatement = \"SELECT * FROM companies\";\n\n //Combining between the syntax and our connection\n preparedStatement = connection.prepareStatement(sqlStatement);\n\n //Executing the update\n ResultSet resultSet = preparedStatement.executeQuery();\n\n if (!resultSet.next()) {\n throw new ApplicationException(ErrorType.GENERAL_ERROR, \"Cannot retrieve information\");\n }\n// getting the number of rows returned to create an array of companies\n int numberOfRows = MyUtils.getRowCount(resultSet);\n if (numberOfRows == 0) {\n throw new ApplicationException(ErrorType.GENERAL_ERROR, \"0 companies in the table\");\n }\n// creating an array of companies\n CompanyEntity[] companies = new CompanyEntity[numberOfRows];\n int i = 0;\n while (resultSet.next()) {\n companies[i].setCompanyId(resultSet.getLong(\"id\"));\n companies[i].setCompanyName(resultSet.getString(\"company_name\"));\n companies[i].setCompanyEmail(resultSet.getString(\"company_email\"));\n companies[i].setCompanyPhone(resultSet.getString(\"company_phone\"));\n companies[i].setCompanyAddress(resultSet.getString(\"company_address\"));\n i++;\n }\n\n return companies;\n\n } catch (Exception e) {\n //\t\t\te.printStackTrace();\n throw new Exception(\"Failed to retrieve data\", e);\n } finally {\n //Closing the resources\n JdbcUtils.closeResources(connection, preparedStatement);\n }\n }", "@OneToMany(mappedBy=\"tblContactperson\")\n\tpublic Set<TblCustomer> getTblCustomers() {\n\t\treturn this.tblCustomers;\n\t}", "public String getCompany()\r\n {\r\n return (m_company);\r\n }", "public String[] getCompanyNames() {\n return companyNames;\n }", "@Nullable\n public String getCompanyName() {\n return this.companyName;\n }", "public List<Customer> getAllCustomers() {\n Query query = em.createNamedQuery(\"Customer.findAll\");\r\n // return query result\r\n return query.getResultList();\r\n }", "public void addCustomerCompany(CustomerCompany... entity) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.addAll(Lists.newArrayList(entity));\n }", "public java.lang.Integer getCompany() {\n\treturn company;\n}", "public ArrayList<Company> getAllCompanies() throws Exception {\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\t\t\tconnection = JdbcUtils.getConnection();\n\n\t\t\t// Creating the SQL query\n\t\t\tString sqlStatement = \"SELECT * FROM companies\";\n\n\t\t\t// Combining between the syntax and our connection\n\t\t\tpreparedStatement = connection.prepareStatement(sqlStatement);\t\t\t\n\n\t\t\t// Executing the query\n\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\tArrayList<Company> allCompanies = new ArrayList<Company>(); \n\t\t\t\n\t\t\twhile (resultSet.next()) {\n\t\t\t\t\n\t\t\t\tLong id = resultSet.getLong(\"Company_Id\");\n\t\t\t\tString name = resultSet.getString(\"Company_NAME\");\n\t\t\t\tallCompanies.add(new Company(id, name));\n\t\t\t}\n\t\t\treturn allCompanies;\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// **If there was an exception in the \"try\" block above, it is caught here and\n\t\t\t// notifies a level above.\n\t\t\te.printStackTrace();\n\t\t\tthrow new ApplicationException(e,ErrorType.GENERAL_ERROR,\n\t\t\t\t\tDateUtils.getCurrentDateAndTime() + \"FAILED to return all companies\");\n\n\t\t\t// Closing the resources\n\t\t\t} finally {\n\t\t\t\tJdbcUtils.closeResources(connection, preparedStatement,resultSet);\n\t\t\t}\t\n\t\t}", "@RequestMapping(value = \"/customers\", method = RequestMethod.GET)\n public ResponseEntity<?> getCustomers() {\n Iterable<Customer> customerList = customerService.getCustomers();\n return new ResponseEntity<>(customerList, HttpStatus.OK);\n }", "@RequestMapping(path = \"/listCompanies\", method = RequestMethod.GET)\n\tpublic ResponseEntity<RestResponse<ListCompaniesResponse>> listCompanies() {\n\n\t\tList<CompanyDTO> companies = companyService.listAll();\n\t\t\n\t\tListCompaniesResponse result = new ListCompaniesResponse(companies);\n\t\t\n\t\tRestResponse<ListCompaniesResponse> restResponse = \n\t\t\t\tnew RestResponse<ListCompaniesResponse>(RestResponseCodes.OK.getCode(), RestResponseCodes.OK.getDescription(), result);\n\t\t\n\t\treturn new ResponseEntity<RestResponse<ListCompaniesResponse>>(restResponse, HttpStatus.OK);\n\t\t\n\t}", "@Override\n\tpublic ContactCompanyAg fetchByPrimaryKey(Serializable primaryKey)\n\t\tthrows SystemException {\n\t\treturn fetchByPrimaryKey((String)primaryKey);\n\t}", "@Override\n\tpublic List<Company> getSome(Page<Company,Long> page) {\n\t\treturn dao.getSome(companyPageMapper.pageToDaoRequestParameter(page));\n\t}", "public abstract List<Company> getAll();", "@java.lang.Override\n public java.lang.String getCompany() {\n java.lang.Object ref = company_;\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 company_ = s;\n return s;\n }\n }", "public java.lang.String getDocumentCompany() {\n return documentCompany;\n }", "public static void showCompanies(){\n\t\tCompanyDao.getAllCompanies();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic List<Customer> findAllCustomer() {\n\t\treturn customerDao.findAllCustomer();\n\t}", "public int getCompanyId() {\n return companyId;\n }", "@GET\n\t@Path(\"getBigCustomer\")\n\tpublic List<Customer> getBigCustomer() {\n\t\treturn ManagerHelper.getCustomerManager().getBigCustomer();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _second.getCompanyId();\n\t}", "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}", "@Override\r\n\tpublic List<Customer> getAllCustomers() {\r\n\t\tList<Customer> allCustomers = new ArrayList<Customer>();\r\n\t\tallCustomers = customerRepository.findAll();\r\n\t\tif (!allCustomers.isEmpty()) {\r\n\t\t\treturn allCustomers;\r\n\t\t} else {\r\n\t\t\tthrow new EmptyEntityListException(\"No Customers Found.\");\r\n\t\t}\r\n\r\n\t}" ]
[ "0.7835619", "0.7549473", "0.6569162", "0.61838484", "0.61403215", "0.6136718", "0.61256367", "0.6043712", "0.5907974", "0.5895833", "0.5876789", "0.57918215", "0.5750785", "0.5739102", "0.57343864", "0.5732402", "0.5663264", "0.5653421", "0.5644019", "0.56250894", "0.5581212", "0.55705374", "0.5567161", "0.5522575", "0.5514823", "0.549508", "0.54815537", "0.54694873", "0.5431607", "0.5424056", "0.5402336", "0.53706443", "0.5366936", "0.5355233", "0.53499156", "0.53448695", "0.53436816", "0.53303957", "0.5322789", "0.5322789", "0.5322194", "0.53187567", "0.53171563", "0.5301131", "0.52868015", "0.5286398", "0.5286387", "0.52838546", "0.527371", "0.52604574", "0.5254941", "0.52508205", "0.52450526", "0.52432376", "0.52400464", "0.52345634", "0.52114457", "0.5205941", "0.5180239", "0.5180239", "0.516605", "0.51459694", "0.5140493", "0.5140493", "0.5134658", "0.51330894", "0.51330894", "0.5127747", "0.5113635", "0.51091266", "0.5105447", "0.5102471", "0.51021093", "0.5099803", "0.50898004", "0.50858134", "0.5072071", "0.5066272", "0.50610346", "0.50501883", "0.50449", "0.5042123", "0.50387514", "0.50343627", "0.5030625", "0.5030037", "0.5017302", "0.5013718", "0.50125647", "0.50103056", "0.5004671", "0.5002774", "0.5002774", "0.5002774", "0.49979287", "0.49978045", "0.49969354", "0.49967006", "0.49955285", "0.499453" ]
0.72976375
2
Overwrites the list of associated CustomerCompany entities for the loaded navigation property to_CustomerCompany. If the navigation property to_CustomerCompany of a queried Customer is operated lazily, an ODataException can be thrown in case of an OData query error. Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations.
public void setCustomerCompany( @Nonnull final List<CustomerCompany> value) { if (toCustomerCompany == null) { toCustomerCompany = Lists.newArrayList(); } toCustomerCompany.clear(); toCustomerCompany.addAll(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n public List<CustomerCompany> fetchCustomerCompany()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerCompany.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerCompany\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerCompany> entityList = result.asList(CustomerCompany.class);\n for (CustomerCompany entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@Nonnull\n public List<CustomerCompany> getCustomerCompanyOrFetch()\n throws ODataException\n {\n if (toCustomerCompany == null) {\n toCustomerCompany = fetchCustomerCompany();\n }\n return toCustomerCompany;\n }", "public void addCustomerCompany(CustomerCompany... entity) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.addAll(Lists.newArrayList(entity));\n }", "@Override\r\n\tpublic Company updateCompany(Company company) {\n\t\treturn null;\r\n\t}", "public void setCompanies(java.util.Set<vn.com.phuclocbao.entity.CompanyEntity> _companies)\n {\n companies = _companies;\n }", "@Nonnull\n public Optional<List<CustomerCompany>> getCustomerCompanyIfPresent() {\n return Optional.ofNullable(toCustomerCompany);\n }", "public void setCompany(Company aCompany) {\n company = aCompany;\n }", "public CustomerCompany addOrUpdateCustomerCompany(CustomerCompany company) \n\t{\n\t\tif (company.getId() == null) \n\t\t{\n\t\t\tthis.entityManager.persist(company);\t\t\t\n\t\t} \n\t\telse \n\t\t{\n\t\t\tcompany = this.entityManager.merge(company);\n\t\t}\n\t\treturn company;\n\t}", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "@Override\r\n\tpublic void setCompanyData(RentCompanyData companyData) {\n\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Company> loadAll() {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Company\").list();\r\n\t}", "public Builder clearCompany() {\n \n company_ = getDefaultInstance().getCompany();\n onChanged();\n return this;\n }", "public java.util.Set<vn.com.phuclocbao.entity.CompanyEntity> getCompanies()\n {\n return companies;\n }", "protected void createCompaniesContacts() {\n\n log.info(\"CompaniesContactsBean => method : createCompaniesContacts()\");\n\n EntityManager em = EMF.getEM();\n EntityTransaction tx = null;\n\n try {\n tx = em.getTransaction();\n tx.begin();\n for (CompaniesEntity c : selectedCompaniesContacts) {\n CompaniesContactsEntity companiesContactsEntity1 = new CompaniesContactsEntity();\n companiesContactsEntity1.setContactsByIdContacts(contactsBean.getContactsEntity());\n companiesContactsEntity1.setCompaniesByIdCompanies(c);\n companiesContactsDao.update(em, companiesContactsEntity1);\n }\n tx.commit();\n log.info(\"Persist ok\");\n } catch (Exception ex) {\n if (tx != null && tx.isActive()) tx.rollback();\n log.info(\"Persist failed\");\n } finally {\n em.clear();\n em.clear();\n }\n\n }", "@Override\n\tpublic void modifryCompany(BeanCompany Company) {\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tsession.update(Company);\n\t\t\ttx.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t}\n\t}", "public List<CustomerCompany> getAllCustomerCompanies() \n\t{\n\t\treturn this.entityManager.createNamedQuery(\"CustomerCompany.listAll\", CustomerCompany.class).getResultList();\n\t}", "public ArrayList<Company> updateCacheList() {\n ParseQuery<Company> query = ParseQuery.getQuery(PARSE_NAME);\n\n try {\n Company.pinAll(\"companyList\", query.find());\n } catch (ParseException e) {\n Log.e(PARSE_NAME, \"Unable to find any merchant from Parse Database:\\n\" + e.getMessage());\n }\n\n return getCompaniesFromCache();\n }", "@Override\n\tpublic int alterCompany(Company company) {\n\t\treturn companyDao.alterCompany(company);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_expandoColumn.setCompanyId(companyId);\n\t}", "@Override\n\tpublic List<Company> queryCompanyAll() {\n\t\treturn companyDao.queryCompanyAll();\n\t}", "public List<Company> getCompanys() {\n\t\treturn companyDao.findAll();\n//\t\treturn companies;\n\t}", "@Nonnull\n public Customer.CustomerBuilder customerCompany(CustomerCompany... value) {\n return toCustomerCompany(Lists.newArrayList(value));\n }", "@Override\n\tpublic List<Company> getAll() {\n\t\treturn dao.getAll();\n\t}", "public void setContactCompany(String contactCompany) {\n this.contactCompany = contactCompany;\n }", "public void setCompany(String company) {\r\n\t\tthis.company = company;\r\n\t}", "@Override\r\n\tpublic List<Company> getAllCompanies() {\r\n\t\tString methodName = \"getAllCompanies()\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\treturn companyRepository.findAll();\r\n\t\t\r\n\t}", "public void setCompany(String company) {\n\t\tthis.company = company;\n\t}", "public void refreshCompanies() {\n\t\t \n\t\t mDbHelper.refreshTable(mDatabase, MySQLiteHelper.TABLE_COMPANIES);\n\t }", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "public void setCompany(String company) {\n this.company = company;\n }", "public java.util.List<contactsapi.company.CompanyResponse> getCompaniesList() {\n return companies_;\n }", "public void setCompanyId(long companyId) {\n this.companyId = companyId;\n }", "public void setCompany(String company)\r\n {\r\n m_company = company;\r\n }", "public void setCompanyId(Long companyId) {\n this.companyId = companyId;\n }", "public List<Company> companies() {\n StandardServiceRegistry registry = new StandardServiceRegistryBuilder().configure().build();\n SessionFactory sessionFactory = null;\n try {\n\n sessionFactory = new MetadataSources(registry).buildMetadata().buildSessionFactory();\n Session session = sessionFactory.getCurrentSession();\n session.beginTransaction();\n List<Company> listOfCompanies = session.createQuery(\"FROM Company\").getResultList();\n session.getTransaction().commit();\n return listOfCompanies;\n\n } finally {\n if (sessionFactory != null) {\n sessionFactory.close();\n }\n }\n }", "public void setCompanyId(int companyId) {\n this.companyId = companyId;\n }", "@Override\r\n\tpublic List<Company> getCompanyList() throws SQLException {\n\r\n\t\tList<Company> companies = new ArrayList<>();\r\n\t\tcompanyRepository.findAll().forEach(companies::add);\r\n\r\n\t\treturn companies;\r\n\t}", "@OneToMany(mappedBy=\"tblContactperson\")\n\tpublic Set<TblCustomer> getTblCustomers() {\n\t\treturn this.tblCustomers;\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_employee.setCompanyId(companyId);\n\t}", "public void setExistingCustomer(Customer existingCustomer) { this.existingCustomer = existingCustomer; }", "@Nonnull\n public List<CustomerSalesArea> fetchCustomerSalesArea()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerSalesArea.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerSalesArea\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerSalesArea> entityList = result.asList(CustomerSalesArea.class);\n for (CustomerSalesArea entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "public void setCompany(String company) {\n\t\tthis.company = StringUtils.trimString( company );\n\t}", "@Accessor(qualifier = \"Customers\", type = Accessor.Type.SETTER)\n\tpublic void setCustomers(final Collection<B2BCustomerModel> value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(CUSTOMERS, value);\n\t}", "public ManagementCompany(ManagementCompany otherCompany) {\r\n\t\tthis.name = otherCompany.name;\r\n\t\tthis.taxID = otherCompany.taxID;\r\n\t\tthis.mgmFeePer = otherCompany.mgmFeePer;\r\n\t\tthis.plot = new Plot(otherCompany.plot);\r\n\t\tproperties = new Property[MAX_PROPERTY];\r\n\t}", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public Builder clearCompanyName() {\n \n companyName_ = getDefaultInstance().getCompanyName();\n onChanged();\n return this;\n }", "public Builder clearCompanyName() {\n \n companyName_ = getDefaultInstance().getCompanyName();\n onChanged();\n return this;\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_changesetEntry.setCompanyId(companyId);\n\t}", "public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }", "public static void loadMyCompany() {\n\t\tMyCompany myCompany = fetchFromDB();\n\n\t\trender(\"@myCompany\", myCompany);\n\t}", "@Override\n\tpublic List<CompanyVO> getCompanyInfo(String c_name) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void addCompany(BeanCompany Company) {\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tsession.save(Company);\n\t\t\ttx.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t}\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "public void cacheResult(List<ContactCompanyAg> contactCompanyAgs) {\n\t\tfor (ContactCompanyAg contactCompanyAg : contactCompanyAgs) {\n\t\t\tif (EntityCacheUtil.getResult(\n\t\t\t\t\t\tContactCompanyAgModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\t\t\tContactCompanyAgImpl.class,\n\t\t\t\t\t\tcontactCompanyAg.getPrimaryKey()) == null) {\n\t\t\t\tcacheResult(contactCompanyAg);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcontactCompanyAg.resetOriginalValues();\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_second.setCompanyId(companyId);\n\t}", "public updsertCompanyReferralPocily_args(updsertCompanyReferralPocily_args other) {\n __isset_bitfield = other.__isset_bitfield;\n this.companyId = other.companyId;\n this.userId = other.userId;\n }", "@Override\n\tpublic void putCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(customer);;\n\n\t}", "public void setCompanyId(Integer value) {\n this.companyId = value;\n }", "void assignAuthorisationsToCustomer(CustomerModel customer);", "public List<Company> getAllCompanies() {\n\t\treturn Validations.VerifyNotEmpty(companyRepository.findAll());\n\t}", "@Nonnull\n public List<CustomerSalesArea> getCustomerSalesAreaOrFetch()\n throws ODataException\n {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = fetchCustomerSalesArea();\n }\n return toCustomerSalesArea;\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "private void loadCustomerData() {\n\t\tCustomerDTO cust1 = new CustomerDTO();\n\t\tcust1.setId(null);\n\t\tcust1.setFirstName(\"Steven\");\n\t\tcust1.setLastName(\"King\");\n\t\tcust1.setEmail(\"king@gmail.com\");\n\t\tcust1.setCity(\"Hyderabad\");\n\t\tcustomerService.createCustomer(cust1);\n\n\t\tCustomerDTO cust2 = new CustomerDTO();\n\t\tcust2.setId(null);\n\t\tcust2.setFirstName(\"Neena\");\n\t\tcust2.setLastName(\"Kochhar\");\n\t\tcust2.setEmail(\"kochhar@gmail.com\");\n\t\tcust2.setCity(\"Pune\");\n\t\tcustomerService.createCustomer(cust2);\n\n\t\tCustomerDTO cust3 = new CustomerDTO();\n\t\tcust3.setId(null);\n\t\tcust3.setFirstName(\"John\");\n\t\tcust3.setLastName(\"Chen\");\n\t\tcust3.setEmail(\"johnr@gmail.com\");\n\t\tcust3.setCity(\"Bangalore\");\n\t\tcustomerService.createCustomer(cust3);\n\n\t\tCustomerDTO cust4 = new CustomerDTO();\n\t\tcust4.setId(null);\n\t\tcust4.setFirstName(\"Nancy\");\n\t\tcust4.setLastName(\"Greenberg\");\n\t\tcust4.setEmail(\"nancy@gmail.com\");\n\t\tcust4.setCity(\"Mumbai\");\n\t\tcustomerService.createCustomer(cust4);\n\n\t\tCustomerDTO cust5 = new CustomerDTO();\n\t\tcust5.setId(5L);\n\t\tcust5.setFirstName(\"Luis\");\n\t\tcust5.setLastName(\"Popp\");\n\t\tcust5.setEmail(\"popp@gmail.com\");\n\t\tcust5.setCity(\"Delhi\");\n\t\tcustomerService.createCustomer(cust5);\n\n\t}", "public CustomerCompany findCustomerCompany(Long id) \n\t{\n\t\treturn this.entityManager.find(CustomerCompany.class, id);\n\t}", "List<Company> getCompanyList() throws DAOException ;", "public List<TmCompany> findAll() {\n\t\treturn tmCompanyDao.findAll();\r\n\t}", "public List<ManagedCompany> getManagedCompanies() {\n \n List<ManagedCompany> results = new ArrayList<>();\n \n try {\n Connection conn = this.databaseUtils.getConnection();\n dao.setConnection(conn);\n results = dao.getItems();\n } catch (SQLException e) {\n Logger.getLogger(AppService.class.getName()).log(Level.SEVERE, null, e);\n }\n \n return results;\n }", "void setAuditingCompany(ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData auditingCompany);", "@Override\n public void setCompanyId(long companyId) {\n _partido.setCompanyId(companyId);\n }", "public Company getCompany() {\n return company;\n }", "@Override\n\tpublic Collection<String> getCompanyList() {\n\t\treturn getHibernateTemplate().execute(new HibernateCallback<String, Collection<String>>(\"getCompanyList\") {\n\t\t\t@Override\n\t\t\tpublic Collection<String> doInHibernate(final Session session) {\n\t\t\t\tfinal Criteria criteria = session.createCriteria(getEntityClass());\n\t\t\t\tcriteria.setProjection(Projections.property(\"name\"));\n\t\t\t\tcriteria.addOrder(Order.asc(\"name\"));\n\t\t\t\treturn criteria.list();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public void updateComparisonCompanies(List<Company> companies) {\n if (companies != null && companies.size() >= 1) {\n comparisonCompaniesAdapter.setCompanies(companies);\n comparisonCompanies = viewModel.getCompCompanies();\n }\n }", "public ArrayList<Company> getCompaniesFromCache() {\n\n ParseQuery<Company> query = ParseQuery.getQuery(PARSE_NAME);\n query.fromLocalDatastore();\n\n try {\n return new ArrayList<>(query.find());\n } catch (ParseException e) {\n Log.e(PARSE_NAME, \"Unable to find any merchants from local data store:\\n\" + e.getMessage());\n }\n\n return new ArrayList<>();\n }", "public void setCompany(SSNewCompany iCompany) {\n this.iCompany = iCompany;\n\n iTaxRate1.setValue( iCompany.getTaxRate1() );\n iTaxRate2.setValue( iCompany.getTaxRate2() );\n iTaxRate3.setValue( iCompany.getTaxRate3() );\n }", "public void setCompanyId(Long companyId) {\r\n\t\tthis.companyId = companyId;\r\n\t}", "@Override\n public void updateObservers() throws Exception {\n loadAlLNameCustomer();\n loadAllCustomerss();\n \n OrderTabelAddCustomerPanel.selectAll();\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_userTracker.setCompanyId(companyId);\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\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 company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _expandoColumn.getCompanyId();\n\t}", "public Builder clearCompanies() {\n if (companiesBuilder_ == null) {\n companies_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n companiesBuilder_.clear();\n }\n return this;\n }", "public Company getCompany() {\r\n return this.company;\r\n }", "public java.util.List<contactsapi.company.CompanyResponse> getCompaniesList() {\n if (companiesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(companies_);\n } else {\n return companiesBuilder_.getMessageList();\n }\n }", "public getCompanyReferralConf_args(getCompanyReferralConf_args other) {\n __isset_bitfield = other.__isset_bitfield;\n this.companyId = other.companyId;\n }", "public void setEntities(LazyDataModel<BasicEntity> entities) {\n this.entities = entities;\n }", "@Override\n\tpublic Money costToCompany() {\n\t\treturn null;\n\t}", "public void clearCustomers()\r\n\t{\r\n\t\tfor(int i=0;i<inStore.size();i++)\r\n\t\t{\r\n\t\t\tcustomers.add(inStore.get(i));\r\n\t\t}\r\n\t\tinStore.clear();\r\n\t}", "public Long getCompanyId() {\n return companyId;\n }", "public Company getCompany() {\n\t\treturn company;\n\t}" ]
[ "0.6721814", "0.655789", "0.5692425", "0.543913", "0.5297504", "0.5217929", "0.51033056", "0.50980926", "0.5073048", "0.50629735", "0.5062204", "0.50539804", "0.50449204", "0.50154704", "0.49963576", "0.49930733", "0.49420667", "0.49350867", "0.49050257", "0.48963663", "0.48563626", "0.4848096", "0.4828724", "0.48079908", "0.4800854", "0.47690567", "0.47657716", "0.47455513", "0.47368643", "0.47368643", "0.47368643", "0.47368643", "0.47305784", "0.47121075", "0.46982214", "0.4685756", "0.4672389", "0.46672407", "0.4661149", "0.4655298", "0.46347615", "0.46047923", "0.4604159", "0.4603992", "0.46009505", "0.460059", "0.4595324", "0.45816135", "0.45816135", "0.45740834", "0.45740834", "0.45740834", "0.45740834", "0.45740834", "0.457331", "0.457331", "0.45686948", "0.45655316", "0.45591474", "0.4557859", "0.4555721", "0.45546946", "0.45546946", "0.45546946", "0.45530173", "0.45449018", "0.4542404", "0.4532882", "0.45237795", "0.45172018", "0.45160502", "0.4515148", "0.45028403", "0.45028403", "0.45004296", "0.44934395", "0.44924685", "0.4487251", "0.44790578", "0.4477641", "0.4470384", "0.44510213", "0.44481862", "0.4445869", "0.444449", "0.44399506", "0.44356248", "0.44310513", "0.44301954", "0.4428013", "0.44271588", "0.44247255", "0.4409634", "0.44036704", "0.44035873", "0.4398592", "0.43982178", "0.43933305", "0.43905514", "0.43843484" ]
0.61944705
2
Adds elements to the list of associated CustomerCompany entities. This corresponds to the OData navigation property to_CustomerCompany. If the navigation property to_CustomerCompany of a queried Customer is operated lazily, an ODataException can be thrown in case of an OData query error. Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations.
public void addCustomerCompany(CustomerCompany... entity) { if (toCustomerCompany == null) { toCustomerCompany = Lists.newArrayList(); } toCustomerCompany.addAll(Lists.newArrayList(entity)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n public List<CustomerCompany> fetchCustomerCompany()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerCompany.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerCompany\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerCompany> entityList = result.asList(CustomerCompany.class);\n for (CustomerCompany entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "public void setCustomerCompany(\n @Nonnull\n final List<CustomerCompany> value) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.clear();\n toCustomerCompany.addAll(value);\n }", "@Nonnull\n public List<CustomerCompany> getCustomerCompanyOrFetch()\n throws ODataException\n {\n if (toCustomerCompany == null) {\n toCustomerCompany = fetchCustomerCompany();\n }\n return toCustomerCompany;\n }", "@Override\n\tpublic void addCompany(BeanCompany Company) {\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tsession.save(Company);\n\t\t\ttx.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t}\n\t}", "protected void createCompaniesContacts() {\n\n log.info(\"CompaniesContactsBean => method : createCompaniesContacts()\");\n\n EntityManager em = EMF.getEM();\n EntityTransaction tx = null;\n\n try {\n tx = em.getTransaction();\n tx.begin();\n for (CompaniesEntity c : selectedCompaniesContacts) {\n CompaniesContactsEntity companiesContactsEntity1 = new CompaniesContactsEntity();\n companiesContactsEntity1.setContactsByIdContacts(contactsBean.getContactsEntity());\n companiesContactsEntity1.setCompaniesByIdCompanies(c);\n companiesContactsDao.update(em, companiesContactsEntity1);\n }\n tx.commit();\n log.info(\"Persist ok\");\n } catch (Exception ex) {\n if (tx != null && tx.isActive()) tx.rollback();\n log.info(\"Persist failed\");\n } finally {\n em.clear();\n em.clear();\n }\n\n }", "@Nonnull\n public Customer.CustomerBuilder customerCompany(CustomerCompany... value) {\n return toCustomerCompany(Lists.newArrayList(value));\n }", "@Override\n\tpublic void add(cp_company cp) {\n\t\t\n\t}", "public void setCompanies(java.util.Set<vn.com.phuclocbao.entity.CompanyEntity> _companies)\n {\n companies = _companies;\n }", "@Nonnull\n public Optional<List<CustomerCompany>> getCustomerCompanyIfPresent() {\n return Optional.ofNullable(toCustomerCompany);\n }", "public List<CustomerCompany> getAllCustomerCompanies() \n\t{\n\t\treturn this.entityManager.createNamedQuery(\"CustomerCompany.listAll\", CustomerCompany.class).getResultList();\n\t}", "public java.util.Set<vn.com.phuclocbao.entity.CompanyEntity> getCompanies()\n {\n return companies;\n }", "public CustomerCompany addOrUpdateCustomerCompany(CustomerCompany company) \n\t{\n\t\tif (company.getId() == null) \n\t\t{\n\t\t\tthis.entityManager.persist(company);\t\t\t\n\t\t} \n\t\telse \n\t\t{\n\t\t\tcompany = this.entityManager.merge(company);\n\t\t}\n\t\treturn company;\n\t}", "@Override\r\npublic void add(Company c) {\n\tchildren.add(c);\r\n}", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "@Override\r\n\tpublic List<Company> getCompanyList() throws SQLException {\n\r\n\t\tList<Company> companies = new ArrayList<>();\r\n\t\tcompanyRepository.findAll().forEach(companies::add);\r\n\r\n\t\treturn companies;\r\n\t}", "public java.util.List<contactsapi.company.CompanyResponse> getCompaniesList() {\n return companies_;\n }", "public List<Company> companies() {\n StandardServiceRegistry registry = new StandardServiceRegistryBuilder().configure().build();\n SessionFactory sessionFactory = null;\n try {\n\n sessionFactory = new MetadataSources(registry).buildMetadata().buildSessionFactory();\n Session session = sessionFactory.getCurrentSession();\n session.beginTransaction();\n List<Company> listOfCompanies = session.createQuery(\"FROM Company\").getResultList();\n session.getTransaction().commit();\n return listOfCompanies;\n\n } finally {\n if (sessionFactory != null) {\n sessionFactory.close();\n }\n }\n }", "@Override\n\tpublic List<Company> queryCompanyAll() {\n\t\treturn companyDao.queryCompanyAll();\n\t}", "public List<Company> getCompanys() {\n\t\treturn companyDao.findAll();\n//\t\treturn companies;\n\t}", "public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }", "@Override\r\n\tpublic void addCompany(Company company) throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tString sql = \"insert into companies values(0, ?, ?, ?)\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(sql);\r\n\t\t\tif (company != null) {\r\n\t\t\t\tpstmt.setString(1, company.getCompName());\r\n\t\t\t\tpstmt.setString(2, company.getCompEmail());\r\n\t\t\t\tpstmt.setString(3, company.getCompPass());\r\n\t\t\t\tpstmt.executeUpdate();\r\n\r\n\t\t\t\tSystem.out.println(\"New company was added\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"addCompany Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<ManagedCompany> getManagedCompanies() {\n \n List<ManagedCompany> results = new ArrayList<>();\n \n try {\n Connection conn = this.databaseUtils.getConnection();\n dao.setConnection(conn);\n results = dao.getItems();\n } catch (SQLException e) {\n Logger.getLogger(AppService.class.getName()).log(Level.SEVERE, null, e);\n }\n \n return results;\n }", "@Override\n\tpublic void addCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().save(customer);\n\t}", "public Builder addCompanies(contactsapi.company.CompanyResponse value) {\n if (companiesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureCompaniesIsMutable();\n companies_.add(value);\n onChanged();\n } else {\n companiesBuilder_.addMessage(value);\n }\n return this;\n }", "public contactsapi.company.CompanyResponse.Builder addCompaniesBuilder() {\n return getCompaniesFieldBuilder().addBuilder(\n contactsapi.company.CompanyResponse.getDefaultInstance());\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Company> loadAll() {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Company\").list();\r\n\t}", "public java.util.List<? extends contactsapi.company.CompanyResponseOrBuilder> \n getCompaniesOrBuilderList() {\n return companies_;\n }", "public ArrayList<Coupon> getCompanyCoupons() throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "public java.util.List<contactsapi.company.CompanyResponse> getCompaniesList() {\n if (companiesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(companies_);\n } else {\n return companiesBuilder_.getMessageList();\n }\n }", "public void addVendorCompany(VendorCompany vc) {\r\n\t\ttry {\r\n\t\t\tcompanyDirectory.add(vc);\r\n\t\t} catch (IllegalArgumentException iae) {\r\n\t\t\tthrow new IllegalArgumentException(iae.getMessage());\r\n\t\t}\r\n\t}", "List<Company> getCompanyList() throws DAOException ;", "public Builder addAllCompanies(\n java.lang.Iterable<? extends contactsapi.company.CompanyResponse> values) {\n if (companiesBuilder_ == null) {\n ensureCompaniesIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, companies_);\n onChanged();\n } else {\n companiesBuilder_.addAllMessages(values);\n }\n return this;\n }", "public void setContactCompany(String contactCompany) {\n this.contactCompany = contactCompany;\n }", "@Override\n\tpublic List<Company> getAll() {\n\t\treturn dao.getAll();\n\t}", "@Override\r\n\tpublic List<Company> getAllCompanies() {\r\n\t\tString methodName = \"getAllCompanies()\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\treturn companyRepository.findAll();\r\n\t\t\r\n\t}", "public void setCompany(Company aCompany) {\n company = aCompany;\n }", "@Override\r\n\tpublic ArrayList<Company> getAllCompanies() throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tArrayList<Company> allCompanies = new ArrayList<>();\r\n\t\t\tString sql = \"select * from companies\";\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tCompany comp = new Company(rs.getInt(\"companyId\"), rs.getString(\"companyName\"),\r\n\t\t\t\t\t\trs.getString(\"companyEmail\"), rs.getString(\"companyPass\"));\r\n\t\t\t\tallCompanies.add(comp);\r\n\t\t\t}\r\n\t\t\treturn allCompanies;\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"getAllCompanies Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void add(Customer c) {\n customers.add(c);\n\n fireTableDataChanged();\n }", "@Override\n\tpublic List<CompanyVO> getCompanyInfo(String c_name) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<Address> getAddressByCustomerId(int customerId, int companyId) {\n\t\treturn getAddressDAO().getAddressByCustomerId(customerId,companyId);\r\n\t}", "public List<Company> getAllCompanies() {\n\t\treturn Validations.VerifyNotEmpty(companyRepository.findAll());\n\t}", "public List<Company> getCompanies() throws BusinessException {\n\t\tList<Company> lstCompanies = new ArrayList<Company>();\n\n\t\ttry {\n\n\t\t\tList<Object> list = UtilSession.getObjectsByNamedQuery(this.em, Company.FIND_COMPANIES, null);\n\n\t\t\tfor (Object object : list) {\n\t\t\t\tCompany vnt = (Company) object;\n\t\t\t\tlstCompanies.add(vnt);\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tString s = \"Error al consultar las compa�ias\";\n\t\t\t_logger.error(s, ex);\n\t\t\tthrow new BusinessException(s, ex);\n\t\t}\n\n\t\t\n\n\t\treturn lstCompanies;\n\n\t}", "public void setCompany(String company) {\r\n\t\tthis.company = company;\r\n\t}", "@Override\n\tpublic Collection<String> getCompanyList() {\n\t\treturn getHibernateTemplate().execute(new HibernateCallback<String, Collection<String>>(\"getCompanyList\") {\n\t\t\t@Override\n\t\t\tpublic Collection<String> doInHibernate(final Session session) {\n\t\t\t\tfinal Criteria criteria = session.createCriteria(getEntityClass());\n\t\t\t\tcriteria.setProjection(Projections.property(\"name\"));\n\t\t\t\tcriteria.addOrder(Order.asc(\"name\"));\n\t\t\t\treturn criteria.list();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public void setCompany(String company) {\n\t\tthis.company = company;\n\t}", "public void setCompanyId(int companyId) {\n this.companyId = companyId;\n }", "@OneToMany(mappedBy=\"tblContactperson\")\n\tpublic Set<TblCustomer> getTblCustomers() {\n\t\treturn this.tblCustomers;\n\t}", "public void setCompany(String company) {\n this.company = company;\n }", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "protected List<CompaniesContactsEntity> findByIdCompany(CompaniesEntity companiesEntity) {\n\n log.info(\"CompaniesContactsBean => method : findByIdCompany()\");\n\n FacesMessage facesMessage;\n\n if (companiesContactsEntity == null) {\n log.error(\"Companies entity is null\");\n facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"company.error\"), null);\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\n return null;\n }\n\n EntityManager em = EMF.getEM();\n\n List<CompaniesContactsEntity> companiesContactsEntities = companiesContactsDao.findByIdCompany(em, companiesEntity.getId());\n\n em.clear();\n em.close();\n\n return companiesContactsEntities;\n }", "public String navigateServicesCompanyList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"ServicesCompany_items\", this.getSelected().getServicesCompanyList());\n }\n return \"/admin/servicesCompany/index\";\n }", "public void setCompanyId(long companyId) {\n this.companyId = companyId;\n }", "public CustomerCompany findCustomerCompany(Long id) \n\t{\n\t\treturn this.entityManager.find(CustomerCompany.class, id);\n\t}", "public ArrayList<Company> getAllCompanies() throws Exception {\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\t\t\tconnection = JdbcUtils.getConnection();\n\n\t\t\t// Creating the SQL query\n\t\t\tString sqlStatement = \"SELECT * FROM companies\";\n\n\t\t\t// Combining between the syntax and our connection\n\t\t\tpreparedStatement = connection.prepareStatement(sqlStatement);\t\t\t\n\n\t\t\t// Executing the query\n\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\tArrayList<Company> allCompanies = new ArrayList<Company>(); \n\t\t\t\n\t\t\twhile (resultSet.next()) {\n\t\t\t\t\n\t\t\t\tLong id = resultSet.getLong(\"Company_Id\");\n\t\t\t\tString name = resultSet.getString(\"Company_NAME\");\n\t\t\t\tallCompanies.add(new Company(id, name));\n\t\t\t}\n\t\t\treturn allCompanies;\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// **If there was an exception in the \"try\" block above, it is caught here and\n\t\t\t// notifies a level above.\n\t\t\te.printStackTrace();\n\t\t\tthrow new ApplicationException(e,ErrorType.GENERAL_ERROR,\n\t\t\t\t\tDateUtils.getCurrentDateAndTime() + \"FAILED to return all companies\");\n\n\t\t\t// Closing the resources\n\t\t\t} finally {\n\t\t\t\tJdbcUtils.closeResources(connection, preparedStatement,resultSet);\n\t\t\t}\t\n\t\t}", "private void loadCustomerCombo() {\n ArrayList<CustomerDTO> allCustomers;\n try {\n allCustomers = ctrlCustomer.get();\n for (CustomerDTO customer : allCustomers) {\n custIdCombo.addItem(customer.getId());\n }\n } catch (Exception ex) {\n Logger.getLogger(PlaceOrderForm.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "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}", "@Override\r\n\tpublic List<Customer> getAllCustomers() {\r\n\t\tList<Customer> allCustomers = new ArrayList<Customer>();\r\n\t\tallCustomers = customerRepository.findAll();\r\n\t\tif (!allCustomers.isEmpty()) {\r\n\t\t\treturn allCustomers;\r\n\t\t} else {\r\n\t\t\tthrow new EmptyEntityListException(\"No Customers Found.\");\r\n\t\t}\r\n\r\n\t}", "public void setCompanyId(Long companyId) {\n this.companyId = companyId;\n }", "@Accessor(qualifier = \"Customers\", type = Accessor.Type.SETTER)\n\tpublic void setCustomers(final Collection<B2BCustomerModel> value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(CUSTOMERS, value);\n\t}", "private void loadCustomerData() {\n\t\tCustomerDTO cust1 = new CustomerDTO();\n\t\tcust1.setId(null);\n\t\tcust1.setFirstName(\"Steven\");\n\t\tcust1.setLastName(\"King\");\n\t\tcust1.setEmail(\"king@gmail.com\");\n\t\tcust1.setCity(\"Hyderabad\");\n\t\tcustomerService.createCustomer(cust1);\n\n\t\tCustomerDTO cust2 = new CustomerDTO();\n\t\tcust2.setId(null);\n\t\tcust2.setFirstName(\"Neena\");\n\t\tcust2.setLastName(\"Kochhar\");\n\t\tcust2.setEmail(\"kochhar@gmail.com\");\n\t\tcust2.setCity(\"Pune\");\n\t\tcustomerService.createCustomer(cust2);\n\n\t\tCustomerDTO cust3 = new CustomerDTO();\n\t\tcust3.setId(null);\n\t\tcust3.setFirstName(\"John\");\n\t\tcust3.setLastName(\"Chen\");\n\t\tcust3.setEmail(\"johnr@gmail.com\");\n\t\tcust3.setCity(\"Bangalore\");\n\t\tcustomerService.createCustomer(cust3);\n\n\t\tCustomerDTO cust4 = new CustomerDTO();\n\t\tcust4.setId(null);\n\t\tcust4.setFirstName(\"Nancy\");\n\t\tcust4.setLastName(\"Greenberg\");\n\t\tcust4.setEmail(\"nancy@gmail.com\");\n\t\tcust4.setCity(\"Mumbai\");\n\t\tcustomerService.createCustomer(cust4);\n\n\t\tCustomerDTO cust5 = new CustomerDTO();\n\t\tcust5.setId(5L);\n\t\tcust5.setFirstName(\"Luis\");\n\t\tcust5.setLastName(\"Popp\");\n\t\tcust5.setEmail(\"popp@gmail.com\");\n\t\tcust5.setCity(\"Delhi\");\n\t\tcustomerService.createCustomer(cust5);\n\n\t}", "public void addCustomerMoney(Coin c){\n customerMoney.add(c);\n }", "public void addCustomer(CustomerWithGoods customer) {\n\t\tthis.allCustomers.add(customer);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "public ArrayList<Company> getCompaniesFromCache() {\n\n ParseQuery<Company> query = ParseQuery.getQuery(PARSE_NAME);\n query.fromLocalDatastore();\n\n try {\n return new ArrayList<>(query.find());\n } catch (ParseException e) {\n Log.e(PARSE_NAME, \"Unable to find any merchants from local data store:\\n\" + e.getMessage());\n }\n\n return new ArrayList<>();\n }", "@Override\r\n\tpublic Company insertCompany(Company company) throws SQLException {\n\t\treturn companyRepository.save(company);\r\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_expandoColumn.setCompanyId(companyId);\n\t}", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "public java.util.List<? extends contactsapi.company.CompanyResponseOrBuilder> \n getCompaniesOrBuilderList() {\n if (companiesBuilder_ != null) {\n return companiesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(companies_);\n }\n }", "@Nonnull\n public List<CustomerSalesArea> fetchCustomerSalesArea()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerSalesArea.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerSalesArea\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerSalesArea> entityList = result.asList(CustomerSalesArea.class);\n for (CustomerSalesArea entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "public Builder addCompanies(\n contactsapi.company.CompanyResponse.Builder builderForValue) {\n if (companiesBuilder_ == null) {\n ensureCompaniesIsMutable();\n companies_.add(builderForValue.build());\n onChanged();\n } else {\n companiesBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "public Builder clearCompany() {\n \n company_ = getDefaultInstance().getCompany();\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public ArrayList<Company> updateCacheList() {\n ParseQuery<Company> query = ParseQuery.getQuery(PARSE_NAME);\n\n try {\n Company.pinAll(\"companyList\", query.find());\n } catch (ParseException e) {\n Log.e(PARSE_NAME, \"Unable to find any merchant from Parse Database:\\n\" + e.getMessage());\n }\n\n return getCompaniesFromCache();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\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 company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void addRelatedEntities(Map<String, Set<String>> relatedEntities) {\n for (Entry<String, Set<String>> relatedEntity : relatedEntities.entrySet()) {\n Set<String> thisRelatedEntity =\n this.relatedEntities.get(relatedEntity.getKey());\n if (thisRelatedEntity == null) {\n this.relatedEntities.put(\n relatedEntity.getKey(), relatedEntity.getValue());\n } else {\n thisRelatedEntity.addAll(relatedEntity.getValue());\n }\n }\n }", "public static void showCompanies(){\n\t\tCompanyDao.getAllCompanies();\n\t}", "void assignAuthorisationsToCustomer(CustomerModel customer);", "@Override\r\n\tpublic void setCompanyData(RentCompanyData companyData) {\n\r\n\t}", "public List<ContactCompanyAg> findByCompanyAgId(String companyAgId)\n\t\tthrows SystemException {\n\t\treturn findByCompanyAgId(companyAgId, QueryUtil.ALL_POS,\n\t\t\tQueryUtil.ALL_POS, null);\n\t}", "public void addAll(Collection<T> objs) {\r\n\t\t\r\n\t\tlogger.trace(\"Enter addAll\");\r\n\t\t\r\n\t\tdata.addAll(objs);\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit addAll\");\r\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData addNewAuditingCompany();", "public List<TmCompany> findAll() {\n\t\treturn tmCompanyDao.findAll();\r\n\t}", "public CompanyEntity[] getAllCompanies() throws Exception {\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n\n try {\n //Establish a connection from the connection manager\n connection = JdbcUtils.getConnection();\n\n //Creating the SQL query\n String sqlStatement = \"SELECT * FROM companies\";\n\n //Combining between the syntax and our connection\n preparedStatement = connection.prepareStatement(sqlStatement);\n\n //Executing the update\n ResultSet resultSet = preparedStatement.executeQuery();\n\n if (!resultSet.next()) {\n throw new ApplicationException(ErrorType.GENERAL_ERROR, \"Cannot retrieve information\");\n }\n// getting the number of rows returned to create an array of companies\n int numberOfRows = MyUtils.getRowCount(resultSet);\n if (numberOfRows == 0) {\n throw new ApplicationException(ErrorType.GENERAL_ERROR, \"0 companies in the table\");\n }\n// creating an array of companies\n CompanyEntity[] companies = new CompanyEntity[numberOfRows];\n int i = 0;\n while (resultSet.next()) {\n companies[i].setCompanyId(resultSet.getLong(\"id\"));\n companies[i].setCompanyName(resultSet.getString(\"company_name\"));\n companies[i].setCompanyEmail(resultSet.getString(\"company_email\"));\n companies[i].setCompanyPhone(resultSet.getString(\"company_phone\"));\n companies[i].setCompanyAddress(resultSet.getString(\"company_address\"));\n i++;\n }\n\n return companies;\n\n } catch (Exception e) {\n //\t\t\te.printStackTrace();\n throw new Exception(\"Failed to retrieve data\", e);\n } finally {\n //Closing the resources\n JdbcUtils.closeResources(connection, preparedStatement);\n }\n }", "public List<Company> getAllCompanies() {\n\t\t \n\t List<Company> listOfCompanies = new ArrayList<Company>();\n\n\t Cursor cursor = mDatabase.query(MySQLiteHelper.TABLE_COMPANIES,\n\t mAllColumns, null, null, null, null, null);\n\n\t cursor.moveToFirst();\n\t while (!cursor.isAfterLast()) {\n\t Company hunt = cursorToCompany(cursor);\n\t listOfCompanies.add(hunt);\n\t cursor.moveToNext();\n\t }\n\t \n\t cursor.close();\n\t return listOfCompanies;\n\t }", "public static void loadMyCompany() {\n\t\tMyCompany myCompany = fetchFromDB();\n\n\t\trender(\"@myCompany\", myCompany);\n\t}", "@Override\n\tpublic void modifryCompany(BeanCompany Company) {\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tsession.update(Company);\n\t\t\ttx.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t}\n\t}", "@Override\r\n\tpublic Company updateCompany(Company company) {\n\t\treturn null;\r\n\t}", "public String getContactCompany() {\n return contactCompany;\n }", "public void registerNewCustomers(Customer c) {\n if (!newCustomers.contains(c)\n && !modifiedCustomers.contains(c)) {\n newCustomers.add(c);\n }\n }", "public Company getCompany() {\r\n return this.company;\r\n }", "public void setCarCompany(String carCompany) {\n\t\tthis.carCompany = carCompany;\n\t}", "public Collection<CompaniaDTO> findObtenerListaCompanias() throws ERPException{\r\n\t\treturn this.companiaGestor.obtenerListaCompanias();\r\n\t}", "public void addCustomerSalesArea(CustomerSalesArea... entity) {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = Lists.newArrayList();\n }\n toCustomerSalesArea.addAll(Lists.newArrayList(entity));\n }", "@Override\n\tpublic void putCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(customer);;\n\n\t}", "public void setCompanyId(Integer value) {\n this.companyId = value;\n }" ]
[ "0.7032926", "0.65699875", "0.6405154", "0.57715714", "0.5589014", "0.55112696", "0.54687804", "0.5459013", "0.54416806", "0.54367566", "0.5361681", "0.53031796", "0.5268302", "0.5266376", "0.5231772", "0.51772827", "0.5176126", "0.51641184", "0.5114967", "0.50230426", "0.5017523", "0.49823353", "0.49802133", "0.4975798", "0.49613577", "0.4957895", "0.49115905", "0.49062672", "0.48981714", "0.48971143", "0.48799777", "0.48576564", "0.4852897", "0.48427075", "0.4837601", "0.48296344", "0.48220474", "0.48177373", "0.47775736", "0.47613257", "0.47603703", "0.47486654", "0.47265783", "0.47225195", "0.4713507", "0.47002804", "0.46976206", "0.46930006", "0.46851546", "0.46851546", "0.46596125", "0.46520436", "0.46328402", "0.46187538", "0.46164668", "0.46154523", "0.46148157", "0.46094427", "0.46094343", "0.46082234", "0.45999315", "0.45908874", "0.4588871", "0.45884833", "0.45884833", "0.45884833", "0.45884833", "0.45839876", "0.45837954", "0.45816755", "0.4580828", "0.4580828", "0.45777503", "0.4569204", "0.45661518", "0.45619097", "0.45572004", "0.45531198", "0.45362127", "0.4536109", "0.45356193", "0.45311674", "0.45210767", "0.4520252", "0.45131785", "0.45055017", "0.44970948", "0.4495886", "0.4493766", "0.44904757", "0.4483029", "0.4481133", "0.4479043", "0.44779167", "0.44698307", "0.44687134", "0.44585684", "0.44580695", "0.44563273", "0.44555482" ]
0.7056657
0
Fetches the CustomerSalesArea entities (one to many) associated with this entity. This corresponds to the OData navigation property to_CustomerSalesArea. Please note: This method will not cache or persist the query results.
@Nonnull public List<CustomerSalesArea> fetchCustomerSalesArea() throws ODataException { if (erpConfigContext == null) { throw new ODataException(ODataExceptionType.OTHER, "Failed to fetch related objects of type CustomerSalesArea.", new IllegalStateException("Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.")); } final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection()); odataResourceUrl.append("("); odataResourceUrl.append("Customer="); odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer)); odataResourceUrl.append(")/"); odataResourceUrl.append("to_CustomerSalesArea"); final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata(); final ODataQuery query = builder.build(); final ODataQueryResult result = query.execute(erpConfigContext); final List<CustomerSalesArea> entityList = result.asList(CustomerSalesArea.class); for (CustomerSalesArea entity: entityList) { entity.setErpConfigContext(erpConfigContext); entity.setServicePathForFetch(getServicePathForFetch()); } return entityList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n public List<CustomerSalesArea> getCustomerSalesAreaOrFetch()\n throws ODataException\n {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = fetchCustomerSalesArea();\n }\n return toCustomerSalesArea;\n }", "@Nonnull\n public Optional<List<CustomerSalesArea>> getCustomerSalesAreaIfPresent() {\n return Optional.ofNullable(toCustomerSalesArea);\n }", "public void setCustomerSalesArea(\n @Nonnull\n final List<CustomerSalesArea> value) {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = Lists.newArrayList();\n }\n toCustomerSalesArea.clear();\n toCustomerSalesArea.addAll(value);\n }", "@Nonnull\n public Customer.CustomerBuilder customerSalesArea(CustomerSalesArea... value) {\n return toCustomerSalesArea(Lists.newArrayList(value));\n }", "public void addCustomerSalesArea(CustomerSalesArea... entity) {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = Lists.newArrayList();\n }\n toCustomerSalesArea.addAll(Lists.newArrayList(entity));\n }", "public static ArrayList<SalesOrder> getSalesOrderSets() throws OnlineODataStoreException\n {\n\n\n //Get the open online store\n ODataOpenListener openListener = ODataOpenListener.getInstance();\n OnlineODataStore store = openListener.getStore();\n\n if (store!=null)\n {\n SalesOrder salesOrder;\n ODataProperty property;\n ODataPropMap properties;\n String resourcePath;\n\n try\n {\n /**\n * Build the initial OData resource path and query options string from:\n * Collection ID: EntitySet Name\n * ?$orderby= : query option that specifies the order (sorting) of the response\n * SalesOrderID : sort key for the orderby directive\n *\n * Instead of SalesOrderID, you can specify Collections.NOTE to have all SalesOrderSet\n * returned alphabetically (and by default displayed that way in the list view).\n *\n * The christianschneider service enforces server-side paging and will return 20 entities per\n * request. To view the paging size (\"$skiptoken=\") value, paste the first URL below into a\n * browser window, and scroll to the bottom of the response. You do not have to\n * track the number of entities received in your code. The SDK will create the\n * next resource path string for you (as seen in the code below). When the returned\n * string is `null' you have received all entities.\n *\n * Since there are 77 entities in the OData service we are calling, the do-while loop\n * will end up issuing the four requests below to receive all the data (20 entities at a time).\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=20,20\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=40,40\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=60,60\n */\n\n // Build initial resource path and query options string\n resourcePath = Collections.SALES_ORDER_SET + \"?$top=5&$skip=\" + skipValue + \"&$orderby=\" + Collections.SALES_ORDER_ID;\n // Loop until resourcePath is null\n Log.d(\"resourcePath\", resourcePath);\n// do\n// {\n Log.d(TAG, \"Requesting: \" + resourcePath);\n\n //Executor method for reading an Entity set\n ODataResponseSingle resp = store.executeReadEntitySet(resourcePath, null);\n\n //Get the response payload\n ODataEntitySet feed = (ODataEntitySet) resp.getPayload();\n\n //Get the list of ODataEntity\n List<ODataEntity> entities = feed.getEntities();\n\n //Loop to retrieve the information from the response and store in the SalesOrder Object\n for (ODataEntity entity : entities)\n {\n properties = entity.getProperties();\n property = properties.get(com.christianschneider.model.Collections.SALES_ORDER_ID);\n salesOrder = new SalesOrder(property.getValue().toString());\n property = properties.get(Collections.NOTE);\n salesOrder.setNote(property.getValue().toString());\n property = properties.get(Collections.NOTE_LANGUAGE);\n salesOrder.setNoteLanguage(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_ID);\n salesOrder.setCustomerId(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_NAME);\n salesOrder.setCustomerName(property.getValue().toString());\n property = properties.get(Collections.CURRENCY_CODE);\n salesOrder.setCurrencyCode(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS);\n salesOrder.setLifecycleStatus(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS_DESCRIPTION);\n salesOrder.setLifecycleStatusDescription(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS);\n salesOrder.setBillingStatus(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS_DESCRIPTION);\n salesOrder.setBillingStatusDescription(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS);\n salesOrder.setDeliveryStatus(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS_DESCRIPTION);\n salesOrder.setDeliveryStatusDescription(property.getValue().toString());\n property = properties.get(Collections.CREATED_AT);\n salesOrder.setCreatedAt(property.getValue().toString());\n property = properties.get(Collections.CHANGED_AT);\n salesOrder.setChangedAt(property.getValue().toString());\n\n /**\n * The unit price value from the christianschneider OData service has\n * four decimal places, we'll round to two decimal places before storing the data\n */\n property = properties.get(Collections.GROSS_AMOUNT);\n Float price = Float.valueOf(property.getValue().toString());\n salesOrder.setGrossAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.NET_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setNetAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.TAX_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setTaxAmount(String.format(\"%.2f\", price));\n\n // Add this entity to the array\n pList.add(salesOrder);\n SalesOrderItemDataSingleton.initialize(openListener, salesOrder);\n\n }\n\n // Get the next resource path from the OData SDK. The call to getNextResourcePath()\n // will return the appropriate string based on the server's skiptoken value.\n // resourcePath = feed.getNextResourcePath();\n\n// }\n // Short circuit evaluation of the string to see if we should loop again.\n // When all entities have been received, resourcePath will be null\n// while (resourcePath != null && !resourcePath.isEmpty());\n\n SalesOrder.logSalesOrderArrayList(pList);\n\n // Save a reference to the list in ITEMS.\n ITEMS = pList;\n\n // Store all items in ITEMS (ArrayList) in ITEM_MAP (HashMap) for rapid retrieval\n storeData();\n skipValue += 5;\n\n }\n catch (Exception e)\n {\n Log.e(TAG, appContext.getString(R.string.online_odata_store_exception));\n throw new OnlineODataStoreException(e);\n }\n }\n else\n Log.e(TAG, \"Store not open\");\n\n return pList;\n }", "@GetMapping(\"/{id}/sales\")\n public Iterable<Sale> getSalesByCustomer(@PathVariable long id){\n Customer b = customerRepository.findById(id);\n return b.getSales();\n }", "@RequestMapping(\"/api/salesOrders\")\n\tpublic List<SalesOrder> salesOrders() throws ODataException {\n\n\t\tLOGGER.info(\"Method entry {}\", salesOrderMethod);\n\n\t\t// The soldToParty is hardcoded since we only want to show orders for the\n\t\t// on-time customer and it must not be changed in the UI layer\n\n\t\tSalesOrderFluentHelper query = ProcessSalesOrdersService.getAllSalesOrder().filter(SOLD_TO_PARTY.eq(\"10401010\"))\n\t\t\t\t.select(SALES_ORDER, SALES_ORDER_TYPE, DISTRIBUTION_CHANNEL, ORGANIZATION_DIVISION, SOLD_TO_PARTY,\n\t\t\t\t\t\tPURCHASE_ORDER_BY_CUSTOMER, TOTAL_NET_AMOUNT, TRANSACTION_CURRENCY, CREATION_DATE);\n\n\t\tList<SalesOrder> orderList = query.execute(new ErpConfigContext(s4cldDestinationName));\n\n\t\tLOGGER.info(\"Method exit {}\", salesOrderMethod);\n\n\t\treturn orderList;\n\t}", "public List<Sale> getSales() {\n if (sales == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SaleDao targetDao = daoSession.getSaleDao();\n List<Sale> salesNew = targetDao._queryTask_Sales(uuid);\n synchronized (this) {\n if(sales == null) {\n sales = salesNew;\n }\n }\n }\n return sales;\n }", "@Nonnull\n public List<CustomerCompany> fetchCustomerCompany()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerCompany.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerCompany\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerCompany> entityList = result.asList(CustomerCompany.class);\n for (CustomerCompany entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@Override\r\n\tpublic List<SalesDto> queryAllSales() {\n\t\treturn salesMapper.queryAllSales();\r\n\t}", "@Nonnull\n public List<CustomerCompany> getCustomerCompanyOrFetch()\n throws ODataException\n {\n if (toCustomerCompany == null) {\n toCustomerCompany = fetchCustomerCompany();\n }\n return toCustomerCompany;\n }", "public ArrayList<SalesOrder> getSalesOrders() {\n\t\treturn salesOrders;\n\t}", "public List<Almacen> getStoresByIdCompany(long idCompany);", "@PreAuthorize(\"#oauth2.hasAnyScope('read','write','read-write')\")\n\t@RequestMapping(method = GET)\n\tpublic Mono<ResponseEntity<List<Customer>>> allCustomers() {\n\n\t\treturn repo.findAll().collectList()\n\t\t\t.filter(customers -> customers.size() > 0)\n\t\t\t.map(customers -> ok(customers))\n\t\t\t.defaultIfEmpty(noContent().build());\n\t}", "public ArrayList<SalesOrder> getAllSalesOrdersByCustomer(long customerId, boolean retrieveAssociation) throws Exception\n {\n ArrayList<SalesOrder> returnList = new ArrayList<SalesOrder>();\n\n PreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM SalesOrder WHERE contactsKey = ?\");\n query.setLong(1, customerId);\n _da.setSqlCommandText(query);\n ResultSet salesOrderResult = _da.callCommandGetResultSet();\n\n while (salesOrderResult.next())\n {\n SalesOrder salesOrder = buildSalesOrder(salesOrderResult, retrieveAssociation);\n returnList.add(salesOrder);\n }\n\n return returnList;\n }", "@Override\n\tpublic List<Customer> findAllCustomer() {\n\t\treturn customerDao.findAllCustomer();\n\t}", "public List<Product> getSales() {\n return sales;\n }", "@Override\n\t@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\treturn customerDAO.getCustomers();\n\t\t\n\t}", "@Override\n\tpublic List<MstCustomerDto> getAllCustomer() {\n\t\tList<MstCustomerDto> listMstCustomerDtos=new ArrayList<>();\n\t\tList<Object[]> obj=new ArrayList<>();\n\t\t\n\t\tobj = mstCustomerDao.getAll();\n\t\tlistMstCustomerDtos = mapperFacade.mapAsList(obj, MstCustomerDto.class);\n\t\t\n\t\treturn listMstCustomerDtos;\n\t}", "@GET\n\t@Path(\"getAllCustomer\")\n\tpublic List<Customer> getAllCustomer() {\n\t\treturn ManagerHelper.getCustomerManager().getAllCustomer();\n\t}", "@Override\n\tpublic List<Customer> retrieveAllCustomers() {\n\t\tlogger.info(\"A GET call retrieved all customers: retrieveAllCustomers()\");\n\t\treturn customers;\n\t}", "@Override\n\t@Transactional\n\tpublic List<Area> findAll() {\n\t\treturn (List<Area>) dao.findAll();\n\t}", "@GET\r\n\t@Produces({ MediaType.APPLICATION_JSON })\r\n\tpublic ArrayList<Customer> getCustomers() {\r\n\t\treturn custDao.readAll();\r\n\t}", "@Override\n\tpublic List<Area> getAreaList() {\n\t\treturn areaDao.queryArea();\n\t}", "public com.mpe.financial.model.SalesOrder getSalesOrder () {\r\n\t\treturn salesOrder;\r\n\t}", "public List<Site> loadSitesByCustomer(long id) {\r\n\t\t\r\n\t\treturn siteDao.loadSitesByCustomer(id) ;\r\n\t\t\r\n\t}", "@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> customers() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QCustomer qcustomer = QCustomer.customer;\r\n List<Customer> customers = (List<Customer>) query.from(qcustomer).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn customers;\r\n }", "public List<Customermodel> getCustomers() {\n\t return customerdb.findAll();\n\t }", "public List<Customer> getAllCustomers() {\n Query query = em.createNamedQuery(\"Customer.findAll\");\r\n // return query result\r\n return query.getResultList();\r\n }", "@Override\n\tpublic List<CustomerData> getAllCustomer() {\n\t\treturn customerRepository.findAll();\n\t}", "@Override\n public JSONObject viewCustomerById(long id) {\n\n return in_salescustdao.viewSLCustomerByID(id);\n }", "@Override\n public JSONObject viewSLCustomersByAdmin() {\n\n return in_salescustdao.viewSLCustomerByAdmin();\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Site> loadSitesByCustomer(long id) {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tList<Site> siteList = sessionFactory.getCurrentSession().createCriteria(Site.class)\r\n\t \t\t\t .add(Restrictions.eq(\"customer.id\", id))\r\n\t \t\t\t .addOrder(Order.asc(\"name\")).list();\r\n\t\t\tif (siteList != null && !siteList.isEmpty()) {\r\n\t \t\t\treturn siteList;\r\n\t \t\t} else {\r\n\t \t\t\treturn null;\r\n\t \t\t}\r\n\t\t}\r\n\t\tcatch (HibernateException hbe) {\r\n\t\t\tthrow SessionFactoryUtils.convertHibernateAccessException(hbe);\r\n\t\t}\r\n\t\t\r\n\t}", "public List<CustomerEntity> findAll() {\n\t\treturn customerRepository.findAll();\n\t}", "List<SalesConciliation> getSalesConciliation(Company company, Date startDate, Date endDate) throws Exception;", "@Override\n\tpublic ArrayList<SalesOrder> getAllSalesOrdersByCustomer(String customerName, boolean retrieveAssociation) throws Exception\n\t{\n ArrayList<SalesOrder> returnList = new ArrayList<SalesOrder>();\n\n\t\tPreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM SalesOrder, Contacts WHERE name = ?\");\n query.setString(1, customerName);\n _da.setSqlCommandText(query);\n ResultSet salesOrderResult = _da.callCommandGetResultSet();\n\n while (salesOrderResult.next())\n {\n SalesOrder salesOrder = buildSalesOrder(salesOrderResult, retrieveAssociation);\n returnList.add(salesOrder);\n }\n\n return returnList;\n\t}", "public List<Customer> getAllCustomers() {\n return customerRepository.findAll();\n }", "public List<Customer> getCustomerByID() {\n Query query = em.createNamedQuery(\"Customer.findByCustomerId\")\r\n .setParameter(\"customerId\", custID);\r\n // return query result\r\n return query.getResultList();\r\n }", "@GetMapping()\n public List<AgentCustomerList> findAllAgentsCustomerList() {\n return agentRepo.findAllAgentCustomerListBy();\n }", "@Override\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn customerRepository.findAllCustomer();\n\t}", "public CustomerEOImpl getCustomerEO() {\r\n return (CustomerEOImpl) getEntity(2);\r\n }", "public List<Customer> findAll(){\n\t\treturn custRepo.findAll();\n\t}", "@RequestMapping(\"getAllCustomers\")\r\n\t @ResponseBody\r\n\t public List<Customer> getAllCustomers() {\r\n\t\t return repo.findAll();\r\n\t }", "@Override\n public JSONObject viewSLCustomerByID(long id) {\n\n return in_salescustdao.viewSLCustomerByID(id);\n }", "@Override\r\n\tpublic List<Area> getAreaList() {\n\t\tList<Area> areaList = areaDao.selectArea();\r\n\t\tSystem.out.println(areaList);\r\n\t\t\r\n\t\treturn areaList;\r\n\t}", "@Override\r\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\r\n\t}", "@GetMapping(\"/{customerid}\")\n public ResponseEntity<List<Order>> byCustomer(@PathVariable(value = \"customerid\") Long customerId) {\n return new ResponseEntity<>(orderService.getAllByCustomerId(customerId), HttpStatus.OK);\n }", "public List<Sale> getSalesLog() {\n return salesLog;\n }", "private ObservableList<Order> getAllCustomerOrders(int customerId){\r\n ObservableList<Order> customerOrders = null;\r\n try {\r\n OrderDB odb = new OrderDB();\r\n customerOrders = odb.getAllOrders(customerId);\r\n } catch (Exception e){\r\n System.err.println(e.getMessage());\r\n }\r\n return customerOrders;\r\n }", "@Override\n\tpublic List<Goodsarea> findAllArea() {\n\t\treturn null;\n\t}", "public ArrayList<SaleVO> showSale() {\n\t\treturn sale.show();\r\n\t}", "@GetMapping(\"/customers\")\n\tpublic List<Customer> getcustomers(){\n\t\t\n\t\treturn thecustomerService.getCustomers();\n\t}", "public final void getSaleDocList() {\n showLoadingIndicator(true);\n SaleDocListViewModel saleDocListViewModel = this.viewModel;\n if (saleDocListViewModel == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"viewModel\");\n }\n String authString = getAuthString();\n String deviceId = AppUtils.getDeviceId(this);\n Intrinsics.checkExpressionValueIsNotNull(deviceId, \"AppUtils.getDeviceId(this)\");\n saleDocListViewModel.getSaleDocList(authString, deviceId, \"android\", String.valueOf(BuildConfig.VERSION_CODE), getRequestBody());\n }", "@Override\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\n\t}", "@Override\n\t@Transactional(readOnly=true)\n\tpublic List<Customer> findAll() {\n\t\treturn (List<Customer>) customerDAO.findAll();\n\t}", "@RequestMapping(value = \"/customers\", method = RequestMethod.GET)\n public ResponseEntity<?> getCustomers() {\n Iterable<Customer> customerList = customerService.getCustomers();\n return new ResponseEntity<>(customerList, HttpStatus.OK);\n }", "@GetMapping(value = CustomerRestURIConstants.GET_ALL_CUSTOMER )\n\tpublic ResponseEntity<List<Customer>> list() {\n\t\tList<Customer> customers = customerService.getAllCustomers();\n\t\treturn ResponseEntity.ok().body(customers);\n\t}", "@Override\n\tpublic List<Customer> getCustomerList() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"Select c from Customer c\");\n\t\tList<Customer> list=(List<Customer>)query.getResultList();\n\t\t/*\n\t\t * Customer customer = (Customer)session.load(Customer.class,customerId);\n\t\t * */\n\t\treturn list;\n\t}", "public ArrayList<AreaInfo> queryAreas(){\n\t\tArrayList<AreaInfo> areaInfos = new ArrayList<AreaInfo>();\n\t\t\n\t\ttry {\n\t\t\tmMysqlConnection = DriverManager\n\t\t\t\t.getConnection(getConnectionURI());\n\t\t\t\n\t\t\tmStatement = mMysqlConnection.createStatement();\n\t\t\tmResultSet = mStatement\n\t\t\t\t\t.executeQuery(\"select * from \" + mDbName + \".\" + TABLE_AREA);\n\t\t\t\n\t\t\t// store information of each area in the areInfos list\n\t\t\twhile (mResultSet.next()) {\n\t\t\t\tAreaInfo info = new AreaInfo();\n\t\t\t\t\n\t\t\t\tinfo.setAreaId( mResultSet.getInt(COLUMN_ID) );\n\t\t\t\tinfo.setAreaName( mResultSet.getString(COLUMN_NAME) );\n\t\t\t\tinfo.setAreaDescription( mResultSet.getString(COLUMN_DESCRIPTION) );\t\t\t\t\n\t\t\t\tinfo.setVersion( mResultSet.getInt(COLUMN_VERSION) );\n\t\t\t\t\n\t\t\t\tareaInfos.add(info);\n\t\t\t}\n\t\t\t\n\t\t\t// query tickets of an area\n\t\t\tfor(AreaInfo info : areaInfos){\n\t\t\t\tList< de.tudresden.inf.rn.mobilis.services.xhunt.proxy.Ticket> ticketTypes \n\t\t\t\t\t= new ArrayList< de.tudresden.inf.rn.mobilis.services.xhunt.proxy.Ticket >();\n\t\t\t\tArrayList<Ticket> tickets = queryAreaTickets(info.getAreaId());\n\t\t\t\t\n\t\t\t\tfor(Ticket ticket : tickets){\n\t\t\t\t\tticketTypes.add( new de.tudresden.inf.rn.mobilis.services.xhunt.proxy.Ticket( ticket.getId(), ticket.getName() ));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tinfo.setTickets( ticketTypes );\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.severe(\"!EXCEPTION: \" + e.getMessage());\n\t\t}\n\t\t\n\t\tflush();\n\t\t\n\t\treturn areaInfos;\n\t}", "@Override\n\t@Transactional\n\tpublic List<Customer> getAll() {\n\t\tList<Customer> loadAll = hibernateTemplate.loadAll(Customer.class);\n\t\treturn loadAll;\n\t}", "@Override\n\tpublic Iterable<Customer> displayCust() {\n\t\treturn customerRepository.findAll();\n\t}", "@GetMapping(\"/api/customer\")\n\tpublic ResponseEntity<List<CustomerDetails>> getAllCustomerDetails() {\n\n\t\tList<CustomerDetails> customerDetaillist = customerService.getAllCustomerDetails();\n\n\t\treturn ResponseEntity.ok().body(customerDetaillist);\n\n\t}", "@Override\n\tpublic Customer getCustomers(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// retrieve object from database using the ID\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\t\t\n\t\t// return the results\n\t\treturn theCustomer;\n\t}", "@GetMapping(value = \"/showCustomers\")\n\tpublic String getAllCustomers(Model model) {\n\t\t// AllCustomers model attribute iterated over to display Customers in table on\n\t\t// JSP page\n\t\tmodel.addAttribute(\"AllCustomers\", customerService.getCustomers());\n\t\t// Returns showCustomers.jsp (see webapp/jsp folder)\n\t\treturn \"showCustomers\";\n\t}", "@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Customer> theQuery =\n\t\t\t\tcurrentSession.createQuery(\"from Customer order by lastName\", Customer.class);\n\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\n\t\treturn customers;\n\t}", "@GetMapping(\"/customers\")\r\n\tprivate List<Customer> getAllCustomers() {\r\n\t\treturn customerService.getAllCustomers();\r\n\t}", "@GetMapping(\"/sale\")\n public ResultEntity<List<ItemDTO>> getAllSale()\n {\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Sale\");\n }", "SalesInvoicesType getSalesInvoices();", "public static ObservableList<Customers> getAllCustomers() {\n return allCustomers;\n }", "private void fetchArea() {\n \t\t// Fetch the isNew.\n \t\tIntent i = this.getIntent();\n \t\tthis.isNew = i.getBooleanExtra( EXTRAS_AREA_IS_NEW, true );\n \n \t\t// Fetch ID.\n \t\tint id = i.getIntExtra( EXTRAS_AREA_ID, -1 );\n \t\tif ( id == -1 ) {\n \t\t\tToast.makeText( this, \"No area ID provided, finishing!\", Toast.LENGTH_LONG ).show();\n \t\t\tthis.finish();\n \t\t}\n \n \t\t// Get the set from application.\n \t\tthis.set = SFApplication.get().getGPSSet();\n \n \t\t// For some weird reason, NullPointerException will happen if we don't do this.\n \t\tthis.set.setMessageBus( SFApplication.get().getBus() );\n \n \t\t// Find area in set.\n \t\tthis.area = this.set.getById( id );\n \n \t\tLog.d( TAG, this.area.toString() );\n \n\t\tToast.makeText( this, \"The area ID provided did not exist in set.\", Toast.LENGTH_LONG ).show();\n\t\tthis.finish();\n \t}", "@Override\n\tpublic List<Customer> getCustomers() {\n\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Customer order by lastName\", Customer.class)\n\t\t\t\t.getResultList();\n\n\t}", "@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\t\t\n\t\t// create a query ... sort by the lastname\n\t\tQuery<Customer> theQuery = \n\t\t\t\tcurrentSession.createQuery(\"from Customer order by lastName\",Customer.class);\n\t\t\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\t\t\t\t\n\t\t// return the results\t\t\n\t\treturn customers;\n\t}", "@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\t\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t\t\t// create a query ... sort by last name\n\t\t\t\tQuery<Customer> theQuery = currentSession.createQuery(\"from Customer order by lastName\", Customer.class);\n\n\t\t\t\t// execute query and get result list\n\t\t\t\tList<Customer> customers = theQuery.getResultList();\n\n\t\t\t\t// return the results\n\t\t\t\treturn customers;\n\t}", "@Override\r\n\tpublic List<Customer> getAllCustomers() {\r\n\t\tList<Customer> allCustomers = new ArrayList<Customer>();\r\n\t\tallCustomers = customerRepository.findAll();\r\n\t\tif (!allCustomers.isEmpty()) {\r\n\t\t\treturn allCustomers;\r\n\t\t} else {\r\n\t\t\tthrow new EmptyEntityListException(\"No Customers Found.\");\r\n\t\t}\r\n\r\n\t}", "@Accessor(qualifier = \"Customers\", type = Accessor.Type.GETTER)\n\tpublic Collection<B2BCustomerModel> getCustomers()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CUSTOMERS);\n\t}", "public List<Customer> getCustomers() {\n\t\treturn customers;\n\t}", "@Override\n\tpublic List<CustomerLogin> findAllCustomerLogins() {\n\t\treturn dao.getAllCustomers();\n\t}", "public List<OrderReport> getAllOrdersAcrossStores();", "@Override\n\t@Transactional\n\tpublic List<AMOUNT> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<AMOUNT> theQuery = currentSession.createQuery(\"from Customer ORDER BY lastName\", AMOUNT.class);\n\n\t\t// execute query and get result list\n\t\tList<AMOUNT> customers = theQuery.getResultList();\n\n\t\t// return the results\n\t\treturn customers;\n\t}", "@OneToMany(mappedBy=\"tblContactperson\")\n\tpublic Set<TblCustomer> getTblCustomers() {\n\t\treturn this.tblCustomers;\n\t}", "@Override\n\tpublic Uni<List<Customer>> findAllCustomer() {\n\t\treturn repo.findAll().list();\n\t}", "public List<Customer> findAll() {\n\t\t//get current session\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t//query to fetch all records\n\t\tQuery<Customer> query = currentSession.createQuery(\n\t\t\t\t\t\t\t\t\"from Customer where customerId!=:customerId\", Customer.class);\n\t\t//get account details of all accounts\n\t\tquery.setParameter(\"customerId\", 9999999);\n\t\tList<Customer> customer = query.getResultList();\n\t\t//return the result\n\t\treturn customer;\n\t}", "@RequestMapping(method = RequestMethod.GET)\n\t\tpublic ResponseEntity<Collection<Customer>> getAllUsers() {\n\t\t\treturn service.getAllCustomers();\n\t\t}", "public ArrayList<Customer> getCustomers()\r\n {\r\n return this.Customers;\r\n }", "@Override\n\tpublic List<Customer> getCustomerById(int customerid) {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Customer> findAll() {\n\t\treturn customerRepository.findAll();\n\t}", "@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t//create the query\n\t\tQuery<Customer> query = session.createQuery(\"from Customer order by lastName\", Customer.class);\n\t\t//get the result list\n\t\tList<Customer> customers = query.getResultList();\n\t\treturn customers;\n\t}", "@GET\n\t@Path(\"getBigCustomer\")\n\tpublic List<Customer> getBigCustomer() {\n\t\treturn ManagerHelper.getCustomerManager().getBigCustomer();\n\t}", "@RequestMapping(value = \"/rs/customers/{customerId}/contacts\", method = RequestMethod.GET)\n public @ResponseBody\n ResourceItems list(@PathVariable Long customerId, @PageableDefault(size = 100) Pageable pageable) {\n Customer customer = new Customer(customerId);\n\n Iterable<Contact> contacts = service.findAll(customer, pageable);\n\n return builder.build(contacts);\n }", "public List<SalesOrderItem> fetchItem()\r\n throws ODataException\r\n {\r\n if (erpConfigContext == null) {\r\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type SalesOrderItem.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\r\n }\r\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\r\n odataResourceUrl.append(\"(\");\r\n odataResourceUrl.append(\"SalesOrder=\");\r\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(salesOrder));\r\n odataResourceUrl.append(\")/\");\r\n odataResourceUrl.append(\"to_Item\");\r\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getEndpointUrl(), odataResourceUrl.toString());\r\n final ODataQuery query = builder.build();\r\n final ErpEndpoint erpEndpoint = new ErpEndpoint(erpConfigContext);\r\n final ODataQueryResult result = query.execute(erpEndpoint);\r\n final List<SalesOrderItem> entityList = result.asList(SalesOrderItem.class);\r\n for (SalesOrderItem entity: entityList) {\r\n entity.setErpConfigContext(erpConfigContext);\r\n }\r\n return entityList;\r\n }", "public Sale find_Sale(Integer sale_id, Integer branch_id) {\n return sale_dao.find(sale_id, branch_id);\n }", "@Override\r\n\tpublic SalesByDto querySalesBy(String OFFER_ID) {\n\t\tSalesByDto sales = new SalesByDto();\r\n\t\t\r\n\t\tMap<String, Object> map =new HashMap<String, Object>();\r\n\t\tmap.put(\"OFFER_ID\", OFFER_ID);\r\n\t\tList<SalesProDto> querySalesByID = salesMapper.querySalesByID(map);\r\n\t\tList<SalesProDto> querySalesPro = new ArrayList<SalesProDto>();\r\n\t\tfor (SalesProDto salesProDto : querySalesByID) {\r\n\t\t\t List<SalesProDto> querySalesByProID = salesMapper.querySalesByProID(salesProDto);\r\n\t\t\t if(querySalesByProID!=null){\r\n\t\t\t querySalesPro.addAll(querySalesByProID);}\r\n\t\t}\r\n\t\tquerySalesByID.addAll(querySalesPro);\r\n\t\tsales.setOFFER_ID(Integer.parseInt(OFFER_ID));\r\n\t\tsales.setProductList(querySalesByID);\r\n\t\treturn sales;\r\n\t}", "public Sales getSaleById(Long id) {\r\n\t\treturn salesRepository.findById(id).orElse(null);\r\n\t}", "List<Customer> findAllWithFetch();", "public static List<Customer> getCustomers(){\n \treturn Customer.findAll();\n }", "@GetMapping(value = \"/allsites\")\n\tpublic @ResponseBody List<CreateSiteModal> getAllSites(@RequestParam(\"custId\") long custId)\n\t{\t\n\tList<CreateSiteModal> list=dashboardService.findAllSitesOfCustomer(custId);\n\t\t\n\t\treturn list;\n\t\t\n\t}", "public ArrayList<IncomeByCustomerDetail> getIncomeByCustomerDetails(\n\t\t\tClientFinanceDate startDate, ClientFinanceDate endDate,\n\t\t\tLong companyId) {\n\t\tSession session = HibernateUtil.getCurrentSession();\n\t\tArrayList<IncomeByCustomerDetail> customerDetails = new ArrayList<IncomeByCustomerDetail>();\n\t\tQuery result = session.getNamedQuery(\"getIncomeByCustomerDetails\")\n\t\t\t\t.setParameter(\"companyId\", companyId)\n\t\t\t\t.setParameter(\"startDate\", startDate.getDate())\n\t\t\t\t.setParameter(\"endDate\", endDate.getDate());\n\t\tList list = result.list();\n\t\tIterator iterator = list.iterator();\n\t\tif (list != null) {\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tObject[] object = (Object[]) iterator.next();\n\t\t\t\tIncomeByCustomerDetail customerDetail = new IncomeByCustomerDetail();\n\t\t\t\tcustomerDetail\n\t\t\t\t\t\t.setId((Long) (object[0] != null ? object[0] : 0));\n\t\t\t\tClientFinanceDate date = new ClientFinanceDate(\n\t\t\t\t\t\t(Long) (object[1] != null ? object[1] : 0));\n\t\t\t\tcustomerDetail.setTransactionDate(date);\n\t\t\t\tcustomerDetail.setTransactionType((Integer) object[2]);\n\t\t\t\tcustomerDetail\n\t\t\t\t\t\t.setTransactionNumber((String) (object[3] != null ? object[3]\n\t\t\t\t\t\t\t\t: \"\"));\n\t\t\t\tcustomerDetail.setName((String) (object[5] != null ? object[5]\n\t\t\t\t\t\t: \"\"));\n\t\t\t\tcustomerDetail\n\t\t\t\t\t\t.setJobName((String) (object[6] != null ? object[6]\n\t\t\t\t\t\t\t\t: \"\"));\n\t\t\t\tcustomerDetail\n\t\t\t\t\t\t.setAccountName((String) (object[7] != null ? object[7]\n\t\t\t\t\t\t\t\t: \"\"));\n\t\t\t\tcustomerDetail\n\t\t\t\t\t\t.setCredit((Double) (object[9] != null ? object[9]\n\t\t\t\t\t\t\t\t: 0.0d));\n\t\t\t\tcustomerDetail.setDebit((Double) (object[8] != null ? object[8]\n\t\t\t\t\t\t: 0.0d));\n\t\t\t\tcustomerDetails.add(customerDetail);\n\t\t\t}\n\t\t}\n\t\treturn customerDetails;\n\t}", "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\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//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "@Override\n\tpublic ArrayList<SalesOrder> getAllSalesOrders(boolean retrieveAssociation) throws Exception\n\t{\n\t\tArrayList<SalesOrder> returnList = new ArrayList<SalesOrder>();\n\t\t\n\t\tPreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM SalesOrder\");\n\t\t_da.setSqlCommandText(query);\n\t\tResultSet salesOrders = _da.callCommandGetResultSet();\n\t\t\t\n\t\twhile (salesOrders.next())\n\t\t{\n\t\t\tSalesOrder salesOrder = buildSalesOrder(salesOrders, retrieveAssociation);\n\t\t\treturnList.add(salesOrder);\n\t\t}\n\n\t\treturn returnList;\n\t}" ]
[ "0.757825", "0.65316516", "0.64161426", "0.61244845", "0.5984513", "0.5249457", "0.52338976", "0.5040034", "0.49640462", "0.49628064", "0.4717658", "0.47034383", "0.46010885", "0.44608435", "0.44355714", "0.44234154", "0.4409718", "0.4392005", "0.43817928", "0.43778208", "0.4372235", "0.43693623", "0.43659776", "0.43655473", "0.43631405", "0.43598223", "0.43532258", "0.43530598", "0.43481347", "0.43461415", "0.43307063", "0.43240282", "0.43100315", "0.43077362", "0.42962432", "0.42950356", "0.42756054", "0.4273658", "0.42660207", "0.4259834", "0.42576388", "0.42560768", "0.4247366", "0.42471164", "0.4246756", "0.4246059", "0.4239438", "0.42369628", "0.42347744", "0.42186838", "0.4214324", "0.42112494", "0.41996208", "0.41959143", "0.41949266", "0.4194373", "0.4191345", "0.41815448", "0.41742527", "0.41638556", "0.41579846", "0.41489843", "0.4134881", "0.4129922", "0.41265547", "0.41169596", "0.41151944", "0.41106966", "0.410189", "0.41015568", "0.4100341", "0.4094318", "0.40893468", "0.40839306", "0.40835962", "0.40831852", "0.4081072", "0.4075459", "0.4074159", "0.40731302", "0.4071684", "0.4069007", "0.4068567", "0.40655145", "0.40649438", "0.40567213", "0.4055511", "0.40525824", "0.40496042", "0.40367535", "0.40345293", "0.40343663", "0.40342772", "0.4024122", "0.40236375", "0.4013786", "0.3984526", "0.3971348", "0.39646167", "0.39606738" ]
0.83818245
0
Retrieval of associated CustomerSalesArea entities (one to many). This corresponds to the OData navigation property to_CustomerSalesArea. If the navigation property to_CustomerSalesArea of a queried Customer is operated lazily, an ODataException can be thrown in case of an OData query error. Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations.
@Nonnull public List<CustomerSalesArea> getCustomerSalesAreaOrFetch() throws ODataException { if (toCustomerSalesArea == null) { toCustomerSalesArea = fetchCustomerSalesArea(); } return toCustomerSalesArea; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n public List<CustomerSalesArea> fetchCustomerSalesArea()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerSalesArea.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerSalesArea\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerSalesArea> entityList = result.asList(CustomerSalesArea.class);\n for (CustomerSalesArea entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@Nonnull\n public Optional<List<CustomerSalesArea>> getCustomerSalesAreaIfPresent() {\n return Optional.ofNullable(toCustomerSalesArea);\n }", "public void setCustomerSalesArea(\n @Nonnull\n final List<CustomerSalesArea> value) {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = Lists.newArrayList();\n }\n toCustomerSalesArea.clear();\n toCustomerSalesArea.addAll(value);\n }", "@Nonnull\n public Customer.CustomerBuilder customerSalesArea(CustomerSalesArea... value) {\n return toCustomerSalesArea(Lists.newArrayList(value));\n }", "public void addCustomerSalesArea(CustomerSalesArea... entity) {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = Lists.newArrayList();\n }\n toCustomerSalesArea.addAll(Lists.newArrayList(entity));\n }", "public static ArrayList<SalesOrder> getSalesOrderSets() throws OnlineODataStoreException\n {\n\n\n //Get the open online store\n ODataOpenListener openListener = ODataOpenListener.getInstance();\n OnlineODataStore store = openListener.getStore();\n\n if (store!=null)\n {\n SalesOrder salesOrder;\n ODataProperty property;\n ODataPropMap properties;\n String resourcePath;\n\n try\n {\n /**\n * Build the initial OData resource path and query options string from:\n * Collection ID: EntitySet Name\n * ?$orderby= : query option that specifies the order (sorting) of the response\n * SalesOrderID : sort key for the orderby directive\n *\n * Instead of SalesOrderID, you can specify Collections.NOTE to have all SalesOrderSet\n * returned alphabetically (and by default displayed that way in the list view).\n *\n * The christianschneider service enforces server-side paging and will return 20 entities per\n * request. To view the paging size (\"$skiptoken=\") value, paste the first URL below into a\n * browser window, and scroll to the bottom of the response. You do not have to\n * track the number of entities received in your code. The SDK will create the\n * next resource path string for you (as seen in the code below). When the returned\n * string is `null' you have received all entities.\n *\n * Since there are 77 entities in the OData service we are calling, the do-while loop\n * will end up issuing the four requests below to receive all the data (20 entities at a time).\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=20,20\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=40,40\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=60,60\n */\n\n // Build initial resource path and query options string\n resourcePath = Collections.SALES_ORDER_SET + \"?$top=5&$skip=\" + skipValue + \"&$orderby=\" + Collections.SALES_ORDER_ID;\n // Loop until resourcePath is null\n Log.d(\"resourcePath\", resourcePath);\n// do\n// {\n Log.d(TAG, \"Requesting: \" + resourcePath);\n\n //Executor method for reading an Entity set\n ODataResponseSingle resp = store.executeReadEntitySet(resourcePath, null);\n\n //Get the response payload\n ODataEntitySet feed = (ODataEntitySet) resp.getPayload();\n\n //Get the list of ODataEntity\n List<ODataEntity> entities = feed.getEntities();\n\n //Loop to retrieve the information from the response and store in the SalesOrder Object\n for (ODataEntity entity : entities)\n {\n properties = entity.getProperties();\n property = properties.get(com.christianschneider.model.Collections.SALES_ORDER_ID);\n salesOrder = new SalesOrder(property.getValue().toString());\n property = properties.get(Collections.NOTE);\n salesOrder.setNote(property.getValue().toString());\n property = properties.get(Collections.NOTE_LANGUAGE);\n salesOrder.setNoteLanguage(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_ID);\n salesOrder.setCustomerId(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_NAME);\n salesOrder.setCustomerName(property.getValue().toString());\n property = properties.get(Collections.CURRENCY_CODE);\n salesOrder.setCurrencyCode(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS);\n salesOrder.setLifecycleStatus(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS_DESCRIPTION);\n salesOrder.setLifecycleStatusDescription(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS);\n salesOrder.setBillingStatus(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS_DESCRIPTION);\n salesOrder.setBillingStatusDescription(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS);\n salesOrder.setDeliveryStatus(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS_DESCRIPTION);\n salesOrder.setDeliveryStatusDescription(property.getValue().toString());\n property = properties.get(Collections.CREATED_AT);\n salesOrder.setCreatedAt(property.getValue().toString());\n property = properties.get(Collections.CHANGED_AT);\n salesOrder.setChangedAt(property.getValue().toString());\n\n /**\n * The unit price value from the christianschneider OData service has\n * four decimal places, we'll round to two decimal places before storing the data\n */\n property = properties.get(Collections.GROSS_AMOUNT);\n Float price = Float.valueOf(property.getValue().toString());\n salesOrder.setGrossAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.NET_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setNetAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.TAX_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setTaxAmount(String.format(\"%.2f\", price));\n\n // Add this entity to the array\n pList.add(salesOrder);\n SalesOrderItemDataSingleton.initialize(openListener, salesOrder);\n\n }\n\n // Get the next resource path from the OData SDK. The call to getNextResourcePath()\n // will return the appropriate string based on the server's skiptoken value.\n // resourcePath = feed.getNextResourcePath();\n\n// }\n // Short circuit evaluation of the string to see if we should loop again.\n // When all entities have been received, resourcePath will be null\n// while (resourcePath != null && !resourcePath.isEmpty());\n\n SalesOrder.logSalesOrderArrayList(pList);\n\n // Save a reference to the list in ITEMS.\n ITEMS = pList;\n\n // Store all items in ITEMS (ArrayList) in ITEM_MAP (HashMap) for rapid retrieval\n storeData();\n skipValue += 5;\n\n }\n catch (Exception e)\n {\n Log.e(TAG, appContext.getString(R.string.online_odata_store_exception));\n throw new OnlineODataStoreException(e);\n }\n }\n else\n Log.e(TAG, \"Store not open\");\n\n return pList;\n }", "public List<Sale> getSales() {\n if (sales == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SaleDao targetDao = daoSession.getSaleDao();\n List<Sale> salesNew = targetDao._queryTask_Sales(uuid);\n synchronized (this) {\n if(sales == null) {\n sales = salesNew;\n }\n }\n }\n return sales;\n }", "@RequestMapping(\"/api/salesOrders\")\n\tpublic List<SalesOrder> salesOrders() throws ODataException {\n\n\t\tLOGGER.info(\"Method entry {}\", salesOrderMethod);\n\n\t\t// The soldToParty is hardcoded since we only want to show orders for the\n\t\t// on-time customer and it must not be changed in the UI layer\n\n\t\tSalesOrderFluentHelper query = ProcessSalesOrdersService.getAllSalesOrder().filter(SOLD_TO_PARTY.eq(\"10401010\"))\n\t\t\t\t.select(SALES_ORDER, SALES_ORDER_TYPE, DISTRIBUTION_CHANNEL, ORGANIZATION_DIVISION, SOLD_TO_PARTY,\n\t\t\t\t\t\tPURCHASE_ORDER_BY_CUSTOMER, TOTAL_NET_AMOUNT, TRANSACTION_CURRENCY, CREATION_DATE);\n\n\t\tList<SalesOrder> orderList = query.execute(new ErpConfigContext(s4cldDestinationName));\n\n\t\tLOGGER.info(\"Method exit {}\", salesOrderMethod);\n\n\t\treturn orderList;\n\t}", "@GetMapping(\"/{id}/sales\")\n public Iterable<Sale> getSalesByCustomer(@PathVariable long id){\n Customer b = customerRepository.findById(id);\n return b.getSales();\n }", "@Nonnull\n public List<CustomerCompany> fetchCustomerCompany()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerCompany.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerCompany\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerCompany> entityList = result.asList(CustomerCompany.class);\n for (CustomerCompany entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@Nonnull\n public List<CustomerCompany> getCustomerCompanyOrFetch()\n throws ODataException\n {\n if (toCustomerCompany == null) {\n toCustomerCompany = fetchCustomerCompany();\n }\n return toCustomerCompany;\n }", "@Override\n\tpublic List<Area> getAreaList() {\n\t\treturn areaDao.queryArea();\n\t}", "@Override\n\tpublic List<Goodsarea> findAllArea() {\n\t\treturn null;\n\t}", "SalesInvoicesType getSalesInvoices();", "@Override\r\n\tpublic List<Area> getAreaList() {\n\t\tList<Area> areaList = areaDao.selectArea();\r\n\t\tSystem.out.println(areaList);\r\n\t\t\r\n\t\treturn areaList;\r\n\t}", "public ArrayList<SalesOrder> getSalesOrders() {\n\t\treturn salesOrders;\n\t}", "@ManyToOne(optional = true)\r\n\tpublic Area getArea() {\r\n\t\treturn this.area;\r\n\t}", "public List<Product> getSales() {\n return sales;\n }", "public List<SalesOrderItem> fetchItem()\r\n throws ODataException\r\n {\r\n if (erpConfigContext == null) {\r\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type SalesOrderItem.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\r\n }\r\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\r\n odataResourceUrl.append(\"(\");\r\n odataResourceUrl.append(\"SalesOrder=\");\r\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(salesOrder));\r\n odataResourceUrl.append(\")/\");\r\n odataResourceUrl.append(\"to_Item\");\r\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getEndpointUrl(), odataResourceUrl.toString());\r\n final ODataQuery query = builder.build();\r\n final ErpEndpoint erpEndpoint = new ErpEndpoint(erpConfigContext);\r\n final ODataQueryResult result = query.execute(erpEndpoint);\r\n final List<SalesOrderItem> entityList = result.asList(SalesOrderItem.class);\r\n for (SalesOrderItem entity: entityList) {\r\n entity.setErpConfigContext(erpConfigContext);\r\n }\r\n return entityList;\r\n }", "@Override\n\t@Transactional\n\tpublic List<Area> findAll() {\n\t\treturn (List<Area>) dao.findAll();\n\t}", "public com.mpe.financial.model.SalesOrder getSalesOrder () {\r\n\t\treturn salesOrder;\r\n\t}", "public List<Almacen> getStoresByIdCompany(long idCompany);", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public AreaProp getAreaProp(int areaPropId) {\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n AreaProp areaProp = (AreaProp) session.get(AreaProp.class, areaPropId);\n return areaProp;\n }", "public Area getArea(Area area) {\r\n\t\treturn this.getArea(area.getId());\r\n\t}", "public CustomerEOImpl getCustomerEO() {\r\n return (CustomerEOImpl) getEntity(2);\r\n }", "public List<Sale> getSalesLog() {\n return salesLog;\n }", "private void fetchArea() {\n \t\t// Fetch the isNew.\n \t\tIntent i = this.getIntent();\n \t\tthis.isNew = i.getBooleanExtra( EXTRAS_AREA_IS_NEW, true );\n \n \t\t// Fetch ID.\n \t\tint id = i.getIntExtra( EXTRAS_AREA_ID, -1 );\n \t\tif ( id == -1 ) {\n \t\t\tToast.makeText( this, \"No area ID provided, finishing!\", Toast.LENGTH_LONG ).show();\n \t\t\tthis.finish();\n \t\t}\n \n \t\t// Get the set from application.\n \t\tthis.set = SFApplication.get().getGPSSet();\n \n \t\t// For some weird reason, NullPointerException will happen if we don't do this.\n \t\tthis.set.setMessageBus( SFApplication.get().getBus() );\n \n \t\t// Find area in set.\n \t\tthis.area = this.set.getById( id );\n \n \t\tLog.d( TAG, this.area.toString() );\n \n\t\tToast.makeText( this, \"The area ID provided did not exist in set.\", Toast.LENGTH_LONG ).show();\n\t\tthis.finish();\n \t}", "public ArrayList<AreaInfo> queryAreas(){\n\t\tArrayList<AreaInfo> areaInfos = new ArrayList<AreaInfo>();\n\t\t\n\t\ttry {\n\t\t\tmMysqlConnection = DriverManager\n\t\t\t\t.getConnection(getConnectionURI());\n\t\t\t\n\t\t\tmStatement = mMysqlConnection.createStatement();\n\t\t\tmResultSet = mStatement\n\t\t\t\t\t.executeQuery(\"select * from \" + mDbName + \".\" + TABLE_AREA);\n\t\t\t\n\t\t\t// store information of each area in the areInfos list\n\t\t\twhile (mResultSet.next()) {\n\t\t\t\tAreaInfo info = new AreaInfo();\n\t\t\t\t\n\t\t\t\tinfo.setAreaId( mResultSet.getInt(COLUMN_ID) );\n\t\t\t\tinfo.setAreaName( mResultSet.getString(COLUMN_NAME) );\n\t\t\t\tinfo.setAreaDescription( mResultSet.getString(COLUMN_DESCRIPTION) );\t\t\t\t\n\t\t\t\tinfo.setVersion( mResultSet.getInt(COLUMN_VERSION) );\n\t\t\t\t\n\t\t\t\tareaInfos.add(info);\n\t\t\t}\n\t\t\t\n\t\t\t// query tickets of an area\n\t\t\tfor(AreaInfo info : areaInfos){\n\t\t\t\tList< de.tudresden.inf.rn.mobilis.services.xhunt.proxy.Ticket> ticketTypes \n\t\t\t\t\t= new ArrayList< de.tudresden.inf.rn.mobilis.services.xhunt.proxy.Ticket >();\n\t\t\t\tArrayList<Ticket> tickets = queryAreaTickets(info.getAreaId());\n\t\t\t\t\n\t\t\t\tfor(Ticket ticket : tickets){\n\t\t\t\t\tticketTypes.add( new de.tudresden.inf.rn.mobilis.services.xhunt.proxy.Ticket( ticket.getId(), ticket.getName() ));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tinfo.setTickets( ticketTypes );\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.severe(\"!EXCEPTION: \" + e.getMessage());\n\t\t}\n\t\t\n\t\tflush();\n\t\t\n\t\treturn areaInfos;\n\t}", "public ArrayList<SaleVO> showSale() {\n\t\treturn sale.show();\r\n\t}", "@Override\r\n\tpublic List<Map<String, Object>> agentSaleRelationship(String agentname) {\n\t\treturn agentMapper.agentSaleRelationship(agentname);\r\n\t}", "public List<SalesOrderItem> getItemOrFetch()\r\n throws ODataException\r\n {\r\n if (toItem == null) {\r\n toItem = fetchItem();\r\n }\r\n return toItem;\r\n }", "public LinkedList<Area> getAreas(){\n\t\treturn areas;\n\t}", "public ArrayList<SalesOrder> getAllSalesOrdersByCustomer(long customerId, boolean retrieveAssociation) throws Exception\n {\n ArrayList<SalesOrder> returnList = new ArrayList<SalesOrder>();\n\n PreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM SalesOrder WHERE contactsKey = ?\");\n query.setLong(1, customerId);\n _da.setSqlCommandText(query);\n ResultSet salesOrderResult = _da.callCommandGetResultSet();\n\n while (salesOrderResult.next())\n {\n SalesOrder salesOrder = buildSalesOrder(salesOrderResult, retrieveAssociation);\n returnList.add(salesOrder);\n }\n\n return returnList;\n }", "@Override\n\tpublic ArrayList<SalesOrder> getAllSalesOrdersByCustomer(String customerName, boolean retrieveAssociation) throws Exception\n\t{\n ArrayList<SalesOrder> returnList = new ArrayList<SalesOrder>();\n\n\t\tPreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM SalesOrder, Contacts WHERE name = ?\");\n query.setString(1, customerName);\n _da.setSqlCommandText(query);\n ResultSet salesOrderResult = _da.callCommandGetResultSet();\n\n while (salesOrderResult.next())\n {\n SalesOrder salesOrder = buildSalesOrder(salesOrderResult, retrieveAssociation);\n returnList.add(salesOrder);\n }\n\n return returnList;\n\t}", "public void testGetServiceAreas() throws Exception {\r\n List results = new ArrayList();\r\n serviceArea = new ServiceArea();\r\n results.add(serviceArea);\r\n\r\n // set expected behavior on dao\r\n serviceAreaDAO.expects(once()).method(\"getAll\")\r\n .will(returnValue(results));\r\n\r\n List serviceAreas = serviceAreaManager.getAll();\r\n assertTrue(serviceAreas.size() == 1);\r\n serviceAreaDAO.verify();\r\n }", "public Integer getSales() {\n return sales;\n }", "@Transactional(readOnly = true)\r\n\t@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Office> getOffices() {\r\n\t\treturn em.createQuery(\"select o from Office o order by o.idOffice\").getResultList();\r\n\t}", "@Override\r\n\tpublic List<SalesDto> queryAllSales() {\n\t\treturn salesMapper.queryAllSales();\r\n\t}", "public Map<String, Double> getSalesPrCategory() {\n\t\tMap<String, Double> sales = new HashMap<>();\n\n\t\tfor (Order o : orders) {\n\t\t\tfor (ProductOrder po : o.getProductOrders()) {\n\t\t\t\tString category = po.getProduct().getCategory();\n\t\t\t\tDouble currentTotal = sales.get(category);\n\n\t\t\t\tif (currentTotal == null) {\n\t\t\t\t\tcurrentTotal = 0.0;\n\t\t\t\t}\n\n\t\t\t\tcurrentTotal += po.price();\n\n\t\t\t\tsales.put(category, currentTotal);\n\t\t\t}\n\t\t}\n\n\t\treturn sales;\n\t}", "@Override\n\tpublic ArrayList<SalesOrder> getAllSalesOrders(boolean retrieveAssociation) throws Exception\n\t{\n\t\tArrayList<SalesOrder> returnList = new ArrayList<SalesOrder>();\n\t\t\n\t\tPreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM SalesOrder\");\n\t\t_da.setSqlCommandText(query);\n\t\tResultSet salesOrders = _da.callCommandGetResultSet();\n\t\t\t\n\t\twhile (salesOrders.next())\n\t\t{\n\t\t\tSalesOrder salesOrder = buildSalesOrder(salesOrders, retrieveAssociation);\n\t\t\treturnList.add(salesOrder);\n\t\t}\n\n\t\treturn returnList;\n\t}", "@Override\n public List<Area> getAllAreas() {\n return new ArrayList<>(areas.values());\n }", "public SaleOrder getSaleOrder() {\n long __key = this.saleOrderId;\n if (saleOrder__resolvedKey == null || !saleOrder__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SaleOrderDao targetDao = daoSession.getSaleOrderDao();\n SaleOrder saleOrderNew = targetDao.load(__key);\n synchronized (this) {\n saleOrder = saleOrderNew;\n \tsaleOrder__resolvedKey = __key;\n }\n }\n return saleOrder;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n if (areaBuilder_ == null) {\n return java.util.Collections.unmodifiableList(area_);\n } else {\n return areaBuilder_.getMessageList();\n }\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n if (areaBuilder_ == null) {\n return java.util.Collections.unmodifiableList(area_);\n } else {\n return areaBuilder_.getMessageList();\n }\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n if (areaBuilder_ == null) {\n return java.util.Collections.unmodifiableList(area_);\n } else {\n return areaBuilder_.getMessageList();\n }\n }", "@GET\r\n\t@Produces({ MediaType.APPLICATION_JSON })\r\n\tpublic ArrayList<Customer> getCustomers() {\r\n\t\treturn custDao.readAll();\r\n\t}", "public Sales getSaleById(Long id) {\r\n\t\treturn salesRepository.findById(id).orElse(null);\r\n\t}", "public List<OrderReport> getAllOrdersAcrossStores();", "public int getAreaNo() {\n return areaNo_;\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public ListResult<RAreaListBean> getAllArea(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "@Transactional(readOnly = true)\n public void associationsAndJoinsExamples() {\n List<Customer> customersWithOrders = getSession().createQuery(\"from Customer as customer inner join customer.orders as ord with ord.shipCountry = 'UK'\").list();\n System.out.println(customersWithOrders.size());\n\n List<Customer> customersWithFetchOrders = getSession().createQuery(\"from Customer as customer inner join fetch customer.orders as ord where ord.shipCountry = 'UK'\").list();\n System.out.println(customersWithOrders.size());\n\n //FETCH keyword - dociąganie obiektów - iloczyn kartezjanski - sa 2 kolekcje\n //List<Customer> customersWithOrderDetails = getSession().createQuery(\"from Customer as customer inner join fetch customer.orders as ord inner join fetch ord.orderDetails as orderDetail\").list();\n //System.out.println(customersWithOrderDetails.size());\n }", "public java.lang.String CC_GetNoOfConsumersPerArea(java.lang.String accessToken, java.lang.String areaCode) throws java.rmi.RemoteException;", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Site> loadSitesByCustomer(long id) {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tList<Site> siteList = sessionFactory.getCurrentSession().createCriteria(Site.class)\r\n\t \t\t\t .add(Restrictions.eq(\"customer.id\", id))\r\n\t \t\t\t .addOrder(Order.asc(\"name\")).list();\r\n\t\t\tif (siteList != null && !siteList.isEmpty()) {\r\n\t \t\t\treturn siteList;\r\n\t \t\t} else {\r\n\t \t\t\treturn null;\r\n\t \t\t}\r\n\t\t}\r\n\t\tcatch (HibernateException hbe) {\r\n\t\t\tthrow SessionFactoryUtils.convertHibernateAccessException(hbe);\r\n\t\t}\r\n\t\t\r\n\t}", "public double getAnnualSales() {\r\n\t\treturn annualSales;\r\n\t}", "@Override\r\n\tpublic List<Areas> queryAllHArea() {\n\t\treturn adi.queryAllHArea();\r\n\t}", "public List<AreaProp> getAllAreaProps() {\n List<AreaProp> areaProps = new ArrayList<AreaProp>();\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n areaProps = session.createCriteria(AreaProp.class).list();\n return areaProps;\n }", "AreaMaster findById(long areaId) throws NoSuchAreaException;", "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\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//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "public List<SalesOrderHeaderPartner> fetchPartner()\r\n throws ODataException\r\n {\r\n if (erpConfigContext == null) {\r\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type SalesOrderHeaderPartner.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\r\n }\r\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\r\n odataResourceUrl.append(\"(\");\r\n odataResourceUrl.append(\"SalesOrder=\");\r\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(salesOrder));\r\n odataResourceUrl.append(\")/\");\r\n odataResourceUrl.append(\"to_Partner\");\r\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getEndpointUrl(), odataResourceUrl.toString());\r\n final ODataQuery query = builder.build();\r\n final ErpEndpoint erpEndpoint = new ErpEndpoint(erpConfigContext);\r\n final ODataQueryResult result = query.execute(erpEndpoint);\r\n final List<SalesOrderHeaderPartner> entityList = result.asList(SalesOrderHeaderPartner.class);\r\n for (SalesOrderHeaderPartner entity: entityList) {\r\n entity.setErpConfigContext(erpConfigContext);\r\n }\r\n return entityList;\r\n }", "public double getArea() {\n\t\treturn this.area;\n\t}", "public List<SaleInvoice> getAllSaleInvoicesByCustomerAndPeriod(int customerId, Date startDate, Date endDate) {\n // Find customer\n Customer customer = customerRepository.findById(customerId).orElseThrow(NullPointerException::new);\n // Normalized Datetime to the beginning and very end of the date\n Date normStartDate = DateUtils.normalizeDateAtStart(startDate);\n Date normEndDate = DateUtils.normalizeDateAtEnd(endDate);\n return saleInvoiceRepository.findSaleInvoicesByCustomerAndDateBetween(customer, normStartDate, normEndDate);\n }", "@Accessor(qualifier = \"Customers\", type = Accessor.Type.GETTER)\n\tpublic Collection<B2BCustomerModel> getCustomers()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CUSTOMERS);\n\t}", "public int getAreaCount() {\n if (areaBuilder_ == null) {\n return area_.size();\n } else {\n return areaBuilder_.getCount();\n }\n }", "public int getAreaCount() {\n if (areaBuilder_ == null) {\n return area_.size();\n } else {\n return areaBuilder_.getCount();\n }\n }", "public int getAreaCount() {\n if (areaBuilder_ == null) {\n return area_.size();\n } else {\n return areaBuilder_.getCount();\n }\n }", "@OneToMany(mappedBy=\"tblContactperson\")\n\tpublic Set<TblCustomer> getTblCustomers() {\n\t\treturn this.tblCustomers;\n\t}", "@ManyToOne\r\n\t@JoinColumn(name=\"idcalidadmuestraareacabecera\")\r\n\tpublic CalidadMuestraAreaCabecera getCalidadMuestraAreaCabecera() {\r\n\t\treturn this.calidadMuestraAreaCabecera;\r\n\t}", "@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> customers() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QCustomer qcustomer = QCustomer.customer;\r\n List<Customer> customers = (List<Customer>) query.from(qcustomer).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn customers;\r\n }", "public String getArea_id() {\n return area_id;\n }", "int getAnnualSales() {\n return this.annualSales;\n }", "List<SalesConciliation> getSalesConciliation(Company company, Date startDate, Date endDate) throws Exception;", "public Integer getAreaId() {\n return areaId;\n }", "public Integer getAreaId() {\n return areaId;\n }", "public int getAreaNo() {\n return areaNo_;\n }", "public List<SaleDetail> getAllSaleDetailsBySaleInvoice(int id) {\n SaleInvoice saleInvoice = saleInvoiceRepository.findById(id).orElseThrow(NullPointerException::new);\n return saleDetailRepository.findSaleDetailsBySaleInvoice(saleInvoice);\n }", "@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getListAll() {\n\n\t\tGenericEntity<List<AreaTO>> entity = null;\n\n\t\tfinal Users user = this.usersService.findByCDSID(this.requestContext.getUserId());\n\t\tfinal Area filter = new Area();\n\t\tfilter.setCountryC(FunctionsUtils.validateInteger(user.getCountryDbC()));\n\t\tfinal List<Area> listArea = this.areaService.findByFilter(filter);\n\n\t\tfinal List<AreaTO> listAreaTO = new ArrayList<AreaTO>();\n\n\t\ttry {\n\n\t\t\tif (listArea != null && listArea.size() > 0) {\n\n\t\t\t\tfor (final Area area : listArea) {\n\t\t\t\t\tfinal AreaTO areaTO = new AreaTO();\n\t\t\t\t\tPropertyUtils.copyProperties(areaTO, area);\n\t\t\t\t\tlistAreaTO.add(areaTO);\n\t\t\t\t}\n\n\t\t\t\tentity = new GenericEntity<List<AreaTO>>(listAreaTO) {\n\t\t\t\t\t// teste...\n\t\t\t\t};\n\t\t\t}\n\n\t\t} catch (final ApplicationException e) {\n\n\t\t\tfinal ErrorTO erro = new ErrorTO();\n\t\t\terro.setCodigoIncident(e.getLogReferenceCode());\n\n\t\t\tfinal ResourceBundle bundle = ResourceBundle.getBundle(\"ApplicationResources\");\n\n\t\t\tfinal List<ErrorType> erros = e.getErrorTypes();\n\n\t\t\tfor (final ErrorType errorType : erros) {\n\t\t\t\terro.setMessage(bundle.getString(errorType.getKey()));\n\t\t\t}\n\n\t\t\treturn this.buildResponse(erro, Status.INTERNAL_SERVER_ERROR);\n\n\t\t} catch (final Exception ex) {\n\n\t\t\tfinal ErrorTO erro = new ErrorTO();\n\t\t\terro.setMessage(\"Fatal Error\");\n\n\t\t\treturn this.buildResponse(erro, Status.INTERNAL_SERVER_ERROR);\n\t\t}\n\n\t\treturn buildResponseListOK(entity);\n\n\t}", "public List<Site> loadSitesByCustomer(long id) {\r\n\t\t\r\n\t\treturn siteDao.loadSitesByCustomer(id) ;\r\n\t\t\r\n\t}", "public SalesOrder getSalesOrder(long salesOrderId) {\n\t\treturn null;\n\t}", "public ArrayList<Customer> getCustomers()\r\n {\r\n return this.Customers;\r\n }", "public double get_Area() {\n return this.Area;\n }", "public String getBusinessArea() {\n return businessArea;\n }", "@Override\n public JSONObject viewSLCustomersByAdmin() {\n\n return in_salescustdao.viewSLCustomerByAdmin();\n }", "@Override\r\n\tpublic SalesByDto querySalesBy(String OFFER_ID) {\n\t\tSalesByDto sales = new SalesByDto();\r\n\t\t\r\n\t\tMap<String, Object> map =new HashMap<String, Object>();\r\n\t\tmap.put(\"OFFER_ID\", OFFER_ID);\r\n\t\tList<SalesProDto> querySalesByID = salesMapper.querySalesByID(map);\r\n\t\tList<SalesProDto> querySalesPro = new ArrayList<SalesProDto>();\r\n\t\tfor (SalesProDto salesProDto : querySalesByID) {\r\n\t\t\t List<SalesProDto> querySalesByProID = salesMapper.querySalesByProID(salesProDto);\r\n\t\t\t if(querySalesByProID!=null){\r\n\t\t\t querySalesPro.addAll(querySalesByProID);}\r\n\t\t}\r\n\t\tquerySalesByID.addAll(querySalesPro);\r\n\t\tsales.setOFFER_ID(Integer.parseInt(OFFER_ID));\r\n\t\tsales.setProductList(querySalesByID);\r\n\t\treturn sales;\r\n\t}", "public List<String> getSalesMemoNo(String osOrderId) throws Exception{\n\t\tlogger.debug(\"getSalesMemoNo is called\");\n\t\tList<String> SmNoList = new ArrayList<String>();\n\t\tString SQL =\"SELECT SM_NUM \" \n\t\t\t\t+\"FROM Bomweb_St_Order_Pos_Assign \" \n\t\t\t\t+\"WHERE Order_Id = :osOrderId \" \n\t\t\t\t+\"AND sm_type_desc IN ('Normal Sales', 'Advance Sales' , 'Fast Track','Cash On Delivery')\";\n\n\t\tMapSqlParameterSource mapSql = new MapSqlParameterSource();\n\t\tmapSql.addValue(\"osOrderId\", osOrderId);\n\t\t\n\t\tParameterizedRowMapper<String> params = new ParameterizedRowMapper<String>() {\n\n\t\t\tpublic String mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\treturn rs.getString(\"SM_NUM\");\n\t\t\t}\n\t\t};\n\t\t\n\t\ttry {\n\t\t\tSmNoList = this.simpleJdbcTemplate.query(SQL, params, mapSql);\n\t\t\t\treturn SmNoList;\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Exception caught in getSalesMemoNo()\", e);\n\t\t\tthrow new DAOException(e.getMessage(), e);\n\t\t}\n\n/*\t\tParameterizedRowMapper<String> mapper = new ParameterizedRowMapper<String>() {\n\t\t\tpublic String mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tString smNo = new String();\n\t\t\t\tsmNo = rs.getString(\"SM_NUM\");\n\t\t\t\treturn smNo;\n\t\t\t}};\n\n\t\ttry {\n\t\t\tMapSqlParameterSource params = new MapSqlParameterSource();\n\t\t\tparams.addValue(\"orderId\", osOrderId);\n\t\t\tSmNoList = simpleJdbcTemplate.query(SQL, mapper,params);\n\t\t\treturn SmNoList;\n\t\t} catch (EmptyResultDataAccessException erdae) {\n\t\t\tSmNoList = null;\n\t\t\tthrow new AppRuntimeException(erdae);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Exception caught in getSalesMemoNo()\", e);\n\t\t\tthrow new Exception(e.getMessage(), e);\n\t\t}*/\n\t\t\n\t\t\n\t}", "@Override\n public double getArea() {\n int area = areaService.getArea();\n /**Adapting here to the only format that client knows**/\n System.out.println(\"Area in sqkm calculated by 3rd Party service: \"+area);\n return area*(0.386102);\n }", "public List<Office> getNearbyOffices() {\n return nearbyOffices;\n }", "@Override\n\t@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\treturn customerDAO.getCustomers();\n\t\t\n\t}", "public String getArea() {\n return this.area;\n }", "@Override\n\tpublic List<Customer> getCustomerList() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"Select c from Customer c\");\n\t\tList<Customer> list=(List<Customer>)query.getResultList();\n\t\t/*\n\t\t * Customer customer = (Customer)session.load(Customer.class,customerId);\n\t\t * */\n\t\treturn list;\n\t}", "@PreAuthorize(\"#oauth2.hasAnyScope('read','write','read-write')\")\n\t@RequestMapping(method = GET)\n\tpublic Mono<ResponseEntity<List<Customer>>> allCustomers() {\n\n\t\treturn repo.findAll().collectList()\n\t\t\t.filter(customers -> customers.size() > 0)\n\t\t\t.map(customers -> ok(customers))\n\t\t\t.defaultIfEmpty(noContent().build());\n\t}", "public long getSalesID() {\n return salesID;\n }", "@Override\r\n\tpublic List<HotelArea> queryHotelArea(HotelAreaQuery query) {\n\t\tList<HotelArea> hotelAreaLs = hotelAreaDao.selectEntityList(query);\r\n\t\treturn hotelAreaLs;\r\n\t}", "public int getCodigoArea() { return this.codigoArea; }", "public int getCodigoArea() { return this.codigoArea; }" ]
[ "0.8350785", "0.67704844", "0.62882215", "0.5976684", "0.5898519", "0.539985", "0.49099872", "0.48755744", "0.48555169", "0.48168328", "0.47886217", "0.47219342", "0.46823293", "0.4674876", "0.46367666", "0.45859736", "0.4538698", "0.44986504", "0.44867247", "0.44716257", "0.44665784", "0.443909", "0.44359255", "0.44359255", "0.44359255", "0.44201833", "0.43941888", "0.43786168", "0.4365462", "0.434989", "0.43302068", "0.43037087", "0.42584294", "0.41955593", "0.41627076", "0.4158973", "0.4115284", "0.4086942", "0.40838638", "0.4076958", "0.40709588", "0.4067275", "0.40408742", "0.40348956", "0.40294152", "0.4011667", "0.4011667", "0.4011667", "0.40052706", "0.3997117", "0.3994118", "0.399244", "0.39923373", "0.39923373", "0.39923373", "0.39818105", "0.39772308", "0.39751938", "0.3959201", "0.39570197", "0.39523566", "0.39521143", "0.39442298", "0.3924006", "0.39167362", "0.39111614", "0.38999623", "0.38960183", "0.38950324", "0.38950324", "0.38950324", "0.3894335", "0.3888641", "0.3883812", "0.38830557", "0.3875398", "0.38696554", "0.38683718", "0.38683718", "0.38678956", "0.38671383", "0.38661844", "0.38640085", "0.38621923", "0.38583228", "0.38575345", "0.38566396", "0.3853687", "0.3852669", "0.384873", "0.38480777", "0.38439995", "0.38388425", "0.3834212", "0.38342023", "0.38250417", "0.3823056", "0.3811172", "0.379038", "0.379038" ]
0.78563166
1
Retrieval of associated CustomerSalesArea entities (one to many). This corresponds to the OData navigation property to_CustomerSalesArea. If the navigation property for an entity Customer has not been resolved yet, this method will not query further information. Instead its Optional result state will be empty.
@Nonnull public Optional<List<CustomerSalesArea>> getCustomerSalesAreaIfPresent() { return Optional.ofNullable(toCustomerSalesArea); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n public List<CustomerSalesArea> fetchCustomerSalesArea()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerSalesArea.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerSalesArea\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerSalesArea> entityList = result.asList(CustomerSalesArea.class);\n for (CustomerSalesArea entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@Nonnull\n public List<CustomerSalesArea> getCustomerSalesAreaOrFetch()\n throws ODataException\n {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = fetchCustomerSalesArea();\n }\n return toCustomerSalesArea;\n }", "public void setCustomerSalesArea(\n @Nonnull\n final List<CustomerSalesArea> value) {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = Lists.newArrayList();\n }\n toCustomerSalesArea.clear();\n toCustomerSalesArea.addAll(value);\n }", "@Nonnull\n public Customer.CustomerBuilder customerSalesArea(CustomerSalesArea... value) {\n return toCustomerSalesArea(Lists.newArrayList(value));\n }", "public void addCustomerSalesArea(CustomerSalesArea... entity) {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = Lists.newArrayList();\n }\n toCustomerSalesArea.addAll(Lists.newArrayList(entity));\n }", "public static ArrayList<SalesOrder> getSalesOrderSets() throws OnlineODataStoreException\n {\n\n\n //Get the open online store\n ODataOpenListener openListener = ODataOpenListener.getInstance();\n OnlineODataStore store = openListener.getStore();\n\n if (store!=null)\n {\n SalesOrder salesOrder;\n ODataProperty property;\n ODataPropMap properties;\n String resourcePath;\n\n try\n {\n /**\n * Build the initial OData resource path and query options string from:\n * Collection ID: EntitySet Name\n * ?$orderby= : query option that specifies the order (sorting) of the response\n * SalesOrderID : sort key for the orderby directive\n *\n * Instead of SalesOrderID, you can specify Collections.NOTE to have all SalesOrderSet\n * returned alphabetically (and by default displayed that way in the list view).\n *\n * The christianschneider service enforces server-side paging and will return 20 entities per\n * request. To view the paging size (\"$skiptoken=\") value, paste the first URL below into a\n * browser window, and scroll to the bottom of the response. You do not have to\n * track the number of entities received in your code. The SDK will create the\n * next resource path string for you (as seen in the code below). When the returned\n * string is `null' you have received all entities.\n *\n * Since there are 77 entities in the OData service we are calling, the do-while loop\n * will end up issuing the four requests below to receive all the data (20 entities at a time).\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=20,20\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=40,40\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=60,60\n */\n\n // Build initial resource path and query options string\n resourcePath = Collections.SALES_ORDER_SET + \"?$top=5&$skip=\" + skipValue + \"&$orderby=\" + Collections.SALES_ORDER_ID;\n // Loop until resourcePath is null\n Log.d(\"resourcePath\", resourcePath);\n// do\n// {\n Log.d(TAG, \"Requesting: \" + resourcePath);\n\n //Executor method for reading an Entity set\n ODataResponseSingle resp = store.executeReadEntitySet(resourcePath, null);\n\n //Get the response payload\n ODataEntitySet feed = (ODataEntitySet) resp.getPayload();\n\n //Get the list of ODataEntity\n List<ODataEntity> entities = feed.getEntities();\n\n //Loop to retrieve the information from the response and store in the SalesOrder Object\n for (ODataEntity entity : entities)\n {\n properties = entity.getProperties();\n property = properties.get(com.christianschneider.model.Collections.SALES_ORDER_ID);\n salesOrder = new SalesOrder(property.getValue().toString());\n property = properties.get(Collections.NOTE);\n salesOrder.setNote(property.getValue().toString());\n property = properties.get(Collections.NOTE_LANGUAGE);\n salesOrder.setNoteLanguage(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_ID);\n salesOrder.setCustomerId(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_NAME);\n salesOrder.setCustomerName(property.getValue().toString());\n property = properties.get(Collections.CURRENCY_CODE);\n salesOrder.setCurrencyCode(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS);\n salesOrder.setLifecycleStatus(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS_DESCRIPTION);\n salesOrder.setLifecycleStatusDescription(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS);\n salesOrder.setBillingStatus(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS_DESCRIPTION);\n salesOrder.setBillingStatusDescription(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS);\n salesOrder.setDeliveryStatus(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS_DESCRIPTION);\n salesOrder.setDeliveryStatusDescription(property.getValue().toString());\n property = properties.get(Collections.CREATED_AT);\n salesOrder.setCreatedAt(property.getValue().toString());\n property = properties.get(Collections.CHANGED_AT);\n salesOrder.setChangedAt(property.getValue().toString());\n\n /**\n * The unit price value from the christianschneider OData service has\n * four decimal places, we'll round to two decimal places before storing the data\n */\n property = properties.get(Collections.GROSS_AMOUNT);\n Float price = Float.valueOf(property.getValue().toString());\n salesOrder.setGrossAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.NET_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setNetAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.TAX_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setTaxAmount(String.format(\"%.2f\", price));\n\n // Add this entity to the array\n pList.add(salesOrder);\n SalesOrderItemDataSingleton.initialize(openListener, salesOrder);\n\n }\n\n // Get the next resource path from the OData SDK. The call to getNextResourcePath()\n // will return the appropriate string based on the server's skiptoken value.\n // resourcePath = feed.getNextResourcePath();\n\n// }\n // Short circuit evaluation of the string to see if we should loop again.\n // When all entities have been received, resourcePath will be null\n// while (resourcePath != null && !resourcePath.isEmpty());\n\n SalesOrder.logSalesOrderArrayList(pList);\n\n // Save a reference to the list in ITEMS.\n ITEMS = pList;\n\n // Store all items in ITEMS (ArrayList) in ITEM_MAP (HashMap) for rapid retrieval\n storeData();\n skipValue += 5;\n\n }\n catch (Exception e)\n {\n Log.e(TAG, appContext.getString(R.string.online_odata_store_exception));\n throw new OnlineODataStoreException(e);\n }\n }\n else\n Log.e(TAG, \"Store not open\");\n\n return pList;\n }", "@Override\n\tpublic List<Area> getAreaList() {\n\t\treturn areaDao.queryArea();\n\t}", "@GetMapping(\"/{id}/sales\")\n public Iterable<Sale> getSalesByCustomer(@PathVariable long id){\n Customer b = customerRepository.findById(id);\n return b.getSales();\n }", "public List<Sale> getSales() {\n if (sales == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SaleDao targetDao = daoSession.getSaleDao();\n List<Sale> salesNew = targetDao._queryTask_Sales(uuid);\n synchronized (this) {\n if(sales == null) {\n sales = salesNew;\n }\n }\n }\n return sales;\n }", "@RequestMapping(\"/api/salesOrders\")\n\tpublic List<SalesOrder> salesOrders() throws ODataException {\n\n\t\tLOGGER.info(\"Method entry {}\", salesOrderMethod);\n\n\t\t// The soldToParty is hardcoded since we only want to show orders for the\n\t\t// on-time customer and it must not be changed in the UI layer\n\n\t\tSalesOrderFluentHelper query = ProcessSalesOrdersService.getAllSalesOrder().filter(SOLD_TO_PARTY.eq(\"10401010\"))\n\t\t\t\t.select(SALES_ORDER, SALES_ORDER_TYPE, DISTRIBUTION_CHANNEL, ORGANIZATION_DIVISION, SOLD_TO_PARTY,\n\t\t\t\t\t\tPURCHASE_ORDER_BY_CUSTOMER, TOTAL_NET_AMOUNT, TRANSACTION_CURRENCY, CREATION_DATE);\n\n\t\tList<SalesOrder> orderList = query.execute(new ErpConfigContext(s4cldDestinationName));\n\n\t\tLOGGER.info(\"Method exit {}\", salesOrderMethod);\n\n\t\treturn orderList;\n\t}", "@Override\n\tpublic List<Goodsarea> findAllArea() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<Area> getAreaList() {\n\t\tList<Area> areaList = areaDao.selectArea();\r\n\t\tSystem.out.println(areaList);\r\n\t\t\r\n\t\treturn areaList;\r\n\t}", "@Override\r\n\tpublic List<SalesDto> queryAllSales() {\n\t\treturn salesMapper.queryAllSales();\r\n\t}", "public ArrayList<SalesOrder> getSalesOrders() {\n\t\treturn salesOrders;\n\t}", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "@Nonnull\n public List<CustomerCompany> getCustomerCompanyOrFetch()\n throws ODataException\n {\n if (toCustomerCompany == null) {\n toCustomerCompany = fetchCustomerCompany();\n }\n return toCustomerCompany;\n }", "public List<Product> getSales() {\n return sales;\n }", "SalesInvoicesType getSalesInvoices();", "@Nonnull\n public List<CustomerCompany> fetchCustomerCompany()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerCompany.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerCompany\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerCompany> entityList = result.asList(CustomerCompany.class);\n for (CustomerCompany entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "public ArrayList<AreaInfo> queryAreas(){\n\t\tArrayList<AreaInfo> areaInfos = new ArrayList<AreaInfo>();\n\t\t\n\t\ttry {\n\t\t\tmMysqlConnection = DriverManager\n\t\t\t\t.getConnection(getConnectionURI());\n\t\t\t\n\t\t\tmStatement = mMysqlConnection.createStatement();\n\t\t\tmResultSet = mStatement\n\t\t\t\t\t.executeQuery(\"select * from \" + mDbName + \".\" + TABLE_AREA);\n\t\t\t\n\t\t\t// store information of each area in the areInfos list\n\t\t\twhile (mResultSet.next()) {\n\t\t\t\tAreaInfo info = new AreaInfo();\n\t\t\t\t\n\t\t\t\tinfo.setAreaId( mResultSet.getInt(COLUMN_ID) );\n\t\t\t\tinfo.setAreaName( mResultSet.getString(COLUMN_NAME) );\n\t\t\t\tinfo.setAreaDescription( mResultSet.getString(COLUMN_DESCRIPTION) );\t\t\t\t\n\t\t\t\tinfo.setVersion( mResultSet.getInt(COLUMN_VERSION) );\n\t\t\t\t\n\t\t\t\tareaInfos.add(info);\n\t\t\t}\n\t\t\t\n\t\t\t// query tickets of an area\n\t\t\tfor(AreaInfo info : areaInfos){\n\t\t\t\tList< de.tudresden.inf.rn.mobilis.services.xhunt.proxy.Ticket> ticketTypes \n\t\t\t\t\t= new ArrayList< de.tudresden.inf.rn.mobilis.services.xhunt.proxy.Ticket >();\n\t\t\t\tArrayList<Ticket> tickets = queryAreaTickets(info.getAreaId());\n\t\t\t\t\n\t\t\t\tfor(Ticket ticket : tickets){\n\t\t\t\t\tticketTypes.add( new de.tudresden.inf.rn.mobilis.services.xhunt.proxy.Ticket( ticket.getId(), ticket.getName() ));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tinfo.setTickets( ticketTypes );\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.severe(\"!EXCEPTION: \" + e.getMessage());\n\t\t}\n\t\t\n\t\tflush();\n\t\t\n\t\treturn areaInfos;\n\t}", "@Override\n\t@Transactional\n\tpublic List<Area> findAll() {\n\t\treturn (List<Area>) dao.findAll();\n\t}", "public com.mpe.financial.model.SalesOrder getSalesOrder () {\r\n\t\treturn salesOrder;\r\n\t}", "@ManyToOne(optional = true)\r\n\tpublic Area getArea() {\r\n\t\treturn this.area;\r\n\t}", "public Area getArea(Area area) {\r\n\t\treturn this.getArea(area.getId());\r\n\t}", "@PreAuthorize(\"#oauth2.hasAnyScope('read','write','read-write')\")\n\t@RequestMapping(method = GET)\n\tpublic Mono<ResponseEntity<List<Customer>>> allCustomers() {\n\n\t\treturn repo.findAll().collectList()\n\t\t\t.filter(customers -> customers.size() > 0)\n\t\t\t.map(customers -> ok(customers))\n\t\t\t.defaultIfEmpty(noContent().build());\n\t}", "public List<Almacen> getStoresByIdCompany(long idCompany);", "@GET\r\n\t@Produces({ MediaType.APPLICATION_JSON })\r\n\tpublic ArrayList<Customer> getCustomers() {\r\n\t\treturn custDao.readAll();\r\n\t}", "public LinkedList<Area> getAreas(){\n\t\treturn areas;\n\t}", "@Override\r\n\tpublic List<Areas> queryAllHArea() {\n\t\treturn adi.queryAllHArea();\r\n\t}", "public List<Sale> getSalesLog() {\n return salesLog;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n if (areaBuilder_ == null) {\n return java.util.Collections.unmodifiableList(area_);\n } else {\n return areaBuilder_.getMessageList();\n }\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n if (areaBuilder_ == null) {\n return java.util.Collections.unmodifiableList(area_);\n } else {\n return areaBuilder_.getMessageList();\n }\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n if (areaBuilder_ == null) {\n return java.util.Collections.unmodifiableList(area_);\n } else {\n return areaBuilder_.getMessageList();\n }\n }", "public CustomerEOImpl getCustomerEO() {\r\n return (CustomerEOImpl) getEntity(2);\r\n }", "@Override\n\tpublic List<Area> getQueryAreaByOperator(Area areaCondition) {\n\t\t\n\t\treturn areaDao.queryAreaByOperator(areaCondition);\n\t}", "public ListResult<RAreaListBean> getAllArea(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getListAll() {\n\n\t\tGenericEntity<List<AreaTO>> entity = null;\n\n\t\tfinal Users user = this.usersService.findByCDSID(this.requestContext.getUserId());\n\t\tfinal Area filter = new Area();\n\t\tfilter.setCountryC(FunctionsUtils.validateInteger(user.getCountryDbC()));\n\t\tfinal List<Area> listArea = this.areaService.findByFilter(filter);\n\n\t\tfinal List<AreaTO> listAreaTO = new ArrayList<AreaTO>();\n\n\t\ttry {\n\n\t\t\tif (listArea != null && listArea.size() > 0) {\n\n\t\t\t\tfor (final Area area : listArea) {\n\t\t\t\t\tfinal AreaTO areaTO = new AreaTO();\n\t\t\t\t\tPropertyUtils.copyProperties(areaTO, area);\n\t\t\t\t\tlistAreaTO.add(areaTO);\n\t\t\t\t}\n\n\t\t\t\tentity = new GenericEntity<List<AreaTO>>(listAreaTO) {\n\t\t\t\t\t// teste...\n\t\t\t\t};\n\t\t\t}\n\n\t\t} catch (final ApplicationException e) {\n\n\t\t\tfinal ErrorTO erro = new ErrorTO();\n\t\t\terro.setCodigoIncident(e.getLogReferenceCode());\n\n\t\t\tfinal ResourceBundle bundle = ResourceBundle.getBundle(\"ApplicationResources\");\n\n\t\t\tfinal List<ErrorType> erros = e.getErrorTypes();\n\n\t\t\tfor (final ErrorType errorType : erros) {\n\t\t\t\terro.setMessage(bundle.getString(errorType.getKey()));\n\t\t\t}\n\n\t\t\treturn this.buildResponse(erro, Status.INTERNAL_SERVER_ERROR);\n\n\t\t} catch (final Exception ex) {\n\n\t\t\tfinal ErrorTO erro = new ErrorTO();\n\t\t\terro.setMessage(\"Fatal Error\");\n\n\t\t\treturn this.buildResponse(erro, Status.INTERNAL_SERVER_ERROR);\n\t\t}\n\n\t\treturn buildResponseListOK(entity);\n\n\t}", "@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> customers() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QCustomer qcustomer = QCustomer.customer;\r\n List<Customer> customers = (List<Customer>) query.from(qcustomer).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn customers;\r\n }", "public ArrayList<SaleVO> showSale() {\n\t\treturn sale.show();\r\n\t}", "@Override\r\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\r\n\t}", "@Override\n public List<Area> getAllAreas() {\n return new ArrayList<>(areas.values());\n }", "@Override\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\n\t}", "@GET\n\t@Path(\"getAllCustomer\")\n\tpublic List<Customer> getAllCustomer() {\n\t\treturn ManagerHelper.getCustomerManager().getAllCustomer();\n\t}", "private void fetchArea() {\n \t\t// Fetch the isNew.\n \t\tIntent i = this.getIntent();\n \t\tthis.isNew = i.getBooleanExtra( EXTRAS_AREA_IS_NEW, true );\n \n \t\t// Fetch ID.\n \t\tint id = i.getIntExtra( EXTRAS_AREA_ID, -1 );\n \t\tif ( id == -1 ) {\n \t\t\tToast.makeText( this, \"No area ID provided, finishing!\", Toast.LENGTH_LONG ).show();\n \t\t\tthis.finish();\n \t\t}\n \n \t\t// Get the set from application.\n \t\tthis.set = SFApplication.get().getGPSSet();\n \n \t\t// For some weird reason, NullPointerException will happen if we don't do this.\n \t\tthis.set.setMessageBus( SFApplication.get().getBus() );\n \n \t\t// Find area in set.\n \t\tthis.area = this.set.getById( id );\n \n \t\tLog.d( TAG, this.area.toString() );\n \n\t\tToast.makeText( this, \"The area ID provided did not exist in set.\", Toast.LENGTH_LONG ).show();\n\t\tthis.finish();\n \t}", "public List<OrderReport> getAllOrdersAcrossStores();", "public ArrayList<SalesOrder> getAllSalesOrdersByCustomer(long customerId, boolean retrieveAssociation) throws Exception\n {\n ArrayList<SalesOrder> returnList = new ArrayList<SalesOrder>();\n\n PreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM SalesOrder WHERE contactsKey = ?\");\n query.setLong(1, customerId);\n _da.setSqlCommandText(query);\n ResultSet salesOrderResult = _da.callCommandGetResultSet();\n\n while (salesOrderResult.next())\n {\n SalesOrder salesOrder = buildSalesOrder(salesOrderResult, retrieveAssociation);\n returnList.add(salesOrder);\n }\n\n return returnList;\n }", "@GetMapping(\"/{customerid}\")\n public ResponseEntity<List<Order>> byCustomer(@PathVariable(value = \"customerid\") Long customerId) {\n return new ResponseEntity<>(orderService.getAllByCustomerId(customerId), HttpStatus.OK);\n }", "public int getAreaCount() {\n if (areaBuilder_ == null) {\n return area_.size();\n } else {\n return areaBuilder_.getCount();\n }\n }", "public int getAreaCount() {\n if (areaBuilder_ == null) {\n return area_.size();\n } else {\n return areaBuilder_.getCount();\n }\n }", "public int getAreaCount() {\n if (areaBuilder_ == null) {\n return area_.size();\n } else {\n return areaBuilder_.getCount();\n }\n }", "@RequestMapping(value = \"/customers\", method = RequestMethod.GET)\n public ResponseEntity<?> getCustomers() {\n Iterable<Customer> customerList = customerService.getCustomers();\n return new ResponseEntity<>(customerList, HttpStatus.OK);\n }", "public Integer getSales() {\n return sales;\n }", "public void testGetServiceAreas() throws Exception {\r\n List results = new ArrayList();\r\n serviceArea = new ServiceArea();\r\n results.add(serviceArea);\r\n\r\n // set expected behavior on dao\r\n serviceAreaDAO.expects(once()).method(\"getAll\")\r\n .will(returnValue(results));\r\n\r\n List serviceAreas = serviceAreaManager.getAll();\r\n assertTrue(serviceAreas.size() == 1);\r\n serviceAreaDAO.verify();\r\n }", "@Override\n\t@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\treturn customerDAO.getCustomers();\n\t\t\n\t}", "public ArrayList<Customer> getCustomers()\r\n {\r\n return this.Customers;\r\n }", "public AreaProp getAreaProp(int areaPropId) {\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n AreaProp areaProp = (AreaProp) session.get(AreaProp.class, areaPropId);\n return areaProp;\n }", "@Override\r\n\tpublic List<HotelArea> queryHotelArea(HotelAreaQuery query) {\n\t\tList<HotelArea> hotelAreaLs = hotelAreaDao.selectEntityList(query);\r\n\t\treturn hotelAreaLs;\r\n\t}", "@Override\n public JSONObject viewSLCustomersByAdmin() {\n\n return in_salescustdao.viewSLCustomerByAdmin();\n }", "@Override\n\tpublic ArrayList<SalesOrder> getAllSalesOrdersByCustomer(String customerName, boolean retrieveAssociation) throws Exception\n\t{\n ArrayList<SalesOrder> returnList = new ArrayList<SalesOrder>();\n\n\t\tPreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM SalesOrder, Contacts WHERE name = ?\");\n query.setString(1, customerName);\n _da.setSqlCommandText(query);\n ResultSet salesOrderResult = _da.callCommandGetResultSet();\n\n while (salesOrderResult.next())\n {\n SalesOrder salesOrder = buildSalesOrder(salesOrderResult, retrieveAssociation);\n returnList.add(salesOrder);\n }\n\n return returnList;\n\t}", "@Override\n\tpublic List<Customer> findAllCustomer() {\n\t\treturn customerDao.findAllCustomer();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Site> loadSitesByCustomer(long id) {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tList<Site> siteList = sessionFactory.getCurrentSession().createCriteria(Site.class)\r\n\t \t\t\t .add(Restrictions.eq(\"customer.id\", id))\r\n\t \t\t\t .addOrder(Order.asc(\"name\")).list();\r\n\t\t\tif (siteList != null && !siteList.isEmpty()) {\r\n\t \t\t\treturn siteList;\r\n\t \t\t} else {\r\n\t \t\t\treturn null;\r\n\t \t\t}\r\n\t\t}\r\n\t\tcatch (HibernateException hbe) {\r\n\t\t\tthrow SessionFactoryUtils.convertHibernateAccessException(hbe);\r\n\t\t}\r\n\t\t\r\n\t}", "public double getArea() {\n\t\treturn this.area;\n\t}", "@Override\n public double getArea() {\n int area = areaService.getArea();\n /**Adapting here to the only format that client knows**/\n System.out.println(\"Area in sqkm calculated by 3rd Party service: \"+area);\n return area*(0.386102);\n }", "public ArrayList<CityArea> getCityAreasConquered() {\n\t\treturn cityAreasConquered;\n\t}", "public Sales getSaleById(Long id) {\r\n\t\treturn salesRepository.findById(id).orElse(null);\r\n\t}", "public List<Customer> getCustomers() {\n\t\treturn customers;\n\t}", "@GetMapping(\"/customers\")\n\tpublic List<Customer> getcustomers(){\n\t\t\n\t\treturn thecustomerService.getCustomers();\n\t}", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "@GetMapping()\n public List<AgentCustomerList> findAllAgentsCustomerList() {\n return agentRepo.findAllAgentCustomerListBy();\n }", "@Override\n\tpublic List<MstCustomerDto> getAllCustomer() {\n\t\tList<MstCustomerDto> listMstCustomerDtos=new ArrayList<>();\n\t\tList<Object[]> obj=new ArrayList<>();\n\t\t\n\t\tobj = mstCustomerDao.getAll();\n\t\tlistMstCustomerDtos = mapperFacade.mapAsList(obj, MstCustomerDto.class);\n\t\t\n\t\treturn listMstCustomerDtos;\n\t}", "public String getBusinessArea() {\n return businessArea;\n }", "public SalesOrder getSalesOrder(long salesOrderId) {\n\t\treturn null;\n\t}", "public List<Customer> getAllCustomers() {\n Query query = em.createNamedQuery(\"Customer.findAll\");\r\n // return query result\r\n return query.getResultList();\r\n }", "@Accessor(qualifier = \"Customers\", type = Accessor.Type.GETTER)\n\tpublic Collection<B2BCustomerModel> getCustomers()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CUSTOMERS);\n\t}", "public java.util.List<? extends com.example.grpc.SimpleServiceOuterClass.AreaOrBuilder> \n getAreaOrBuilderList() {\n return area_;\n }", "public java.util.List<? extends com.example.grpc.SimpleServiceOuterClass.AreaOrBuilder> \n getAreaOrBuilderList() {\n return area_;\n }", "public java.util.List<? extends com.example.grpc.SimpleServiceOuterClass.AreaOrBuilder> \n getAreaOrBuilderList() {\n return area_;\n }", "public String getArea() {\n return this.area;\n }", "public List<Office> getNearbyOffices() {\n return nearbyOffices;\n }", "@GetMapping(value = CustomerRestURIConstants.GET_ALL_CUSTOMER )\n\tpublic ResponseEntity<List<Customer>> list() {\n\t\tList<Customer> customers = customerService.getAllCustomers();\n\t\treturn ResponseEntity.ok().body(customers);\n\t}", "@Nonnull\n public Optional<List<CustomerCompany>> getCustomerCompanyIfPresent() {\n return Optional.ofNullable(toCustomerCompany);\n }", "@Override\n\tpublic List<Customer> retrieveAllCustomers() {\n\t\tlogger.info(\"A GET call retrieved all customers: retrieveAllCustomers()\");\n\t\treturn customers;\n\t}", "@Override\r\n\tpublic SalesByDto querySalesBy(String OFFER_ID) {\n\t\tSalesByDto sales = new SalesByDto();\r\n\t\t\r\n\t\tMap<String, Object> map =new HashMap<String, Object>();\r\n\t\tmap.put(\"OFFER_ID\", OFFER_ID);\r\n\t\tList<SalesProDto> querySalesByID = salesMapper.querySalesByID(map);\r\n\t\tList<SalesProDto> querySalesPro = new ArrayList<SalesProDto>();\r\n\t\tfor (SalesProDto salesProDto : querySalesByID) {\r\n\t\t\t List<SalesProDto> querySalesByProID = salesMapper.querySalesByProID(salesProDto);\r\n\t\t\t if(querySalesByProID!=null){\r\n\t\t\t querySalesPro.addAll(querySalesByProID);}\r\n\t\t}\r\n\t\tquerySalesByID.addAll(querySalesPro);\r\n\t\tsales.setOFFER_ID(Integer.parseInt(OFFER_ID));\r\n\t\tsales.setProductList(querySalesByID);\r\n\t\treturn sales;\r\n\t}", "@Override\n\tpublic List<Customer> getCustomerById(int customerid) {\n\t\treturn null;\n\t}", "AreaMaster findById(long areaId) throws NoSuchAreaException;", "public Map<String, Double> getSalesPrCategory() {\n\t\tMap<String, Double> sales = new HashMap<>();\n\n\t\tfor (Order o : orders) {\n\t\t\tfor (ProductOrder po : o.getProductOrders()) {\n\t\t\t\tString category = po.getProduct().getCategory();\n\t\t\t\tDouble currentTotal = sales.get(category);\n\n\t\t\t\tif (currentTotal == null) {\n\t\t\t\t\tcurrentTotal = 0.0;\n\t\t\t\t}\n\n\t\t\t\tcurrentTotal += po.price();\n\n\t\t\t\tsales.put(category, currentTotal);\n\t\t\t}\n\t\t}\n\n\t\treturn sales;\n\t}", "public int getAreaNo() {\n return areaNo_;\n }", "@Basic\n\t@Column(name = \"CUSTOMER_ROLE\", nullable = false)\n\tpublic String getAuthority() {\n\t\treturn this.authority;\n\t}", "public Integer getAreaId() {\n return areaId;\n }", "public Integer getAreaId() {\n return areaId;\n }", "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\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//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "public java.lang.String CC_GetNoOfConsumersPerArea(java.lang.String accessToken, java.lang.String areaCode) throws java.rmi.RemoteException;", "private ObservableList<Order> getAllCustomerOrders(int customerId){\r\n ObservableList<Order> customerOrders = null;\r\n try {\r\n OrderDB odb = new OrderDB();\r\n customerOrders = odb.getAllOrders(customerId);\r\n } catch (Exception e){\r\n System.err.println(e.getMessage());\r\n }\r\n return customerOrders;\r\n }", "public de.htwg_konstanz.ebus.framework.wholesaler.vo.Customer getCustomer () {\r\n\t\treturn customer;\r\n\t}", "@Override\n\tpublic List<Customer> getCustomers() {\n\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Customer order by lastName\", Customer.class)\n\t\t\t\t.getResultList();\n\n\t}", "public double get_Area() {\n return this.Area;\n }" ]
[ "0.80480856", "0.7584577", "0.62555325", "0.62446153", "0.57274276", "0.4911933", "0.49008954", "0.489459", "0.48763734", "0.47894794", "0.47671354", "0.474743", "0.46834376", "0.4631811", "0.4624439", "0.4624439", "0.4624439", "0.45037866", "0.45010307", "0.44929707", "0.44659066", "0.44603705", "0.44586998", "0.43939903", "0.438544", "0.43615937", "0.4353659", "0.43461654", "0.43347144", "0.43045", "0.4295779", "0.4295218", "0.42815563", "0.42815563", "0.42815563", "0.42690876", "0.42675442", "0.42439142", "0.4196904", "0.41796398", "0.41698536", "0.41622788", "0.41346443", "0.41142893", "0.40881595", "0.4082838", "0.408053", "0.40792644", "0.407851", "0.40742365", "0.40742365", "0.40742365", "0.40677196", "0.40651157", "0.40552953", "0.40538064", "0.4051651", "0.40471926", "0.40355238", "0.40266854", "0.40126702", "0.40087953", "0.40033284", "0.4000827", "0.39997172", "0.3999311", "0.3994949", "0.39899728", "0.39810845", "0.39809796", "0.39809796", "0.39809796", "0.39806786", "0.39785653", "0.39701733", "0.39681348", "0.39655474", "0.3963175", "0.39577258", "0.39577258", "0.39577258", "0.3955147", "0.39483294", "0.3945614", "0.3938734", "0.39301524", "0.39233324", "0.3922791", "0.39222524", "0.39185616", "0.3914094", "0.39124605", "0.39120063", "0.39120063", "0.39105397", "0.39090234", "0.39045912", "0.39028972", "0.3893572", "0.3891214" ]
0.73914075
2
Overwrites the list of associated CustomerSalesArea entities for the loaded navigation property to_CustomerSalesArea. If the navigation property to_CustomerSalesArea of a queried Customer is operated lazily, an ODataException can be thrown in case of an OData query error. Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations.
public void setCustomerSalesArea( @Nonnull final List<CustomerSalesArea> value) { if (toCustomerSalesArea == null) { toCustomerSalesArea = Lists.newArrayList(); } toCustomerSalesArea.clear(); toCustomerSalesArea.addAll(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n public List<CustomerSalesArea> fetchCustomerSalesArea()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerSalesArea.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerSalesArea\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerSalesArea> entityList = result.asList(CustomerSalesArea.class);\n for (CustomerSalesArea entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@Nonnull\n public List<CustomerSalesArea> getCustomerSalesAreaOrFetch()\n throws ODataException\n {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = fetchCustomerSalesArea();\n }\n return toCustomerSalesArea;\n }", "public void addCustomerSalesArea(CustomerSalesArea... entity) {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = Lists.newArrayList();\n }\n toCustomerSalesArea.addAll(Lists.newArrayList(entity));\n }", "@Nonnull\n public Customer.CustomerBuilder customerSalesArea(CustomerSalesArea... value) {\n return toCustomerSalesArea(Lists.newArrayList(value));\n }", "@Nonnull\n public Optional<List<CustomerSalesArea>> getCustomerSalesAreaIfPresent() {\n return Optional.ofNullable(toCustomerSalesArea);\n }", "public static ArrayList<SalesOrder> getSalesOrderSets() throws OnlineODataStoreException\n {\n\n\n //Get the open online store\n ODataOpenListener openListener = ODataOpenListener.getInstance();\n OnlineODataStore store = openListener.getStore();\n\n if (store!=null)\n {\n SalesOrder salesOrder;\n ODataProperty property;\n ODataPropMap properties;\n String resourcePath;\n\n try\n {\n /**\n * Build the initial OData resource path and query options string from:\n * Collection ID: EntitySet Name\n * ?$orderby= : query option that specifies the order (sorting) of the response\n * SalesOrderID : sort key for the orderby directive\n *\n * Instead of SalesOrderID, you can specify Collections.NOTE to have all SalesOrderSet\n * returned alphabetically (and by default displayed that way in the list view).\n *\n * The christianschneider service enforces server-side paging and will return 20 entities per\n * request. To view the paging size (\"$skiptoken=\") value, paste the first URL below into a\n * browser window, and scroll to the bottom of the response. You do not have to\n * track the number of entities received in your code. The SDK will create the\n * next resource path string for you (as seen in the code below). When the returned\n * string is `null' you have received all entities.\n *\n * Since there are 77 entities in the OData service we are calling, the do-while loop\n * will end up issuing the four requests below to receive all the data (20 entities at a time).\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=20,20\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=40,40\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=60,60\n */\n\n // Build initial resource path and query options string\n resourcePath = Collections.SALES_ORDER_SET + \"?$top=5&$skip=\" + skipValue + \"&$orderby=\" + Collections.SALES_ORDER_ID;\n // Loop until resourcePath is null\n Log.d(\"resourcePath\", resourcePath);\n// do\n// {\n Log.d(TAG, \"Requesting: \" + resourcePath);\n\n //Executor method for reading an Entity set\n ODataResponseSingle resp = store.executeReadEntitySet(resourcePath, null);\n\n //Get the response payload\n ODataEntitySet feed = (ODataEntitySet) resp.getPayload();\n\n //Get the list of ODataEntity\n List<ODataEntity> entities = feed.getEntities();\n\n //Loop to retrieve the information from the response and store in the SalesOrder Object\n for (ODataEntity entity : entities)\n {\n properties = entity.getProperties();\n property = properties.get(com.christianschneider.model.Collections.SALES_ORDER_ID);\n salesOrder = new SalesOrder(property.getValue().toString());\n property = properties.get(Collections.NOTE);\n salesOrder.setNote(property.getValue().toString());\n property = properties.get(Collections.NOTE_LANGUAGE);\n salesOrder.setNoteLanguage(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_ID);\n salesOrder.setCustomerId(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_NAME);\n salesOrder.setCustomerName(property.getValue().toString());\n property = properties.get(Collections.CURRENCY_CODE);\n salesOrder.setCurrencyCode(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS);\n salesOrder.setLifecycleStatus(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS_DESCRIPTION);\n salesOrder.setLifecycleStatusDescription(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS);\n salesOrder.setBillingStatus(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS_DESCRIPTION);\n salesOrder.setBillingStatusDescription(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS);\n salesOrder.setDeliveryStatus(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS_DESCRIPTION);\n salesOrder.setDeliveryStatusDescription(property.getValue().toString());\n property = properties.get(Collections.CREATED_AT);\n salesOrder.setCreatedAt(property.getValue().toString());\n property = properties.get(Collections.CHANGED_AT);\n salesOrder.setChangedAt(property.getValue().toString());\n\n /**\n * The unit price value from the christianschneider OData service has\n * four decimal places, we'll round to two decimal places before storing the data\n */\n property = properties.get(Collections.GROSS_AMOUNT);\n Float price = Float.valueOf(property.getValue().toString());\n salesOrder.setGrossAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.NET_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setNetAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.TAX_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setTaxAmount(String.format(\"%.2f\", price));\n\n // Add this entity to the array\n pList.add(salesOrder);\n SalesOrderItemDataSingleton.initialize(openListener, salesOrder);\n\n }\n\n // Get the next resource path from the OData SDK. The call to getNextResourcePath()\n // will return the appropriate string based on the server's skiptoken value.\n // resourcePath = feed.getNextResourcePath();\n\n// }\n // Short circuit evaluation of the string to see if we should loop again.\n // When all entities have been received, resourcePath will be null\n// while (resourcePath != null && !resourcePath.isEmpty());\n\n SalesOrder.logSalesOrderArrayList(pList);\n\n // Save a reference to the list in ITEMS.\n ITEMS = pList;\n\n // Store all items in ITEMS (ArrayList) in ITEM_MAP (HashMap) for rapid retrieval\n storeData();\n skipValue += 5;\n\n }\n catch (Exception e)\n {\n Log.e(TAG, appContext.getString(R.string.online_odata_store_exception));\n throw new OnlineODataStoreException(e);\n }\n }\n else\n Log.e(TAG, \"Store not open\");\n\n return pList;\n }", "public void initSalesList() {\n\n String sql = \"SELECT menu.id_product, menu.name, menu.price,size.size, COUNT(orders_menu.id_order) \"\n + \"FROM menu, orders_menu, orders, size WHERE menu.id_product=orders_menu.id_product \"\n + \"AND orders.id_order=orders_menu.id_order AND orders.id_status=4 \"\n + \"AND size.id_size=menu.id_size GROUP BY menu.id_product\";\n\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n\n session.beginTransaction();\n List<Object[]> empDepts = session.createNativeQuery(sql).list();\n\n salesFxObservableList.clear();\n for (Object[] objects : empDepts) {\n SalesFx salesFx = new SalesFx();\n salesFx.setIdProduct((Integer) objects[0]);\n salesFx.setName((String) objects[1]);\n salesFx.setPrice((Integer) objects[2]);\n salesFx.setSize((String) objects[3]);\n BigInteger bigInteger = (BigInteger) objects[4];\n salesFx.setSale(bigInteger.intValue());\n salesFxObservableList.add(salesFx);\n }\n\n session.getTransaction().commit();\n }", "@RequestMapping(\"/api/salesOrders\")\n\tpublic List<SalesOrder> salesOrders() throws ODataException {\n\n\t\tLOGGER.info(\"Method entry {}\", salesOrderMethod);\n\n\t\t// The soldToParty is hardcoded since we only want to show orders for the\n\t\t// on-time customer and it must not be changed in the UI layer\n\n\t\tSalesOrderFluentHelper query = ProcessSalesOrdersService.getAllSalesOrder().filter(SOLD_TO_PARTY.eq(\"10401010\"))\n\t\t\t\t.select(SALES_ORDER, SALES_ORDER_TYPE, DISTRIBUTION_CHANNEL, ORGANIZATION_DIVISION, SOLD_TO_PARTY,\n\t\t\t\t\t\tPURCHASE_ORDER_BY_CUSTOMER, TOTAL_NET_AMOUNT, TRANSACTION_CURRENCY, CREATION_DATE);\n\n\t\tList<SalesOrder> orderList = query.execute(new ErpConfigContext(s4cldDestinationName));\n\n\t\tLOGGER.info(\"Method exit {}\", salesOrderMethod);\n\n\t\treturn orderList;\n\t}", "public void clearCustomers()\r\n\t{\r\n\t\tfor(int i=0;i<inStore.size();i++)\r\n\t\t{\r\n\t\t\tcustomers.add(inStore.get(i));\r\n\t\t}\r\n\t\tinStore.clear();\r\n\t}", "@Override\n\tpublic void putCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(customer);;\n\n\t}", "@Override\n\t@Transactional\n\tpublic List<Area> findAll() {\n\t\treturn (List<Area>) dao.findAll();\n\t}", "public synchronized void resetSales() {\n sales = null;\n }", "@Override\n\tpublic List<Goodsarea> findAllArea() {\n\t\treturn null;\n\t}", "public ArrayList<SalesOrder> getSalesOrders() {\n\t\treturn salesOrders;\n\t}", "public void updateSalesOrder(SalesOrderItem salesOrderItem){\n\t\tSalesOrderItemSalesOrder salesOrder = salesOrderItem.getSalesOrder();\n\t\tPropertyReader.copy(salesOrder, displayedEntity);\n\t}", "@Override\n\tpublic void areaTotal() {\n\t\tsolido.areaTotal = solido.areaLateral + solido.areaBase;\n\t}", "public static void setAllCustomers(ObservableList<Customers> allCustomers) {\n Customers.allCustomers = allCustomers;\n System.out.println(\"The query has successfully applied all customers to the list\");\n }", "@Accessor(qualifier = \"Customers\", type = Accessor.Type.SETTER)\n\tpublic void setCustomers(final Collection<B2BCustomerModel> value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(CUSTOMERS, value);\n\t}", "@Nonnull\n public List<CustomerCompany> fetchCustomerCompany()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerCompany.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerCompany\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerCompany> entityList = result.asList(CustomerCompany.class);\n for (CustomerCompany entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "public void setSales(Integer sales) {\n this.sales = this.sales + sales;\n }", "@Override\n\tpublic int updateArea(Area area) {\n\t\treturn areaMapper.updateArea(area);\n\t}", "public List<Sale> getSales() {\n if (sales == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SaleDao targetDao = daoSession.getSaleDao();\n List<Sale> salesNew = targetDao._queryTask_Sales(uuid);\n synchronized (this) {\n if(sales == null) {\n sales = salesNew;\n }\n }\n }\n return sales;\n }", "@Nonnull\n public List<CustomerCompany> getCustomerCompanyOrFetch()\n throws ODataException\n {\n if (toCustomerCompany == null) {\n toCustomerCompany = fetchCustomerCompany();\n }\n return toCustomerCompany;\n }", "@Override\n\t@Transactional\n\tpublic void save(Area area) {\n\t\tdao.save(area);\n\t}", "@Override\n\tpublic AreaExecution modifyArea(Area area) {\n\t\treturn null;\n\t}", "public void setArea(Polygon area) {\n\t\tthis.area = area;\n\t}", "@Override\n public List<Area> getAllAreas() {\n return new ArrayList<>(areas.values());\n }", "public void setSalesOrgnizationId(Long salesOrgnizationId) {\n this.salesOrgnizationId = salesOrgnizationId;\n }", "public void setTotalCustomers(int _totalCustomers){\n this.totalCustomers = _totalCustomers;\n\n }", "@Override\n\tpublic List<Area> getAreaList() {\n\t\treturn areaDao.queryArea();\n\t}", "public List<Site> loadSitesByCustomer(long id) {\r\n\t\t\r\n\t\treturn siteDao.loadSitesByCustomer(id) ;\r\n\t\t\r\n\t}", "public abstract CustomerOrder setOrderDetails(CustomerOrder customerOrder, Iterable<Long> orderDetails);", "public void addOrders() {\n\t\torders.stream()\n\t\t\t.forEach(db::store);\n\t}", "public void setSalesOrder (com.mpe.financial.model.SalesOrder salesOrder) {\r\n\t\tthis.salesOrder = salesOrder;\r\n\t}", "public List<Product> getSales() {\n return sales;\n }", "@Override\n public final void setArea(JQLayoutArea area)\n {\n if (area != null)\n {\n removeClass(area.getAreaClass().toString());\n }\n this.area = area;\n if (this.area != null)\n {\n addClass(this.area.getAreaClass().toString());\n }\n }", "public void update(Area area) {\n\t\tdao.update(area);\n\t}", "@GetMapping(\"/{id}/sales\")\n public Iterable<Sale> getSalesByCustomer(@PathVariable long id){\n Customer b = customerRepository.findById(id);\n return b.getSales();\n }", "private void populateOrganizations() {\n\t\tMatContext.get().getAdminService().getAllOrganizations(new AsyncCallback<ManageOrganizationSearchModel>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onSuccess(ManageOrganizationSearchModel model) {\n\t\t\t\tList<Result> results = model.getData();\n\t\t\t\tdetailDisplay.populateOrganizations(results);\n\t\t\t\t\n\t\t\t\tMap<String, Result> orgMap = new HashMap<String, Result>();\n\t\t\t\tfor(Result organization : results) {\n\t\t\t\t\torgMap.put(organization.getId(), organization);\n\t\t\t\t}\n\t\t\t\tdetailDisplay.setOrganizationsMap(orgMap);\n\t\t\t\t\n\t\t\t\tsetUserDetailsToView();\n\t\t\t}\n\t\t});\n\t}", "public void setSalesLog(List<Sale> salesLogToSet) {\n salesLog = salesLogToSet;\n }", "public void SalesAcceptor(ArrayList<Sales> salse) {\r\n \tgetSaless = (ArrayList<Sales>)salse.clone();\r\n \tSystem.out.println(getSaless);\r\n \tListSales.addAll(getSaless);\r\n\t\t}", "public void setAreaConhecimento(List<AreaConhecimento> areaConhecimento) {\n this.areaConhecimento = areaConhecimento;\n }", "void setAnnualSales(int annualSales) {\n this.annualSales = annualSales;\n }", "void addTurnSales() {\r\n\t\tif (this.turnsResourceIncome > 0)\r\n\t\t\taddToCoins(this.turnsResourceIncome);\r\n\t\tturnsResourceIncome = 0;\r\n\t}", "void assignAuthorisationsToCustomer(CustomerModel customer);", "@Override\n\tpublic AreaExecution addArea(Area area) {\n\t\treturn null;\n\t}", "public void addSales(double totalSales) {\n this.total_sales = totalSales;\n }", "@Override\n\tpublic void addCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().save(customer);\n\t}", "public Builder addAllArea(\n java.lang.Iterable<? extends com.example.grpc.SimpleServiceOuterClass.Area> values) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, area_);\n onChanged();\n } else {\n areaBuilder_.addAllMessages(values);\n }\n return this;\n }", "public Builder addAllArea(\n java.lang.Iterable<? extends com.example.grpc.SimpleServiceOuterClass.Area> values) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, area_);\n onChanged();\n } else {\n areaBuilder_.addAllMessages(values);\n }\n return this;\n }", "public Builder addAllArea(\n java.lang.Iterable<? extends com.example.grpc.SimpleServiceOuterClass.Area> values) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, area_);\n onChanged();\n } else {\n areaBuilder_.addAllMessages(values);\n }\n return this;\n }", "public void populate(){\n salesRepRepository.save(new SalesRep(\"Maddy\"));\n salesRepRepository.save(new SalesRep(\"Jegor\"));\n salesRepRepository.save(new SalesRep(\"Natalia\"));\n salesRepRepository.save(new SalesRep(\"Joao\"));\n }", "@Override\n public void migrate(OccupiedLocations ols) {\n for (Population pop:ols.copyList()) {\n setCoordinate(pop.getCoordinate());\n\n Population migrating_pop = pop.collectMigrants(getRate());\n if (migrating_pop.getSize() > 0) {\n migrating_pop.setCoordinate(getPicker().pick());\n migrating_pop.setResource(0.0);\n\n // alter *actual* populations\n ols.addOrMix(migrating_pop);\n }\n }\n }", "public static void setMostActiveAdvertiserObj(String orderId,List<MostActiveReportDTO> mostActiveDataList){ \n\t \tString key = MOST_ACTIVE_ADVERTISER_KEY+orderId;\n\t\t\tlog.info(\"setMostActiveAdvertiserObj : memcache key:\"+key);\t\t\t\n\t\t\tif(memcache !=null && memcache.contains(key)){\n\t \t\tmemcache.delete(key);\n\t \t}\n\t \tmemcache.put(key, mostActiveDataList, Expiration.byDeltaSeconds(expireInDay));\n\t\t}", "private void loadCustomerData() {\n\t\tCustomerDTO cust1 = new CustomerDTO();\n\t\tcust1.setId(null);\n\t\tcust1.setFirstName(\"Steven\");\n\t\tcust1.setLastName(\"King\");\n\t\tcust1.setEmail(\"king@gmail.com\");\n\t\tcust1.setCity(\"Hyderabad\");\n\t\tcustomerService.createCustomer(cust1);\n\n\t\tCustomerDTO cust2 = new CustomerDTO();\n\t\tcust2.setId(null);\n\t\tcust2.setFirstName(\"Neena\");\n\t\tcust2.setLastName(\"Kochhar\");\n\t\tcust2.setEmail(\"kochhar@gmail.com\");\n\t\tcust2.setCity(\"Pune\");\n\t\tcustomerService.createCustomer(cust2);\n\n\t\tCustomerDTO cust3 = new CustomerDTO();\n\t\tcust3.setId(null);\n\t\tcust3.setFirstName(\"John\");\n\t\tcust3.setLastName(\"Chen\");\n\t\tcust3.setEmail(\"johnr@gmail.com\");\n\t\tcust3.setCity(\"Bangalore\");\n\t\tcustomerService.createCustomer(cust3);\n\n\t\tCustomerDTO cust4 = new CustomerDTO();\n\t\tcust4.setId(null);\n\t\tcust4.setFirstName(\"Nancy\");\n\t\tcust4.setLastName(\"Greenberg\");\n\t\tcust4.setEmail(\"nancy@gmail.com\");\n\t\tcust4.setCity(\"Mumbai\");\n\t\tcustomerService.createCustomer(cust4);\n\n\t\tCustomerDTO cust5 = new CustomerDTO();\n\t\tcust5.setId(5L);\n\t\tcust5.setFirstName(\"Luis\");\n\t\tcust5.setLastName(\"Popp\");\n\t\tcust5.setEmail(\"popp@gmail.com\");\n\t\tcust5.setCity(\"Delhi\");\n\t\tcustomerService.createCustomer(cust5);\n\n\t}", "public List<Almacen> getStoresByIdCompany(long idCompany);", "private void refreshSource() {\n if (source != null && featureCollection != null) {\n source.setGeoJson( featureCollection );\n }\n }", "public void setSaleAvg(java.math.BigDecimal saleAvg) \n\t{\n\t\tthis.saleAvg = saleAvg;\n\t}", "@Override\r\n\tpublic List<Area> getAreaList() {\n\t\tList<Area> areaList = areaDao.selectArea();\r\n\t\tSystem.out.println(areaList);\r\n\t\t\r\n\t\treturn areaList;\r\n\t}", "@Override\n public void populate(PaymentCriteria paymentCriteria) {\n paymentCriteria.setDateFrom(dateFrom);\n paymentCriteria.setDateTo(dateTo);\n }", "SalesInvoicesType getSalesInvoices();", "public void setSalesProp(String salesProp) {\n this.salesProp = salesProp;\n }", "@Override\r\n\tpublic List<CustomerReceipt> listReceiptAddressByList(\r\n\t\t\tCustomerRec customerRec) {\n\t\tString customerId=customerRec.getId();\r\n\t\t List<CustomerReceipt> recList =customerReceiptDao\r\n\t\t\t.getCustomerReceiptListByCustomerId(customerId);\r\n\t\t\t\r\n\t\t\tfor (CustomerReceipt a : recList) {\r\n\t\t\t\tSystem.out.println(\"===================11111==================\");\r\n\t\t\t\tSystem.out.println(a.getId());\r\n\t\t\t\tSystem.out.println(a.getCustomerId());\r\n\t\t\t\tSystem.out.println(a.getAddressProvince());\r\n\t\t\t\tSystem.out.println(a.getAddressProvinceName());\r\n\t\t\t\tSystem.out.println(a.getAddressCity());\r\n\t\t\t\tSystem.out.println(a.getAddressCityName());\r\n\t\t\t\tSystem.out.println(a.getAddressCounty());\r\n\t\t\t\tSystem.out.println(a.getAddressCountyName());\r\n\t\t\t\tSystem.out.println(a.getAddressfull());\r\n\t\t\t\tSystem.out.println(a.getReceiptplaceId());\r\n\t\t\t\tSystem.out.println(a);\r\n\r\n\r\n\t\t\t}\r\n\t\tif (recList != null && recList.size() > 0) {\r\n\t\t\tHashMap<String, Area> areaMap = new HashMap<String, Area>();\r\n\t\t\tfor (CustomerReceipt rec : recList) {\r\n\t\t\t\tareaMap.put(rec.getAddressProvince(), new Area());\r\n\t\t\t\tareaMap.put(rec.getAddressCity(), new Area());\r\n\t\t\t\tareaMap.put(rec.getAddressCounty(), new Area());\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tareaMap = (HashMap<String, Area>) areaService\r\n\t\t\t\t\t\t.getAreaMapByIdMap(areaMap);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tfor (CustomerReceipt rec : recList) {\r\n\t\t\t\tString provinceId = rec.getAddressProvince();\r\n\t\t\t\tString cityId = rec.getAddressCity();\r\n\t\t\t\tString countyId = rec.getAddressCounty();\r\n\t\t\t\trec.setAddressProvinceName(nullToBlank(areaMap.get(provinceId)\r\n\t\t\t\t\t\t.getAreaName()));\r\n\t\t\t\trec.setAddressCityName(nullToBlank(areaMap.get(cityId).getAreaName()));\r\n\t\t\t\trec.setAddressCountyName(nullToBlank(areaMap.get(countyId).getAreaName()));\r\n\t\t\t\trec.setReceiptplaceName(\"包头\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn recList;\r\n\r\n\t}", "public void setCustomerCompany(\n @Nonnull\n final List<CustomerCompany> value) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.clear();\n toCustomerCompany.addAll(value);\n }", "public List<SalesOrderItem> fetchItem()\r\n throws ODataException\r\n {\r\n if (erpConfigContext == null) {\r\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type SalesOrderItem.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\r\n }\r\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\r\n odataResourceUrl.append(\"(\");\r\n odataResourceUrl.append(\"SalesOrder=\");\r\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(salesOrder));\r\n odataResourceUrl.append(\")/\");\r\n odataResourceUrl.append(\"to_Item\");\r\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getEndpointUrl(), odataResourceUrl.toString());\r\n final ODataQuery query = builder.build();\r\n final ErpEndpoint erpEndpoint = new ErpEndpoint(erpConfigContext);\r\n final ODataQueryResult result = query.execute(erpEndpoint);\r\n final List<SalesOrderItem> entityList = result.asList(SalesOrderItem.class);\r\n for (SalesOrderItem entity: entityList) {\r\n entity.setErpConfigContext(erpConfigContext);\r\n }\r\n return entityList;\r\n }", "public void setExistingCustomer(Customer existingCustomer) { this.existingCustomer = existingCustomer; }", "@Override\n\t@Transactional\n\n\tpublic void initPlaces() {\n\t\tsalleRepository.findAll().forEach(salle->{\n\t\t\tfor(int i=0;i<salle.getNombrePlace();i++) {\n\t\t\tPlace place=new Place();\n\t\t\tplace.setNumero(i+1);\n\t\t\tplace.setSalle(salle);\n\t\t\tplaceRepository.save(place);\n\t\t\t}\n\t\t\t});\n\t}", "public abstract List<CustomerOrder> save(Iterable<CustomerOrder> entities);", "public void testGetServiceAreas() throws Exception {\r\n List results = new ArrayList();\r\n serviceArea = new ServiceArea();\r\n results.add(serviceArea);\r\n\r\n // set expected behavior on dao\r\n serviceAreaDAO.expects(once()).method(\"getAll\")\r\n .will(returnValue(results));\r\n\r\n List serviceAreas = serviceAreaManager.getAll();\r\n assertTrue(serviceAreas.size() == 1);\r\n serviceAreaDAO.verify();\r\n }", "public void salesTotal(){\n\t\tif (unitsSold<10){\n\t\t\tsetTotalCost(basePrice);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse if (unitsSold<20){\n\t\t\tsetTotalCost((RETAIL_PRICE*.8)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t\t\n\t\t}\n\t\telse if (unitsSold<50){\n\t\t\tsetTotalCost((RETAIL_PRICE*.7)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse if (unitsSold<100){\n\t\t\tsetTotalCost((RETAIL_PRICE*.6)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse {\n\t\t\tsetTotalCost((RETAIL_PRICE*.5)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t}", "public void accountSale(long storeID, final SaleTO sale) throws ProductOutOfStockException, NotInDatabaseException, UpdateException;", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Site> loadSitesByCustomer(long id) {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tList<Site> siteList = sessionFactory.getCurrentSession().createCriteria(Site.class)\r\n\t \t\t\t .add(Restrictions.eq(\"customer.id\", id))\r\n\t \t\t\t .addOrder(Order.asc(\"name\")).list();\r\n\t\t\tif (siteList != null && !siteList.isEmpty()) {\r\n\t \t\t\treturn siteList;\r\n\t \t\t} else {\r\n\t \t\t\treturn null;\r\n\t \t\t}\r\n\t\t}\r\n\t\tcatch (HibernateException hbe) {\r\n\t\t\tthrow SessionFactoryUtils.convertHibernateAccessException(hbe);\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\t@Transactional\n\tpublic List<Customer> getAll() {\n\t\tList<Customer> loadAll = hibernateTemplate.loadAll(Customer.class);\n\t\treturn loadAll;\n\t}", "public void SetArea(double area) {\n OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_SetArea(swigCPtr, this, area);\n }", "@OneToMany(mappedBy=\"tblContactperson\")\n\tpublic Set<TblCustomer> getTblCustomers() {\n\t\treturn this.tblCustomers;\n\t}", "public List<Sale> getSalesLog() {\n return salesLog;\n }", "@Transactional(readOnly = true)\r\n\t@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Office> getOffices() {\r\n\t\treturn em.createQuery(\"select o from Office o order by o.idOffice\").getResultList();\r\n\t}", "public void setLinesOfBusiness(entity.AppCritLineOfBusiness[] value);", "@Transactional\n public void updateArtListing(ArtListing al) {\n entityManager.merge(al);\n }", "@Override\r\n\tpublic List<SalesDto> queryAllSales() {\n\t\treturn salesMapper.queryAllSales();\r\n\t}", "@Transactional \n\tpublic void updateAll() {\n\t\t\n\t\tIterator<Pharmacy> newList = pharmacyRepository1.getAllEntity().iterator();\n\t\twhile (newList.hasNext()) {\n\t\t\tPharmacy pharmacy = newList.next();\n\t\t\tlistStockInPharmacy(pharmacy);\n\t\t\t}\n\t\t\n\t}", "public void setSalesZone(String salesZone) {\n this.salesZone = salesZone == null ? null : salesZone.trim();\n }", "public synchronized static List<Store> loadStoresNotAffectToLocation(Connection c) throws SQLException {\r\n //list of shop\r\n List<Store> listShop = new ArrayList<>();\r\n Statement myStmt = c.createStatement();\r\n //The query which selects all the shops.\r\n ResultSet myRs = myStmt.executeQuery(\"select * from magasin where idMagasin not in (select Magasin_idMagasin from emplacement_has_magasin)\");\r\n //Loop which add a shop to the list.\r\n while (myRs.next()) {\r\n int id = myRs.getInt(\"idMagasin\");\r\n String designation = myRs.getString(\"designation\");\r\n String description = myRs.getString(\"description\");\r\n int loyer = myRs.getInt(\"loyer\");\r\n int surface = myRs.getInt(\"superficie\");\r\n int niveau = myRs.getInt(\"niveau\");\r\n String localisation = myRs.getString(\"localisation\");\r\n //liste type \r\n Statement myStmt2 = c.createStatement();\r\n //The query which selects all the shops.\r\n ResultSet myRs2 = myStmt2.executeQuery(\"SELECT designation,idType from magasin_has_type,type where magasin_has_type.type_idType=type.idType and magasin_has_type.magasin_idMagasin=\" + id);\r\n List<TypeStore> list = new ArrayList<>();\r\n while (myRs2.next()) {\r\n int idtype = myRs2.getInt(\"idType\");\r\n String designationType = myRs2.getString(\"designation\");\r\n TypeStore T = new TypeStore(idtype, designationType);\r\n list.add(T);\r\n }\r\n Store M = new Store(id, designation, description, loyer, surface, niveau, localisation, list);\r\n\r\n listShop.add(M);\r\n }\r\n myStmt.close();\r\n return listShop;\r\n\r\n }", "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\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//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "@Override\n\tpublic List<SalesorderModel> findBySalesorderListAll() throws Exception {\n\t\treturn null;\n\t}", "public SafetyNetArea updateArea(SafetyNetArea area) {\n\n String typeId = area.getPromulgationType().getTypeId();\n log.info(\"Updating SafetyNET area \" + area.getName() + \" for promulgation type \" + typeId);\n\n SafetyNetArea original = findAreaByName(typeId, area.getName());\n original.update(area);\n\n return saveEntity(original);\n }", "public void setOrdersProductss(com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products> x)\n {\n __ordersProductss = x;\n }", "@Override\n public ResponseEntity<ResponseBody> putLoadOfStoreDetails(List<Store> storesConfig) {\n return storeService.updateStoreDetails(storesConfig);\n }", "public void addSalesOrder(SalesOrder order) {\n\t\tsalesOrders.add(order);\n\t}", "public void setCustomer(Customer customer) {\r\n\r\n this.customer = customer;\r\n ObservableList<Order> orders = getAllCustomerOrders(customer.getCustomerId());\r\n ordersTable.setItems(orders);\r\n }", "public static void setCustomerData()\n\t{\n\t\tString sURL = PropertyManager.getInstance().getProperty(\"REST_PATH\") + \"measurements?state=WAIT_FOR_CONFIG\";\n\t\tmCollect = new MeasurementCollection();\n\t\tmCollect.setList(sURL);\n\n\t\tfor (int i = 0; i < mCollect.getList().size(); i++)\n\t\t{\n\t\t\tmObject = mCollect.getList().get(i);\n\t\t\tString mID = mObject.getId();\n\t\t\taData = new AddressData(mID);\n\t\t\tif (mObject.getPriority().equals(\"HIGH\"))\n\t\t\t{\n\t\t\t\tcustomerList.add(\"+ \" + aData.guiAddressData());\n\t\t\t}\n\t\t\telse if (mObject.getPriority().equals(\"MEDIUM\"))\n\t\t\t{\n\t\t\t\tcustomerList.add(\"- \" + aData.guiAddressData());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcustomerList.add(\"o \" + aData.guiAddressData());\n\t\t\t}\n\n\t\t}\n\t\tcustomerText.setText(aData.getCustomerData());\n\t\tmeasureText.setText(mObject.getMeasurementData());\n\n\t}", "public void updateOMConfigs(OzoneConfiguration newConf) {\n for (OzoneManager om : omhaService.getActiveServices()) {\n om.setConfiguration(newConf);\n }\n }", "public void setArea(String area) {\n this.area = area;\n }", "public void setCourseArea(String courseArea) {\n this.courseArea = courseArea;\n }", "private void restoreSubAreaspreviousState(ApplicationInfo readPerst)\n\t\t\tthrows RowsExceededException, WriteException, BiffException,\n\t\t\tIOException {\n\t\tString[][] localSubAreasData = readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t.getProcessingInputs().getSubAreasDataObj()\n\t\t\t\t.getPartialAreaDSForNCA();\n\t\tfor (int i = 0; i < localSubAreasData.length; i++) {\n\t\t\tfor (int j = readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t.getSortVariablesListVector().size() + 1; j < localSubAreasData[i].length; j++) {\n\t\t\t\tNcaSubAreasDispGui.createNcaSubAreasDispGuiInst().tableForPartialArea\n\t\t\t\t\t\t.setValueAt(localSubAreasData[i][j], i, j);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "public void testGetServiceAreasIncludingDisabled()\r\n throws Exception {\r\n List results = new ArrayList();\r\n serviceArea = new ServiceArea();\r\n results.add(serviceArea);\r\n\r\n // set expected behavior on dao\r\n serviceAreaDAO.expects(once()).method(\"getAll\")\r\n .will(returnValue(results));\r\n\r\n List serviceAreas = serviceAreaManager.getAllIncludingDisabled();\r\n assertTrue(serviceAreas.size() == 1);\r\n serviceAreaDAO.verify();\r\n }", "public void setArea(String area) {\n this.area = area;\n }", "public void setSalesAmount(Integer salesAmount) {\n this.salesAmount = salesAmount;\n }", "@Override\r\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\r\n\t}", "public void setArea(String area) {\n this.area = area == null ? null : area.trim();\n }" ]
[ "0.71517795", "0.6618916", "0.63785344", "0.59213704", "0.54028165", "0.4495823", "0.44764313", "0.4458768", "0.43766472", "0.4360487", "0.43574184", "0.4329004", "0.4306249", "0.41903794", "0.4169682", "0.41305593", "0.4126164", "0.41225114", "0.40714717", "0.40688917", "0.40603724", "0.40536645", "0.40477476", "0.40400475", "0.40248874", "0.40183964", "0.39681262", "0.39637622", "0.39534196", "0.3945175", "0.39386016", "0.3936251", "0.39308375", "0.3930469", "0.39181548", "0.3902999", "0.39003253", "0.38990343", "0.3893805", "0.38548183", "0.38433814", "0.38416857", "0.38392842", "0.38315776", "0.3820791", "0.38130635", "0.38120747", "0.38061264", "0.3800143", "0.3800143", "0.3800143", "0.37931785", "0.37931457", "0.37882888", "0.37842444", "0.37836185", "0.37758362", "0.37703094", "0.37665087", "0.3761838", "0.37579164", "0.37573212", "0.3750381", "0.37401587", "0.37382385", "0.37367105", "0.37293902", "0.37101406", "0.37061235", "0.3702138", "0.3700745", "0.36961606", "0.36903968", "0.367988", "0.3679275", "0.3679194", "0.36790544", "0.3672436", "0.36721572", "0.36721233", "0.3659811", "0.36533177", "0.3644356", "0.3642374", "0.36380482", "0.36378294", "0.3631442", "0.36286205", "0.3627571", "0.3623029", "0.3621912", "0.362181", "0.3618603", "0.36171612", "0.36149564", "0.36139262", "0.36121038", "0.36117634", "0.3611738", "0.3604935" ]
0.68612874
1
Adds elements to the list of associated CustomerSalesArea entities. This corresponds to the OData navigation property to_CustomerSalesArea. If the navigation property to_CustomerSalesArea of a queried Customer is operated lazily, an ODataException can be thrown in case of an OData query error. Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations.
public void addCustomerSalesArea(CustomerSalesArea... entity) { if (toCustomerSalesArea == null) { toCustomerSalesArea = Lists.newArrayList(); } toCustomerSalesArea.addAll(Lists.newArrayList(entity)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n public List<CustomerSalesArea> fetchCustomerSalesArea()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerSalesArea.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerSalesArea\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerSalesArea> entityList = result.asList(CustomerSalesArea.class);\n for (CustomerSalesArea entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "public void setCustomerSalesArea(\n @Nonnull\n final List<CustomerSalesArea> value) {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = Lists.newArrayList();\n }\n toCustomerSalesArea.clear();\n toCustomerSalesArea.addAll(value);\n }", "@Nonnull\n public Customer.CustomerBuilder customerSalesArea(CustomerSalesArea... value) {\n return toCustomerSalesArea(Lists.newArrayList(value));\n }", "@Nonnull\n public List<CustomerSalesArea> getCustomerSalesAreaOrFetch()\n throws ODataException\n {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = fetchCustomerSalesArea();\n }\n return toCustomerSalesArea;\n }", "@Nonnull\n public Optional<List<CustomerSalesArea>> getCustomerSalesAreaIfPresent() {\n return Optional.ofNullable(toCustomerSalesArea);\n }", "public void addSalesOrder(SalesOrder order) {\n\t\tsalesOrders.add(order);\n\t}", "public void addOrders() {\n\t\torders.stream()\n\t\t\t.forEach(db::store);\n\t}", "public void addSales(double totalSales) {\n this.total_sales = totalSales;\n }", "@Override\n\tpublic void addCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().save(customer);\n\t}", "public static ArrayList<SalesOrder> getSalesOrderSets() throws OnlineODataStoreException\n {\n\n\n //Get the open online store\n ODataOpenListener openListener = ODataOpenListener.getInstance();\n OnlineODataStore store = openListener.getStore();\n\n if (store!=null)\n {\n SalesOrder salesOrder;\n ODataProperty property;\n ODataPropMap properties;\n String resourcePath;\n\n try\n {\n /**\n * Build the initial OData resource path and query options string from:\n * Collection ID: EntitySet Name\n * ?$orderby= : query option that specifies the order (sorting) of the response\n * SalesOrderID : sort key for the orderby directive\n *\n * Instead of SalesOrderID, you can specify Collections.NOTE to have all SalesOrderSet\n * returned alphabetically (and by default displayed that way in the list view).\n *\n * The christianschneider service enforces server-side paging and will return 20 entities per\n * request. To view the paging size (\"$skiptoken=\") value, paste the first URL below into a\n * browser window, and scroll to the bottom of the response. You do not have to\n * track the number of entities received in your code. The SDK will create the\n * next resource path string for you (as seen in the code below). When the returned\n * string is `null' you have received all entities.\n *\n * Since there are 77 entities in the OData service we are calling, the do-while loop\n * will end up issuing the four requests below to receive all the data (20 entities at a time).\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=20,20\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=40,40\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=60,60\n */\n\n // Build initial resource path and query options string\n resourcePath = Collections.SALES_ORDER_SET + \"?$top=5&$skip=\" + skipValue + \"&$orderby=\" + Collections.SALES_ORDER_ID;\n // Loop until resourcePath is null\n Log.d(\"resourcePath\", resourcePath);\n// do\n// {\n Log.d(TAG, \"Requesting: \" + resourcePath);\n\n //Executor method for reading an Entity set\n ODataResponseSingle resp = store.executeReadEntitySet(resourcePath, null);\n\n //Get the response payload\n ODataEntitySet feed = (ODataEntitySet) resp.getPayload();\n\n //Get the list of ODataEntity\n List<ODataEntity> entities = feed.getEntities();\n\n //Loop to retrieve the information from the response and store in the SalesOrder Object\n for (ODataEntity entity : entities)\n {\n properties = entity.getProperties();\n property = properties.get(com.christianschneider.model.Collections.SALES_ORDER_ID);\n salesOrder = new SalesOrder(property.getValue().toString());\n property = properties.get(Collections.NOTE);\n salesOrder.setNote(property.getValue().toString());\n property = properties.get(Collections.NOTE_LANGUAGE);\n salesOrder.setNoteLanguage(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_ID);\n salesOrder.setCustomerId(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_NAME);\n salesOrder.setCustomerName(property.getValue().toString());\n property = properties.get(Collections.CURRENCY_CODE);\n salesOrder.setCurrencyCode(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS);\n salesOrder.setLifecycleStatus(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS_DESCRIPTION);\n salesOrder.setLifecycleStatusDescription(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS);\n salesOrder.setBillingStatus(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS_DESCRIPTION);\n salesOrder.setBillingStatusDescription(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS);\n salesOrder.setDeliveryStatus(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS_DESCRIPTION);\n salesOrder.setDeliveryStatusDescription(property.getValue().toString());\n property = properties.get(Collections.CREATED_AT);\n salesOrder.setCreatedAt(property.getValue().toString());\n property = properties.get(Collections.CHANGED_AT);\n salesOrder.setChangedAt(property.getValue().toString());\n\n /**\n * The unit price value from the christianschneider OData service has\n * four decimal places, we'll round to two decimal places before storing the data\n */\n property = properties.get(Collections.GROSS_AMOUNT);\n Float price = Float.valueOf(property.getValue().toString());\n salesOrder.setGrossAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.NET_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setNetAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.TAX_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setTaxAmount(String.format(\"%.2f\", price));\n\n // Add this entity to the array\n pList.add(salesOrder);\n SalesOrderItemDataSingleton.initialize(openListener, salesOrder);\n\n }\n\n // Get the next resource path from the OData SDK. The call to getNextResourcePath()\n // will return the appropriate string based on the server's skiptoken value.\n // resourcePath = feed.getNextResourcePath();\n\n// }\n // Short circuit evaluation of the string to see if we should loop again.\n // When all entities have been received, resourcePath will be null\n// while (resourcePath != null && !resourcePath.isEmpty());\n\n SalesOrder.logSalesOrderArrayList(pList);\n\n // Save a reference to the list in ITEMS.\n ITEMS = pList;\n\n // Store all items in ITEMS (ArrayList) in ITEM_MAP (HashMap) for rapid retrieval\n storeData();\n skipValue += 5;\n\n }\n catch (Exception e)\n {\n Log.e(TAG, appContext.getString(R.string.online_odata_store_exception));\n throw new OnlineODataStoreException(e);\n }\n }\n else\n Log.e(TAG, \"Store not open\");\n\n return pList;\n }", "public void initSalesList() {\n\n String sql = \"SELECT menu.id_product, menu.name, menu.price,size.size, COUNT(orders_menu.id_order) \"\n + \"FROM menu, orders_menu, orders, size WHERE menu.id_product=orders_menu.id_product \"\n + \"AND orders.id_order=orders_menu.id_order AND orders.id_status=4 \"\n + \"AND size.id_size=menu.id_size GROUP BY menu.id_product\";\n\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n\n session.beginTransaction();\n List<Object[]> empDepts = session.createNativeQuery(sql).list();\n\n salesFxObservableList.clear();\n for (Object[] objects : empDepts) {\n SalesFx salesFx = new SalesFx();\n salesFx.setIdProduct((Integer) objects[0]);\n salesFx.setName((String) objects[1]);\n salesFx.setPrice((Integer) objects[2]);\n salesFx.setSize((String) objects[3]);\n BigInteger bigInteger = (BigInteger) objects[4];\n salesFx.setSale(bigInteger.intValue());\n salesFxObservableList.add(salesFx);\n }\n\n session.getTransaction().commit();\n }", "@RequestMapping(\"/api/salesOrders\")\n\tpublic List<SalesOrder> salesOrders() throws ODataException {\n\n\t\tLOGGER.info(\"Method entry {}\", salesOrderMethod);\n\n\t\t// The soldToParty is hardcoded since we only want to show orders for the\n\t\t// on-time customer and it must not be changed in the UI layer\n\n\t\tSalesOrderFluentHelper query = ProcessSalesOrdersService.getAllSalesOrder().filter(SOLD_TO_PARTY.eq(\"10401010\"))\n\t\t\t\t.select(SALES_ORDER, SALES_ORDER_TYPE, DISTRIBUTION_CHANNEL, ORGANIZATION_DIVISION, SOLD_TO_PARTY,\n\t\t\t\t\t\tPURCHASE_ORDER_BY_CUSTOMER, TOTAL_NET_AMOUNT, TRANSACTION_CURRENCY, CREATION_DATE);\n\n\t\tList<SalesOrder> orderList = query.execute(new ErpConfigContext(s4cldDestinationName));\n\n\t\tLOGGER.info(\"Method exit {}\", salesOrderMethod);\n\n\t\treturn orderList;\n\t}", "public Builder addAllArea(\n java.lang.Iterable<? extends com.example.grpc.SimpleServiceOuterClass.Area> values) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, area_);\n onChanged();\n } else {\n areaBuilder_.addAllMessages(values);\n }\n return this;\n }", "public Builder addAllArea(\n java.lang.Iterable<? extends com.example.grpc.SimpleServiceOuterClass.Area> values) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, area_);\n onChanged();\n } else {\n areaBuilder_.addAllMessages(values);\n }\n return this;\n }", "public Builder addAllArea(\n java.lang.Iterable<? extends com.example.grpc.SimpleServiceOuterClass.Area> values) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, area_);\n onChanged();\n } else {\n areaBuilder_.addAllMessages(values);\n }\n return this;\n }", "void addTurnSales() {\r\n\t\tif (this.turnsResourceIncome > 0)\r\n\t\t\taddToCoins(this.turnsResourceIncome);\r\n\t\tturnsResourceIncome = 0;\r\n\t}", "public void addCustomerCompany(CustomerCompany... entity) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.addAll(Lists.newArrayList(entity));\n }", "public void setSales(Integer sales) {\n this.sales = this.sales + sales;\n }", "@Override\n\tpublic void areaTotal() {\n\t\tsolido.areaTotal = solido.areaLateral + solido.areaBase;\n\t}", "public void clearCustomers()\r\n\t{\r\n\t\tfor(int i=0;i<inStore.size();i++)\r\n\t\t{\r\n\t\t\tcustomers.add(inStore.get(i));\r\n\t\t}\r\n\t\tinStore.clear();\r\n\t}", "public void addItem(SalesOrderItem... entity) {\r\n if (toItem == null) {\r\n toItem = Lists.newArrayList();\r\n }\r\n toItem.addAll(Lists.newArrayList(entity));\r\n }", "public void testGetServiceAreas() throws Exception {\r\n List results = new ArrayList();\r\n serviceArea = new ServiceArea();\r\n results.add(serviceArea);\r\n\r\n // set expected behavior on dao\r\n serviceAreaDAO.expects(once()).method(\"getAll\")\r\n .will(returnValue(results));\r\n\r\n List serviceAreas = serviceAreaManager.getAll();\r\n assertTrue(serviceAreas.size() == 1);\r\n serviceAreaDAO.verify();\r\n }", "public ArrayList<SalesOrder> getSalesOrders() {\n\t\treturn salesOrders;\n\t}", "public List<Almacen> getStoresByIdCompany(long idCompany);", "@Override\n\tpublic void putCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(customer);;\n\n\t}", "@JmsListener(destination = ActiviMqQueueName.AUTO_ADD_COMMUNITY)\n public void communityAddToGoodsArea(String jsonData) {\n JSONObject jsonObject = JSON.parseObject(jsonData);\n String ids = jsonObject.getString(\"id\");\n String appmodelId = jsonObject.getString(\"appmodelId\");\n List<String> stringList = Arrays.asList(ids.split(\",\"));\n List<Long> communityids = stringList.stream().map(Long::valueOf).collect(Collectors.toList());\n\n //查询所有设置自动添加的商品\n List<GoodsAutoAddArea> byAppmodelId = autoAddAreaService.findByAppmodelId(appmodelId);\n List<Long> goods = byAppmodelId.stream().map(GoodsAutoAddArea::getGoodsId).collect(Collectors.toList());\n goodsAreaMappingService.autoAdd(goods, communityids, appmodelId);\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 }", "@GetMapping(\"/{id}/sales\")\n public Iterable<Sale> getSalesByCustomer(@PathVariable long id){\n Customer b = customerRepository.findById(id);\n return b.getSales();\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}", "@Nonnull\n public List<CustomerCompany> fetchCustomerCompany()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerCompany.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerCompany\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerCompany> entityList = result.asList(CustomerCompany.class);\n for (CustomerCompany entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@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 AreaExecution addArea(Area area) {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Goodsarea> findAllArea() {\n\t\treturn null;\n\t}", "public void setTotalCustomers(int _totalCustomers){\n this.totalCustomers = _totalCustomers;\n\n }", "public void salesTotal(){\n\t\tif (unitsSold<10){\n\t\t\tsetTotalCost(basePrice);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse if (unitsSold<20){\n\t\t\tsetTotalCost((RETAIL_PRICE*.8)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t\t\n\t\t}\n\t\telse if (unitsSold<50){\n\t\t\tsetTotalCost((RETAIL_PRICE*.7)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse if (unitsSold<100){\n\t\t\tsetTotalCost((RETAIL_PRICE*.6)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse {\n\t\t\tsetTotalCost((RETAIL_PRICE*.5)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t}", "public void addAll(Collection<T> objs) {\r\n\t\t\r\n\t\tlogger.trace(\"Enter addAll\");\r\n\t\t\r\n\t\tdata.addAll(objs);\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit addAll\");\r\n\t}", "public void add(Customer c) {\n customers.add(c);\n\n fireTableDataChanged();\n }", "public void addSaleObserver(SaleObserver obs){\n saleObservers.add(obs);\n }", "public List<Product> getSales() {\n return sales;\n }", "@Override\n\t@Transactional\n\tpublic List<Area> findAll() {\n\t\treturn (List<Area>) dao.findAll();\n\t}", "public List<Sale> getSales() {\n if (sales == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SaleDao targetDao = daoSession.getSaleDao();\n List<Sale> salesNew = targetDao._queryTask_Sales(uuid);\n synchronized (this) {\n if(sales == null) {\n sales = salesNew;\n }\n }\n }\n return sales;\n }", "public abstract CustomerOrder addToOrderDetails(CustomerOrder customerOrder, Iterable<Long> orderDetailsToAdd);", "@Accessor(qualifier = \"Customers\", type = Accessor.Type.SETTER)\n\tpublic void setCustomers(final Collection<B2BCustomerModel> value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(CUSTOMERS, value);\n\t}", "@Override\n\tpublic List<Area> getAreaList() {\n\t\treturn areaDao.queryArea();\n\t}", "private void loadCustomerData() {\n\t\tCustomerDTO cust1 = new CustomerDTO();\n\t\tcust1.setId(null);\n\t\tcust1.setFirstName(\"Steven\");\n\t\tcust1.setLastName(\"King\");\n\t\tcust1.setEmail(\"king@gmail.com\");\n\t\tcust1.setCity(\"Hyderabad\");\n\t\tcustomerService.createCustomer(cust1);\n\n\t\tCustomerDTO cust2 = new CustomerDTO();\n\t\tcust2.setId(null);\n\t\tcust2.setFirstName(\"Neena\");\n\t\tcust2.setLastName(\"Kochhar\");\n\t\tcust2.setEmail(\"kochhar@gmail.com\");\n\t\tcust2.setCity(\"Pune\");\n\t\tcustomerService.createCustomer(cust2);\n\n\t\tCustomerDTO cust3 = new CustomerDTO();\n\t\tcust3.setId(null);\n\t\tcust3.setFirstName(\"John\");\n\t\tcust3.setLastName(\"Chen\");\n\t\tcust3.setEmail(\"johnr@gmail.com\");\n\t\tcust3.setCity(\"Bangalore\");\n\t\tcustomerService.createCustomer(cust3);\n\n\t\tCustomerDTO cust4 = new CustomerDTO();\n\t\tcust4.setId(null);\n\t\tcust4.setFirstName(\"Nancy\");\n\t\tcust4.setLastName(\"Greenberg\");\n\t\tcust4.setEmail(\"nancy@gmail.com\");\n\t\tcust4.setCity(\"Mumbai\");\n\t\tcustomerService.createCustomer(cust4);\n\n\t\tCustomerDTO cust5 = new CustomerDTO();\n\t\tcust5.setId(5L);\n\t\tcust5.setFirstName(\"Luis\");\n\t\tcust5.setLastName(\"Popp\");\n\t\tcust5.setEmail(\"popp@gmail.com\");\n\t\tcust5.setCity(\"Delhi\");\n\t\tcustomerService.createCustomer(cust5);\n\n\t}", "public void addToLinesOfBusiness(entity.AppCritLineOfBusiness element);", "@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}", "public void addNearbyOffice(Office nearbyOffice) {\n nearbyOffices.add(nearbyOffice);\n }", "public void addShop() {\n FacesContext context = FacesContext.getCurrentInstance();\n\n log.info(\"OrdersBean : AddShop\");\n\n int idAds = Integer.parseInt(getParam(\"adsId\"));\n\n if (idAds == 0) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"fxs.addShopButton.addShopError\"), null));\n return;\n }\n\n adsBean.getAdsId(idAds);\n\n init();\n checkIfOrdersEntityIsNullAndCreateOrders();\n\n if (contractsBean.createContract()) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, JsfUtils.returnMessage(getLocale(), \"fxs.addShopButton.addShopSuccess\"), null));\n } else {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"fxs.addShopButton.addShopError\"), null));\n }\n findOrderAndfindContracts();\n }", "public Builder addArea(\n com.example.grpc.SimpleServiceOuterClass.Area.Builder builderForValue) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n area_.add(builderForValue.build());\n onChanged();\n } else {\n areaBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "public Builder addArea(\n com.example.grpc.SimpleServiceOuterClass.Area.Builder builderForValue) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n area_.add(builderForValue.build());\n onChanged();\n } else {\n areaBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "public Builder addArea(\n com.example.grpc.SimpleServiceOuterClass.Area.Builder builderForValue) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n area_.add(builderForValue.build());\n onChanged();\n } else {\n areaBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "public Builder addArea(com.example.grpc.SimpleServiceOuterClass.Area value) {\n if (areaBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureAreaIsMutable();\n area_.add(value);\n onChanged();\n } else {\n areaBuilder_.addMessage(value);\n }\n return this;\n }", "public Builder addArea(com.example.grpc.SimpleServiceOuterClass.Area value) {\n if (areaBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureAreaIsMutable();\n area_.add(value);\n onChanged();\n } else {\n areaBuilder_.addMessage(value);\n }\n return this;\n }", "public Builder addArea(com.example.grpc.SimpleServiceOuterClass.Area value) {\n if (areaBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureAreaIsMutable();\n area_.add(value);\n onChanged();\n } else {\n areaBuilder_.addMessage(value);\n }\n return this;\n }", "@Test\n\tpublic void saveOrderLineSalesOrder() {\n\t\t// TODO: JUnit - Populate test inputs for operation: saveOrderLineSalesOrder \n\t\tInteger id_2 = 0;\n\t\tSalesOrder related_salesorder = new ecom.domain.SalesOrder();\n\t\tOrderLine response = null;\n\t\tresponse = service.saveOrderLineSalesOrder(id_2, related_salesorder);\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveOrderLineSalesOrder\n\t}", "public static void setCustomerData()\n\t{\n\t\tString sURL = PropertyManager.getInstance().getProperty(\"REST_PATH\") + \"measurements?state=WAIT_FOR_CONFIG\";\n\t\tmCollect = new MeasurementCollection();\n\t\tmCollect.setList(sURL);\n\n\t\tfor (int i = 0; i < mCollect.getList().size(); i++)\n\t\t{\n\t\t\tmObject = mCollect.getList().get(i);\n\t\t\tString mID = mObject.getId();\n\t\t\taData = new AddressData(mID);\n\t\t\tif (mObject.getPriority().equals(\"HIGH\"))\n\t\t\t{\n\t\t\t\tcustomerList.add(\"+ \" + aData.guiAddressData());\n\t\t\t}\n\t\t\telse if (mObject.getPriority().equals(\"MEDIUM\"))\n\t\t\t{\n\t\t\t\tcustomerList.add(\"- \" + aData.guiAddressData());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcustomerList.add(\"o \" + aData.guiAddressData());\n\t\t\t}\n\n\t\t}\n\t\tcustomerText.setText(aData.getCustomerData());\n\t\tmeasureText.setText(mObject.getMeasurementData());\n\n\t}", "@Override\n\t@Transactional\n\tpublic void save(Area area) {\n\t\tdao.save(area);\n\t}", "@Override\n\tpublic boolean addArea(Goodsarea goods) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean addHotelArea(HotelArea hotelArea) {\n\t\tInteger result = hotelAreaDao.insert(hotelArea);\r\n\t\t\r\n\t\treturn result > 0;\r\n\t}", "public void addCustomer(CustomerWithGoods customer) {\n\t\tthis.allCustomers.add(customer);\n\t}", "private static void addProductsToStore() throws Exception\n {\n store.add(new Sales(123, \"Heinz Catsup\", .8, 45.4, 55));\n store.add(new Sales(244, \"Guilden's Mustard\", .85, 23.4, 28));\n store.add(new Sales(303, \"Lipton Noodle Soup\", .9, 9.0, 6));\n store.add(new Sales(445, \"Meow Mix Cat Food\", .7, 25.7, 43));\n store.add(new Sales(501, \"Hershey's Chocolate Syrup\", .95, 38.0, 23));\n }", "public void showCustomerOrders() {\n\t\ttextArea.setText(\"\");\n\t\tfor (int i = 0; i < driver.getOrderDB().getCustomerOrderList().size(); i++) {\n\t\t\tOrder order = (driver.getOrderDB().getCustomerOrderList().get(i));\n\t\t\ttextArea.append(\"Order \" + order.getId() + \" was created by \"\n\t\t\t\t\t+ order.getCurrentlyLoggedInStaff().getName() + \"\\nCustomer ID : \"\n\t\t\t\t\t+ ((Customer) order.getPerson()).getId() + \"\\nItems in this order :\");\n\t\t\tfor (int j = 0; j < order.getOrderEntryList().size(); j++) {\n\t\t\t\tStockItem stockItem = order.getOrderEntryList().get(j);\n\t\t\t\ttextArea.append(\"\\n \" + stockItem.getQuantity() + \" \"\n\t\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \"\n\t\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity()));\n\t\t\t}\n\t\t\ttextArea.append(\"\\nThe total order value is \" + order.getGrandTotalOfOrder() + \"\\n\\n\\n\");\n\t\t}\n\t}", "public void SalesAcceptor(ArrayList<Sales> salse) {\r\n \tgetSaless = (ArrayList<Sales>)salse.clone();\r\n \tSystem.out.println(getSaless);\r\n \tListSales.addAll(getSaless);\r\n\t\t}", "private void createAreas(ElectionEvent electionEvent, Locale locale) {\n\n\t\tCountry norge = new Country(\"47\", \"Norge\", electionEvent);\n\t\tentityManager.persist(norge);\n\n\t\tCountyStatus countyStatusApproved = (CountyStatus) entityManager.createQuery(\"select cs from CountyStatus cs where cs.id = \"\n\t\t\t\t+ (Integer) CountyStatusEnum.APPROVED_CONFIGURATION.id()).getSingleResult();\n\t\tCounty osloFylke = new County(\"03\", \"Oslo\", norge);\n\t\tosloFylke.setLocale(locale);\n\t\tosloFylke.setCountyStatus(countyStatusApproved);\n\t\tentityManager.persist(osloFylke);\n\n\t\tMunicipalityStatus statusApproved = (MunicipalityStatus) entityManager.createQuery(\"select ms from MunicipalityStatus ms where ms.id = \"\n\t\t\t\t+ (Integer) MunicipalityStatusEnum.APPROVED_CONFIGURATION.id()).getSingleResult();\n\n\t\tMunicipality osloKommune = new Municipality(AreaPath.OSLO_MUNICIPALITY_ID, \"Oslo\", osloFylke);\n\t\tosloKommune.setLocale(locale);\n\t\tosloKommune.setMunicipalityStatus(statusApproved);\n\t\tosloKommune.setElectronicMarkoffs(true);\n\t\tosloKommune.setRequiredProtocolCount(true);\n\t\tosloKommune.setTechnicalPollingDistrictsAllowed(true);\n\t\tentityManager.persist(osloKommune);\n\n\t\tBorough bydelGamleOslo = new Borough(\"030101\", \"Gamle Oslo\", osloKommune);\n\t\tbydelGamleOslo.setMunicipality1(false);\n\t\tentityManager.persist(bydelGamleOslo);\n\n\t\tPollingDistrict kampenSkole = new PollingDistrict(\"0103\", \"Kampen skole\", bydelGamleOslo);\n\t\tkampenSkole.setMunicipality(false);\n\t\tkampenSkole.setParentPollingDistrict(false);\n\t\tkampenSkole.setTechnicalPollingDistrict(false);\n\t\tentityManager.persist(kampenSkole);\n\t}", "protected void createCompaniesContacts() {\n\n log.info(\"CompaniesContactsBean => method : createCompaniesContacts()\");\n\n EntityManager em = EMF.getEM();\n EntityTransaction tx = null;\n\n try {\n tx = em.getTransaction();\n tx.begin();\n for (CompaniesEntity c : selectedCompaniesContacts) {\n CompaniesContactsEntity companiesContactsEntity1 = new CompaniesContactsEntity();\n companiesContactsEntity1.setContactsByIdContacts(contactsBean.getContactsEntity());\n companiesContactsEntity1.setCompaniesByIdCompanies(c);\n companiesContactsDao.update(em, companiesContactsEntity1);\n }\n tx.commit();\n log.info(\"Persist ok\");\n } catch (Exception ex) {\n if (tx != null && tx.isActive()) tx.rollback();\n log.info(\"Persist failed\");\n } finally {\n em.clear();\n em.clear();\n }\n\n }", "@Override\r\n\tpublic List<SalesDto> queryAllSales() {\n\t\treturn salesMapper.queryAllSales();\r\n\t}", "@Override\n public void addCustomer(Customer customer) {\n log.info(\"Inside addCustomer method\");\n customerRepository.save(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 int addSale(SaleVO vo) {\n\t\treturn sale.Add(vo);\r\n\t}", "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\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//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder addAreaBuilder() {\n return getAreaFieldBuilder().addBuilder(\n com.example.grpc.SimpleServiceOuterClass.Area.getDefaultInstance());\n }", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder addAreaBuilder() {\n return getAreaFieldBuilder().addBuilder(\n com.example.grpc.SimpleServiceOuterClass.Area.getDefaultInstance());\n }", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder addAreaBuilder() {\n return getAreaFieldBuilder().addBuilder(\n com.example.grpc.SimpleServiceOuterClass.Area.getDefaultInstance());\n }", "@Override\n\tpublic void addCustomer(Customer customer) {\n\t\tcustomerDao.addCustomer(customer);\n\t}", "@RequestMapping(value = \"/agent/enrollment/addCOS\", method = RequestMethod.POST)\n public ModelAndView addCategoryOfService(@RequestParam(\"id\") long profileId,\n @RequestParam(\"startDate\") Date startDate, @RequestParam(\"endDate\") String endDate,\n @RequestParam(\"cos\") String[] cos, @RequestParam(\"prevCosId\") long prevCosId,\n @RequestParam(\"prevCosEndDate\") String prevCosEndDate) throws PortalServiceException {\n String signature = \"EnrollmentController#addCategoryOfService(long profileId, String startDate, String endDate, String cos)\";\n LogUtil.traceEntry(getLog(), signature, new String[] { \"id\", \"startDate\", \"endDate\", \"cos\" }, new Object[] {\n profileId, startDate, endDate, cos });\n CMSUser user = ControllerHelper.getCurrentUser();\n ProviderCategoryOfService categoryOfService = new ProviderCategoryOfService();\n List<CategoryOfService> categories = new ArrayList<CategoryOfService>();\n for (String c : cos) {\n categories.add(lookupService.findLookupByCode(CategoryOfService.class, c));\n }\n if (cos.length > 0 && startDate != null) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n categoryOfService.setCategories(categories);\n categoryOfService.setStartDate(startDate);\n if (endDate != null && endDate.trim().length() > 0) {\n try {\n categoryOfService.setEndDate(dateFormat.parse(endDate));\n } catch (ParseException e) {\n // ignore\n }\n }\n categoryOfService.setProfileId(profileId);\n Date prevCatEndDate = null;\n if (prevCosId != 0) {\n try {\n prevCatEndDate = dateFormat.parse(prevCosEndDate);\n } catch (ParseException e) {\n // ignore\n }\n }\n enrollmentService.addCOSToProfile(user, categoryOfService, prevCosId, prevCatEndDate);\n }\n return new ModelAndView(\"redirect:/agent/enrollment/cos?id=\" + profileId);\n }", "public abstract List<CustomerOrder> save(Iterable<CustomerOrder> entities);", "public void runThroughCustomers(ArrayList<Customer> customers){\n\t\tint cSize = customers.size();\n\t\tint i;\n\t\tOrder tempOrder;\n\t\tCustomer tempCustomer;\n\t\tfor(i = 0; i < cSize; i++){\n\t\t\tif(checkStock()){\n\t\t\t\ttempCustomer = customers.get(i);\n\t\t\t\t//printInventory();\n\t\t\t\ttempOrder = tempCustomer.placeOrder(inventory);\n\t\t\t\t//System.out.println(\"Day order: \" + i);\n\t\t\t\t//tempOrder.printOrder();\n\t\t\t\thandleOrder(tempOrder);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t//System.out.println();\n\t\t\t\tnoInventoryClosure = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void setAreaConhecimento(List<AreaConhecimento> areaConhecimento) {\n this.areaConhecimento = areaConhecimento;\n }", "public void accountSale(long storeID, final SaleTO sale) throws ProductOutOfStockException, NotInDatabaseException, UpdateException;", "public static void setAllCustomers(ObservableList<Customers> allCustomers) {\n Customers.allCustomers = allCustomers;\n System.out.println(\"The query has successfully applied all customers to the list\");\n }", "public void startSale(){\n sale = new Sale();\n for(SaleObserver obs: saleObservers)\n sale.addSaleObserver(obs);\n }", "void setAnnualSales(int annualSales) {\n this.annualSales = annualSales;\n }", "@Transactional(readOnly = true)\n public void associationsAndJoinsExamples() {\n List<Customer> customersWithOrders = getSession().createQuery(\"from Customer as customer inner join customer.orders as ord with ord.shipCountry = 'UK'\").list();\n System.out.println(customersWithOrders.size());\n\n List<Customer> customersWithFetchOrders = getSession().createQuery(\"from Customer as customer inner join fetch customer.orders as ord where ord.shipCountry = 'UK'\").list();\n System.out.println(customersWithOrders.size());\n\n //FETCH keyword - dociąganie obiektów - iloczyn kartezjanski - sa 2 kolekcje\n //List<Customer> customersWithOrderDetails = getSession().createQuery(\"from Customer as customer inner join fetch customer.orders as ord inner join fetch ord.orderDetails as orderDetail\").list();\n //System.out.println(customersWithOrderDetails.size());\n }", "public List<Site> loadSitesByCustomer(long id) {\r\n\t\t\r\n\t\treturn siteDao.loadSitesByCustomer(id) ;\r\n\t\t\r\n\t}", "public void addCoordinateSystem(CoordinateSystem cs) {\n if (cs == null)\n throw new RuntimeException(\"Attempted to add null CoordinateSystem to var \" + forVar.getFullName());\n\n if (coordSys == null)\n coordSys = new ArrayList<>(5);\n coordSys.add(cs);\n }", "public List<SalesOrderItem> fetchItem()\r\n throws ODataException\r\n {\r\n if (erpConfigContext == null) {\r\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type SalesOrderItem.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\r\n }\r\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\r\n odataResourceUrl.append(\"(\");\r\n odataResourceUrl.append(\"SalesOrder=\");\r\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(salesOrder));\r\n odataResourceUrl.append(\")/\");\r\n odataResourceUrl.append(\"to_Item\");\r\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getEndpointUrl(), odataResourceUrl.toString());\r\n final ODataQuery query = builder.build();\r\n final ErpEndpoint erpEndpoint = new ErpEndpoint(erpConfigContext);\r\n final ODataQueryResult result = query.execute(erpEndpoint);\r\n final List<SalesOrderItem> entityList = result.asList(SalesOrderItem.class);\r\n for (SalesOrderItem entity: entityList) {\r\n entity.setErpConfigContext(erpConfigContext);\r\n }\r\n return entityList;\r\n }", "@Override\n public List<Area> getAllAreas() {\n return new ArrayList<>(areas.values());\n }", "List<SalesConciliation> getSalesConciliation(Company company, Date startDate, Date endDate) throws Exception;", "public synchronized void addAll(WCollection otherCollection)\n\t{\n\t\tif(otherCollection != null)\n\t\t{\n\t\t\tEnumeration otherCollectionEnum = otherCollection.elements();\n\t\t while(otherCollectionEnum.hasMoreElements())\n\t\t {\n\t\t \tWModelObject object = (WModelObject) otherCollectionEnum.nextElement();\n\t\t \tm_elements.addElement(object);\n\t\t }\n\t\t}\n\t\t\n\t}", "public List<AddressEntity> getAllAddress(CustomerEntity customerEntity) {\n\n //Creating List of AddressEntities.\n List<AddressEntity> addressEntities = new LinkedList<>();\n\n //Calls Method of customerAddressDao,getAllCustomerAddressByCustomer and returns AddressList.\n List<CustomerAddressEntity> customerAddressEntities = customerAddressDao.getAllCustomerAddressByCustomer(customerEntity);\n if (customerAddressEntities != null) { //Checking if CustomerAddressEntity is null else extracting address and adding to the addressEntites list.\n customerAddressEntities.forEach(customerAddressEntity -> {\n addressEntities.add(customerAddressEntity.getAddress());\n });\n }\n\n return addressEntities;\n\n }", "public void setCustomerCompany(\n @Nonnull\n final List<CustomerCompany> value) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.clear();\n toCustomerCompany.addAll(value);\n }", "public void testAddAndRemoveServiceArea() throws Exception {\r\n serviceArea = new ServiceArea();\r\n\r\n // set required fields\r\n serviceArea.setName(\"OK-tjenesten\");\r\n serviceArea.setSelectable(new Boolean(\"false\"));\r\n\r\n // set expected behavior on dao\r\n serviceAreaDAO.expects(once()).method(\"saveServiceArea\")\r\n .with(same(serviceArea)).isVoid();\r\n serviceAreaManager.saveServiceArea(serviceArea);\r\n serviceAreaDAO.verify();\r\n\r\n // reset expectations\r\n serviceAreaDAO.reset();\r\n\r\n serviceAreaDAO.expects(once()).method(\"removeServiceArea\")\r\n .with(eq(new Long(serviceAreaId)));\r\n serviceAreaManager.removeServiceArea(serviceAreaId);\r\n serviceAreaDAO.verify();\r\n\r\n // reset expectations\r\n serviceAreaDAO.reset();\r\n\r\n // remove\r\n Exception ex = new ObjectRetrievalFailureException(ServiceArea.class,\r\n serviceArea.getId());\r\n serviceAreaDAO.expects(once()).method(\"removeServiceArea\").isVoid();\r\n serviceAreaDAO.expects(once()).method(\"getServiceArea\")\r\n .will(throwException(ex));\r\n serviceAreaManager.removeServiceArea(serviceAreaId);\r\n\r\n try {\r\n serviceAreaManager.getServiceArea(serviceAreaId);\r\n fail(\"ServiceArea with identifier '\" + serviceAreaId +\r\n \"' found in database\");\r\n } catch (ObjectRetrievalFailureException e) {\r\n assertNotNull(e.getMessage());\r\n }\r\n\r\n serviceAreaDAO.verify();\r\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "void assignAuthorisationsToCustomer(CustomerModel customer);", "public final void entryRuleStores() throws RecognitionException {\n\n \tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n\n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1972:1: ( ruleStores EOF )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1973:1: ruleStores EOF\n {\n before(grammarAccess.getStoresRule()); \n pushFollow(FOLLOW_ruleStores_in_entryRuleStores3717);\n ruleStores();\n\n state._fsp--;\n\n after(grammarAccess.getStoresRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleStores3724); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "@Override\n\tpublic ArrayList<SalesOrder> getAllSalesOrdersByCustomer(String customerName, boolean retrieveAssociation) throws Exception\n\t{\n ArrayList<SalesOrder> returnList = new ArrayList<SalesOrder>();\n\n\t\tPreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM SalesOrder, Contacts WHERE name = ?\");\n query.setString(1, customerName);\n _da.setSqlCommandText(query);\n ResultSet salesOrderResult = _da.callCommandGetResultSet();\n\n while (salesOrderResult.next())\n {\n SalesOrder salesOrder = buildSalesOrder(salesOrderResult, retrieveAssociation);\n returnList.add(salesOrder);\n }\n\n return returnList;\n\t}", "public void addAll(Collection other) {\n\n\t\tclass AddProcessor extends Processor {\n\t\t\tpublic void process(Object value) {\n\t\t\t\tadd(value);\n\t\t\t}\n\t\t}\n\t\tAddProcessor addProcessor = new AddProcessor();\n\n\t\tother.forEach(addProcessor);\n\t}" ]
[ "0.7319298", "0.70334727", "0.6475958", "0.6455919", "0.55550283", "0.4842627", "0.48292834", "0.47294348", "0.47252277", "0.47168124", "0.4633222", "0.46322826", "0.4574041", "0.4574041", "0.4574041", "0.45055977", "0.4488671", "0.4348496", "0.43414152", "0.4301954", "0.4274125", "0.42593682", "0.42580304", "0.42509627", "0.42416584", "0.4221449", "0.42211184", "0.42015827", "0.41633958", "0.41598934", "0.4149082", "0.41373044", "0.41306067", "0.4111406", "0.41111016", "0.40728068", "0.40720308", "0.40635073", "0.40486327", "0.404239", "0.4039783", "0.40375876", "0.40181416", "0.40011966", "0.3986471", "0.39719254", "0.39583173", "0.3956812", "0.3956811", "0.3946813", "0.3946813", "0.3946813", "0.39334354", "0.39334354", "0.39334354", "0.39251947", "0.39147225", "0.39064005", "0.3902938", "0.38986245", "0.38853633", "0.3885108", "0.38845453", "0.3877481", "0.387639", "0.38753468", "0.38730213", "0.38688546", "0.38596588", "0.38593414", "0.38583097", "0.38573986", "0.38573986", "0.38573986", "0.3851857", "0.383815", "0.38325235", "0.38293105", "0.38277113", "0.38231584", "0.38156337", "0.38115388", "0.380937", "0.38036922", "0.37973356", "0.3795114", "0.3794024", "0.37939295", "0.37896377", "0.37886482", "0.37871057", "0.37866196", "0.37843913", "0.37824357", "0.37824357", "0.37824357", "0.3781398", "0.3775712", "0.3774594", "0.37712955" ]
0.75018346
0
Navigation property to_CustomerCompany for Customer to multiple CustomerCompany.
@Nonnull public Customer.CustomerBuilder customerCompany(CustomerCompany... value) { return toCustomerCompany(Lists.newArrayList(value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCustomerCompany(\n @Nonnull\n final List<CustomerCompany> value) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.clear();\n toCustomerCompany.addAll(value);\n }", "@Nonnull\n public Optional<List<CustomerCompany>> getCustomerCompanyIfPresent() {\n return Optional.ofNullable(toCustomerCompany);\n }", "@Nonnull\n public List<CustomerCompany> fetchCustomerCompany()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerCompany.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerCompany\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerCompany> entityList = result.asList(CustomerCompany.class);\n for (CustomerCompany entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@Nonnull\n public List<CustomerCompany> getCustomerCompanyOrFetch()\n throws ODataException\n {\n if (toCustomerCompany == null) {\n toCustomerCompany = fetchCustomerCompany();\n }\n return toCustomerCompany;\n }", "public CompanyTO getCompany() {\n\t\t\r\n\t\treturn CompanyService.getInstance().getCompany();\r\n\t}", "public Long getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "public List<CustomerCompany> getAllCustomerCompanies() \n\t{\n\t\treturn this.entityManager.createNamedQuery(\"CustomerCompany.listAll\", CustomerCompany.class).getResultList();\n\t}", "public Company getCompany() {\n\t\treturn company;\n\t}", "public Long getCompanyId() {\n return companyId;\n }", "public String getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "public String getContactCompany() {\n return contactCompany;\n }", "public String getCompany() {\r\n\t\treturn company;\r\n\t}", "public String getCompany() {\n\t\treturn company;\n\t}", "public String getCompany() {\n\t\treturn company;\n\t}", "public void addCustomerCompany(CustomerCompany... entity) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.addAll(Lists.newArrayList(entity));\n }", "public java.util.Set<vn.com.phuclocbao.entity.CompanyEntity> getCompanies()\n {\n return companies;\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return this.companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "public String getCompany() {\n return company;\n }", "public long getCompanyId() {\n return companyId;\n }", "public String getCompanyContact() {\n\t\treturn companyContact;\n\t}", "public Company getCompany() {\r\n return this.company;\r\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _changesetEntry.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _second.getCompanyId();\n\t}", "public java.util.List<contactsapi.company.CompanyResponse> getCompaniesList() {\n return companies_;\n }", "public String getCompany() {\n return company;\n }", "public String getCompany() {\n return company;\n }", "public void setContactCompany(String contactCompany) {\n this.contactCompany = contactCompany;\n }", "public String getCarCompany() {\n\t\treturn carCompany;\n\t}", "public int getCompanyId() {\n return companyId;\n }", "public Company getCompany() {\n return company;\n }", "public List<Company> getCompanys() {\n\t\treturn companyDao.findAll();\n//\t\treturn companies;\n\t}", "public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getCompany() {\n return (String) get(\"company\");\n }", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "public String getCompanyId()\n {\n return companyId;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\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 company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setCompany(String company) {\n\t\tthis.company = company;\n\t}", "public void setCompany(Company aCompany) {\n company = aCompany;\n }", "public void setCompany(String company) {\r\n\t\tthis.company = company;\r\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _employee.getCompanyId();\n\t}", "public CustomerCompany findCustomerCompany(Long id) \n\t{\n\t\treturn this.entityManager.find(CustomerCompany.class, id);\n\t}", "public void setCompanyId(int companyId) {\n this.companyId = companyId;\n }", "public java.lang.Integer getCompany() {\n\treturn company;\n}", "public void setCompanyId(Integer value) {\n this.companyId = value;\n }", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "public void setCompany(String company) {\n this.company = company;\n }", "public String getCompany()\r\n {\r\n return (m_company);\r\n }", "public java.util.List<? extends contactsapi.company.CompanyResponseOrBuilder> \n getCompaniesOrBuilderList() {\n return companies_;\n }", "public ArrayList<Coupon> getCompanyCoupons() throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _expandoColumn.getCompanyId();\n\t}", "public void setCompanyId(long companyId) {\n this.companyId = companyId;\n }", "public java.lang.String getCompany() {\n java.lang.Object ref = company_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n company_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getCompany() {\n java.lang.Object ref = company_;\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 company_ = s;\n return s;\n }\n }", "public String getCompanyCode() {\r\n return companyCode;\r\n }", "public String getCompanyCode() {\r\n return companyCode;\r\n }", "public String getCompanyCode() {\n return companyCode;\n }", "public void setCarCompany(String carCompany) {\n\t\tthis.carCompany = carCompany;\n\t}", "public void setCompanyId(Long companyId) {\n this.companyId = companyId;\n }", "@Override\n\tpublic List<CompanyVO> getCompanyInfo(String c_name) {\n\t\treturn null;\n\t}", "public String getCompany()\n\t{\n\t\treturn getCompany( getSession().getSessionContext() );\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _paper.getCompanyId();\n\t}", "public String[] getCompanyNames() {\n return companyNames;\n }", "@OneToMany(mappedBy=\"tblContactperson\")\n\tpublic Set<TblCustomer> getTblCustomers() {\n\t\treturn this.tblCustomers;\n\t}", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "public java.lang.String getDocumentCompany() {\n return documentCompany;\n }", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public List<ManagedCompany> getManagedCompanies() {\n \n List<ManagedCompany> results = new ArrayList<>();\n \n try {\n Connection conn = this.databaseUtils.getConnection();\n dao.setConnection(conn);\n results = dao.getItems();\n } catch (SQLException e) {\n Logger.getLogger(AppService.class.getName()).log(Level.SEVERE, null, e);\n }\n \n return results;\n }", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "public java.util.List<contactsapi.company.CompanyResponse> getCompaniesList() {\n if (companiesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(companies_);\n } else {\n return companiesBuilder_.getMessageList();\n }\n }", "public String getCompany()\n {\n return (String) getProperty(PropertyIDMap.PID_COMPANY);\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _userTracker.getCompanyId();\n\t}", "public void setCompany(String company)\r\n {\r\n m_company = company;\r\n }", "public String getCompanySymbol() {\n\t\treturn companySymbol;\n\t}", "public String getCompanyName() {\r\n\r\n\t\treturn this.companyName;\r\n\t}", "public String getCompanyName() {\r\n\t\treturn companyName;\r\n\t}", "public String getCompanyName() {\n\t\treturn companyName;\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _scienceApp.getCompanyId();\n\t}", "@Override\n public long getCompanyId() {\n return _partido.getCompanyId();\n }" ]
[ "0.69547427", "0.66062915", "0.6560482", "0.61841846", "0.5988411", "0.5962556", "0.5911751", "0.5902862", "0.58882636", "0.58321923", "0.58284307", "0.5820906", "0.5799344", "0.5799344", "0.5789953", "0.5767591", "0.575724", "0.575724", "0.57247615", "0.5723147", "0.56948364", "0.56948364", "0.5689188", "0.56855327", "0.5684188", "0.56322235", "0.5591348", "0.5591348", "0.5591348", "0.5587683", "0.5576409", "0.55715376", "0.5568104", "0.5554501", "0.5554501", "0.55490535", "0.55471075", "0.5519819", "0.5480615", "0.5476568", "0.5460094", "0.5458999", "0.5456345", "0.5456345", "0.5456345", "0.5456345", "0.5439673", "0.5406041", "0.5365582", "0.53636503", "0.536136", "0.53465796", "0.5340927", "0.5331524", "0.5324014", "0.53215104", "0.53214973", "0.53214973", "0.53047985", "0.52970964", "0.5290683", "0.52869326", "0.5276945", "0.5276945", "0.527038", "0.52630085", "0.52615386", "0.52573895", "0.5256364", "0.5256364", "0.5251186", "0.52446276", "0.5241108", "0.5220379", "0.5220143", "0.52181613", "0.5210565", "0.520966", "0.5201947", "0.51827073", "0.51795703", "0.51795703", "0.51795703", "0.51795703", "0.51795703", "0.5163867", "0.51615417", "0.51615417", "0.51615417", "0.51615417", "0.51513046", "0.51502794", "0.5149278", "0.51292795", "0.51266223", "0.5118698", "0.5099581", "0.50700575", "0.50511926", "0.5049439" ]
0.6152406
4
Navigation property to_CustomerSalesArea for Customer to multiple CustomerSalesArea.
@Nonnull public Customer.CustomerBuilder customerSalesArea(CustomerSalesArea... value) { return toCustomerSalesArea(Lists.newArrayList(value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCustomerSalesArea(\n @Nonnull\n final List<CustomerSalesArea> value) {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = Lists.newArrayList();\n }\n toCustomerSalesArea.clear();\n toCustomerSalesArea.addAll(value);\n }", "@Nonnull\n public List<CustomerSalesArea> fetchCustomerSalesArea()\n throws ODataException\n {\n if (erpConfigContext == null) {\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type CustomerSalesArea.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\n }\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\n odataResourceUrl.append(\"(\");\n odataResourceUrl.append(\"Customer=\");\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(customer));\n odataResourceUrl.append(\")/\");\n odataResourceUrl.append(\"to_CustomerSalesArea\");\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getServicePathForFetch(), odataResourceUrl.toString()).withoutMetadata();\n final ODataQuery query = builder.build();\n final ODataQueryResult result = query.execute(erpConfigContext);\n final List<CustomerSalesArea> entityList = result.asList(CustomerSalesArea.class);\n for (CustomerSalesArea entity: entityList) {\n entity.setErpConfigContext(erpConfigContext);\n entity.setServicePathForFetch(getServicePathForFetch());\n }\n return entityList;\n }", "@Nonnull\n public Optional<List<CustomerSalesArea>> getCustomerSalesAreaIfPresent() {\n return Optional.ofNullable(toCustomerSalesArea);\n }", "public void addCustomerSalesArea(CustomerSalesArea... entity) {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = Lists.newArrayList();\n }\n toCustomerSalesArea.addAll(Lists.newArrayList(entity));\n }", "@Nonnull\n public List<CustomerSalesArea> getCustomerSalesAreaOrFetch()\n throws ODataException\n {\n if (toCustomerSalesArea == null) {\n toCustomerSalesArea = fetchCustomerSalesArea();\n }\n return toCustomerSalesArea;\n }", "@Override\n\tpublic List<Area> getAreaList() {\n\t\treturn areaDao.queryArea();\n\t}", "public List<Almacen> getStoresByIdCompany(long idCompany);", "public ArrayList<SalesOrder> getSalesOrders() {\n\t\treturn salesOrders;\n\t}", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public void setCourseArea(String courseArea) {\n this.courseArea = courseArea;\n }", "@Override\r\n\tpublic List<Area> getAreaList() {\n\t\tList<Area> areaList = areaDao.selectArea();\r\n\t\tSystem.out.println(areaList);\r\n\t\t\r\n\t\treturn areaList;\r\n\t}", "@Override\n\tpublic List<Goodsarea> findAllArea() {\n\t\treturn null;\n\t}", "public String getArea_id() {\n return area_id;\n }", "public Integer getAreaId() {\n return areaId;\n }", "public Integer getAreaId() {\n return areaId;\n }", "public int getAreaNo() {\n return areaNo_;\n }", "public String getCourseArea() {\n return courseArea;\n }", "public LinkedList<Area> getAreas(){\n\t\treturn areas;\n\t}", "public ArrayList<CityArea> getCityAreasConquered() {\n\t\treturn cityAreasConquered;\n\t}", "@Override\n public JSONObject viewSLCustomersByAdmin() {\n\n return in_salescustdao.viewSLCustomerByAdmin();\n }", "SalesInvoicesType getSalesInvoices();", "public String getBusinessArea() {\n return businessArea;\n }", "public void setAreaConhecimento(List<AreaConhecimento> areaConhecimento) {\n this.areaConhecimento = areaConhecimento;\n }", "public com.mpe.financial.model.SalesOrder getSalesOrder () {\r\n\t\treturn salesOrder;\r\n\t}", "public List<Product> getSales() {\n return sales;\n }", "@GetMapping(\"/{id}/sales\")\n public Iterable<Sale> getSalesByCustomer(@PathVariable long id){\n Customer b = customerRepository.findById(id);\n return b.getSales();\n }", "public int getAreaNo() {\n return areaNo_;\n }", "public void setArea(String area) {\n this.area = area;\n }", "public void setArea(String area) {\n this.area = area;\n }", "@Override\n\tpublic void areaTotal() {\n\t\tsolido.areaTotal = solido.areaLateral + solido.areaBase;\n\t}", "public String getArea() {\n return this.area;\n }", "@ManyToOne(optional = true)\r\n\tpublic Area getArea() {\r\n\t\treturn this.area;\r\n\t}", "@RequestMapping(\"/api/salesOrders\")\n\tpublic List<SalesOrder> salesOrders() throws ODataException {\n\n\t\tLOGGER.info(\"Method entry {}\", salesOrderMethod);\n\n\t\t// The soldToParty is hardcoded since we only want to show orders for the\n\t\t// on-time customer and it must not be changed in the UI layer\n\n\t\tSalesOrderFluentHelper query = ProcessSalesOrdersService.getAllSalesOrder().filter(SOLD_TO_PARTY.eq(\"10401010\"))\n\t\t\t\t.select(SALES_ORDER, SALES_ORDER_TYPE, DISTRIBUTION_CHANNEL, ORGANIZATION_DIVISION, SOLD_TO_PARTY,\n\t\t\t\t\t\tPURCHASE_ORDER_BY_CUSTOMER, TOTAL_NET_AMOUNT, TRANSACTION_CURRENCY, CREATION_DATE);\n\n\t\tList<SalesOrder> orderList = query.execute(new ErpConfigContext(s4cldDestinationName));\n\n\t\tLOGGER.info(\"Method exit {}\", salesOrderMethod);\n\n\t\treturn orderList;\n\t}", "public String getArea() {\n\t\treturn area;\n\t}", "public String getArea() {\n return area;\n }", "public Long getSalesOrgnizationId() {\n return salesOrgnizationId;\n }", "public void setSalesOrgnizationId(Long salesOrgnizationId) {\n this.salesOrgnizationId = salesOrgnizationId;\n }", "public void setArea(Polygon area) {\n\t\tthis.area = area;\n\t}", "@Override\n public List<Area> getAllAreas() {\n return new ArrayList<>(areas.values());\n }", "public void setArea(String area) {\n\t\tthis.area = area;\n\t}", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public void setPersonnelSubArea(String personnelSubArea);", "default TArea createArea(AreaFactory<TContent, TArea> areaSupplier)\n {\n return areaSupplier.createArea();\n }", "public Polygon getArea() {\n\t\treturn area;\n\t}", "public String getShippingAreaIds() {\n return shippingAreaIds;\n }", "public void setArea_id(String area_id) {\n this.area_id = area_id;\n }", "public int getCodigoArea() { return this.codigoArea; }", "public int getCodigoArea() { return this.codigoArea; }", "public int getArea() {\n\t\treturn area;\n\t}", "public void setAreaProveedor(int areaProveedor) { this.areaProveedor = areaProveedor; }", "public void claShapeArea(){\r\n\t\tshape.calArea();\r\n\t}", "public java.lang.String CC_GetNoOfConsumersPerArea(java.lang.String accessToken, java.lang.String areaCode) throws java.rmi.RemoteException;", "public void setAreaId(Integer areaId) {\n this.areaId = areaId;\n }", "public void setAreaId(Integer areaId) {\n this.areaId = areaId;\n }", "public double getArea() {\n\t\treturn this.area;\n\t}", "public static ArrayList<SalesOrder> getSalesOrderSets() throws OnlineODataStoreException\n {\n\n\n //Get the open online store\n ODataOpenListener openListener = ODataOpenListener.getInstance();\n OnlineODataStore store = openListener.getStore();\n\n if (store!=null)\n {\n SalesOrder salesOrder;\n ODataProperty property;\n ODataPropMap properties;\n String resourcePath;\n\n try\n {\n /**\n * Build the initial OData resource path and query options string from:\n * Collection ID: EntitySet Name\n * ?$orderby= : query option that specifies the order (sorting) of the response\n * SalesOrderID : sort key for the orderby directive\n *\n * Instead of SalesOrderID, you can specify Collections.NOTE to have all SalesOrderSet\n * returned alphabetically (and by default displayed that way in the list view).\n *\n * The christianschneider service enforces server-side paging and will return 20 entities per\n * request. To view the paging size (\"$skiptoken=\") value, paste the first URL below into a\n * browser window, and scroll to the bottom of the response. You do not have to\n * track the number of entities received in your code. The SDK will create the\n * next resource path string for you (as seen in the code below). When the returned\n * string is `null' you have received all entities.\n *\n * Since there are 77 entities in the OData service we are calling, the do-while loop\n * will end up issuing the four requests below to receive all the data (20 entities at a time).\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=20,20\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=40,40\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=60,60\n */\n\n // Build initial resource path and query options string\n resourcePath = Collections.SALES_ORDER_SET + \"?$top=5&$skip=\" + skipValue + \"&$orderby=\" + Collections.SALES_ORDER_ID;\n // Loop until resourcePath is null\n Log.d(\"resourcePath\", resourcePath);\n// do\n// {\n Log.d(TAG, \"Requesting: \" + resourcePath);\n\n //Executor method for reading an Entity set\n ODataResponseSingle resp = store.executeReadEntitySet(resourcePath, null);\n\n //Get the response payload\n ODataEntitySet feed = (ODataEntitySet) resp.getPayload();\n\n //Get the list of ODataEntity\n List<ODataEntity> entities = feed.getEntities();\n\n //Loop to retrieve the information from the response and store in the SalesOrder Object\n for (ODataEntity entity : entities)\n {\n properties = entity.getProperties();\n property = properties.get(com.christianschneider.model.Collections.SALES_ORDER_ID);\n salesOrder = new SalesOrder(property.getValue().toString());\n property = properties.get(Collections.NOTE);\n salesOrder.setNote(property.getValue().toString());\n property = properties.get(Collections.NOTE_LANGUAGE);\n salesOrder.setNoteLanguage(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_ID);\n salesOrder.setCustomerId(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_NAME);\n salesOrder.setCustomerName(property.getValue().toString());\n property = properties.get(Collections.CURRENCY_CODE);\n salesOrder.setCurrencyCode(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS);\n salesOrder.setLifecycleStatus(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS_DESCRIPTION);\n salesOrder.setLifecycleStatusDescription(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS);\n salesOrder.setBillingStatus(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS_DESCRIPTION);\n salesOrder.setBillingStatusDescription(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS);\n salesOrder.setDeliveryStatus(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS_DESCRIPTION);\n salesOrder.setDeliveryStatusDescription(property.getValue().toString());\n property = properties.get(Collections.CREATED_AT);\n salesOrder.setCreatedAt(property.getValue().toString());\n property = properties.get(Collections.CHANGED_AT);\n salesOrder.setChangedAt(property.getValue().toString());\n\n /**\n * The unit price value from the christianschneider OData service has\n * four decimal places, we'll round to two decimal places before storing the data\n */\n property = properties.get(Collections.GROSS_AMOUNT);\n Float price = Float.valueOf(property.getValue().toString());\n salesOrder.setGrossAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.NET_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setNetAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.TAX_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setTaxAmount(String.format(\"%.2f\", price));\n\n // Add this entity to the array\n pList.add(salesOrder);\n SalesOrderItemDataSingleton.initialize(openListener, salesOrder);\n\n }\n\n // Get the next resource path from the OData SDK. The call to getNextResourcePath()\n // will return the appropriate string based on the server's skiptoken value.\n // resourcePath = feed.getNextResourcePath();\n\n// }\n // Short circuit evaluation of the string to see if we should loop again.\n // When all entities have been received, resourcePath will be null\n// while (resourcePath != null && !resourcePath.isEmpty());\n\n SalesOrder.logSalesOrderArrayList(pList);\n\n // Save a reference to the list in ITEMS.\n ITEMS = pList;\n\n // Store all items in ITEMS (ArrayList) in ITEM_MAP (HashMap) for rapid retrieval\n storeData();\n skipValue += 5;\n\n }\n catch (Exception e)\n {\n Log.e(TAG, appContext.getString(R.string.online_odata_store_exception));\n throw new OnlineODataStoreException(e);\n }\n }\n else\n Log.e(TAG, \"Store not open\");\n\n return pList;\n }", "public Builder addAllArea(\n java.lang.Iterable<? extends com.example.grpc.SimpleServiceOuterClass.Area> values) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, area_);\n onChanged();\n } else {\n areaBuilder_.addAllMessages(values);\n }\n return this;\n }", "public Builder addAllArea(\n java.lang.Iterable<? extends com.example.grpc.SimpleServiceOuterClass.Area> values) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, area_);\n onChanged();\n } else {\n areaBuilder_.addAllMessages(values);\n }\n return this;\n }", "public Builder addAllArea(\n java.lang.Iterable<? extends com.example.grpc.SimpleServiceOuterClass.Area> values) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, area_);\n onChanged();\n } else {\n areaBuilder_.addAllMessages(values);\n }\n return this;\n }", "public void setClusterArea(String clusterArea) {\r\n this.clusterArea = clusterArea;\r\n }", "@Override\n\tpublic List<Area> getQueryAreaByOperator(Area areaCondition) {\n\t\t\n\t\treturn areaDao.queryAreaByOperator(areaCondition);\n\t}", "public String getClusterArea() {\r\n return clusterArea;\r\n }", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder addAreaBuilder() {\n return getAreaFieldBuilder().addBuilder(\n com.example.grpc.SimpleServiceOuterClass.Area.getDefaultInstance());\n }", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder addAreaBuilder() {\n return getAreaFieldBuilder().addBuilder(\n com.example.grpc.SimpleServiceOuterClass.Area.getDefaultInstance());\n }", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder addAreaBuilder() {\n return getAreaFieldBuilder().addBuilder(\n com.example.grpc.SimpleServiceOuterClass.Area.getDefaultInstance());\n }", "public Builder addArea(\n com.example.grpc.SimpleServiceOuterClass.Area.Builder builderForValue) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n area_.add(builderForValue.build());\n onChanged();\n } else {\n areaBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "public Builder addArea(\n com.example.grpc.SimpleServiceOuterClass.Area.Builder builderForValue) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n area_.add(builderForValue.build());\n onChanged();\n } else {\n areaBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "public Builder addArea(\n com.example.grpc.SimpleServiceOuterClass.Area.Builder builderForValue) {\n if (areaBuilder_ == null) {\n ensureAreaIsMutable();\n area_.add(builderForValue.build());\n onChanged();\n } else {\n areaBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "@OneToMany(mappedBy=\"tblContactperson\")\n\tpublic Set<TblCustomer> getTblCustomers() {\n\t\treturn this.tblCustomers;\n\t}", "public Integer getSales() {\n return sales;\n }", "public java.util.List<? extends com.example.grpc.SimpleServiceOuterClass.AreaOrBuilder> \n getAreaOrBuilderList() {\n return area_;\n }", "public java.util.List<? extends com.example.grpc.SimpleServiceOuterClass.AreaOrBuilder> \n getAreaOrBuilderList() {\n return area_;\n }", "public java.util.List<? extends com.example.grpc.SimpleServiceOuterClass.AreaOrBuilder> \n getAreaOrBuilderList() {\n return area_;\n }", "public void setLocationArea(String locationArea) {\n this.locationArea = locationArea;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n if (areaBuilder_ == null) {\n return java.util.Collections.unmodifiableList(area_);\n } else {\n return areaBuilder_.getMessageList();\n }\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n if (areaBuilder_ == null) {\n return java.util.Collections.unmodifiableList(area_);\n } else {\n return areaBuilder_.getMessageList();\n }\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n if (areaBuilder_ == null) {\n return java.util.Collections.unmodifiableList(area_);\n } else {\n return areaBuilder_.getMessageList();\n }\n }", "void setAnnualSales(int annualSales) {\n this.annualSales = annualSales;\n }", "public Area getArea(Area area) {\r\n\t\treturn this.getArea(area.getId());\r\n\t}", "public void setPersonnelArea(String personnelArea);", "public short countCustomersFromAreaThatUseAgent(Map<String, String> csvFilePaths, String customerArea,\n\t\t\tString agentFirstName, String agentLastName) {\n\n\t\tint totalCustomersFromAreaThatUseAgent = 0;\n\t\tString line = \"\";\n\t\tint index = 0;\n\n\t\tBufferedReader fileScanner;\n\t\tList<Agent> agents = new ArrayList<Agent>();\n\n\t\ttry {\n\t\t\tString agentFilePath = (String) csvFilePaths.get(\"agentList\");\n\t\t\tString customerFilePath = (String) csvFilePaths.get(\"customerList\");\n\n\t\t\tfileScanner = new BufferedReader(new FileReader(agentFilePath));\n\n\t\t\twhile ((line = fileScanner.readLine()) != null) {\n\t\t\t\tif (index != 0) {\n\n\t\t\t\t\tString[] currentEntry = line.split(\",\");\n\n\t\t\t\t\tAgent newAgent = new Agent(currentEntry);\n\n\t\t\t\t\tagents.add(newAgent);\n\t\t\t\t}\n\n\t\t\t\tindex += 1;\n\t\t\t}\n\t\t\tindex = 0;\n\t\t\tfileScanner.close();\n\t\t\tfileScanner = new BufferedReader(new FileReader(customerFilePath));\n\n\t\t\twhile ((line = fileScanner.readLine()) != null) {\n\t\t\t\tif (index != 0) {\n\t\t\t\t\tString[] currentEntry = line.split(\",\");\n\n\t\t\t\t\tint customerAgentId = Integer.parseInt(currentEntry[5]);\n\n\t\t\t\t\tAgent customerAgent = agents.get(customerAgentId);\n\n\t\t\t\t\tif (customerAgent.getFirstName().equals(agentFirstName)\n\t\t\t\t\t\t\t&& customerAgent.getLastName().equals(agentLastName)\n\t\t\t\t\t\t\t&& currentEntry[4].equals(customerArea)) {\n\t\t\t\t\t\ttotalCustomersFromAreaThatUseAgent += 1;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tindex += 1;\n\t\t\t}\n\t\t\tfileScanner.close();\n\n\t\t} catch (IOException error) {\n\t\t\terror.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn (short) totalCustomersFromAreaThatUseAgent;\n\n\t}", "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\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//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "@Basic\n\t@Column(name = \"CUSTOMER_ROLE\", nullable = false)\n\tpublic String getAuthority() {\n\t\treturn this.authority;\n\t}", "public String getSalesZone() {\n return salesZone;\n }", "public List<Sale> getSalesLog() {\n return salesLog;\n }", "public double getArea()\n {\n return area;\n }", "@Override\n\t@Transactional\n\tpublic List<Area> findAll() {\n\t\treturn (List<Area>) dao.findAll();\n\t}", "public String getAreaCode() {\n return areaCode;\n }", "public String getAreaCode() {\n return areaCode;\n }", "public int getAreaCount() {\n return area_.size();\n }", "public int getAreaCount() {\n return area_.size();\n }", "public int getAreaCount() {\n return area_.size();\n }", "public void setCustomerCompany(\n @Nonnull\n final List<CustomerCompany> value) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.clear();\n toCustomerCompany.addAll(value);\n }", "public void setSalesZone(String salesZone) {\n this.salesZone = salesZone == null ? null : salesZone.trim();\n }", "public double get_Area() {\n return this.Area;\n }", "@Override\n public double getArea() {\n int area = areaService.getArea();\n /**Adapting here to the only format that client knows**/\n System.out.println(\"Area in sqkm calculated by 3rd Party service: \"+area);\n return area*(0.386102);\n }" ]
[ "0.75218797", "0.7086069", "0.67029846", "0.654108", "0.6332427", "0.45654634", "0.449901", "0.4489354", "0.44485906", "0.44485906", "0.44485906", "0.44415465", "0.44222382", "0.44010633", "0.43550032", "0.43314746", "0.43314746", "0.4313139", "0.43035218", "0.42854887", "0.42755833", "0.427318", "0.42368776", "0.42197374", "0.42120802", "0.41937175", "0.4177109", "0.41731653", "0.4170508", "0.41561124", "0.41497818", "0.41495752", "0.4147514", "0.41298336", "0.4124733", "0.41213524", "0.41110697", "0.4109688", "0.4109013", "0.40886152", "0.4073694", "0.40682128", "0.40674806", "0.40674806", "0.40674806", "0.40651435", "0.40487435", "0.40285018", "0.40278587", "0.40244123", "0.40050527", "0.40050527", "0.39992473", "0.39976075", "0.39938316", "0.39929065", "0.39834666", "0.39834666", "0.3981783", "0.39781561", "0.3976341", "0.3976341", "0.3976341", "0.39541736", "0.39535034", "0.39487228", "0.39462912", "0.39462912", "0.39462912", "0.3944548", "0.3944548", "0.3944548", "0.39444083", "0.39433923", "0.3933906", "0.3933906", "0.3933906", "0.39322612", "0.3930609", "0.3930609", "0.3930609", "0.392623", "0.3925391", "0.3922542", "0.3919879", "0.3914832", "0.39102954", "0.38989964", "0.3898158", "0.3895933", "0.38897085", "0.3883643", "0.3883643", "0.38813108", "0.38813108", "0.38813108", "0.38774553", "0.38735443", "0.38722202", "0.38698122" ]
0.71423346
1
This method will list all existing users if the current user is logged in
@RequestMapping(value = "/", method = RequestMethod.GET) public String welcome(ModelMap model) { model.addAttribute("loggedinuser", getPrincipalUsername()); return "home"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<User> getAllLoggedInUser() {\n ArrayList<User> allUsers = new ArrayList<>();\n Realm realm = (mRealm == null) ? Realm.getDefaultInstance() : mRealm;\n\n try {\n RealmResults<User> allUsersInRealm = realm.where(User.class).equalTo(\"IsLoggedIn\", true).findAll();\n List<User> retval = realm.copyFromRealm(new ArrayList<>(allUsersInRealm)); // convert user to unmanaged copy\n allUsers.addAll(retval);\n } catch (Exception ex) {\n // todo handle exception\n }\n\n if (mRealm == null)\n realm.close();\n\n return allUsers;\n }", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public List getAllUsers();", "@Override\n\tpublic List<User> getAllUsers() {\n\t\tlog.info(\"get all users!\");\n\t\treturn userRepository.findAll();\n\t}", "protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}", "@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}", "public List<User> list() {\n\t\treturn userDao.list();\n\t}", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}", "@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}", "@Override\r\n\tpublic List<User> findAllUsers() {\n\t\treturn userDAO.findAllUsers();\r\n\t}", "@Override\n\tpublic List<User> getList() {\n\t\treturn Lists.newArrayList(userRepository.findAll());\n\t}", "@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}", "public ArrayList<User> getAllUsers() {\n return profile.getAllUsers();\n }", "@Override\n\tpublic ArrayList<User> findAll() {\n\t\t\n\t\treturn userDao.querydAll();\n\t}", "public List<User> getAllUsers();", "@Override\n\tpublic List<User> getAll() {\n\t\treturn userDao.getAll();\n\t}", "public void getAllUsers() {\n\t\t\n\t}", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }", "@Override\n\tpublic List<Object> getAllUsers() {\n\t\tList<Object> usersList = new ArrayList<Object>();\n\t\tList<TestUser> users = dao.getAll();\n\t\tSystem.out.println(dao.exists(5));\n\t\tfor(TestUser user : users){\n\t\t\tMap<String,Object> m = new HashMap<String,Object>();\n\t\t\tm.put(\"id\", user.getId());\n\t\t\tm.put(\"name\", user.getUsername());\n\t\t\tm.put(\"pwd\", user.getPassword());\n\t\t\tJSONObject j = new JSONObject(m);\n\t\t\tusersList.add(j);\n\t\t}\n\t\treturn usersList;\n\t}", "public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }", "@Override\n\tpublic List<Login> findAllUsers() {\n\t\treturn userRepo.findAll();\n\t}", "@Override\r\n\tpublic List<User> getAll() {\n\t\treturn users;\r\n\t}", "@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}", "@Override\n\tpublic List<ERSUser> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}", "@Override\r\n\tpublic List<User> queryAllUsers() {\n\t\tList<User> users = userMapper.queryAllUsers();\r\n\t\treturn users;\r\n\t}", "@Override\n\tpublic ArrayList<User> searchUsers() {\n\t\treturn userDao.searchUsers();\n\t}", "public List<User> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}", "public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }", "@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}", "public List<User> getAll() {\n\t\treturn null;\n\t}", "public List<User> getAllUsers() {\n return users;\n }", "@Override\r\n\tpublic List<User> viewUsers() {\n\t\treturn user.viewUsers();\r\n\t}", "public List<User> getAll() {\n\t\treturn service.getAll();\n\t}", "public List<Users> getAllUsers() {\r\n\t\t// return usDao.findAll();\r\n\t\treturn usDao.getAllUsers();\r\n\t}", "public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}", "public List<User> getAllUsers() {\n\t\treturn null;\n\t}", "@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }", "public String getAllLoggedInUsers(Request req, Response res) {\n List<User> users = model.getAvailableUser();\n List<User> onlineUser = new ArrayList<>();\n for (User user : users) {\n if (user.getStatus()) {\n onlineUser.add(user);\n }\n }\n\n JsonArray bodyResult = JsonUtil.usersToJson(onlineUser);\n res.status(200);\n return JsonUtil.stringify(new ServerResponse(SUCCESS, bodyResult));\n }", "@Override\n\tpublic List<User> getAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<User> getAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Users> getAll() {\n\t\treturn usersDAO.getAll();\n\t}", "public List<User> getAllUser() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<User> findAll() {\n\t\treturn this.userMapper.findAll();\n\t}", "List<User> getAllUsers();", "List<User> getAllUsers();", "public List<UserData> list() {\n\t\treturn userDAO.list();\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<User> listUsers() {\n\t\treturn (List<User>) openSession().createCriteria(User.class).list();\n\t}", "public List<User> getAllUsers() {\n\t\treturn userDao.getAllUsers();\n\t}", "public List<User> list() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}", "public List<User> displayUsers() {\n\t\t\r\n\t\ttry {\r\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from com.niit.model.User\").list();\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static List<User> getAllUsers(){\n\t\t// getting all users\n\t\treturn dao.getAllUsers();\n\t}", "@Override\n\tpublic ArrayList<User> getAll() {\n\t\treturn this.users;\n\t}", "public ArrayList<User> showUsers(){\n\t\treturn this.userList;\n\t}", "@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}", "public List<User> listAll() throws Exception;", "public List<User> allUserRecords() {\n\t\tSystem.out.println(\"Calling getAllUserRecords() Method To Fetch Users Record\");\t\n\t\tList<User> userList = userDAO.listUser();\n\t\treturn userList;\n\t}", "@Override\n\tpublic List<User> findAll() {\n\t\treturn userRepository.findAll();\n\t}", "@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}", "public List<User> userList() {\r\n\t\treturn DataDAO.getUserList();\r\n\r\n\t}", "@Override\n\tpublic Iterable<com.example.demo.model.User> getAllUsers() {\n\t\treturn userRepository.findAll();\n\t}", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@RequestMapping(value = \"/users\", method = RequestMethod.GET)\n\tpublic List<AppUser> users() {\n\t\treturn appUserRepository.findAll();\n\t}", "@Override\n\tpublic ArrayList<user> getAllUser() {\n\t\treturn null;\n\t}", "public List<User> getUserList()\r\n\t{\r\n\t//\tGet the user list\r\n\t//\r\n\t\treturn identificationService.loadUserList();\r\n\t}", "public List<Account> getListOfLoggedUsers() {\n\t\tList<Account> loggedUsers = new ArrayList<>();\n\t\tloggedUsers = adminDao.getLoggedUsers();\n\n\t\tif (loggedUsers == null) {\n\t\t\tSystem.out.println(\"There is no logged users currently!\\n\");\n\t\t\tAdminMenu.getAdminMenu();\n\t\t}\n\t\treturn loggedUsers;\n\t}", "@Override\n\tpublic List<AdminUser> getAllUsers() {\n\t\treturn em.createQuery(\"SELECT r FROM AdminUser r order by user_id\").getResultList();\n\t}", "@Override\n\tpublic List<UserEntity> getAllUsers() {\n\t\treturn userRepository.findAll();\n\t}", "@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }", "public ArrayList<User> getAllUsers() {\n return allUsers;\n }", "public List<User> getAllUsers(){\n return userRepository.findAll();\n }", "@Override\r\n\tpublic List<Map<String, Object>> findAllUser() {\n\t\treturn userMapper.findAllUser();\r\n\t}", "public static List<User> all() \n {\n return find.all();\n }", "@Override\n\tpublic List<User> findAllUsers() {\n\t\treturn userRepo.findAll();\n\t}", "public ArrayList<IndividualUser> listAllUsers() {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT id, userName, firstName, lastName FROM Users \");\n s.execute();\n ResultSet results = s.getResultSet();\n ArrayList<IndividualUser> users = new ArrayList<>();\n if (!results.isBeforeFirst()) {\n results.close();\n s.close();\n return users;\n }\n\n while (!results.isLast()) {\n results.next();\n IndividualUser u = new IndividualUser(results.getInt(1), results.getString(2), results.getString(3), results.getString(4));\n\n users.add(u);\n\n }\n\n results.close();\n s.close();\n\n return users;\n } catch (SQLException e) {\n sqlException(e);\n return null;\n }\n }", "@Override\n\tpublic List<User> findUser() {\n\t\treturn userdao.findUser();\n\t}", "@Override\r\n\tpublic List<User> findAllUsers() {\n\t\treturn null;\r\n\t}", "public ArrayList<UserDetail> gettingAllAvailableUsers() throws Exception;", "@Override\r\n\tpublic void viewAllUsers() {\n\t\tList<User> allUsers = new ArrayList<User>();\r\n\t\tallUsers = udao.getAllUsers();\r\n\t\t\r\n\t\tSystem.out.println(\"ALL USERS:\");\r\n\t\tSystem.out.println(\"ID\\tUsername\\tName\");\r\n\t\t\r\n\t\tfor(int i = 0; i < allUsers.size(); i++) {\r\n\t\t\tUser tempUser = allUsers.get(i);\r\n\t\t\tSystem.out.println(tempUser.getUserID() + \"\\t\" + tempUser.getUsername() + \"\\t\"\r\n\t\t\t\t\t+ tempUser.getFirstName() + \" \" + tempUser.getLastName());\r\n\t\t}\r\n\r\n\t}", "public synchronized List<User> getAllUsers() {\r\n\t\treturn new ArrayList<User>(mapping.values());\r\n\t}", "@RequestMapping(value = \"/user\", method = RequestMethod.GET)\n @PreAuthorize(\"hasRole('ADMIN')\")\n public ResponseEntity<List<UserAccount>> listAllUsers() {\n List<UserAccount> users = userAccountDetailsService.findAllUsers();\n if (users.isEmpty()) {\n return new ResponseEntity<List<UserAccount>>(HttpStatus.NO_CONTENT);//You many decide to return HttpStatus.NOT_FOUND\n }\n return new ResponseEntity<List<UserAccount>>(users, HttpStatus.OK);\n }", "@Override\r\n\tpublic List<User> getUsers() {\n\t\tList<User> userlist=dao.getUsers();\r\n\t\treturn userlist;\r\n\t}", "public List<User> list(String currentUsername);", "@GetMapping(\"/users\")\n\tpublic List<User> retrieveAllUsers() {\n\t\treturn userService.findAll();\n\t}", "@Override\r\n\tpublic List<User> getUserList() throws MyUserException {\n\t\treturn userDao.getUserList();\r\n\t}", "public ArrayList<User> list() {\n\t\tUserDao ua=new UserDao();\n\t\treturn ua.list();\n\t\t//System.out.println(\"haii\");\n\t\t \n\t}", "@Override\n\tpublic List<User> getUsers() {\n\t\treturn mongoTemplate.findAll(User.class);\n\t}", "@Override\r\n\tpublic List<UserVO> userList() {\n\t\treturn adao.UserList();\r\n\t}", "public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}", "@Override\r\n\tpublic List<User> users() {\r\n\t\tList<User> ris = new ArrayList<>();\r\n\t\tList< Map <String,String>> maps = getAll(SELECT_USERS);\r\n\t\tfor (Map<String, String> map : maps) {\r\n\t\t\tris.add(IMappable.fromMap(User.class, map));\r\n\t\t}\r\n\t\treturn ris;\r\n\t}", "public List<User> findUsers() {\n\t\treturn userRepository.findUsers();\n\t}", "public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}", "public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}", "@GetMapping\n public List<User> getAllUsers() {\n return userService.getAllUsers();\n }", "public ArrayList<String> getAllUsers() {\n\t\tSystem.out.println(\"Looking up all users...\");\n\t\treturn new ArrayList<String>(users.keySet());\t\n\t}", "@Override\r\n\tpublic void getAllUser() {\n\t\tSystem.out.println(users);\r\n\t\t\r\n\t}", "public List<User> getUserList() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}", "@Override\r\n\tpublic List findAll() {\n\t\treturn usermaindao.findAll();\r\n\t}", "public List<TestUser> getAllUsers(){\n\t\tSystem.out.println(\"getting list of users..\");\n\t\tList<TestUser> user=new ArrayList<TestUser>();\n\t\tuserRepositary.findAll().forEach(user::add);\n\t\t//System.out.println(\"data: \"+userRepositary.FindById(\"ff80818163731aea0163731b190c0000\"));\n\t\treturn user;\n\t}", "public List<User> getAllUsers() {\n List<User> users = null;\n Session session = null;\n try {\n session = openSession();\n users = session.createCriteria(User.class).list();\n } catch (HibernateException he) {\n logger.error(\"Hibernate Exception: \" + he);\n } catch (Exception e) {\n logger.error(\"Exception: \" + e);\n } finally {\n if (session != null) {\n session.close();\n }\n }\n return users;\n }" ]
[ "0.75911725", "0.75735146", "0.7518387", "0.74588984", "0.74495006", "0.74453926", "0.7438595", "0.74203855", "0.7404431", "0.73591685", "0.7346971", "0.7346697", "0.734564", "0.7339159", "0.73319596", "0.73286146", "0.73163944", "0.73107606", "0.73082626", "0.7298476", "0.7288275", "0.72834074", "0.727397", "0.726905", "0.726418", "0.726071", "0.7241135", "0.72385484", "0.7219895", "0.72136664", "0.7211733", "0.7196474", "0.718695", "0.71833974", "0.7181329", "0.7178055", "0.7165159", "0.7160877", "0.7159978", "0.71594214", "0.71594214", "0.7154641", "0.71542746", "0.7151787", "0.7147891", "0.7147891", "0.7142151", "0.7137117", "0.71235937", "0.7122537", "0.7119881", "0.7114378", "0.71085536", "0.71067315", "0.71017885", "0.7096883", "0.7093618", "0.70912266", "0.70911884", "0.7085955", "0.70850086", "0.70814675", "0.708106", "0.70802337", "0.707478", "0.7073933", "0.70738596", "0.70690554", "0.7065934", "0.7060511", "0.7060495", "0.70602053", "0.7056081", "0.7055915", "0.70341194", "0.70327145", "0.70320815", "0.70312935", "0.7027297", "0.7024312", "0.70230883", "0.70224875", "0.7021398", "0.7019885", "0.7017087", "0.7015311", "0.7013841", "0.7009121", "0.70010215", "0.69980884", "0.6991961", "0.698992", "0.6981346", "0.69802934", "0.6978667", "0.6977761", "0.6971918", "0.69668716", "0.6966098", "0.6964574", "0.69644356" ]
0.0
-1
This method will provide a list of users
@RequestMapping(value = "/list", method = RequestMethod.GET) public String listUsers(ModelMap model) { List<User> users = userService.findAllUsers(); model.addAttribute("users", users); model.addAttribute("loggedinuser", getPrincipalUsername()); return "userslist"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List getAllUsers();", "java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();", "public String[] listUsers();", "public String listUsers(){\n \tStringBuilder sb = new StringBuilder();\n \tif(users.isEmpty()){\n \t\tsb.append(\"No existing Users yet\\n\");\n \t}else{\n \t\tsb.append(\"Meeting Manager Users:\\n\");\n \t\tfor(User u : users){\n \t\t\tsb.append(\"*\"+u.getEmail()+\" \"+ u.getPassword()+\" \\n\"+u.listInterests()+\"\\n\");\n \t\t}\n \t}\n \treturn sb.toString();\n }", "List<User> getUsers();", "List<User> getUsers();", "public List<User> getUsers();", "public List<User> listUsers(String userName);", "public List<Utilizator> listUsers();", "public List<User> getAllUsers();", "List<KingdomUser> getUsers();", "public List<User> getUserList();", "@GetMapping(\"/userslist\")\n\tpublic List<User> usersList() {\n\t\treturn userService.usersList();\n\t}", "protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}", "public List<User> getUserList()\r\n\t{\r\n\t//\tGet the user list\r\n\t//\r\n\t\treturn identificationService.loadUserList();\r\n\t}", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "@Override\r\n\tpublic List<User> viewUsers() {\n\t\treturn user.viewUsers();\r\n\t}", "List<User> getAllUsers();", "List<User> getAllUsers();", "@Nonnull\n List<User> getUsers();", "com.google.ads.googleads.v6.resources.UserList getUserList();", "public ArrayList<User> showUsers(){\n\t\treturn this.userList;\n\t}", "public void getAllUsers() {\n\t\t\n\t}", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}", "public List getUsers(User user);", "@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}", "public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}", "public List<User> list();", "List<KingdomUser> getAllUsers();", "@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }", "@POST(\"/ListUsers\")\n\tCollection<User> listUsers();", "public List<User> getUsers(Boolean enabled, Date startDate, Date endDate, int offset, int length) throws UserManagementException;", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<User> showUsers() throws JsonMappingException, JsonProcessingException {\n\n\t\tString url = \"http://localhost:8081/fundoouser/showall\";\n\t\t\n\t\tResponse userResponse = restTemplate.getForObject(url, Response.class);\n\t\t\n\t\tList<User> userList = (List<User>) userResponse.getData(); \n\t\t\n\t\treturn userList;\n\t}", "@RequestMapping(value = {\"/users/list\"}, method = RequestMethod.GET)\n\tpublic ResponseEntity<List<User>> fetchUsers() {\n\t\t\tSystem.out.println(\"fetching users\");\n\t\t\tList<User> user = userDAO.list(\"APPROVED\");\n\t\t\tSystem.out.println(user);\n\t\t\treturn new ResponseEntity<List<User>>(user, HttpStatus.OK);\n\t\t}", "public String ListUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio\r\n listUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n return listUsers.toString(); \r\n }", "@Override\r\n\tpublic List<User> users() {\r\n\t\tList<User> ris = new ArrayList<>();\r\n\t\tList< Map <String,String>> maps = getAll(SELECT_USERS);\r\n\t\tfor (Map<String, String> map : maps) {\r\n\t\t\tris.add(IMappable.fromMap(User.class, map));\r\n\t\t}\r\n\t\treturn ris;\r\n\t}", "@Override\r\n\tpublic List<UserVO> userList() {\n\t\treturn adao.UserList();\r\n\t}", "public ArrayList<UserDetail> gettingAllAvailableUsers() throws Exception;", "private void listUsers(Request request, Response response) {\r\n\t\tList<UserBean> userList = null;\r\n\r\n\t\ttry {\r\n\t\t\tuserList = userService.findUsers();\r\n\t\t} catch (Exception e) {\r\n\t\t\tresponse.setStatus(Status.SERVER_ERROR_INTERNAL, e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tlog.error(e);\r\n\t\t} finally {\r\n\t\t\txmlSerializationService.generateXMLResponse(request, response,\r\n\t\t\t\t\tuserList);\r\n\t\t}\r\n\t}", "public List<User> list() {\n\t\treturn userDao.list();\n\t}", "@Override\n\tpublic List<User> getList() {\n\t\treturn Lists.newArrayList(userRepository.findAll());\n\t}", "@RequestMapping(value = \"/users\", method = RequestMethod.GET)\n public ResponseEntity getUsers() {\n logger.debug(\"HTTP GET /users called\");\n List<User> userList = userService.getUsers(0.00, 4000.00);\n\n return new ResponseEntity(new UserResponse(userList), HttpStatus.OK);\n }", "public List<User> displayUsers() {\n\t\t\r\n\t\ttry {\r\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from com.niit.model.User\").list();\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@GetMapping(\"/users\")\n\tpublic List<User> getUsers(){\n\t\treturn userRepository.findAll();\n\t\t\n\t}", "@GetMapping(\"/users\")\n\tpublic ResponseEntity<List<User>> getUsers() {\n\t\tlog.debug(\"REST request to get all Users\");\n\t\treturn new ResponseEntity<List<User>>(userService.getAll(), HttpStatus.OK);\n\t}", "@GetMapping(\"/allusers\")\n\t@Secured({CommonConstants.ROLE_EMPLOYEE,CommonConstants.ROLE_ADMIN})\n\tpublic ResponseEntity<List<UserEntity>> fetchUsers(){\n\t\treturn new ResponseEntity<List<UserEntity>>(this.service.findAll(), HttpStatus.OK);\n\t}", "public List<User> listAll() throws Exception;", "public List<UserDTO> getUsers();", "com.heroiclabs.nakama.api.User getUsers(int index);", "public List<UsrMain> getListUsers() {\n return mobileCtrl.getListUsers();\n }", "@Override\r\n\tpublic void getAllUser() {\n\t\tSystem.out.println(users);\r\n\t\t\r\n\t}", "public List<String> listUsers() \n\t{\n\t\treturn this.userList.keys();\n\t\t\n\t}", "public static List<User> getUsersList(){\n\t\tWSResponse response = null;\n\t\tList<User> resultList = new ArrayList<User>();\n\t\ttry{\n\t\tPromise<WSResponse> result = WS.url(Utils.getApiUrl()+Urls.GET_USERS_URL)\n\t\t\t\t\t\t\t\t\t\t.setContentType(Urls.CONTENT_TYPE_JSON)\n\t\t\t\t\t\t\t\t\t\t.get();\n\t\tresponse = result.get(10000);\n\t\tGson gson = new Gson();\n\t\tUser[] users = gson.fromJson(response.getBody(), User[].class);\n\t\tfor(int i=0; i<users.length; i++){\n\t\t\tresultList.add(users[i]);\n\t\t}\n\t\t} catch(Exception exception){\n\t\t\tController.flash(Messages.ERROR, Messages.CANT_LOAD_USERS + exception);\n\t\t}\n\t\treturn resultList;\n\t}", "public List<User> list(String currentUsername);", "@RequestMapping(value = \"/users/list\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<UsersDTO> findAllUsers() {\n\t\tlogger.info(\"Return All Users.\");\t\n\t\treturn (List<UsersDTO>) usersService.findAllUsers();\n\t}", "Iterable<User> getAllUsers();", "@Override\n\tpublic List<Object> getAllUsers() {\n\t\tList<Object> usersList = new ArrayList<Object>();\n\t\tList<TestUser> users = dao.getAll();\n\t\tSystem.out.println(dao.exists(5));\n\t\tfor(TestUser user : users){\n\t\t\tMap<String,Object> m = new HashMap<String,Object>();\n\t\t\tm.put(\"id\", user.getId());\n\t\t\tm.put(\"name\", user.getUsername());\n\t\t\tm.put(\"pwd\", user.getPassword());\n\t\t\tJSONObject j = new JSONObject(m);\n\t\t\tusersList.add(j);\n\t\t}\n\t\treturn usersList;\n\t}", "@GetMapping(\"/\")\n\tpublic ResponseEntity<List<UsersDTO>> listAllusers(){\n\t\tList<UsersDTO> users = userJpaRepository.findAll();\n\t\tif(users.isEmpty()) {\n\t\t\treturn new ResponseEntity<List<UsersDTO>>(HttpStatus.NO_CONTENT);\n\t\t}\n\t\treturn new ResponseEntity<List<UsersDTO>>(users, HttpStatus.OK);\n\t}", "public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public List<TestUser> getAllUsers(){\n\t\tSystem.out.println(\"getting list of users..\");\n\t\tList<TestUser> user=new ArrayList<TestUser>();\n\t\tuserRepositary.findAll().forEach(user::add);\n\t\t//System.out.println(\"data: \"+userRepositary.FindById(\"ff80818163731aea0163731b190c0000\"));\n\t\treturn user;\n\t}", "@Override\n public List<User> selectAllUsers() {\n\n List<User> userList = new ArrayList<>();\n\n try (Connection connection = DriverManager.getConnection(URL, USERNAME, PASSWORD)) {\n\n String sql = \"SELECT * FROM ers_users\";\n\n PreparedStatement ps = connection.prepareStatement(sql);\n\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n userList.add(\n new User(\n rs.getInt(1)\n , rs.getString(2)\n , rs.getString(3)\n , rs.getString(4)\n , rs.getString(5)\n , rs.getString(6)\n , rs.getInt(7)\n )\n );\n }\n }\n\n catch (SQLException e) {\n\n e.printStackTrace();\n }\n\n return userList;\n }", "public ArrayList<User> list() {\n\t\tUserDao ua=new UserDao();\n\t\treturn ua.list();\n\t\t//System.out.println(\"haii\");\n\t\t \n\t}", "public List listUsers() {\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n List users = null;\n try {\n tx = session.beginTransaction();\n users = session.createQuery(\"FROM User\").list();\n for (Iterator iterator = users.iterator(); iterator.hasNext(); ) {\n User user = (User) iterator.next();\n System.out.print(\"id: \" + user.getId());\n System.out.print(\" Username: \" + user.getUsername());\n System.out.print(\" Password: \" + user.getPassword());\n System.out.println(\" Email: \" + user.getEmail());\n }\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return users;\n }", "public List<IUser> getUsers();", "public List<String> displayuser() {\n\t\t// TODO Auto-generated method stub\n\t\tList<String> list = new ArrayList<>();\n\t\tlist = crud1.displayUsers();\n\t\treturn list;\n\t}", "@Override\r\n\tpublic List<User> getAll() {\n\t\treturn users;\r\n\t}", "@GetMapping(\"/users\")\n\tpublic List<User> retrieveAllUsers() {\n\t\treturn userService.findAll();\n\t}", "public List<User> getAllUsers() {\n return users;\n }", "public List<User> getUsers()\n\t{\n\t\treturn usersList;\n\t}", "List<User> fetchAllUSers();", "public List<UserData> list() {\n\t\treturn userDAO.list();\r\n\t}", "public ArrayList<User> showUsers() throws SQLException {\n ArrayList<User> users = new ArrayList<>();\n PreparedStatement pr = connection.prepareStatement(Queries.showUserList);\n ResultSet result = pr.executeQuery();\n while (result.next()) {\n users.add(new User(\n result.getInt(\"id\"),\n result.getString(\"user_full_name\"),\n result.getString(\"email\"),\n result.getInt(\"phone\")));\n }\n pr.close();\n return users;\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<User> listUsers() {\n\t\treturn (List<User>) openSession().createCriteria(User.class).list();\n\t}", "public UserList list();", "@GetMapping\n public List<User> getAllUsers() {\n return userService.getAllUsers();\n }", "public List<User> userList() {\r\n\t\treturn DataDAO.getUserList();\r\n\r\n\t}", "@Override\r\n\tpublic List<User> getUsers() {\n\t\tList<User> userlist=dao.getUsers();\r\n\t\treturn userlist;\r\n\t}", "@Override\r\n\tpublic List<User> getUserList() throws MyUserException {\n\t\treturn userDao.getUserList();\r\n\t}", "private void getAllUsers(){\n\t\t\n\t\tSystem.out.println(\"Retrieving Social Graph Data from tibbr...\"); \n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\n\t\tString params = \"?sort=firstNameAsc&fields=name,jive.username,-resources&count=5000&startIndex=0\"; \n\t\tHttpGet getRequest = new HttpGet(urlBase+\"/api/core/v3/people/@all\"+params);\n\t\t\n\n\t\t\t \n\t\tgetRequest.setHeader(\"Authorization\", \"Basic \" + this.auth);\n\t\t\n\t\t\t\n\t\ttry {\n\t\t\tHttpResponse response = httpClient.execute(getRequest);\n\t\t\tString jsonOut = readStream(response.getEntity().getContent());\n\t\t // Remove throwline if present\n\t\t\tjsonOut = removeThrowLine(jsonOut);\n\t\t getAllUserElements(jsonOut);\n\t\t \n\t \n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public List<User> list();", "List<UserDisplayDto> getAllUsers();", "@GET\n\t@Path(\"/allUsers\")\n\t@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\tpublic Map<String, List<User>> getUser() throws JsonGenerationException, JsonMappingException, IOException {\n\t\t\n\t\tMap<String, List<User>> user = userDao.getUser();\n\t\t\n\t\treturn user; \n\t}", "public final void getUsersList() throws ServiceException {\r\n\t\tList<Bems> usersList = testReqmtService.getUsersList();\r\n\t\tList<SelectItem> userDetails= new ArrayList<SelectItem>();\r\n\t\t\r\n\t\tfor(Bems user:usersList) {\r\n\t\t\tStringBuilder name=new StringBuilder();\r\n\t\t\t name.append(user.getLastName().trim());\r\n\t\t\t name.append(\",\"+\" \");\r\n\t\t\t name.append(user.getFirstName().trim());\r\n\t\t\tif(CommonUtils.isStringNotEmpty(user.getMiddleName())){\r\n\t\t\t\tname.append(\" \");\r\n\t\t\t\tname.append(user.getMiddleName());\r\n\t\t\t}\r\n\t\t\tuserDetails.add(new SelectItem(user.getBemsID(), name.toString()));\r\n\t\t \r\n\t\t}\r\n\t\tuiTestReqEditModel.setUserList(userDetails);\r\n\t}", "public void ShowAllUsers()\r\n {\r\n userList.forEach((s) -> { System.out.println(s); });\r\n }", "public List<User> list() {\n\t\treturn null;\n\t}", "@GetMapping(value = URL)\n @ResponseBody\n public List<Users> listAll() {\n return usersService.listAll();\n }", "@RequestMapping(value = \"/user\", method = RequestMethod.GET)\n\t public ResponseEntity<List<Users>> listAllUsers() \n\t {\n\t List<Users> users = userService.findAllUsers();\n\t if(users.isEmpty())\n\t {\n\t return new ResponseEntity<List<Users>>(HttpStatus.NO_CONTENT);//You many decide to return HttpStatus.NOT_FOUND\n\t }\n\t else\n\t {\n\t \treturn new ResponseEntity<List<Users>>(users, HttpStatus.OK);\n\t }\n\t }", "public List<User> getUserList() {\n\t\treturn null;\n\t}", "@GetMapping\n public ResponseEntity<List<UserEntity>> getAllUsers() {\n return ResponseEntity.ok(uService.getAllUsers());\n }", "public void displayUsers(){\n //go through the userName arraylist and add them to the listView\n for(String val:this.userNames){\n this.userListView.getItems().add(val);\n }\n }", "public List<User> getAllUsers(){\n return userRepository.findAll();\n }", "@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}", "@Override\n\tpublic List<User> getUsers() {\n\t\treturn mongoTemplate.findAll(User.class);\n\t}", "@GetMapping(\"/users\")\n @PreAuthorize(\"hasRole('Admin')\")\n public SuccessResponse<List<UserResponse>> getUsers() {\n if(!connectionService.isReachable()) {\n String exceptionMessage = \"Cannot connect to database.\";\n System.out.println(exceptionMessage);\n throw new DatabaseException(exceptionMessage);\n }\n\n final var users = userService\n .findAllUsers()\n .stream()\n .map(UserResponse::fromUser)\n .collect(Collectors.toList());\n return new SuccessResponse<>(users);\n }", "public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }", "public String getAllUsers() {\n\t\tString s = \"\";\n\t\tSet<String> ids = usersList.keySet();\n\t\tfor (String userId : ids) {\n\t\t\ts += \"<b>UserId :</b> \" + userId + \"&nbsp<b> UserName : </b>\" + usersList.get(userId).getName()\n\t\t\t\t\t+ \"<b>&nbsp Profession :</b> \" + usersList.get(userId).getProfession() + \"<br><br>\";\n\t\t}\n\t\treturn s;\n\n\t}", "@GetMapping(path=\"/all\")\n\tpublic @ResponseBody Iterable<User> getAllUsers() {\n\t\t// This returns a JSON or XML with the users\n\t\treturn userRepository.findAll();\n\t}", "public ArrayList<IndividualUser> listAllUsers() {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT id, userName, firstName, lastName FROM Users \");\n s.execute();\n ResultSet results = s.getResultSet();\n ArrayList<IndividualUser> users = new ArrayList<>();\n if (!results.isBeforeFirst()) {\n results.close();\n s.close();\n return users;\n }\n\n while (!results.isLast()) {\n results.next();\n IndividualUser u = new IndividualUser(results.getInt(1), results.getString(2), results.getString(3), results.getString(4));\n\n users.add(u);\n\n }\n\n results.close();\n s.close();\n\n return users;\n } catch (SQLException e) {\n sqlException(e);\n return null;\n }\n }" ]
[ "0.8452262", "0.8244395", "0.8143262", "0.8140755", "0.81313217", "0.81313217", "0.8078451", "0.806356", "0.80294806", "0.80030954", "0.79609174", "0.7931783", "0.79007316", "0.7896246", "0.78859895", "0.7867122", "0.7865843", "0.7854606", "0.78468823", "0.78468823", "0.7836992", "0.78325367", "0.7805062", "0.77863014", "0.77839136", "0.7768277", "0.7764608", "0.7745031", "0.7741551", "0.7727466", "0.77250576", "0.7720072", "0.77149385", "0.7686322", "0.76711386", "0.76604074", "0.7658458", "0.7632454", "0.7627114", "0.7622743", "0.7614375", "0.76127964", "0.7602303", "0.7599634", "0.7590384", "0.7587231", "0.75764537", "0.7568704", "0.75643665", "0.7539984", "0.7537344", "0.7513524", "0.7499184", "0.748386", "0.74790037", "0.74759287", "0.7464027", "0.7462464", "0.7459212", "0.7457698", "0.745702", "0.74550056", "0.74543226", "0.74505174", "0.744761", "0.7446459", "0.7443193", "0.7441787", "0.7440405", "0.74349046", "0.74338573", "0.7428335", "0.74231005", "0.7418318", "0.7416034", "0.74122757", "0.7408865", "0.7408478", "0.74007064", "0.73975503", "0.7395569", "0.7394931", "0.73911333", "0.73876107", "0.73786503", "0.7376183", "0.7359046", "0.7355254", "0.7354227", "0.7348795", "0.733835", "0.7325336", "0.7308383", "0.7304839", "0.7292653", "0.7289195", "0.72869104", "0.7284704", "0.72825694", "0.7278802", "0.7274318" ]
0.0
-1
This method will provide a list of users
@RequestMapping(value = "/tutorlist", method = RequestMethod.GET) public String listTutors(ModelMap model) { List<User> users = userService.findAllTutors(); model.addAttribute("users", users); model.addAttribute("loggedinuser", getPrincipalUsername()); return "tutorslist"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List getAllUsers();", "java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();", "public String[] listUsers();", "public String listUsers(){\n \tStringBuilder sb = new StringBuilder();\n \tif(users.isEmpty()){\n \t\tsb.append(\"No existing Users yet\\n\");\n \t}else{\n \t\tsb.append(\"Meeting Manager Users:\\n\");\n \t\tfor(User u : users){\n \t\t\tsb.append(\"*\"+u.getEmail()+\" \"+ u.getPassword()+\" \\n\"+u.listInterests()+\"\\n\");\n \t\t}\n \t}\n \treturn sb.toString();\n }", "List<User> getUsers();", "List<User> getUsers();", "public List<User> getUsers();", "public List<User> listUsers(String userName);", "public List<Utilizator> listUsers();", "public List<User> getAllUsers();", "List<KingdomUser> getUsers();", "public List<User> getUserList();", "@GetMapping(\"/userslist\")\n\tpublic List<User> usersList() {\n\t\treturn userService.usersList();\n\t}", "protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}", "public List<User> getUserList()\r\n\t{\r\n\t//\tGet the user list\r\n\t//\r\n\t\treturn identificationService.loadUserList();\r\n\t}", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "@Override\r\n\tpublic List<User> viewUsers() {\n\t\treturn user.viewUsers();\r\n\t}", "List<User> getAllUsers();", "List<User> getAllUsers();", "@Nonnull\n List<User> getUsers();", "com.google.ads.googleads.v6.resources.UserList getUserList();", "public ArrayList<User> showUsers(){\n\t\treturn this.userList;\n\t}", "public void getAllUsers() {\n\t\t\n\t}", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}", "public List getUsers(User user);", "@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}", "public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}", "public List<User> list();", "List<KingdomUser> getAllUsers();", "@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }", "@POST(\"/ListUsers\")\n\tCollection<User> listUsers();", "public List<User> getUsers(Boolean enabled, Date startDate, Date endDate, int offset, int length) throws UserManagementException;", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<User> showUsers() throws JsonMappingException, JsonProcessingException {\n\n\t\tString url = \"http://localhost:8081/fundoouser/showall\";\n\t\t\n\t\tResponse userResponse = restTemplate.getForObject(url, Response.class);\n\t\t\n\t\tList<User> userList = (List<User>) userResponse.getData(); \n\t\t\n\t\treturn userList;\n\t}", "@RequestMapping(value = {\"/users/list\"}, method = RequestMethod.GET)\n\tpublic ResponseEntity<List<User>> fetchUsers() {\n\t\t\tSystem.out.println(\"fetching users\");\n\t\t\tList<User> user = userDAO.list(\"APPROVED\");\n\t\t\tSystem.out.println(user);\n\t\t\treturn new ResponseEntity<List<User>>(user, HttpStatus.OK);\n\t\t}", "public String ListUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio\r\n listUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n return listUsers.toString(); \r\n }", "@Override\r\n\tpublic List<User> users() {\r\n\t\tList<User> ris = new ArrayList<>();\r\n\t\tList< Map <String,String>> maps = getAll(SELECT_USERS);\r\n\t\tfor (Map<String, String> map : maps) {\r\n\t\t\tris.add(IMappable.fromMap(User.class, map));\r\n\t\t}\r\n\t\treturn ris;\r\n\t}", "@Override\r\n\tpublic List<UserVO> userList() {\n\t\treturn adao.UserList();\r\n\t}", "public ArrayList<UserDetail> gettingAllAvailableUsers() throws Exception;", "private void listUsers(Request request, Response response) {\r\n\t\tList<UserBean> userList = null;\r\n\r\n\t\ttry {\r\n\t\t\tuserList = userService.findUsers();\r\n\t\t} catch (Exception e) {\r\n\t\t\tresponse.setStatus(Status.SERVER_ERROR_INTERNAL, e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tlog.error(e);\r\n\t\t} finally {\r\n\t\t\txmlSerializationService.generateXMLResponse(request, response,\r\n\t\t\t\t\tuserList);\r\n\t\t}\r\n\t}", "public List<User> list() {\n\t\treturn userDao.list();\n\t}", "@Override\n\tpublic List<User> getList() {\n\t\treturn Lists.newArrayList(userRepository.findAll());\n\t}", "@RequestMapping(value = \"/users\", method = RequestMethod.GET)\n public ResponseEntity getUsers() {\n logger.debug(\"HTTP GET /users called\");\n List<User> userList = userService.getUsers(0.00, 4000.00);\n\n return new ResponseEntity(new UserResponse(userList), HttpStatus.OK);\n }", "public List<User> displayUsers() {\n\t\t\r\n\t\ttry {\r\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from com.niit.model.User\").list();\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@GetMapping(\"/users\")\n\tpublic List<User> getUsers(){\n\t\treturn userRepository.findAll();\n\t\t\n\t}", "@GetMapping(\"/users\")\n\tpublic ResponseEntity<List<User>> getUsers() {\n\t\tlog.debug(\"REST request to get all Users\");\n\t\treturn new ResponseEntity<List<User>>(userService.getAll(), HttpStatus.OK);\n\t}", "@GetMapping(\"/allusers\")\n\t@Secured({CommonConstants.ROLE_EMPLOYEE,CommonConstants.ROLE_ADMIN})\n\tpublic ResponseEntity<List<UserEntity>> fetchUsers(){\n\t\treturn new ResponseEntity<List<UserEntity>>(this.service.findAll(), HttpStatus.OK);\n\t}", "public List<User> listAll() throws Exception;", "public List<UserDTO> getUsers();", "com.heroiclabs.nakama.api.User getUsers(int index);", "public List<UsrMain> getListUsers() {\n return mobileCtrl.getListUsers();\n }", "@Override\r\n\tpublic void getAllUser() {\n\t\tSystem.out.println(users);\r\n\t\t\r\n\t}", "public List<String> listUsers() \n\t{\n\t\treturn this.userList.keys();\n\t\t\n\t}", "public static List<User> getUsersList(){\n\t\tWSResponse response = null;\n\t\tList<User> resultList = new ArrayList<User>();\n\t\ttry{\n\t\tPromise<WSResponse> result = WS.url(Utils.getApiUrl()+Urls.GET_USERS_URL)\n\t\t\t\t\t\t\t\t\t\t.setContentType(Urls.CONTENT_TYPE_JSON)\n\t\t\t\t\t\t\t\t\t\t.get();\n\t\tresponse = result.get(10000);\n\t\tGson gson = new Gson();\n\t\tUser[] users = gson.fromJson(response.getBody(), User[].class);\n\t\tfor(int i=0; i<users.length; i++){\n\t\t\tresultList.add(users[i]);\n\t\t}\n\t\t} catch(Exception exception){\n\t\t\tController.flash(Messages.ERROR, Messages.CANT_LOAD_USERS + exception);\n\t\t}\n\t\treturn resultList;\n\t}", "public List<User> list(String currentUsername);", "@RequestMapping(value = \"/users/list\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<UsersDTO> findAllUsers() {\n\t\tlogger.info(\"Return All Users.\");\t\n\t\treturn (List<UsersDTO>) usersService.findAllUsers();\n\t}", "Iterable<User> getAllUsers();", "@Override\n\tpublic List<Object> getAllUsers() {\n\t\tList<Object> usersList = new ArrayList<Object>();\n\t\tList<TestUser> users = dao.getAll();\n\t\tSystem.out.println(dao.exists(5));\n\t\tfor(TestUser user : users){\n\t\t\tMap<String,Object> m = new HashMap<String,Object>();\n\t\t\tm.put(\"id\", user.getId());\n\t\t\tm.put(\"name\", user.getUsername());\n\t\t\tm.put(\"pwd\", user.getPassword());\n\t\t\tJSONObject j = new JSONObject(m);\n\t\t\tusersList.add(j);\n\t\t}\n\t\treturn usersList;\n\t}", "@GetMapping(\"/\")\n\tpublic ResponseEntity<List<UsersDTO>> listAllusers(){\n\t\tList<UsersDTO> users = userJpaRepository.findAll();\n\t\tif(users.isEmpty()) {\n\t\t\treturn new ResponseEntity<List<UsersDTO>>(HttpStatus.NO_CONTENT);\n\t\t}\n\t\treturn new ResponseEntity<List<UsersDTO>>(users, HttpStatus.OK);\n\t}", "public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public List<TestUser> getAllUsers(){\n\t\tSystem.out.println(\"getting list of users..\");\n\t\tList<TestUser> user=new ArrayList<TestUser>();\n\t\tuserRepositary.findAll().forEach(user::add);\n\t\t//System.out.println(\"data: \"+userRepositary.FindById(\"ff80818163731aea0163731b190c0000\"));\n\t\treturn user;\n\t}", "@Override\n public List<User> selectAllUsers() {\n\n List<User> userList = new ArrayList<>();\n\n try (Connection connection = DriverManager.getConnection(URL, USERNAME, PASSWORD)) {\n\n String sql = \"SELECT * FROM ers_users\";\n\n PreparedStatement ps = connection.prepareStatement(sql);\n\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n userList.add(\n new User(\n rs.getInt(1)\n , rs.getString(2)\n , rs.getString(3)\n , rs.getString(4)\n , rs.getString(5)\n , rs.getString(6)\n , rs.getInt(7)\n )\n );\n }\n }\n\n catch (SQLException e) {\n\n e.printStackTrace();\n }\n\n return userList;\n }", "public ArrayList<User> list() {\n\t\tUserDao ua=new UserDao();\n\t\treturn ua.list();\n\t\t//System.out.println(\"haii\");\n\t\t \n\t}", "public List listUsers() {\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n List users = null;\n try {\n tx = session.beginTransaction();\n users = session.createQuery(\"FROM User\").list();\n for (Iterator iterator = users.iterator(); iterator.hasNext(); ) {\n User user = (User) iterator.next();\n System.out.print(\"id: \" + user.getId());\n System.out.print(\" Username: \" + user.getUsername());\n System.out.print(\" Password: \" + user.getPassword());\n System.out.println(\" Email: \" + user.getEmail());\n }\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return users;\n }", "public List<IUser> getUsers();", "public List<String> displayuser() {\n\t\t// TODO Auto-generated method stub\n\t\tList<String> list = new ArrayList<>();\n\t\tlist = crud1.displayUsers();\n\t\treturn list;\n\t}", "@Override\r\n\tpublic List<User> getAll() {\n\t\treturn users;\r\n\t}", "@GetMapping(\"/users\")\n\tpublic List<User> retrieveAllUsers() {\n\t\treturn userService.findAll();\n\t}", "public List<User> getAllUsers() {\n return users;\n }", "public List<User> getUsers()\n\t{\n\t\treturn usersList;\n\t}", "List<User> fetchAllUSers();", "public List<UserData> list() {\n\t\treturn userDAO.list();\r\n\t}", "public ArrayList<User> showUsers() throws SQLException {\n ArrayList<User> users = new ArrayList<>();\n PreparedStatement pr = connection.prepareStatement(Queries.showUserList);\n ResultSet result = pr.executeQuery();\n while (result.next()) {\n users.add(new User(\n result.getInt(\"id\"),\n result.getString(\"user_full_name\"),\n result.getString(\"email\"),\n result.getInt(\"phone\")));\n }\n pr.close();\n return users;\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<User> listUsers() {\n\t\treturn (List<User>) openSession().createCriteria(User.class).list();\n\t}", "public UserList list();", "@GetMapping\n public List<User> getAllUsers() {\n return userService.getAllUsers();\n }", "public List<User> userList() {\r\n\t\treturn DataDAO.getUserList();\r\n\r\n\t}", "@Override\r\n\tpublic List<User> getUsers() {\n\t\tList<User> userlist=dao.getUsers();\r\n\t\treturn userlist;\r\n\t}", "@Override\r\n\tpublic List<User> getUserList() throws MyUserException {\n\t\treturn userDao.getUserList();\r\n\t}", "private void getAllUsers(){\n\t\t\n\t\tSystem.out.println(\"Retrieving Social Graph Data from tibbr...\"); \n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\n\t\tString params = \"?sort=firstNameAsc&fields=name,jive.username,-resources&count=5000&startIndex=0\"; \n\t\tHttpGet getRequest = new HttpGet(urlBase+\"/api/core/v3/people/@all\"+params);\n\t\t\n\n\t\t\t \n\t\tgetRequest.setHeader(\"Authorization\", \"Basic \" + this.auth);\n\t\t\n\t\t\t\n\t\ttry {\n\t\t\tHttpResponse response = httpClient.execute(getRequest);\n\t\t\tString jsonOut = readStream(response.getEntity().getContent());\n\t\t // Remove throwline if present\n\t\t\tjsonOut = removeThrowLine(jsonOut);\n\t\t getAllUserElements(jsonOut);\n\t\t \n\t \n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public List<User> list();", "List<UserDisplayDto> getAllUsers();", "@GET\n\t@Path(\"/allUsers\")\n\t@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\tpublic Map<String, List<User>> getUser() throws JsonGenerationException, JsonMappingException, IOException {\n\t\t\n\t\tMap<String, List<User>> user = userDao.getUser();\n\t\t\n\t\treturn user; \n\t}", "public final void getUsersList() throws ServiceException {\r\n\t\tList<Bems> usersList = testReqmtService.getUsersList();\r\n\t\tList<SelectItem> userDetails= new ArrayList<SelectItem>();\r\n\t\t\r\n\t\tfor(Bems user:usersList) {\r\n\t\t\tStringBuilder name=new StringBuilder();\r\n\t\t\t name.append(user.getLastName().trim());\r\n\t\t\t name.append(\",\"+\" \");\r\n\t\t\t name.append(user.getFirstName().trim());\r\n\t\t\tif(CommonUtils.isStringNotEmpty(user.getMiddleName())){\r\n\t\t\t\tname.append(\" \");\r\n\t\t\t\tname.append(user.getMiddleName());\r\n\t\t\t}\r\n\t\t\tuserDetails.add(new SelectItem(user.getBemsID(), name.toString()));\r\n\t\t \r\n\t\t}\r\n\t\tuiTestReqEditModel.setUserList(userDetails);\r\n\t}", "public void ShowAllUsers()\r\n {\r\n userList.forEach((s) -> { System.out.println(s); });\r\n }", "public List<User> list() {\n\t\treturn null;\n\t}", "@GetMapping(value = URL)\n @ResponseBody\n public List<Users> listAll() {\n return usersService.listAll();\n }", "@RequestMapping(value = \"/user\", method = RequestMethod.GET)\n\t public ResponseEntity<List<Users>> listAllUsers() \n\t {\n\t List<Users> users = userService.findAllUsers();\n\t if(users.isEmpty())\n\t {\n\t return new ResponseEntity<List<Users>>(HttpStatus.NO_CONTENT);//You many decide to return HttpStatus.NOT_FOUND\n\t }\n\t else\n\t {\n\t \treturn new ResponseEntity<List<Users>>(users, HttpStatus.OK);\n\t }\n\t }", "public List<User> getUserList() {\n\t\treturn null;\n\t}", "@GetMapping\n public ResponseEntity<List<UserEntity>> getAllUsers() {\n return ResponseEntity.ok(uService.getAllUsers());\n }", "public void displayUsers(){\n //go through the userName arraylist and add them to the listView\n for(String val:this.userNames){\n this.userListView.getItems().add(val);\n }\n }", "public List<User> getAllUsers(){\n return userRepository.findAll();\n }", "@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}", "@Override\n\tpublic List<User> getUsers() {\n\t\treturn mongoTemplate.findAll(User.class);\n\t}", "@GetMapping(\"/users\")\n @PreAuthorize(\"hasRole('Admin')\")\n public SuccessResponse<List<UserResponse>> getUsers() {\n if(!connectionService.isReachable()) {\n String exceptionMessage = \"Cannot connect to database.\";\n System.out.println(exceptionMessage);\n throw new DatabaseException(exceptionMessage);\n }\n\n final var users = userService\n .findAllUsers()\n .stream()\n .map(UserResponse::fromUser)\n .collect(Collectors.toList());\n return new SuccessResponse<>(users);\n }", "public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }", "public String getAllUsers() {\n\t\tString s = \"\";\n\t\tSet<String> ids = usersList.keySet();\n\t\tfor (String userId : ids) {\n\t\t\ts += \"<b>UserId :</b> \" + userId + \"&nbsp<b> UserName : </b>\" + usersList.get(userId).getName()\n\t\t\t\t\t+ \"<b>&nbsp Profession :</b> \" + usersList.get(userId).getProfession() + \"<br><br>\";\n\t\t}\n\t\treturn s;\n\n\t}", "@GetMapping(path=\"/all\")\n\tpublic @ResponseBody Iterable<User> getAllUsers() {\n\t\t// This returns a JSON or XML with the users\n\t\treturn userRepository.findAll();\n\t}", "public ArrayList<IndividualUser> listAllUsers() {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT id, userName, firstName, lastName FROM Users \");\n s.execute();\n ResultSet results = s.getResultSet();\n ArrayList<IndividualUser> users = new ArrayList<>();\n if (!results.isBeforeFirst()) {\n results.close();\n s.close();\n return users;\n }\n\n while (!results.isLast()) {\n results.next();\n IndividualUser u = new IndividualUser(results.getInt(1), results.getString(2), results.getString(3), results.getString(4));\n\n users.add(u);\n\n }\n\n results.close();\n s.close();\n\n return users;\n } catch (SQLException e) {\n sqlException(e);\n return null;\n }\n }" ]
[ "0.8452262", "0.8244395", "0.8143262", "0.8140755", "0.81313217", "0.81313217", "0.8078451", "0.806356", "0.80294806", "0.80030954", "0.79609174", "0.7931783", "0.79007316", "0.7896246", "0.78859895", "0.7867122", "0.7865843", "0.7854606", "0.78468823", "0.78468823", "0.7836992", "0.78325367", "0.7805062", "0.77863014", "0.77839136", "0.7768277", "0.7764608", "0.7745031", "0.7741551", "0.7727466", "0.77250576", "0.7720072", "0.77149385", "0.7686322", "0.76711386", "0.76604074", "0.7658458", "0.7632454", "0.7627114", "0.7622743", "0.7614375", "0.76127964", "0.7602303", "0.7599634", "0.7590384", "0.7587231", "0.75764537", "0.7568704", "0.75643665", "0.7539984", "0.7537344", "0.7513524", "0.7499184", "0.748386", "0.74790037", "0.74759287", "0.7464027", "0.7462464", "0.7459212", "0.7457698", "0.745702", "0.74550056", "0.74543226", "0.74505174", "0.744761", "0.7446459", "0.7443193", "0.7441787", "0.7440405", "0.74349046", "0.74338573", "0.7428335", "0.74231005", "0.7418318", "0.7416034", "0.74122757", "0.7408865", "0.7408478", "0.74007064", "0.73975503", "0.7395569", "0.7394931", "0.73911333", "0.73876107", "0.73786503", "0.7376183", "0.7359046", "0.7355254", "0.7354227", "0.7348795", "0.733835", "0.7325336", "0.7308383", "0.7304839", "0.7292653", "0.7289195", "0.72869104", "0.7284704", "0.72825694", "0.7278802", "0.7274318" ]
0.0
-1
This method returns the principal[username] of loggedin user.
private String getPrincipalUsername() { String userName = null; Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal(); if (principal instanceof UserDetails) { userName = ((UserDetails) principal).getUsername(); } else { userName = principal.toString(); } return userName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getLoggedInUser() {\r\n\t\tOptional<Authentication> authentication = Optional\r\n\t\t\t\t.ofNullable(SecurityContextHolder.getContext().getAuthentication());\r\n\t\treturn authentication.map(Authentication::getPrincipal).map(obj -> (UserDetails) obj)\r\n\t\t\t\t.map(UserDetails::getUsername).orElse(null);\r\n\t}", "private String getLoggedUser() {\n\t\torg.springframework.security.core.userdetails.User user2 = \n\t\t\t\t(org.springframework.security.core.userdetails.User) \n\t\t\t\tSecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\tString name = user2.getUsername();\n\t\treturn name;\n\t}", "private String getPrincipal() {\n\t\tString userName = null;\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\n\t\tif (principal instanceof UserDetails) {\n\t\t\tuserName = ((UserDetails) principal).getUsername();\n\t\t} else {\n\t\t\tuserName = principal.toString();\n\t\t}\n\t\treturn userName;\n\t}", "private String getPrincipal() {\r\n\t\tString userName = null;\r\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n\r\n\t\tif (principal instanceof UserDetails) {\r\n\t\t\tuserName = ((UserDetails) principal).getUsername();\r\n\t\t} else {\r\n\t\t\tuserName = principal.toString();\r\n\t\t}\r\n\t\treturn userName;\r\n\t}", "private String getPrincipal(){\n String userName = null;\n Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\n if (principal instanceof UserDetails) {\n userName = ((UserDetails)principal).getUsername();\n } else {\n userName = principal.toString();\n }\n return userName;\n }", "private String getPrincipal(){\n String userName = null;\n Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\n if (principal instanceof UserDetails) {\n userName = ((UserDetails)principal).getUsername();\n } else {\n userName = principal.toString();\n }\n return userName;\n }", "public String getCurrentUserUsername(){\n Subject subject = org.apache.shiro.SecurityUtils.getSubject();\n if(subject!=null){\n return subject.getPrincipal().toString();\n }else{\n return \"User\";\n }\n }", "public static String getLoggedUser() {\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\treturn auth.getName();\n\t}", "public String getUserName() {\n return sessionData.getUserName();\n }", "java.lang.String getUserName();", "java.lang.String getUserName();", "java.lang.String getUserName();", "private String getLoggedInUserName() {\n try {\n /*\n * Get the user information.\n */\n String userName = ServerUtilities.getServerUserInfo().getName();\n\n if(userName.isEmpty()) {\n return new String(\"Anonymous User\");\n }\n return userName;\n } catch (Exception ignore) {\n }\n\n return new String(\"Anonymous User\");\n }", "@Override\r\n\tpublic String getCurrentUserName() {\r\n\t\tString currentUserName = SecurityContextHolder.getContext().getAuthentication().getName();\r\n\t\treturn currentUserName;\r\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn user.getUsername();\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn user.getUserName();\n\t}", "public String getCurrentUserName() {\n\t\treturn currentUser.getName();\n\t}", "public static String getUserName() {\r\n\t\tHttpSession session = (HttpSession) FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getSession(false);\r\n\t\treturn session.getAttribute(\"username\").toString();\r\n\t}", "public static String getUserName() {\r\n\t\tHttpSession session = (HttpSession) FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getSession(false);\r\n\t\treturn session.getAttribute(\"username\").toString();\r\n\t}", "@Override\n\tpublic String getUsername(Context ctx){\n\t\treturn ctx.session().get(\"username\");\n\t}", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "@Override\n\tpublic String getUserName() {\n\t\treturn model.getUserName();\n\t}", "@Override\n\tpublic String getUserName() {\n\t\treturn model.getUserName();\n\t}", "public String getUserName() {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\treturn sharedPreferences.getString(\"USERNAME\", null);\n\t}", "public String getLoggedInUser() {\n\t\treturn null;\r\n\t}", "public final String getUser() {\n return username;\n }", "public String getCurrentUser() {\r\n return SecurityContextHolder.getContext().getAuthentication().getName();\r\n }", "public String getUserName() {\n\t\treturn this.username;\r\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn getInnerObject().getUsername();\n\t}", "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}", "@Override\n public java.lang.String getUserName() {\n return _partido.getUserName();\n }", "public final String getUsername() {\n return properties.get(USERNAME_PROPERTY);\n }", "public String getUserName();", "public String getUser() {\r\n \t\treturn properties.getProperty(KEY_USER);\r\n \t}", "public String getUserName()\n\t{\n\t\treturn this.userName;\n\t}", "String getUserName();", "String getUserName();", "public String getUser() {\r\n\t\treturn _userName;\r\n\t}", "private User getCurrentUser() {\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n String username = auth.getName();\n return userService.findByUsername(username);\n }", "public String getUserName() {\n return order.getUser().getUsername();\n }", "public String getIdentityLogin()\r\n {\r\n return securityService.findLoggedInUsername();\r\n }", "public String getUserName() {\n\t\treturn this.userName;\n\t}", "public String getUserName() {\n if (passCred != null)\n return passCred.getUserName();\n else\n return null;\n }", "public String getUserName() {\n\t\treturn _userName;\n\t}", "private String getUserData() { \n\t\t \n\t\tString userName;\n\t\tObject principial = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\t\n\t\tif(principial instanceof UserDetails) {\n\t\t\tuserName = ((UserDetails) principial).getUsername();\n\t\t} else {\n\t\t\tuserName = principial.toString(); \n\t\t}\n\t\treturn userName; \n\t}", "@Override\n public String getUserName() throws ResourceException {\n return session.getUserID();\n }", "public String getUserName() {\r\n\t\treturn userName;\r\n\t}", "public String getUserName() {\r\n\t\treturn userName;\r\n\t}", "public String getUserName() {\r\n\t\treturn userName;\r\n\t}", "public String getUserName() {\r\n\t\treturn userName;\r\n\t}", "public String getUsername() {\n\t\treturn userName;\n\t}", "public java.lang.String getUserName() {\n return userName;\n }", "String getUserName() {\r\n\t\t\treturn username;\r\n\t\t}", "public java.lang.String getUserName() {\r\n return userName;\r\n }", "@Override\n\tpublic String getUserName() {\n\t\treturn super.getUserName();\n\t}", "@Override\n\tpublic String getUserName() {\n\t\treturn super.getUserName();\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n return this.userName;\n }", "public String getUserName() {\n return this.userName;\n }", "public String getUserName() {\n return this.userName;\n }", "public String getUsername() {\n return username.get();\n }", "public User findCurrentUser() {\n String username = SecurityContextHolder.getContext().getAuthentication().getName();\n return userRepository.findByUsername(username);\n }", "public String getUserName(){\n\t\treturn this.userName;\n\t}", "public static String getCurrentUsername() {\n WorkflowUserManager workflowUserManager = (WorkflowUserManager) appContext.getBean(\"workflowUserManager\");\n String username = workflowUserManager.getCurrentUsername();\n return username;\n }", "public static String getUserName() {\n\t\treturn readTestData.getkeyData(\"SignUpDetails\", \"Key\", \"Value\", \"userName\");\n\t}", "User getCurrentLoggedInUser();", "public String getUserName() {\n return (String) getAttributeInternal(USERNAME);\n }", "public String getUserName() {\n\t\t\treturn userName;\n\t\t}", "public String getUserName() {\r\n return userName;\r\n }", "public String getUserName() {\r\n return userName;\r\n }", "public String getUserName() {\r\n return userName;\r\n }", "public String getUserName() {\r\n return userName;\r\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }" ]
[ "0.84020764", "0.8060298", "0.78875875", "0.78805643", "0.7861864", "0.7861864", "0.78321004", "0.77344525", "0.76552945", "0.7597622", "0.7597622", "0.7597622", "0.75251454", "0.75157315", "0.74404204", "0.74327993", "0.7395367", "0.7350218", "0.7350218", "0.7333999", "0.7306805", "0.7306805", "0.7306805", "0.7306805", "0.7306805", "0.7306805", "0.7306805", "0.7306805", "0.7306805", "0.7231182", "0.7231182", "0.7219469", "0.7214017", "0.7200618", "0.7196046", "0.7164391", "0.71539253", "0.7151352", "0.71346796", "0.71290594", "0.712384", "0.7106515", "0.710391", "0.7099003", "0.7099003", "0.70847076", "0.7080115", "0.70751333", "0.706546", "0.7060758", "0.69995034", "0.69988453", "0.69921964", "0.69919574", "0.69912183", "0.69912183", "0.69912183", "0.69912183", "0.69903415", "0.6986818", "0.6985415", "0.6972777", "0.69675624", "0.69675624", "0.6952308", "0.6952308", "0.6952308", "0.6952308", "0.6952308", "0.6952308", "0.6952308", "0.6952308", "0.6952308", "0.6952308", "0.69438267", "0.69438267", "0.69438267", "0.6941092", "0.6941039", "0.6939348", "0.6928949", "0.6928611", "0.6916173", "0.69153297", "0.69011563", "0.6893937", "0.6893937", "0.6893937", "0.6893937", "0.6875422", "0.6875422", "0.6875422", "0.6875422", "0.6875422", "0.6875422", "0.6875422", "0.6875422", "0.6875422", "0.6875422", "0.6875422" ]
0.80868
1
String response = orientDBConnection.testAutowiring();
@RequestMapping("/orient") public String callOrientTest() { String response = ""; for (Vertex v : orientDBConnection.getGraph().query().has("Nome", "Tommaso").vertices()) { System.out.println("Selected node: " + v.getProperty("Nome") + v.getProperty("Cognome")); response += v.getProperty("Cognome") + "\n"; } for (Vertex v : orientDBConnection.getGraph().query().has("Cap", 61032).vertices()) { System.out.println("Selected node: " + v.getProperty("Via") + v.getProperty("Provincia")); response += v.getProperty("Via") + "\n"; } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testGetConnection() {\r\n \r\n }", "@Before\n \tpublic void init() throws SimpleDBException {\n assertNotNull(applicationContext);\n handlerAdapter = applicationContext.getBean(\"handlerAdapter\", HandlerAdapter.class);\n this.testClient = this.createTestClient();\n \t\trefreshRequestAndResponse();\n \t}", "@Test\n public void testGetConnection() {\n System.out.println(\"getConnection\");\n Connection result = instance.getConnection();\n assertTrue(result!=null);\n \n }", "@Test\n public void testQuery(){\n }", "@Test\n public void queryTest() {\n // TODO: test query\n }", "@Test\n public void testConfig() {\n DatabaseClientConfig config = getApplicationContext().getBean(DatabaseClientConfig.class);\n assertEquals(\"localhost\", config.getHost());\n assertEquals(8101, config.getPort());\n }", "@Override\n\t@Transactional(propagation=Propagation.REQUIRED)\n\tpublic String test() {\n\t\n\t\treturn \"Spring-Jersey Integration\";\n\t}", "@Test\n public void testBeans(){\n Assert.assertNotNull(countryDao);\n }", "@BeforeClass\n public static void setup() {\n getDatabase(\"mandarin\");\n }", "@Before\r\n public void setup() {\r\n dbwMock.userId = \"testUser\";\r\n dbw = new DatabaseWrapper(dbwMock);\r\n\r\n context = ApplicationProvider.getApplicationContext();\r\n\r\n book = new Book();\r\n\r\n requester = new Profile();\r\n }", "@Before\n\tpublic void setUp() throws Exception {\n//\t\tdao = new MonkeyDao();\n\t}", "@Test\n\tpublic void testGetConnection() throws SQLException\n\t{\n\t\tassertTrue(DatabaseGateway.getConnection() != null);\n\t}", "@Test(timeout = 100)\n public void testAccessToDB() {\n System.out.println(\"Starting DB access test\");\n }", "@Test\n public void testGetterSetterConnection() {\n UserDao userDao = new UserDao();\n userDao.setDatabaseConnection(connection);\n assertEquals(connection, userDao.getDatabaseConnection());\n }", "@BeforeClass\n\tpublic static void init() {\n\t\tcontext = new AnnotationConfigApplicationContext();\n\t\tcontext.scan(\"com.shuler.shoppingbackend\");\n\t\tcontext.refresh();\n\t\tcategoryDAO = (CategoryDAO) context.getBean(\"categoryDAO\");\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\r\n\t\toCont = new OperatorDAO();\r\n\t}", "@Test\n public void shouldConnectToDB()\n {\n assertTrue(DatabaseHelper.checkConnection());\n }", "@BeforeClass\n public static void initTestClass() throws Exception {\n Map props = MapUtil.mapIt(\"hibernate.connection.url\", \"jdbc:mysql://localhost:3306/event_test\");\n SnowTestSupportNG.initWebApplication(\"src/main/webapp\", props);\n\n inView = appInjector.getInstance(HibernateSessionInViewHandler.class);\n categoryDao = appInjector.getInstance(CategoryDao.class);\n }", "@BeforeClass\n public static void connectionBeforeClass() {\n String host = \"localhost\";\n String dbname = \"atm\";\n String username = \"root\";\n String password = \"Kinoshka12\";\n\n try (JDBConnector connector = new ConnectorMariaDb(host, dbname, username, password)) {\n BankRepository bankService = new BankRepository(connector);\n connector.getConnection();\n UserRepository repoUser = new UserRepository(connector);\n IAccountRepository repoAccount = new AccountRepository(connector);\n IBank bank = new Bank(10, \"leumi\");\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testConstructorConnection() {\n assertEquals(connection, dao.getDatabaseConnection());\n }", "@BeforeEach\n void setUp() {\n Configuration configuration = new Configuration();\n configuration.addAnnotatedClass(SitterController.class);\n configuration.setProperty(\"hibernate.dialect\", \"org.hibernate.dialect.H2Dialect\");\n configuration.setProperty(\"hibernate.connection.driver_class\", \"org.h2.Driver\");\n String urlConfigValue = \"jdbc:h2:mem:test;\";\n String urlConfigMode = \"MODE=Mysql;\";\n String urlConfigInit = \"INIT=CREATE SCHEMA IF NOT EXISTS ROVERREVIEWS\";\n String urlConfigs = urlConfigValue + urlConfigMode + urlConfigInit;\n configuration.setProperty(\"hibernate.connection.url\", urlConfigs);\n configuration.setProperty(\"hibernate.hbm2ddl.auto\", \"create\");\n configuration.addAnnotatedClass(Sitter.class);\n sessionFactory = configuration.buildSessionFactory();\n session = sessionFactory.openSession();\n }", "protected void setUp() throws Exception {\r\n\t\tmodelDS = new ServiceModelDS(\"dbtest\",\"pizzeria_service\");\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://localhost/dbtest\", \"root\", \"\");\r\n\t\tconnection.setAutoCommit(false);\r\n\t}", "@Test\n\tpublic void testGetDbInstance(){\n\t\tConnection c = DatabaseConnect.getInstance();\n\t\tassertTrue(c != null);\t\n\t}", "@Before\n\tpublic void setUp() {\n\t\tgateInfoDatabase = new GateInfoDatabase();\t\t\n\t}", "@Before\r\n\tpublic void setUp() throws SQLException {\n\t\tconn = DBManager.getInstance().getConnection();\r\n\t}", "@Test\n public void contextLoads() {\n System.out.println(userMapper.selectUserByName(\"hh\").toString());\n\n }", "@Test\n void findClientById() {\n }", "@Before\n public void setUp(){\n Cic.populate();\n }", "@Test\n public void contexLoads() throws Exception\n {\n assertThat(einheitentypRepository).isNotNull();\n }", "@Test\r\n\tpublic void client() {\n\t}", "@Override\r\n\tprotected void setUp() throws Exception {\n\t\tsuper.setUp();\r\n\t\timpl=new ProductDAOImpl();\r\n\t}", "@Test\n public void testInitialize() {\n \n \n }", "@Test\n public void isAutoRepoEnabledTest(){\n reportSettingsPresenter.isAutoRepoEnabled();\n\n verify(databaseInitializer, Mockito.times(1));\n DatabaseInitializer.isAutoRepoEnabled(appDatabase);\n }", "@BeforeTest\n public void setUp() {\n UrlaubrWsUtils.migrateDatabase(TravelServiceImpl.DEFAULT_URL, TravelServiceImpl.DEFAULT_USER, TravelServiceImpl.DEFAULT_PASSWORD);\n\n service = new TravelServiceImpl();\n }", "@Before\r\n public void setUp() throws Exception {\r\n super.setUp();\r\n\r\n connection = getConnection();\r\n\r\n configurationObject = TestsHelper.getConfig(TestsHelper.CONFIG_PROJECT_TERMS);\r\n\r\n instance = new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }", "@Test\n void migrate() {\n }", "@BeforeEach\n void setUp() {\n\n\n // repopulate the table I'm testing\n com.lukebusch.test.util.Database database = com.lukebusch.test.util.Database.getInstance();\n database.runSQL(\"cleandb.sql\");\n\n genericDao = new GenericDao( User.class );\n\n }", "@Test\n public void testNotNull(){\n\n AccountService accountService = applicationContext.getBean(AccountService.class);\n assertNotNull(accountService);\n assertNotNull(((JdbcAccountService)accountService).getAccountRepsotiry());\n assertNotNull(((JdbcAccountRepository)((JdbcAccountService)accountService).getAccountRepsotiry()).getDataSource());\n\n\n }", "@Before\n public void setUp() throws Exception {\n\n }", "@BeforeEach\n void setUp() {\n dao = new GenericDao(User.class);\n Database database = Database.getInstance();\n database.runSQL(\"cleandb.sql\");\n }", "public void testDbCommand() throws Exception{\n\t}", "@Before\n\tpublic void setup() {\n\t\tdatabase = new DatabaseLogic();\n\t}", "@Test\n void getAllSuccess() {\n List<User> Users = dao.getAll();\n assertEquals(2, Users.size());\n }", "@Before\n public void setUp() throws Exception {\n\n }", "@Test\n public void test() throws SQLException {\n System.out.println(new MyDbutilsDemo().load(12));\n }", "@Test\n public void testConnectToDb() {\n System.out.println(\"connectToDb\");\n ClienteDAO instance = new ClienteDAO();\n instance.connectToDb();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\t@DatabaseSetup(value = \"classpath:databaseEntries.xml\", type = DatabaseOperation.CLEAN_INSERT)\n\tpublic void testGetLecturer(){\n\t\t\n\t\t//Expected Name and Surname\n\t\tString expectedLecturerName= \"John\";\n\t\tString expectedLecturerSurname= \"Murphy\";\n\t\t\n\t\t//Test Expected vs Actual(Name and Surname)\n\t\tlecturerJdbcDaoSupport = (LecturerJdbcDaoSupport) autoWireContext.getBean(\"lecturerJdbcDaoSupport\");\n\t\tLecturer actualLecturer= lecturerJdbcDaoSupport.getLecturer(\"L002\");\n\t\tString actualLecturerName= actualLecturer.getFirstName();\n\t\tString actualLecturerSurname= actualLecturer.getLastName();\n\t\tassertEquals(expectedLecturerName, actualLecturerName);\n\t\tassertEquals(expectedLecturerSurname, actualLecturerSurname);\n\t}", "@Test\r\n void testUserImplementation() {\r\n bindUser();\r\n testService.userImplementation();\r\n }", "@Before\n public void setUp() throws Exception{\n }", "@Test\npublic void testGetDtoBySql() throws Exception { \n//TODO: Test goes here... \n}", "@Test\n public void testInit() {\n SpringRegistry.init();\n assertNotNull(SpringRegistry.getBusinessProxy());\n assertNotNull(SpringRegistry.getTransactionManager());\n }", "@Test\n public void registerUserUnit() {\n Context appContext = InstrumentationRegistry.getTargetContext();\n LocalDbAdapter.init(appContext);\n UserRepository userRepository = new UserRepositoryImpl();\n PostRepository postRepository = new PostRepositoryImpl();\n UserService userService = new UserServiceImpl(userRepository, postRepository);\n User user = new User(\"kevin monteclar\", \"kevin\", \"kevin\", \"kevin@gmail.com\");\n String expectedUsername = \"kevin\";\n userService.register(user);\n user = userRepository.getUserByUsername(\"kevin\");\n Assert.assertEquals(\"Register successful\", expectedUsername, user.getUsername());\n System.out.println(user.getName());\n }", "public interface TestDao {\n\n List query();\n\n}", "@Test\r\n public void testIniciar() {\r\n }", "@Test\n public void testGetUserById(){\n User user = userMapper.getUserById(2);\n System.out.println(user);\n MybatisUtil.closeSession();\n }", "@Before\n public void setup() {\n rest = new RestTemplate();\n jdbc = new JdbcTemplate(dataSource);\n playlists = jdbc.query(\"SELECT * FROM \\\"Playlist\\\";\", playlistMapper);\n }", "public OnibusDAO() {}", "@Test\r\n\tpublic void testConnectionAdded() throws Exception {\n\t}", "@Test\npublic void testFindDtoListByHql() throws Exception { \n//TODO: Test goes here... \n}", "@BeforeEach\n void setUp() {\n\n Database database = Database.getInstance();\n database.runSQL(\"cleandb.sql\");\n\n genericDao = new GenericDao(Event.class);\n }", "@Test\n\tvoid contextLoads() throws SQLException {\n\t\tSystem.out.println(resultadoDao.getConf_evaluacion(1));\n\n\t}", "@Before\n public void setUp () {\n }", "@BeforeEach\n void init() {\n\n EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"pu\");\n employeeDao = new EmployeeDao(entityManagerFactory);\n\n\n }", "@Before\n public void setUp() throws Exception {\n userDao = DatabaseAccess.createOracleDatabase().createUserDaoOperator();\n }", "@Test\r\n public void testGGetContratistas() {\r\n System.out.println(\"getContratistas\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> result = instance.getContratistas();\r\n \r\n assertFalse(result.isEmpty());\r\n }", "@Test\n public void testStartup() {}", "@Test\n void getAllCarsSuccess() {\n List<Car> cars = carDao.getAll();\n assertNotNull(cars);\n assertEquals(1, cars.size());\n }", "@Test\n void getAllSuccess(){\n\n List<CompositionInstrument> compositionInstruments = genericDao.getAll();\n assertEquals(4, compositionInstruments.size());\n }", "@Test\n public void testGetPersonsCount() {\n assertEquals(2, facade.getPersonCount(), \"Expects two rows in the database\");\n }", "@Before\n public void setUp() {\n DB.sql2o = new Sql2o(\"jdbc:postgresql://localhost:5432/hair_salon_test\", \"alexander\", \"1234\");\n }", "@Test\n public void testIsConnected() throws MainException {\n System.out.println(\"isConnected\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n boolean expResult = true;\n boolean result = instance.isConnected();\n assertEquals(expResult, result);\n instance.disconnect();\n result = instance.isConnected();\n assertEquals(false, result);\n\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() throws Exception {\n }", "@Before\n public void setUp() throws Exception {\n }", "@Test\n void contextLoads() {\n HotelNoteVO hotelNoteVO = hotelMapper.getSingleHotelCheckInNote(1,1);\n System.out.println(hotelMapper.getSingleHotelCheckInNote(1,1));\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void init(){\n }", "@BeforeClass\n public static void setUpBeforeClass() throws Exception {\n dbService = DatabaseServiceFactory.getInstance();\n }", "@Test\npublic void testCreateQueryForClazzHql() throws Exception { \n//TODO: Test goes here... \n}", "@Test\r\n public void UserServiceTest_RetrievePresenter()\r\n {\r\n UserService service = new UserService(); \r\n List<User> users = null;\r\n try {\r\n users = service.getPresenterList();\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n } \r\n }", "@Test\n public void testValidate()throws Exception {\n System.out.println(\"validate\");\n String query = \"select * from librarian where name=? and password=?\";\n String name = \"Fahim\";\n String password = \"1234\";\n boolean expResult = false;\n //when(mockDb.getConnection()).thenReturn(mockConn);\n when(mockConn.prepareStatement(query)).thenReturn(mockPs);\n when(mockPs.executeQuery()).thenReturn(mockRs);\n when(mockRs.next()).thenReturn(true);\n boolean result = mockLibrarian.validate(name, password);\n assertEquals(result,true);\n \n }", "@Before\n public void setUp() {\n }", "@BeforeAll\n public static void setUpClass() {\n emf = EMF_Creator.createEntityManagerFactoryForTest();\n\n //Set System property so the project executed by the Grizly-server wil use this same database\n EMF_Creator.startREST_TestWithDB();\n \n httpServer = startServer();\n\n //Setup RestAssured\n RestAssured.baseURI = SERVER_URL;\n RestAssured.port = SERVER_PORT;\n\n RestAssured.defaultParser = Parser.JSON;\n }", "@Test\r\n public void UserServiceTest_Retrieve()\r\n {\r\n UserService service = new UserService(); \r\n List<User> users = null;\r\n try {\r\n users = service.getUserList();\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n } \r\n }", "@Test\n void getAllSuccess() {\n // get all the users\n // make sure there are the proper number of users\n List<User> users = genericDao.getAll();\n assertEquals(users.size(), 4);\n }", "@BeforeClass\n\tpublic static void prepare() {\n\t\t final ApplicationContext ctx = new\n\t\t ClassPathXmlApplicationContext(\"file:src/main/webapp/WEB-INF/employee-servlet.xml\");\n\t\temployeeDAO = ctx.getBean(\"employeeDAO\", EmployeeDAO.class);\n\t}", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }" ]
[ "0.6512063", "0.63930434", "0.63833517", "0.620061", "0.6190383", "0.60769916", "0.60451186", "0.6018122", "0.6004816", "0.5955158", "0.5922788", "0.5920269", "0.59110427", "0.5908343", "0.58916825", "0.5877841", "0.5877169", "0.5864659", "0.5863555", "0.5862948", "0.58338624", "0.583025", "0.58172005", "0.58151275", "0.5811698", "0.58005047", "0.57976025", "0.5790951", "0.578707", "0.57723033", "0.5769712", "0.5769327", "0.5766129", "0.57584953", "0.5747905", "0.57420146", "0.57291156", "0.5725736", "0.5721947", "0.5721021", "0.57121176", "0.56986445", "0.56963414", "0.5688466", "0.5676607", "0.56730217", "0.5672175", "0.5663701", "0.5660396", "0.5655479", "0.5651389", "0.5650709", "0.56319994", "0.56278974", "0.5626489", "0.56217504", "0.5621199", "0.56187284", "0.5613987", "0.56121016", "0.5611047", "0.5597665", "0.5594608", "0.559402", "0.5587884", "0.55870205", "0.5585855", "0.5584365", "0.5579316", "0.55785316", "0.55771637", "0.5575863", "0.5570781", "0.5570781", "0.55661803", "0.5565841", "0.5565841", "0.5565841", "0.5565841", "0.5565841", "0.5562926", "0.5561081", "0.55608106", "0.55579156", "0.5555211", "0.55521274", "0.5551552", "0.55503744", "0.55463654", "0.5540689", "0.55370766", "0.55370766", "0.55370766", "0.55370766", "0.55370766", "0.55370766", "0.55370766", "0.55370766", "0.55370766", "0.55370766", "0.55370766" ]
0.0
-1
/ TODO: How can we ensure that stream lambda parameters are the proper type without having to provide the tag class in the method call?
@SuppressWarnings("unchecked") public <T extends Tag> Stream<T> stream(@SuppressWarnings("UnusedParameters") Class<T> tagClass) { return (Stream<T>) data.stream(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@CompileStatic\npublic interface Stream<T> {\n\n /**\n * Remap the stream.\n *\n * @param <X> type parameter\n * @param mapper mapper returning iterable of values to be flattened into output\n * @return the remapped stream\n */\n default <X> Stream<X> flatMap(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Iterable<X>> mapper) {\n\n return flatMap(null, mapper);\n }\n\n /**\n * Remap the stream.\n *\n * @param <X> type parameter\n * @param name name of the operation\n * @param mapper mapper returning iterable of values to be flattened into output\n * @return the remapped stream\n */\n <X> Stream<X> flatMap(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Iterable<X>> mapper);\n\n /**\n * Remap the stream.\n *\n * @param <X> type parameter\n * @param mapper the mapping closure\n * @return remapped stream\n */\n default <X> Stream<X> map(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<X> mapper) {\n\n return map(null, mapper);\n }\n\n /**\n * Remap the stream.\n *\n * @param <X> type parameter\n * @param name stable name of the mapping operator\n * @param mapper the mapping closure\n * @return remapped stream\n */\n <X> Stream<X> map(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<X> mapper);\n\n /**\n * Filter stream based on predicate\n *\n * @param predicate the predicate to filter on\n * @return filtered stream\n */\n default Stream<T> filter(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate) {\n\n return filter(null, predicate);\n }\n\n /**\n * Filter stream based on predicate\n *\n * @param name name of the filter operator\n * @param predicate the predicate to filter on\n * @return filtered stream\n */\n Stream<T> filter(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate);\n\n /**\n * Assign event time to elements.\n *\n * @param assigner assigner of event time\n * @return stream with elements assigned event time\n */\n default Stream<T> assignEventTime(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Long> assigner) {\n\n return assignEventTime(null, assigner);\n }\n\n /**\n * Assign event time to elements.\n *\n * @param name name of the assign event time operator\n * @param assigner assigner of event time\n * @return stream with elements assigned event time\n */\n Stream<T> assignEventTime(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Long> assigner);\n\n /**\n * Add window to each element in the stream.\n *\n * @return stream of pairs with window\n */\n default Stream<Pair<Object, T>> withWindow() {\n return withWindow(null);\n }\n\n /**\n * Add window to each element in the stream.\n *\n * @param name stable name of the mapping operator\n * @return stream of pairs with window\n */\n Stream<Pair<Object, T>> withWindow(@Nullable String name);\n\n /**\n * Add timestamp to each element in the stream.\n *\n * @return stream of pairs with timestamp\n */\n default Stream<Pair<T, Long>> withTimestamp() {\n return withTimestamp(null);\n }\n\n /**\n * Add timestamp to each element in the stream.\n *\n * @param name stable name of mapping operator\n * @return stream of pairs with timestamp\n */\n Stream<Pair<T, Long>> withTimestamp(@Nullable String name);\n\n /** Print all elements to console. */\n void print();\n\n /**\n * Collect stream as list. Note that this will result on OOME if this is unbounded stream.\n *\n * @return the stream collected as list.\n */\n List<T> collect();\n\n /**\n * Test if this is bounded stream.\n *\n * @return {@code true} if this is bounded stream, {@code false} otherwise\n */\n boolean isBounded();\n\n /**\n * Process this stream as it was unbounded stream.\n *\n * <p>This is a no-op if {@link #isBounded} returns {@code false}, otherwise it turns the stream\n * into being processed as unbounded, although being bounded.\n *\n * <p>This is an optional operation and might be ignored if not supported by underlying\n * implementation.\n *\n * @return Stream viewed as unbounded stream, if supported\n */\n default Stream<T> asUnbounded() {\n return this;\n }\n\n /**\n * Convert elements to {@link StreamElement}s.\n *\n * @param <V> type of value\n * @param repoProvider provider of {@link Repository}\n * @param entity the entity of elements\n * @param keyExtractor extractor of keys\n * @param attributeExtractor extractor of attributes\n * @param valueExtractor extractor of values\n * @param timeExtractor extractor of time\n * @return stream with {@link StreamElement}s inside\n */\n <V> Stream<StreamElement> asStreamElements(\n RepositoryProvider repoProvider,\n EntityDescriptor entity,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<CharSequence> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\")\n Closure<CharSequence> attributeExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Long> timeExtractor);\n\n /**\n * Persist this stream to replication.\n *\n * @param repoProvider provider of {@link Repository}.\n * @param replicationName name of replication to persist stream to\n * @param target target of the replication\n */\n void persistIntoTargetReplica(\n RepositoryProvider repoProvider, String replicationName, String target);\n\n /**\n * Persist this stream to specific family.\n *\n * <p>Note that the type of the stream has to be already {@link StreamElement StreamElements} to\n * be persisted to the specified family. The family has to accept given {@link\n * AttributeDescriptor} of the {@link StreamElement}.\n *\n * @param repoProvider provider of {@link Repository}.\n * @param targetFamilyname name of target family to persist the stream into\n */\n default void persistIntoTargetFamily(RepositoryProvider repoProvider, String targetFamilyname) {\n persistIntoTargetFamily(repoProvider, targetFamilyname, 10);\n }\n\n /**\n * Persist this stream to specific family.\n *\n * <p>Note that the type of the stream has to be already {@link StreamElement StreamElements} to\n * be persisted to the specified family. The family has to accept given {@link\n * AttributeDescriptor} of the {@link StreamElement}.\n *\n * @param repoProvider provider of {@link Repository}.\n * @param targetFamilyname name of target family to persist the stream into\n * @param parallelism parallelism to use when target family is bulk attribute family\n */\n void persistIntoTargetFamily(\n RepositoryProvider repoProvider, String targetFamilyname, int parallelism);\n\n /**\n * Persist this stream as attribute of entity\n *\n * @param <V> type of value extracted\n * @param repoProvider provider of repository\n * @param entity the entity to store the stream to\n * @param keyExtractor extractor of key for elements\n * @param attributeExtractor extractor for attribute for elements\n * @param valueExtractor extractor of values for elements\n * @param timeExtractor extractor of event time\n */\n <V> void persist(\n RepositoryProvider repoProvider,\n EntityDescriptor entity,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<CharSequence> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\")\n Closure<CharSequence> attributeExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Long> timeExtractor);\n\n /**\n * Directly write this stream to repository. Note that the stream has to contain {@link\n * StreamElement}s (e.g. created by {@link #asStreamElements}.\n *\n * @param repoProvider provider of repository\n */\n void write(RepositoryProvider repoProvider);\n\n /**\n * Create time windowed stream.\n *\n * @param millis duration of tumbling window\n * @return time windowed stream\n */\n WindowedStream<T> timeWindow(long millis);\n\n /**\n * Create sliding time windowed stream.\n *\n * @param millis duration of the window\n * @param slide duration of the slide\n * @return sliding time windowed stream\n */\n WindowedStream<T> timeSlidingWindow(long millis, long slide);\n\n /**\n * Create session windowed stream.\n *\n * @param <K> type of key\n * @param keyExtractor extractor of key\n * @param gapDuration duration of the gap between elements per key\n * @return session windowed stream\n */\n <K> WindowedStream<Pair<K, T>> sessionWindow(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n long gapDuration);\n\n /**\n * Create calendar-based windowed stream.\n *\n * @param window the resolution of the calendar window (\"days\", \"weeks\", \"months\", \"years\")\n * @param count number of days, weeks, months, years\n * @param timeZone time zone of the calculation\n * @return calendar windowed stream\n */\n WindowedStream<T> calendarWindow(String window, int count, TimeZone timeZone);\n\n /**\n * Group all elements into single window.\n *\n * @return globally windowed stream.\n */\n WindowedStream<T> windowAll();\n\n /**\n * Merge two streams together.\n *\n * @param other the other stream(s)\n * @return merged stream\n */\n default Stream<T> union(Stream<T> other) {\n return union(Arrays.asList(other));\n }\n\n /**\n * Merge two streams together.\n *\n * @param name name of the union operator\n * @param other the other stream(s)\n * @return merged stream\n */\n default Stream<T> union(@Nullable String name, Stream<T> other) {\n return union(name, Arrays.asList(other));\n }\n\n /**\n * Merge multiple streams together.\n *\n * @param streams other streams\n * @return merged stream\n */\n default Stream<T> union(List<Stream<T>> streams) {\n return union(null, streams);\n }\n\n /**\n * Merge multiple streams together.\n *\n * @param name name of the union operator\n * @param streams other streams\n * @return merged stream\n */\n Stream<T> union(@Nullable String name, List<Stream<T>> streams);\n\n /**\n * Transform this stream using stateful processing.\n *\n * @param <K> type of key\n * @param <S> type of value state\n * @param <V> type of intermediate value\n * @param <O> type of output value\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialState closure providing initial state value for key\n * @param outputFn function for outputting values (when function returns {@code null} the output\n * is discarded\n * @param stateUpdate update (accumulation) function for the state the output is discarded\n * @return the statefully reduced stream\n */\n default <K, S, V, O> Stream<Pair<K, O>> reduceValueStateByKey(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<S> initialState,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<O> outputFn,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<S> stateUpdate) {\n\n return reduceValueStateByKey(\n null, keyExtractor, valueExtractor, initialState, outputFn, stateUpdate);\n }\n\n /**\n * Transform this stream using stateful processing without time-sorting.\n *\n * @param <K> type of key\n * @param <S> type of value state\n * @param <V> type of intermediate value\n * @param <O> type of output value\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialState closure providing initial state value for key\n * @param outputFn function for outputting values (when function returns {@code null} the output\n * is discarded\n * @param stateUpdate update (accumulation) function for the state the output is discarded\n * @return the statefully reduced stream\n */\n default <K, S, V, O> Stream<Pair<K, O>> reduceValueStateByKeyUnsorted(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<S> initialState,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<O> outputFn,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<S> stateUpdate) {\n\n return reduceValueStateByKeyUnsorted(\n null, keyExtractor, valueExtractor, initialState, outputFn, stateUpdate);\n }\n\n /**\n * Transform this stream using stateful processing.\n *\n * @param <K> type of key\n * @param <S> type of value state\n * @param <V> type of intermediate value\n * @param <O> type of output value\n * @param name optional name of the stateful operation\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialState closure providing initial state value for key\n * @param stateUpdate update (accumulation) function for the state\n * @param outputFn function for outputting values (when function returns {@code null} the output\n * is discarded\n * @return the statefully reduced stream\n */\n default <K, S, V, O> Stream<Pair<K, O>> reduceValueStateByKey(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<S> initialState,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<O> outputFn,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<S> stateUpdate) {\n\n return reduceValueStateByKey(\n name, keyExtractor, valueExtractor, initialState, outputFn, stateUpdate, true);\n }\n\n /**\n * Transform this stream using stateful processing without time-sorting.\n *\n * @param <K> type of key\n * @param <S> type of value state\n * @param <V> type of intermediate value\n * @param <O> type of output value\n * @param name optional name of the stateful operation\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialState closure providing initial state value for key\n * @param stateUpdate update (accumulation) function for the state\n * @param outputFn function for outputting values (when function returns {@code null} the output\n * is discarded\n * @return the statefully reduced stream\n */\n default <K, S, V, O> Stream<Pair<K, O>> reduceValueStateByKeyUnsorted(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<S> initialState,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<O> outputFn,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<S> stateUpdate) {\n\n return reduceValueStateByKey(\n name, keyExtractor, valueExtractor, initialState, outputFn, stateUpdate, false);\n }\n\n /**\n * Transform this stream using stateful processing.\n *\n * @param <K> type of key\n * @param <S> type of value state\n * @param <V> type of intermediate value\n * @param <O> type of output value\n * @param name optional name of the stateful operation\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialState closure providing initial state value for key\n * @param stateUpdate update (accumulation) function for the state\n * @param outputFn function for outputting values (when function returns {@code null} the output\n * is discarded\n * @param sorted {@code true} if the input to the state update function should be time-sorted\n * @return the statefully reduced stream\n */\n <K, S, V, O> Stream<Pair<K, O>> reduceValueStateByKey(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<S> initialState,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<O> outputFn,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<S> stateUpdate,\n boolean sorted);\n\n /**\n * Transform this stream to another stream by applying combining transform in global window\n * emitting results after each element added. That means that the following holds: * the new\n * stream will have exactly the same number of elements as the original stream minus late elements\n * dropped * streaming semantics need to define allowed lateness, which will incur real time\n * processing delay * batch semantics use sort per key\n *\n * @param <K> key type\n * @param <V> value type\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialValue closure providing initial value of state for key\n * @param combiner combiner of values to final value\n * @return the integrated stream\n */\n default <K, V> Stream<Pair<K, V>> integratePerKey(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<V> initialValue,\n @ClosureParams(value = FromString.class, options = \"V,V\") Closure<V> combiner) {\n\n return integratePerKey(null, keyExtractor, valueExtractor, initialValue, combiner);\n }\n\n /**\n * Transform this stream to another stream by applying combining transform in global window\n * emitting results after each element added. That means that the following holds: * the new\n * stream will have exactly the same number of elements as the original stream minus late elements\n * dropped * streaming semantics need to define allowed lateness, which will incur real time\n * processing delay * batch semantics use sort per key\n *\n * @param <K> key type\n * @param <V> value type\n * @param name optional name of the transform\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialValue closure providing initial value of state for key\n * @param combiner combiner of values to final value\n * @return the integrated stream\n */\n <K, V> Stream<Pair<K, V>> integratePerKey(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<V> initialValue,\n @ClosureParams(value = FromString.class, options = \"V,V\") Closure<V> combiner);\n\n /** Reshuffle the stream via random key. */\n default Stream<T> reshuffle() {\n return reshuffle(null);\n }\n\n /**\n * Reshuffle the stream via random key.\n *\n * @param name name of the transform\n */\n @SuppressWarnings(\"unchecked\")\n Stream<T> reshuffle(@Nullable String name);\n}", "<R> Streamlet<R> newSource(SerializableSupplier<R> supplier);", "@Ignore\n @Test\n public void untypedLambda2() {\n DependentLink A = param(\"A\", Universe(0));\n DependentLink params = params(A, param(\"B\", Pi(Reference(A), Universe(0))), param(\"a\", Reference(A)));\n Expression type = Pi(params, Apps(Reference(params.getNext()), Reference(params.getNext().getNext())));\n List<Binding> context = new ArrayList<>();\n context.add(new TypedBinding(\"f\", type));\n\n CheckTypeVisitor.Result result = typeCheckExpr(context, \"\\\\lam x1 x2 x3 => f x1 x2 x3\", null);\n assertEquals(type, result.type);\n }", "public static Stream<StreamAnimal> generateStreamOfAnimals_lambda() {\n\n Stream<StreamAnimal> resultStream = Stream.generate(\n () -> getNewAnimal()\n );\n\n return resultStream;\n }", "@Test\n public void test2() {\n Consumer<String> consumer = System.out::println;\n consumer.accept(\"lambda V5!\");\n }", "@Test\r\n\tvoid mapMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream();\r\n\t\tStream<Integer> streamInteger = transactionBeanStream.peek(System.out::println).map(TransactionBean::getId);\r\n\t\tList<Integer> afterStreamList = streamInteger.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong value\", 1, afterStreamList.get(0).intValue());\r\n\t\tassertSame(\"wrong value\", 2, afterStreamList.get(1).intValue());\r\n\t\tassertSame(\"wrong value\", 3, afterStreamList.get(2).intValue());\r\n\t}", "public static LambdaExpression lambda(Class type, Expression body, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }", "public void lambdaDiffParamSamples() {\n\t\tSystem.out.println(\"\\n\\n************Lambda Parameters: zero, one or many**********\");\n\t\t// Zero Params\n\t\tPrint ob = () -> System.out.println(\"Print Something\");\n\t\tob.print();\n\n\t\t// One Params\n\t\tSayable ob2 = name -> \"Hello \" + name;\n\t\tSystem.out.println(ob2.say(\"Prabu\"));\n\n\t\t// Two Params\n\t\tAddable ob3 = (a, b) -> a + b;\n\t\tSystem.out.println(\"Add: \" + ob3.add(5, 8));\n\t}", "IStreamList<T> transform(IStreamList<T> dataset);", "@Test\r\n void filterMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY);\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(1).getType());\r\n }", "public static LambdaExpression lambda(Class type, Expression body, String name, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }", "@Test\r\n void convertStreamBean2ListMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream();\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong type\", Transaction.Test, afterStreamList.get(1).getType());\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(2).getType());\r\n }", "public interface LambdaVisitor<T> {\n T visit(ASTAbstraction node);\n T visit(ASTApplication node);\n T visit(ASTConstant node);\n T visit(ASTVariable node);\n}", "@Test\r\n void convertStreamBean2MapMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream();\r\n\t\t// Convert stream -> Map<Object, Object> -> Map<String, TransactionBean>\r\n\t\tMap<String, TransactionBean> afterStreamMap = (Map<String, TransactionBean>)transactionBeanStream.peek(System.out::println).collect(Collectors.toMap(p -> p.getValue(), p -> p));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamMap.get(\"r1\").getType());\r\n\t\tassertSame(\"wrong type\", Transaction.Test, afterStreamMap.get(\"r2\").getType());\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamMap.get(\"r3\").getType());\r\n }", "@Test\n public void untypedLambdaError2() {\n DependentLink A = param(\"A\", Universe(0));\n DependentLink params = params(A, param(\"B\", Pi(Reference(A), Universe(0))), param(\"a\", Reference(A)));\n Expression type = Pi(params, Apps(Reference(params.getNext()), Reference(params.getNext().getNext())));\n List<Binding> context = new ArrayList<>();\n context.add(new TypedBinding(\"f\", type));\n\n typeCheckExpr(context, \"\\\\lam x1 x2 x3 => f x2 x1 x3\", null, 1);\n }", "public interface LambdaInterface {\n\n @LambdaFunction\n byte[] HelloFunction(LambdaRequest request);\n\n @LambdaFunction\n LambdaRespMenues GetFullAndFilteredMenuForRestaurant(LambdaRequest2 input);\n}", "public static LambdaExpression lambda(Class type, Expression expression, boolean tailCall, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }", "public static LambdaExpression lambda(Class type, Expression body, ParameterExpression[] parameters) { throw Extensions.todo(); }", "@Test\n public void untypedLambda1() {\n DependentLink A = param(\"A\", Universe(0));\n Expression type = Pi(params(A, param(\"a\", Reference(A))), Nat());\n List<Binding> context = new ArrayList<>();\n context.add(new TypedBinding(\"f\", type));\n typeCheckExpr(context, \"\\\\lam x1 x2 => f x1 x2\", null);\n }", "@ParameterizedTest\n @MethodSource(value = \"sourceString\") // Method should return Stream compatible\n public void methSource_String(String param1){\n System.out.println(\"param1 = \" + param1);\n }", "public void testConsumer ()\n {\n\n List<String> list = new ArrayList<>();\n list.add(\"ccc\");\n list.add(\"bbb\");\n list.add(\"ddd\");\n list.add(\"DDDD\");\n list.add(\"ccc\");\n list.add(\"aaa\");\n list.add(\"eee\");\n\n// Collections.sort(list);\n// Collections.sort(list, (s, s2) -> s.toLowerCase().compareTo(s2.toLowerCase()));\n\n// list.sort((s, s2) -> s.compareTo(s2));\n// list.sort((s, s2) -> s.toLowerCase().compareTo(s2.toLowerCase()));\n\n// list.forEach(s -> System.out.println(s));\n// list.forEach(s -> System.out.println(s));\n\n\n// Predicate<String> predicate2 = s -> s.length()>3;\n// System.out.println(\"predicate2.test(\\\"DDDD\\\") = \" + predicate2.test(\"DDDD\"));\n\n// Stream<String> stringStream = list.stream();\n// stringStream.forEach(s -> System.out.println(s));\n// stringStream.forEach(s -> System.out.println(s));//会报错\n\n// list.stream().forEach(s -> System.out.println(s));\n// list.stream().forEach(s -> System.out.println(s));\n\n //并行流是无序的\n// list.parallelStream().forEach(s -> System.out.println(s));\n// list.parallelStream().forEach(s -> System.out.println(s));\n\n// list.stream().skip(3).forEach(s -> System.out.println(s));\n// list.stream().distinct().forEach(s -> System.out.println(s));\n// System.out.println(\"list.stream().count() = \" + list.stream().count());\n// list.stream().limit(2).forEach(s -> System.out.println(s));\n\n// list.stream().filter(s -> s.length()<4).forEach(s -> System.out.println(s));\n\n// BiFunction<Integer, String, Person> bf = Person::new;\n// BiFunction<Integer, String, Person> bf = (n, s) -> new Person(s);\n\n// Person aaa = bf.apply();\n\n// System.out.println(\"aaa = \" + bf.apply(0, \"aaa\"));\n \n }", "@FunctionalInterface\npublic interface Act<E> {\n\n void forEach(E pill,ITree ctx,ILime consumer);\n\n}", "@Test\n public void testRepeatStageType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(String.class);\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.add(getFirstTypeParameter(NoOpSink.class));\n PipelineRegisterer.validateTypes(typeList);\n }", "default Stream<Token<?>> stream() {\n return stream(true);\n }", "public static LambdaExpression lambda(Class type, Expression body, String name, boolean tailCall, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }", "private FuncBody parseLambda(Tokenizer in) {\n\t\tFuncBody lambda = new FuncBody();\n\t\tlambda.type = new TypeDef();\n\t\tlambda.type.returnType = parseType(in);\n\t\tlambda.type.paramTypes = new ArrayList<>();\n\t\tToken next = in.next();\n\t\tif (next.type != Token.TokenType.OPEN_PARENTHESIS)\n\t\t\tthrow new SyntaxError(\"Expected ( got: '\"+next+\"'\"+next.generateLineChar());\n\t\tlambda.params = parseParamList(in);\n\t\tlambda.type.paramTypes.addAll(lambda.params.stream().map(d -> d.type).collect(Collectors.toList()));\n\t\tnext = in.next();\n\t\tif (next.type != Token.TokenType.OPEN_BRACE)\n\t\t\tthrow new SyntaxError(\"Expected { got: '\"+next+\"'\"+next.generateLineChar());\n\t\tlambda.body = parseBlock(in);\n\t\treturn lambda;\n\t}", "@Test\n public void intermediateAndTerminalOperations() throws Exception {\n System.out.println(\n MockData.getCars()\n // Here we go to \"abstraction\" of strams\n .stream()\n // This is an intermediate op because we stay in the abstraction\n .filter(car -> {\n System.out.println(\"filter car \" + car);\n return car.getPrice() < 10000;\n })\n // This is intermediate too, we still working with streams \"abstraction\"\n .map(car -> {\n System.out.println(\"mapping car \" + car);\n return car.getPrice();\n })\n // same as before, still intermediate, still in streams abstraction\n .map(price -> {\n System.out.println(\"mapping price \" + price);\n return price + (price * .14);\n })\n // ok, this is a terminal operation and give you back the \"concrete type\" result of the operations\n .collect(Collectors.toList())\n );\n\n // Q: If you comment this line, no result is printed, you got only stram reference, why?\n // A: STREAMS are LAZY initialized\n\n // Q: What's the order of execution in the above code?\n // A: See the console print to understand order of execution:\n // The mappings are executed as soon as the first car passes the filter\n // so to get some results, stream don't need to filter ALL the list before\n\n }", "public static void main(String[] args) {\n Foo fooByIC= new Foo() {\n @Override\n public void method(String string) {\n System.out.println(string);\n }\n };\n Foo fooByIc2=new Foo() {\n @Override\n public void method(String string) {\n System.out.println(string+\" \"+string);\n }\n };\n fooByIC.method(\"test\");\n fooByIc2.method(\"test\");\n\n //TODO call testFunctional with fooByIC\n testFunctional(\"test2\",fooByIc2);\n //TODO call testFunctional with a lambda\n testFunctional(\"test3\",s-> System.out.println(s.toUpperCase()+\"lambda\"));\n //TODO call testFunctional with a different lambda\n testFunctional(\"4\",s-> {\n try {\n\n\n Integer number = Integer.parseInt(s);\n System.out.println(number*number);\n }\n catch (NumberFormatException ex)\n {\n System.out.println(\"Not a number\");\n }\n\n });\n testFunctional(2,3,(a,b)->a+b);\n\n\n }", "@Test\n public void streamLanguageTagsCaseInsensitive() {\n final Literal lower = factory.createLiteral(\"Good afternoon\", \"en-gb\");\n final Literal upper = factory.createLiteral(\"Good afternoon\", \"EN-GB\");\n final Literal mixed = factory.createLiteral(\"Good afternoon\", \"en-GB\");\n\n final IRI example1 = factory.createIRI(\"http://example.com/s1\");\n final IRI greeting = factory.createIRI(\"http://example.com/greeting\");\n\n dataset.add(null, example1, greeting, upper);\n\n // or as patterns\n assertTrue(closableFindAny(dataset.stream(null, null, null, upper)).isPresent());\n assertTrue(closableFindAny(dataset.stream(null, null, null, lower)).isPresent());\n assertTrue(closableFindAny(dataset.stream(null, null, null, mixed)).isPresent());\n\n // Check the quad returned equal a new quad\n final Quad q = closableFindAny(dataset.stream(null, null, null, lower)).get();\n assertEquals(q, factory.createQuad(null, example1, greeting, mixed));\n }", "private void usingPrimitiveStream() {\n IntStream.range(1, 4).forEach(System.out::println);\n DoubleStream.of(2.3, 4.3).forEach(System.out::println);\n LongStream.range(1, 4).forEach(System.out::println);\n }", "public interface TimeStreamMapToScalar {\n double map(Object x);\n}", "public interface IStreamable<U> {\n\n IMonStream<U> fstream();\n}", "void foo(java.util.function.Consumer<T> c) {}", "@FunctionalInterface\npublic interface Convert<S,T> {\n T convert(S arg);\n}", "@Test\r\n void multiLevelFilter() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY).filter(t -> \"r3\".equals(t.getValue()));\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong value\", \"r3\", afterStreamList.get(0).getValue());\r\n }", "public void printItemsUsingLambdaCollectorsJDK8(List<Item> items){\n\t\tIO.print(\"\\nPrint average of all items price using JDK8 stream, method reference, collector!\");\r\n\t\t// average requires total sum and no of items as well.\r\n\t\t// collect returns ONLY one value throughout the stream. So we need some kind of placer where we will keep storing sum, count during stream.\r\n\t\tAverager avg = items\r\n\t\t\t.stream()\r\n\t\t\t.map(Item::getPrice) \r\n\t\t\t// alternate of item -> item.getPrice()\r\n\t\t\t.collect(Averager::new, Averager::accept, Averager::mergeIntermediateAverage); \r\n\t\t\t//accept takes one double value from stream and call merge.. method, which combines previous averger`s sum, count.\r\n\t\t\t// All Averager`s methods have no return type except for average which is not used in stream processing.\r\n\t\tIO.print(\"Average of price: \" + String.format(\"%.4f\", avg.average()));\r\n\t\t\r\n\t\tIO.print(\"\\nPrint total of items price using JDK8 stream, collector, suming!\");\r\n\t\tdouble total = items\r\n\t\t\t.stream()\r\n\t\t\t.collect(Collectors.summingDouble(Item::getPrice)); // no need for map as well.\r\n\t\tIO.print(\"Total price: \" + String.format(\"%.4f\", total)); // same result\r\n\t\t\r\n\t\tIO.print(\"\\nPrint total of all items price using JDK8 stream, collector toList!\");\r\n\t\tList<Double> prices = items\r\n\t\t\t.stream()\r\n\t\t\t.map(Item::getPrice) \r\n\t\t\t// alternate of item -> item.getPrice()\r\n\t\t\t.collect(Collectors.toList()); \r\n\t\t\t// collects stream of elements i.e. price, and creates a List of price.\r\n\t\tIO.print(\"List of prices: \" + prices); \r\n\t\t\r\n\t\tIO.print(\"\\nPrint total of all items price using JDK8 stream, collector toCollection!\");\r\n\t\tprices = items\r\n\t\t\t.stream()\r\n\t\t\t.map(Item::getPrice) \r\n\t\t\t.collect(Collectors.toCollection(ArrayList::new)); // same as toList: Here, we can get prices in any list form; TreeSet, HashSet, ArrayList.\r\n\t\tIO.print(\"List of prices: \" + prices);\r\n\t\t\r\n\t\tIO.print(\"\\nPrint total of all items price using JDK8 stream, collector joining!\");\r\n\t\tString priceString = items\r\n\t\t\t.stream()\r\n\t\t\t.map(Item::getPrice)\r\n\t\t\t.map(Object::toString) //basically, double.toString() as upper map converts stream of Item into stream of Double\r\n\t\t\t.collect(Collectors.joining(\", \")); // same as toList.\r\n\t\tIO.print(\"List of prices: [\" + priceString + \"]\"); \r\n\t\t\r\n\t\tIO.print(\"\\nPrint items based on type using JDK8 stream, collector grouping!\");\r\n\t\tMap<ITEM_TYPE, List<Item>> byType = items\r\n\t\t\t.stream()\r\n\t\t\t.collect(Collectors.groupingBy(Item::getType));\r\n\t\tIO.print(\"Items by Type: \" + byType ); \r\n\t\t\r\n\t\tIO.print(\"\\nPrint items based on type using JDK8 stream, collector grouping!\");\r\n\t\tMap<ITEM_TYPE, Double> sumByType = items\r\n\t\t\t.stream()\r\n\t\t\t.collect(Collectors.groupingBy(Item::getType, Collectors.summingDouble(Item::getPrice)));\r\n\t\tIO.print(\"Total prices by Type: \" + sumByType); \r\n\t\t\r\n\t\tIO.print(\"\\nPrint items based on type using JDK8 stream, collector grouping!\");\r\n\t\tMap<ITEM_TYPE, Optional<Item>> largetstByType = items\r\n\t\t\t.stream()\r\n\t\t\t.collect(Collectors.groupingBy(Item::getType, Collectors.maxBy(Comparator.comparing(Item::getPrice) )));\r\n\t\tIO.print(\"Total prices by Type: \" + largetstByType); \r\n\t}", "public static void main(String[] args) {\n\t\n\t\tm(\"Iterate\", () -> {\t\t\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tSupplier<IntStream>[] sArr = (Supplier<IntStream>[])new Supplier[] {\n\t\t\t\t() -> IntStream.iterate(2, i -> 2 * i),\n\t\t\t\t() -> IntStream.iterate(10, i -> i - 1),\n\t\t\t\t() -> IntStream.iterate(10, i -> i),\n\t\t\t\t() -> IntStream.iterate(10, i -> 2),\n\t\t\t\t() -> IntStream.iterate(42, IntUnaryOperator.identity()),\n\t\t\t\t() -> IntStream.iterate(42, IntUnaryOperator.identity().andThen(IntUnaryOperator.identity())),\n\t\t\t};\n\t\t\tStream.of(sArr).forEach(supplier -> supplier.get().limit(10).forEach(System.out::println));\n\t\t});\n\t\t\n\t\t\n\t\t//Various IntStream generations. generate produces elements without input => it uses an IntSupplier.\n\t\t\n\t\tSystem.out.println(\"---------------------------------------------\");\n\t\t\n\t\tm(\"Generate\", () -> {\t\t\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tSupplier<IntStream>[] sArr = (Supplier<IntStream>[])new Supplier[] {\n\t\t\t\t() -> IntStream.generate(() -> new Random().nextInt()),\n\t\t\t\t() -> IntStream.generate(() -> new Random().nextInt()).filter(n -> n >= 0),\n\t\t\t\t() -> IntStream.generate(() -> 10),\n\t\t\t\t() -> IntStream.generate(() -> new Random().nextInt() % 20).filter(n -> n >= 0)\n\t\t\t};\n\t\t\tStream.of(sArr).forEach(supplier -> {supplier.get().limit(10).forEach(System.out::println); System.out.println(\"--------------------------------\");});\n\t\t});\n\t\t\n\t\t\n\t\t//Iterate and generate for DoubleStream, LongStream and Stream<T>\n\t\t\n\t\t\n\t\tm(\"DoubleStream iterate and generate\", () -> {\t\t\n\t\t\tDoubleStream.iterate(1, d -> d + d / 2).limit(20).forEach(System.out::println); //Uses DoubleUnaryOperator\n\t\t\tSystem.out.println(\"-------------------------\");\n\t\t\tDoubleStream.generate(() -> new Random().nextDouble()).limit(5).forEach(System.out::println); //Uses DoubleSupplier\n\t\t});\n\t\t\n\t\tm(\"LongStream iterate and generate\", () -> {\t\t\n\t\t\tLongStream.iterate(2, n -> n * n).limit(4).forEach(System.out::println); //Uses LongUnaryOperator\n\t\t\tSystem.out.println(\"-------------------------\");\n\t\t\tDoubleStream.generate(() -> new Random().nextLong()).limit(5).forEach(System.out::println); //Uses LongSupplier\n\t\t});\n\t\t\n\t\tm(\"Stream iterate and generate\", () -> {\t\t\n\t\t\tStream.<List<Object>>iterate(new ArrayList<Object>(), l -> {l.add(1); return l;}).limit(4).forEach(System.out::println); //Uses UnaryOperator\n\t\t\tSystem.out.println(\"-------------------------\");\n\t\t\tStream.<List<Object>>generate(() -> new ArrayList<Object>()).limit(4).forEach(System.out::println); //Uses Supplier\n\t\t});\n\t\t\n\t\tm(\"noneMatch\", () -> {\t\t\n\t\t\tStream<String> stream = Stream.<String>iterate(\"-\", s -> s + s);\n\t\t\tPredicate<String> predicate = s -> s.length() > 3;\n\t\t\tSystem.out.println(stream.noneMatch(predicate)); //Note: this is not infinite. None match will fail as soon as one element is found\n\t\t});\n\t\t\n\t\tm(\"allMatch\", () -> {\t\t\n\t\t\tStream<String> stream = Stream.<String>iterate(\"-\", s -> s + s);\n\t\t\tPredicate<String> predicate = s -> s.length() > 0;\n\t\t\tPredicate<String> predicate2 = s -> s.length() > 3;\n\t\t\t//System.out.println(stream.allMatch(predicate)); //Note: This is infinite and will fail with OOM error\n\t\t\tSystem.out.println(stream.allMatch(predicate2)); //Note how this will return as the first element does not match so false can be returned\n\t\t});\n\t\t\n\t}", "private GenericTransformer<Tweet, PoliticalTweet> transformToPoliticalTweet(){\t\r\n\t\treturn tweet -> {\r\n\t\t\tPoliticalTweet polTweet = new PoliticalTweet();\r\n\t\t\tpolTweet.setTweet(tweet);\r\n\t\t\treturn polTweet;\r\n\t\t};\r\n\t}", "public interface Transformer<T> extends Serializable{\n\n\t/**\n\t * Transform an input dataset into an output dataset (for example by adding an additional prediction attribute)\n\t */\n\tIStreamList<T> transform(IStreamList<T> dataset);\n\t\n}", "default Stream<T> filter(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate) {\n\n return filter(null, predicate);\n }", "Spliterator<Event> subscribe(String origin, String type, Instant since, Consumer<Event> callback);", "public static void main(String[] args) {\n assert(sum((a -> a + 4), 5) == 9); // a is inferred to be an int\n assert(sum((int a) -> a + 5, 9) == 14); //a is explicit\n\n //Some other lambdas with one method interfaces\n Runnable r = () -> System.out.println(\"Run in a separate thread\");\n ActionListener al = (evt) -> evt.getActionCommand();\n\n //Multistatement lambda\n SampleInterface si2 = a -> {\n int total = 3 + 4;\n return total + 19;\n };\n }", "@Test\n public void testSourceParamType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(getFirstTypeParameter(ParamToListParam.class));\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.add(getFirstTypeParameter(ParamToListParam.class));\n PipelineRegisterer.validateTypes(typeList);\n }", "public static LambdaExpression lambda(Class type, Expression body, boolean tailCall, ParameterExpression[] parameters) { throw Extensions.todo(); }", "@FunctionalInterface\npublic interface ITierConverter<TIER> {\n TIER convert(Block block, int meta);\n}", "Stream<CallableOliveDefinition> oliveDefinitions();", "void applyTags(ReaderContext context, Operation operation, Method method);", "@Test\n public void test1() {\n final Car car = Car.create(Car::new);\n final List<Car> cars = Collections.singletonList(car);\n final Car police = Car.create(Car::new);\n cars.forEach(police::follow);\n cars.forEach(c -> police.follow(c)); // 等价于写成lambda表达式的形式\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tSystem.out.println(\"-------1. Stream filter() example---------\");\r\n\t\t//We can use filter() method to test stream elements for a condition and generate filtered list.\r\n\t\t\r\n\t\tList<Integer> myList = new ArrayList<>();\r\n\t\tfor(int i=0; i<100; i++) myList.add(i);\r\n\t\tStream<Integer> sequentialStream = myList.stream();\r\n\r\n\t\tStream<Integer> highNums = sequentialStream.filter(p -> p > 90); //filter numbers greater than 90\r\n\t\tSystem.out.print(\"High Nums greater than 90=\");\r\n\t\thighNums.forEach(p -> System.out.print(p+\" \"));\r\n\t\t//prints \"High Nums greater than 90=91 92 93 94 95 96 97 98 99 \"\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"-------2. Stream map() example---------\");\r\n\t\t//We can use map() to apply functions to an stream\r\n\t\tStream<String> names = Stream.of(\"aBc\", \"d\", \"ef\");\r\n\t\tSystem.out.println(names.map(s -> {\r\n\t\t\t\treturn s.toUpperCase();\r\n\t\t\t}).collect(Collectors.toList()));\r\n\t\t//prints [ABC, D, EF]\r\n\t\t\r\n\t\tSystem.out.println(\"-------3. Stream sorted() example---------\");\r\n\t\t//We can use sorted() to sort the stream elements by passing Comparator argument.\r\n\t\tStream<String> names2 = Stream.of(\"aBc\", \"d\", \"ef\", \"123456\");\r\n\t\tList<String> reverseSorted = names2.sorted(Comparator.reverseOrder()).collect(Collectors.toList());\r\n\t\tSystem.out.println(reverseSorted); // [ef, d, aBc, 123456]\r\n\r\n\t\tStream<String> names3 = Stream.of(\"aBc\", \"d\", \"ef\", \"123456\");\r\n\t\tList<String> naturalSorted = names3.sorted().collect(Collectors.toList());\r\n\t\tSystem.out.println(naturalSorted); //[123456, aBc, d, ef]\r\n\t\t\r\n\t\tSystem.out.println(\"-------4. Stream flatMap() example---------\");\r\n\t\t//We can use flatMap() to create a stream from the stream of list.\r\n\t\tStream<List<String>> namesOriginalList = Stream.of(\r\n\t\t\t\tArrays.asList(\"Pankaj\"), \r\n\t\t\t\tArrays.asList(\"David\", \"Lisa\"),\r\n\t\t\t\tArrays.asList(\"Amit\"));\r\n\t\t\t//flat the stream from List<String> to String stream\r\n\t\t\tStream<String> flatStream = namesOriginalList\r\n\t\t\t\t.flatMap(strList -> strList.stream());\r\n\r\n\t\t\tflatStream.forEach(System.out::println);\r\n\r\n\t}", "public void performLambdaOperations(){\n functionalInterfaceLambdaService.printFunctionalInterfaceWithAndWithoutLambda();\n runnableLambdaService.printRunnableInterfaceWithAndWithoutLambda();\n comparatorLambdaService.printComparatorInterfaceWithAndWithoutLambda();\n }", "private Function createLambdaFunction()\n {\n return lambdaFunctionBuilder().build();\n }", "public interface SerializableFunction2<T1,U,R> extends BiFunction<T1,U,R>, Serializable\n{\n}", "@SuppressWarnings(\"unchecked\")\n private static <T> Stream<T> all(Class<T> type, Iterator<Object> i) {\n requireNonNull(type);\n requireNonNull(i);\n \n return all(i).filter(o -> type.isAssignableFrom(o.getClass()))\n .map(o -> (T) o);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Create Stream of Object\\n\");\n\t\tStream<String> stream= Stream.of(\"Saliou\",\"Fatimatou\",\"Mahdiyou\",\"Kolon\");\n\t stream.forEach(System.out::println);\n\t \n // Create Stream from Objects from Collection\n\t\tSystem.out.println(\" \\n\\nCreate Stream Object from collection\\n\");\n\t Collection<String> collection=Arrays.asList(\"Saliou\",\"Fatimatou\",\"Mahdiyou\",\"Kolon\");\n\t Stream<String> stream2=collection.stream();\n\t stream2.forEach(System.out::println);\n\t \n\t //Create Stream Object from Collection\n\t System.out.println(\"\\n\\nCreate Stream Object from List\");\n\t List<String> list= Arrays.asList(\"Modou\",\"Fatou\",\"Saliou\",\"Samba\");\n\t Stream<String> stream3=list.stream();\n\t stream3.forEach(System.out::println);\n\t \n\t //Create Stream Object from Set\n\t System.out.println(\"\\n Create Stream from Set\");\n\t Set<String> set= new HashSet<>(list);\n\t Stream<String> stream4= set.stream();\n\t stream4.forEach(System.out::println);\n\t \n\t //Create Stream Object from Arrays\n\t System.out.println(\"\\nCreate Stream Object from Arrays\");\n\t ArrayList<String> array= new ArrayList<>(list);\n\t Stream<String> stream5= array.stream();\n\t stream5.forEach(System.out::println);\n\t \n\t //Create Stream from Array of String\n\t System.out.println(\"\\n Create Stream from Array of String\");\n\t String[] strArray= {\"Saliou\",\"Fatimatou\",\"Mahdiyou\",\"Kolon\"};\n\t Stream<String> stream6=Arrays.stream(strArray);\n\t stream6.forEach(System.out::println);\n\t \n\t \n\t}", "public abstract ResolvedType transformTypeParameters(ResolvedTypeTransformer transformer);", "@Test\n public void testGenericParameterType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(String[].class);\n typeList.addAll(getBothParameters(ArrayToListArray.class));\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.add(getFirstTypeParameter(NoOpSink.class));\n PipelineRegisterer.validateTypes(typeList);\n }", "public LambdaMART() {}", "public interface Transformer<T, R> extends Function<Observable<T>, Publisher<? extends R>> {\n \n }", "public static void main(String[] args) {\n\t\tAnimalTest test = new AnimalTest() {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean test(Animal a) {\r\n\t\t\t\treturn a.canHop();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// boolean test(Animal a);\r\n\t\tAnimalTest lambdaTest = (Animal a) -> {\r\n\t\t\treturn a.canHop();\r\n\t\t};\r\n\t\tAnimalTest lambdaTest2 = a -> a.canHop();\r\n\r\n\t\tAnimal animalPasatCaParametru = new Animal();\r\n\t\tSystem.out.println(\"In main: \" + lambdaTest.test(animalPasatCaParametru));\r\n\r\n\t\tSupplier<Animal> supplier = () -> new Animal();\r\n\t\tsupplier.get();\r\n\t}", "void forEach(BiConsumer<? super String, ? super String> consumer);", "public static void main(String[] args) {\n\t\tStream<Integer> intStream = Stream.of(1, 2, 3, 4);\n\t\t// intStream.forEach(System.out::println);\n\n\t\t/*\n\t\t * Approach 2 of declaring a stream objects with range of elements from 1-10\n\t\t * where last range element is not considered while printing or for any //\n\t\t * operation like sum, average, etc.\n\t\t * \n\t\t * We have IntStream, DoubleStream, etc to handle primitive values inside\n\t\t * streams...\n\t\t */\n\n\t\tIntStream.range(1, 10).forEach(e -> System.out.println(\"IntStream values from 1-10 range: \" + e)); // This will\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// print\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// numbers\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// from 1-9\n\n\t\t// Sometimes,we really want to create Streams dynamically instead of sequential\n\t\t// int values as above. We can use iterate method to to that.\n\t\tIntStream.iterate(1, e -> e * 2).limit(10).forEach(System.out::println);// Priting square numbers\n\n\t\tIntStream.iterate(2, e -> e + 2).limit(10).peek(System.out::println);// Printing even numbers\n\n\t\t/*\n\t\t * Convert these primitive streams to List For that we need to do a boxing\n\t\t * operation on top of stream\n\t\t */\n\n\t\tSystem.out.println(\"Converting IntStream to List...\");\n\t\tIntStream.range(1, 10).limit(5).boxed().collect(Collectors.toList()).forEach(System.out::println);\n\n\t\t/*\n\t\t * Lets explore some concepts on Strings...How stream works on strings and its\n\t\t * related operations\n\t\t */\n\n\t\t// Stream courseStream = Stream.of(\"Spring\", \"API\", \"AWS\", \"Java\", \"JavaFP\");\n\t\tList<String> courses = List.of(\"Spring\", \"API\", \"AWS\", \"Java\", \"JavaFP\");\n\t\tList<String> courses2 = List.of(\"Spring\", \"API\", \"AWS\", \"Java\", \"JavaFP\");\n\t\t// If we want to join these values\n\n\t\tSystem.out.println(courses.stream().collect(Collectors.joining()));\n\n\t\t/*\n\t\t * Lets say, if i want tp split each string in stream seprated by comma..\n\t\t */\n\t\tSystem.out.println(\"String opeartaion within Streams....\");\n\t\t// The below one prints all stream Objects that executed on top of split\n\t\t// function. So, we need to flatMap it to extract the actual result\n\t\tSystem.out.println(courses.stream().map(course -> course.toString().split(\",\")).collect(Collectors.toList()));\n\t\tSystem.out.println(\n\t\t\t\tcourses.stream().map(course -> course.split(\"\")).flatMap(Arrays::stream).collect(Collectors.toList()));\n\n\t\tSystem.out.println(\"Tuples strings : \"\n\t\t\t\t+ courses.stream().flatMap(course -> courses2.stream().map(course2 -> List.of(course, course2)))\n\t\t\t\t\t\t.collect(Collectors.toList()));\n\n\t\t/**\n\t\t * Higher Order Functions... Higher Order function is a function that returns a\n\t\t * function... In simpler terms, a method that returns a Predicate which\n\t\t * contains logic. So, here we are using method logic as a normal data and\n\t\t * returning it from an another method..\n\t\t */\n\n\t\tList<Courses> courseList = List.of(new Courses(1, \"Java\", 5000, 5), new Courses(2, \"AWS\", 4000, 4));\n\t\t// If we want to get courses whcih has number of students greater than 4000,\n\t\t// then we need to write a predicate for that first\n\t\tint numberOfStudentsThreshhold = 4000;\n\t\tPredicate<Courses> numberOfStudentsPredicate = numberOfStudentsPredecateMethod(numberOfStudentsThreshhold);\n\n\t\tSystem.out.println(\"Courses that has score>4000 : \"\n\t\t\t\t+ courseList.stream().filter(numberOfStudentsPredicate).collect(Collectors.toList()));\n\n\t}", "@Test\n public void untypedLambdaError1() {\n DependentLink A = param(\"A\", Universe(0));\n Expression type = Pi(params(A, param(\"a\", Reference(A))), Nat());\n List<Binding> context = new ArrayList<>();\n context.add(new TypedBinding(\"f\", type));\n typeCheckExpr(context, \"\\\\lam x1 x2 => f x2 x1\", null, 1);\n }", "private void collectorOperationInStream() {\n List<Person> persons =\n Arrays.asList(\n new Person(\"Max\", 18),\n new Person(\"Vicky\", 23),\n new Person(\"Ron\", 23),\n new Person(\"Harry\", 12));\n\n Map<Integer, List<Person>> personsByAge = persons\n .stream()\n .collect(Collectors.groupingBy(p -> p.age));\n\n personsByAge.forEach((age, p) -> System.out.format(\"age %s: %s\\n\", age, p));\n\n Double averageAge = persons\n .stream()\n .collect(Collectors.averagingInt(p -> p.age));\n\n System.out.println(\"Average-Age: \" + averageAge);\n\n IntSummaryStatistics ageSummary = persons.stream()\n .collect(Collectors.summarizingInt(p -> p.age));\n\n System.out.println(\"Summarizing Age: \" + ageSummary);\n\n String phrase = persons\n .stream()\n .filter(p -> p.age >= 18)\n .map(p -> p.name)\n .collect(Collectors.joining(\" and \", \"In Germany \", \" are of legal age.\"));\n\n System.out.println(\"Collectors Joining: \" + phrase);\n\n Map<Integer, String> map = persons\n .stream()\n .collect(Collectors.toMap(\n p -> p.age,\n p -> p.name,\n (name1, name2) -> name1 + \";\" + name2));\n\n System.out.println(\"Collectors Mapping: \" + map);\n\n\n Collector<Person, StringJoiner, String> personNameCollector =\n Collector.of(\n () -> new StringJoiner(\" | \"), // supplier\n (j, p) -> j.add(p.name.toUpperCase()), // accumulator\n StringJoiner::merge, // combiner\n StringJoiner::toString); // finisher\n\n String names = persons\n .stream()\n .collect(personNameCollector);\n\n System.out.println(\"Collectors Collect: \" + names);\n\n\n List<Integer> IntegerRange = IntStream.range(51, 54).boxed().collect(Collectors.toList());\n List<Integer> IntegerRange1 = IntStream.range(51, 54).mapToObj(i-> i).collect(Collectors.toList());\n System.out.println(\"InStream to List : \"+IntegerRange);\n System.out.println(\"InStream to List : \"+IntegerRange1);\n }", "public static LambdaExpression Lambda(Expression body, ParameterExpression[] parameters) { throw Extensions.todo(); }", "public static LambdaExpression lambda(Expression body, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }", "private EvaluatorWalker(BufferedTreeNodeStream blockStream, String name, Map<String, FunctInfo> functionDefinitions, \n ArrayList<Object> arguments, String[] paramNames) {\n // Expected tree for function: ^(FUNC ID BLOCK PARAM PARAM ... PARAM )\n this(blockStream);\n \n currentFunctionName = name;\n \n this.functionDefinitions = functionDefinitions;\n \n smanager = new FunctionScopeManager();\n localScope = new LocalScope(currentFunctionName, smanager);\n for(int i = 0; i < arguments.size(); i++) {\n String classname = arguments.get(i).getClass().toString();\n if (classname.contains(\"FunctInfo\"))\n localScope.addLambdaParam(paramNames[i], (FunctInfo)arguments.get(i));\n else\n localScope.addParam(paramNames[i], arguments.get(i));\n }\n \n scopeStack.push(localScope);\n \n }", "@Test\n public void testParameterType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(String.class);\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.add(getFirstTypeParameter(StringListSink.class));\n PipelineRegisterer.validateTypes(typeList);\n }", "default <V> Parser<S, T, V> reduce(Supplier<V> start,BiFunction<V, U, V> f) {\n return s-> {\n return reduceBase(s, start.get(),f);\n };\n }", "TypeDescription resolve(TypeDescription instrumentedType, TypeDescription.Generic parameterType);", "<T extends Message> void visitConsumer(Class<T> consumedType, MethodHandle handle);", "public void lambda22(Object obj) {\n Throwable th;\n Object pair = obj;\n Object obj2 = pair;\n Object obj3 = obj2;\n try {\n C1259lists.setCar$Ex((Pair) obj2, this.f123f.apply1(C1259lists.car.apply1(pair)));\n } catch (ClassCastException e) {\n ClassCastException classCastException = e;\n Throwable th2 = th;\n new WrongType(classCastException, \"set-car!\", 1, obj3);\n throw th2;\n }\n }", "protected void sequence_AnonymousStream_FROM_RETURN(ISerializationContext context, AnonymousStream semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "private void getSomeDogs(){\n try {\n ArrayList<Dog> dogs = new ArrayList<Dog>();\n dogs.add(createLabrador());\n dogs.add(createGolderRetriver());\n \n //Aggregation\n dogs\n .stream()\n .filter(\n d -> (d.getIsRetriever()) \n && (d.getIsFriendly()))\n .map(p->p.getName())\n .forEach(name -> UtilityMethods.print(name));\n\n //lambda expressions\n Dog.getDogList(\n dogs, \n d -> (d.getIsRetriever()) \n && (d.getIsFriendly()), \n m -> m.getName(),\n o -> UtilityMethods.print(o)\n );\n\n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n }", "default EagerFutureStream<U> doOnEach(final Function<U, U> fn) {\n\t\treturn (EagerFutureStream) FutureStream.super.doOnEach(fn);\n\t}", "public static void main(String[] args) {\n\t\tStream<Integer> stream = Stream.of(1, 2, 3, 4, 5, 6);\n\t\tstream.forEach(System.out::print);\n\t\t//:: is called method refrence \n\t\tStream<Integer> stream1 = Stream.of(new Integer[]{1,2,3,4});\n\t\tstream1.forEach(System.out::println);\n\t\t\n\t\tStream<String> names2 = Stream.of(\"D\", \"A\", \"Z\", \"R\");\n names2.sorted(Comparator.naturalOrder()).forEach(System.out::println);\n\t\t \n \n\t}", "static public void callForeachRDD (org.apache.spark.streaming.api.java.JavaDStream<byte[]> jdstream, org.apache.spark.streaming.api.python.PythonTransformFunction pfunc) { throw new RuntimeException(); }", "public interface Extractor<T extends Serializable> extends Serializable {\n}", "interface MyNumberType {\n Integer transform(Integer n1);\n\n default MyNumberType andThen(MyNumberType after) {\n Objects.requireNonNull(after);\n return (nt) -> after.transform(transform(nt));\n }\n}", "private static TypeToken<?> typeVariable() {\n\t\tParameterizedType t = (ParameterizedType)TypeToken.of(Identity.class).getSupertype(StreamElement.class).getType();\n\t\treturn TypeToken.of(t.getActualTypeArguments()[0]);\n\t}", "@Override\n\tpublic void visit(Function arg0) {\n\t\t\n\t}", "public static void main(String[] args) {\n Consumer<Integer> consumer = x ->{\n System.out.println(\"Number is :\"+x);\n };\n consumer.accept(55);\n //Supplier\n Supplier<String> str = () -> \"Implementation of Supplier \";\n System.out.println(str.get());\n //Predicate\n int a=37;\n Predicate<Integer> isOddPredicate = x -> x%2 != 0;\n System.out.println(\"Is \"+a+\" Odd Number :\"+isOddPredicate.test(a));\n //Function\n int b=7;\n Function<Integer,Integer> squareFunction = x -> x*x;\n System.out.println(\"Square of \"+b+\" is \"+squareFunction.apply(b));\n\n //Example\n List<Integer> list = List.of(12,9,13,4,6,2,4);\n Consumer<Integer> con = System.out::println;\n System.out.println(\"Example(Square of odd no.) : \");\n list.stream()\n .filter(isOddPredicate)\n .map(squareFunction)\n .forEach(con);\n\n\n\n }", "public abstract Stream<E> streamBlockwise();", "@Test\n public void testLamda(){\n }", "@Override\n\tpublic void visit(Function arg0) {\n\n\t}", "@Override\n protected void collectParameters(Consumer<Parameter<?>> parameterCollector) {\n }", "private static List<TypeName> allVisitorBuilderStages(\n ClassName enclosingClass, Map<FieldDefinition, TypeName> memberTypeMap, TypeVariableName visitResultType) {\n return Stream.concat(sortedStageNameTypePairs(memberTypeMap).map(p -> p.memberName), Stream.of(COMPLETED))\n .map(stageName -> visitorStageInterfaceName(enclosingClass, stageName))\n .map(stageType -> ParameterizedTypeName.get(stageType, visitResultType))\n .collect(Collectors.toList());\n }", "@Test\n public void intermediateOperations() {\n Stream<Book> books = TestData.getBooks().stream();\n // filter\n Stream<Book> booksWithMultipleAuthors = books.filter(book -> book.hasMultipleAuthors());\n // map\n Stream<String> namesStream = booksWithMultipleAuthors.map(book -> book.getName());\n \n Set<String> expected = \n Sets.newHashSet(\"Design Patterns: Elements of Reusable Object-Oriented Software\",\n \"Structure and Interpretation of Computer Programs\");\n assertEquals(expected, namesStream.collect(Collectors.toSet()));\n }", "private static void ThreadCreationLambdaWay() {\r\n\t\tThread t2 = new Thread(() -> {\r\n\t\t\tSystem.out.println(\"This is a runnable method done in Lambda Expressions > 1.8\");\r\n\t\t});\r\n\t\tt2.start();\r\n\t\t\r\n\t\t// Other way\r\n\t\t\r\n\t\tThread t3 = new Thread(() -> System.out.println(\"This is runnable method done in single line Lambda expressions > 1.8\"));\r\n\t\tt3.start();\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tFunInterf fi=()->System.out.println(\"Functional Interface\");\r\n\t\tfi.print();\r\n\t\t\r\n\t\tISquare is=i->i*i;\r\n\t\tSystem.out.println(is.square(10));\r\n\t\t\r\n\t\tIMultiply im=(a,b)->a*b;\r\n\t\tSystem.out.println(im.multiply(10,20));\r\n\t\t\r\n\t\t/*** Create Thread using Lamda expression****/\r\n\t\t\r\n\t\tRunnable r=()->{\r\n\t\t\tfor(int i=0;i<10;i++)\r\n\t\t\t\tSystem.out.println(\"Child Thread\");\r\n\t\t};\r\n\t\tnew Thread(r).start();\r\n\t\t\r\n\t\t/*** Sort using Lamda expression****/\r\n\t\t\r\n\t\tList<Integer> lst = new ArrayList<Integer> ();\r\n\t\tlst.add(10);\r\n\t\tlst.add(50);\r\n\t\tlst.add(3);\r\n\t\tComparator <Integer> c=(a,b)->(a<b)?-1:(a>b)?1:0;\r\n\t\tCollections.sort(lst,c);\r\n\t\tSystem.out.println(lst);\r\n\t\t\r\n\t\t/*** Filter even number using Lamda expression****/\r\n\t\tList l2=lst.stream().filter(i->i%2==0).collect(Collectors.toList());\r\n\t\tSystem.out.println(l2);\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t/***Function Interface ****/\r\n\t\t\r\n\t\tFunction<Integer,Integer> f=i->i*i;\r\n\t\tSystem.out.println(\"Using Funtion Interface \"+f.apply(2));\r\n\t\t\r\n\t\t\t\t\r\n\t\t/****Predicate Interface ****/\r\n\t\t\r\n\t\tPredicate<Integer> p=i->i%2==0;\r\n\t\tSystem.out.println(\"Using Perdicate Interface \"+p.test(100));\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t/**** Using Filter method ***/\r\n\t\tList<String> names = Arrays.asList(\"Melisandre\", \"Sansa\", \"Jon\", \"Daenerys\", \"Joffery\");\r\n\r\n\t\tList<String> longnames = names.stream() // converting the list to stream\r\n\t\t\t\t.filter(str -> str.length() > 6) // filter the stream to create\r\n\t\t\t\t.collect(Collectors.toList()); // collect the final stream and convert it to a List\r\n\r\n\t\tSystem.out.println(longnames);\r\n\t\t\r\n\t\t/**** Using Map method ***/\r\n\r\n\t\tList<Integer> num = Arrays.asList(1, 2, 3, 4, 5, 6);\r\n\t\tList<Integer> sqrList = num.stream().map(n -> n * n).collect(Collectors.toList());\r\n\t\tSystem.out.println(sqrList);\r\n\t\t\r\n\t\t\r\n\r\n\t}", "void apply(FnIntFloatToFloat lambda);", "WithCreate withTags(Object tags);", "void accept(T param);", "Stream<Token<?>> stream(final boolean includeChildren);", "Stream<T> union(@Nullable String name, List<Stream<T>> streams);", "@FunctionalInterface\n/* */ public interface ObjectInputFilter\n/* */ {\n/* */ Status checkInput(FilterInfo paramFilterInfo);\n/* */ \n/* */ public enum Status\n/* */ {\n/* 178 */ UNDECIDED,\n/* */ \n/* */ \n/* */ \n/* 182 */ ALLOWED,\n/* */ \n/* */ \n/* */ \n/* 186 */ REJECTED;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ public static interface FilterInfo\n/* */ {\n/* */ Class<?> serialClass();\n/* */ \n/* */ \n/* */ \n/* */ long arrayLength();\n/* */ \n/* */ \n/* */ long depth();\n/* */ \n/* */ \n/* */ long references();\n/* */ \n/* */ \n/* */ long streamBytes();\n/* */ }\n/* */ \n/* */ \n/* */ public static final class Config\n/* */ {\n/* 212 */ private static final Object serialFilterLock = new Object();\n/* */ \n/* */ private static final PlatformLogger configLog;\n/* */ \n/* */ private static final String SERIAL_FILTER_PROPNAME = \"jdk.serialFilter\";\n/* */ \n/* */ private static final ObjectInputFilter configuredFilter;\n/* */ \n/* */ private static ObjectInputFilter serialFilter;\n/* */ \n/* */ static void filterLog(PlatformLogger.Level param1Level, String param1String, Object... param1VarArgs) {\n/* 223 */ if (configLog != null) {\n/* 224 */ if (PlatformLogger.Level.INFO.equals(param1Level)) {\n/* 225 */ configLog.info(param1String, param1VarArgs);\n/* 226 */ } else if (PlatformLogger.Level.WARNING.equals(param1Level)) {\n/* 227 */ configLog.warning(param1String, param1VarArgs);\n/* */ } else {\n/* 229 */ configLog.severe(param1String, param1VarArgs);\n/* */ } \n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ static {\n/* 249 */ configuredFilter = AccessController.<ObjectInputFilter>doPrivileged(() -> {\n/* */ String str = System.getProperty(\"jdk.serialFilter\");\n/* */ if (str == null) {\n/* */ str = Security.getProperty(\"jdk.serialFilter\");\n/* */ }\n/* */ if (str != null) {\n/* */ PlatformLogger platformLogger = PlatformLogger.getLogger(\"java.io.serialization\");\n/* */ platformLogger.info(\"Creating serialization filter from {0}\", new Object[] { str });\n/* */ try {\n/* */ return createFilter(str);\n/* 259 */ } catch (RuntimeException runtimeException) {\n/* */ platformLogger.warning(\"Error configuring filter: {0}\", runtimeException);\n/* */ } \n/* */ } \n/* */ return null;\n/* */ });\n/* 265 */ configLog = (configuredFilter != null) ? PlatformLogger.getLogger(\"java.io.serialization\") : null;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 271 */ serialFilter = configuredFilter;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public static ObjectInputFilter getObjectInputFilter(ObjectInputStream param1ObjectInputStream) {\n/* 280 */ Objects.requireNonNull(param1ObjectInputStream, \"inputStream\");\n/* 281 */ return SharedSecrets.getJavaOISAccess().getObjectInputFilter(param1ObjectInputStream);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public static void setObjectInputFilter(ObjectInputStream param1ObjectInputStream, ObjectInputFilter param1ObjectInputFilter) {\n/* 295 */ Objects.requireNonNull(param1ObjectInputStream, \"inputStream\");\n/* 296 */ SharedSecrets.getJavaOISAccess().setObjectInputFilter(param1ObjectInputStream, param1ObjectInputFilter);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public static ObjectInputFilter getSerialFilter() {\n/* 305 */ synchronized (serialFilterLock) {\n/* 306 */ return serialFilter;\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public static void setSerialFilter(ObjectInputFilter param1ObjectInputFilter) {\n/* 319 */ Objects.requireNonNull(param1ObjectInputFilter, \"filter\");\n/* 320 */ SecurityManager securityManager = System.getSecurityManager();\n/* 321 */ if (securityManager != null) {\n/* 322 */ securityManager.checkPermission(new SerializablePermission(\"serialFilter\"));\n/* */ }\n/* 324 */ synchronized (serialFilterLock) {\n/* 325 */ if (serialFilter != null) {\n/* 326 */ throw new IllegalStateException(\"Serial filter can only be set once\");\n/* */ }\n/* 328 */ serialFilter = param1ObjectInputFilter;\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public static ObjectInputFilter createFilter(String param1String) {\n/* 381 */ Objects.requireNonNull(param1String, \"pattern\");\n/* 382 */ return Global.createFilter(param1String, true);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public static ObjectInputFilter createFilter2(String param1String) {\n/* 394 */ Objects.requireNonNull(param1String, \"pattern\");\n/* 395 */ return Global.createFilter(param1String, false);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ static final class Global\n/* */ implements ObjectInputFilter\n/* */ {\n/* */ private final String pattern;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ private final List<Function<Class<?>, ObjectInputFilter.Status>> filters;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ private long maxStreamBytes;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ private long maxDepth;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ private long maxReferences;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ private long maxArrayLength;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ private final boolean checkComponentType;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ static ObjectInputFilter createFilter(String param2String, boolean param2Boolean) {\n/* 446 */ Global global = new Global(param2String, param2Boolean);\n/* 447 */ return global.isEmpty() ? null : global;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ private Global(String param2String, boolean param2Boolean) {\n/* 459 */ this.pattern = param2String;\n/* 460 */ this.checkComponentType = param2Boolean;\n/* */ \n/* 462 */ this.maxArrayLength = Long.MAX_VALUE;\n/* 463 */ this.maxDepth = Long.MAX_VALUE;\n/* 464 */ this.maxReferences = Long.MAX_VALUE;\n/* 465 */ this.maxStreamBytes = Long.MAX_VALUE;\n/* */ \n/* 467 */ String[] arrayOfString = param2String.split(\";\");\n/* 468 */ this.filters = new ArrayList<>(arrayOfString.length);\n/* 469 */ for (byte b = 0; b < arrayOfString.length; b++) {\n/* 470 */ String str = arrayOfString[b];\n/* 471 */ int i = str.length();\n/* 472 */ if (i != 0)\n/* */ {\n/* */ \n/* 475 */ if (!parseLimit(str)) {\n/* */ \n/* */ \n/* */ \n/* 479 */ boolean bool = (str.charAt(0) == '!') ? true : false;\n/* */ \n/* 481 */ if (str.indexOf('/') >= 0) {\n/* 482 */ throw new IllegalArgumentException(\"invalid character \\\"/\\\" in: \\\"\" + param2String + \"\\\"\");\n/* */ }\n/* */ \n/* 485 */ if (str.endsWith(\"*\")) {\n/* */ \n/* 487 */ if (str.endsWith(\".*\")) {\n/* */ \n/* 489 */ String str1 = str.substring(bool ? 1 : 0, i - 1);\n/* 490 */ if (str1.length() < 2) {\n/* 491 */ throw new IllegalArgumentException(\"package missing in: \\\"\" + param2String + \"\\\"\");\n/* */ }\n/* 493 */ if (bool) {\n/* */ \n/* 495 */ this.filters.add(param2Class -> matchesPackage(param2Class, param2String) ? ObjectInputFilter.Status.REJECTED : ObjectInputFilter.Status.UNDECIDED);\n/* */ } else {\n/* */ \n/* 498 */ this.filters.add(param2Class -> matchesPackage(param2Class, param2String) ? ObjectInputFilter.Status.ALLOWED : ObjectInputFilter.Status.UNDECIDED);\n/* */ } \n/* 500 */ } else if (str.endsWith(\".**\")) {\n/* */ \n/* 502 */ String str1 = str.substring(bool ? 1 : 0, i - 2);\n/* 503 */ if (str1.length() < 2) {\n/* 504 */ throw new IllegalArgumentException(\"package missing in: \\\"\" + param2String + \"\\\"\");\n/* */ }\n/* 506 */ if (bool) {\n/* */ \n/* 508 */ this.filters.add(param2Class -> param2Class.getName().startsWith(param2String) ? ObjectInputFilter.Status.REJECTED : ObjectInputFilter.Status.UNDECIDED);\n/* */ } else {\n/* */ \n/* 511 */ this.filters.add(param2Class -> param2Class.getName().startsWith(param2String) ? ObjectInputFilter.Status.ALLOWED : ObjectInputFilter.Status.UNDECIDED);\n/* */ } \n/* */ } else {\n/* */ \n/* 515 */ String str1 = str.substring(bool ? 1 : 0, i - 1);\n/* 516 */ if (bool) {\n/* */ \n/* 518 */ this.filters.add(param2Class -> param2Class.getName().startsWith(param2String) ? ObjectInputFilter.Status.REJECTED : ObjectInputFilter.Status.UNDECIDED);\n/* */ } else {\n/* */ \n/* 521 */ this.filters.add(param2Class -> param2Class.getName().startsWith(param2String) ? ObjectInputFilter.Status.ALLOWED : ObjectInputFilter.Status.UNDECIDED);\n/* */ } \n/* */ } \n/* */ } else {\n/* 525 */ String str1 = str.substring(bool ? 1 : 0);\n/* 526 */ if (str1.isEmpty()) {\n/* 527 */ throw new IllegalArgumentException(\"class or package missing in: \\\"\" + param2String + \"\\\"\");\n/* */ }\n/* */ \n/* 530 */ if (bool) {\n/* */ \n/* 532 */ this.filters.add(param2Class -> param2Class.getName().equals(param2String) ? ObjectInputFilter.Status.REJECTED : ObjectInputFilter.Status.UNDECIDED);\n/* */ } else {\n/* */ \n/* 535 */ this.filters.add(param2Class -> param2Class.getName().equals(param2String) ? ObjectInputFilter.Status.ALLOWED : ObjectInputFilter.Status.UNDECIDED);\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ private boolean isEmpty() {\n/* 547 */ return (this.filters.isEmpty() && this.maxArrayLength == Long.MAX_VALUE && this.maxDepth == Long.MAX_VALUE && this.maxReferences == Long.MAX_VALUE && this.maxStreamBytes == Long.MAX_VALUE);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ private boolean parseLimit(String param2String) {\n/* 563 */ int i = param2String.indexOf('=');\n/* 564 */ if (i < 0)\n/* */ {\n/* 566 */ return false;\n/* */ }\n/* 568 */ String str = param2String.substring(i + 1);\n/* 569 */ if (param2String.startsWith(\"maxdepth=\")) {\n/* 570 */ this.maxDepth = parseValue(str);\n/* 571 */ } else if (param2String.startsWith(\"maxarray=\")) {\n/* 572 */ this.maxArrayLength = parseValue(str);\n/* 573 */ } else if (param2String.startsWith(\"maxrefs=\")) {\n/* 574 */ this.maxReferences = parseValue(str);\n/* 575 */ } else if (param2String.startsWith(\"maxbytes=\")) {\n/* 576 */ this.maxStreamBytes = parseValue(str);\n/* */ } else {\n/* 578 */ throw new IllegalArgumentException(\"unknown limit: \" + param2String.substring(0, i));\n/* */ } \n/* 580 */ return true;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ private static long parseValue(String param2String) throws IllegalArgumentException {\n/* 591 */ long l = Long.parseLong(param2String);\n/* 592 */ if (l < 0L) {\n/* 593 */ throw new IllegalArgumentException(\"negative limit: \" + param2String);\n/* */ }\n/* 595 */ return l;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public ObjectInputFilter.Status checkInput(ObjectInputFilter.FilterInfo param2FilterInfo) {\n/* 603 */ if (param2FilterInfo.references() < 0L || param2FilterInfo\n/* 604 */ .depth() < 0L || param2FilterInfo\n/* 605 */ .streamBytes() < 0L || param2FilterInfo\n/* 606 */ .references() > this.maxReferences || param2FilterInfo\n/* 607 */ .depth() > this.maxDepth || param2FilterInfo\n/* 608 */ .streamBytes() > this.maxStreamBytes) {\n/* 609 */ return ObjectInputFilter.Status.REJECTED;\n/* */ }\n/* */ \n/* 612 */ Class<?> clazz = param2FilterInfo.serialClass();\n/* 613 */ if (clazz != null) {\n/* 614 */ if (clazz.isArray()) {\n/* 615 */ if (param2FilterInfo.arrayLength() >= 0L && param2FilterInfo.arrayLength() > this.maxArrayLength)\n/* */ {\n/* 617 */ return ObjectInputFilter.Status.REJECTED;\n/* */ }\n/* 619 */ if (!this.checkComponentType)\n/* */ {\n/* 621 */ return ObjectInputFilter.Status.UNDECIDED;\n/* */ }\n/* */ \n/* */ do {\n/* 625 */ clazz = clazz.getComponentType();\n/* 626 */ } while (clazz.isArray());\n/* */ } \n/* */ \n/* 629 */ if (clazz.isPrimitive())\n/* */ {\n/* 631 */ return ObjectInputFilter.Status.UNDECIDED;\n/* */ }\n/* */ \n/* 634 */ Class<?> clazz1 = clazz;\n/* */ \n/* */ \n/* */ \n/* 638 */ Optional<ObjectInputFilter.Status> optional = this.filters.stream().map(param2Function -> (ObjectInputFilter.Status)param2Function.apply(param2Class)).filter(param2Status -> (param2Status != ObjectInputFilter.Status.UNDECIDED)).findFirst();\n/* 639 */ return optional.orElse(ObjectInputFilter.Status.UNDECIDED);\n/* */ } \n/* */ \n/* 642 */ return ObjectInputFilter.Status.UNDECIDED;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ private static boolean matchesPackage(Class<?> param2Class, String param2String) {\n/* 654 */ String str = param2Class.getName();\n/* 655 */ return (str.startsWith(param2String) && str.lastIndexOf('.') == param2String.length() - 1);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public String toString() {\n/* 664 */ return this.pattern;\n/* */ }\n/* */ }\n/* */ }\n/* */ }", "public static void main(String[] args) {\n\n Function<String, String> function1 = (string) -> string +string;\n System.out.println(function1.apply(\"aaa\"));\n\n Function<String,String> function2 =s -> new String(s);\n System.out.println(function2.apply(function2.apply(\"sss\")));\n\n// Function<String, Emp> function = s -> new Emp(s);\n// System.out.println(function.apply(\"yy\"));\n\n Function<String, Emp> function3 = Emp::new;\n System.out.println(function3.apply(\"yy\"));\n }", "@FunctionalInterface\ninterface ConverterInterface<F, T> {\n T convert(F from);\n}", "public static Stream<StreamAnimal> generateStreamOfAnimals_methodRef() {\n Stream<StreamAnimal> resultStream = Stream.generate(\n AnimalGenerator::getNewAnimal\n );\n\n return resultStream;\n }", "public void callLazystream()\n {\n\n Stream<String> stream = list.stream().filter(element -> {\n wasCalled();\n System.out.println(\"counter in intermediate operations:\" + counter);\n return element.contains(\"2\");\n });\n\n System.out.println(\"counter in intermediate operations:\" + counter);\n }", "@FunctionalInterface\n protected interface StreamReader<ReaderType> {\n void accept(RevisionDataInput input, ReaderType target) throws IOException;\n }" ]
[ "0.6021856", "0.535267", "0.5323074", "0.528356", "0.5191829", "0.517792", "0.51174325", "0.50456786", "0.50453025", "0.5027087", "0.50229484", "0.49470735", "0.49394068", "0.49325463", "0.48844677", "0.48725748", "0.48430732", "0.48416075", "0.48412493", "0.48157322", "0.4814591", "0.48127162", "0.4797789", "0.47697365", "0.47165632", "0.46994114", "0.4690573", "0.46801457", "0.46683228", "0.46613747", "0.4650867", "0.4645546", "0.46452436", "0.4641525", "0.46108726", "0.46046594", "0.45944345", "0.45911488", "0.4589467", "0.45877406", "0.45851776", "0.45821264", "0.457855", "0.4573845", "0.4572606", "0.45630157", "0.45573106", "0.4552404", "0.45512778", "0.45488414", "0.45430067", "0.45351666", "0.45109126", "0.4503459", "0.44974908", "0.44940004", "0.4478024", "0.44636557", "0.44552597", "0.44499946", "0.4443995", "0.44287267", "0.4418974", "0.4413331", "0.44127086", "0.44002718", "0.43970925", "0.4386388", "0.4384278", "0.43763635", "0.43757352", "0.4371141", "0.4367834", "0.43584293", "0.43513733", "0.434659", "0.4342826", "0.43363547", "0.4336234", "0.4334234", "0.43314674", "0.43275246", "0.43246087", "0.4319172", "0.43136755", "0.43098703", "0.4304824", "0.42995423", "0.4298609", "0.42969888", "0.42947882", "0.42937183", "0.42866102", "0.42831993", "0.42787334", "0.4270454", "0.4268437", "0.42684004", "0.42639375", "0.42628324" ]
0.5258798
4
Returns an unmodifiable view of the backing list.
public List<Tag> getAsList() { return Collections.unmodifiableList(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ObservableList<T> getReadOnlyList();", "LazyStringList getUnmodifiableView();", "public interface ReadOnlyListManager<T> {\n /**\n * Returns an unmodifiable view of the list.\n * This list will not contain any duplicate elements.\n */\n\n ObservableList<T> getReadOnlyList();\n}", "@Override\r\n public ListADT<T> toImmutable() {\r\n return new ImmutableListADTImpl<T>(new ListADTImpl<T>(this.head));\r\n }", "public DOCKSList getList() {\r\n return localList;\r\n }", "@Override\r\n public ListADT<T> toMutable() {\r\n return new ListADTImpl<T>(this.head);\r\n }", "public java.util.List<People> getFriendListList() {\n return java.util.Collections.unmodifiableList(\n instance.getFriendListList());\n }", "public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n if (tmp != null)\r\n result.add(tmp);\r\n }\r\n\r\n return result;\r\n }", "public interface ReadOnlyTaskList {\n\n\tUniqueTaskList getUniqueTaskList();\n\n\t/**\n\t * Returns an unmodifiable view of tasks list\n\t */\n\tList<ReadOnlyTask> getTaskList();\n}", "public interface ReadOnlyAttractionList {\n\n /**\n * Returns an unmodifiable view of the attraction list.\n * This list will not contain any duplicate attractions.\n */\n ObservableList<Attraction> getAttractionList();\n\n}", "public List<T> getCopyOfUnfilteredItemList(){\n synchronized (listsLock){\n if (originalList != null){\n return new ArrayList<T>(originalList);\n } else {\n // if original list is null filtered list is unfiltered\n return new ArrayList<T>(filteredList);\n }\n }\n }", "public DList2 list(){\r\n return this.list;\r\n }", "@SuppressWarnings({\"unchecked\", \"cast\"})\n public List<Access> getTypeBoundListNoTransform() {\n return (List<Access>)getChildNoTransform(2);\n }", "public java.util.List<People> getUserList() {\n return java.util.Collections.unmodifiableList(\n instance.getUserList());\n }", "public interface ListReadOnly<T> {\n /**\n * Returns the number of elements in this list.\n *\n * @return The number of elements in this list.\n */\n\n public int size();\n\n\n /**\n * Returns the element at the specified position in this list.\n *\n * @param index Index of the element to return\n * @return The element at the specified position in this list.\n * @throws IndexOutOfBoundsException If the index is out of range\n * (<code>index &lt; 0 || index &gt;= size()</code>)\n */\n public T get(int index);\n}", "protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }", "public static <T> List<T> unmodifiableList(List<T> original) {\n ArrayList<T> list = new ArrayList<>(original.size());\n original.forEach(list::add);\n return Collections.unmodifiableList(list);\n }", "public Object[] getBackingArray() {\n return backing;\n }", "public final List getList()\n {\n return this.list;\n }", "private List<E> snapshot() {\n\t\tList<E> list = Lists.newArrayListWithExpectedSize(size());\n\t\tfor (Multiset.Entry<E> entry : entrySet()) {\n\t\t\tE element = entry.getElement();\n\t\t\tfor (int i = entry.getCount(); i > 0; i--) {\n\t\t\t\tlist.add(element);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public List getFieldValues()\n {\n return (List) m_values.clone();\n }", "public List<E> clone();", "public List<String> getMutterListLocal() {\r\n return mutterListLocal;\r\n }", "public interface ReadOnlyEndTimes {\n\n /**\n * Returns an unmodifiable view of the endTimes list.\n * This list will not contain any duplicate endTimes.\n */\n ObservableList<EndTime> getEndTimeList();\n\n}", "public interface ReadOnlyWhatNow {\n\n UniqueTagList getUniqueTagList();\n\n UniqueTaskList getUniqueTaskList();\n\n /**\n * Returns an unmodifiable view of tasks list\n */\n List<ReadOnlyTask> getTaskList();\n\n /**\n * Returns an unmodifiable view of tags list\n */\n List<Tag> getTagList();\n\n}", "@Deprecated\n public synchronized List getOutputList() {\n return (List)listStack.peek();\n }", "public com.google.protobuf.ProtocolStringList\n getListList() {\n return list_.getUnmodifiableView();\n }", "@Override\n public synchronized WebBackForwardList clone() {\n return new WebBackForwardListImpl(this);\n }", "abstract List<T> getReuslt();", "public List<VlanId> getVlanList() { return Collections.unmodifiableList(vlanList); }", "Object getTolist();", "ObservableList<Deliverable> getInternalDeliverableList();", "public ArrayList<User> getUserList () {\n return (ArrayList<User>)Users.clone();\n \n }", "public List getList(List oldList) {\n List newList = new ArrayList();\n Collections.copy(newList, oldList);\n return newList;\n }", "public CopyOnWriteArrayList<Player> getPlayerList() \t\t\t\t\t\t\t{ return this.playerList; }", "@Override\n\tpublic SecuredRDFList copy();", "abstract List<String> getForwarded();", "public Object[] getBackingArray() {\r\n return backingArray;\r\n }", "private List<Multiset.Entry<E>> snapshot() {\n\t\t\tList<Multiset.Entry<E>> list = Lists\n\t\t\t\t\t.newArrayListWithExpectedSize(size());\n\t\t\tfor (Multiset.Entry<E> entry : this) {\n\t\t\t\tlist.add(entry);\n\t\t\t}\n\t\t\treturn list;\n\t\t}", "public static java.util.List unmodifiableList(java.util.List arg0)\n { return null; }", "@SuppressWarnings(\"unchecked\")\n public <O> List<O> inactiveVersions() {\n return (List<O>) journal.journal\n .retrieve(BarbelQueries.allInactive(journal.id), BarbelQueryOptions.sortAscendingByEffectiveFrom())\n .stream().collect(Collectors.toList());\n }", "@Test\r\n public void testImmutableObservableList() {\r\n ObservableList data = createObservableList(true);\r\n ImmutableObservableList immutable = new ImmutableObservableList<>(data);\r\n ListChangeReport report = new ListChangeReport(immutable);\r\n immutable.setBackingList(null);\r\n assertEquals(1, report.getEventCount());\r\n assertTrue(\"expected single removed\", wasSingleRemoved(report.getLastChange()));\r\n report.clear();\r\n immutable.setBackingList(data);\r\n assertEquals(1, report.getEventCount());\r\n assertTrue(\"expected singe added\", wasSingleAdded(report.getLastChange()));\r\n report.clear();\r\n ObservableList other = FXCollections.observableArrayList(\"onxe\", \"tewo\", \"other\");\r\n immutable.setBackingList(other);\r\n assertEquals(1, report.getEventCount());\r\n// report.prettyPrint();\r\n assertTrue(\"expected single replaced\", wasSingleReplaced(report.getLastChange()));\r\n }", "protected Object[] getList() {\n return list;\n }", "public List<BeanDescriptor<?>> descriptorList() {\n return immutableDescriptorList;\n }", "public List<BookListItem> getMyOwnedBooksList() {\n return myOwnedBookList;\n }", "public ReferenceList getRefList( )\n {\n return _refList;\n }", "@ApiStatus.Internal\n default boolean isListable() {\n \n return false;\n }", "public List<String> getList() {\n return Collections.unmodifiableList(_model.getList());\n }", "public interface ReadOnlyAddressBook {\n\n /**\n * Returns an unmodifiable view of the tags list.\n * This list will not contain any duplicate tags.\n */\n ObservableList<Tag> getTagList();\n\n /**\n * Returns an unmodifiable view of the cards list.\n * This list will not contain any duplicate cards.\n */\n ObservableList<Card> getCardList();\n\n CardTag getCardTag();\n}", "private List getList() {\n if(itemsList == null) {\n itemsList = new ArrayList<>();\n }\n return itemsList;\n }", "@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }", "@Override\n public List<Object> list() {\n return null;\n }", "private JList getHistoryList() {\n if (historyList == null) {\n historyList = new JList();\n historyList.setModel(new ListListModel(new ArrayList()));\n historyList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n historyList.setCellRenderer(new HistoryListCellRenderer());\n historyList.addListSelectionListener(new ListSelectionListener() {\n\n public void valueChanged(ListSelectionEvent e) {\n final History history = (History) historyList.getSelectedValue();\n\n getViewPanel().setHistory(history);\n\n /*\n * Toggle the buttons off if no action needs to be taken\n */\n\n if (!isLocked() && getUserAccount().isAdministrator()) {\n final OkCancelButtonPanel panel = getButtonPanel();\n\n panel.getOkayButton().setEnabled((history != null) && !history.isProcessed());\n panel.getCancelButton().setEnabled((history != null) && !history.isProcessed());\n }\n\n }\n\n });\n }\n\n return historyList;\n }", "public synchronized List<Item> getItems()\n\t{\n\t\t/**\n\t\t * TODO Q: Deep copy override clone in Item?\n\t\t * pre-condition: List not null;\n\t\t * Invariant:size list of active items cannot more than server capacity\n\t\t * post-condition:return the copy of items in the list.\n\t\t * Exception: list size more than server capacity.\n\t\t */\n\t\t// TODO: IMPLEMENT CODE HERE\n\t\t// Some reminders:\n\t\t// Don't forget that whatever you return is now outside of your control.\n\t\treturn new ArrayList<>(itemsUpForBidding);\n\t}", "public ArrayList getList() {\n \t\treturn list;\n \t}", "public java.util.List<com.google.protobuf.ByteString>\n getCachedList() {\n return java.util.Collections.unmodifiableList(cached_);\n }", "DiskInvertedList getActiveList() {\n if (indexPhase.get() % 2 > 0) {\n return oddInvertedList;\n } else {\n return evenInvertedList;\n }\n }", "public List<I> get() {\n synchronized (refs) {\n List<I> res = new ArrayList<>();\n for (Iterator<WeakReference<I>> iterator = refs.iterator(); iterator.hasNext(); ) {\n WeakReference<I> ref = iterator.next();\n I instance = ref.get();\n if (instance == null) {\n iterator.remove();\n } else {\n res.add(instance);\n }\n }\n return res;\n }\n }", "public JList obtenirList() {\r\n\t\treturn list;\r\n\t}", "public T[] getBackingArray() {\n return backingArray;\n }", "public void remove()\r\n { Exceptions.unmodifiable(\"list\"); }", "public ArrayList<E> clone() {\n ArrayList<E> temp = new ArrayList<E>();\n temp.size = this.size;\n temp.capacity = this.capacity;\n temp.list = Arrays.copyOf(this.list, this.list.length);\n return temp;\n }", "public ArrayList<T> getAsList(){\r\n return arrayList;\r\n }", "public T[] getMyList() {\n\n return myList;\n }", "public java.util.List<java.lang.Integer>\n getItemList() {\n return ((bitField0_ & 0x00000001) != 0) ?\n java.util.Collections.unmodifiableList(item_) : item_;\n }", "public List<String> getMemberList()\n\t{\n\t\treturn source.getMemberList();\n\t}", "public ImmutableList<T> allExtant() {\n return ImmutableList.<T>builder().addAll(unchanged).addAll(changed).build();\n }", "public static <T> List<T> copyToUnmodifiableList(List<T> list)\n {\n if (list != null)\n {\n List<T> listCopy = new ArrayList(list);\n return Collections.unmodifiableList(listCopy);\n }\n else\n {\n return Collections.emptyList();\n }\n }", "public List getList() {\n return Arrays.asList(toJavaArray()); \n }", "public List<Entry<T>> getEntries() {\n return Collections.unmodifiableList(entries);\n }", "public List<Item> getItems() {\n return Collections.unmodifiableList(items);\n }", "public java.util.List getList() {\n\t\treturn list;\n\t}", "public List<String> getNotExportedSearchableFields() {\n return Collections.unmodifiableList(notExportedSearchableFields);\n }", "public ImmutableList<Member> getMembers() {\n return ImmutableList.copyOf(members);\n }", "public interface ReadOnlyCardCollection extends Observable {\n\n /**\n * Returns an unmodifiable view of the flashcards list.\n * This list will not contain any duplicate flashcards.\n */\n ObservableList<Flashcard> getFlashcardList();\n\n}", "private List<ConnectionSetup> createDetachedSnapshotOfCollection() {\n return Collections.unmodifiableList(new ArrayList<ConnectionSetup>(setups));\n }", "public java.util.List<SeenInfo> getSeenInfoList() {\n return java.util.Collections.unmodifiableList(\n instance.getSeenInfoList());\n }", "public List<T> getItems() {\n return SerDes.unmirrorList(getElement().getItems(), getItemClass());\n }", "public interface List<E> {\n\n /**\n * Return number of elements in the list\n * @return Number of elements\n */\n int size();\n\n /**\n * Returns whether the list is empty\n * @return True if the list is empty, false otherwise\n */\n boolean isEmpty();\n\n /**\n * Returns the element at index i\n * @param i Index\n * @return Element at i\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n E get(int i) throws IndexOutOfBoundsException;\n\n /**\n * Replaces the element at index i with e, and returns the replaced element\n * @param i Index\n * @param e New element\n * @return Element replaced by e\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n E set(int i, E e) throws IndexOutOfBoundsException;\n\n /**\n * Inserts element e to be at index i, shifting all subsequent elements later\n * @param i Index\n * @param e New element\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n void add(int i, E e) throws IndexOutOfBoundsException;\n\n /**\n * Removes and returns the element at index i, shifting subsequent elements\n * earlier\n * @param i Index\n * @return Element previously at i\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n E remove(int i) throws IndexOutOfBoundsException;\n\n /**\n * Empty the list\n */\n public void clear();\n\n /**\n * Construct a clone (copy) of the object.\n * @return New list object with the same structure. This copy should be\n * shallow, i.e., the individual elements are not cloned.\n */\n public List<E> clone();\n}", "@Override\r\n\tpublic List getAccountList() {\n\t\treturn null;\r\n\t}", "public interface ReadOnlyTagBook {\n\n /**\n * Returns an unmodifiable view of the tag list.\n * This list will not contain any duplicate tags.\n */\n List<Tag> getTagList();\n\n}", "public Collection getUnproxyable() {\n return _unproxyable;\n }", "Object back()\n\t{\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call back() on empty List\");\n\t\t}\n\t\treturn back.data;\n\t}", "public Collection<T> getItems() {\r\n return Collections.unmodifiableCollection(items);\r\n }", "public List<T> getList() {\n\t\treturn list;\n\t}", "java.util.List<com.google.protobuf.ByteString> getCachedList();", "public List<String> getImmutableViewOfField3() {\n return List.of(field3);\n }", "protected List ensureDisplayList()\n {\n if (m_listDisplay == null)\n {\n m_listDisplay = new LinkedList();\n }\n return m_listDisplay;\n }", "protected List<Request> requestList() {\n return Collections.unmodifiableList(mRequestList);\n }", "@Override\r\n\tpublic List<MemberRefGd> getMemberRefList() {\r\n\t\t//\r\n\t\treturn this.memberRefDgMap.valueList();\r\n\t}", "public Item[] getList() {\n\t\treturn list;\n\t}", "public List<Tile> getOwnedTiles() {\n return new ArrayList<Tile>(ownedTiles);\n }", "public List<Item> getItems() {\n\t\treturn Collections.unmodifiableList(items);\n\t}", "public Breeder[] getBreederList() {\n Breeder[] copyBreeders = new Breeder[breederList.length];\n for(int i = 0; i < breederList.length; i++){\n copyBreeders[i] = breederList[i].softClone(this);\n }\n return copyBreeders;\n }", "public List<String> getEditedUsersList() {\n return editedUsersList;\n }", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public Object[] backingArray()\n {\n return array;\n }", "@Override\n\tpublic List<User> get() {\n\t\treturn null;\n\t}", "public List<ChunkData> getAccess() {\n return access;\n }", "public List getList() throws HibException;" ]
[ "0.69747555", "0.68468136", "0.65539366", "0.64217544", "0.6348116", "0.6267773", "0.6237751", "0.62024117", "0.60981774", "0.60443366", "0.60275614", "0.60011464", "0.59972423", "0.59212404", "0.59145224", "0.59006536", "0.5870722", "0.5870264", "0.5863064", "0.58536273", "0.5843926", "0.5793822", "0.57680964", "0.576318", "0.5760771", "0.57520443", "0.5744736", "0.5740644", "0.57393545", "0.57279485", "0.5724815", "0.572319", "0.57212216", "0.56529313", "0.56470805", "0.5637463", "0.5634983", "0.5632602", "0.5632026", "0.5628031", "0.56237596", "0.5617983", "0.56132865", "0.5612653", "0.561088", "0.56096613", "0.5608228", "0.5607418", "0.56045127", "0.55928123", "0.5592737", "0.5588119", "0.5586283", "0.5581511", "0.55741066", "0.55700713", "0.5551919", "0.5542883", "0.55405426", "0.55325854", "0.5529125", "0.55198896", "0.55196357", "0.5518694", "0.55037874", "0.55037165", "0.549809", "0.54918563", "0.5489524", "0.54861504", "0.54802614", "0.5476156", "0.5466095", "0.5457174", "0.5453786", "0.544274", "0.54408616", "0.542783", "0.5404345", "0.540429", "0.54012364", "0.5398628", "0.5393111", "0.53924894", "0.53757906", "0.5374819", "0.53724444", "0.5367497", "0.5366724", "0.53642666", "0.5358657", "0.5357996", "0.53540665", "0.5347042", "0.53440946", "0.5343443", "0.53396815", "0.5325736", "0.53188634", "0.5316422" ]
0.5456037
74
Calculate SHA1 hash of (nonce|certificate).
static byte[] calculateHash(byte[] nonce, @Nullable Certificate certificate) { try { MessageDigest digest = MessageDigest.getInstance("SHA-1"); digest.update(nonce); if (certificate != null) { digest.update(certificate.getEncoded()); } else { LOG.warn( "No client certificate available. Cannot bind nonce to public key to prevent masquerading attack. TLS misconfiguration!"); } return digest.digest(); } catch (Exception e1) { LOG.error("Could not create hash of own nonce and local certificate", e1); return nonce; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HASH256 getHash1(){return hash1;}", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "public static String GetHash(String input)\n {\n String hash = DigestUtils.sha1Hex(input);\n System.out.println(hash);\n return hash;\n }", "public static String toSHA1(String filename){\n\t\tMessageDigest md=null;\n\t\ttry{\n\t\t\tmd = MessageDigest.getInstance(\"SHA-1\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tFileInputStream in = new FileInputStream(filename);\n\t\t\tBufferedInputStream buffIn = new BufferedInputStream(in);\n\t\t\tDigestInputStream dis = new DigestInputStream(buffIn, md);\n\t\t\t\n\t\t\tFile f = new File(filename);\n\t\t\tLong fileSize = f.length();\n\t\t\t\n\t\t\tString blob = \"blob \" + fileSize.toString() + '\\0';\n\t\t\tmd.update(blob.getBytes());\n\t\t\t\t\t\t\n\t\t\t// read the file and update the hash calculation\n while (dis.read() != -1);\n\n // get the hash value as byte array\n byte[] hash = md.digest();\n\n return byteArray2Hex(hash);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t\treturn \"\";\n\t}", "public static String SHA1(String string) throws XLWrapException {\n MessageDigest md;\n try {\n md = MessageDigest.getInstance(\"SHA-1\");\n } catch (NoSuchAlgorithmException e) {\n throw new XLWrapException(\"SHA-1 message digest is not available.\");\n }\n byte[] data = new byte[40];\n md.update(string.getBytes());\n data = md.digest();\n StringBuffer buf = new StringBuffer();\n for (int i = 0; i < data.length; i++) {\n int halfbyte = (data[i] >>> 4) & 0x0F;\n int two_halfs = 0;\n do {\n if ((0 <= halfbyte) && (halfbyte <= 9)) buf.append((char) ('0' + halfbyte)); else buf.append((char) ('a' + (halfbyte - 10)));\n halfbyte = data[i] & 0x0F;\n } while (two_halfs++ < 1);\n }\n return buf.toString();\n }", "public static String sha1Hex(String message) throws CheckPasswordException {\n \n \ttry {\n \t\t\n \t\tMessageDigest md = MessageDigest.getInstance(\"SHA-1\");\n \t\tbyte[] digest = md.digest(message.getBytes());\n\n BigInteger bi = new BigInteger(1, digest);\n return String.format(\"%0\" + (digest.length << 1) + \"X\", bi);\n \n \t} catch (NoSuchAlgorithmException e) {\n \t\t// This should never happen; all modern Java versions require the platform to support SHA-1\n \t\tthrow new CheckPasswordException(\"Unable to perform SHA-1 hash, algorithm not found\", CheckPasswordErrorCode.BadConfiguration);\n \t}\n \n }", "public static byte[] encryptSHA1(final byte[] data) {\n return hashTemplate(data, \"SHA-1\");\n }", "public static String sha1(String s) {\n MessageDigest digest = createDigest(\"SHA-1\");\n byte[] result = digest.digest(s.getBytes(Charset.forName(\"UTF-8\")));\n return toBase64(result);\n }", "public static byte[] generateSHA1(byte[] bytes) {\n byte[] encryted = null;\n try {\n MessageDigest digest = MessageDigest.getInstance(\"SHA-1\");\n digest.reset();\n digest.update(bytes);\n encryted = digest.digest();\n\n } catch (Exception e) {\n Logger.e(\"Error generating SHA1. \" + e.getMessage());\n }\n return encryted;\n }", "@Test\n public void testCreateSha1() throws Exception {\n MessageDigest sha1 = MessageDigest.getInstance(MASTER_KEY_GENERATION_ALG);\n byte[] sha1Result = sha1.digest(SHA_1_INPUT);\n assertFalse(Arrays.equals(SHA_1_INPUT, sha1Result));\n }", "public String hmacSha1(String value) {\n try {\n // Get an hmac_sha1 key from the raw key bytes\n byte[] keyBytes = secretkey;\n SecretKeySpec signingKey = new SecretKeySpec(keyBytes, \"HmacSHA1\");\n // Get an hmac_sha1 Mac instance and initialize with the signing key\n Mac mac = Mac.getInstance(\"HmacSHA1\");\n mac.init(signingKey);\n // Compute the hmac on input data bytes\n byte[] rawHmac = mac.doFinal(fromBase64(value));\n hmacLenght = (byte) rawHmac.length;\n // Sh.d(\"h: \"+rawHmac.length);\n // Convert raw bytes to Hex\n/* byte[] hexBytes = new Hex().encode(rawHmac);\n // Covert array of Hex bytes to a String\n return new String(hexBytes, ENCODING);*/\n return ivmacToString(rawHmac);\n } catch (Exception e) {\n Sh.d(\"hmac exc :\"+e.getMessage());\n throw new RuntimeException(e);\n }\n }", "byte[] digest();", "byte[] getDigest();", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public static byte[] computeSHA1HMac(String data, String cookie) throws GeneralSecurityException {\n byte[] hash;\n MessageDigest digest = MessageDigest.getInstance(\"SHA-1\");\n hash = digest.digest(cookie.getBytes());\n byte[] hmacResult;\n Mac hm;\n hm = Mac.getInstance(\"HMacSHA1\");\n Key k1 = new SecretKeySpec(hash, 0, hash.length, \"HMacSHA1\");\n hm.init(k1);\n return hm.doFinal(data.getBytes());\n }", "public long getSha2();", "public byte[] hmacSha1(byte[] value) {\n try {\n // Get an hmac_sha1 key from the raw key bytes\n byte[] keyBytes = secretkey;\n SecretKeySpec signingKey = new SecretKeySpec(keyBytes, \"HmacSHA1\");\n // Get an hmac_sha1 Mac instance and initialize with the signing key\n Mac mac = Mac.getInstance(\"HmacSHA1\");\n mac.init(signingKey);\n // Compute the hmac on input data bytes\n byte[] rawHmac = mac.doFinal(value);\n // hmacLenght = (byte) rawHmac.length;\n // Sh.d(\"h: \"+rawHmac.length);\n // Convert raw bytes to Hex\n/* byte[] hexBytes = new Hex().encode(rawHmac);\n // Covert array of Hex bytes to a String\n return new String(hexBytes, ENCODING);*/\n return rawHmac;\n //todo changed ^\n } catch (Exception e) {\n Sh.d(\"hmac exc :\"+e.getMessage());\n throw new RuntimeException(e);\n }\n }", "static String sha1(Object... vals) {\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-1\");\n for (Object val : vals) {\n if (val instanceof byte[]) {\n md.update((byte[]) val);\n } else if (val instanceof String) {\n md.update(((String) val).getBytes(StandardCharsets.UTF_8));\n } else {\n throw new IllegalArgumentException(\"improper type to sha1\");\n }\n }\n Formatter result = new Formatter();\n for (byte b : md.digest()) {\n result.format(\"%02x\", b);\n }\n return result.toString();\n } catch (NoSuchAlgorithmException excp) {\n throw new IllegalArgumentException(\"System does not support SHA-1\");\n }\n }", "public void testX509EncryptionSHA1() throws Exception {\n WSSecEncrypt builder = new WSSecEncrypt();\n builder.setUserInfo(\"16c73ab6-b892-458f-abf5-2f875f74882e\", \"security\");\n builder.setKeyIdentifierType(WSConstants.ENCRYPTED_KEY_SHA1_IDENTIFIER);\n builder.setUseKeyIdentifier(true);\n \n LOG.info(\"Before Encrypting EncryptedKeySHA1....\");\n Document doc = unsignedEnvelope.getAsDocument();\n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc); \n Document encryptedDoc = builder.build(doc, crypto, secHeader);\n \n String outputString = \n org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedDoc);\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Encrypted message with ENCRYPTED_KEY_SHA1_IDENTIFIER:\");\n LOG.debug(outputString);\n }\n assertTrue(outputString.indexOf(\"#EncryptedKeySHA1\") != -1);\n \n LOG.info(\"After Encrypting EncryptedKeySHA1....\");\n verify(encryptedDoc);\n }", "public static String getSHA1(File file) throws IOException, NoSuchAlgorithmException {\n return getChecksum(file, MessageDigest.getInstance(\"SHA1\"));\n }", "private byte[] getKeyHashFromCertHolder(X509CertificateHolder certHolder)\n {\n SubjectPublicKeyInfo info = certHolder.getSubjectPublicKeyInfo();\n try\n {\n return MessageDigest.getInstance(\"SHA-1\").digest(info.getPublicKeyData().getBytes());\n }\n catch (NoSuchAlgorithmException ex)\n {\n // should not happen\n LOG.error(\"SHA-1 Algorithm not found\", ex);\n return new byte[0];\n }\n }", "@Test\n public void testCreateHmacSha1() throws Exception {\n Mac macAlgorithm = Mac.getInstance(MAC_ALGORITHM_STRING);\n macAlgorithm.init(new SecretKeySpec(K_AUT, MAC_ALGORITHM_STRING));\n byte[] mac = macAlgorithm.doFinal(MAC_INPUT);\n assertFalse(Arrays.equals(MAC_INPUT, mac));\n }", "public int hashCode() {\n if (myhash == -1) {\n myhash = timestamp.hashCode() + signerCertPath.hashCode();\n }\n return myhash;\n }", "public String getSHA1() {\n return m_module.getConfiguration().getSha1();\n }", "public String getSHA1Key() {\n return simSpec.getSHA1CheckoutKey();\n }", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getSHA(String input) {\n byte[] messageDigest = md.digest(input.getBytes());\n String padding = \"00000000000000000000000000000000\";\n String returnValue;\n\n // Convert byte array into signum representation\n BigInteger no = new BigInteger(1, messageDigest);\n\n // Convert message digest into hex value\n String hashtext = no.toString(16);\n\n // pad with zeros of not long enough\n if (hashtext.length() < 32) {\n returnValue = padding.substring(0, 32-hashtext.length()) + hashtext;\n } else {\n returnValue = hashtext;\n }\n\n return returnValue;\n }", "private static String pasarAHexadecimal(byte[] digest){\n String hash = \"\";\n for(byte aux : digest) {\n int b = aux & 0xff;\n if (Integer.toHexString(b).length() == 1) hash += \"0\";\n hash += Integer.toHexString(b);\n }\n return hash;\n }", "private String hash(){\r\n return Utility.SHA512(this.simplify());\r\n }", "public static String hash(String st) {\r\n MessageDigest messageDigest = null;\r\n byte[] digest = new byte[0];\r\n\r\n try {\r\n messageDigest = MessageDigest.getInstance(\"SHA-256\");\r\n messageDigest.reset();\r\n messageDigest.update(st.getBytes());\r\n digest = messageDigest.digest();\r\n } catch (NoSuchAlgorithmException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n BigInteger bigInt = new BigInteger(1, digest);\r\n StringBuilder hex = new StringBuilder(bigInt.toString(16));\r\n\r\n while (hex.length() < 32) {\r\n hex.insert(0, \"0\");\r\n }\r\n\r\n return hex.toString();\r\n }", "static String hashSource(String source) {\n if (!source.endsWith(\"/\")) {\n source += \"/\";\n }\n Matcher m = Pattern.compile(\".+[/]([^/]+)[/]?\").matcher(source);\n BigInteger hash;\n try {\n hash = new BigInteger(1, MessageDigest.getInstance(\"SHA-1\").digest(source.getBytes(\"UTF-8\")));\n } catch (Exception x) {\n throw new AssertionError(x);\n }\n return String.format(\"%040X%s\", hash, m.matches() ? \"-\" + m.group(1) : \"\");\n }", "public void testEncryptionSHA1SymmetricBytes() throws Exception {\n WSSecEncrypt builder = new WSSecEncrypt();\n builder.setKeyIdentifierType(WSConstants.ENCRYPTED_KEY_SHA1_IDENTIFIER);\n builder.setEphemeralKey(keyData);\n builder.setEncryptSymmKey(false);\n builder.setUseKeyIdentifier(true);\n \n LOG.info(\"Before Encrypting EncryptedKeySHA1....\");\n Document doc = unsignedEnvelope.getAsDocument();\n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc); \n Document encryptedDoc = builder.build(doc, crypto, secHeader);\n \n String outputString = \n org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedDoc);\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Encrypted message with ENCRYPTED_KEY_SHA1_IDENTIFIER:\");\n LOG.debug(outputString);\n }\n assertTrue(outputString.indexOf(\"#EncryptedKeySHA1\") != -1);\n \n LOG.info(\"After Encrypting EncryptedKeySHA1....\");\n verify(encryptedDoc);\n }", "public String getSha1Fingerprint() {\n\t\treturn sha1Fingerprint;\n\t}", "public static HashDescriptionWriter sha1Writer() {\n return hashWriter(Hashing.sha1());\n }", "public static String computeSHA(byte[] filebytes) throws NoSuchAlgorithmException {\r\n\t\tMessageDigest messageDigest = MessageDigest.getInstance(\"SHA-1\");\r\n\t\tbyte[] hash = messageDigest.digest(filebytes);\r\n\t\t\r\n\t\tFormatter formatter = new Formatter();\r\n\t\t\r\n\t\tfor (byte b : hash) {\r\n\t\t\tformatter.format(\"%02x\", b);\r\n\t\t}\r\n\t\t\r\n\t\treturn formatter.toString();\r\n\t}", "public void testEncryptionSHA1SymmetricBytesHandler() throws Exception {\n final WSSConfig cfg = WSSConfig.getNewInstance();\n final RequestData reqData = new RequestData();\n reqData.setWssConfig(cfg);\n java.util.Map messageContext = new java.util.TreeMap();\n messageContext.put(WSHandlerConstants.ENC_SYM_ENC_KEY, \"false\");\n messageContext.put(WSHandlerConstants.ENC_KEY_ID, \"EncryptedKeySHA1\");\n messageContext.put(WSHandlerConstants.PW_CALLBACK_REF, this);\n reqData.setMsgContext(messageContext);\n reqData.setUsername(\"\");\n \n final java.util.Vector actions = new java.util.Vector();\n actions.add(new Integer(WSConstants.ENCR));\n \n Document doc = unsignedEnvelope.getAsDocument();\n MyHandler handler = new MyHandler();\n handler.send(\n WSConstants.ENCR, \n doc, \n reqData, \n actions,\n true\n );\n \n String outputString = \n org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);\n if (LOG.isDebugEnabled()) {\n LOG.debug(outputString);\n }\n \n verify(doc);\n }", "private PostData calculateHash(String key, String command, String var1, String salt) {\n checksum = null;\n checksum = new PayUChecksum();\n checksum.setKey(key);\n checksum.setCommand(command);\n checksum.setVar1(var1);\n checksum.setSalt(salt);\n return checksum.getHash();\n }", "public final void testSHA1AgainstMessageDigest() throws UnsupportedEncodingException,\n NoSuchAlgorithmException {\n final String[] inputs = {\n \"password\",\n \"saranghae\",\n \"aoeusnthaoeusnthaoeusnth \\0 12345098765432109876_!\"\n };\n \n final MessageDigest digest = MessageDigest.getInstance(\"SHA-1\");\n for (final String input : inputs) {\n final byte[] inputBytes = input.getBytes(\"US-ASCII\");\n \n final byte[] mdBytes = digest.digest(inputBytes);\n final byte[] ourBytes = NativeCrypto.sha1(inputBytes);\n assertTrue(\"MessageDigest hash is the same as NativeCrypto SHA-1 hash\",\n Arrays.equals(ourBytes, mdBytes));\n }\n }", "public void testEncryptionSHA1Symmetric() throws Exception {\n WSSecEncrypt builder = new WSSecEncrypt();\n builder.setKeyIdentifierType(WSConstants.ENCRYPTED_KEY_SHA1_IDENTIFIER);\n builder.setSymmetricKey(key);\n builder.setEncryptSymmKey(false);\n builder.setUseKeyIdentifier(true);\n \n LOG.info(\"Before Encrypting EncryptedKeySHA1....\");\n Document doc = unsignedEnvelope.getAsDocument();\n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc); \n Document encryptedDoc = builder.build(doc, crypto, secHeader);\n \n String outputString = \n org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedDoc);\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Encrypted message with ENCRYPTED_KEY_SHA1_IDENTIFIER:\");\n LOG.debug(outputString);\n }\n assertTrue(outputString.indexOf(\"#EncryptedKeySHA1\") != -1);\n \n LOG.info(\"After Encrypting EncryptedKeySHA1....\");\n verify(encryptedDoc);\n }", "private static String HashIt(String token) {\n\t\tStringBuffer hexString = new StringBuffer();\n\t\ttry {\n\t\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n\t\t\tbyte[] hash = digest.digest(token.getBytes(StandardCharsets.UTF_8));\n\t\t\t\n\t\t\t// Convert to hex\n\t\t for (int i = 0; i < hash.length; i++) {\n\t\t\t String hex = Integer.toHexString(0xff & hash[i]);\n\t\t\t if(hex.length() == 1) {\n\t\t\t \thexString.append('0');\n\t\t\t }\n\t\t\t hexString.append(hex);\n\t\t }\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\tSystem.err.println(e.getStackTrace());\n\t\t\thexString.setLength(0);\n\t\t}\n\t return hexString.toString();\t\t\n\t}", "private String getDigest(JSONObject json) {\n return json == null || json.toString() == null ? null : DigestUtils.sha256Hex(json.toString());\n }", "String hash(String input) throws IllegalArgumentException, EncryptionException;", "public static String mySHA(String file) {\n\t\ttry {\n\t\t\t// java.security.MessageDigest digest = null;\n\t\t\t// digest = java.security.MessageDigest.getInstance(\"SHA-1\");\n\t\t\t// digest.reset();\n\t\t\t// digest.update(x.getBytes(\"UTF-8\"));\n\t\t\t// digest.update(x.getBytes(\"UTF-8\"));\n\t\t\t// return digest.digest();\n\t\t\tMessageDigest sha1 = MessageDigest.getInstance(\"SHA1\");\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\n\t\t\tbyte[] data = new byte[1024];\n\t\t\tint read = 0;\n\t\t\twhile ((read = fis.read(data)) != -1) {\n\t\t\t\tsha1.update(data, 0, read);\n\t\t\t}\n\t\t\t;\n\t\t\tbyte[] hashBytes = sha1.digest();\n\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tfor (int i = 0; i < hashBytes.length; i++) {\n\t\t\t\tsb.append(Integer.toString((hashBytes[i] & 0xff) + 0x100, 16).substring(1));\n\t\t\t}\n\n\t\t\tString fileHash = sb.toString();\n\t\t\treturn fileHash;\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e);\n\t\t\tString s = \"-1\";\n\t\t\treturn s;\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(DigestUtils.sha1Hex(\"96.90.223.182,3C15C2E6F7A2\"));\n\n\t}", "private static String hashSHA256(String input) throws TokenManagementException {\n\t\t\n\t\tMessageDigest md;\n\t\ttry {\n\t\t\tmd = MessageDigest.getInstance(\"SHA-256\");\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\tthrow new TokenManagementException(ErrorMessage.sha256AlgorithmNotFound);\n\t\t}\n\t\t\n\t\t\n\t\tmd.update(input.getBytes(StandardCharsets.UTF_8));\n\t\tbyte[] digest = md.digest();\n\n\t\t// Beware the hex length. If MD5 -> 32:\"%032x\", but for instance, in SHA-256 it should be \"%064x\" \n\t\tString result = String.format(\"%64x\", new BigInteger(1, digest));\n\t\t\n\t\treturn result;\n\t\t\n\t}", "public byte[] SHA1(File archivo) throws OpenSSL_Exception {\n\t\tString[] comando = new String[]{ \"openssl\" , \"dgst\" , \"-sha1\" , archivo.getAbsolutePath()};\n\t\tProcess terminal = null;\n\t\ttry { terminal = Runtime.getRuntime().exec(comando); } catch (IOException e) { \n\t\t\tthrow new OpenSSL_Exception(\"No se puede ejecutar el comando en el terminal\");\n\t\t}\n\t\t// --- > Leemos la salida error del comando\n\t\tBufferedReader errors = new BufferedReader(new InputStreamReader(terminal.getErrorStream()));\n\t\tString linea = \"\" , error = \"\" ;\n\t\ttry { while( (linea = errors.readLine()) != null) error += linea + \"\\n\"; } catch (IOException e) {\n\t\t\tthrow new OpenSSL_Exception(\"No se puede leer el error que ha producido el comando\");\n\t\t}\n\t\t// --- > Si hubo salida error lanzamos al excepcion con el error\n\t\tif(!error.equals(\"\"))throw new OpenSSL_Exception(\"Error al ejecutar el comando:\\n\" + error );\n\t\t// --- > Leemos el resultado obtenido\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(terminal.getInputStream()));\n\t\tString res = \"\";\n\t\ttry { while((linea = in.readLine()) != null) res += linea; } catch (IOException e) {\n\t\t\tthrow new OpenSSL_Exception(\"No se puede leer el resultado que ha producido el comando\");\n\t\t}\n\t\treturn res.substring(res.lastIndexOf(\" \") + 1 ).getBytes();\n\t}", "private String signature() {\n\t\t++this.nonce;\n\t\tString message = new String(this.nonce + this.username + this.apiKey);\n\t\tMac hmac = null;\n\n\t\ttry {\n\t\t\thmac = Mac.getInstance(\"HmacSHA256\");\n\t\t\tSecretKeySpec secret_key = new SecretKeySpec(\n\t\t\t\t\t((String) this.apiSecret).getBytes(\"UTF-8\"), \"HmacSHA256\");\n\t\t\thmac.init(secret_key);\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidKeyException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn String.format(\"%X\",\n\t\t\t\tnew BigInteger(1, hmac.doFinal(message.getBytes())));\n\t}", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "public static String generateSHA1toString(String str) {\n try {\n byte[] datos = generateSHA1(str.getBytes());\n return byteArrayToHexString(datos);\n } catch (Exception e) {\n Logger.e(\"Error generating SHA1. \" + e.getMessage());\n return \"\";\n }\n }", "public byte[] SHA1(String texto) throws OpenSSL_Exception {\n\t\tString[] comando = new String[]{ \"openssl\" , \"dgst\" , \"-sha1\"};\n\t\tProcess terminal = null;\n\t\ttry { terminal = Runtime.getRuntime().exec(comando); } catch (IOException e) { \n\t\t\tthrow new OpenSSL_Exception(\"No se puede ejecutar el comando en el terminal\");\n\t\t}\n\t\t// --- > Mandamos el texto \n\t\tPrintWriter out = new PrintWriter(terminal.getOutputStream());\n\t\tout.print(texto);\n\t\tout.flush();\n\t\tout.close();\n\t\t// --- > Leemos la salida error del comando\n\t\tBufferedReader errors = new BufferedReader(new InputStreamReader(terminal.getErrorStream()));\n\t\tString linea = \"\" , error = \"\" ;\n\t\ttry { while( (linea = errors.readLine()) != null) error += linea + \"\\n\"; } catch (IOException e) {\n\t\t\tthrow new OpenSSL_Exception(\"No se puede leer el error que ha producido el comando\");\n\t\t}\n\t\t// --- > Si hubo salida error lanzamos al excepcion con el error\n\t\tif(!error.equals(\"\"))throw new OpenSSL_Exception(\"Error al ejecutar el comando:\\n\" + error );\n\t\t// --- > Leemos el resultado obtenido\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(terminal.getInputStream()));\n\t\tString res = \"\";\n\t\ttry { while((linea = in.readLine()) != null) res += linea; } catch (IOException e) {\n\t\t\tthrow new OpenSSL_Exception(\"No se puede leer el resultado que ha producido el comando\");\n\t\t}\n\t\treturn res.getBytes();\n\t}", "public static String computePasswordSHAHash(String password) {\n MessageDigest mdSha1 = null;\n String SHAHash = \"\";\n\n try\n {\n mdSha1 = MessageDigest.getInstance(\"SHA-512\");\n } catch (NoSuchAlgorithmException e1) {\n e1.printStackTrace();\n }\n try {\n mdSha1.update(password.getBytes(\"ASCII\"));\n } catch (UnsupportedEncodingException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n byte[] data = mdSha1.digest();\n try {\n SHAHash = convertToHex(data);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return SHAHash;\n }", "public int hash1(int x)\n {\n return ((a1*(x)+b1)%n);\n }", "private String getDigest(JSONArray json) {\n return json == null || json.toString() == null ? null : DigestUtils.sha256Hex(json.toString());\n }", "public String hashfunction(String password)\r\n\t{\r\n\t\t\r\n\t\tMessageDigest md=null;\r\n\t\ttry {\r\n\t\t\tmd = MessageDigest.getInstance(\"SHA-1\");\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tmd.update(password.getBytes());\r\n\t\tbyte[] hash=md.digest();\r\n\t\tchar[] hexArray = \"0123456789ABCDEF\".toCharArray();\r\n\t\tchar[] hexChars = new char[hash.length * 2];\r\n\t for ( int j = 0; j < hash.length; j++ ) \r\n\t {\r\n\t int v = hash[j] & 0xFF;\r\n\t hexChars[j * 2] = hexArray[v >>> 4];\r\n\t hexChars[j * 2 + 1] = hexArray[v & 0x0F];\r\n\t }\r\n\t String hash_password=new String(hexChars);\r\n\t hash_password=hash_password.toLowerCase();\r\n\t return hash_password;\r\n\t}", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "public String createSha1(File file) throws Exception {\n\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-1\");\n\t\tInputStream fis = new FileInputStream(file);\n\t\tint n = 0;\n\n\t\tbyte[] buffer = new byte[8192];\n\t\twhile (n != -1) {\n\t\t\tn = fis.read(buffer);\n\t\t\tif (n > 0) {\n\t\t\t\tdigest.update(buffer, 0, n);\n\t\t\t}\n\t\t}\n\t\tfis.close();\n\t\treturn new HexBinaryAdapter().marshal(digest.digest());\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "public static String calc_nonce(){\n\t\treturn String.valueOf(System.currentTimeMillis());\n\t}", "public static byte[] encryptHmacSHA1(final byte[] data, final byte[] key) {\n return hmacTemplate(data, key, \"HmacSHA1\");\n }", "public static final String hashing(String password) throws NoSuchAlgorithmException, NoSuchProviderException {\n String hpassword = password;\n MessageDigest mDigest = MessageDigest.getInstance(\"SHA1\");\n byte[] result = mDigest.digest(hpassword.getBytes());\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < result.length; i++) {\n sb.append(Integer.toString((result[i] & 0xff) + 0x100, 16).substring(1));\n }\n return sb.toString();\n }", "public static String hash(String s) {\n try {\n return hash(s, \"SHA-1\");\n } catch (NoSuchAlgorithmException ex) {\n return Exceptions.chuck(ex);\n }\n }", "static String sha1(List<Object> vals) {\n return sha1(vals.toArray(new Object[vals.size()]));\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "private void generatePkcs1Sha1Signature(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t// receive the data that needs to be signed\r\n\t\tshort byteRead = apdu.setIncomingAndReceive();\r\n\t\t// check Lc\r\n\t\t\r\n\t\t\r\n\t\tshort lc = (short) (buffer[ISO7816.OFFSET_LC] & 0x00FF);\r\n\t\tif ((lc != 20) || (byteRead != 20))\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_LENGTH);\r\n\t\t\r\n\t\t\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\t// use the correct key\r\n\t\tif (getSignatureType() == NON_REPUDIATION) {\r\n\t\t\t////cipher.init(nonRepPrivateKey, Cipher.MODE_ENCRYPT); // stond al in comments\r\n\t\t\tcipher.init((RSAPrivateCrtKey)nonRepKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);\r\n\t\t}\r\n\t\t\r\n\t\tif (getSignatureType() == AUTHENTICATION) {\r\n\t\t\tcipher.init((RSAPrivateCrtKey)authKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);\r\n\t\t}\r\n\t\t\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t\tJCSystem.beginTransaction();\r\n\t\t////@ open valid(); // auto\r\n\t\t\r\n\t\t//@ transient_byte_arrays_mem(messageBuffer);\r\n\t\t//@ assert transient_byte_arrays(?as);\r\n\t\t//@ foreachp_remove(messageBuffer, as);\r\n\t\t////@ open transient_byte_array(messageBuffer); // auto\r\n\r\n\t\t// prepare the message buffer to the PKCS#1 (v1.5) structure\r\n\t\tpreparePkcs1ClearText(messageBuffer, ALG_SHA1_PKCS1, lc);\r\n\t\t// copy the SHA1 hash from the APDU to the message buffer\r\n\t\tUtil.arrayCopy(buffer, (short) (ISO7816.OFFSET_CDATA), messageBuffer, (short) (128 - lc), lc);\r\n\r\n\t\t//@ close transient_byte_array(messageBuffer);\r\n\t\t//@ foreachp_unremove(messageBuffer, as);\r\n\r\n\t\t////@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\t// generate signature\r\n\t\t//@ transient_byte_arrays_mem(messageBuffer);\r\n\t\t//@ assert transient_byte_arrays(?as1);\r\n\t\t//@ foreachp_remove(messageBuffer, as1);\r\n\t\t////@ open transient_byte_array(messageBuffer); // auto\r\n\t\tcipher.doFinal(messageBuffer, (short) 0, (short) 128, buffer, (short) 0);\r\n\t\t//@ close transient_byte_array(messageBuffer); // todo\r\n\t\t//@ foreachp_unremove(messageBuffer, as1);\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t}", "public static String encryptSHA1ToString(final byte[] data) {\n return bytes2HexString(encryptSHA1(data));\n }", "public static String hashPassword(String input) {\n\t\tStringBuilder hash = new StringBuilder();\n\n\t\ttry {\n\t\t\tMessageDigest sha = MessageDigest.getInstance(\"SHA-1\");\n\t\t\tbyte[] hashedBytes = sha.digest(input.getBytes());\n\t\t\tchar[] digits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n\t\t\t\t\t'a', 'b', 'c', 'd', 'e', 'f' };\n\t\t\tfor (int idx = 0; idx < hashedBytes.length;idx++) {\n\t\t\t\tbyte b = hashedBytes[idx];\n\t\t\t\thash.append(digits[(b & 0xf0) >> 4]);\n\t\t\t\thash.append(digits[b & 0x0f]);\n\t\t\t}\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// handle error here.\n\t\t}\n\n\t\treturn hash.toString();\n\n\t\t\n\t}", "byte[] clientVerifyHash(String HashType, byte[] mastersecret, byte[] handshakemessages) throws NoSuchAlgorithmException, IOException{\n MessageDigest hasher = MessageDigest.getInstance(HashType);\r\n \r\n int padsize = 1;\r\n \r\n switch(HashType){\r\n case \"MD5\": \r\n padsize = 48;\r\n break;\r\n case \"SHA-1\":\r\n padsize = 40;\r\n break;\r\n }\r\n \r\n byte[] pad1 = new byte[padsize];\r\n byte[] pad2 = new byte[padsize];\r\n \r\n for (int i = 0; i < padsize; i++){\r\n pad1[i] = (0x36);\r\n pad2[i] = (0x5C);\r\n }\r\n \r\n baos.write(handshakemessages);\r\n baos.write(mastersecret);\r\n baos.write(pad1);\r\n \r\n byte[] before_HSM = baos.toByteArray();\r\n byte[] hashedHSM = hasher.digest(before_HSM);\r\n \r\n baos.reset();\r\n \r\n baos.write(mastersecret);\r\n baos.write(pad2);\r\n baos.write(hashedHSM);\r\n \r\n byte[] before_complete = baos.toByteArray();\r\n byte[] whole_hash = hasher.digest(before_complete);\r\n \r\n baos.reset();\r\n \r\n System.out.println(\"This is the client certificate verification: \" + Base64.getEncoder().encodeToString(whole_hash));\r\n \r\n return whole_hash;\r\n }", "public static String encryptHmacSHA1ToString(final byte[] data, final byte[] key) {\n return bytes2HexString(encryptHmacSHA1(data, key));\n }", "public static String hash(String password){\r\n\t\t try {\r\n\t MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\r\n\t md.update(password.getBytes(\"UTF-8\")); \r\n\t byte[] digest = md.digest();\r\n\t \r\n\t BigInteger bigInt = new BigInteger(1, digest);\r\n\t StringBuffer sb = new StringBuffer();\r\n\t for (int i = 0; i < digest.length; i++) {\r\n\t String hex = Integer.toHexString(0xff & digest[i]);\r\n\t if (hex.length() == 1) sb.append('0');\r\n\t sb.append(hex);\r\n\t }\r\n\t System.out.println(sb.toString());\r\n\t return sb.toString();\r\n\t \r\n\t } catch (Exception ex) {\r\n\t System.out.println(ex.getMessage());\r\n\t \r\n\t }\r\n\t\t return null;\r\n\t}", "@Override\r\n\tpublic String hashFunction(String saltedPass) throws NoSuchAlgorithmException\r\n\t{\r\n\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\r\n\t\tbyte[] byteHash = digest.digest(saltedPass.getBytes(StandardCharsets.UTF_8));\r\n\t\thash = DatatypeConverter.printBase64Binary(byteHash);\r\n\t\treturn hash;\r\n\t}", "public String getHash(String password) {\n return DigestUtils.sha256Hex(password);\n }", "public static String checksum(byte[] bytes) {\n MessageDigest messageDigest = null;\n\n try {\n messageDigest = MessageDigest.getInstance(\"SHA1\");\n } catch (final NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n\n if (messageDigest == null) {\n return null;\n }\n\n messageDigest.update(bytes);\n final byte[] mdbytes = messageDigest.digest();\n\n // convert the byte to hex format\n final StringBuffer sb = new StringBuffer(\"\");\n\n for (int i = 0; i < mdbytes.length; i++) {\n sb.append(Integer.toString((mdbytes[i] & 0xff) + 0x100, 16).substring(1));\n }\n\n return sb.toString();\n }", "private static byte[] hmac_sha1(String crypto, byte[] keyBytes, byte[] text) throws GeneralSecurityException {\n Mac hmac;\n hmac = Mac.getInstance(crypto);\n SecretKeySpec macKey = new SecretKeySpec(keyBytes, \"RAW\");\n hmac.init(macKey);\n return hmac.doFinal(text);\n }", "private String calculateHMAC(String hmacKey, String signingString) throws GeneralSecurityException, UnsupportedEncodingException {\n\t\tSecretKeySpec keySpec = new SecretKeySpec(hmacKey.getBytes(), \"HmacSHA1\");\n\t\tMac mac = Mac.getInstance(\"HmacSHA1\");\n\t\tmac.init(keySpec);\n\n\t\tbyte[] result = mac.doFinal(signingString.getBytes(\"UTF-8\"));\n\t\treturn Base64.encodeBase64String(result);\n\t}", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String CalHash(byte[] passSalt) throws NoSuchAlgorithmException, UnsupportedEncodingException {\n //get the instance value corresponding to Algorithm selected\n MessageDigest key = MessageDigest.getInstance(\"SHA-256\");\n //Reference:https://stackoverflow.com/questions/415953/how-can-i-generate-an-md5-hash\n //update the digest using specified array of bytes\n key.update(passSalt);\n String PassSaltHash = javax.xml.bind.DatatypeConverter.printHexBinary(key.digest());\n return PassSaltHash;\n }", "public static String encryptSHA1ToString(final String data) {\n if (data == null || data.length() == 0) return \"\";\n return encryptSHA1ToString(data.getBytes());\n }", "String getHash();", "String getHash();", "com.google.protobuf.ByteString getFileHash();", "com.google.protobuf.ByteString getFileHash();", "public int hashCode() {\n int hash = 104473;\n if (token_ != null) {\n // Obtain unencrypted form as common base for comparison\n byte[] tkn = getToken();\n for (int i=0; i<tkn.length; i++)\n hash ^= (int)tkn[i];\n }\n hash ^= (type_ ^ 14401);\n hash ^= (timeoutInterval_ ^ 21327);\n hash ^= (isPrivate() ? 15501 : 12003);\n if (getPrincipal() != null)\n hash ^= getPrincipal().hashCode();\n if (getSystem() != null)\n hash ^= getSystem().getSystemName().hashCode();\n return hash;\n }", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "private String calculateCheckSum(File file2) {\n\t\tStringBuffer sb = new StringBuffer(\"\");\n\t\ttry {\n\t\t\tMessageDigest messageDigest = MessageDigest.getInstance(\"SHA1\");\n\n\t\t\tFileInputStream finput = new FileInputStream(file2);\n\t\t\tbyte[] dataBytes = new byte[1024];\n\n\t\t\tint bytesRead = 0;\n\n\t\t\twhile ((bytesRead = finput.read(dataBytes)) != -1) {\n\t\t\t\tmessageDigest.update(dataBytes, 0, bytesRead);\n\t\t\t}\n\n\t\t\tbyte[] digestBytes = messageDigest.digest();\n\n\t\t\tfor (int i = 0; i < digestBytes.length; i++) {\n\t\t\t\tsb.append(Integer.toString((digestBytes[i] & 0xff) + 0x100, 16).substring(1));\n\t\t\t}\n\t\t\tSystem.out.println(\"file check sum value is \" + sb.toString());\n\t\t\tfinput.close();\n\t\t} catch (Exception ex) {\n\t\t\t// TODO: handle exception\n\t\t\tLogger.getLogger(FileTransferClient.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "public int hash(T input);", "public int hashCode() {\n try {\n int res = 0;\n byte[] array = getEncoded();\n for (int i=0; i<array.length; i++) {\n res += array[i] & 0xFF;\n }\n return res;\n } catch (CRLException e) {\n return 0;\n }\n }", "private String generateNonce() {\n // Get the time of day and run MD5 over it.\n Date date = new Date();\n long time = date.getTime();\n Random rand = new Random();\n long pad = rand.nextLong();\n // String nonceString = (new Long(time)).toString()\n // + (new Long(pad)).toString();\n String nonceString = Long.valueOf(time).toString()\n + Long.valueOf(pad).toString();\n byte mdbytes[] = messageDigest.digest(nonceString.getBytes());\n // Convert the mdbytes array into a hex string.\n return toHexString(mdbytes);\n }", "private static long signatureHash(String tsPath, List<String> inputAllFiles) throws IOException {\n long crc32 = 0;\n for (String iFile : inputAllFiles) {\n long c = getCrc32(iFile) & 0xffffffffL;\n SystemOut.println(\"CRC32 from \" + iFile + \" = \" + c);\n crc32 ^= c;\n }\n SystemOut.println(\"CRC32 from all input files = \" + crc32);\n // store the CRC32 as a built-in variable\n if (tsPath != null) // nasty trick - do not insert signature into live data files\n VariableRegistry.INSTANCE.register(SIGNATURE_HASH, \"\" + crc32);\n return crc32;\n }", "private int hash1(K key) {\n int h = 0;\n int seed = 31;//素数\n String s = key.toString();\n for (int i = 0; i != s.length(); ++i) {\n h = seed * h + s.charAt(i);\n }\n return h % length;\n }", "String getDigestAlgorithm();", "public synchronized String getSHA1() {\n if (this.sha1 == null) {\n if (this.originalManifest != null\n && this.originalManifest.getMainAttributes().getValue(MANIFEST_ENTRY_ORIG_SHA1) != null) {\n this.sha1 = this.originalManifest.getMainAttributes().getValue(MANIFEST_ENTRY_ORIG_SHA1);\n } else {\n this.sha1 = FileUtil.getSHA1(new File(this.originalJar.getName()));\n }\n }\n return this.sha1;\n }", "public Sha256Hash(String hexString) {\n checkArgument(hexString.length() == 64);\n this.bytes = Hex.decode(hexString);\n }", "public String hashStringToSha256(String string) {\n\n byte[] hash = sha256encriptor().digest(string.getBytes(StandardCharsets.UTF_8));\n\n BigInteger number = new BigInteger(1, hash);\n\n // Convert message digest into hex value\n StringBuilder hexString = new StringBuilder(number.toString(16));\n\n // Pad with leading zeros\n while (hexString.length() < 32)\n {\n hexString.insert(0, '0');\n }\n\n return hexString.toString();\n }", "String getMessageDigestAlgorithm();", "void digest(T x);", "public static String buildHmacSignature(String privateKey, String inputToSign) {\n String lSignature = \"None\";\n try {\n Mac mac = Mac.getInstance(\"HmacSHA1\");\n SecretKeySpec secret = new SecretKeySpec(privateKey.getBytes(), \"HmacSHA1\");\n mac.init(secret);\n\n byte[] lDigest = mac.doFinal(inputToSign.getBytes());\n BigInteger lHash = new BigInteger(1, lDigest);\n lSignature = lHash.toString(16);\n if ((lSignature.length() % 2) != 0) {\n lSignature = \"0\" + lSignature;\n }\n } catch (NoSuchAlgorithmException lEx) {\n throw new RuntimeException(\"Problems calculating HMAC\", lEx);\n } catch (InvalidKeyException lEx) {\n throw new RuntimeException(\"Problems calculating HMAC\", lEx);\n }\n return lSignature;\n }", "public static String hash(String token){\n return Integer.toString( token.hashCode() );\n }", "public String[] rootcalc(String key) {\n String s1 = \"Copy1\";\n String concat1 = key.concat(s1);\n String hashId1 = null;\n String hashId2 = null;\n MessageDigest messageDigest = null;\n try {\n messageDigest = MessageDigest.getInstance(\"SHA-1\");\n messageDigest.update(concat1.getBytes());\n byte[] digest = messageDigest.digest();\n StringBuilder hexString = new StringBuilder();\n for (byte bytes : digest) {\n hexString.append(String.format(\"%02x\", bytes).toUpperCase());\n }\n hashId1 = hexString.toString();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n String s2 = \"Copy2\";\n String concat2 = key.concat(s2);\n MessageDigest messageDigest1 = null;\n try {\n messageDigest1 = MessageDigest.getInstance(\"SHA-1\");\n messageDigest1.update(concat2.getBytes());\n byte[] digest1 = messageDigest1.digest();\n StringBuilder hexString1 = new StringBuilder();\n for (byte bytes : digest1) {\n hexString1.append(String.format(\"%02x\", bytes).toUpperCase());\n }\n hashId2 = hexString1.toString();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n\n\n String[] strArray1 = new String[2];\n strArray1[0] = hashId1;\n strArray1[1] = hashId2;\n return strArray1;\n\n }", "int getClientHashLength();" ]
[ "0.570756", "0.56933373", "0.56802917", "0.5626133", "0.5595658", "0.55351627", "0.55315703", "0.5525184", "0.55211836", "0.54890037", "0.54684883", "0.5466173", "0.5430587", "0.54261136", "0.54261136", "0.5403715", "0.539518", "0.53774697", "0.5366562", "0.5347982", "0.53413737", "0.53325367", "0.5297935", "0.529652", "0.5293939", "0.5275262", "0.52520514", "0.5251939", "0.5251221", "0.5245098", "0.5242398", "0.521868", "0.52162224", "0.5204488", "0.5200537", "0.5172673", "0.5170597", "0.5167906", "0.51646125", "0.5159524", "0.51531446", "0.5151471", "0.51391745", "0.51239306", "0.5106617", "0.5097116", "0.50864387", "0.5080876", "0.5057312", "0.50541264", "0.5044578", "0.50025135", "0.4993711", "0.49863732", "0.49814257", "0.49512973", "0.49463198", "0.4905438", "0.4904804", "0.4898592", "0.48895094", "0.48832113", "0.48753035", "0.487456", "0.48644245", "0.48584124", "0.4852745", "0.48458615", "0.48448354", "0.483348", "0.48318192", "0.48241273", "0.48181194", "0.48108652", "0.480311", "0.47949672", "0.47878873", "0.47839192", "0.4778336", "0.4778336", "0.4775086", "0.4775086", "0.47668296", "0.47638023", "0.47632805", "0.47621065", "0.47619152", "0.47537392", "0.4747855", "0.47408205", "0.4738634", "0.47306454", "0.47109082", "0.46913075", "0.46815473", "0.46709692", "0.4654183", "0.46510077", "0.4644122", "0.46355644" ]
0.7377022
0
/Dict dict = new Dict(); dict.setDelFlag("0"); dict.setType("yes_no"); List list = dictService.findList(dict); Assert.assertEquals(list.size(), 2);
@Test public void findTypeList() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test \n\tpublic void GetAllCodeDictionaryTest(){\n\t\tlogger.info(\"--------------------start---GetAllCodeDictionaryTest--------------------------------------------------------------------------------------------------\");\n\t\tList<com.boot.entity.Dictionary> list=trustManagementService.GetAllCodeDictionary(\"zh-CN\");\n\t\tfor (Dictionary trust : list) {\n\t\t\tlogger.info(\"查找结果\" + trust.getSequenceNo()); \n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t/*for (Map<String, Object> map : list) {\n\t\t\tSet<String> set=map.keySet();\n\t\t\tfor (String string : set) {\n\t\t\t\tlogger.info(\"查找结果getItemValue-----map--set----键key:(\"+string+\") 值value:\" +map.get(string) ); \n\t\t\t\t\n\t\t\t}\n\n\t\t}\n*/\n\t\t\n\t\tlogger.info(\"--------------------end---GetAllCodeDictionaryTest--------------------------------------------------------------------------------------------------\");\n\t}", "@Test\n public void testDocumentsResponse() {\n DocumentsResponse testResponse = new DocumentsResponse(testDocList);\n checkDocumentsList(testResponse);\n }", "@Test\r\n public void test_getTermsOfUse_1() throws Exception {\r\n Map<Integer, List<TermsOfUse>> res = instance.getTermsOfUse(1, 1, null);\r\n\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 3, res.get(0).size());\r\n }", "public void testFindAccountList(){\n\t\tString begin = \"2013-01-01\" ;\n\t\tString end = \"2014-01-01\" ;\n\t\tAccount account = new Account() ;\n\t\tList<Account> list = this.bean.findAccountList(begin, end, account) ;\n\t\tAssert.assertTrue(list.size()>2) ;\n\t}", "@Test\n public void test007() {\n List<HashMap<String, ?>> values = response.extract().path(\"data.findAll{it.name=='Fargo'}\");\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The values for store name is Fargo:\" + values);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "public List<SysDictData> selectDictDataList(SysDictData dictData);", "public interface DBSDictionary\n{\n /**\n * Checks that this constrain supports key enumerations.\n * Usually it depends on constraint type (enumerations makes sense only for unique constraints).\n * @return true or false\n */\n boolean supportsDictionaryEnumeration();\n\n /**\n * Gets enumeration values\n *\n * @param monitor session\n * @param keyColumn enumeration column.\n * @param keyPattern pattern for enumeration values. If null or empty then returns full enumration set\n * @param searchText\n * @param preceedingKeys other constrain key values. May be null.\n * @param caseInsensitiveSearch use case-insensitive search for {@code keyPattern}\n * @param sortAsc ascending sorting (irrelevant is {@code sortByValue} is false)\n * @param sortByValue sort results by value\n * @param offset enumeration values offset in result set\n * @param maxResults maximum enumeration values in result set\n * @return statement with result set which contains valid enumeration values.\n */\n @NotNull\n List<DBDLabelValuePair> getDictionaryEnumeration(\n @NotNull DBRProgressMonitor monitor,\n @NotNull DBSEntityAttribute keyColumn,\n @Nullable Object keyPattern,\n @Nullable String searchText,\n @Nullable List<DBDAttributeValue> preceedingKeys,\n boolean caseInsensitiveSearch,\n boolean sortAsc,\n boolean sortByValue,\n int offset,\n int maxResults\n ) throws DBException;\n\n @NotNull\n List<DBDLabelValuePair> getDictionaryValues(\n @NotNull DBRProgressMonitor monitor,\n @NotNull DBSEntityAttribute keyColumn,\n @NotNull List<Object> keyValues,\n @Nullable List<DBDAttributeValue> preceedingKeys,\n boolean sortByValue,\n boolean sortAsc\n ) throws DBException;\n\n @NotNull\n DBSDictionaryAccessor getDictionaryAccessor(\n @NotNull DBRProgressMonitor monitor,\n @Nullable List<DBDAttributeValue> precedingKeys,\n @NotNull DBSEntityAttribute keyColumn,\n boolean sortAsc,\n boolean sortByDesc\n ) throws DBException;\n}", "@Test\n public void test19(){\n // List<Integer> services = response.extract().path(\"data.findAll{it.services=='Samsung Experience'}.storeservices\");\n //List<HashMap<String, ?>> address = response.extract().path(\"data.findAll{it.service=='Samsung Experience'}.storeservices\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The name of all services:\" );\n System.out.println(\"------------------End of Test---------------------------\");\n }", "@Test\n public void testGetCoinTypeList() throws Exception {\n\n Map<Long,VirtualCoin> map;\n map = CacheHelper.getObj(CacheKey.VIRTUAL_COIN_ALL_KEY);\n Boolean flag = false;\n if (map == null){\n flag = true;\n }\n System.out.println(\"sdafds = \" + flag );\n }", "@Test\n public void testFindMovieMapAll() throws Exception {\n Client client = new JaxWsClient();\n MovieService movieService =\n (MovieService) client.getClient(new ClientInfo(MovieService.class,\n \"http://localhost:9002/Movie\", false));\n\n // 1. find movie map all\n Map<String, Movie> movieMap = movieService.findMovieMapAll();\n\n // 2. check the movie map count\n Assert.assertEquals(2, movieMap.size());\n }", "@Test\r\n public void test_getTermsOfUse_2() throws Exception {\r\n Map<Integer, List<TermsOfUse>> res = instance.getTermsOfUse(1, 2, new int[] {2, 3});\r\n\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 1, res.size());\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 1, res.get(1).size());\r\n }", "@Test\n public void Test_Entry() throws Exception {\n String[] expected_value = {\"/ProcSet\", \"/Font\"};\n\n PdfResource resrc = new PdfResource();\n //execute test\n HashMap<String, String> entry = resrc.getEntry();\n //confirm\n assertThat(entry.keySet(), hasItems(expected_value)); \n }", "@VTID(38)\n boolean getList();", "public List<Dictionary> getDictionaryLikeDictEntry(String dictEntry) throws LIMSRuntimeException {\n\t List<Dictionary> list = new Vector<Dictionary>();\n\t String searchString = \"%\" + dictEntry.toUpperCase().trim() + \"%\";\n\t String sql = \"from Dictionary d where upper(d.dictEntry) like :dictionaryEntry\";\n try{\n Query query = HibernateUtil.getSession().createQuery(sql);\n query.setString(\"dictionaryEntry\", searchString);\n list = query.list();\n closeSession();\n }catch(HibernateException e){\n handleException(e, \"getDictionaryLikeDictEntry\");\n }\n \n\t return list;\n\t}", "void testCanGetList();", "List<WdWordDict> selectByExample(WdWordDictExample example);", "@Test\r\n public void testGetList() throws Exception {\r\n LOG.info(\"getList\");\r\n String listId = \"509ec17b19c2950a0600050d\";\r\n MovieDbList result = tmdb.getList(listId);\r\n assertFalse(\"List not found\", result.getItems().isEmpty());\r\n }", "@Test\n public void test010() {\n List<String> storeServices = response.extract().path(\"data.services[9].storeservices\");\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"get storeservices of the store where service name = Sony Experience:\" + storeServices);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "List<DictDoseUnit> selectByExample(DictDoseUnitExample example);", "@Test public void testObjectsList() throws Exception {\n \t\tdeleteAll();\n \t\tStorage ss=makeServicesStorage(base+\"/cspace-services/\");\n \t\tString p1=ss.autocreateJSON(\"collection-object/\",getJSON(\"obj3.json\"));\n \t\tString p2=ss.autocreateJSON(\"collection-object/\",getJSON(\"obj4.json\"));\n \t\tString p3=ss.autocreateJSON(\"collection-object/\",getJSON(\"obj4.json\"));\n \t\tString[] names=ss.getPaths(\"collection-object\",null);\n \t\tassertArrayContainsString(names,p1);\n \t\tassertArrayContainsString(names,p2);\n \t\tassertArrayContainsString(names,p3);\n \t}", "public interface IDictionaryTypeService extends IBaseService<DictionaryType> {\n\n /**\n * 根据菜单查找字典\n * @param menuType 菜单类型\n * @return\n */\n List<DictionaryType> findByMenuType(String menuType);\n}", "@Test\r\n public void test_getTermsOfUse_3() throws Exception {\r\n Map<Integer, List<TermsOfUse>> res= instance.getTermsOfUse(Integer.MAX_VALUE, 1, null);\r\n\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 0, res.size());\r\n\r\n }", "@Test\n public void test1() throws IOException {\n FileSystem fs = FileSystem.getLocal(new Configuration());\n Path termsFilePath = new Path(\"etc/trec-index-terms.dat\");\n Path termIDsFilePath = new Path(\"etc/trec-index-termids.dat\");\n Path idToTermFilePath = new Path(\"etc/trec-index-termid-mapping.dat\");\n\n DefaultFrequencySortedDictionary dictionary =\n new DefaultFrequencySortedDictionary(termsFilePath, termIDsFilePath, idToTermFilePath, fs);\n\n assertEquals(312232, dictionary.size());\n assertEquals(\"page\", dictionary.getTerm(1));\n assertEquals(\"time\", dictionary.getTerm(2));\n assertEquals(\"will\", dictionary.getTerm(3));\n assertEquals(\"year\", dictionary.getTerm(4));\n assertEquals(\"nikaan\", dictionary.getTerm(100000));\n\n assertEquals(1, dictionary.getId(\"page\"));\n assertEquals(2, dictionary.getId(\"time\"));\n assertEquals(3, dictionary.getId(\"will\"));\n assertEquals(4, dictionary.getId(\"year\"));\n assertEquals(100000, dictionary.getId(\"nikaan\"));\n \n assertEquals(null, dictionary.getTerm(312233));\n\n Iterator<String> iter = dictionary.iterator();\n assertTrue(iter.hasNext());\n assertEquals(\"page\", iter.next());\n assertTrue(iter.hasNext());\n assertEquals(\"time\", iter.next());\n assertTrue(iter.hasNext());\n assertEquals(\"will\", iter.next());\n assertTrue(iter.hasNext());\n assertEquals(\"year\", iter.next());\n assertTrue(iter.hasNext());\n\n int cnt = 0;\n for (@SuppressWarnings(\"unused\") String s : dictionary) {\n cnt++;\n }\n assertEquals(dictionary.size(), cnt);\n\n cnt = 0;\n iter = dictionary.iterator();\n while(iter.hasNext()) {\n cnt++;\n iter.next();\n }\n assertEquals(dictionary.size(), cnt);\n }", "@Test\n public void testCreateListCriteria() throws Exception {\n System.out.println(\"createListCriteria\");\n \n Map<String, String> map = new TreeMap<String,String>();\n map.put(\"1\", \"{\\\"key\\\":{\\\"FunctionalEnvironment\\\":\\\"Production\\\",\\\"Delivery\\\":\\\"***REMOVED***\\\"},\"\n + \"\\\"values\\\":[\\\"Company\\\",\\\"VirtualDC\\\",\\\"Manufacturer\\\"]}\");\n \n map.put(\"2\", \"{\\\"key\\\":{\\\"FunctionalEnvironment\\\":\\\"Production\\\",\\\"Delivery\\\":\\\"***REMOVED***\\\"},\"\n + \"\\\"values\\\":[\\\"Company\\\",\\\"VirtualDC\\\"]}\");\n \n \n \n String expResult1 = \"{\\\"key\\\":{\\\"Delivery\\\":\\\"***REMOVED***\\\",\\\"FunctionalEnvironment\\\":\\\"Production\\\"},\"\n + \"\\\"values\\\":[\\\"Company\\\",\\\"VirtualDC\\\",\\\"Manufacturer\\\"]}\";\n String expResult2 = \"{\\\"key\\\":{\\\"Delivery\\\":\\\"***REMOVED***\\\",\\\"FunctionalEnvironment\\\":\\\"Production\\\"},\"\n + \"\\\"values\\\":[\\\"Company\\\",\\\"VirtualDC\\\"]}\";\n \n \n TreeMap<String,String> key = new TreeMap<>();\n List<String> values =new ArrayList<String>();\n CriteriaFilter instance = new CriteriaFilter(key, values);\n \n List<CriteriaFilter> resultList = instance.createListCriteria(map);\n \n String result1 = \"\";\n String result2 = \"\";\n for (int i = 0 ; i < resultList.size() ; i++){\n result1 = resultList.get(0).toString();\n result2 = resultList.get(1).toString();\n break;\n }\n System.out.println(result1);\n System.out.println(expResult1);\n System.out.println(result2);\n System.out.println(expResult2);\n \n \n \n assertEquals(expResult1, result1);\n assertEquals(expResult2, result2);\n \n }", "long countByExample(DictDoseUnitExample example);", "@Test\n public void testFindall() {\n\n System.out.println(\"findall\"); \n PrioridadRest rest = mokPrioridadRest;\n List<Prioridad> result = rest.findall();\n Prioridad prioridad = new Prioridad(1, \"1\");\n assertThat(result, CoreMatchers.hasItems(prioridad));\n }", "@Test\n public void testLookup() throws Exception\n {\n LdapDN dn = new LdapDN( \"cn=test,ou=system\" );\n Entry entry = service.getAdminSession().lookup( dn );\n \n assertNotNull( entry );\n \n // We should have 3 attributes\n assertEquals( 3, entry.size() ); \n \n // Check that all the user attributes are present\n assertEquals( \"test\", entry.get( \"cn\" ).getString() );\n assertEquals( \"sn_test\", entry.get( \"sn\" ).getString() );\n assertTrue( entry.contains( \"objectClass\", \"top\", \"person\" ) );\n }", "public List<SysDictData> selectDictDataByType(String dictType);", "@Test\r\n public void testSearchList() throws Exception {\r\n LOG.info(\"searchList\");\r\n String query = \"watch\";\r\n int page = 0;\r\n List result = tmdb.searchList(query, LANGUAGE_DEFAULT, page);\r\n assertFalse(\"No lists found\", result == null);\r\n assertTrue(\"No lists found\", result.size() > 0);\r\n }", "Set<Document> findDocuments(Map<String, String> fields);", "@Test\n public void testValid() {\n System.out.println(\"UT-WRS-SE-042 : Test GenerateOptional Facts with valid or existing key reference\");\n boolean ok = false;\n try {\n murlinObj = new GenericMURLinJSONObject();\n System.out.println(\"Test Optional Facts Generation using terms of facts\");\n Map<String, String> results = new HashMap<String, String>();\n Map<String, String> dyn = new HashMap<String, String>();\n String[] mods = {\"wcs\", \"psm\", \"mva\"};\n String[] field = {\"wcs.category\", \"wcs.layer\", \"psm.pattern\", \"psm.pattern_hit\", \"mva.bc\", \"mva.ns\", \"mva.ws\"};\n dyn = generateFields(field);\n murlinObj.setDyn_conf(dyn);\n System.out.println(murlinObj.getDyn_conf().get(\"result_fields\"));\n results = generateResult(mods);\n murlinObj.setResults(results);\n GenerateFacts instance = new GenerateFacts(murlinObj);\n Facts result = instance.generate();\n ok = true;\n System.out.println(result);\n } catch (Exception ex) {\n System.out.println(ex.getCause());\n fail(ex.getLocalizedMessage());\n }\n if (ok) {\n assertTrue(true);\n System.out.println(\"Facts Generation was successfully performed\");\n System.out.println(\"*** Passed\");\n }\n\n }", "@Test\n public void test009() {\n\n List<String> services = response.extract().path(\"data[7].services\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The names of the all stores are:: \" + services);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "int countByExample(WdWordDictExample example);", "@Test\n public void testSolr4121() throws Exception {\n assertJQ(req(\"q\",\"eee_s:'balance'\", \"indent\",\"true\")\n ,\"/response/numFound==1\"\n );\n }", "@Test\n public void testSetAndGetDocuments() {\n DocumentsResponse testResponse = new DocumentsResponse();\n testResponse.setDocuments(testDocList);\n checkDocumentsList(testResponse);\n }", "@Test\r\n\tpublic void testGetLstFromDB(){\r\n\t\tList<IP> lst = new ArrayList<IP>();\r\n\t\tlst = ipService.getIPLstFromDB();\r\n\t\tSystem.out.println(\"test method testGetLstFromDB==>ip list:\"+JSON.toJSONString(lst));\r\n\t}", "@Override\n\tpublic List<Map> getOptions(DataMsgBus arg0) {\n\t\tHttpSession session=SessUtil.getRequest().getSession();\n\t\tMap userInfo=(Map) session.getAttribute(\"USERINFO\");\n\t\tMap m=new HashMap();\n\t\tm.put(\"ssdwid\", userInfo.get(\"unit_id\"));\n\t\tm.put(\"user_id\", userInfo.get(\"user_id\"));\n\t\tm.put(\"dict_type\", \"常用意见\");\n\t\treturn getDictService().queryDictByType(m);\n\t}", "@Test\n public void findAllEngineerPositions() {\n Map<String, String> employees = getEmployees();\n// Your code here\n }", "@Test\n public void test008() {\n List<HashMap<String, ?>> address = response.extract().path(\"data.findAll{it.name=='Maplewood'}.address\");\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The address for store name is Maplewood:\" + address);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "@Test\n public void testFindMovieListAll() throws Exception {\n Client client = new JaxWsClient();\n MovieService movieService =\n (MovieService) client.getClient(new ClientInfo(MovieService.class,\n \"http://localhost:9002/Movie\", false, true));\n\n // 1. find movie list all\n List<Movie> movieList = movieService.findMovieListAll();\n\n // 2. check the movie list count\n Assert.assertEquals(2, movieList.size());\n }", "@Test\n public void testLookupEmptyAtrid() throws Exception\n {\n LdapDN dn = new LdapDN( \"cn=test,ou=system\" );\n Entry entry = service.getAdminSession().lookup( dn, new String[]{} );\n \n assertNotNull( entry );\n \n // We should have 3 attributes\n assertEquals( 3, entry.size() ); \n \n // Check that all the user attributes are present\n assertEquals( \"test\", entry.get( \"cn\" ).getString() );\n assertEquals( \"sn_test\", entry.get( \"sn\" ).getString() );\n assertTrue( entry.contains( \"objectClass\", \"top\", \"person\" ) );\n }", "public static void testDictionary() throws IOException {\n String wnhome=\"c:\\\\Users\\\\Katherine\\\\Documents\\\\2nd sem\\\\IR\\\\project\\\\WordNet_3.1\";\n String path = wnhome + File.separator + \"dict\";\n\n\n URL url = new URL(\"file\", null, path);\n\n IDictionary dictionary = new Dictionary(url);\n dictionary.open();\n // /Users/Ward/Downloads\n IIndexWord indexWord = dictionary.getIndexWord(\"use\", POS.VERB);\n\n for (IWordID wordID : indexWord.getWordIDs()) {\n\n IWord word = dictionary.getWord(wordID);\n for (IWord word1 : word.getSynset().getWords()) {\n System.out.println(word1.getLemma());\n }\n// System.out.println(\"Id = \" + wordID);\n// System.out.println(\" Lemma = \" + word.getLemma());\n// System.out.println(\" Gloss = \" + word.getSynset().getGloss());\n\n List<ISynsetID> hypernyms =\n word.getSynset().getRelatedSynsets(Pointer.HYPERNYM);\n // print out each h y p e r n y m s id and synonyms\n List<IWord> words;\n for (ISynsetID sid : hypernyms) {\n words = dictionary.getSynset(sid).getWords();\n System.out.print(sid + \" {\");\n for (Iterator<IWord> i = words.iterator(); i.hasNext(); ) {\n System.out.print(i.next().getLemma());\n if (i.hasNext())\n System.out.print(\", \");\n }\n System.out.println(\"}\");\n }\n }\n }", "com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary();", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPageResponse getDictionaryPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPage getDictionaryPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[6].getName());\n _operationClient.getOptions().setAction(\"urn:getDictionaryPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDictionaryPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getDictionaryPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "boolean supportsDictionaryEnumeration();", "public List<Pojo.OneWord> getOneWord(){ \n List<Pojo.OneWord> list=new ArrayList<Pojo.OneWord>(); \n list=template.loadAll(Pojo.OneWord.class); \n return list; \n}", "public static boolean testDaoLireSecteur() {\n boolean ok = true;\n ArrayList<Secteur> lesSecteurs = new ArrayList<Secteur>();\n try {\n lesSecteurs = daoSecteur.getAll();\n } catch (Exception ex) {\n ok = false;\n }\n System.out.println(\"liste des secteurs\");\n for (Secteur unSecteur: lesSecteurs){\n System.out.println(unSecteur);\n }\n return ok;\n }", "Map<String, Object> getServiceSpecificObjects();", "@Test\n public void test() {\n List<CateDto> list = articleService.queryCates();\n System.out.println(list.size());\n }", "@Test\n public void getSisImportListTestQueryMap() {\n String accountId = null;\n SisImportsApi.GetSisImportListQueryParams queryParams = new SisImportsApi.GetSisImportListQueryParams()\n .createdSince(null);\n // List<SisImport> response = api.getSisImportList(accountId, queryParams);\n\n // TODO: test validations\n }", "@Test\n public void testGetVerifiedAssociatedTags() {\n String insertedTagList = \" #awesome, #dry, #newTag \";\n List<Tag> verifiedTags = tagServ.getVerifiedAssociatedTags(insertedTagList);\n List<Tag> allTags = tagServ.getAllTags();\n Assert.assertEquals(5, allTags.size());\n Assert.assertEquals(3, verifiedTags.size());\n }", "public void testServiceList()\n {\n ServiceList services = serviceSetup();\n\n ServiceIterator it = services.createServiceIterator();\n int i = 0;\n try\n {\n while (it.hasNext())\n {\n // Increment the service counter\n i++;\n // Get our next service\n ServiceExt service = (ServiceExt) it.nextService();\n log(\"******************************************************************\");\n log(\"* Services - Counter: (\" + i + \")\");\n dumpService(service);\n\n ServiceDetailsHandle[] handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n\n ServiceDetailsExt[] details = new ServiceDetailsExt[handles.length];\n for (int j = 0; j < handles.length; j++)\n {\n details[j] = sidb.createServiceDetails(handles[j]);\n dumpServiceDetails(details[j]);\n assertEquals(\"ServiceDetails' Service does not match expected value\", service,\n details[j].getService());\n assertEquals(\"ServiceType does not match\", service.getServiceType(), details[j].getServiceType());\n }\n log(\"******************************************************************\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "@Test\n public void getAllMedicalRecords() {\n List<MedicalRecord> records = service.getAllMedicalRecords();\n\n //Assert\n assertEquals(2, records.size());\n }", "boolean hasDictionary();", "@Test\n public void testSearchField(){\n Field field = FieldSets.createFieldWithTranslations(contextServiceClient);\n\n List<Field> list = FieldSets.searchField(contextServiceClient, \"\");\n\n assertEquals(1, list.size());\n assertEquals( FIELD_ONE, list.get(0).getId());\n }", "public int getTotalNumPatientsByObservation(String loincCode) {\n //Place your code here\n HashSet<String> res = new HashSet<String>();\n Bundle response = client.search().forResource(Observation.class).where(Observation.CODE.exactly().systemAndCode(\"http://loinc.org\", loincCode)).returnBundle(Bundle.class).execute();\n\n do{\n for(BundleEntryComponent bec : response.getEntry()){\n Observation ob = (Observation) bec.getResource();\n if (ob.hasSubject()){\n String p = ob.getSubject().getReference();\n if (!p.equals(\"Patient/undefined\")){\n res.add(p);\n\n }\n }\n\n }\n if (response.getLink(Bundle.LINK_NEXT) == null){\n break;\n }\n response = client.loadPage().next(response).execute();\n } while (true);\n\n return res.size();\n }", "@Before\n public void setUp() {\n dict = new Dictionary();\n\n\n }", "public List<DIS001> findAll_DIS001();", "Set<Document> findDocuments(Map<String, String> fields, int offset, int numberOfResults);", "@Test\n public void test18() {\n\n List<Integer> services = response.extract().path(\"data.findAll{it.name=='Fargo'}.zip\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The name of all services:\" + services);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "int deleteByExample(WdWordDictExample example);", "@Test\n public void verifyThatEmployeesAreReal() {\n Map<String, String> employees = getEmployees();\n// Your code here\n }", "public interface DictionaryManager {\n List<Dictionary> getDictionaryByType(Integer type);\n}", "private static void getListTest() {\n\t\tList<CartVo> list=new CartDao().getList();\r\n\t\t\r\n\t\tfor(CartVo cartVo : list) {\r\n\t\t\tSystem.out.println(cartVo);\r\n\t\t}\r\n\t}", "public void testOnDictionariesObtained() throws JSONException, NoSuchFieldException, IllegalAccessException {\n assertFalse(\"There should be no dictionaries in sharedPrefs\", SharedPrefs.contains(\"dicts\"));\n Field privateField = SplashActivity.class.getDeclaredField(\"localizedValues\");\n privateField.setAccessible(true);\n LocalizedValues localizedValues = (LocalizedValues) privateField.get(getActivity());\n\n\n getActivity().onDictionariesObtained(dictMocks);\n getActivity().onLanguagesObtained(langMocks);\n\n\n while(localizedValues.getStatus() != AsyncTask.Status.FINISHED){\n //Wait for the taks to finish\n }\n ArrayList<Glossary> glossaries = SharedPrefs.getParcelableArray(\"dictionaries\", new TypeToken<ArrayList<Glossary>>() {\n }.getType());\n assertEquals(\"Should be equal\", \"LAEKN\", glossaries.get(0).getDictCode());\n BiMap<String,String> languages = SharedPrefs.getStringBiMap(\"loc_dictionaries\");\n\n assertEquals(\"Should be equal\", \"Medicine\", languages.get(\"LAEKN\"));\n }", "public Dict findByDictType(String dictType);", "ApiKeys listKeys();", "int deleteByExample(DictDoseUnitExample example);", "void mo29842a(IObjectWrapper iObjectWrapper, zzatk zzatk, List<String> list) throws RemoteException;", "@SuppressWarnings(\"rawtypes\")\n\t@Test\n\tpublic void retrieveCollections() {\n\t\t// We can also query for the collections themselves, since they are\n\t\t// first class objects.\n\n\t\tObjectSet result = db.queryByExample(new ArrayList());\n\t\tlistResult(result);\n\n\t\t// as we are initializing readouts\n\t\tassertEquals(2, result.size());\n\n\t}", "@Test\r\n\tpublic void testGetDNSList(){\r\n\t\tList<String> lst = new ArrayList<String>();\r\n\t\tlst = dnsService.getAllDNS();\r\n\t\tSystem.out.println(\"==>dns list:\");\r\n\t\tSystem.out.println(JSON.toJSONString(lst));\r\n\t}", "@Test\n public void test011() {\n\n List<Integer> storeid = response.extract().path(\"data.services.storeservices.storeId\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The storeId of the all stores are:: \" + storeid);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "@Test\n public void getPersonsListTest() {\n \tHelloWorldImpl hello=new HelloWorldImpl();\n \tPersonList personInputList=new PersonList();\n \tList<PersonRequest> pl=new ArrayList<PersonRequest>();\n \tPersonRequest pr1=new PersonRequest();\n \tpr1.setName(\"Satish\");\n \tpr1.setSurname(\"Namdeo\");\n \tpr1.setLocation(\"Servicesource\");\n \tPersonRequest pr2=new PersonRequest();\n \tpr2.setName(\"Rahul\");\n \tpr2.setSurname(\"Jain\");\n \tpr2.setLocation(\"Bigdata\");\n \tpl.add(pr1);\n \tpl.add(pr2);\n \tpersonInputList.setPersonList(pl);\n \tPersonList actualResult=hello.getPersonsList(personInputList);\n \t//check for result is not empty.\n \tassertNotNull(\"Result is not null\",actualResult);\n \t\n \tPersonRequest pr3=new PersonRequest();\n \tpr1.setName(\"Sakhshi\");\n \tpr1.setSurname(\"Jain\");\n \tpr1.setLocation(\"Servicesource\");\n \tpl.add(pr3);\n \t\n \t//check for equality\n \tPersonRequest[] actualResultArray = actualResult.getPersonList().toArray(new PersonRequest[actualResult.getPersonList().size()]);\n \tPersonRequest[] expectedArray = pl.toArray(new PersonRequest[pl.size()]);\n \tassertArrayEquals(\"list elements are not equal\",expectedArray, actualResultArray);\n \t//System.out.println(\"personsListDisplayTest result : \"+result.getPersonList().size());\n }", "@Test\n public void testWriteDict() {\n System.out.println(\"writeList\");\n /** Positive testing. */\n Map<String, Object> map = new HashMap();\n map.put(\"spam\", -3L);\n map.put(\"test\", 3L);\n map.put(\"book\", 0L);\n String expResult = \"d4:booki0e4:spami-3e4:testi3ee\";\n String result = Bencoder.writeDict(map);\n assertEquals(expResult, result);\n map.clear();\n map.put(\"abc\", new LinkedList<Long>(Arrays.asList(-1L, 0L, 1L)));\n map.put(\"cba\", \"moo\");\n expResult = \"d3:abcli-1ei0ei1ee3:cba3:mooe\";\n result = Bencoder.writeDict(map);\n assertEquals(expResult, result);\n }", "private void getDictionary(){\r\n // TODO: read Dictionary\r\n try{\r\n lstDictionary.clear();\r\n for(int i = 0; i < IConfig.LABEL_COUNT; i++){\r\n lstDictionary.add(new HashMap<>());\r\n DictionaryReader dictionaryReader = new DictionaryReader(lstDictionary.get(i), IConfig.DICTIONARY_URL[i]);\r\n dictionaryReader.read();\r\n }\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "@Test \n\tpublic void getABSversionTest(){\n\t\tlogger.info(\"--------------------start---getABSversionTest--------------------------------------------------------------------------------------------------\");\n\t\tMap<String,Object> map=trustManagementService.getABSversion();\n\t\tSet<String> set=map.keySet();\n\t\tfor (String string : set) {\n\t\t\tlogger.info(\"查找结果getABSversionTest -----map--set----键key:(\"+string+\") 值value:\" +map.get(string) ); \n\t\t}\n\t\t\n\t\tlogger.info(\"--------------------end---getABSversionTest--------------------------------------------------------------------------------------------------\");\n\t}", "@Test\n public void testCreateFilter() throws Exception {\n System.out.println(\"createFilter\");\n \n String expResult = \"{\\\"key\\\":{\\\"Delivery\\\":\\\"***REMOVED***\\\",\\\"FunctionalEnvironment\\\":\\\"Production\\\"},\"\n + \"\\\"values\\\":[\\\"Company\\\",\\\"VirtualDC\\\",\\\"Manufacturer\\\"]}\";\n \n \n TreeMap<String,String> key = new TreeMap<String,String>();\n List<String> values =new ArrayList<String>();\n key.put(\"Delivery\", \"***REMOVED***\");\n key.put(\"FunctionalEnvironment\", \"Production\");\n \n \n \n values.add(\"Company\");\n values.add(\"VirtualDC\");\n values.add(\"Manufacturer\");\n \n CriteriaFilter instance = new CriteriaFilter(key, values);\n \n List<CriteriaFilter> resultList = new ArrayList<CriteriaFilter>();\n resultList.add(instance);\n \n \n String result = \"\";\n for (CriteriaFilter criterio: resultList){\n System.out.println(\"result is \" + criterio);\n result = criterio.toString();\n }\n \n assertEquals(expResult, result);\n \n }", "int searchYardList() throws DAOException;", "public interface DictionaryService extends Remote{\n\t/**\n\t * \n\t * @param lookup\n\t * @return <result> OR <\"String not found\">\n\t * @throws RemoteException\n\t */\n\tpublic String lookup(String wordToSearch) throws RemoteException;\n\t\n}", "public abstract List get(List oids) throws OIDDoesNotExistException;", "@Test\n void testFindAllByNotCrypto() {\n long size = service.findAll().stream().filter(item -> !item.getCrypto()).count();\n assertEquals(size, service.findAllByNotCrypto().size());\n }", "@Test\n public void testDictionaryCodeExamples() {\n logger.info(\"Beginning testDictionaryCodeExamples()...\");\n\n // Create a dictionary with some associations in it\n String[] keys = { \"charlie\", \"bravo\", \"delta\" };\n Integer[] values = { 3, 2, 4 };\n Dictionary<Integer> dictionary = new Dictionary<>(keys, values);\n logger.info(\"A dictionary of numbers: {}\", dictionary);\n\n // Add a new association\n dictionary.setValue(\"alpha\", 1);\n logger.info(\"Appended a \\\"alpha-1\\\" key-value pair: {}\", dictionary);\n\n // Sort the dictionary\n dictionary.sortElements();\n logger.info(\"The list now sorted: {}\", dictionary);\n\n // Retrieve the value for a key\n int value = dictionary.getValue(\"charlie\");\n logger.info(\"The value for key \\\"charlie\\\" is: {}\", value);\n\n // Remove an association\n dictionary.removeValue(\"charlie\");\n logger.info(\"With the value for key \\\"charlie\\\" removed: {}\", dictionary);\n\n logger.info(\"Completed testDictionaryCodeExamples().\\n\");\n }", "public void testListClaim(){\n\t}", "@Test\n public void test005() {\n\n List<String> storeid = response.extract().path(\"data.services.storeservices.storeId\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The storeId of the all stores are:: \" + storeid);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "public interface DictionaryService extends Remote {\n\t\n\tpublic String search(String Word) throws RemoteException, IOException;\n\tpublic void populate() throws RemoteException, IOException;\n\n}", "public interface CtlService {\n\n\tList<Map<String, Object>> getCtlInfByEquNum(Map<String, Object> map) throws Exception;\n\n\n\n}", "@Test\n void test_getALlreviews() throws Exception{\n\n List<ReviewMapping> reviewList=new ArrayList<>();\n\n for(long i=1;i<6;i++)\n {\n reviewList.add( new ReviewMapping(i,new Long(1),new Long(1),\"good\",3));\n }\n\n Mockito.when(reviewRepository.findAll()).thenReturn(reviewList);\n List<ReviewMapping> e=reviewService.GetReviewMappings();\n assertThat(e.size(),equalTo(5));\n }", "public Vector findAll(String login, Boolean isAdmin) throws Exception {\n \nDebugSupport.printlnTest(\"RegionObject findAll started\");\t\n\tQuery query;\n\n if (!isAdmin.booleanValue()) {\n query = new Query(QUERY_SELECT_View, DataUtil.RESULT_JdbcObjectVector);\n query.append(\"AND o.loiginid=?\", login);\n } else {\n query = new Query(QUERY_SELECT_Admin, DataUtil.RESULT_JdbcObjectVector);\n }\n\n query.append(\"ORDER BY regname\");\n\n Vector vec= findVector(query);\n return vec;\n}", "@Test\n public void term_tag() throws AtlasBaseException {\n SearchParameters params = new SearchParameters();\n params.setTermName(SALES_TERM+\"@\"+SALES_GLOSSARY);\n params.setClassification(METRIC_CLASSIFICATION);\n\n List<AtlasEntityHeader> entityHeaders = discoveryService.searchWithParameters(params).getEntities();\n\n Assert.assertTrue(CollectionUtils.isNotEmpty(entityHeaders));\n for(AtlasEntityHeader e : entityHeaders){\n System.out.println(e.toString());\n }\n assertEquals(entityHeaders.size(), 4);\n }", "@Test\n public void testLoad() {\n System.out.println(\"load\");\n PubMedInitialCollection instance = PubMedInitialCollection.get();\n\n Collection<OpenAccessPaper> resultC = instance.getMyPapers();\n int result = resultC.size();\n int expResult = 40;\n assertEquals(expResult, result);\n\n }", "public String getAuthData (String stdId){\n String tnp = new String(\"\");\n String id = new String(\"\");\n Boolean ad = false;\n\n Document query = new Document();\n query.put(\"id\",stdId);\n System.out.println(\"SECURITY GETTIN USER INFO\");\n\n MongoCursor<Document> cursor = Security.find(query).iterator();\n try {\n while(cursor.hasNext()) {\n System.out.println(\"SECURITY GETTIN USER INFO\");\n Document c = cursor.next();\n tnp =(String) c.get(\"token\");\n ad =(Boolean) c.get(\"admin\");\n id =(String) c.get(\"id\");\n }\n } finally {\n cursor.close();\n }\n return \"{\\\"token\\\":\\\"\"+tnp+\"\\\",\\\"admin\\\":\"+ad+\",\\\"id\\\":\\\"\"+id+\"\\\"}\";\n}", "@Ignore\n @Test\n public void testGetDocument() throws Exception\n {\n \n int organizationId = 100;\n \n Util.commonServiceIPs=\"127.0.0.1\";\n EntityManager em = Util.getEntityManagerFactory(100).createEntityManager();\n \n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client esClient = ESUtil.getClient(em, platformEm, 1, false);\n \n String dataobjectId = \"081E9AB4157A5F628E93436DB994A1F1EADCF3EA\";\n \n JSONObject obj = ESUtil.getDocument(esClient,organizationId, dataobjectId, null);\n \n int k;\n }", "@Test\n public void testSysPer(){\n List<SysPermission> permissions = sysPermissionService.findByUserId(9L);\n System.out.println(\"permissions:\" + permissions.size());\n }", "@Test\r\n public void testSearchCollection() throws Exception {\r\n LOG.info(\"searchCollection\");\r\n String query = \"batman\";\r\n int page = 0;\r\n List<Collection> result = tmdb.searchCollection(query, LANGUAGE_DEFAULT, page);\r\n assertFalse(\"No collections found\", result == null);\r\n assertTrue(\"No collections found\", result.size() > 0);\r\n }", "@Test\r\n public void testListAll() {\r\n System.out.println(\"listAll\");\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n String expResult = \"\";\r\n String result = instance.listAll();\r\n System.out.println(result);\r\n }", "int countByExample(ErpOaLicKeyExample example);", "@Test\n public void test13() {\n List<String> name = response.extract().path(\"data.findAll{it.state=='MN'}.name\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The store names where state is MN are :: \" + name);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "@Test\r\n\tpublic void testGetRecords() {\r\n\t\tAssert.assertNull(oic.getRecords(\"a\"));\r\n\r\n\t\tList<ObstetricsInit> list;\r\n\t\ttry {\r\n\t\t\tlist = oiData.getRecords(1);\r\n\t\t\tAssert.assertEquals(list, oic.getRecords(\"1\"));\r\n\t\t} catch (DBException e) {\r\n\t\t\tAssert.fail(e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\t//TODO: Maybe test sorting\r\n\t}", "@Test\n public void test3FindAll() {\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n List<SpecialityDTO> lista=(List<SpecialityDTO>)dao.findAll(); \n System.out.println(lista);\n assertTrue(!lista.isEmpty());\n }", "@Test\n public void testGetAccessibilityServiceList() throws Exception {\n List<AccessibilityServiceInfo> expectedServices = new ArrayList<>();\n AccessibilityServiceInfo accessibilityServiceInfo = new AccessibilityServiceInfo();\n accessibilityServiceInfo.packageNames = new String[] { \"foo.bar\" };\n expectedServices.add(accessibilityServiceInfo);\n\n // configure the mock service behavior\n when(mMockService.getInstalledAccessibilityServiceList(anyInt()))\n .thenReturn(expectedServices);\n\n // invoke the method under test\n AccessibilityManager manager = createManager(true);\n List<AccessibilityServiceInfo> receivedServices =\n manager.getInstalledAccessibilityServiceList();\n\n verify(mMockService).getInstalledAccessibilityServiceList(UserHandle.USER_CURRENT);\n // check expected result (list equals() compares it contents as well)\n assertEquals(\"All expected services must be returned\", expectedServices, receivedServices);\n }" ]
[ "0.6203127", "0.5827502", "0.5816604", "0.5716151", "0.56750894", "0.5579459", "0.5570094", "0.55682474", "0.5566009", "0.55434126", "0.55251086", "0.5445969", "0.54243284", "0.5397361", "0.5368857", "0.5360419", "0.5344254", "0.5330539", "0.53278404", "0.53069097", "0.52642745", "0.5244646", "0.52130693", "0.51700324", "0.516535", "0.5130416", "0.512303", "0.5115239", "0.51059014", "0.5096241", "0.50939876", "0.50925326", "0.5084411", "0.5082806", "0.5079171", "0.507522", "0.50746506", "0.50742066", "0.5072992", "0.50719386", "0.5042224", "0.50180423", "0.5016607", "0.5014623", "0.5007782", "0.50009817", "0.4998856", "0.49984497", "0.49975494", "0.49847913", "0.49711013", "0.49653274", "0.49601448", "0.49580708", "0.49476933", "0.49467152", "0.49386305", "0.49286368", "0.4921996", "0.4920972", "0.49174094", "0.49161312", "0.49153206", "0.49123892", "0.4910126", "0.49072224", "0.48982745", "0.48904637", "0.48862854", "0.48829612", "0.48824885", "0.4878723", "0.48745552", "0.48722476", "0.48715714", "0.4863204", "0.48576745", "0.48494226", "0.4847835", "0.4834916", "0.48305714", "0.48176196", "0.48131877", "0.48059162", "0.48041353", "0.4802574", "0.47909135", "0.47886154", "0.47851956", "0.47825122", "0.477971", "0.47711894", "0.4771183", "0.47600448", "0.47572723", "0.47552398", "0.47508377", "0.4750192", "0.4749259", "0.4745514" ]
0.51765305
23
Test of addPlayer method, of class Team. Ensure player is added to team
@Test public void testAddPlayer() { System.out.println("addPlayer"); Player player = new Player("New Player"); Team team = new Team(); team.addPlayer(player); assertEquals(player, team.getPlayers().get(0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addPlayer(Player newPlayer);", "void addEventPlayers(Player player, boolean team);", "@Test\n\tpublic void validAddPlayer_1() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tgameState.addPlayer(0, \"Ben\", Color.RED);\n\t\tPlayer player = gameState.getPlayer(0);\n\t\tassertNotNull(\"Should be able to get a valid player\", player);\n\t}", "@Test\n public void testaddPlayer() {\n session.addPlayer(new Player(\"127.0.0.1\", \"Lars\"));\n // Test if the size of the list now is 2.\n assertEquals(2, session.getPlayers().size());\n }", "void addMyTeam(Team team) throws HasTeamAlreadyException;", "boolean addPlayer(String player);", "void addPerson(Player player);", "public void addPlayer(Player player) {\n //int id = Repository.getNextUniqueID();\n this.player = player;\n }", "@Test\n public final void testPlayer1Win() {\n checkPlayerWin(player1);\n }", "public void addPlayer(Player player){\n players.add(player);\n }", "void addPlayer(IPlayer player);", "public boolean addTeam(T team){\n if (teams.contains(team)){\n System.out.println(\"Cant add team is allready in the league list.\");\n return false;\n }else{\n teams.add(team);\n return true;\n }\n }", "@Test\n public final void testPlayer2Win() {\n checkPlayerWin(player2);\n }", "@Override\n public void addPlayer(Player player) {\n\n if(steadyPlayers.size()>0){\n PlayersMeetNotification.firePropertyChange(new PropertyChangeEvent(this, \"More than one Player in this Panel\",steadyPlayers,player));\n }\n steadyPlayers.add(player);\n\n }", "@Test\r\n\tpublic void saveTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeam \r\n\t\tTeam team = new wsdm.domain.Team();\r\n\t\tservice.saveTeam(team);\r\n\t}", "private void addPlayerToGroup(Scoreboard board, Player player) {\n String playername = player.getName();\n board.registerNewTeam(playername);\n board.getTeam(playername).addPlayer(player);\n }", "public void addTeam(Team team) {\n int maxTotalTeamsCurrentlyAllowed = getTotalPlayersInLeague();\n\n // If a team has been created\n if(getTeams().size() != 0) {\n\n float greatestPlayerCount;\n // if the number of players on the largest team is not equal to zero\n if((greatestPlayerCount = (float) getTeamWithMostPlayers().getPlayerCount()) != 0) {\n\n // Get the sum of all the players in the league\n float totalLeaguePlayers = (float) getTotalPlayersInLeague();\n\n // divide the total players in league by number of players in largest team, rounded down\n float totalTeamsAllowedFloat = totalLeaguePlayers / greatestPlayerCount;\n\n // cast into double for Math.floor method\n double totalTeamsAllowedDouble = (double) totalTeamsAllowedFloat;\n\n // cast into integer for comparison\n maxTotalTeamsCurrentlyAllowed = (int) Math.floor(totalTeamsAllowedDouble);\n }\n\n }\n\n // If we're requesting to make more teams than the current max allowed, throw exception\n if (getTeams().size() < maxTotalTeamsCurrentlyAllowed) {\n teams.add(team);\n } else {\n throw new IndexOutOfBoundsException(\"Not enough players for a new team\");\n }\n\n }", "public void insertPlayer(Player player, int idTeam) {\n\t\ttry {\n\t\t\tStatement statement = null;\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tjava.sql.Date pDate = new java.sql.Date(player.getDateOfBirth().getTime());\n\t\t\tString insertPlayer_sql = \"INSERT INTO \" + player_table\n\t\t\t\t\t+ \" (id, idTeam, name, lastname, dateOfBirth, height)\" + \"VALUES (NULL, \" + idTeam + \", '\"\n\t\t\t\t\t+ player.getName() + \"' , '\" + player.getLastname() + \"' , '\" + pDate + \"' , '\" + player.getHeight()\n\t\t\t\t\t+ \"')\";\n\t\t\tstatement.executeUpdate(insertPlayer_sql);\n\t\t} catch (SQLException e) {\n\t\t\tif (e.getErrorCode() == MYSQL_DUPLICATE_PK) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\t\t\t\talert.setHeaderText(\"Duplicity Error\");\n\t\t\t\talert.setContentText(\"This player is already in our database\");\n\t\t\t\talert.showAndWait();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void addPlayer(FootballPlayer aPlayer) {\n\t\tplayers.add(aPlayer);\n\t}", "@Test\n\tpublic void invalidAddPlayer_1() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tPlayer player = gameState.getPlayer(0);\n\t\tassertNull(\"Shouldnt be able to get an invalid player\", player);\n\t}", "public boolean addPlayer(Player p) {\n\t\tif(p != null && !squareOccuped()) {\n\t\t\tthis.player = p;\n\t\t\treturn true;\n\t\t} else return false;\n\t}", "public void addPlayer(Player player) {\n playerList.add(player);\n }", "public void cmdAddPlayer(User teller, String playerHandle) {\n Player player = tournamentService.findPlayer(playerHandle);\n try {\n player = tournamentService.createPlayer(playerHandle);\n } catch (InvalidPlayerException e) {\n replyError(teller, e);\n return;\n } catch (InvalidTeamException e) {\n replyError(teller, e);\n command.tell(teller, \"To create a new team, use the \\\"add-team\\\" command. Usage: add-team XXX\");\n return;\n }\n tournamentService.flush();\n command.tell(teller, \"Done. Player {0} has joined the \\\"{1}\\\".\", player, player.getTeam());\n command.tell(teller, \"To set the player''s real name, use: \\\"set-player {0} name 2200\\\"\", player);\n cmdShowPlayer(teller, player);\n }", "public void addTeam(Team team){\n\t\tthis.teamList.add(team);\n\t}", "@Test\n\tpublic void validGetPlayer_1() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tgameState.addPlayer(0, \"Ben\", Color.RED);\n\t\tassertEquals(gameState.getPlayerID(\"Ben\"), 0);\n\t}", "public boolean addPlayer(Player player)\n\t{\n\t\treturn playerList.add(player);\n\t}", "public static void addPlayer(MovingUnit player) {\r\n\t\t_players.add(player);\r\n\t}", "public void addPlayerToTable(Player player){\n\t\tgamePlayers.add(player);\n\t}", "public void newTeam(Team team);", "@Test\r\n public void testAddAndGetPoints() {\r\n Player player = new Player();\r\n int expResult = 0;\r\n int result = player.getPoints();\r\n assertEquals(expResult, result);\r\n \r\n \r\n player.addPoints(10);\r\n int expResult2 = 10;\r\n int result2 = player.getPoints();\r\n assertEquals(expResult2, result2);\r\n\r\n }", "default boolean addPlayer(Player player) {\n return addPlayer(Objects.requireNonNull(player, \"player\").getName());\n }", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "@Override\r\n\tpublic ResultMessage addTeam(TeamPO oneTeam) {\n\t\treturn teams.addTeam(oneTeam) ;\r\n\t}", "public void playerAddedToTeam(ArenaPlayer p, Team t) {\n \t\tif (!t.hasSetName() && t.getPlayers().size() > Defaults.MAX_TEAM_NAME_APPEND){\n \t\t\tt.setDisplayName(TeamUtil.createTeamName(indexOf(t)));\n \t\t}\n \t\tstartTracking(p);\n \t\tarenaInterface.onJoin(p,t);\n \n \t\tPerformTransition.transition(this, MatchState.ONJOIN, p,t, true);\n \t}", "public void addPlayer(Player player, String teamName, String prefix, String suffix) {\n // Give the player the current scoreboard.\n player.setScoreboard(scoreboard);\n\n // Lets add the team to the scoreboard.\n addTeam(teamName, prefix, suffix);\n\n // Add the player to the team.\n getTeam(teamName).addEntry(player.getName());\n }", "public static void addPlayer(League theLeague, Team theTeam, Scanner keyboard) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Add Player---\");\r\n\t\ttheTeam.teamToString();\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"--Top 20 Free Agents--\");\r\n\t\ttheLeague.getFreeAgents(20);\r\n\r\n\t\tint playerChoice;\r\n\t\tdo {\r\n\t\t\tdo {\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(\" 0 - Filter Free Agents by Position\");\r\n\t\t\t\tSystem.out.println(\" -1 - View All Free Agents\");\r\n\t\t\t\tSystem.out.println(\"1-\" + theLeague.playerList().size() + \" - Select a Player\");\r\n\t\t\t\tplayerChoice = Input.validInt(-1, theLeague.playerList().size(), keyboard);\r\n\t\t\t\t\r\n\t\t\t\tif (playerChoice == -1) {\r\n\t\t\t\t\ttheLeague.getFreeAgents();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (playerChoice == 0) {\r\n\t\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\t\tSystem.out.println(\"Which position would you like to view?\");\r\n\t\t\t\t\tSystem.out.println(\"1 - QB\");\r\n\t\t\t\t\tSystem.out.println(\"2 - WR\");\r\n\t\t\t\t\tSystem.out.println(\"3 - RB\");\r\n\t\t\t\t\tSystem.out.println(\"4 - TE\");\r\n\t\t\t\t\tswitch (Input.validInt(1, 4, keyboard)) {\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent QBs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"QB\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent WRs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"WR\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent RBs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"RB\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent TEs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"TE\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} while (playerChoice < 1);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (theLeague.playerList().get(playerChoice - 1).getIsOwned()) {\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(theLeague.playerList().get(playerChoice - 1).playerToString() + \" is not available\");\r\n\t\t\t}\r\n\t\t} while (theLeague.playerList().get(playerChoice - 1).getIsOwned());\r\n\r\n\t\tPlayer thePlayer = theLeague.playerList().get(playerChoice - 1);\r\n\t\tthePlayer.setIsOwned();\r\n\t\ttheTeam.getRoster().add(thePlayer);\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"***\" + theTeam.getManagerName() + \" has added \" + thePlayer.playerToString() + \"***\");\r\n\t}", "@Override\r\n\t@Transactional(propagation=Propagation.REQUIRED)\r\n\tpublic void add(Team team) {\n\t\tentityManager.createQuery(\"insert into Team(id, name) values (team.id, team.name)\");\r\n\t}", "@org.junit.Test\n public void test_PlayerWin(){\n deck.add(new Card(Suit.Club ,2)); //player\n deck.add(new Card(Suit.Diamond, 10)); //dealer\n deck.add(new Card(Suit.Spade, 11)); //player\n deck.add(new Card(Suit.Heart, 8)); //dealer\n deck.add(new Card(Suit.Diamond, 7)); //player\n deck.add(new Card(Suit.Heart, 9)); //dealer\n\n Start start= new Start(player,dealer,deck,table);\n Assert.assertTrue(start.checkBetValidity());\n start.deal();\n Assert.assertFalse(start.checkBlackJack());\n start.hit();\n Assert.assertEquals(20,start.playerHandValue());\n start.stand();\n Assert.assertEquals(Status.Players_wins,start.getGameStatus());\n }", "public void addPlayer(Player player) {\n this.add(player);\n this.players.add(player);\n }", "public void addPlayer(Player p) {\n if (gameState != GameState.AWAITING_PLAYERS) {\n throw new GameStateInvalidException(\"Cannot add players once game is underway...\");\n }\n\n // ok, just add...\n if (!players.contains(p)) {\n players.add(p);\n }\n }", "@Test\r\n\tpublic void testCreateMatchToMatchLeaguePlayGame() {\n\t\tassertTrue(\"New match to match league play game not created\", false);\r\n\t\tassertTrue(false);\r\n\t}", "public boolean addPlayerItem(PlayerItem playerItem);", "@Test\n public void testMoveToPlayer(){\n \n }", "@Test\r\n\tpublic void saveTeamTeamplayerses() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamTeamplayerses \r\n\t\tInteger teamId_7 = 0;\r\n\t\tTeamplayers related_teamplayerses = new wsdm.domain.Teamplayers();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamTeamplayerses(teamId_7, related_teamplayerses);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamTeamplayerses\r\n\t}", "void playerAdded();", "@Override\n public void addTeamIdentifier(TeamIdentifier teamIdentifier) {\n }", "Team createTeam();", "private Player addNewPlayer(String username) {\n if (!playerExists(username)) {\n Player p = new Player(username);\n System.out.println(\"Agregado jugador \" + username);\n players.add(p);\n return p;\n }\n return null;\n }", "public abstract BossBar addPlayer(UUID player);", "public void addPlayer(Player player, UserGroup userGroup) {\n addPlayer(player, userGroup.getTeamName(), userGroup.getUserGroupPrefix(), null);\n }", "@Test\n\tpublic void testgetPlayers() {\n\t\tList<Character> characters = new ArrayList<Character>();\n\t\tcharacters.add(new Character(\"Miss Scarlet\", Color.red, new Point(7,24), \"assets/cards/character/MissScarlet.jpg\"));\n\t\tcharacters.add(new Character(\"Colonel Mustard\", Color.yellow, new Point(0,17),\"assets/cards/character/ColonelMustard.jpg\"));\n\t\tcharacters.add(new Character(\"Mrs. White\", Color.white, new Point(9,0), \"assets/cards/character/MrsWhite.jpg\"));\n\t\tcharacters.add(new Character(\"The Reverend Green\", Color.green, new Point(14,0),\"assets/cards/character/MrGreen.jpg\"));\n\t\tcharacters.add(new Character(\"Mrs. Peacock\", Color.blue, new Point(23,6), \"assets/cards/character/MrsPeacock.jpg\"));\n\t\tcharacters.add(new Character(\"Professor Plum\", Color.pink, new Point(23,19),\"assets/cards/character/ProfessorPlum.jpg\"));\n\t\tPlayer p = new Player(\"Chris\");\n\t\tcharacters.get(1).setPlayer(p);\t\t\n\t\tBoard b = new Board(characters);\n\t\tassertTrue(b.getPlayers().contains(p));\n\t\tassertTrue(b.getPlayers().size() ==1);\n\t\t\n\t}", "public boolean registerPlayer(Player p);", "void createPlayer(Player player);", "public void addPlayerToTheList(){\n \tif(!txtFieldPlayerName.getText().trim().isEmpty() && totPlayers <= maximumPlayersAllowed){\n\t\t\t\n \t\t//creates a new Player and adds the name that the user inputs from the textField\n\t\t\tplayer.add(new Player(txtFieldPlayerName.getText()));\n\t\t\n\t\t\tString playerName = \"\";\n\t\t\tint playerNr = 1;\n\t\t\t\n\t\t\tfor(Player p : player){\n\t\t\t\tplayerName += playerNr+\": \"+p.getName()+\"<br>\"; \n\t\t\t\tplayerNr++;\n\t\t\t}\n\t\t\t\n\t\t\ttotPlayers++;\n\t\t\tlblPlayerList.setText(\"<html><h2>PLAYER LIST</h2>\"+playerName+\"</html>\");\n\t\t\ttxtFieldPlayerName.setText(\"\");\n\t\t}\n\t\t\n\t\tif(totPlayers >= minimumPlayersAllowed){\n\t\t\tbtnPlay.setEnabled(true);\n\t\t}\n\t\t\n\t\tif(totPlayers >= maximumPlayersAllowed){\n\t\t\tbtnAddPlayer.setEnabled(false);\n\t\t\ttxtFieldPlayerName.setEnabled(false);\n\t\t}\n }", "private void addPlayer(long gameId, long memberId)\r\n\t{\r\n\t\tGame game = gameService.lookupGame(gameId);\r\n\t\tMember member = memberDao.findById(memberId);\r\n\t\tlogger.debug(\"addPlayer game=\"+game.getName()+ \" member=\"+ member.getId());\r\n\t\t\r\n\t\t// check if member already in game, if so do not add (throw error too?)\r\n\t\tfor (Player p : game.getPlayers()) {\r\n\t\t\tif (p.getMember().getId() == member.getId()) {\r\n\t\t\t\tlogger.error(\"Member is already a player\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tPlayer player = new Player();\r\n\t\tplayer.setGame(game);\r\n\t\tplayer.setMember(member);\r\n\t\tplayer.setOrder(findNextPlayerOrder(game));\r\n\t\tplayerDao.create(player);\r\n\t\t\r\n\r\n\t}", "public void testGetPlayer() {\n System.out.println(\"getPlayer\");\n Play instance = new Play(\"Player1\", new Card(Rank.QUEEN, Suit.SPADES));\n String expResult = \"Player1\";\n String result = instance.getPlayer();\n assertEquals(expResult, result);\n }", "public void addPlayer(String p) {\n this.playersNames.add(p);\n }", "public void addPlayer(Player p){\r\n this.players[PlayerFactory.nb_instances-1]=p;\r\n this.tiles[p.getX()+(p.getY()*this.width)]=p;\r\n }", "@Test\n public void testremovePlayer() {\n session.removePlayer(playerRemco);\n // There already was 1 player, so now there should be 0\n assertEquals(0, session.getPlayers().size());\n }", "public boolean addPlayer(final Player player)\n {\n if (player == null || !player.isOnline()) {\n return false;\n }\n\n String playerName = player.getName().toLowerCase();\n\n if (!listeners.containsKey(playerName)) {\n listeners.put(playerName, player);\n\n player.setScoreboard(board);\n\n return true;\n }\n\n return false;\n }", "public void addTeam(final TeamController team) {\r\n\t\tteamList.add(team);\r\n\t}", "private static void testPlayer() {\r\n\t\t\tnew AccessChecker(Player.class).pM(\"getName\").pM(\"getMark\").pM(\"toString\").checkAll();\r\n\t\t\tPlayer p = new Player(\"Test\", 'X');\r\n\t\t\tcheckEq(p.getName(), \"Test\", \"Player.getName\");\r\n\t\t\tcheckEq(p.getMark(), 'X', \"Player.getMark\");\r\n\t\t\tcheckEqStr(p, \"Test(X)\", \"Player.toString\");\t\t\r\n\t\t}", "private void addPlayers(@NotNull MapHandler map, @NotNull NewGameDto newGameDto) {\n ComparableTuple<Integer, Stack<SpawnTile>> result = analyseMap(map);\n flagCount = result.key;\n Stack<SpawnTile> spawnTiles = result.value;\n if (!spawnTiles.isEmpty()) {\n for (PlayerDto player : newGameDto.players) {\n SpawnTile spawnTile = spawnTiles.pop();\n if (player.id == newGameDto.userId) {\n user = new Player(spawnTile.getX(), spawnTile.getY(), Direction.NORTH, map, new ComparableTuple<>(GameGraphics.mainPlayerName + \" (you)\", player.color), player.id);\n user.setDock(spawnTile.getSpawnNumber());\n players.add(user);\n } else {\n IPlayer onlinePlayer = new OnlinePlayer(spawnTile.getX(), spawnTile.getY(), Direction.NORTH, map, new ComparableTuple<>(player.name, player.color), player.id);\n onlinePlayer.setDock(spawnTile.getSpawnNumber());\n players.add(onlinePlayer);\n }\n }\n } else {\n for (int i = 0; i < playerCount; i++) {\n NonPlayer nonPlayer = new NonPlayer(i, 0, Direction.NORTH, map, new ComparableTuple<>(\"blue\", Color.BLUE));\n nonPlayer.setDock(i);\n players.add(nonPlayer);\n }\n }\n }", "public void addPlayer(String name) {\n if (nrOfPlayers() < 4) {\n players.add(new Player(name, nrOfPlayers() + 1));\n this.status = \"Initiated\";\n } else {\n throw new NoRoomForMorePlayersException();\n }\n }", "public void addPlayer(Player inPlayer) {\n\t\tgetPlayersInRoom().add(inPlayer);\n\t}", "protected boolean addTeam(Team team) {\n\t\t//TODO\n\t\t// input check\n\t\tif (team == null)\n\t\t\treturn false;\n\t\t\n\t\t// checking if team exists already\n\t\tif (teams.contains(team))\n\t\t\treturn false;\n\t\t\t\n\t\treturn teams.add(team);\n\t}", "public void addPlayer(String name) {\n players.add(new Player(name));\n }", "public void addPlayer(int place, Player p) {\r\n\t\tif (!players.containsKey(place))\r\n\t\t\tplayers.put(place, p);\r\n\t}", "@Test\n public final void testPlayer() {\n assertEquals(1, player.getX(), 0);\n assertEquals(1, player.getY(), 0);\n assertTrue(!player.conversionMode);\n player.setMoveSpeed(0.3f);\n assertEquals(0.3, player.getMoveSpeed(), 0.01);\n assertEquals(player.getData().getType(), game.util.DataPacket.Type.PLAYER);\n }", "@WebMethod public Team addTeam(String name) throws TeamAlreadyExists;", "private void add(String name) {\n try {\n PokemonToEdit pkm = Reader.readPokemon(name);\n team.add(pkm);\n System.out.println(name + \" has been add to the team\");\n new PokemonEditTool(pkm);\n } catch (IOException e) {\n System.out.println(\"Pokemon not found natively\");\n System.out.println(\"Try looking for the pokemon online\");\n try {\n PokemonToEdit pkm = Crawler.loadPokemon(name);\n Saver.savePokemon(pkm);\n team.add(pkm);\n System.out.println(name + \" has been added to the team\");\n new PokemonEditTool(pkm);\n } catch (IOException ex) {\n System.out.println(\"Pokemon not found\");\n } catch (TeamFullException ex) {\n System.out.println(\"Team is full\");\n }\n } catch (TeamFullException e) {\n System.out.println(\"Team is full\");\n\n }\n }", "@Test\n public void testGetMarkForPlayerNonExisting() {\n Player player = Player.builder().build();\n Map<Player, Character> players = new HashMap<>();\n players.put(player, 'O');\n Assertions.assertNull(GameUtil.getMarkForPlayerId(Game.builder().players(players).build(), \"X\"),\n \"Test non existing player in list.\");\n }", "public void addHero(Hero h) {\r\n if (team.size() < MAX_MEMBER_IN_A_TEAM) {\r\n team.add(h);\r\n }\r\n }", "public void addPlayer(final Player aPlayer)\r\n\t{\r\n\t\tmPlayer.setX(mStartX * Block.SIZE);\r\n\t\tmPlayer.setY(mStartY * Block.SIZE);\r\n\t\taddEntity(mPlayer);\r\n\t}", "public void addNewPlayer(Player p) {\n\t\t// if the player don't exists in the highscore list the player is added\n\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\tif(highscore.get(p.getName()) == null) {\n\t\t\t\thighscore.put(p.getName(), 0);\n\t\t\t}\n\t\t}\n\t\tthis.playerList.add(p); \n\t}", "@Test\n public void testAddPiece() {\n System.out.println(\"addPiece\");\n\n Piece piece = new Piece(PlayerColor.WHITE, 3);\n Player instance = new Player(PlayerColor.WHITE, \"\");\n\n instance.addPiece(piece);\n\n assertTrue(instance.getBagContent().contains(piece));\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void sendFakeTeam(Player player) {\n\t\tPacketContainer packet = new PacketContainer(PacketType.Play.Server.SCOREBOARD_TEAM);\n\t\tpacket.getStrings().write(0, FakeTeamName);\n\t\tpacket.getIntegers().write(1, 0); // Set create mode\n\t\tpacket.getStrings().write(5, \"never\"); // Push type\n\t\t\n\t\tCollection<String> names = packet.getSpecificModifier(Collection.class).read(0);\n\t\tnames.add(player.getName());\n\t\t\n\t\ttry {\n\t\t\tProtocolLibrary.getProtocolManager().sendServerPacket(player, packet);\n\t\t} catch (InvocationTargetException e) {\n\t\t\t// Should never happen unless packet changes\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}", "@Test\n public void shouldSavePlayerInTheWinnerGame() {\n String player = \"player\" ;\n scoreService.saveWinnerGame(player) ;\n assertThat( scoreService.getWinerGames() , \n is(not(empty()))) ;\n }", "public void setUpPlayers() {\n this.players.add(new Player(\"Diogo\"));\n this.players.add(new Player(\"Hayden\"));\n this.players.add(new Player(\"Gogo\"));\n }", "@Override\n \tpublic void createAndAddNewPlayer( int playerID )\n \t{\n \t\t//add player with default name\n \t\tPlayer newPlayer = new Player( playerID, \"Player_\"+playerID );\n \t\tgetPlayerMap().put( playerID, newPlayer );\n \t}", "@Test\n public void testGetOtherPlayer1Player() {\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\n Player l = j.getOtherPlayer(p);\n\n assertEquals(\"Le player devrai etre le même\", p, l);\n }", "@Test\n public void testAddCard() {\n d_gameData.getD_playerList().get(1).addCard(GameCard.BLOCKADE);\n assertEquals(true, d_gameData.getD_playerList().get(1).getD_cards().contains(GameCard.BLOCKADE));\n }", "public void addPlayer(Player player) {\n\t\tif(players.isEmpty()) {\n\t\t\tcurrent=player;\n\t\t\tplayers.add(current);\n\t\t}\n\t\telse {\n\t\t\tplayers.add(player);\n\t\t}\n\t}", "public void addPlayers(ArrayList<Player> players) {\r\n\t\tthis.players = players;\r\n\t}", "public DTOPlayer addPlayer(DTOPlayer dto) throws ServerProblem {\r\n\ttry (Connection connTDB = ConnectionManager.getInstance().getConnection()) {\r\n\t DTOPlayer newDto = engine.addPlayer(connTDB, dto);\r\n\t connTDB.commit();\r\n\t LOGGER.debug(\"Added new Player: \" + newDto);\r\n\t return newDto;\r\n\t} catch (Exception ex) {\r\n\t String error = \"Problem encountered adding a player: \" + ex;\r\n\t LOGGER.error(error);\r\n\t throw new ServerProblem(error, ex);\r\n\t}\r\n }", "public int addPlayer(String name) {\n\t\tUser user = users.get(userTurn);\n\t\tFootballPlayer player = market.findPlayer(name);\n\t\tdouble marketValue = player.getMarketValue();\n\t\tSystem.out.println(\"budget before buy\" + user.getBudget());\n\t\t\n\t\tif(tmpTeam.containsPlayer(name)) {\n\t\t\treturn 1;\n\t\t} \n\t\telse if(user.hasEnoughBudget(marketValue)) {\n\t\t\ttmpTeam.addPlayer(name, player);\n\t\t\tuser.updateBudget(marketValue, \"-\");\n\t\t\tSystem.out.println(\"budget \" + user.getBudget());\n\t\t\tSystem.out.println(\"marketvalue \" +marketValue);\n\t\t\tSystem.out.println(\"budget after buy\" + user.getBudget());\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}", "@Test\n @DisplayName(\"gets all player years when player table doesn't exist in database\")\n void shouldGetAllPlayerYearsForNewPlayer() throws SQLException, InterruptedException {\n //Add test player to queue\n Player tonyParker = new Player(\"2225\", \"Parker\", \"Tony\", \"0\", \"2001\", \"2018\");\n runHandler.addToQueueForTesting(tonyParker);\n Connection connPlayers1 = individualPlayerScraper.setNewConnection(\"playertest\");\n individualPlayerScraper.getPlayerActiveYears(connPlayers1, connPlayers1);\n //Query database for inserted player data\n HashMap<String, ArrayList<Integer>> yearSeasonActivityMap = new HashMap<>();\n ResultSet rs = connPlayers1.prepareStatement(\"SELECT * FROM parker_tony_2225_individual_data\").executeQuery();\n while (rs.next()) {\n yearSeasonActivityMap.put(rs.getString(\"year\"), new ArrayList<>(Arrays.asList(rs.getInt(\"reg\"), rs.getInt(\"preseason\"), rs.getInt(\"playoffs\"))));\n }\n assertEquals(createTonyParkerTestMap(), yearSeasonActivityMap);\n rs.close();\n connPlayers1.close();\n }", "public void addPlayer(String name) {\n\t\tcreateGameLobbyController.addPlayerToList(name);\n\t}", "public void registerPlayer(BlackjackPlayer player) {\r\n getPlayers().add(player);\r\n }", "public final void addPlayer(Player player) {\n\n\t\tif (player instanceof CulturePlayer) {\t\t\t\t\t\t\t\t// not too pretty but simple\n\t\t\tif (((CulturePlayer)player).isDissect()) { // instead of the culture player\n\t\t\t\tplayers.addAll(((CulturePlayer)player).getCulture()); // add all masters of the culture\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tplayers.add(player);\n\t}", "public boolean addPlayer(GamePlayer player) {\n\t\tif (players.size() >= info.getMaximumPlayers())\n\t\t\treturn false;\n\t\tplayer.setCurrentGame(this);\n\t\tplayer.setJoinLocation(player.getPlayer().get().getLocation());\n\t\tplayers.add(player);\n\t\treturn true;\n\t}", "public boolean addPlayer(long idGame, Player player) {\n Game game = this.getGameById(idGame);\n\n if(game == null) {\n return false;\n }\n\n game.getPlayers().add(player);\n this.save(game);\n\n return true;\n }", "@Test\n void win() {\n getGame().start();\n assertThat(getGame().isInProgress()).isTrue();\n getGame().move(getPlayer(), Direction.EAST);\n getGame().move(getPlayer(), Direction.EAST);\n verify(observer).levelWon();\n assertThat(getGame().isInProgress()).isFalse();\n }", "public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif (gameObj[1].size() == 0)\n\t\t{\n\t\t\tgameObj[1].add(new PlayerShip());\n\t\t\tSystem.out.println(\"PlayerShip added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t}\n\t\t\n\t}", "public boolean addPlayer(Player player) {\n\t\tif (playerOne == null) {\n\t\t\tplayerOne = player;\n\t\t\tplayerOne.init(gameBoard);\n\t\t\tcurrentPlayer = playerOne;\n\t\t\treturn true;\n\t\t}\n\t\tif (playerOne != null) {\n\t\t\tplayerTwo = player;\n\t\t\tplayerTwo.init(gameBoard);\n\t\t\tnextPlayer = playerTwo;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void cmdAddTeam(User teller, String teamCode) {\n Team team = tournamentService.findTeam(teamCode);\n if (team != null) {\n command.tell(teller, \"A team with name {0} already exists.\", teamCode);\n return;\n }\n try {\n team = tournamentService.createTeam(teamCode);\n } catch (InvalidNameException e) {\n replyError(teller, e);\n return;\n }\n tournamentService.flush();\n command.tell(teller, \"Done. Team {0} has now been created.\", team.getTeamCode());\n command.tell(teller, \"To set the team name, use: \\\"set-team {0} name New York Giants\\\"\", team.getTeamCode());\n cmdShowTeam(teller, team);\n }", "protected abstract void assignTeam(boolean playerR, boolean playerB);", "@Test\n public void testStart() {\n plugin.start(gameData, world);\n\n boolean hasPlayer = false;\n for (Entity e : world.getEntities(EntityType.PLAYER)) {\n hasPlayer = true;\n }\n assertTrue(hasPlayer);\n }", "public boolean addPlayer(int pno){\n\t\t\n\t\t// Gets the coordinates of a non-wall and non-occupied space\n\t\tint[] pos = initiatePlayer(pno);\n\t\t\n\t\t// If a free space could not be found, return false and the client will be force quit\n\t\tif (pos == null){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Put the player into the HashMaps\n\t\tplayerPosition.put(pno, pos);\n\t\tcollectedGold.put(pno, 0);\n\t\t\n\t\treturn true;\n\t}", "void create(Team team);" ]
[ "0.73188776", "0.7241789", "0.7129436", "0.7081124", "0.69791335", "0.6965619", "0.6853274", "0.6827101", "0.6819866", "0.6817823", "0.6766233", "0.67111444", "0.6659384", "0.65972245", "0.6579697", "0.656567", "0.6563988", "0.6559059", "0.65551984", "0.6552951", "0.65269816", "0.65029496", "0.6490164", "0.64876956", "0.6427979", "0.6415686", "0.6389773", "0.6387567", "0.63767314", "0.6374899", "0.63678163", "0.6345042", "0.6331057", "0.63225245", "0.6310356", "0.6298618", "0.6277747", "0.62759644", "0.62598294", "0.62549907", "0.62402725", "0.6226735", "0.6207217", "0.6188611", "0.61873496", "0.6187221", "0.61837214", "0.618056", "0.61799204", "0.6162895", "0.6148709", "0.61486286", "0.6138028", "0.6129852", "0.61176014", "0.6112912", "0.6108923", "0.61087453", "0.6106419", "0.6105988", "0.6101742", "0.6101416", "0.6096762", "0.6091384", "0.6085773", "0.6082449", "0.60797113", "0.60763705", "0.6069992", "0.6068431", "0.6063101", "0.6058679", "0.6053393", "0.60509425", "0.6046478", "0.6044581", "0.6034805", "0.60326105", "0.603191", "0.6010205", "0.60098654", "0.60094726", "0.6006652", "0.60025686", "0.5997192", "0.59917486", "0.5989296", "0.5980818", "0.5978525", "0.5957334", "0.5956959", "0.59451956", "0.5944465", "0.593845", "0.59312505", "0.5928126", "0.59141415", "0.59039676", "0.58988243", "0.58920753" ]
0.83683354
0
Test of setLostValues method, of class Team. Unused Function?
@Test public void testSetLostValues() { System.out.println("setLostValues"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void resetMyTeam(Team team);", "void resetMyTeam();", "@Test\n public void testResetStats() {\n System.out.println(\"resetStats\");\n Team team = new Team();\n team.setGamesPlayed(10);\n team.setGamesWon(10);\n team.setSetsPlayed(10);\n assertEquals(team.getGamesPlayed(), 10);\n assertEquals(team.getGamesWon(), 10);\n assertEquals(team.getSetsPlayed(), 10);\n assertEquals(team.getGamesPlayed(), 10);\n team.resetStats();\n assertEquals(team.getGamesPlayed(), 0);\n assertEquals(team.getGamesWon(), 0);\n assertEquals(team.getSetsPlayed(), 0);\n assertEquals(team.getGamesPlayed(), 0);\n }", "@Test\n public void test_setGameOver(){\n CheckersMainActivity checkersActivity = new CheckersMainActivity();\n checkersActivity.setGameOver(true);\n assertTrue(\"setGameOver has been overwritten but isGameOver wasn't modified\",\n checkersActivity.getGameOver());\n checkersActivity.setGameOver(false);\n assertFalse(\"setGameOver has been overwritten but isGameOver wasn't modified\",\n checkersActivity.getGameOver());\n }", "public void newTeam(Team team);", "@Test\n void invalidLOST() {\n die();\n getGame().move(getPlayer(), Direction.EAST);\n getGame().stop();\n getGame().start();\n assertThat(getGame().isInProgress()).isFalse();\n verifyNoMoreInteractions(observer);\n }", "void setWinningTeam(TeamId winner) {\n winningTeam.set(winner);\n }", "public void testDetermineLeagueWinner() {\n\t\tassertTrue(\"Error determining correct winner\", false);\r\n\t\t//Check that player records have been updated correctly\r\n\t\tassertTrue(\"Error updating player records\", false);\r\n\t}", "@Test\n public void test12() { \n Board board12 = new Board();\n board12.put(1,3,1);\n \n assertFalse(board12.checkWin());\n }", "@Test\n\tpublic void testIfKingHasNotLost()\n\t{\n\t\tData d = new Data();\n\t\td.set(14, 34); // set a black piece to square 34\n\t\td.set(15, 32); // set a black piece to square 32\n\t\td.set(16, 22); //set a black piece to square 22, i.e. one above the king\n\t\td.set(17, 44); // set a black piece to square 44, i.e. one below the king\n\t\t\n\t\tassertFalse(d.kingLost(100)); \n\t}", "public void testIsGameLost()\r\n {\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O*OO\",\r\n \"OOOO\");\r\n assertEquals(true, board.isGameLost());\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n assertEquals(false, board.isGameLost());\r\n }", "@Test\r\n\tpublic void calculLostPointsByOneRuleWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByOneRule(new ModelValue(1f, 1f, 3f), 1), new Float(1));\r\n\t}", "@Test\r\n public void ObjectsAreNotTheSame() {\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n Assert.assertNotSame(try_scorers ,try_scorers.updateGamesPlayed(4),\"The Objects are the same\"); \r\n \r\n }", "private void resetValues() {\n teamAScoreInt = 0;\n teamBScoreInt = 0;\n teamAFoulScoreInt = 0;\n teamBFoulScoreInt = 0;\n }", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "@Test\n public void isGameOverNoRed()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n\n for (int y = 8 - 3; y < 8; y++)\n {\n for (int x = 0; x < 8; x++)\n {\n if ((x % 2) != (y % 2))\n {\n final CheckersPosition position = CheckersPosition.findByCoordinates(x, y);\n environment.removeToken(position);\n }\n }\n }\n\n assertThat(environment.getTokenCountFor(CheckersTeam.RED), is(0));\n assertThat(environment.getTokenCountFor(CheckersTeam.WHITE), is(12));\n\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertTrue(adjudicator.isGameOver(environment));\n }", "@Test\r\n\tpublic void testChangeTheOriginalChooseIsBetterThanNotChange() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(true);\r\n\t\tfloat rateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10);\r\n\t\tmonty.setChanged(false);\r\n\t\tfloat rateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 100 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(100);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(100);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 10000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 1000000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(1000000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(1000000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\t}", "protected abstract void gatherTeam();", "@Test\n public void randomWinValueNotInRangeOfSet() throws NoBetsMadeException {\n Set<Bet> bets=new HashSet<Bet>();\n bets.add(mock(Bet.class,\"Bet1\"));\n bets.add(mock(Bet.class,\"Bet2\"));\n bets.add(mock(Bet.class,\"Bet3\"));\n bets.add(mock(Bet.class,\"Bet4\"));\n //test bets size\n assertEquals(4,bets.size());\n //test the return BetResult: null is expected bcs range is 1-4\n assertEquals(null,gameRule.determineWinner(5,bets));\n assertEquals(null,gameRule.determineWinner(0,bets));\n }", "@Test\n public void toggleTeamStates() {\n Team team = new Team(\"Crvena Zvezda\");\n\n // TODO: open persistence context and create transaction\n\n // TODO: move team to managed state\n\n // TODO: assert that the team is managed (check if contained in session)\n\n // TODO: commit and close persistence context\n\n // TODO: fetch from DB as managed entity\n\n // TODO: assert entity is managed\n\n // TODO: remove entity from session and assert not managed\n\n // TODO: commit and close\n }", "@Test\r\n\tpublic void calculLostPointsByOneRuleNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByOneRule(new ModelValue(1f, 1f, 3f), 0), new Float(0));\r\n\t}", "@Test\r\n\tpublic void calculLostPointsByRulesTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByRules(mapConf, mapIssues), new Float(3.5));\r\n\t}", "@Test\n\tpublic void testIfKingHasLost()\n\t{\n\t\tData d = new Data(); \n\t\td.set(14, 34); // set a black piece to square 34\n\t\td.set(15, 32); // set a black piece to square 32\n\t\td.set(16, 22); //set a black piece to square 22, i.e. one above the king\n\t\td.set(17, 44); // set a black piece to square 44, i.e. one below the king\n\t\t\n\t\tassertTrue(d.kingLost(33));\n\t}", "public void resetWinRecord()\n{\n gamesWon = 0;\n}", "@Test\n public void overExample2() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl(5);\n assertEquals(false, exampleBoard.isGameOver());\n }", "public int losses(String team) {\n validate(team);\n int t = st.get(team);\n return matTeam[t][2];\n }", "private void playerHasLost(Model model)\n {\n model.getTurn().getCurrentPlayer().setHasLost();\n\n }", "public int losses(String team) {\n\n return 0;\n }", "@RepeatedTest(10)\n @Test\n void afterUseMethod_setFly_AmmoShouldChange_nX_nY () {\n double x = ammo.getnX();\n double y = ammo.getnY();\n Point target = unit.getLookTarget().getPosition();\n target.setLocation(new Point(1000,1000));\n\n //when\n ammo.setFly();\n\n //then\n assertThat(ammo.getnX(),not(x));\n assertThat(ammo.getnY(),not(y));\n }", "@Test\r\n\tpublic void calculMetricSuperiorWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricSuperior(new ModelValue(10f, 1f), 12f, 9f), new Float(1));\r\n\t}", "@Test\r\n\tpublic void testChooseResultWithUnChangeCarPositionFrist() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(false);\r\n\t\tmonty.setTheDoorWithCar(0);\r\n\t\tmonty.setUserChoosedDoor(0);\r\n\t\tassertNotEquals(0, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(true, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(1);\r\n\t\tassertEquals(2, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(2);\r\n\t\tassertEquals(1, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\t}", "@Test\n public void testFinalState()\n { \n \n GameOfLife game = new GameOfLife();\n for (int gens = 0; gens < 9; gens++)\n {\n game.createNextGeneration();\n \n }\n\n for(int row = 26; row < 31; row++)\n {\n for(int col = 30; col < 35; col++)\n {\n // in this example, an alive cell has a non-null actor and a dead cell has a null actor\n Actor cell = game.getActor(row, col);\n\n // if the cell at the current row and col should be alive, assert that the actor is not null\n if( (row == 27 && col == 31) ||\n (row == 27 && col == 34) ||\n (row == 28 && col == 30) ||\n (row == 28 && col == 32) ||\n (row == 29 && col == 30) ||\n (row == 29 && col == 31) )\n \n {\n assertNotNull(\"expected alive cell at (\" + row + \", \" + col + \")\", cell);\n }\n else // else, the cell should be dead; assert that the actor is null\n {\n assertNull(\"expected dead cell at (\" + row + \", \" + col + \")\", cell);\n }\n }\n }\n \n \n }", "@Override\n\tpublic int countTeam() {\n\t\treturn 0;\n\t}", "protected abstract void assignTeam(boolean playerR, boolean playerB);", "private void checkLost() {\n\t\tRobotStates state;\n\t\t\n\t\tif (attackRobots.isEmpty()) {\n\t\t\tsetLost();\n\t\t} else {\n\t\t\tfor (AttackRobot ar : attackRobots) {\n\t\t\t\tif (ar.getState() != RobotStates.INACTIVE && ar.getState() != RobotStates.DESTROYED) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (supportRobots.isEmpty()) {\n\t\t\tsetLost();\n\t\t} else {\n\t\t\tfor (int i = 0; i < supportRobots.size(); i++) {\n\t\t\t\tstate = supportRobots.get(i).getState();\n\t\t\t\tif (state != RobotStates.INACTIVE && state != RobotStates.DESTROYED) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsetLost();\n\t}", "void update(Team team);", "@Test\r\n\tpublic void testChooseResultWithUnChangeCarPositionSecond() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setTheDoorWithCar(1);\r\n\t\tmonty.setChanged(false);\r\n\t\tmonty.setUserChoosedDoor(0);\r\n\t\tassertEquals(2, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(1);\r\n\t\tassertNotEquals(1, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(true, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(2);\r\n\t\tassertEquals(0, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\t}", "@Test\n public void overExample1() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl();\n assertEquals(false, exampleBoard.isGameOver());\n }", "@Test\n public void randomWinValueInRangeOfSet() throws NoBetsMadeException {\n Set<Bet> bets=new HashSet<Bet>();\n Bet bet1=mock(Bet.class,\"Bet1\");\n Bet bet2=mock(Bet.class,\"Bet2\");\n Bet bet3=mock(Bet.class,\"Bet3\");\n Bet bet4=mock(Bet.class,\"Bet4\");\n //\n bets.add(bet1);\n bets.add(bet2);\n bets.add(bet3);\n bets.add(bet4);\n //test bets size\n assertEquals(4,bets.size());\n //test the return BetResult: A BetResult object is expected bcs range is 1-4\n assertNotEquals(null,gameRule.determineWinner(4,bets));\n }", "@Test\n public void isGameOverNoWhite()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n\n for (int y = 0; y < 3; y++)\n {\n for (int x = 0; x < 8; x++)\n {\n if ((x % 2) != (y % 2))\n {\n final CheckersPosition position = CheckersPosition.findByCoordinates(x, y);\n environment.removeToken(position);\n }\n }\n }\n\n assertThat(environment.getTokenCountFor(CheckersTeam.RED), is(12));\n assertThat(environment.getTokenCountFor(CheckersTeam.WHITE), is(0));\n\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertTrue(adjudicator.isGameOver(environment));\n }", "@Test\n public void overExample2() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl(1);\n assertEquals(true, exampleBoard.isGameOver());\n }", "@Test\r\n\tpublic void calculLostPointsByOneRuleWithLostPointsMaxTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByOneRule(new ModelValue(1f, 1f, 3f), 4), new Float(3));\r\n\t}", "public boolean setUnit(Unit u) //this method is for creating new units or called from territories move unit method\r\n {\r\n//\t\tSystem.out.println(\"Set unit called \" + u);\r\n \tTile old = u.getTile();\r\n boolean test = false;\r\n if(u != null) //this line is mostly useless now but i'm keeping it.\r\n {\r\n \tif(!(u instanceof Capital))\r\n \t{\r\n \t\tif(!(u instanceof Castle))\r\n \t\t{\r\n\t \t\tif(u.canMove())\r\n\t \t\t{\r\n\t\t\t if(Driver.currentPlayer.equals(player))\r\n\t\t\t {\r\n\t\t\t if(hasUnit())\r\n\t\t\t {\r\n\t\t\t if(u instanceof Peasant)\r\n\t\t\t {\r\n\t\t\t \tif(!(unit instanceof Capital) && !(unit instanceof Castle))\r\n\t\t\t \t{\r\n\t\t\t\t int curProtect = unit.getStrength();\r\n\t\t\t\t switch(curProtect) //for upgrading with a peasant.\r\n\t\t\t\t {\r\n\t\t\t\t case 1: newUnitTest(old, u);\r\n\t\t\t\t unit = new Spearman(this);\r\n\t\t\t\t unit.move(false);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t break;\r\n\t\t\t\t case 2: newUnitTest(old, u);\r\n\t\t\t\t unit = new Knight(this);\r\n\t\t\t\t unit.move(false);;\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t break;\r\n\t\t\t\t case 3:\t\tnewUnitTest(old, u);\r\n\t\t\t\t unit = new Baron(this);\r\n\t\t\t\t unit.move(false);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t break;\r\n\t\t\t\t default:\r\n\t\t\t\t \t//possibly put a noise or alert here\r\n\t\t\t\t// \t\tAlert a = new Alert(AlertType.WARNING);\r\n\t\t\t\t// \t\ta.setTitle(\"Warning\"); \r\n\t\t\t\t \t\ttest = false;\r\n\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\t//play a noise or something\r\n\t\t\t \t}\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t \t//possibly put a noise or sumting.\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t \tnewUnitTest(old, u);\r\n\t\t\t\t unit = u;\r\n\t\t\t\t u.setTile(this);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t \t//As of now the only time that this case (setting unit to enemy tile) is used is when called by territories move unit method.\r\n\t\t\t\t \t\t//This means that when you build a new unit (in this case a peasant) you have to put them on your territory before moving them to another players tile.\r\n\t\t\t\t \t\tif(old != null)\r\n\t\t\t\t \t\t{\r\n\t\t\t\t \t\t\tunit = u;\r\n\t\t\t\t \t\t\tu.setTile(this);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t \t\t}\r\n\t\t\t\t \t\telse\r\n\t\t\t\t \t\t{\r\n\t\t\t\t \t\t\t//maybe make a noise or something\r\n\t\t\t\t \t\t}\r\n\t\t\t\t }\r\n\t \t\t}\r\n\t \t\telse\r\n\t \t\t{\r\n\t \t\t\t//maybe play a noise or something\r\n\t \t\t}\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tif(!hasUnit())\r\n \t\t\t{\r\n\t \t\t\tunit = u;\r\n\t u.setTile(this);\r\n\t setAdjacentProtection();\r\n\t test = true;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\tunit = u;\r\n u.setTile(this);\r\n setAdjacentProtection();\r\n test = true;\r\n \t}\r\n } \r\n\t return test;\r\n\t \r\n}", "@Test\r\n\tpublic void saveTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeam \r\n\t\tTeam team = new wsdm.domain.Team();\r\n\t\tservice.saveTeam(team);\r\n\t}", "public void hasLost() {\n\t\tthis.hasLost = true;\n\t}", "@Test\n public void testResetGame(){\n scoresModel.resetGame();\n try {\n scoresModel.resetGame();\n for(int i = 0; i < ScoresModel.maxNumOfAttempts; i++) {\n assertEquals(scoresModel.attemptsScore[i], 0);\n }\n for(int i = 0; i < ScoresModel.maxNumOfFrames; i++){\n assertEquals(scoresModel.frameTypes[i], FrameType.NOT_PLAYED);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void setTeam(int i) {\n\t\t\n\t}", "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "@Test\n public void overExample1() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl();\n assertEquals(false, exampleBoard.isGameOver());\n }", "@Test\n public void testHasSugarmanLost() {\n System.out.println(\"hasSugarmanLost\");\n Sugarman instance = new Sugarman();\n instance.changeSugarLevel(-100);\n boolean expResult = true;\n boolean result = instance.hasSugarmanLost();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\n public void endGameDetectionFalse() {\n logic.setDirection(1);\n assertTrue(logic.gameLogic());\n }", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "@Test\n public void testSetScore() {\n System.out.println(\"setScore\");\n int score = 5;\n Player instance = new Player(PlayerColor.WHITE, \"\");\n instance.setScore(score);\n\n assertEquals(score, instance.getScore());\n }", "@Test\n public void runNewGameTest() {\n\tassertNotEquals(-1,score);\n }", "@Test\n\tpublic void testIfKingHasLostNearThrone()\n\t{\n\t\tData d = new Data();\n\t\td.set(9, 10); // move 9th white piece to the 10th square\n\t\td.set(10, 9); // move 10th white piece to the 9th square\n\t\td.set(11, 12); // move 11th white piece to the 12th square\n\t\td.set(12, 14); // move 12th white piece to the 14th square\n\t\td.set(14, 71); // set a black piece to square 71\n\t\td.set(15, 73); // set a black piece to square 73\n\t\td.set(16, 83); //set a black piece to square 83, i.e. one below the king\n\t\n\t\t\n\t\tassertTrue(d.kingLost(72)); // a square below the throne is 72\n\t}", "@Test\n public void temporaryTeamClosingUnavalableOption() {\n\n }", "@Test\r\n\tpublic void testChooseResultWithChange() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setTheDoorWithCar(0);\r\n\t\tmonty.setChanged(true);\r\n\r\n\t\tmonty.setUserChoosedDoor(0);\r\n\t\tassertNotEquals(0, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(1);\r\n\t\tassertEquals(2, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(true, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(2);\r\n\t\tassertEquals(1, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(true, monty.winThePrize());\r\n\t}", "private void assertUnchanged(SyncInfoTree set) throws TeamException {\n //TODO: Need to refresh the subscriber since flush of remote state is deep\n CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().refresh(set.getResources(), IResource.DEPTH_ZERO, DEFAULT_MONITOR);\n SyncInfo[] infos = set.getSyncInfos();\n for (int i = 0; i < infos.length; i++) {\n SyncInfo info = infos[i];\n assertUnchanged(info);\n }\n }", "public void fix_gamesFailed() {\n this._gamesFailed -= 1;\n }", "@Test\r\n\tpublic void testChooseResultWithUnChangeCarPositionThird() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setTheDoorWithCar(2);\r\n\t\tmonty.setChanged(false);\r\n\t\tmonty.setUserChoosedDoor(0);\r\n\t\tassertEquals(1, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(1);\r\n\t\tassertEquals(0, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(2);\r\n\t\tassertNotEquals(2, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(true, monty.winThePrize());\r\n\t}", "@Test\n public void changeScoreTest() {\n //will be false as animal is not moving\n boolean expectedValue = animal.changeScore();\n Assert.assertEquals(expectedValue,false);\n }", "@Test\n\tpublic void tesInvalidSetSquare_3() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tSquare[][] board = gameState.getBoard();\n\t\tSquare square = gameState.setSquare(new Location(board[0].length, 0), new BlankSquare());\n\t\tassertNull(\"Should be null\", square);\n\t}", "@Test\n public void setAndGetTest() {\n GameEntity t2 = new GameEntity(new Rectangle(10.0, 10.0));\n\n //Set and getting temp node\n t2.getView().setTranslateX(5.0);\n t2.getView().setTranslateY(5.0);\n Circle temp = new Circle(4);\n t2.setView(temp);\n assertEquals(\"Expected view to be changed\", temp, t2.getView());\n\n //Testing the alive and dead of the object\n t2.setAlive(false);\n assertEquals(\"Expected the object state to be set to dead.\", false, t2.isAlive());\n assertEquals(\"Expected the reverse of object state to be set to alive.\", true, t2.isDead());\n }", "@Test\n public void addScoreTest() {\n assertTrue(enemyGameBoard.getScore() == 0); //Check if initial value of points = 0\n\n enemyGameBoard.addScore(false, false); //Did not hit a ship\n assertTrue(enemyGameBoard.getScore() == 0);\n\n enemyGameBoard.addScore(true, false); //Hit a ship, but the ship did not sink\n assertTrue(enemyGameBoard.getScore() == 1); \n\n enemyGameBoard.addScore(false, false); //Did not hit a ship, so points should stay 1\n assertTrue(enemyGameBoard.getScore() == 1); \n\n enemyGameBoard.addScore(true, true); //Hit a ship, and ship has been sunk\n assertTrue(enemyGameBoard.getScore() == 3);\n\n enemyGameBoard.addScore(false, false); //Did not hit a ship, so points should stay 3 after a ship has been sunk\n assertTrue(enemyGameBoard.getScore() == 3);\n\n enemyGameBoard.addScore(false, true); //Did not hit a ship, but did sunk the ship. This should not add any points to the score\n assertTrue(enemyGameBoard.getScore() == 3);\n }", "@Test\r\n\tpublic void calculMetricSuperiorTeacherBetterScoreButNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricSuperior(new ModelValue(25f, 1f), 12f, 11f), new Float(0));\r\n\t}", "@Test\r\n\tpublic void testDetermineMatchWinner2() {\n\t\tassertTrue(\"Error determining correct winner\", false);\r\n\t\t//Check that player records have been updated correctly\r\n\t\tassertTrue(\"Error updating player records\", false);\r\n\t}", "@Test\r\n\tpublic void test() {\r\n\t\tmodel1.getActualTurn().setHasAttacked(true);\r\n\t\tassertEquals(attack2.isPossible(model1) , false);\r\n\t\t\r\n\t\t/* verifica che se gli alieni vincono il gioco viene chiuso */\r\n\t\taliensWin2.perform(model1);\r\n\t\tassertEquals(model1.getGameState() , GameState.CLOSING);\r\n\t\tassertEquals(model1.getActualTurn().getCurrentPlayer().getAvatar().getIsWinner() , EndState.WINNER);\r\n\t\t\r\n\t\tmodel1.setActualTurn(turn2);\r\n\t\t\r\n\t\t/* verifica il corrretto funzionamento del metodo isPossible dell'azione di attacco */\r\n\t\tassertEquals(attack1.isPossible(model1) , false);\r\n\t\tmodel1.getActualTurn().setHasMoved(true);\r\n\t\tmodel1.getActualTurn().setHasDraw(true);\r\n\t\tassertEquals(attack1.isPossible(model1) , false);\r\n\t\tmodel1.getActualTurn().setHasDraw(false);\r\n\t\tmodel1.setGameState(GameState.ACCEPTING);\r\n\t\tassertEquals(attack1.isPossible(model1) , false);\r\n\t\tmodel1.setGameState(GameState.RUNNING);\r\n\t\tassertEquals(attack1.isPossible(model1) , true);\r\n\t\tmodel1.getGamePlayers().get(0).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tmodel1.getGamePlayers().get(1).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tmodel1.getGamePlayers().get(2).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tmodel1.getGamePlayers().get(3).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tmodel1.getGamePlayers().get(4).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tmodel1.getGamePlayers().get(5).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tmodel1.getGamePlayers().get(6).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tevtAttacked1 = attack1.perform(model1);\r\n\t\tassertEquals(((EventAttacked)evtAttacked1.get(1)).getAreThereOtherHumans() , false);\r\n\t\tmodel1.getGamePlayers().get(1).getAvatar().setIsAlive(LifeState.ALIVE);\r\n\t\tmodel1.getGamePlayers().get(0).getAvatar().setIsAlive(LifeState.ALIVE);\r\n\t\tmodel1.getGamePlayers().get(2).getAvatar().setIsAlive(LifeState.ALIVE);\r\n\t\tmodel1.getGamePlayers().get(3).getAvatar().setIsAlive(LifeState.ALIVE);\r\n\t\tevtAttacked1 = attack1.perform(model1);\t\r\n\t\tassertEquals(((EventSufferAttack)evtAttacked1.get(0)).getKilled() , killedPlayer);\r\n\t\t\r\n\t\tmodel1.setActualTurn(turn3);\r\n\t\t\r\n\t\t/* verifica il corrretto funzionamento del metodo isPossible dell'azione di attacco */\r\n\t\tmodel1.setGameState(GameState.ACCEPTING);\r\n\t\t((Human)model1.getActualTurn().getCurrentPlayer().getAvatar()).setCanAttack(true);\r\n\t\tassertEquals(attack3.isPossible(model1) , false);\r\n\t\tmodel1.setGameState(GameState.RUNNING);\r\n\t\t((Human)model1.getActualTurn().getCurrentPlayer().getAvatar()).setCanAttack(false);\r\n\t\tassertEquals(attack3.isPossible(model1) , false);\r\n\t\t((Human)model1.getActualTurn().getCurrentPlayer().getAvatar()).setCanAttack(true);\r\n\t\tmodel1.getActualTurn().setHasAttacked(true);\r\n\t\tassertEquals(attack3.isPossible(model1) , false);\r\n\t\t\r\n\t\tmodel1.setActualTurn(turn4);\r\n\t\t\r\n\t\t/* verifica il corrretto funzionamento della perform dell'azione di attacco */\r\n\t\tsector1 = model1.getGameMap().searchSectorByName(\"Hatch\");\r\n\t\tmodel1.getActualTurn().getCurrentPlayer().getAvatar().setCurrentSector(sector1);\r\n\t\tevtAttacked2 = humanWin2.perform(model1);\r\n\t\tassertEquals(((EventNotifyHumanWin)evtAttacked2.get(0)).getGenerator() , player4);\r\n\t\tmodel1.getGamePlayers().get(3).getAvatar().setIsWinner(EndState.LOOSER);\r\n\t\tmodel1.getGamePlayers().get(2).getAvatar().setIsWinner(EndState.LOOSER);\r\n\t\tmodel1.getGamePlayers().get(0).getAvatar().setIsWinner(EndState.LOOSER);\r\n\t\tmodel1.getGamePlayers().get(1).getAvatar().setIsWinner(EndState.LOOSER);\r\n\t\tmodel1.getGamePlayers().get(4).getAvatar().setIsWinner(EndState.LOOSER);\r\n\t\tassertEquals(humanWin2.perform(model1).size() , 3);\r\n\t\t\r\n\t\tmodel1.setActualTurn(turn7);\r\n\t\t\r\n\t\t/* verifica il corrretto funzionamento dell'utilizzo della carta difesa */\r\n\t\tmodel1.getActualTurn().getCurrentPlayer().getAvatar().addCard(card);\r\n\t\tdefense = new Defense(evtDefense);\r\n\t\tevtAttacked2 = defense.perform(model1);\r\n\t\tassertTrue(!model1.getActualTurn().getCurrentPlayer().getAvatar().getMyCards().contains(card));\r\n\t\tassertTrue(evtAttacked2.get(0) instanceof EventRejectCardAlien);\r\n\t\tassertTrue(evtAttacked2.get(1) instanceof EventCardUsed);\r\n\t\t\r\n\t}", "@Test\n public void pickUpSomeGoldTest() {\n\tassertNotEquals(0,score);\n }", "@Test\r\n\tpublic void gameWinCheckCallsCorrectWinner() {\r\n\t\tBowl bowl = new Bowl();\r\n\t\tvar answer = bowl.gameWinCheck();\r\n\t\tassertEquals(-1,answer);\r\n\t\tbowl = setupGame(bowl);\r\n\t\tanswer = bowl.gameWinCheck();\r\n\t\tassertEquals(1,answer);\r\n\t\tbowl.getNeighbor(6).passTheft(49);\r\n\t\tanswer = bowl.getNeighbor(2).gameWinCheck();\r\n\t\tassertEquals(0,answer);\r\n\t}", "@Test\r\n\tpublic void calculLostPointsByQualityAxisTest()\r\n\t\t\tthrows ClassNotFoundException, SonarqubeDataBaseException, SQLException, IOException {\r\n\t\tlistLostPoints.put(\"TestOfTeacher\", 0.0f);\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByQualityAxis(mapQuality, listScoreMetricStudent,\r\n\t\t\t\tlistScoreMetricTeacher, projectName, idModule), listLostPoints);\r\n\t}", "@Test\n void getCurrentRewardsFromUpgradeTest() {\n EnumMap<CardPoints,Integer> oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n oracle.put(CardPoints.VICTORY, 3);\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); //index/state = 0, cost stage 1\n assertEquals(oracle, this.wonder.getProp().get(this.wonder.getState()).y); //index/state = 0, cost stage 1\n\n wonder.setState(wonder.getState() + 1); // stage one is build\n oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n //reward is an effect, so no cardpoints\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); // index/state = 1, cost stage 2\n\n wonder.setState(wonder.getState() + 1); // 2 stage build\n oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n oracle.put(CardPoints.VICTORY, 7);\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); // index/state = 2, cost stage 3\n wonder.setState(wonder.getState() + 1); // Build the last stage\n\n //return an outIndexError when we call this method\n }", "@Test\n public void test_access_to_modify_team_success() {\n try {\n Assert.assertTrue(authBO.hasAccessToModifyTeam(1, 1));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "public int losses(String team) {\n return getTeamByName(team).losses;\r\n }", "public void gameOverCheck() {\n //users\n if (tankTroubleMap.getUsers().size() != 0) {\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getUsers().get(0).getGroupNumber());\n for (int i = 1; i < tankTroubleMap.getUsers().size(); i++) {\n if (tankTroubleMap.getUsers().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n //bots\n int firstBot = 0;\n if (tankTroubleMap.getBots().size() != 0) {\n if (tankTroubleMap.getWinnerGroup() == -1) {\n firstBot = 1;\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getBots().get(0).getGroupNumber());\n }\n for (int i = firstBot; i < tankTroubleMap.getBots().size(); i++) {\n if (tankTroubleMap.getBots().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n tankTroubleMap.setGameOver(true);\n }", "@Test\n public void RandomBallLocationStopped() {\n final boolean seenAll[] = new boolean[1];\n seenAll[0] = false;\n\n WheelObserver wheelObserver = new WheelObserver() {\n Set<Integer> seen = new HashSet<Integer>();\n public void stopped(final int location) {\n if (location < 0 || location > 36)\n throw new IllegalArgumentException();\n seen.add(location);\n if (seen.size() == 37) seenAll[0] = true;\n }\n };\n RouletteWheel wheel = new RouletteWheel(wheelObserver);\n\n for (int x = 0; x < 1000; x++)\n {\n wheel.spin(0);\n wheel.tick(20000);\n }\n\n assertTrue(seenAll[0]);\n }", "@Test\n\tpublic void testDummyMole() {\n\t\tassertEquals(5, player.getHP());\n\t\tsabotageMole.update(sabotageMole.getMOLE_APPEARANCE_TIME());\n\t\tsabotageMole.update(0);\n\t\tassertEquals(5, player.getHP());\n\t\t\n\t}", "public void playerLost()\r\n {\r\n \r\n }", "public void setTeam(Team team) {\r\n\t\tthis.team = team;\r\n\t}", "public void updateUserTeam() {\n\t\tUser user = users.get(userTurn);\n\t\tSystem.out.println(user.getName());\n\t\tSystem.out.println(tmpTeam.size());\n\t\tUserTeam roundTeam = new UserTeam();\n\t\troundTeam.putAll(tmpTeam.getPlayers());\n\t\tSystem.out.println(roundNumber);\n\t\tSystem.out.println(roundTeam.size());\n\t\tSystem.out.println(\"dfdfdfd\");\n\t\tuser.setUserTeam(roundTeam, roundNumber);\n\t\tSystem.out.println(\"dfdfdfd\");\n\t\ttmpTeam = new UserTeam();\n\t}", "@Test\n public void testSetHealthPoint() throws Exception {\n n1=10;\n n2=20;\n playerHuman.setHealthPoint(n1);\n playerIA.setHealthPoint(n2);\n org.junit.Assert.assertEquals(n1, playerHuman.getHealthPoint());\n org.junit.Assert.assertEquals(n2, playerIA.getHealthPoint());\n }", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "@Test\n public void makeMoveTest() {\n\n //get the board of the enemy with the method getBoard() from enemyGameBoard\n board = enemyGameBoard.getBoard();\n\n //try two times to hit a field on the board that is water, and after that assert it is done succesfully\n enemyGameBoard.makeMove(2, 3, false);\n assertTrue(board[2][3].equals(EnemyGameBoard.WATER_HIT));\n enemyGameBoard.makeMove(9, 9, false);\n assertTrue(board[9][9].equals(EnemyGameBoard.WATER_HIT));\n\n //try two times to hit a field on the board that is not water, and after that assert it is done succesfully\n enemyGameBoard.makeMove(5, 4, true);\n assertTrue(board[5][4].equals(EnemyGameBoard.SHIP_HIT));\n enemyGameBoard.makeMove(8, 1, true);\n assertTrue(board[8][1].equals(EnemyGameBoard.SHIP_HIT));\n }", "@Test\r\n\tpublic void testDetermineMatchWinner1() {\n\t\tassertTrue(\"Error determining correct winner\", false);\r\n\t\t//Check that player records have been updated correctly\r\n\t\tassertTrue(\"Error updating player records\", false);\r\n\t}", "public void setGame() {\n }", "@Test\n void backstagePasses() {\n String name = \"Backstage passes to a TAFKAL80ETC concert\";\n int originalQuality = 10;\n int[] sellDates = new int[]{-1, 10, 5};\n int[] targetQuality = new int[]{0, originalQuality + 2, originalQuality + 3};\n\n Item[] items = new Item[]{\n new Item(name, sellDates[0], originalQuality),\n new Item(name, sellDates[1], originalQuality),\n new Item(name, sellDates[2], originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (int i = 0; i < items.length; i++) {\n assertEquals(targetQuality[i], app.items[i].quality, \"Quality must be altered correctly\");\n }\n }", "@Test\n public void overExample3() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl();\n exampleBoard.move(1, 3, 3, 3);\n assertEquals(false, exampleBoard.isGameOver());\n }", "public static boolean testPokemomGetSet() {\r\n Pokemon inst = new Pokemon(\"name\", \"type1\", \"type2\", 2, 3, 4, 5, 6, 7, 8, false, false);\r\n if (!Objects.equals(inst.getName(), \"name\") || !Objects.equals(inst.getType1(), \"type1\")\r\n || !Objects.equals(inst.getType2(), \"type2\") || !Objects.equals(inst.getHp(), 2)\r\n || !Objects.equals(inst.getAttack(), 3) || !Objects.equals(inst.getDefense(), 4)\r\n || !Objects.equals(inst.getSpAttack(), 5) || !Objects.equals(inst.getSpDefense(), 6)\r\n || !Objects.equals(inst.getSpeed(), 7) || !Objects.equals(inst.getTotal(), 8)\r\n || !Objects.equals(inst.isLegendary(), false) || !Objects\r\n .equals(inst.getFavorite(), false)) {\r\n return false;\r\n }\r\n inst.setName(\"sName\");\r\n inst.setType1(\"ttype1\");\r\n inst.setType2(\"ttype2\");\r\n inst.setHp(11);\r\n inst.setAttack(10);\r\n inst.setDefense(33);\r\n inst.setSpAttack(44);\r\n inst.setSpDefense(41);\r\n inst.setSpeed(1);\r\n inst.setTotal(222);\r\n inst.setLegendary(true);\r\n inst.setFavorite(true);\r\n if (!Objects.equals(inst.getName(), \"sName\") || !Objects.equals(inst.getType1(), \"ttype1\")\r\n || !Objects.equals(inst.getType2(), \"ttype2\") || !Objects.equals(inst.getHp(), 11)\r\n || !Objects.equals(inst.getAttack(), 10) || !Objects.equals(inst.getDefense(), 33)\r\n || !Objects.equals(inst.getSpAttack(), 44) || !Objects.equals(inst.getSpDefense(), 41)\r\n || !Objects.equals(inst.getSpeed(), 1) || !Objects.equals(inst.getTotal(), 222)\r\n || !Objects.equals(inst.isLegendary(), true) || !Objects\r\n .equals(inst.getFavorite(), true)) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Test\n public void scoreExample5() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl();\n exampleBoard.move(1, 3, 3, 3);\n exampleBoard.move(2, 1, 2, 3);\n exampleBoard.move(2, 4, 2, 2);\n exampleBoard.move(2, 6, 2, 4);\n exampleBoard.move(4, 6, 2, 6);\n exampleBoard.move(3, 4, 3, 6);\n exampleBoard.move(4, 4, 4, 6);\n exampleBoard.move(3, 2, 3, 4);\n exampleBoard.move(2, 4, 4, 4);\n exampleBoard.move(4, 3, 4, 5);\n exampleBoard.move(4, 6, 4, 4);\n exampleBoard.move(4, 1, 4, 3);\n exampleBoard.move(5, 3, 3, 3);\n exampleBoard.move(3, 0, 3, 2);\n exampleBoard.move(2, 2, 4, 2);\n exampleBoard.move(0, 2, 2, 2);\n exampleBoard.move(0, 4, 2, 4);\n exampleBoard.move(5, 2, 3, 2);\n exampleBoard.move(5, 4, 3, 4);\n exampleBoard.move(3, 2, 1, 2);\n exampleBoard.move(3, 4, 1, 4);\n exampleBoard.move(2, 6, 4, 6);\n\n assertEquals(true, exampleBoard.isGameOver());\n assertEquals(10, exampleBoard.getScore());\n }", "@Test public void setTest() throws NegativeValueException {\n PetBunny pb1 = new PetBunny(\"Floppy\", \"Holland Lop\", 3.5);\n \n pb1.setName(\"Flop\");\n pb1.setBreed(\"Other\");\n pb1.setWeight(5.0); \n \n Assert.assertEquals(\"Flop\", pb1.getName());\n Assert.assertEquals(\"Other\", pb1.getBreed());\n Assert.assertEquals(5.0, pb1.getWeight(), 0.00001);\n }", "public FightTeam team();", "@Test\r\n\tpublic void calculMetricInferiorTeacherWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricInferior(new ModelValue(10f, 1f), 12f, 15f), new Float(1));\r\n\t}", "@Test\r\n\tpublic void saveTeamGamesForVisitorTeamFk() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamGamesForVisitorTeamFk \r\n\t\tInteger teamId_4 = 0;\r\n\t\tGame related_gamesforvisitorteamfk = new wsdm.domain.Game();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamGamesForVisitorTeamFk(teamId_4, related_gamesforvisitorteamfk);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamGamesForVisitorTeamFk\r\n\t}", "@Test\n\tpublic void testTAlive6() {\n\t\ttank.damage(proj);\n\t\tassertEquals(false, tank.isDeceased());\n\t}", "private void getTeam() {\n Set<Integer> set = getRandomNumberSet();\n // clear new team list each time to allow for serial clicks on \"Generate New Random Team\"\n team.clear();\n for (Integer i : set) {\n getPokemon(i);\n }\n }", "public void winGame() {\r\n if (data.gameState == 3) \r\n data.winner = 1;\r\n else if (data.gameState == 4) \r\n data.winner = 2;\r\n data.victoryFlag = true;\r\n data.gameState = 5;\r\n }", "@Test\r\n public void testIsSolved() {\r\n assertTrue(boardManager4.puzzleSolved());\r\n boardManager4.getBoard().swapTiles(0,0,0,1);\r\n assertFalse(boardManager4.puzzleSolved());\r\n }", "@Test\n\tpublic void testMoleKingHP() {\n\t\tassertEquals(20, kingMole.getHP());\n\t\tassertEquals(false, kingMole.isDead());\n\t\tfor (int i=0; i<19; i++) {\n\t\t\tkingMole.minusHP();\n\t\t}\n\t\tassertEquals(false, kingMole.isDead());\n\t\tkingMole.minusHP();\n\t\tassertEquals(true, kingMole.isDead());\n\t\t\n\t}", "@Test\n public final void testPlayer2Win() {\n checkPlayerWin(player2);\n }", "@Override\n public void bankrupt() {\n this.mortgaged = false;\n }", "@Override\n\tpublic void setHomeTeam() {\n\t\t\n\t}" ]
[ "0.6462403", "0.64380723", "0.61546123", "0.61368173", "0.6033599", "0.60069984", "0.60044384", "0.59857136", "0.5942888", "0.5922209", "0.5882284", "0.5863633", "0.5835402", "0.5819547", "0.5817685", "0.5806615", "0.57960093", "0.57890666", "0.57723", "0.5770367", "0.5766801", "0.576477", "0.5759195", "0.57288903", "0.5728487", "0.5710905", "0.57011163", "0.56998587", "0.5695747", "0.5671366", "0.56603765", "0.5655576", "0.5655331", "0.5628605", "0.5627924", "0.5619461", "0.5612979", "0.55872285", "0.5585084", "0.5573851", "0.5559881", "0.5545049", "0.55440384", "0.553899", "0.5532563", "0.5527872", "0.55272305", "0.55266833", "0.5522147", "0.55221325", "0.551383", "0.5511958", "0.55078006", "0.55040324", "0.54971033", "0.5485703", "0.5482946", "0.54774404", "0.54706746", "0.5466322", "0.54643273", "0.5453051", "0.5436656", "0.5435657", "0.543327", "0.54316187", "0.5427244", "0.5425521", "0.5418244", "0.5413721", "0.5412696", "0.5412317", "0.54123074", "0.5408015", "0.540692", "0.5400042", "0.5398476", "0.5391588", "0.5391028", "0.537808", "0.5373546", "0.53702796", "0.53593487", "0.5358545", "0.5357815", "0.5357345", "0.5356996", "0.5353775", "0.53517014", "0.53490746", "0.5348051", "0.53415585", "0.5341096", "0.53406054", "0.53391856", "0.53382564", "0.53372085", "0.53339094", "0.5328404", "0.53255254" ]
0.7198155
0
Test of resetStats method, of class Team. Ensure function resets team stats
@Test public void testResetStats() { System.out.println("resetStats"); Team team = new Team(); team.setGamesPlayed(10); team.setGamesWon(10); team.setSetsPlayed(10); assertEquals(team.getGamesPlayed(), 10); assertEquals(team.getGamesWon(), 10); assertEquals(team.getSetsPlayed(), 10); assertEquals(team.getGamesPlayed(), 10); team.resetStats(); assertEquals(team.getGamesPlayed(), 0); assertEquals(team.getGamesWon(), 0); assertEquals(team.getSetsPlayed(), 0); assertEquals(team.getGamesPlayed(), 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void resetStats() {\n }", "void resetMyTeam();", "void resetMyTeam(Team team);", "protected void reset(VwStatsPerGame dto)\n\t{\n\t}", "public abstract void statsReset();", "void statsReset();", "public void resetStats() {\n recentStats = new Stats();\n }", "private void resetValues() {\n teamAScoreInt = 0;\n teamBScoreInt = 0;\n teamAFoulScoreInt = 0;\n teamBFoulScoreInt = 0;\n }", "public void resetStats(){\n curA = attack;\n curD = defense;\n curSpA = spAttack;\n curSpD = spDefense;\n curS = speed;\n }", "public void resetPlayerStats(PlayerStats oldStats) {\r\n\t\toldStats.numberOfWins = 0;\r\n\t\toldStats.numberOfGames = 0;\r\n\t\toldStats.numberOfAttacks = 0;\r\n\t\toldStats.numberOfSPAttacks = 0;\r\n\t\toldStats.numberOfMeals = 0;\r\n\t}", "@Test\n public void testClearingStats() {\n innerClear();\n innerClear();\n }", "@Override\n boolean resetStatistics();", "@Test\n public void testResetGame(){\n scoresModel.resetGame();\n try {\n scoresModel.resetGame();\n for(int i = 0; i < ScoresModel.maxNumOfAttempts; i++) {\n assertEquals(scoresModel.attemptsScore[i], 0);\n }\n for(int i = 0; i < ScoresModel.maxNumOfFrames; i++){\n assertEquals(scoresModel.frameTypes[i], FrameType.NOT_PLAYED);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void reset() {\n\t\tfor (int i = 0; i < stats.size(); i++) {\n\t\t\tstats.get(i).reset();\n\t\t}\n\t}", "public void resetScore(View view) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(0);\n displayForTeamB(0);\n }", "public void resetScore();", "public void resetTheGame(){\n\t\tfjCount = 0;\n\t\tquestionAnsweredCount = 0;\n\t\tfor(int i = 0 ; i< 5; i++){\n\t\t\tfor(int j = 0 ; j < 5 ; j++){\n\t\t\t\tboard[i][j].reset();\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0 ; i < teamNum; i ++){\n\t\t\tteams[i].reset();\n\t\t\tbets[i] = 0; \n\t\t}\n\t}", "public void testReset()\n {\n // Call on an empty board\n b1.reset();\n\n // All cells should be empty.\n for (int i = 0; i < 3; i++)\n {\n for (int j = 0; j < 3; j++)\n {\n assertTrue(b1.getCell(i, j) == Cell.EMPTY);\n }\n }\n\n // No one should be winning.\n assertEquals(b1.getWhoHasWon(), Cell.EMPTY);\n\n\n // Try a won board.\n assertTrue(b1.setCell(0, 0, Cell.RED1));\n assertTrue(b1.setCell(0, 1, Cell.RED1));\n assertTrue(b1.setCell(0, 2, Cell.RED1));\n assertEquals(b1.getWhoHasWon(), Cell.RED1);\n\n b1.reset();\n\n // All cells should be empty.\n for (int i = 0; i < 3; i++)\n {\n for (int j = 0; j < 3; j++)\n {\n assertTrue(b1.getCell(i, j) == Cell.EMPTY);\n }\n }\n\n // No one should be winning.\n assertEquals(b1.getWhoHasWon(), Cell.EMPTY);\n\n\n }", "public void resetStatistics()\n {\n }", "public void resetHitStatistics()\n {\n m_stats.resetHitStatistics();\n }", "public void resetScore(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(scoreTeamA);\n displayForTeamB(scoreTeamB);\n }", "public void resetScore(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(scoreTeamA);\n displayForTeamB(scoreTeamB);\n }", "public static void resetStatistics()\r\n {\r\n \t//System.out.println ( \"Resetting statistics\");\r\n count_ = 0; \r\n }", "public void resetAllScores(View view) {\n teamA_score = 0;\n teamB_score = 0;\n ADVANTAGE = 0;\n enableScoreView();\n unSetWinnerImage();\n displayTeamA_score(teamA_score);\n displayTeamB_score(teamB_score);\n\n }", "@Override\n public void reset() {\n updateDice(1, 1);\n playerCurrentScore = 0;\n playerScore = 0;\n updateScore();\n notifyPlayer(\"\");\n game.init();\n }", "public void resetDeaths()\n {\n \tstats.put(deathsKey, 0);\n }", "private void resetStatistics() {\n worst = Integer.MAX_VALUE;\n best = Integer.MIN_VALUE;\n }", "public void reset() {\n monster.setHealth(10);\n player.setHealth(10);\n\n }", "private void resetAfterGame() {\n }", "public void reset(View view) {\r\n scoreA = 0;\r\n scoreB = 0;\r\n foulsA = 0;\r\n foulsB = 0;\r\n displayScoreForTeamA(scoreA);\r\n displayFoulsForTeamA(foulsA);\r\n displayScoreForTeamB(scoreB);\r\n displayFoulsForTeamB(foulsB);\r\n }", "public void resetScoreA(View v) {\n scoreTeamA = 0;\n\n displayForTeamA(scoreTeamA);\n\n\n }", "public void reset() {\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tfor (int j = 0; j<DIVISIONS; j++){\n\t\t\t\tgameArray[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\tgameWon = false;\n\t\twinningPlayer = NEITHER;\n\t\tgameTie = false;\n\t\tcurrentPlayer = USER;\n\t}", "public void resetPlayerInfo() {\r\n\t\tthis.damageDealt = 0;\r\n\t\tthis.damageTaken = 0;\r\n\t\tthis.robotsDestroyed = 0;\r\n\t\tthis.tilesMoved = 0;\r\n\t\tthis.turnsSinceLastMove = 0;\r\n\t\tthis.turnsSinceLastFire = 0;\r\n\t\t\r\n\t\tthis.robots = new ArrayList<Robot>(3);\r\n\t\t\r\n\t\t/* 0 = scout , 1 = sniper, 2 = tank */\r\n\t\tthis.robots.add(new Robot(playerID, 0));\r\n\t\tthis.robots.add(new Robot(playerID, 1));\r\n\t\tthis.robots.add(new Robot(playerID, 2));\r\n\t}", "public void displayReset(View view) {\r\n\r\n scoreA = 0;\r\n scoreB = 0;\r\n displayForTeamA(scoreA);\r\n displayForTeamB(scoreB);\r\n }", "void reset() {\n myManager.reset();\n myScore = 0;\n myGameOver = false;\n myGameTicks = myInitialGameTicks;\n myOldGameTicks = myInitialGameTicks;\n repaint();\n }", "public void resetForBothTeams(View view) {\n scoreForR_madrid = 0;\n scoreForL_pool = 0;\n\n foulCountRmadrid = 0;\n y_cardCountRmadrid = 0;\n r_cardCountRmadrid = 0;\n\n foulCountLpool = 0;\n y_cardCountLpool = 0;\n r_cardCountLpool = 0;\n\n displayForRmadrid(scoreForR_madrid);\n displayForLpool(scoreForL_pool);\n\n displayFoulForRmadrid(foulCountRmadrid);\n displayY_CardForRmadrid(y_cardCountRmadrid);\n displayR_CardForRmadrid(r_cardCountRmadrid);\n\n displayFoulForLpool(foulCountLpool);\n displayYcardForLpool(y_cardCountLpool);\n displayRcardForLpool(r_cardCountLpool);\n\n }", "@BeforeEach\n void setUp() {\n GameService.getAllGames().clear();\n // test clear worked on consoles before running other tests\n Assertions.assertEquals(0, GameService.getAllGames().size());\n }", "private void resetGame() {\n game.resetGame();\n round_score = 0;\n\n // Reset values in views\n player_tot_view.setText(String.valueOf(game.getPlayer_total()));\n bank_tot_view.setText(String.valueOf(game.getBank_total()));\n round_score_view.setText(String.valueOf(round_score));\n String begin_label = \"Round \" + game.getRound() + \" - Player's Turn\";\n round_label.setText(begin_label);\n\n getTargetScore();\n }", "public void reset() {\n/* 138 */ if (TimeUtil.getWeek() == 1) {\n/* 139 */ LogUtil.errorLog(new Object[] { \"MentalRankService::reset begin\", Long.valueOf(TimeUtil.currentTimeMillis()) });\n/* 140 */ sendRankReward();\n/* */ } \n/* */ }", "public void testReset() {\n\t}", "public void resetGame() {\r\n\t\tfor(Player p : players) {\r\n\t\t\tp.reset();\r\n\t\t}\r\n\t\tstate.reset();\r\n\t}", "public void resetNodeTeams()\n\t{\n\t\tfor (Node node : nodes.values())\n\t\t{\n\t\t\tnode.team = null;\n\t\t}\n\t}", "public void resetWinRecord()\n{\n gamesWon = 0;\n}", "private void clearStats() {\n stats_ = emptyProtobufList();\n }", "@Override\n public void reset(MiniGame game) {\n }", "public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}", "@Test\n public void resetTest() {\n Deck deck = new DeckImplementation();\n for (int i = 0; i < 50; i++) {\n deck.drawACard();\n }\n deck.reset();\n\n assertEquals(\"Deck did not reset to correct size\", 180,\n deck.numberOfCardsRemaining());\n }", "public void resetAll(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n faultsTeamA = 0;\n faultsTeamB = 0;\n\n teamAScoreTextView.setText(getString(R.string.zero));\n teamBScoreTextView.setText(getString(R.string.zero));\n teamAFaultTextView.setText(getString(R.string.zero));\n teamBFaultTextView.setText(getString(R.string.zero));\n }", "private void resetBoard() {\n\t\tGameScores.ResetScores();\n\t\tgameTime = SystemClock.elapsedRealtime();\n\t\t\n\t}", "public void reset() {\n\t\tscore = 0;\n\t}", "@Override\n\tpublic int countTeam() {\n\t\treturn 0;\n\t}", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "public void reset()\n {\n currentScore = 0;\n }", "public void reset(View v) {\n scoreTeamB = 0;\n displayForTeamB(scoreTeamB);\n scoreTeamA = 0;\n displayForTeamA(scoreTeamA);\n questionNumber = 0;\n displayQuestionNumber(questionNumber);\n }", "private void resetGame(){\n\n }", "public GameChart resetGame();", "private void reset() // reset the game so another game can be played.\n\t{\n\t\tenableControls(); // enable the controls again..\n\n\t\tfor (MutablePocket thisMutPocket: playerPockets) // Reset the pockets to their initial values.\n\t\t{\n\t\t\tthisMutPocket.setDiamondCount(3);\n\t\t}\n\n\t\tfor(ImmutablePocket thisImmPocket: goalPockets)\n\t\t{\n\t\t\tthisImmPocket.setDiamondCount(0);\n\t\t}\n\n\t\tfor(Player thisPlayer: players) // Same for the player..\n\t\t{\n\t\t\tthisPlayer.resetPlayer();\n\t\t}\n\n\t\tupdatePlayerList(); // Update the player list.\n\n\t}", "public void reset(GameObserver gameObs) {\n eGame.clear();\n eGame.setDefaultPayoff(gameObs.getDefaultPayoff());\n currentPlayer = 0;\n lastPlayerWithBR = nPlayers - 1;\n samplesToConfirmEquilibrium = -1;\n mostStableConfirmed = null;\n confirmedStability = Double.POSITIVE_INFINITY;\n predictedOutcome = new OutcomeDistribution(nActs);\n for (int i = 0; i < tabu.size(); i++) {\n tabu.setValue(false, i);\n }\n deviationTestOrder.reset();\n\n // this must be last\n selectRandomUnexploredProfile(gameObs);\n }", "public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }", "public void resetScore() {\n\t\tthis.score = 0;\n\t}", "public static void resetGame() {\r\n\t\t//Set all variables to their default values.\r\n\t\tMain.isGameStarted = false;\r\n\t\tMain.isSetupDone = false;\r\n\t\tMain.isGameWon = false;\r\n\t\tMain.isGameLost = false;\r\n\t\tMain.isThreeHanded = false;\r\n\t\tMain.isFourHandedSingle = false;\r\n\t\tMain.isFourHandedTeams = false;\r\n\t\tMain.doBidding = false;\r\n\t\tMain.doScoring = false;\r\n\t\tMain.dealerIsPlayer1 = false;\r\n\t\tMain.dealerIsPlayer2 = false;\r\n\t\tMain.dealerIsPlayer3 = false;\r\n\t\tMain.dealerIsPlayer4 = false;\r\n\t\tMain.isNilAllowed = true;\r\n\t\tMain.isDoubleNilAllowed = true;\r\n\t\tMain.nilBidTeam1 = false;\r\n\t\tMain.nilBidTeam2 = false;\r\n\t\tMain.doubleIsAllowedPlayer1 = false;\r\n\t\tMain.doubleIsAllowedPlayer2 = false;\r\n\t\tMain.doubleIsAllowedPlayer3 = false;\r\n\t\tMain.doubleIsAllowedPlayer4 = false;\r\n\t\tMain.doubleIsAllowedTeam1 = false;\r\n\t\tMain.doubleIsAllowedTeam2 = false;\r\n\r\n\t\t\r\n\t\tMain.player1 = \"\";\r\n\t\tMain.player2 = \"\";\r\n\t\tMain.player3 = \"\";\r\n\t\tMain.player4 = \"\";\r\n\t\tMain.team1 = \"\";\r\n\t\tMain.team2 = \"\";\r\n\t\tMain.player1Bid = \"\";\r\n\t\tMain.player2Bid = \"\";\r\n\t\tMain.player3Bid = \"\";\r\n\t\tMain.player4Bid = \"\";\r\n\t\tMain.player1TricksTaken = \"\";\r\n\t\tMain.player2TricksTaken = \"\";\r\n\t\tMain.player3TricksTaken = \"\";\r\n\t\tMain.player4TricksTaken = \"\";\r\n\t\tMain.curDealer = \"\";\r\n\t\tMain.startDealer = \"\";\r\n\t\tMain.bagValue = \"1\";\r\n\t\tMain.nilValue = \"50\";\r\n\t\tMain.doubleNilValue = \"200\";\r\n\t\t\r\n\t\tMain.round = 0;\r\n\t\tMain.player1TimesSet = 0;\r\n\t\tMain.player2TimesSet = 0;\r\n\t\tMain.player3TimesSet = 0;\r\n\t\tMain.player4TimesSet = 0;\r\n\t\tMain.player1Score = \"0\";\r\n\t\tMain.player2Score = \"0\";\r\n\t\tMain.player3Score = \"0\";\r\n\t\tMain.player4Score = \"0\";\r\n\t\tMain.team1Score = \"0\";\r\n\t\tMain.team2Score = \"0\";\r\n\t\t\r\n\t\tGameSetup.gameTypeHidden.setState(true);\r\n\t\tGameSetup.threeHanded.setEnabled(true);\r\n\t\tGameSetup.fourHandedSingle.setEnabled(true);\r\n\t\tGameSetup.fourHandedTeams.setEnabled(true);\r\n\t\tGameSetup.dealerHidden.setState(true);\r\n\t\tGameSetup.choiceBoxPlayer1.setEnabled(true);\r\n\t\tGameSetup.choiceBoxPlayer2.setEnabled(true);\r\n\t\tGameSetup.choiceBoxPlayer3.setEnabled(true);\r\n\t\tGameSetup.choiceBoxPlayer4.setEnabled(true);\r\n\t\tGameSetup.hasPlayerChanged = false;\r\n\t\t\r\n\t\tEditGame.playerChanged = false;\r\n\t\tEditGame.scoreChanged = false;\r\n\t\tEditGame.roundToEdit = 0;\r\n\t\tEditGame.editedRound = 0;\r\n\t}", "public void reset() {\n\t\tAssets.playSound(\"tweet\");\n\t\tscore = respawnTimer = spawnCount= 0;\n\t\t\n\t\twalls = new ArrayList<Wall>();\n\t\tcheckPoints = new ArrayList<Wall>();\n\t\tground = new ArrayList<Ground>();\n\n\t\tGround g;\n\t\tPoint[] points = new Point[21];\n\t\tfor (int i = 0; i < 21; i++) {\n\t\t\tpoints[i] = new Point(i * 32, 448);\n\t\t}\n\t\tfor (int j = 0; j < points.length; j++) {\n\t\t\tg = new Ground();\n\t\t\tg.setBounds(new Rectangle(points[j].x, 448, 32, 32));\n\t\t\tground.add(g);\n\t\t}\n\n\t\tsky = new Background(-0.2);\n\t\tsky.setImage(Assets.sprite_sky);\n\t\t\n\t\tmountains = new Background(-0.4);\n\t\tmountains.setImage(Assets.sprite_mountains);\n\t\t\n\t\ttrees = new Background(-1.4);\n\t\ttrees.setImage(Assets.sprite_trees);\n\n\t\tstarted = false;\n\t\tplayer.reset();\n\n\t}", "public void resetGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tthis.round = 0;\r\n\t\tthis.phase = 0;\r\n\t\tthis.prices = Share.generate();\r\n\t\tint i = 0;\r\n\t\twhile(i < this.prices.size())\r\n\t\t{\r\n\t\t\tthis.prices.get(i).addShares(Config.StartingStockPrice);\r\n\t\t\t++i;\r\n\t\t}\r\n\t\tint p = 0;\r\n\t\twhile(p < Config.PlayerLimit)\r\n\t\t{\r\n\t\t\tif(this.players[p] != null)\r\n\t\t\t{\r\n\t\t\t\tthis.players[p].reset();\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\tthis.deck = Card.createDeck();\r\n\t\tthis.onTable = new LinkedList<>();\r\n\t\tCollections.shuffle(this.deck);\r\n\t\tthis.dealToTable();\r\n\t}", "public void resetgamestate() {\n \tthis.gold = STARTING_GOLD;\n \tthis.crew = STARTING_FOOD;\n \tthis.points = 0;\n \tthis.masterVolume = 0.1f;\n this.soundVolume = 0.5f;\n this.musicVolume = 0.5f;\n \n this.ComputerScience = new Department(COMP_SCI_WEPS.getWeaponList(), COMP_SCI_UPGRADES.getRoomUpgradeList(), this);\n this.LawAndManagement = new Department(LMB_WEPS.getWeaponList(), LMB_UPGRADES.getRoomUpgradeList(), this);\n this.Physics = new Department(PHYS_WEPS.getWeaponList(), PHYS_UPGRADES.getRoomUpgradeList(), this);\n \n this.playerShip = STARTER_SHIP.getShip();\n this.playerShip.setBaseHullHP(700);\n this.playerShip.repairHull(700);\n this.combatPlayer = new CombatPlayer(playerShip);\n }", "public void reset(){\r\n \ttablero.clear();\r\n \tfalling = null;\r\n \tgameOver = false;\r\n \tlevel = 0;\r\n \ttotalRows = 0;\r\n \tLevelHelper.setLevelSpeed(level, this);\r\n }", "public void reset() {\n\tthis.pinguins = new ArrayList<>();\n\tthis.pinguinCourant = null;\n\tthis.pret = false;\n\tthis.scoreGlacons = 0;\n\tthis.scorePoissons = 0;\n }", "public void reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }", "@Override\n public void resetGame() {\n\n }", "public void resetQuizStats(Quiz quiz){\n \t\tString id = quiz.getQuizId();\n \t\tString query = \"DELETE FROM results WHERE quiz_id = '\" + id + \"';\";\n \t\tsqlUpdate(query);\n \t}", "@Test\n public void testResetPassword() {\n System.out.println(\"resetPassword\");\n School instance = new School();\n LocalDate dob = new LocalDate(1960, 9, 6);\n Manager m1 = new Manager(\"admin\", \"Lamasia2*\", \"quang\", \"\", \"tran\",\n \"quangtran@hotmail.com\", \"0909941192\", dob, \"hcmc\", null, true);\n instance.addUser(m1);\n instance.resetPassword(m1);\n\n assertEquals(Constants.DEFAULT_PASSWORD, m1.getPassword());\n\n System.out.println(\"PASS ALL\");\n }", "public static void resetTestCount() {\n mTestCount = 0;\n }", "public void reset() {\n\n players = new Player[numAIPlayers + 1];\n createHumanPlayer();\n createAIPlayers(numAIPlayers);\n wholeDeck.shuffle();\n\n // --- DEBUG LOG ---\n // The contents of the complete deck after it has been shuffled\n Logger.log(\"COMPLETE GAME DECK AFTER SHUFFLE:\", wholeDeck.toString());\n\n assignCards(wholeDeck, players);\n activePlayer = randomlySelectFirstPlayer(players);\n playersInGame = new ArrayList<>(Arrays.asList(players));\n winningCard = null;\n roundWinner = null;\n\n roundNumber = 1;\n drawRound = 0;\n }", "public static void reset() {\n HealthCheck.failed = false;\n HealthCheck.checks.clear();\n }", "@Before\n\tpublic void reset()\n\t{\n\t\tClientPlayerManager.resetSingleton();\n\t\tChatManager.resetSingleton();\n\t\tQualifiedObservableConnector.resetSingleton();\n\t}", "public void resetAllScores(View v) {\n scorePlayerB = 0;\n scorePlayerA = 0;\n triesPlayerA = 0;\n triesPlayerB = 0;\n displayForPlayerA(scorePlayerA);\n displayForPlayerB(scorePlayerB);\n displayTriesForPlayerA(triesPlayerA);\n displayTriesForPlayerB(triesPlayerB);\n }", "public static void reset() {\n\t\tbat1.reset();\n\t\tbat2.reset();\n\t\tball.reset();\n\t}", "void resetStationStatistics() {\n\n if (dbg) System.out.println(\"<br>resetStationStatistics: \" +\n \"depthMin, depthMax = \" + depthMin + \" \" + depthMax);\n if (dbg) System.out.println(\"<br>resetStationStatistics: \" +\n \"sampleCount = \" + sampleCount);\n if (dbg) System.out.println(\"<br>resetStationStatistics: \" +\n \"stationSampleCount = \" + stationSampleCount);\n if (dbg) System.out.println(\"<br>resetStationStatistics: \" +\n \"sampleRejectCount = \" + sampleRejectCount);\n if (dbg) System.out.println(\"<br>resetStationStatistics: \" +\n \"stationSampleRejectCount = \" + stationSampleRejectCount);\n\n depthMin = 9999.99f;\n depthMax = -9999.99f;\n stationSampleCount = 0;\n stationSampleRejectCount = 0;\n prevDepth = 0f;\n\n }", "public void reset() {\n\t\tplayerModelDiff1.clear();\n\t\tplayerModelDiff4.clear();\n\t\tplayerModelDiff7.clear();\n\t\tif(normalDiffMethods)\n\t\t{\t\n\t\tupdatePlayerModel();\n\t\tdisplayReceivedRewards();\n\t\t}\n\t\tint temp_diffsegment1;\n\t\tint temp_diffsegment2;\n\t\tif (currentLevelSegment == 0) {\n\t\t\t//System.out.println(\"-you died in the first segment, resetting to how you just started\");\n\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(0);\n\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(1);\n\t\t}\n\t\telse {\n\t\t\t//System.out.println(\"-nextSegmentAlreadyGenerated:\" + nextSegmentAlreadyGenerated);\n\t\t\tif (nextSegmentAlreadyGenerated) {\n\t\t\t\t//because the next segment is already generated (and so the previous does not exist anymore),\n\t\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(currentLevelSegment);\n\t\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(currentLevelSegment+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//because the next segment is not yet generated\n\t\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(currentLevelSegment-1);\n\t\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(currentLevelSegment);\n\t\t\t}\n\t\t}\n\t\tplannedDifficultyLevels.clear();\n\n\t\t//System.out.println(\"-resetting to: \" + temp_diffsegment1 + \", \" + temp_diffsegment2);\n\t\tplannedDifficultyLevels.add(temp_diffsegment1);\n\t\tplannedDifficultyLevels.add(temp_diffsegment2);\n\t\tcurrentLevelSegment = 0;\n\n\t\tpaused = false;\n\t\tSprite.spriteContext = this;\n\t\tsprites.clear();\n\n\t\ttry {\n\t\t\tlevel2 = level2_reset.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tlevel3 = level3_reset.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n fixborders();\n\t\tconjoin();\n\n\t\tlayer = new LevelRenderer(level, graphicsConfiguration, 320, 240);\n\t\tfor (int i = 0; i < 2; i++)\n\t\t{\n\t\t\tint scrollSpeed = 4 >> i;\n\t\tint w = ((level.getWidth() * 16) - 320) / scrollSpeed + 320;\n\t\tint h = ((level.getHeight() * 16) - 240) / scrollSpeed + 240;\n\t\tLevel bgLevel = BgLevelGenerator.createLevel(w / 32 + 1, h / 32 + 1, i == 0, levelType);\n\t\tbgLayer[i] = new BgRenderer(bgLevel, graphicsConfiguration, 320, 240, scrollSpeed);\n\t\t}\n\n\t\tdouble oldX = 0;\n\t\tif(mario!=null)\n\t\t\toldX = mario.x;\n\n\t\tmario = new Mario(this);\n\t\tsprites.add(mario);\n\t\tstartTime = 1;\n\n\t\ttimeLeft = 200*15;\n\n\t\ttick = 0;\n\n\t\t/*\n\t\t * SETS UP ALL OF THE CHECKPOINTS TO CHECK FOR SWITCHING\n\t\t */\n\t\t switchPoints = new ArrayList<Double>();\n\n\t\t//first pick a random starting waypoint from among ten positions\n\t\tint squareSize = 16; //size of one square in pixels\n\t\tint sections = 10;\n\n\t\tdouble startX = 32; //mario start position\n\t\tdouble endX = level.getxExit()*squareSize; //position of the end on the level\n\t\t//if(!isCustom && recorder==null)\n level2.playValues = this.valueList[0];\n\t\t\trecorder = new DataRecorder(this,level3,keys);\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.COINS); //Sander disable\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.BLOCKS_COINS);\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.BLOCKS_POWER);\n\t\t\tgameStarted = false;\n\t}", "void resetTesting() {\r\n\t\tcompanyCars.clear();\r\n\t\trentDetails.clear();\r\n\t}", "public void resetTestVars() {\n\t\tuser1 = new User();\n\t\tuser2 = new User();\n\t\tuser3 = new User();\n\t\tsn = new SocialNetwork();\n\t\tstatus = SocialNetworkStatus.DEFAULT;\n\t\tearly = new Date(25L);\n\t\tmid = new Date(50L);\n\t\tlate = new Date(75L);\n\t}", "@Before\n public void testSetUp() {\n s_limitService.resetApiLimit(null);\n }", "public synchronized void reset()\n\t{\n\t\tm_elapsed = 0;\n\t}", "public void resetHealth(){\n curHp = healthPoint;\n }", "@Test\n public void resetClock_WhenCalled_ClockShouldBeResetTo0(){\n ContextManager.resetClock(\"David\");\n assertEquals(mockUser.clock , 0);\n\n }", "@After\n public void tearDown() {\n this.scoreBoard = null;\n }", "private void reset() {\n PlayerPanel.reset();\n playersAgentsMap.clear();\n agentList.clear();\n playerCount = 0;\n playerList.removeAll();\n iPlayerList.clear();\n dominator = \"\";\n firstBlood = false;\n }", "@Test\n public void testResetField() {\n System.out.println(\"resetField\"); \n instance.resetField();\n \n }", "@Test\n public void testInvokeResetMethod() throws MBeanException, InstanceNotFoundException, ReflectionException {\n CSJmxStats.invokeResetMethod();\n //invoke countValue operation and validate the value to be 0\n Object result = CSJmxStats.invokeCountValueMethod();\n assertEquals(0L, result);\n //repopulate\n populateData();\n }", "public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}", "public void reset(){\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm -r data/games_module\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"0\"+\" /\\\" data/winnings\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"175\"+\" /\\\" data/tts_speed\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/answered_questions\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/five_random_categories\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/current_player\");\n\t\t_currentPlayer = null;\n\t\t_internationalUnlocked = false;\n\t\t_gamesData.clear();\n\t\t_fiveRandomCategories.clear();\n\t\tfor (int i= 0; i<5;i++) {\n\t\t\t_answeredQuestions[i]=0;\n\t\t}\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\t\tinitialiseCategories();\n\t\ttry {\n\t\t\treadCategories();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetFiveRandomCategories();\n\t}", "@Test(expected = IllegalStateException.class)\n public void getScoreOne() {\n this.reset();\n this.bps.getScore();\n }", "@Override\n public void resetQuestion() {\n super.resetQuestion();\n hadSecondChance = false;\n currentTeam = null;\n originalTeam = null;\n teamHasAnswered.clear();\n //reset teamHasAnswered map so all teams get a chance to anaswer again\n for (int i = 0; i < numTeams; i++) teamHasAnswered.put(i, false);\n }", "@Override\r\n\tpublic void reset() {\r\n\t\tsuper.reset();\r\n\t\tresetMomentObservation();\r\n\t\texpectations.reset();\r\n\t}", "protected void reset() {\n speed = 2.0;\n max_bomb = 1;\n flame = false;\n }", "public void resetGameRoom() {\n gameCounter++;\n score = MAX_SCORE / 2;\n activePlayers = 0;\n Arrays.fill(players, null);\n }", "public void resetScoreB(View v) {\n scoreTeamB = 0;\n\n displayForTeamB(scoreTeamB);\n\n\n }", "public void bossReset(){\n bossTimer.start();\n this.getView().setTranslateX(x);\n this.getView().setTranslateY(y);\n this.getView().setRotate(0);\n bossTimer.start();\n setHitPoints(getDefaultHp());\n }", "public void reset()\r\n {\r\n gameBoard.reset();\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard.reset();\r\n }", "@Test(expected = IllegalStateException.class)\n public void isGameOverOne() {\n this.reset();\n this.bps.isGameOver();\n }", "public void reset() {\n/* 54 */ this.count = 0;\n/* 55 */ this.totalTime = 0L;\n/* */ }" ]
[ "0.7484043", "0.7483113", "0.74634653", "0.72961545", "0.7138224", "0.70984024", "0.69151145", "0.6823142", "0.6698039", "0.6693679", "0.66123754", "0.6552416", "0.6547498", "0.6416827", "0.63634115", "0.6353426", "0.630595", "0.62911", "0.6281358", "0.6280441", "0.62765557", "0.62765557", "0.6252386", "0.62516236", "0.6194708", "0.6191809", "0.6186818", "0.6121872", "0.61138684", "0.611013", "0.61060894", "0.61048216", "0.60957724", "0.6093541", "0.60656774", "0.60515773", "0.6042173", "0.6013442", "0.6005363", "0.59955144", "0.5985961", "0.5975384", "0.5959088", "0.5953559", "0.5946233", "0.5934293", "0.5930983", "0.59255075", "0.59220934", "0.59106344", "0.5891457", "0.58834296", "0.5864712", "0.58620846", "0.5861658", "0.5856019", "0.5847382", "0.58471173", "0.58402735", "0.5830723", "0.5821972", "0.5817464", "0.58085954", "0.58037025", "0.5793563", "0.57915753", "0.57782084", "0.5762436", "0.57547957", "0.5753663", "0.57517934", "0.5738441", "0.5724082", "0.57206553", "0.57173914", "0.5710857", "0.5709483", "0.5706564", "0.5705883", "0.57022023", "0.56935614", "0.56921405", "0.56895673", "0.56844425", "0.56675905", "0.56490797", "0.56305355", "0.5626702", "0.56151694", "0.5610127", "0.56078756", "0.55991375", "0.55951166", "0.55928344", "0.55907327", "0.5585961", "0.558402", "0.55809855", "0.5571368", "0.5560261" ]
0.8828782
0
Prints message passed as parameter to console
public static void write(String message) { System.out.println(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print(String message);", "private static void print(String message)\n {\n System.out.println(message);\n }", "void print(String message);", "void println(String message);", "public void printMessage() {\n printMessage(System.out::print);\n }", "public static void print(String message)\n {\n\tSystem.out.println(message);\n }", "public void println(String message){\n if (this.okToPrint){\n System.out.println(message);\n }\n }", "public void print(String message) {\n System.out.println(message);\n }", "public void print(String message) {\n System.out.println(message);\n }", "public void print(String message){\n if (this.okToPrint){\n System.out.print(message);\n }\n }", "public void printMessage(String message) {\n\r\n\t}", "private static void println(String message) {// metodo imprimir\r\n\t\tString threadName = Thread.currentThread().getName();\r\n\t\tSystem.out.println(threadName + \": \" + message);\r\n\t}", "public static void print(String message) {\n System.out.print(message);\n }", "private void print(String message) {\n\n //System.out.println(LocalDateTime.now() + \" \" + message);\n System.out.println(message);\n }", "abstract void consoleMessage(String message);", "public void print(Object msg)\n {\n print(msg, 1);\n }", "public static void printMessage(String message) {\n printDashLines();\n System.out.println(message);\n printDashLines();\n }", "private static void println(String message, SimpleAttributeSet settings) {print(message + \"\\n\", settings);}", "public static void print(String message) {\n\t\tSystem.out.print(message);\n\t}", "private static void printLine(String message){\n\t\tSystem.out.println(message);\n\t}", "public void printMsg(String msg) {\n\t\tSystem.out.println(msg);\n\t}", "private static void echo(String msg) {\n assert msg != null;\n\n System.out.println(msg);\n }", "public static void println(String message) {\n System.out.println(message);\n }", "void displayMessage(String message);", "void print(String message) throws IOException;", "public static void println(String message) {\n\t\tSystem.out.println(message);\n\t}", "protected void PRINT(String message)\n\t{\n\t\tSystem.out.println(message);\n\t}", "public void displayTextToConsole();", "public static void echo(String msg)\n {\n System.out.println(msg);\n }", "protected void output(String message) {\n \t\tSystem.out.print(message);\n \t}", "public void showMessage(String message);", "private void displayMessage(String message) {\n }", "private static void displayMessage(String message) {\n\t\toutput.append(message);\n\t}", "public void printToUser(String message){\n System.out.println(message);\n }", "void print(String message, Color color) throws IOException;", "@Override\r\n\tpublic void printPlain(String message) {\n\t\tSystem.out.println(message);\r\n\t}", "private static void log(String message) {\n System.out.println(message);\n }", "void message(){\n\t\tSystem.out.println(\"Hello dude as e dey go \\\\ we go see for that side\");\n\t\tSystem.out.print (\" \\\"So it is what it is\\\" \");\n\n\t}", "public void print(String msg) {\n this.print(msg, false);\n }", "public static void info(Object message) {\n\t\tSystem.out.print(message);\n\t}", "public void say(String message)\r\n {\r\n System.out.println(\"*\" + name + \" - \" + message);\r\n }", "private void log(String message) {\n System.out.println(message);\n }", "public void console(String message){\n\t\tactivity.append(message + \"\\n\");\n\t\tactivity.selectAll();\n\t}", "public void outputMessage(String gameMessage){\n System.out.println(gameMessage);\n }", "private void log(String message) {\n System.out.println(message);\n }", "public static void print(Object message) {\r\n if (!isDisabled()) {\r\n print(String.valueOf(message));\r\n }\r\n }", "void printTextToConsole(String content){\n }", "private void print(String msg)\n {\n m_log.log(msg);\n m_vbox.write(\" \" + msg);\n }", "public void DisplayMessage(String massage);", "private void println(final String msg) {\n if (!mTestStop) {\n CUIOutputStream.println(msg);\n }\n }", "public void printToViewConsole(String arg);", "private static void print(Object msg){\n if (WAMClient.Debug){\n System.out.println(msg);\n }\n\n }", "private void printMessage(String s) {\n if (PRINTTRACE) {\r\n System.out.println(s);\r\n }\r\n }", "void msgDisplay(String s);", "protected void echo(String msg){\n\tSystem.out.println(\"*ECHO*: \" + msg);\n }", "public void MessageInvitCommand(String msg)\n {\n System.out.println(\"> \"+msg);\n }", "public void println();", "@Override\n\tpublic void onMessage(String arg0, String arg1) {\n\t\tSystem.out.print(arg0+arg1);\n\t}", "public void showMsg(String str);", "private void display(String msg) {\n cg.append(msg + \"\\n\");\n }", "public void printMessage() {\n\t\tSystem.out.println(this.greeting + \" \" + this.message);\n\t}", "public void print(String msg, boolean reallyPrint) {\n if (reallyPrint) {\n // System.out.println(msg);\n }\n\n }", "public static void print(String message) {\n if (outputEnabled)\n out.print(message);\n }", "private static void log(String msg) {\n System.out.println(msg);\n }", "public void println(char owner, String msg) {\n\t}", "private void showMessage(String string) {\n\n }", "public static void displayMsg() {\n\t}", "public void println(String message) {\r\n chatFrame.println(message);\r\n }", "private void msg(String name, String message) {\n System.out.println(\"[\" + (System.currentTimeMillis() - system_start_time) + \"] \" + name + \": \" + message);\n }", "@Override\n\tpublic void showMessage(String message) {\n\n\t}", "private void alert(String msg) {\r\n\t\tSystem.out.print(msg);\r\n\t }", "public void logs(Object message) {\n System.out.println(message.toString());\n }", "public void println(String string) {\n // make sure that the global weka log picks it up\n System.out.println(string); \n logStatusMessage(string);\n }", "public void showMessage(String message) \r\n\t\t{\t\t\t\r\n\t\t}", "private static void log(String aMsg){\n\t System.out.println(aMsg);\n\t }", "public void displayMessage(){\n //getCouseName obtém o nome do curso\n System.out.printf(\"Welcome to the grade book for \\n%s!\\n\\n\", getCouseName());\n }", "@Override\n\tpublic void tellPlayer(String message) {\n\t\tSystem.out.println(message);\n\t}", "public void simpleMessage(String name) {\r\n\t\tSystem.out.println(\"\");\r\n\t\t// Tells system to print out 'Hello' (name var value) '!' Ex: Hello Owen!\r\n\t\tSystem.out.println(\"Hello \" + name + \"!\");\r\n\t}", "void showInConsole();", "public void printMsg() {\n System.out.println(\"This is an example RMI program\");\n }", "public void printMsg(String msg)\n\t{\n\t\tmsgArea.append(msg);\n\t}", "@Override\r\n\t\tpublic void showMessage(String message) {\n\t\t\t\r\n\t\t}", "private void println(String message) {\n Log.println(level, tag, message);\n }", "public static void printInstruction(String msg) {\n out.println(msg);\n }", "private void print(String msg) {\r\n\t\tSystem.out.printf(\"[%tT] %s\\n\", Calendar.getInstance(), msg);\r\n\t}", "private void printMessage(final PrintWriter errout, final Level level, final String message, final Object... params) {\n try {\n \terrout.println(getMessageLexer(-1, null, level, message, params));\n } catch (final MissingResourceException e) {\n \terrout.println(\"Can't find message string for \\\"\" + message + \"\\\"!\");\n }\n }", "void printMsg(){\n\tdisplay();\n }", "@Override\n\tvoid showMsg() {\n\t\tSystem.out.println(\"Sample\");\n\t}", "public static void msgl(String s) {\n\t\tSystem.out.print(s);\n\t}", "public abstract void printPromptMessage();", "public void print(String string){\n // make sure that the global weka log picks it up\n System.out.print(string);\n logStatusMessage(string); \n }", "public void showMessage(int x, int y, String message) {\n }", "private void printConsole(String text) {\n\t\tMessage msg = getHandler().obtainMessage(MESSAGE_CONSOLE_CHANGED);\n\t\tmsg.obj = \"\\n\" + text ;\n\t\tmsg.sendToTarget();\t\t\n\t}", "private void log(String message) {\n System.out.println( message );\n sb.append( message ).append( \"\\n\" );\n }", "private void display(String msg) {\n\t\tString msgF = \"\\tClient- \" + msg + \"\\n\\n >> \";\n System.out.print(msgF);\n }", "private void print(String text) {\n\t\tSystem.out.println(text);\n\t}", "public static void println(String message) {\n if (outputEnabled) {\n synchronized (out) {\n out.println(message);\n }\n }\n }", "private static void msg(Object msg, boolean nl) {\n System.out.print(msg);\n if (nl) System.out.print(\"\\n\");\n }", "public static void functionCalled(String message) {\n if(enabled) {\n for (int i = 0; i < depth; i++)\n System.out.print(\"\\t\");\n System.out.println(message);\n depth++;\n }\n }", "private void display(String msg) {\n\t\tif(cg == null)\n\t\t\tSystem.out.println(msg); // println for Console mode\n\t\telse\n\t\t\tcg.append(msg + \"\\n\"); // Append to, for example, JTextArea in the ClientGUI\n\t}" ]
[ "0.79269993", "0.79089427", "0.7841846", "0.7707953", "0.76691467", "0.7496051", "0.74951065", "0.7468197", "0.7468197", "0.7454052", "0.7431413", "0.73967624", "0.7375986", "0.7375678", "0.7370284", "0.73358554", "0.72622323", "0.7236461", "0.72156996", "0.72139937", "0.720154", "0.71764076", "0.7169075", "0.7086673", "0.7081383", "0.70514363", "0.7045262", "0.7035559", "0.703391", "0.70180327", "0.70101947", "0.69872636", "0.69714826", "0.6968598", "0.6951847", "0.69440037", "0.6938396", "0.69047666", "0.6895881", "0.6881628", "0.6881365", "0.687891", "0.6878186", "0.6871117", "0.68618447", "0.68483925", "0.6830768", "0.68240404", "0.68214744", "0.6815706", "0.68151426", "0.68116564", "0.67967784", "0.678314", "0.6765026", "0.67647773", "0.6760036", "0.6736128", "0.6728373", "0.67233986", "0.67211205", "0.6707685", "0.66971725", "0.66943306", "0.6688425", "0.6684354", "0.667799", "0.66648215", "0.6639483", "0.661779", "0.66156626", "0.66117334", "0.6608376", "0.6600064", "0.65888494", "0.6581225", "0.6578563", "0.65769047", "0.6561963", "0.6555865", "0.6546719", "0.65457374", "0.65399134", "0.65326065", "0.65223503", "0.6511042", "0.6510552", "0.6506774", "0.6502051", "0.6498416", "0.649639", "0.64914006", "0.64873576", "0.64810985", "0.6477166", "0.6464346", "0.6462665", "0.6455137", "0.6451158", "0.6447199" ]
0.68797123
41
Reads an input line from console and returns it as a string
public static String readString() { return in.nextLine(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getString() throws IOException\n {\n InputStreamReader input=new InputStreamReader(System.in);\n BufferedReader b=new BufferedReader(input);\n String str=b.readLine();//reading the string from console\n return str;\n }", "public String readStringFromCmd() throws IOException {\r\n\t\tSystem.out.println(\"Enter your String:\");\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString string = null;\t\t\r\n\t\tstring = br.readLine();\r\n\t\treturn string;\r\n\t}", "String getLine();", "public static String readLine()\n\t{\n\t\tif (bJunit == true)\n\t\t{\n\t\t\tsLastLine = sJunitInput;\n\t\t\twriteLine(\"JUnit INPUT: \" + sJunitInput);\n\t\t\treturn sLastLine;\n\t\t}\n\t\n\t\ttry {\n\t\t\tsLastLine = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error reading from STDIN\");\n\t\t}\n\t\t\n\t\treturn sLastLine;\n\t\t\n\t}", "protected String getInputFromConsole() throws IOException\n {\n BufferedReader consoleInput = new BufferedReader(new InputStreamReader(System.in));\n return consoleInput.readLine();\n }", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "protected final String _readTTYLine() {\n\n StringBuffer buf = new StringBuffer(80);\n int c = 0;\n try {\n while ((c = System.in.read()) != -1) {\n char ch = (char) c;\n if (ch == '\\r') {\n ch = (char) System.in.read();\n if (ch == '\\n') {\n break;\n } else {\n continue;\n }\n } else if (ch == '\\n') {\n break; // Unix flavors.\n }\n buf.append(ch);\n }\n } catch (IOException e) {\n this._logger.error(ERROR_TAG + e.getMessage());\n }\n return buf.toString();\n }", "String consoleInput();", "public static String getString() throws IOException {\n InputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n String s = br.readLine();\n return s;\n }", "public static String getString() throws IOException {\r\n InputStreamReader isr = new InputStreamReader(System.in);\r\n BufferedReader br = new BufferedReader(isr);\r\n String s = br.readLine();\r\n return s;\r\n }", "String getLine ();", "public String getInput() throws IOException {\n\t\tSystem.out.print(\">> \");\n\t\treturn consoleIn.readLine();\n\t}", "public String readCommand() {\n Scanner sc = new Scanner(System.in);\n return sc.nextLine();\n }", "@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}", "public static String readLine(String message){\n Scanner in = new Scanner(System.in);\n System.out.print(message);\n return in.nextLine();\n }", "public static String readUserInput() {\n return in.nextLine();\n }", "public String readLine() throws ShellIOException;", "public static String le() throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String texto = reader.readLine();\n return texto;\n }", "public String Get_Input()throws IOException{\r\n\t\tString input=\"\";\r\n\t\tInputStreamReader converter = new InputStreamReader(System.in);\r\n\t\tBufferedReader in = new BufferedReader(converter);\r\n\t\t\r\n\t\tinput = in.readLine();\r\n\t\t\r\n\t\treturn input;\r\n\t}", "private static String readLine() {\r\n String input=\"\";\r\n try {\r\n input = in.readLine();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n return input;\r\n }", "public static String readInput() {\r\n return SCANNER.nextLine();\r\n }", "public static String readString() {\n BufferedReader br\n = new BufferedReader(new InputStreamReader(System.in), 1);\n\n // Declare and initialize the string\n String string = \" \";\n\n // Get the string from the keyboard\n try {\n string = br.readLine();\n\n } catch (IOException ex) {\n System.out.println(ex);\n }\n\n // Return the string obtained from the keyboard\n return string;\n }", "public static String getString() {\n return consoleScanner.nextLine();\n }", "public static String getInput() {\n\t\tScanner inputReader = new Scanner(System.in);\n\t\tString userInput;\n\t\tuserInput = inputReader.nextLine();\n\t\treturn userInput;\n\t}", "public static String inputCommand() {\n String command;\n Scanner in = new Scanner(System.in);\n\n command = in.nextLine();\n\n return command;\n }", "public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }", "public String userInputString() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "public static String getString(){\n Scanner in = new Scanner(System.in); //scanner variable to take input\n return in.nextLine().trim();\n }", "abstract public String readLine() throws TerminalException;", "public static String getString (String ask)\r\n {\r\n Scanner keyboard = new Scanner(System.in);\r\n System.out.print(ask + \" -> \");\r\n String input = keyboard.nextLine();\r\n return input;\r\n }", "private String getClientInput() {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String input = null;\n try {\n input = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return input;\n }", "protected String readLine()\n { try { if (stdin!=null) return stdin.readLine(); } catch (IOException e) {}\n return null;\n }", "public String readCommand() {\n sc = new Scanner(System.in);\n userInput = new TextField();\n return userInput.getText();\n }", "public static String readLine()\n {\n \tString ch=scanner.nextLine();\n \treturn ch;\n }", "public String keyboardReadString() {\n BufferedReader myReader = new BufferedReader(new InputStreamReader(System.in));\n String stringItem = \"\";\n try {\n stringItem = myReader.readLine();\n } // try\n catch (IOException IOError) {\n System.out.println(\"Read Error in Termio.KeyboardReadString method\");\n } // catch\n return stringItem;\n }", "private String getInput(String prompt) throws IOException {\n System.out.print(prompt);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(System.in));\n return in.readLine();\n }", "public String readCommand() {\n String input = in.nextLine();\n while (input.trim().isEmpty()) {\n input = in.nextLine();\n }\n return input;\n }", "public String getLine();", "public static String receberSelecaoDoConsoleString() {\n\t\tScanner entrada = new Scanner(System.in);\n\t\t\n\t\t//pega o input que decide se a entrada será no terminal ou em arquivo\n\t\tString valor = entrada.nextLine();\n\t\t\n\t\treturn valor;\n\t}", "public static String GetInput() {\r\n\t\t// Scanner is created and a value is set for input\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tString input = in.nextLine();\r\n\t\treturn input;\r\n\r\n\t}", "String getCommand(){\n\t\tString command=\"\";\n\t\ttry{\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tcommand = br.readLine();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Somethinf went wrong with the system input!! Please try again.\");\n\t\t}\n\t\treturn command;\n\t}", "static String read ()\r\n \t{\r\n \t\tString sinput;\r\n \r\n \t\ttry\r\n \t\t{\r\n \t\t\tsinput = br.readLine();\r\n \t\t}\r\n \t\tcatch (IOException e)\r\n \t\t{\r\n \t\t\tErrorLog.addError(\"Input exception occured in command line interface!\");\r\n \t\t\treturn null; //Menu will exit when fed a null\r\n \t\t}\r\n \t\treturn sinput;\r\n \t}", "public String getUserInput() {\n\t\tString input;\n\t\tinput = this.console.next();\n\t\treturn input;\n\t}", "public static String readString(){\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}", "static String ReadLn(int maxLength) {\n byte line[] = new byte[maxLength];\n int length = 0;\n int input = -1;\n try {\n while (length < maxLength) { // Read untill maxlength\n input = System.in.read();\n if ((input < 0) || (input == '\\n'))\n break; // or untill end of line ninput\n line[length++] += input;\n }\n\n if ((input < 0) && (length == 0))\n return null; // eof\n return new String(line, 0, length);\n } catch (java.io.IOException e) {\n return null;\n }\n }", "public static String readString(String prompt){ \n\t\tSystem.out.print(prompt+\": \");\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}", "public String readLine() throws IOException, ReadTimeoutException {\n\t\ttry {\n\t\t\twaitForAvailable();\n\t\t\tlineBuffer[0] = (byte) inputStream.read();\n\t\t\twaitForAvailable();\n\t\t\tlineBuffer[1] = (byte) inputStream.read();\n\t\t\tlineLength = 2;\n\t\t\twhile (lineBuffer[lineLength - 2] != (byte) 13\n\t\t\t\t|| lineBuffer[lineLength - 1] != (byte) 10) {\n\t\t\t\twaitForAvailable();\n\t\t\t\tlineBuffer[lineLength] = (byte) inputStream.read();\n\t\t\t\tlineLength++;\n\t\t\t}\n\t\t\treturn new String(lineBuffer, 0, lineLength - 2);\n\t\t} catch (ArrayIndexOutOfBoundsException aioobe) {\n\t\t\tthrow new IOException(\"Line too long.\");\n\t\t}\n\t}", "static String ReadLn(int maxLength){\n byte line[] = new byte [maxLength];\n int length = 0;\n int input = -1;\n try{\n while (length < maxLength){//Read untill maxlength\n input = System.in.read();\n if ((input < 0) || (input == '\\n')) break; //or untill end of line ninput\n line [length++] += input;\n }\n\n if ((input < 0) && (length == 0)) return null; // eof\n return new String(line, 0, length);\n }catch (IOException e){\n return null;\n }\n }", "public static String readConsole(){\r\n\t\tString number = new String(\"\");\r\n\t\t\r\n\t\tSystem.out.println(\"Bitte geben Sie eine Zahl ein!\");\r\n\t\tBufferedReader bufferOne = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n\t\ttry {\r\n\t\t\tnumber = bufferOne.readLine();\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn number;\r\n\t}", "int main() {\n string input_string; \n \n // Read a full line of input from stdin (cin) and save it to our variable, input_string.\n getline(cin, input_string); \n \n // Print a string literal saying \"Hello, World.\" to stdout using cout.\n cout << \"Hello, World.\" << endl;\n\n // TODO: Write a line of code here that prints the contents of input_string to stdout.\n\n return 0;\n}", "public String getUserCommand() {\n out.print(\"Enter command: \");\n String fullInputLine = in.nextLine();\n\n return fullInputLine;\n }", "private static String readInput(){\n\t\ttry {\n\t\t\tInput = br.readLine();\n\t\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tSystem.out.println(\"IO error trying to read your name!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\treturn Input;\n\t}", "public String readLine(){\n\t\tString line;\n\t\ttry{\n\t\t\tline=scanner.nextLine();\n\t\t}catch (NoSuchElementException e){\n\t\t\tline=null;\n\t\t}\n\t\treturn line;\n\t}", "static String readEntry(String prompt) {\n try {\n StringBuffer buffer = new StringBuffer();\n System.out.print(prompt);\n System.out.flush();\n int c = System.in.read();\n while(c != '\\n' && c != -1) {\n buffer.append((char)c);\n c = System.in.read();\n }\n return buffer.toString().trim();\n } catch (IOException e) {\n return \"\";\n }\n }", "public static String readLine(String format, Object... args) throws IOException {\n\t\tif (System.console() != null) {\n\t\t\treturn System.console().readLine(format, args);\n\t\t}\n\t\tlogger.info(String.format(format, args));\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\treturn reader.readLine();\n\t}", "static String readLine(int maxLg) throws IOException {\n\n\t\tbyte lin[] = new byte[maxLg];\n\t\tint lg = 0, car = -1;\n\n\t\twhile (lg < maxLg) {\n\t\t\tcar = System.in.read();\n\t\t\tif ((car < 0) || (car == '\\n')) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlin[lg++] += car;\n\t\t}\n\n\t\tif ((car < 0) && (lg == 0)) {\n\t\t\treturn (null); // eof\n\t\t}\n\n\t\treturn (new String(lin, 0, lg));\n\n\t}", "public abstract String readLine() throws IOException, InterruptedException;", "private String askForLine(String message) {\r\n System.out.print(message);\r\n return sc.nextLine();\r\n }", "public String getInput(String message) throws IOException {\n\t\tSystem.out.print(\">> \"+message+\" \");\n\t\treturn consoleIn.readLine();\n\t}", "public static String inputString(String s)\n {\n if (s != null && s.length() > 0)\n {\n System.out.print(s);\n System.out.flush();\n }\n\n StringBuffer sb = new StringBuffer();\n try\n {\n InputStreamReader reader = new InputStreamReader(System.in);\n do\n {\n sb.append(new BufferedReader(reader).readLine());\n }\n while (System.in.available() > 0);\n\n return sb.toString();\n }\n catch (IOException e)\n {\n return null;\n }\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n System.out.println(str);\n }", "private String stringKeyBoardInput() {\n\t\tString input = \"\";\n\t\tboolean tryAgain = true;\n\t\twhile (tryAgain) {\n\t\t\ttry {\n\t\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t\tinput = scanner.nextLine();\n\t\t\t\ttryAgain = false;\n\t\t\t} catch (InputMismatchException ime) {\n\t\t\t\tSystem.out.println(\"Invalid input.\");\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}", "public static String readMessage() throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tSystem.out.print(\"Enter the message :: \");\n\t\tSystem.out.println();\n\t\tString s = br.readLine();\n\t\treturn s;\n\t}", "public String ReadLine() {\n\tString s = childStdout.Readline();\n\treturn s;\n }", "protected String inputLine(String message) {\n System.out.println(\"\\n\\n\" + message + \" \");\n return new Scanner(System.in).nextLine();\n }", "private String readLine() {\r\n\t\ttry {\r\n\t\t\treturn input.readLine();\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private static String inputString() {\n Scanner userInput = new Scanner(System.in);\n System.out.print(\"Insert text: \");\n String inputText = userInput.nextLine();\n return inputText;\n }", "private static String readPassword() {\n\t\treturn consoleInput.nextLine();\r\n\t}", "public static String getString(String prompt)\n {\n System.out.print(prompt + \" \");\n return in.nextLine();\n }", "String getUserInput(String prompt) {\r\n System.out.print(prompt);\r\n try {\r\n return rdr.readLine();\r\n }\r\n catch (IOException ex) {\r\n return null;\r\n }\r\n }", "public String getCurrentInputString() { return line; }", "private String readLine(ByteBuf in) {\n\n int bytesToRead;\n byte[] data = null;\n int bytesToSkip;\n\n if ((bytesToRead = in.bytesBefore((byte) LINE_FEED_CHAR)) > -1) {\n // Found the line feed.\n bytesToSkip = 1;\n\n // Check (and ignore) optional carriage return.\n if (bytesToRead > 0 && in.getByte(bytesToRead - 1) == CARRIAGE_RETURN_CHAR) {\n bytesToSkip++;\n bytesToRead--;\n }\n\n // Check that the bytes we're about to read will not exceed the\n // max frame size.\n checkTooLongFrame(bytesToRead);\n\n data = new byte[bytesToRead];\n in.readBytes(data);\n in.skipBytes(bytesToSkip);\n\n // Count the bytes read.\n currentDecodedByteCount += bytesToRead;\n }\n else {\n // No line feed. Make sure we're not buffering more than the max\n // frame size.\n checkTooLongFrame(in.readableBytes());\n }\n\n if (data != null) {\n return new String(data, StompConstants.UTF_8);\n }\n else {\n return null;\n }\n }", "String readLine() throws IOException\n\t{\n\t\tString line = null;\n\t\tif (haveStreams())\n\t\t\tline = m_in.readLine();\n\t\telse\n\t\t\tline = keyboardReadLine();\n\n\t\tsetCurrentLine(line);\n\t\treturn line;\n\t}", "String getLine (int line);", "public static String readEntry(String prompt) {\n\n try {\n StringBuffer buffer = new StringBuffer();\n System.out.print(prompt);\n System.out.flush();\n int c = System.in.read();\n while (c != '\\n' && c != -1) // while not newline or EOF\n {\n buffer.append((char) c);\n c = System.in.read();\n }\n return buffer.toString().trim();\n } catch (IOException e) {\n return \"\";\n }\n }", "String getInput();", "private static String receiveInput(String message) {\n BufferedReader buffyTheVampireSlayer = new BufferedReader(new InputStreamReader(System.in));\n try {\n System.out.printf(\"%s: \", message);\n return buffyTheVampireSlayer.readLine();\n } catch (IOException e) {\n System.out.println(e);\n System.out.println(\"an unexpected error occured\");\n return null;\n }\n }", "public String readCommand() {\n return scanner.nextLine();\n }", "public static String readString() {\n\t\twhile (true) {\n\t\t\tdraw();\n\t\t\tchar pressed = waitForKey();\n\t\t\tif (pressed == '\\n') {\n\t\t\t\tString result = textBeingEntered;\n\t\t\t\ttextBeingEntered = \"\";\n\t\t\t\treturn result;\n\t\t\t} else if ((pressed == '\\b') && (textBeingEntered.length() != 0) ) {\n\t\t\t\ttextBeingEntered = textBeingEntered.substring(0,\n\t\t\t\t\t\ttextBeingEntered.length() - 1);\n\t\t\t} else {\n\t\t\t\ttextBeingEntered += pressed;\n\t\t\t}\n\t\t}\n\t}", "public static void getString()\n\t{\n\t\t\n\t\tScanner s=new Scanner(System.in);\n\t\t\n\t\t//Here Scanner is the class name, a is the name of object, \n\t\t//new keyword is used to allocate the memory and System.in is the input stream. \n\t\t\n\t\tSystem.out.println(\"Entered a string \");\n\t\tString inputString = s.nextLine();\n\t\tSystem.out.println(\"You entered a string \" + inputString );\n\t\tSystem.out.println();\n\t}", "public static String readNextLine() {\n return sc.nextLine();\n }", "public String getLine()\n\t{\n\t\ttry\n\t\t{\n\t\t\tline = reader.readLine();\n\t\t} catch (IOException ioe)\n\t\t{\n\t\t\t//\n\t\t}\n\n\t\treturn line;\n\t}", "public String getUserStringInput(String tips)\n {\n Scanner console = new Scanner(System.in);\n System.out.println(tips);\n return console.nextLine();\n }", "String getUserInput();", "public String getInputForName() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\treturn bufferedReader.readLine();\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.err.println(e.getLocalizedMessage());\n\t\t\t}\n\t\t}\n\t}", "int getLine();", "public String getString(String pPrompt) {\r\n\t\tSystem.out.println(pPrompt + \"\");\r\n\t\treturn input.nextLine();\r\n\t}", "public static void main(String args[])\n {\n Scanner in=new Scanner(System.in);\n String str=in.nextLine();\n System.out.println(str);\n }", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }", "static String promptForString() {\n String line = \"\";\n\n while (line.compareTo(\"\") == 0) {\n System.out.print(\">\");\n if (Menus.reader.hasNext()) {\n line = Menus.reader.nextLine().strip();\n }\n }\n return line;\n }", "public static String getString() {\n // Variable declarations\n String str = \"\"; // String object to hold user input\n\n // Prompt user to enter str\n str = scnr.nextLine();\n\n // Return the string\n return str;\n }", "public String readString() {\n\t\tboolean read = false;\n\t\tString input = \"\";\n\t\twhile (!read) {\n\t\t\ttry {\n\t\t\t\tinput = myInput.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\twhile (input.contains(\" \")) {\n\t\t\t\tSystem.out.println(\"Please do not use spaces. Type CamelCase or use underscores.\");\n\t\t\t\tSystem.out.println(\"Try Again:\");\n\t\t\t\ttry {\n\t\t\t\t\tinput = myInput.readLine();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tread = true;\n\t\t}\n\t\treturn input;\n\t}", "static String readString() throws Exception {\n\t\twhile (!st.hasMoreTokens()) {\n\t\t\tst = new StringTokenizer(stdin.readLine());\n\t\t}\n\t\treturn st.nextToken();\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n // String input\n String first = sc.nextLine();\n System.out.println(first);\n\n }", "private char readChar() {\r\n\t\tInputStream in = System.in;\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n\t\tString line = null;\r\n\r\n\t\ttry {\r\n\t\t\tline = br.readLine();\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t\treturn line.toLowerCase().charAt(0);\r\n\t}", "@Override\n\tpublic String readLine() throws IOException {\n\t\tint length = readInt();\n\t\twriteInt(length);\n\t\tbyte[] data = awaitNextPacket(new byte[length]);\n\t\treturn new String(data);\n\t}", "public CommandLine getLine() {\n return line;\n }", "private String nextLine() {\n if (console) {\n return con.nextLine();\n }\n return scan.nextLine();\n\n }", "public static String readString(String prompt) throws IOException {\r\n\t\tString value = \"\";\r\n\t\twhile (true) {\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.print(prompt + \" _>\");\r\n\t\t\t\tvalue = reader.readLine();\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tSystem.err.println(ex.getLocalizedMessage());\r\n\t\t\t\tthrow ex;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "private static String getUserText()\n {\n\t// Reads the users input.\n\tBufferedReader optionReader = new BufferedReader(new InputStreamReader(System.in));\n\n\ttry\n\t {\n\t\treturn(optionReader.readLine());\n\t }\n\tcatch(Exception ex)\n\t {\n\t\treturn(null);\n\t }\n }" ]
[ "0.7641461", "0.76210326", "0.76134247", "0.7513635", "0.74846923", "0.7462544", "0.74343973", "0.74146193", "0.7377027", "0.73727965", "0.73601997", "0.73341167", "0.7331222", "0.7234074", "0.7218154", "0.72162414", "0.7210418", "0.7181375", "0.71768844", "0.715717", "0.71434003", "0.7140255", "0.7137076", "0.7115913", "0.70833045", "0.70668465", "0.7064791", "0.70271784", "0.69725305", "0.6958732", "0.6929117", "0.6900517", "0.6895681", "0.6884111", "0.68515515", "0.6848173", "0.68362945", "0.683369", "0.6833046", "0.68264884", "0.67727715", "0.6766136", "0.6721816", "0.67206156", "0.6715505", "0.66832405", "0.6673097", "0.66537225", "0.66513705", "0.6650235", "0.6619735", "0.66142195", "0.65856963", "0.65684396", "0.6564011", "0.6550195", "0.65439916", "0.651952", "0.6508362", "0.6505519", "0.65005976", "0.6494484", "0.6482527", "0.6465108", "0.6442527", "0.64398056", "0.6425404", "0.6407039", "0.6394642", "0.6376887", "0.6373518", "0.6368178", "0.6359767", "0.6353835", "0.6353759", "0.6313538", "0.6301622", "0.6284829", "0.62847704", "0.6280358", "0.62791187", "0.6277675", "0.6276106", "0.627101", "0.6267034", "0.62630683", "0.62549204", "0.6249314", "0.62449056", "0.6236469", "0.62335974", "0.6208732", "0.6192338", "0.6188289", "0.61693925", "0.61688405", "0.6166425", "0.6162567", "0.6158259", "0.6114128" ]
0.71319324
23
Reads user's credentials from console
public static String[] readCredentials(boolean isAdmin) { String[] credentials = new String[4]; System.out.println("CREDENTIALS must be at lest three characters long and may contain " + "only letters, digits, a dot sign or an underscore sign"); in.nextLine(); System.out.println("Username (at least 3 characters): "); credentials[0] = in.nextLine(); System.out.println("Password (at least 3 characters): "); credentials[1] = in.nextLine(); System.out.println("Email: "); credentials[2] = in.nextLine(); if (isAdmin) { System.out.println("Agency: "); credentials[3] = in.nextLine(); } else { credentials[3] = "CUSTOMER"; } return credentials; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String readPassword() {\n\t\treturn consoleInput.nextLine();\r\n\t}", "private String[] getCredentials() {\n String[] cred = new String[2];\n System.out.print(\"Username: \");\n cred[0] = sc.nextLine();\n System.out.print(\"Password: \");\n cred[1] = sc.nextLine();\n return cred;\n }", "private void logIn() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n\n String user = a[0];\n String password = a[1];\n boolean rez = service.checkPassword(user, password);\n if(rez == TRUE)\n System.out.println(\"Ok\");\n else\n System.out.println(\"Not ok\");\n }", "private static void task42() {\n char[] pass = null;\n Console con = System.console();\n if(con != null){\n try {\n pass = con.readPassword(\"Enter your password:\");\n System.out.println(\"Your password is \" + new String(pass));\n }\n finally {\n if(pass!=null){\n System.out.println(\"Yur pass -\"+pass);\n }\n }\n }else {\n throw new RuntimeException(\"Can't get password...No console\");\n }\n\n }", "public void getCredentials(){\n System.out.println(\"Enter Your Credit Card Number\");\n setCreditCardNumber(Integer.parseInt(Menu.getScanner().nextLine()));\n System.out.println(\"Enter your billing address\");\n setBillingAddress(Menu.getScanner().nextLine());\n System.out.println(\"Enter your CVC\");\n setCvc(Integer.parseInt(Menu.getScanner().nextLine()));\n }", "public static void main(String[] args) {\n try(\n\t\tFileInputStream in=new FileInputStream(\"credentials.properties\");\n \t)\n {\n \tProperties props=new Properties();\n \tprops.load(in);\n \tString uname=props.getProperty(\"username\");\n \tString pass=props.getProperty(\"password\");\n \t\n \tSystem.out.println(uname+\" \"+pass);\n \t\n } catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \n\t}", "public char[] readPassword() throws IOException {\n\t\tchar[] passwd = null;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tClass implClass = Class.forName(\"java.lang.System\");\n \t\t\tMethod m = implClass.getMethod(\"console\", (Class[])null);\n \t\t\tObject cons = m.invoke(this, (Object[])null);\n \t\t\tif (cons != null) {\n \t\t\t\tMethod m1 = cons.getClass().getMethod(\"readPassword\", (Class[])null);\n \t\t\t\tpasswd = (char[])m1.invoke(cons, (Object[])null);\n \t\t\t} else {\n \t\t\t\tthrow new IOException(\"No java6 console detected.\"); \t\t\t\t\n \t\t\t} \t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t// If we can't find the console method on System, i.e. we are running java5\n\t\t\t\t// we will try to use the jline console library\n \t\t\tpasswd = new jline.ConsoleReader().readLine(new Character((char)0)).toCharArray();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// If everything else fails, fallback to clear text input\n\t\t\tpasswd = new BufferedReader(new InputStreamReader(System.in)).readLine().toCharArray();\n\t\t}\n\t\treturn passwd;\n\t}", "public static String readUserInput() {\n return in.nextLine();\n }", "public KeyStoreBuilder<E> readPasswordFromConsole() {\r\n this.readPasswordFromConsole = true;\r\n return this;\r\n }", "public String getUserInput() {\n\t\tString input;\n\t\tinput = this.console.next();\n\t\treturn input;\n\t}", "String getUserInput(String prompt) {\r\n System.out.print(prompt);\r\n try {\r\n return rdr.readLine();\r\n }\r\n catch (IOException ex) {\r\n return null;\r\n }\r\n }", "public void read() {\n try {\n pw = new PrintWriter(System.out, true);\n br = new BufferedReader(new InputStreamReader(System.in));\n input = br.readLine();\n while (input != null) {\n CM.processCommand(input, pw, true);\n input = br.readLine();\n }\n } catch (IOException ioe) {\n pw.println(\"ERROR: Problem with reading user input.\");\n } finally {\n try {\n br.close();\n } catch (IOException ioe) {\n pw.println(\"ERROR: Buffer DNE\");\n }\n }\n }", "public void readUserInput(){\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try {\n String input = reader.readLine();\n while (!userValidation.validateUserInput(input)){\n input = reader.readLine();\n }\n elevatorController.configureNumberOfElevators(input);\n\n } catch (\n IOException e) {\n logger.error(e);\n }\n\n }", "public String readCommand() {\n sc = new Scanner(System.in);\n userInput = new TextField();\n return userInput.getText();\n }", "java.lang.String getCred();", "private String getPassword() {\n\t\tif (null == password || password.isBlank() || password.isEmpty()) {\n\t\t\tConsole cons;\n\t\t\tchar[] passwd = null;\n\t\t\tif ((cons = System.console()) != null) {\n\t\t\t\tpasswd = cons.readPassword(\"[%s]\", \"Password : \");\n\t\t\t\tpassword = Arrays.toString(passwd);\n\t\t\t} else {\n\t\t\t\tSystem.err.println(\"Console not found\");\n\t\t\t\tpassword = getProperty(\"password\");\n\t\t\t}\n\t\t}\n\t\treturn password;\n\t}", "public static void main(String[] args) throws IOException {\n\t\tSftpAuthenticator auth = new SftpAuthenticator();\n\t\tMap<String, String> props = new HashMap<String, String>();\n\t\tdo {\n\t\t\tprops.clear();\n\t\t\tfor (RequiredInputField input : auth.getRequiredInputFields()) {\n\t\t\t\tSystem.out.print(\"Enter \" + input.getName() + \": \");\n\t\t\t\tString entered = readLine();\n\t\t\t\tswitch (input.getType()) {\n\t\t\t\tcase Bool:\n\t\t\t\t\tBoolean.parseBoolean(entered);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Number:\n\t\t\t\t\tInteger.parseInt(entered);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tprops.put(input.getName(), entered);\n\t\t\t}\n\t\t} while (!auth.isValid(props));\n\t\tauth.authorize(props);\n\n\t\tfor (Map.Entry<String, String> entry : props.entrySet()) {\n\t\t\tSystem.out.println(entry.getKey() + \": \" + entry.getValue());\n\t\t}\n\t\tProperties tmp = new Properties();\n\t\ttmp.putAll(props);\n\t\ttmp.store(new FileWriter(new File(\"auth.props\")), null);\n\t}", "public static void main(String[] args) {\n\t\tint secretPassword = 1234;\r\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint userInput;\r\n\r\n\t\tdo {\r\n\t\t\t// prompt user for input\r\n\t\t\tSystem.out.print(\"enter password: \");\r\n\t\t\tuserInput = sc.nextInt();\r\n\t\t} while (userInput != secretPassword);\r\n\r\n\t\tSystem.out.println(\"You are logged in\");\r\n\r\n\t\tsc.close();\r\n\r\n\t}", "public void readInput()\n\t{\n\t\tString userInput;\n\t\tChoices choice;\n\t\t\n\t\tdo {\n\t\t\tlog.log(Level.INFO, \"Please give the inputs as:\\n\"\n\t\t\t\t\t+ \"ADDACCOUNT to add the account\\n\" \n\t\t\t\t\t+ \"DISPLAYALL to display all accounts\\n\"\n\t\t\t\t\t+ \"SEARCHBYACCOUNT to search by account\\n\"\n\t\t\t\t\t+ \"DEPOSIT to deposit into account\\n\"\n\t\t\t\t\t+ \"WITHDRAW to withdraw from the account\\n\"\n\t\t\t\t\t+ \"EXIT to end the application\"\n\t\t\t\t\t);\n userInput = scan.next();\n choice = Choices.valueOf(userInput);\n\n switch (choice) {\n case ADDACCOUNT : \taddAccount();\n \t\t\t\t\t\tbreak;\n \n case DISPLAYALL :\t\tdisplayAll();\n \t\t\t\t\t\tbreak;\n\n case SEARCHBYACCOUNT :\tsearchByAccount();\n \t\t\t\t\t\tbreak;\n \n case DEPOSIT :\t\t\tdepositAmount();\n \t\t\t\t\t\tbreak;\n \n case WITHDRAW :\t\t\twithDrawAmount();\n \t\t\t\t\t\tbreak;\n \n case EXIT:\t\t\t\tlog.log(Level.INFO, \"Application has ended successfully\");\n \t\t\t\t\t\tbreak;\n \n default: break;\n }\n } while(choice != Choices.EXIT);\n\t\t\n\t\tscan.close();\n\t}", "protected static String getUsername() {\n if (username == null || username.isEmpty()) {\n Console console = System.console();\n if (console != null) {\n username = console.readLine(\"Username:\");\n } else {\n throw new UnsupportedOperationException(\n \"Username must be specified\");\n }\n }\n return username;\n }", "public static void main(String[] args) {\n\t\tBufferedReader keyboardReader = new BufferedReader(new InputStreamReader(System.in));\n\t\ttry {\n\t\t\tString input;\n\t\t\tdo {\n\t\t\t\tinput = keyboardReader.readLine();\n\t\t\t\tSystem.out.println(\"Your input is:**\"+input+\"**\");\n\t\t\t} while (input.length() > 0);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException occured...\");\n\t\t}\n\n//\t\tConsole c = System.console();\n//\t\tif (c == null) {\n//\t\t\tSystem.err.println(\"No console.\");\n//\t\t\tSystem.exit(1);\n//\t\t}\n//\n//\t\tString login = c.readLine(\"Enter your login: \");\n//\t\tSystem.out.println(\"login is :**\" + login+\"**\");\n\t}", "protected String getInputFromConsole() throws IOException\n {\n BufferedReader consoleInput = new BufferedReader(new InputStreamReader(System.in));\n return consoleInput.readLine();\n }", "private static String getUserText()\n {\n\t// Reads the users input.\n\tBufferedReader optionReader = new BufferedReader(new InputStreamReader(System.in));\n\n\ttry\n\t {\n\t\treturn(optionReader.readLine());\n\t }\n\tcatch(Exception ex)\n\t {\n\t\treturn(null);\n\t }\n }", "public boolean LOGIN(){\r\n\r\n try {\r\n System.out.print(\"Enter username: \");\r\n String userName = user.readLine();\r\n out.println(\"USER \" + userName);\r\n out.flush();\r\n System.out.print(in.readLine() + \": \");\r\n String password = user.readLine();\r\n\r\n //System.out.println(in.readLine());\r\n out.println(\"PASS \" + password);\r\n out.flush();\r\n System.out.println(in.readLine());\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n return false;\r\n }", "public String getCredentials();", "public String readStringFromCmd() throws IOException {\r\n\t\tSystem.out.println(\"Enter your String:\");\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString string = null;\t\t\r\n\t\tstring = br.readLine();\r\n\t\treturn string;\r\n\t}", "public void readRememberMe() {\n\t\tFile f = new File(REMEMBER_ME_FILE);\n\t\tif (f.exists() && !f.isDirectory()) {\n\t\t\trememberMeCheckbox.setSelected(true);\n\t\t\tScanner scan;\n\t\t\ttry {\n\t\t\t\tscan = new Scanner(f);\n\t\t\t\tString username = scan.nextLine();\n\t\t\t\tString password = scan.nextLine();\n\t\t\t\tusernameInput.setText(username);\n\t\t\t\tpasswordInput.setText(password);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void authenticateUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tint index=loginattempt();\r\n\t}", "private String getClientInput() {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String input = null;\n try {\n input = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return input;\n }", "public static Object[] getUserData(){\n String name, password;\n\n System.out.println(\"\\n1. Manager\\n2. Customer\");\n int res = ConsoleReader.getInt();\n System.out.print(\"\\nEnter your name :\");\n ConsoleReader.getString();\n name = ConsoleReader.getString();\n System.out.print(\"Enter your password :\");\n password = ConsoleReader.getString();\n return new Object[] {res, name, password};\n }", "@Test\n public void notPromptForPasswordIfuserNameIsGivenInFile() throws Exception {\n properties.setProperty(\"security-username\", \"user\");\n Mockito.doReturn(properties).when(connectCommand).loadProperties(ArgumentMatchers.any(File.class));\n result = ConnectCommandTest.gfshParserRule.executeCommandWithInstance(connectCommand, \"connect\");\n Mockito.verify(gfsh, Mockito.times(0)).readPassword(((CliStrings.CONNECT__PASSWORD) + \": \"));\n assertThat(properties).doesNotContainKey(\"security-password\");\n }", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tfinal User user = INSTANCE.getUserInfoJson(\"ya29.Gl0rBjDkUJNwgFxT1_HOkJCAjj-5B0NDt197V-4-JeladX8EZFkttpTNDgxxSQTJD3Ug-3nN6IArpNEAeWCJGDamKzSU_LmbVwQtFc1UldceNQMQwfVM-KXPltrQ190\");\n\t\tSystem.out.println(user);\n\t}", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }", "public void readAdmin(String fileName)\n {\n try\n {\n FileReader inputFile = new FileReader(fileName);\n Scanner parser = new Scanner(inputFile);\n String[] array = parser.nextLine().split(\";\");\n for(int index = 0; index < array.length; index++)\n {\n String[] elements = array[index].split(\",\");\n String account = elements[0];\n String password = elements[1];\n setAdmin(index, account, password);\n }\n }\n catch(FileNotFoundException exception)\n {\n System.out.println(fileName + \" not found\");\n }\n catch(IOException exception)\n {\n System.out.println(\"Unexpected I/O error occured\");\n }\n\n }", "String getUserInput();", "public String getInput() throws IOException {\n\t\tSystem.out.print(\">> \");\n\t\treturn consoleIn.readLine();\n\t}", "private char[] readPassword(InputStream in) throws IOException {\n char[] lineBuffer;\n char[] buf;\n int i;\n\n buf = lineBuffer = new char[128];\n\n int room = buf.length;\n int offset = 0;\n int c;\n\n loop:\n while (true) {\n switch (c = in.read()) {\n case -1:\n case '\\n':\n break loop;\n\n case '\\r':\n int c2 = in.read();\n if ((c2 != '\\n') && (c2 != -1)) {\n if (!(in instanceof PushbackInputStream)) {\n in = new PushbackInputStream(in);\n }\n ((PushbackInputStream)in).unread(c2);\n } else\n break loop;\n\n default:\n if (--room < 0) {\n buf = new char[offset + 128];\n room = buf.length - offset - 1;\n System.arraycopy(lineBuffer, 0, buf, 0, offset);\n Arrays.fill(lineBuffer, ' ');\n lineBuffer = buf;\n }\n buf[offset++] = (char) c;\n break;\n }\n }\n\n if (offset == 0) {\n return null;\n }\n\n password = new char[offset];\n System.arraycopy(buf, 0, password, 0, offset);\n Arrays.fill(buf, ' ');\n cleared = false;\n \n return password;\n }", "public static void main(String[] args) {\n\t\tConsole console = System.console();\n\t\tSystem.out.println(\"console value is : \" + console);\n\t\t\n\t\tString name = console.readLine();\n\t\t\n\t\tSystem.out.println(\"Enter input is: \" + name);\n\t}", "public String readCommand() {\n Scanner sc = new Scanner(System.in);\n return sc.nextLine();\n }", "public String getUserCommand() {\n out.print(\"Enter command: \");\n String fullInputLine = in.nextLine();\n\n return fullInputLine;\n }", "static String readEntry(String prompt) {\n try {\n StringBuffer buffer = new StringBuffer();\n System.out.print(prompt);\n System.out.flush();\n int c = System.in.read();\n while(c != '\\n' && c != -1) {\n buffer.append((char)c);\n c = System.in.read();\n }\n return buffer.toString().trim();\n } catch (IOException e) {\n return \"\";\n }\n }", "private void handlePasswordCallback(PasswordCallback pc)\n throws IOException {\n System.out.print(pc.getPrompt());\n System.out.flush();\n String passwd = (new BufferedReader(new InputStreamReader(System.in))).\n readLine();\n pc.setPassword(passwd.toCharArray());\n }", "public static void logIn(WebDriver dr) throws IOException {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Username\n\t\tSystem.out.println(\"Enter username:\");\n\t\tString username=sc.nextLine();\n\t\tIzletPage.clickLUsername(dr);\n\t\tIzletPage.sendKeysLUsername(dr, username);\n\t\t// Password\n\t\tSystem.out.println(\"Enter password: \");\n\t\tString pass = sc.nextLine();\n\t\tIzletPage.clickLPassword(dr);\n\t\tIzletPage.sendKeysLPassword(dr, pass);\n\t\t// Log in button\n\t\tIzletPage.clickLogInButton(dr);\n\t\tsc.close();\n\t}", "public static void login(){\n\t\ttry{\n\t\t\tFile Information = new File(\"information.txt\");\n\t\t\tFile Account = new File(\"account.txt\");\n\t\t\tArrayList<String> account = new ArrayList<String>();\n\t\t\tArrayList<String> info = new ArrayList<String>();\n\t\t\tScanner inputFromAccount = new Scanner(Account);\n\t\t\tScanner inputFromInformation = new Scanner(Information);\n\t\t\twhile (inputFromInformation.hasNextLine()){\n\t\t\t\tinfo.add(inputFromInformation.nextLine());\n\t\t\t}\n\t\t\twhile (inputFromAccount.hasNext()){\n\t\t\t\taccount.add(inputFromAccount.next());\n\t\t\t}\n\t\t\tboolean check=false;\n\t\t\tString PassWord=\"\";\n\t\t\tString UserName=\"\";\n\t\t\tString username=\"\";\n\t\t\tScanner input = new Scanner(System.in);\n\t\t\tdo{\n\t\t\t\tSystem.out.println(\"Enter your username\");\n\t\t\t\tusername = input.next();\n\t\t\t\tfor(int i=0; i<account.size()-1;i++){\n\t\t\t\t\tUserName=account.get(i);\n\t\t\t\t\tPassWord=account.get(i+1);\n\t\t\t\t\tif(UserName.equals(username)){\n\t\t\t\t\t\tSystem.out.println(\"Enter your password\");\n\t\t\t\t\t\tString password = input.next();\n\t\t\t\t\t\tif (PassWord.equals(password))check=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!check)System.out.println(\"User not found! Please try again\");\n\t\t\t}while(!check);\n\t\t\tboolean checker=false;\n\t\t\tSystem.out.println(\"Login Successful!\");\n\t\t\tdo{\n\t\t\t\tSystem.out.println(\"Please enter \\n(1)to view your saved information\"\n\t\t\t\t\t\t+ \"\\n(2)to edit your saved information\"\n\t\t\t\t\t\t+ \"\\n(3)to logout\");\n\t\t\t\tint command = input.nextInt();\n\t\t\t\tboolean temp = false;\n\t\t\t\tif(command==1||command==2||command==3)checker=true;\n\t\t\t\telse System.out.println(\"Invalid Input! Please try again\");\n\t\t\t\tswitch(command){\n\t\t\t\tcase 1: viewInfo(username);break;\t\n\t\t\t\tcase 2: editInfo(username,temp);break;\n\t\t\t\tcase 3: starter();\n\t\t\t\t}\n\t\t\t}while(!checker);\n\t\t}\n\n\t\tcatch (java.io.IOException ex){\n\t\t\tSystem.out.println(\"I/O Errors: File is not found\");\n\t\t}\t\n\t}", "String getUserPassword();", "public static String getString() throws IOException\n {\n InputStreamReader input=new InputStreamReader(System.in);\n BufferedReader b=new BufferedReader(input);\n String str=b.readLine();//reading the string from console\n return str;\n }", "public static void main(String[] args) throws IOException {\n\t\tFileReader fr = new FileReader(\"./resources/data.properties\");\n\t\tProperties properties = new Properties();\n\t\tproperties.load(fr);\n\t\t\n\t\tString usernameData = properties.getProperty(\"username\");\n\t\tSystem.out.println(usernameData);\n\t}", "private void askUser()\n { \n System.out.println(\"What is your command?\");\n\n String command = scanner.nextLine();\n commandPrompt(command);\n }", "public void launch() throws IOException {\n initBinding();\n var request = this.password == null ? new AnonymousConnection(login)\n : new AuthentificatedConnection(login, password);\n\n this.uniqueContext.putInQueue(request.toBuffer());\n console.setDaemon(true);\n console.start();// run stdin thread\n\n var lastCheck = System.currentTimeMillis();\n while (!Thread.interrupted()) {\n // printKeys();\n try {\n if (uniqueContext.isClosed()) {\n console.interrupt();\n selector.close();\n serverSocketChannel.close();\n sc.close();\n return;\n }\n selector.select(this::treatKey);\n processCommands();\n var currentTime = System.currentTimeMillis();\n if (currentTime >= lastCheck + TIMEOUT) {\n lastCheck = currentTime;\n clearInvalidSelectionKey();\n }\n } catch (UncheckedIOException tunneled) {\n throw tunneled.getCause();\n }\n }\n }", "private static String getUserName(){\r\n Scanner in = new Scanner(System.in);\r\n System.out.print(\"What is your character's name?\");\r\n return in.nextLine();\r\n }", "public String readCommand() {\n String input = in.nextLine();\n while (input.trim().isEmpty()) {\n input = in.nextLine();\n }\n return input;\n }", "public String Password()// method for getting the password given by user\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tSystem.out.println(\"enter password: \");\n\t\tString password = sc.next();\n\n\t\treturn password;\n\t}", "private String getInput(String prompt) throws IOException {\n System.out.print(prompt);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(System.in));\n return in.readLine();\n }", "public static void login(){\n //Prompt the user for the database name, and the credentials.\n boolean loggedIn = false;\n Scanner in = new Scanner(System.in);\n // While the credentials are invalid, loop until valid\n while(!loggedIn){\n System.out.print(\"Name of the database (not the user account): \");\n DBNAME = in.nextLine();\n System.out.print(\"Database user name: \");\n USER = in.nextLine();\n // Password is CASE SENSITIVE\n System.out.print(\"Database password: \");\n PASS = in.nextLine();\n if(DBNAME.toLowerCase().equals(cDB) && USER.toLowerCase().equals(cUSER) && PASS.equals(cPASS))\n loggedIn = true;\n else\n System.out.print(\"Cannot connect to ClientDriver Database. Please try again.\\n\\n\");\n }\n //Constructing the database URL connection string\n DB_URL = DB_URL + DBNAME + \";user=\"+ USER + \";password=\" + PASS;\n }", "public String getUserStringInput(String tips)\n {\n Scanner console = new Scanner(System.in);\n System.out.println(tips);\n return console.nextLine();\n }", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\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 static void main(String[] args) {\n UserObjects user = new UserObjects();\n System.out.printf(\" ------------ Login ------------ \\n\");\n System.out.println(\"Enter library number:\");\n String libraryNumberInput = Utililty.readConsoleInput();\n System.out.println(\"\\nEnter password:\");\n String passwordInput = Utililty.readConsoleInput();\n Boolean successLogin = user.login(libraryNumberInput,passwordInput);\n\n if(successLogin){\n Biblioteca biblioteca = new Biblioteca();\n String firstGreeting = biblioteca.welcomeMessage();\n System.out.println(firstGreeting);\n\n Menu menu = new Menu(biblioteca, user);\n menu.readInputOption();\n }else{\n System.out.println(\"Incorrect login\");\n }\n\n }", "public static void main(String[] args) {\n\n String username = \"Gulzhaina\";\n String password = \"12345\";\n Scanner input = new Scanner(System.in);\n String username2 = input.nextLine();\n\n\n if(username2.equals(username)){\n System.out.println(\"Please enter your password: \");\n String password2 =input.nextLine();\n if(password2.equals(password)){\n System.out.println(\"Login successful\");\n } else{\n System.out.println(\"Wrong password\");\n }\n }\n else {\n System.out.println(\"invalid username\");\n }\n\n }", "private static LoginInfo getLoginInfo() throws IOException {\n\t\tLoginInfo info = new LoginInfo();\n\t\tinfo.serverName = \"localhost\";\n\t\tinfo.serverPort = 5222;\n\n\t\t//Get selected user.\n\t\tString[] users = getAllUserName(userMap);\n\t\tSystem.out.println(\"Select from following users: \");\n\t\tfor (int i = 0; i < users.length; i++) {\n\t\t\tSystem.out.println(\"[\" + i + \"]: \" + users[i]);\n\t\t}\n\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tint selection = Integer.parseInt(in.readLine());\n\t\twhile (selection < 0 || selection > users.length) {\n\t\t\tSystem.out.println(\"Wrong selection, try again.\");\n\t\t\tselection = Integer.parseInt(in.readLine());\n\t\t}\n\n\t\tinfo.user = users[selection];\n\t\tinfo.password = userMap.get(info.user);\n\t\tSystem.out.println(\"Login with user: '\" + users[selection] + \"' on server: '\" + info.serverName + \"' port:\" + info.serverPort);\n\t\treturn info;\n\t}", "public static void main(String[] args) {\n\r\n\t\tString pass = (\"asdasd\");\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tint attempts = 3;\r\n\t\tBoolean passInput = true;\r\n\t\t\r\n\t\tSystem.out.println(\"Enter your password: \");\r\n\t\t\r\n\t\twhile (passInput && attempts-- > 0) {\r\n\t\t\tString passAttempt = input.nextLine();\r\n\t\t\t\r\n\t\t\tif (passAttempt.equals(pass)) {\r\n\t\t\t\tSystem.out.println(\"You're logged in!\");\r\n\t\t\t}\r\n\t\t\telse if (!passAttempt.equals(pass)) {\r\n\t\t\t\tSystem.out.println(\"Wrong password! Attempts remaining: \" + attempts);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tinput.close();\r\n\t}", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.printf(\"아이디 입력: \");\n\t\tString id = sc.nextLine();\n\t\tSystem.out.printf(\"비밀번호 입력: \");\n\t\tString pw = sc.nextLine();\n\t\t//아이디가 root, pw-1234 이면 로그인 성공이라고 출력 그렇지 않으면 로그인 실패라고 출력 \n\t\tif (id.equals(\"root\") && pw.equals(\"1234\")) {\n\t\t\tSystem.out.printf(\"로그인 성공\\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"로그인 실패\\n\");\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static String readInput() {\r\n return SCANNER.nextLine();\r\n }", "public void input_details_log()\r\n {\r\n System.out.print(\"\\n Enter your email id: \");\r\n Email=sc.nextLine();\r\n\r\n System.out.print(\" Enter your password: \");\r\n check_passwrd=sc.nextLine();\r\n }", "public static interface Credentials extends Serializable {\n\t\tpublic String getUserName();\n\t\t/**\n\t\t* The password is encrypted.\n\t\t*/\n\t\tpublic String getPassword();\n\t}", "@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}", "String readFile(File file, String password);", "public String userCommand(){\n return scanner.nextLine();\n }", "private Client readClient() {\n System.out.println(\"Read client {id,name,age,membership}\");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());// ...\n String name = bufferRead.readLine();\n int age = Integer.parseInt(bufferRead.readLine());\n String membership = bufferRead.readLine();\n\n Client client = new Client(name, age, membership);\n client.setId(id);\n\n return client;\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "String promptSecureString();", "static String read ()\r\n \t{\r\n \t\tString sinput;\r\n \r\n \t\ttry\r\n \t\t{\r\n \t\t\tsinput = br.readLine();\r\n \t\t}\r\n \t\tcatch (IOException e)\r\n \t\t{\r\n \t\t\tErrorLog.addError(\"Input exception occured in command line interface!\");\r\n \t\t\treturn null; //Menu will exit when fed a null\r\n \t\t}\r\n \t\treturn sinput;\r\n \t}", "public static String readString(String prompt){ \n\t\tSystem.out.print(prompt+\": \");\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tProperties prop = new Properties();\n\t\t\tInputStream in = ReadProperties.class.getClassLoader().getResourceAsStream(\"user.properties\");\n\t\t\tprop.load(in);\n\t\t\tSystem.out.println(\"直接输出prop对象:\"+prop);\n\t\t\tString loginname = prop.getProperty(\"loginname\");\n\t\t\tString Password = prop.getProperty(\"Password\");\n\t\t\tSystem.out.println(\"loginname:\"+loginname+\"---\"+\"Password:\"+Password);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\t\n\t\t}\n\t}", "private boolean _credInit() throws FileNotFoundException, IOException \n {\n\n String user = (String) this._argTable.get(CMD.USER);\n String svgp = (String) this._argTable.get(CMD.SERVERGROUP);\n String password = null;\n\n //get the server group first\n if (svgp == null) \n {\n while (svgp == null)\n {\n //if servergroup is null, query.If empty, set to null (which is default) \n System.out.print(\"Server group>> \");\n svgp = this._readTTYLine();\n //System.out.println(\"\");\n svgp = svgp.trim();\n if (svgp.equals(\"\"))\n svgp = null;\n \n if (svgp == null)\n {\n System.out.println(\"Server group must be specified. Enter 'abort' to quit.\");\n }\n else if (svgp.equalsIgnoreCase(\"abort\") || svgp.equalsIgnoreCase(\"exit\") ||\n svgp.equalsIgnoreCase(\"quit\") || svgp.equalsIgnoreCase(\"bye\")) \n {\n System.exit(0);\n }\n }\n }\n else\n {\n System.out.println(\"Server group>> \"+svgp); \n }\n \n //---------------------------\n\n //request the authentication method from the servergroup\n AuthenticationType authType = null;\n try {\n authType = getAuthenticationType(svgp);\n } catch (SessionException sesEx) {\n \n if (sesEx.getErrno() == Constants.CONN_FAILED)\n {\n this._logger.error(\"Unable to connect to server group '\" +\n svgp+\"'.\\nPlease check network status and \"+\n \"FEI domain file configuration.\");\n \n// this._logger.severe(\"Unable to authenticate for group '\"+svgp+\n// \"' due to connection failure. Possible network issue.\");\n }\n else\n {\n this._logger.severe(\"Authentication Error! Unable to query server \"+\n \"authentication method for servergroup '\"+svgp + \"'. (\"+\n sesEx.getErrno()+\")\");\n }\n _logger.trace(null,sesEx);\n return false;\n }\n \n final String pwdPrompt = PasswordUtil.getPrompt(authType);\n\n //---------------------------\n \n if (user == null) \n {\n System.out.print(\"User name>> \");\n user = this._readTTYLine();\n user = user.trim();\n } \n else\n {\n System.out.print(\"User name>> \"+user);\n }\n \n boolean ok = false; \n while (!ok)\n { \n password = ConsolePassword.getPassword(pwdPrompt+\">> \");\n //System.out.println(\"\");\n password = password.trim();\n if (!password.equals(\"\"))\n ok = true; \n }\n \n //System.out.println(\"\");\n //password = password.trim();\n \n if (password.equalsIgnoreCase(\"abort\") || password.equalsIgnoreCase(\"exit\") ||\n password.equalsIgnoreCase(\"quit\") || password.equalsIgnoreCase(\"bye\")) \n {\n System.exit(0);\n }\n \n \n //create the encrypter for passwords\n String encrypted = null;\n try {\n encrypted = this._encrypter.encrypt(password);\n } catch (Exception ex) {\n this._logger.severe(\"Password encrypt Error! Could not write login credentials.\");\n _logger.trace(null,ex);\n return false;\n }\n \n\n \n UserToken userToken = null;\n String authToken = encrypted;\n try {\n userToken = getAuthenticationToken(svgp, user, encrypted);\n } catch (SessionException sesEx) {\n this._logger.severe(\"Authentication Error! Could not authenticate \"+\n \"user '\"+user+\"' for servergroup '\"+svgp + \"'.\"); \n _logger.trace(null,sesEx);\n return false;\n }\n \n \n //user was not authenticated\n if (userToken == null || !userToken.isValid())\n {\n this._logger.severe(\"Authentication Error: Could not authenticate \"+\n \"user '\"+user+\"' for servergroup '\"+svgp + \"'.\"); \n return false;\n }\n \n this._loginReader.setUsername(svgp, user);\n this._loginReader.setPassword(svgp, userToken.getToken());\n this._loginReader.setExpiry( svgp, userToken.getExpiry());\n \n \n boolean success = true;\n try {\n this._loginReader.commit();\n } catch (IOException ioEx) {\n this._logger.severe(\"Login File Error! Could not write login credentials.\");\n _logger.trace(null, ioEx);\n success = false;\n ++this._errorCount;\n }\n return success;\n \n }", "public static String readString() {\n BufferedReader br\n = new BufferedReader(new InputStreamReader(System.in), 1);\n\n // Declare and initialize the string\n String string = \" \";\n\n // Get the string from the keyboard\n try {\n string = br.readLine();\n\n } catch (IOException ex) {\n System.out.println(ex);\n }\n\n // Return the string obtained from the keyboard\n return string;\n }", "private String getPasswordFromUser() {\n JPasswordField passField = new JPasswordField(10);\n int action = JOptionPane.showConfirmDialog(null, passField, \"Please enter your password:\", JOptionPane.OK_CANCEL_OPTION);\n\n if (action < 0) {\n System.exit(0);\n }\n\n __logger.info(\"Got password from user\");\n\n return new String(passField.getPassword());\n }", "public static void main(String[] args) throws Exception {\n DataInputStream br = new DataInputStream(System.in);\n System.out.println(\"Enter the Name\");\n String str = br.readLine();\n System.out.println(\"Str value:\" + str);\n }", "@When(\"user enter the username and password\")\n\tpublic void user_enter_the_username_and_password() {\n\t\tSystem.out.println(\"user enter the username and password\");\n\t\tdriver.findElement(By.id(\"txtUsername\")).sendKeys(\"Admin\");\n\t\tdriver.findElement(By.id(\"txtPassword\")).sendKeys(\"admin123\");\n\t \n\t}", "public String getUserInput(String userMessage) {\n\t\tSystem.out.println(userMessage);\n\t\treturn sc.nextLine();\n\t}", "String getUsersInput(String outForUser) throws IOException;", "public void enterPassword()\n {\n Scanner stdIn = new Scanner(System.in);\n \n System.out.println(\"Please enter password to continue: \");\n password = stdIn.next();\n if (password.equals(\"abcde\"))\n {\n isAdmin = true;\n System.out.println(\"Admin level access granted.\");\n }\n else\n {\n System.out.println(\"Regular level access granted.\");\n }\n }", "public static String readLine(String message){\n Scanner in = new Scanner(System.in);\n System.out.print(message);\n return in.nextLine();\n }", "protected void parseCommandLineArgs(String[] args) {\r\n // parse username/password;\r\n for(int i = 0; i < args.length; i++) {\r\n if(args[i].equals(\"-u\")) {\r\n username = args[i+1];\r\n }\r\n if(args[i].equals(\"-p\")) {\r\n password = args[i+1];\r\n }\r\n }\r\n \r\n }", "private void consoleWelcome()\n {\n welcomePartOne();\n\n Scanner reader = new Scanner(System.in);\n String playerName = reader.nextLine();\n player.playerName = playerName;\n \n welcomePartTwo();\n }", "String getUser();", "String getUser();", "public static void main(String[] args){\n\t\tString user_id=\"Server\";\n\t\tString host = \"\", password=\"\";\n\t\tint port = 0; //The port number\n\t\ttry{\n\t\t\tpassword = args[0];\n\t\t}\n\t\tcatch(ArrayIndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(\"ERROR: No password provided for logging onto server console, connection aborted\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\ttry{\n\t\t\thost = args[1];\n\t\t}\n\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\thost = \"localhost\";\n\t\t}\n\t\ttry{\n\t\t\tport = Integer.parseInt(args[2]);\n\t\t}catch (ArrayIndexOutOfBoundsException e){\n\t\t\tport = DEFAULT_PORT;\n\t\t}\n\t\tServerConsole serv= new ServerConsole(user_id, host, password, port);\n\t\tserv.accept(); //Wait for console data\n\t}", "public void accept() {\n try {\n BufferedReader fromConsole = new BufferedReader(new InputStreamReader(System.in));\n String message;\n\n // loops infinitely, until #quit command is called, which sets run = false, and\n // stops the loop\n while (run) {\n message = fromConsole.readLine();\n if (message != null) {\n if (message.charAt(0) == '#') {\n command(message.substring(1));\n } else {\n client.handleMessageFromClientUI(message);\n }\n } else {\n client.handleMessageFromClientUI(message);\n }\n }\n }\n\n // Exceptions where the reader encounters an error\n catch (Exception ex) {\n System.out.println(\"Unexpected error while reading from console!\");\n System.out.println(ex.getMessage());\n }\n }", "static <T> T promptUser(BufferedReader console, List<T> options, Function<T, String> optionToString) {\n Map<Integer, T> intToOptionMap = toMapForUserSelection(options);\n\n intToOptionMap.forEach((integer, option) ->\n System.out.println(\"\\t\" + integer + \") \" + optionToString.apply(option))\n );\n\n return promptUserForSelection(console, intToOptionMap, optionToString);\n }", "public String getUserInput(String prompt) {\n Scanner scanner = new Scanner(System.in);\n\n // prompt for the user's name\n System.out.print(prompt);\n\n // get their input as a String\n String userInput = scanner.next();\n\n return userInput;\n }", "public String getInputAuth()\n\t{\n\t\treturn inputAuth;\n\t}", "public static void main(String[] args) {\r\n\r\n Scanner scan =new Scanner(System.in);\r\n System.out.println(\"User Name:\");\r\n String userName = scan.next();\r\n System.out.println(\"Password:\");\r\n String password = scan.next();\r\n\r\n if (userName.equalsIgnoreCase(\"user123\") && password.equalsIgnoreCase(\"pass123\") ) {\r\n System.out.println(\"Login Succesfull\");\r\n } else if (! userName.equalsIgnoreCase(\"user123\") && password.equalsIgnoreCase(\"pass123\") ) {\r\n System.out.println(\"Username is not Correct\");\r\n } else if (userName.equalsIgnoreCase(\"user123\") && ! password.equalsIgnoreCase(\"pass123\")) {\r\n System.out.println(\"Password is not Correct\");\r\n } else if (! userName.equalsIgnoreCase(\"user123\") && ! password.equalsIgnoreCase(\"pass123\") ) {\r\n System.out.println(\"User name and Password is not correct\");\r\n }\r\n\r\n }", "private void interactive() {\r\n\t\tBufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));\r\n\t\t\r\n\t\twhile (true) {\r\n\t\t\tSystem.out.print(\"Enter Command: \");\r\n\t\t\ttry {\r\n\t\t\t\tprocessCommandSet(tokenizeInput(keyboard.readLine()));\r\n\t\t\t\tif (quit == true) {\r\n\t\t\t\t\tSystem.out.println(\"Terminated at users request.\");\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tSystem.err.println(\"An IO Error Occured. \" + e.getMessage());\r\n\t\t\t\tSystem.exit(1);\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "public void readInput()\n\t{\n\t\t//wrap input stream read input from user\n\t\tBufferedReader in = new BufferedReader( new InputStreamReader( System.in ));\n\t\t\n\t\t//prompt user for input\n\t\tSystem.out.println( \"Please enter a letter or type Quit to end.\");\n\t\t\n\t\ttry{\n\t\t\tString userGuess = in.readLine();\n\t\t\t\n\t\t\t//loop until the user types \"Quit\"\n\t\t\tdo{\n\t\t\t\t//invoke guessletter function with String input\n\t\t\t\thangmanGame.guessLetter(userGuess);\n\t\t\t\t//update currentGuessText\n\t\t\t\tcurrentGuessText = hangmanGame.getCurrentGuess();\n\t\t\t\t//trace out current guess\n\t\t\t\tSystem.out.println(\"Your current guess is: \" + currentGuessText);\n\t\t\t\t//update remainingStrikes\n\t\t\t\thangmanGame.numberOfRemainingStrikes();\n\t\t\t\t//trace out remaining number of strikes\n\t\t\t\tSystem.out.println(\"You currently have \" + hangmanGame);\n\t\t\t\t//invoke revealAnswer function to check over gameOver, gameWon, and getAnswer\n\t\t\t\trevealAnswer();\n\t\t\t}while ( userGuess != \"Quit\" );\n\t\t}\n\t\t//catch IOException ioe\n\t\tcatch (IOException ioe)\n\t\t{\n\t\t\t//tell exception to print its error log\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "public static String getString() {\n return consoleScanner.nextLine();\n }", "public void showPasswordPrompt();", "public String getUserPassword(String username){\n\t\tFile userData = new File(\"Settings//\" + username + \".yml\");\n\t\tString password = null;\n\n\t\t// Checks the username.\n\t\tif(checkUsername(username)){\n\t\t\ttry{\n\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(userData));\n\t\t\t\twhile((password = reader.readLine()) != null){\n\t\t\t\t\tString[] parts = password.split(\"Password: \");\n\t\t\t\t\treturn parts[1];\n\t\t\t\t}\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tPrompt p = new LogInPrompt();\n\t\twhile(true) {\n\t\t\tp = p.run();\n\t\t}\n\t\t\n\n\t}", "public static void printUsername() {\n\t\tSystem.out.println(\"Enter the username\");\n\t\tString username = Utility.SCANNER.nextLine();\n\t\tint length = username.length();\n\t\tif(length > 3) {\n\t\t\tSystem.out.println(\"Hello \"+username+\", How are you?\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Invalid username\");\n\t\t}\n\t}", "public Object credentials() {\n return cred;\n }" ]
[ "0.7480416", "0.6920534", "0.67268085", "0.64263856", "0.64242387", "0.6331518", "0.6306094", "0.6220436", "0.62189066", "0.61678517", "0.60184675", "0.5987536", "0.5953104", "0.59443563", "0.5872774", "0.58719665", "0.5855071", "0.5831127", "0.5825629", "0.58047", "0.58019567", "0.57927126", "0.5790239", "0.5713207", "0.5710325", "0.5662978", "0.5621806", "0.5583058", "0.5579517", "0.55557865", "0.5543136", "0.5530697", "0.5498117", "0.54931355", "0.54867715", "0.54703146", "0.5465555", "0.54307", "0.54288906", "0.54182535", "0.5410583", "0.5399409", "0.5398295", "0.53634185", "0.5362556", "0.536199", "0.53483766", "0.53443563", "0.5315551", "0.5315272", "0.5302988", "0.52926147", "0.528989", "0.52880657", "0.5283211", "0.528014", "0.5278606", "0.5267877", "0.5265826", "0.5263211", "0.52605236", "0.5257935", "0.5253351", "0.52514416", "0.5246721", "0.5246242", "0.52431893", "0.52371037", "0.52357215", "0.5229211", "0.52238464", "0.5214036", "0.5199627", "0.51922303", "0.51920587", "0.5191301", "0.51759475", "0.517226", "0.5168988", "0.5163697", "0.5160205", "0.51564664", "0.5149856", "0.5148897", "0.5146784", "0.5146784", "0.51429826", "0.513448", "0.5125456", "0.51090086", "0.51049286", "0.5103085", "0.50988936", "0.50922257", "0.5080854", "0.5072477", "0.5072352", "0.50708973", "0.50662", "0.5063025" ]
0.6145905
10
/ JADX INFO: super call moved to the top of the method (can break code semantics)
public C0427g(ActionMenuPresenter actionMenuPresenter, Context context, SubMenuBuilder subMenuBuilder, View view) { super(context, subMenuBuilder, view, false, C0188b.actionOverflowMenuStyle); this.f1880a = actionMenuPresenter; if (!((MenuItemImpl) subMenuBuilder.getItem()).mo3644f()) { mo3696a(actionMenuPresenter.f1297g == null ? (View) actionMenuPresenter.f1158f : actionMenuPresenter.f1297g); } mo3695a((C0287ad) actionMenuPresenter.f1301k); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_6349() {\r\n super.method_6349();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void method_6191() {\r\n super.method_6191();\r\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tprotected void parentMethod() {\n\t\tsuper.parentMethod();\r\n\t\tSystem.out.println(\"ChildParentMethod\");\r\n\t}", "@Override\n protected void prot() {\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}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "@Override\n\tpublic void inorder() {\n\n\t}", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void dosomething2() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public void c(int paramInt)\r\n/* 101: */ {\r\n/* 102:122 */ this.b = false;\r\n/* 103:123 */ super.c(paramInt);\r\n/* 104: */ }", "public int b()\r\n/* 45: */ {\r\n/* 46: 58 */ g();\r\n/* 47: */ \r\n/* 48: 60 */ return super.b();\r\n/* 49: */ }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public void avvia() {\n /** invoca il metodo sovrascritto della superclasse */\n super.avvia();\n }", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "@Override\n protected void init() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void some() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void aaa() {\n\t\t\n\t}", "@Override\n public void b() {\n }", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "@Override\r\n public void salir() {\n }", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void preorder() {\n\n\t}", "private stendhal() {\n\t}", "public void doSomething() {\n Outer.this.doSomething();\r\n // this stops the pretty printer and gives an\r\n //parser exception (stumbling over the .super)\r\n Outer.super.doSomething();\r\n }", "@Override\n\tpublic void deneme() {\n\t\tsuper.deneme();\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 public void preRun() {\n super.preRun();\n }", "public abstract void mo70713b();", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void laught() {\n\r\n\t}", "@Override\n\tpublic void imprimir() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }", "protected void h() {}", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "public void method_4270() {}", "@Override\n\tvoid methodabstract() {\n\t\t\n\t}", "@Override\n\tpublic void call() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */ }", "@Override\n protected void initialize() \n {\n \n }", "public void callP(){\n super.walks(\"called parent method\");\n }", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "void berechneFlaeche() {\n\t}", "@Override\n protected void initialize() {\n\n \n }" ]
[ "0.7415613", "0.7120584", "0.7120584", "0.7120584", "0.7115633", "0.7021964", "0.70066243", "0.69595224", "0.69353765", "0.6829287", "0.67893225", "0.6759937", "0.67265797", "0.67265797", "0.6679903", "0.6670363", "0.663704", "0.6628391", "0.66199106", "0.66052747", "0.66026646", "0.65834254", "0.6582931", "0.6549346", "0.6543951", "0.65221083", "0.65028423", "0.6442561", "0.64190274", "0.6415215", "0.64025867", "0.6398819", "0.638731", "0.63802576", "0.6371258", "0.6366046", "0.6360983", "0.63534445", "0.63514674", "0.63360137", "0.63198143", "0.6306174", "0.6306174", "0.62950855", "0.62947446", "0.62947446", "0.62862927", "0.627368", "0.6263295", "0.6240417", "0.6223524", "0.6219667", "0.62033784", "0.6197884", "0.61771005", "0.6173512", "0.617154", "0.6169032", "0.6161301", "0.61314225", "0.6126743", "0.61226696", "0.61029947", "0.6093163", "0.60920775", "0.6088013", "0.6085264", "0.6061341", "0.6061193", "0.60565907", "0.60446894", "0.60439605", "0.604038", "0.6035913", "0.6033589", "0.6033589", "0.6033589", "0.6033589", "0.6033589", "0.6033589", "0.6032347", "0.6030273", "0.60258895", "0.60248667", "0.60247487", "0.6018299", "0.60147977", "0.6011838", "0.6008503", "0.60010195", "0.59988743", "0.59958285", "0.59946334", "0.59912", "0.5990213", "0.5981709", "0.59721726", "0.5970671", "0.5966747", "0.59661925", "0.59624594" ]
0.0
-1
/ access modifiers changed from: protected / renamed from: f
public final void mo3704f() { this.f1880a.f1299i = null; this.f1880a.f1302l = 0; super.mo3704f(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int f() {\n return 0;\n }", "public void func_70305_f() {}", "public void f() {\n }", "@Override\n\tpublic void f2() {\n\t\t\n\t}", "public void f() {\n }", "@Override\n\tpublic void f1() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public static Forca get_f(){\n\t\treturn f;\n\t}", "public amj p()\r\n/* 543: */ {\r\n/* 544:583 */ return this.f;\r\n/* 545: */ }", "public abstract int mo123247f();", "public byte f()\r\n/* 89: */ {\r\n/* 90:90 */ return this.f;\r\n/* 91: */ }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public int getf(){\r\n return f;\r\n}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tprotected void doF1() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF3() {\n\t\t\r\n\t}", "public void furyo ()\t{\n }", "@Override\r\n\tprotected void doF2() {\n\t\t\r\n\t}", "void f1() {\r\n\t}", "protected FanisamBato(){\n\t}", "public void f() {\n this.f25459e.J();\n }", "protected void h() {}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public FI_() {\n }", "public static void feec() {\n\t}", "static void feladat4() {\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "void berechneFlaeche() {\n\t}", "public abstract void afvuren();", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "static void feladat9() {\n\t}", "public abstract long f();", "public abstract int mo9741f();", "public void f() {\n Message q_ = q_();\n e.c().a(new f(255, a(q_.toByteArray())), getClass().getSimpleName(), i().a(), q_);\n }", "@Override\n\tpublic void af(String t) {\n\n\t}", "public void mo1963f() throws cf {\r\n }", "@Override\n\tpublic void realFun() {\n\n\t}", "public int getF() {\n\t\treturn f;\n\t}", "static void feladat5() {\n\t}", "public abstract void mo70713b();", "static void feladat7() {\n\t}", "static void feladat3() {\n\t}", "private void m50367F() {\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract File mo41088k();", "public abstract File mo41087j();", "protected Context f() {\n return this.a;\n }", "static void feladat6() {\n\t}", "public abstract void mo27386d();", "protected float l()\r\n/* 72: */ {\r\n/* 73: 84 */ return 0.0F;\r\n/* 74: */ }", "protected abstract boolean invokable(FileObjectView f);", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public abstract int f(int i2);", "FunctionCall getFc();", "public float d()\r\n/* 15: */ {\r\n/* 16:163 */ return this.b;\r\n/* 17: */ }", "@Override\n\tpublic void visitTlfold(Tlfold p) {\n\n\t}", "public void f() {\n if (this instanceof b) {\n b bVar = (b) this;\n Message q_ = bVar.q_();\n e.c().a(new f(bVar.b(), q_.toByteArray()), getClass().getSimpleName(), i().a(), q_);\n return;\n }\n f a2 = a();\n if (a2 != null) {\n e.c().a(a2, getClass().getSimpleName(), i().a(), (Message) null);\n }\n }", "public abstract void mo56925d();", "public f206(String name) {\n super(name);\n }", "public void mo1406f() {\n }", "public abstract Object mo26777y();", "void mo21075f();", "private final void i() {\n }", "protected float m()\r\n/* 234: */ {\r\n/* 235:247 */ return 0.03F;\r\n/* 236: */ }", "@SuppressWarnings(\"UnusedReturnValue\")\n @Override\n public T setField (T f) {\n T temp = mField;\n mField = f;\n return temp;\n }", "public abstract String mo41079d();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "@Override\n public void visitFunction(Function function) {\n }", "private FileUtil() {\n \t\tsuper();\n \t}", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "@Override\n\tpublic void visit(Function arg0) {\n\t\t\n\t}", "@Override\n protected void prot() {\n }", "public double getF();", "abstract int pregnancy();", "void f2() {\n\t\tSystem.out.println(\"I am from F2 instance method \\n\");\n\t}", "public interface b {\n boolean f(@NonNull File file);\n }", "void f1() {\n\t\tSystem.out.println(\"I am from F1 instance method \\n\");\n\t}", "protected float method_4216() {\r\n return 5.0F;\r\n }", "static void feladat10() {\n\t}", "public abstract void mo35054b();", "public Fun_yet_extremely_useless()\n {\n\n }", "private AccessPath(jq_Field f, Node n) {\n this(f, n, false);\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public abstract String mo13682d();", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void d(Float f) {\n ((b.b) this.b).d(f);\n }", "@Override\n public void b() {\n }", "public abstract void mo27385c();", "public abstract void mo45765b();", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic int af() {\n\t\t\t\tSystem.out.println(\"dsdfdghbd\");\n\t\t\t\treturn 0;\n\t\t\t}", "public abstract void mo30696a();", "public abstract int mo64140f();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@SuppressWarnings(\"UnusedReturnValue\")\n @Override\n public T setField(T f) {\n T temp = mField;\n mField = f;\n return temp;\n }" ]
[ "0.7040651", "0.7008456", "0.6792211", "0.67549175", "0.67102903", "0.6698818", "0.6646162", "0.64389443", "0.64376885", "0.6401276", "0.6369037", "0.636646", "0.63621724", "0.6261833", "0.62221426", "0.6207028", "0.6141817", "0.61387", "0.6136349", "0.6122624", "0.6071489", "0.605765", "0.604942", "0.6039966", "0.6039966", "0.60387415", "0.6031253", "0.6014255", "0.6012772", "0.60074365", "0.599361", "0.5981565", "0.5954289", "0.5935942", "0.59209585", "0.59166133", "0.59143746", "0.5910343", "0.59062105", "0.5902152", "0.58906525", "0.5877594", "0.58526665", "0.58514494", "0.58486134", "0.58335143", "0.58111495", "0.5810501", "0.5806269", "0.5797354", "0.5796636", "0.57935417", "0.5782764", "0.577224", "0.5766998", "0.57666487", "0.57610023", "0.5759729", "0.5758679", "0.5758008", "0.57340693", "0.572101", "0.5718297", "0.5705365", "0.5704026", "0.5691277", "0.568519", "0.5675471", "0.56746566", "0.56672555", "0.56649", "0.56615174", "0.5659457", "0.5643053", "0.563694", "0.5629762", "0.56245494", "0.5619011", "0.5613324", "0.56130666", "0.5603417", "0.5592342", "0.55881584", "0.55860674", "0.55858344", "0.55851597", "0.558434", "0.5582123", "0.55812365", "0.5580977", "0.55766255", "0.5570817", "0.5568701", "0.55675054", "0.55667317", "0.55667317", "0.5565355", "0.5565289", "0.5559746", "0.55592567", "0.5555522" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { int[] a = { -2, -3, 4, -1, -2, 1, 5, -3 }; int size = a.length; int max_so_far = Integer.MIN_VALUE, max_ending_here=0; for (int i = 0; i < size; i++) { max_ending_here = max_ending_here + a[i]; if (max_so_far < max_ending_here) max_so_far = max_ending_here; if (max_ending_here < 0) max_ending_here = 0; } // System.out.println(max_so_far); int product=1,max=0; for (int i = 0; i < size; i++) { product=product*a[i]; if(product>max) max=product; if (product < 0) product = 1; } // System.out.println(max); Arrays.sort(a); int i=0,j=a.length-1; while(i<a.length &&j<a.length) { if(a[i]+a[j]==3) { System.out.println(a[i]+" "+a[j]); i++;j--; } else if(a[i]+a[j]>3) j--; else if(a[i]+a[j]<3) i++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Created by rajeevkumarsingh on 20/11/17.
@Repository public interface EmpresaRepository extends JpaRepository<Empresa, Long> { Optional<Empresa> findById(Long pollId); Page<Poll> findByCreatedBy(Long userId, Pageable pageable); @Query("select e from Empresa e where ( :nome is null or lower(e.user.name) like lower(concat('%', :nome,'%')) ) and ( :categoriaEmpresa is null or e.categoriaEmpresa = :categoriaEmpresa) ") Page<Empresa> getEmpresasByFilters(@Param("nome")String nome, @Param("categoriaEmpresa")CategoriaEmpresa categoriaEmpresa, Pageable pageable); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\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}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\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\tpublic void anular() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n public void func_104112_b() {\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\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void init() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n public void init() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "@Override\n public void init() {\n\n }", "@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\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n protected void getExras() {\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\tprotected void initialize() {\n\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n public void memoria() {\n \n }", "private void kk12() {\n\n\t}", "private void strin() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n protected void init() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void init() {}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private Rekenhulp()\n\t{\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\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void init() {\n\n\n\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void init() {\n\t}", "public Pitonyak_09_02() {\r\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n public void initialize() {\n \n }", "Petunia() {\r\n\t\t}" ]
[ "0.61765426", "0.6085742", "0.5933022", "0.5889248", "0.5884049", "0.5846317", "0.5846317", "0.582421", "0.58165747", "0.5811808", "0.5786678", "0.5777615", "0.57759804", "0.5765482", "0.5742408", "0.5742323", "0.57388145", "0.5714042", "0.57102644", "0.570105", "0.5691038", "0.5685281", "0.5682704", "0.5682704", "0.56799376", "0.5677085", "0.566613", "0.5655006", "0.5621947", "0.5617324", "0.5617324", "0.5617324", "0.5617324", "0.5617324", "0.56160635", "0.5613062", "0.560894", "0.5586288", "0.55721784", "0.5570706", "0.5570706", "0.5570706", "0.5570706", "0.5570706", "0.5570706", "0.5564658", "0.5556748", "0.5556748", "0.5556332", "0.5556332", "0.55499136", "0.55492777", "0.55492777", "0.55492777", "0.5548487", "0.5544677", "0.5544677", "0.5544677", "0.5544677", "0.5544677", "0.5544677", "0.5544677", "0.55437326", "0.55437326", "0.55437326", "0.5526952", "0.5526835", "0.55248636", "0.55248636", "0.55248636", "0.55218786", "0.5516708", "0.55032635", "0.5502631", "0.550038", "0.54857993", "0.5483032", "0.54770374", "0.54732925", "0.546612", "0.5464654", "0.54515207", "0.54510784", "0.5449427", "0.5446515", "0.54406327", "0.5440265", "0.5440265", "0.54304785", "0.54286957", "0.54266936", "0.5423217", "0.5416279", "0.5409621", "0.54059416", "0.5402039", "0.5399844", "0.53850603", "0.53848135", "0.5381519", "0.53760767" ]
0.0
-1
Constructeur permettant de construire une routeInfo avec la destination et le nombre de saut necessaire
public RouteInfo(AddressI destination, int numberOfHops) { super(); this.destination = destination; this.numberOfHops = numberOfHops; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Destination createDestination(String originCode, TopRoute route) {\n\t\tString countryCode = cityService.getCountry(originCode);\n\t\tFlight flight = flightService.cheapestFlightReader(countryCode, route.getFrom(), route.getTo());\n\t\tDestination destination = new Destination(route.getTo(), flight);\n\t\treturn destination;\n\t}", "public Route() {\n }", "String createRoute(RouteBean route);", "String getRouteDest();", "String viewRouteDetails(String source, String destination);", "public StaticRoute(int objectID, String name) {\n super(objectID, name);\n }", "public Teleporter(Location location)\r\n\t{ this.destination = location; }", "public Destination() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "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 }", "ShipmentRouteSegment createShipmentRouteSegment();", "TradeRoute(String aStartPoint, String anEndPoint, int anId){\n startPoint = aStartPoint;\n endPoint = anEndPoint;\n id = anId;\n }", "Route(String source,String destination,String departingDate,String returningDate)\r\n {\r\n this.Source=source;\r\n this.destination=destination;\r\n this.departingDate=departingDate;\r\n this.returningDate=returningDate;\r\n }", "public Builder setRouteDest(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000100;\n routeDest_ = value;\n onChanged();\n return this;\n }", "public void buildDestinationsFromIntent() {\n Intent intent = getIntent();\n ArrayList<String> listOfDestNames = intent.getStringArrayListExtra(\"dName\");\n double[] listOfDestLong = intent.getDoubleArrayExtra(\"dLong\");\n double[] listOfDestLat = intent.getDoubleArrayExtra(\"dLat\");\n ArrayList <String> listOfDestAddr = intent.getStringArrayListExtra(\"dAddr\");\n\n for(int i=0; i < listOfDestNames.size(); i++){\n Destination des = new Destination(listOfDestNames.get(i), listOfDestLong[i], listOfDestLat[i]);\n des.address = listOfDestAddr.get(i);\n destinations.add(i, des);\n }\n }", "public RoutingC2A()\r\n\t{\r\n\t\tsuper();\r\n\t}", "public RoutePacket() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "public Routing(char local_name, NeighbourList neig, int period, \n int min_interval, String areas, String multi_addr, int multi_port,\n Router win, DatagramSocket ds, JTable tableObj) {\n this.local_name= local_name;\n this.areas= \"0\"; // this.areas= areas;\n if ((areas == null) || (areas.length()<1)) {\n Log2(\"Invalid areas in routing constructor\");\n this.rprocesses= null;\n } else {\n this.rprocesses= new HashMap<>();\n \n // Incomplete - This version ignores the areas introduced in the GUI \n // Plase modify to support multiple areas, if you have time !\n \n Log(\"routing class only supports one area for now!\\n\\tUsing only area 0\\n\");\n this.rprocesses.put('0', \n new RoutingProcess(this, win, neig, '0', period, min_interval)); \n }\n \n this.neig= neig;\n this.local_TTL= period+TTL_ADD;\n this.win= win;\n this.ds= ds;\n this.tableObj= tableObj;\n // Initialize everything\n this.mdaemon= new MulticastDaemon(ds, multi_addr, multi_port, win, this);\n this.main_rtab= null;\n Log2(\"new Routing(local='\"+local_name+\"', period=\"+period+\n \", min_interval=\"+min_interval+\")\");\n }", "public RouteDescriptor(String id, String name, IntentFilter controlFilter) {\n mBundle = new Bundle();\n setId(id);\n setName(name);\n setControlFilter(controlFilter);\n }", "public OptInfo createInitialRoutes() {\t\n\t\t//OptInfo has old and new attributes\n\t\tOptInfo info = new OptInfo();\n\t\tTSPDepot currDepot = null; //current depot\n\t\tTSPShipment currShip = null; //current shipment\n\t\t//int countLoop=0;\n\n\t\t//check if selection and insertion type methods have been selected\n\t\tif (ProblemInfo.selectShipType == null) {\n\t\t\tSettings.printDebug(Settings.ERROR,\n\t\t\t\t\t\"No selection shipment type has been assigned\");\n\n\t\t}\n\t\tif (ProblemInfo.insertShipType == null) {\n\t\t\tSettings.printDebug(Settings.ERROR,\n\t\t\t\t\t\"No insertion shipment type has been assigned\");\n\t\t}\n\n\t\t//capture the old attributes\n\t\tinfo.setOldAttributes(mainDepots.getAttributes());\n\t\twhile (!mainShipments.isAllShipsAssigned()) {\n\n\n\t\t\tcurrDepot = (TSPDepot) mainDepots.getTSPHead();\n\t\t\t//Send the entire mainDepots and mainShipments to get the next shipment\n\t\t\t//to be inserted including the current depot\n\t\t\tTSPShipment theShipment = mainShipments.getNextInsertShipment(mainDepots,\n\t\t\t\t\tcurrDepot, mainShipments, currShip);\n\t\t\tif (theShipment == null) { //shipment is null, print error message\n\t\t\t\tSettings.printDebug(Settings.COMMENT, \"No shipment was selected\");\n\t\t\t}\n\t\t\t//The selected shipment will be inserted into the route\n\t\t\tif (!mainDepots.insertShipment(theShipment)) {\n\t\t\t\tSettings.printDebug(Settings.COMMENT, \"The Shipment: <\" + theShipment.getIndex() +\n\t\t\t\t\t\t\"> cannot be routed\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//Settings.printDebug(Settings.COMMENT,\n\t\t\t\t//\t\t\"The Shipment: <\" + theShipment.getIndex() +// \" \" + theShipment +\n\t\t\t\t//\t\t\"> was routed\");\n\t\t\t\t//tag the shipment as being routed\n\t\t\t\ttheShipment.setIsAssigned(true);\n\t\t\t}\n\t\t}\n\t\tProblemInfo.depotLLLevelCostF.calculateTotalsStats(mainDepots);\n\t\tinfo.setNewAtributes(mainDepots.getAttributes());\n\t\treturn info;\n\t}", "public Route(Route r){\n\t\tvisits.addAll(r.visits);\n\t\tarrivalTimes.addAll(r.arrivalTimes);\n\t\tdepartureTimes.addAll(r.departureTimes);\n\t\tlocked.addAll(r.locked);\n\t\tspeed = r.speed;\n\t}", "public Builder setRoute(com.google.cloud.networkmanagement.v1beta1.RouteInfo value) {\n if (routeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n stepInfo_ = value;\n onChanged();\n } else {\n routeBuilder_.setMessage(value);\n }\n stepInfoCase_ = 7;\n return this;\n }", "void newRoutePoint(RoutePointDTO routePointDTO, RouteDTO routeDTO, List<RoutePointDTO> points);", "public Route(Point starting) {\n route = new ArrayList<>();\n route.add(starting);\n }", "public RouteFragment() {\n }", "public ShareRouteParm() {\n\t\t\tname = \"\";\n\t\t\tstart = \"\";\n\t\t\tend = \"\";\n\t\t\troutePoint = \"\";\n\t\t\tavoidPoint = \"\";\n\t\t\tconditionCode = -1;\n\t\t\taviodCondition = -1;\n\t\t\tforbidCondition = -1;\n\t\t\ttarget = -1;\n\t\t\tmapVer = \"\";\n\t\t}", "public Route2 ()\n {\n super (\"Route 2\");\n shifts [1] = -11*32;\n bLevel = 5;\n hLevel = 9;\n \n eventArray[21][39] = new Teleport();\n eventArray[21][39].setCoord(4, 2, 12, 21);\n \n eventArray[23][6] = new Sign();\n eventArray[23][6].addText(\"BEWARE OF SIGNS - They are dangerous. \");\n eventArray[16][24] = new DumbNPC(9, 0);\n eventArray[16][24].addText(\"I used to be a banker but I lost interest.\");\n eventArray[15][22] = new Sign();\n eventArray[15][22].addText(\"Beware of Old-Man\");\n eventArray[12][30] = new DumbNPC(1, 2);\n eventArray[12][30].addText(\"Hi! I like shorts! They're comfy and easy to wear.\");\n \n grassPokemon = Arrays.asList(new String [] {\"Caterpie\", \"Sentret\", \"Swablu\", \"Shinx\", \"Minccino\", \"Deerling\"});\n waterPokemon = Arrays.asList(new String [] {\"Dratini\", \"Horsea\", \"Horsea\", \"Horsea\", \"Horsea\", \"Horsea\", \"Horsea\" });\n fishPokemon = Arrays.asList(new String [] {\"Manaphy\", \"Finneon\", \"Feebas\"});\n }", "public Route(String id, Station station1, Station station2, int length, Level level, Color color) {\n Preconditions.checkArgument(!station1.equals(station2));\n Preconditions.checkArgument(length >= MIN_ROUTE_LENGTH && length <= MAX_ROUTE_LENGTH);\n\n this.id = Objects.requireNonNull(id);\n this.station1 = Objects.requireNonNull(station1);\n this.station2 = Objects.requireNonNull(station2);\n this.level = Objects.requireNonNull(level);\n this.length = length;\n this.color = color;\n }", "public RouteDao() {\n super(Route.ROUTE, com.dator.jqtest.dao.model.tables.pojos.Route.class);\n }", "public RouteObject(\n NsiTopology topology,\n SimpleStp srcStpId,\n SimpleStp dstStpId,\n DirectionalityType directionality,\n Optional<StpListType> ero) throws WebApplicationException {\n\n // Each segment of the a path is assigned a route object with an A and Z end.\n Route route = new Route();\n\n // Get the set of possible source STP identifiers (a range could be provided).\n StpTypeBundle srcBundle = new StpTypeBundle(topology, srcStpId, directionality);\n if (srcBundle.isEmpty()) {\n log.error(\"RouteObject: source STP does not exist in topology: \" + srcStpId.toString());\n throw Exceptions.stpResolutionError(srcStpId.toString());\n }\n\n route.setBundleA(srcBundle);\n\n // Now we process any ERO elements if present.\n if (ero.isPresent()) {\n // We need to process the ERO in order that it was specified.\n List<OrderedStpType> orderedSTP = ero.get().getOrderedSTP();\n Collections.sort(orderedSTP, new CustomComparator());\n\n // Our first processed segment starts with our source STP.\n SimpleStp lastStp = srcStpId;\n\n for (OrderedStpType stp : orderedSTP) {\n // Parse this STP and generate a bundle enumerating all the STP. The\n // specified STP must exist in topology for a bundle to be generated.\n SimpleStp nextStp = new SimpleStp(stp.getStp());\n StpTypeBundle nextBundle = new StpTypeBundle(topology, nextStp, directionality);\n\n // If we did not find an associated bundle the specified ERO STP may\n // be an internal STP used for a domain's internal path computation.\n if (nextBundle.isEmpty()) {\n // The one rule we have is that an internal STP must be bounded by\n // at least one externally visible STP from the same domain. This\n // check is to see if the previous STP was in the same domain.\n //if (!nextStp.getNetworkId().equalsIgnoreCase(lastStp.getNetworkId())) {\n //log.error(\"RouteObject: Internal STP not bounded by external STP: \" + stp.getStp());\n //throw Exceptions.invalidEroError(stp.getStp());\n //}\n\n // Save this internal STP.\n route.addInternalStp(stp.getStp());\n }\n else {\n // We have an inter-domain STP so save it and get the SDP\n // so we know the STP on far end. We may need to filter some\n // of these out if there is no corresponding SDP (mismatching\n // labels on each end of the link).\n nextBundle = nextBundle.getPeerReducedBundle();\n if (nextBundle.isEmpty()) {\n log.error(\"RouteObject: ERO STP not associated with SDP: \" + stp.getStp());\n throw Exceptions.invalidEroError(stp.getStp());\n }\n\n // We have completed this path segment by finding a external\n // interdomain STP.\n route.setBundleZ(nextBundle);\n routes.add(route);\n\n // Now create the bundle associated with the other end of SDP.\n route = new Route();\n\n StpTypeBundle lastBundle = new StpTypeBundle();\n\n for (StpType member : nextBundle.values()) {\n SdpType sdp = topology.getSdp(member.getSdp().getId());\n if (sdp == null) {\n log.error(\"RouteObject: ERO STP not associated with valid SDP in context of request: \" + stp.getStp());\n throw Exceptions.invalidEroMember(stp.getStp());\n }\n if (member.getId().equalsIgnoreCase(sdp.getDemarcationA().getStp().getId())) {\n lastBundle.addStpType(topology.getStp(sdp.getDemarcationZ().getStp().getId()));\n }\n else {\n lastBundle.addStpType(topology.getStp(sdp.getDemarcationA().getStp().getId()));\n }\n }\n\n if (lastBundle.isEmpty()) {\n log.error(\"RouteObject: ERO STP not associated with SDP: \" + stp.getStp());\n throw Exceptions.invalidEroError(stp.getStp());\n }\n\n route.setBundleA(lastBundle);\n lastStp = lastBundle.getSimpleStp();\n }\n }\n }\n\n // Add the original destination endpoint after any inserted ERO points.\n StpTypeBundle dstBundle = new StpTypeBundle(topology, dstStpId, directionality);\n if (dstBundle.isEmpty()) {\n log.error(\"RouteObject: destination STP does not exist in topology: \" + dstStpId.toString());\n throw Exceptions.stpResolutionError(dstStpId.toString());\n }\n\n route.setBundleZ(dstBundle);\n\n // Add this last route to our list of one or more routes.\n routes.add(route);\n\n // We have completed building the ERO but need to check for internal\n // consistency.\n routes.forEach(r -> {\n StpTypeBundle bundleA = r.getBundleA();\n StpTypeBundle bundleZ = r.getBundleZ();\n SimpleStp stpA = bundleA.getSimpleStp();\n SimpleStp stpZ = bundleZ.getSimpleStp();\n\n String network = stpA.getNetworkId();\n for (OrderedStpType internalStp : r.getInternalStp()) {\n SimpleStp istp = new SimpleStp(internalStp.getStp());\n if (!istp.getNetworkId().equalsIgnoreCase(network)) {\n network = stpZ.getNetworkId();\n if (!istp.getNetworkId().equalsIgnoreCase(network)) {\n log.error(\"RouteObject: internal STP {} not a member of networkA {} or networkZ {}\",\n istp.getStpId(), stpA.getNetworkId(), stpZ.getNetworkId());\n throw Exceptions.invalidEroError(istp.getStpId());\n }\n }\n }\n });\n }", "public int addRoute(RouteEntry rtEntry);", "public RoutingCommandImpl() {\n }", "public RouteSegment(GeoPoint startPoint, GeoPoint endPoint,\r\n\t\t\tint maneuverType, int distance) {\r\n\t\tthis.startPoint = startPoint;\r\n\t\tthis.endPoint = endPoint;\r\n\t\tthis.maneuverType = maneuverType;\r\n\t\tthis.distance = distance;\r\n\t}", "public Route(Vektor anfang, Vektor ende){\n\t\tthis.setAnfang(anfang);\n\t\tthis.setEnde(ende);\n\t}", "public Road(Town source, Town destination, String name) {\r\n\t\tthis.source = source;\r\n\t\tthis.destination = destination;\r\n\t\tthis.vertices = new HashSet<Town>();\r\n\t\tvertices.add(source);\r\n\t\tvertices.add(destination);\r\n\t\t\r\n\t\tthis.name = name;\r\n\t}", "public static route createroute(routeparameter aRouteparameter) {\n Partitioner<Text> partitioner = aRouteparameter.getPartitioner();\n HashMap<Integer, Integer> hashBucketToPartition = aRouteparameter\n .getHashBucketToPartition();\n HashMap<Integer, Integer> rangeRouter = aRouteparameter.getRangeRouter();\n if (hashBucketToPartition == null) {\n if (rangeRouter == null) {\n return new HashRoute(partitioner);\n } else {\n return new RangeRoute(rangeRouter);\n }\n } else {\n return new BalancerHashRoute(partitioner, hashBucketToPartition);\n }\n }", "public Journey(String destination, String origin, Priority priority,\r\n\t\t\tfloat weightPrice, float volumePrice, ArrayList<Path> usedPaths, DayOfWeek dow) {\r\n\t\tthis.destination = destination;\r\n\t\tthis.origin = origin;\r\n\t\tthis.priority = priority;\r\n\t\tthis.weightPrice = weightPrice;\r\n\t\tthis.volumePrice = volumePrice;\r\n\t\tthis.usedPaths = usedPaths;\r\n\t\tthis.dow = dow;\r\n\t\tthis.isActive = true;\r\n\t\tthis.timesUsed = 0;\r\n\t\tthis.totalCost = 0;\r\n\t\tthis.totalPrice = 0;\r\n//\t\tthis.averageDeliveryTime = averageDeliveryTime;\r\n//\t\tthis.averagePrice = averagePrice;\r\n\t}", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.RouteInfoOrBuilder getRouteOrBuilder() {\n if ((stepInfoCase_ == 7) && (routeBuilder_ != null)) {\n return routeBuilder_.getMessageOrBuilder();\n } else {\n if (stepInfoCase_ == 7) {\n return (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance();\n }\n }", "void setDestination(Locations destination);", "@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 String getDestination(){\r\n\t\treturn route.getDestination();\r\n\t}", "Long addRoute(Route route);", "public Polyline createHelicopterRoute(Double originLat, Double originLong,\n Double destinationLat, Double destinationLong) {\n\n LatLong originLatLong = new LatLong(originLat, originLong);\n LatLong destinationLatLong = new LatLong(destinationLat, destinationLong);\n LatLong[] coordinatesList = new LatLong[]{originLatLong, destinationLatLong};\n\n MVCArray pointsOnMap = new MVCArray(coordinatesList);\n PolylineOptions polyOpts = new PolylineOptions().path(pointsOnMap)\n .strokeColor(\"blue\").strokeWeight(2);\n\n return new Polyline(polyOpts);\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.RouteInfoOrBuilder getRouteOrBuilder() {\n if (stepInfoCase_ == 7) {\n return (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance();\n }", "Route() \n\t{\n\t\tcost = 0;\n\t\tload = 0;\n\t\tcapacity = 50;\n\t\t// A new arraylist of nodes is created\n\t\tcustomers = new ArrayList<Customer>();\n\t}", "public Builder setRouteDestBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000100;\n routeDest_ = value;\n onChanged();\n return this;\n }", "io.envoyproxy.envoy.type.metadata.v3.MetadataKind.RouteOrBuilder getRouteOrBuilder();", "public Location(String name) {\n this.name = name;\n this.description = \"\";\n this.items = new ArrayList<Item>();\n this.playersNames = new ArrayList<String>();\n this.destinations = new HashMap<Direction, Location>();\n }", "public Router(String peerip, int routerid, int port, String configfile, int neighborupdate, int routeupdate)\n {\n // set argument instance variables\n ipAddress = peerip;\n routerID = routerid;\n routerPort = port;\n configFile = configfile;\n neighborUpdateFreq = neighborupdate;\n dijkstraFreq = routeupdate;\n \n }", "public Flight(String name, int number, String home, String away) \n {\n airlineName = name;\n flightNumber = number;\n origin = home;\n destination = away;\n \n }", "public Route getRoute();", "public RoutePacket(net.tinyos.message.Message msg, int base_offset, int data_length) {\n super(msg, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "Destination getDestination();", "private void generateRoute(String json) {\n try {\n JSONObject jsonObject = new JSONObject(json);\n JSONArray routes = jsonObject.optJSONArray(\"routes\");\n if (null == routes || routes.length() == 0) {\n return;\n }\n JSONObject route = routes.getJSONObject(0);\n // get route bounds\n JSONObject bounds = route.optJSONObject(\"bounds\");\n if (null != bounds && bounds.has(\"southwest\") && bounds.has(\"northeast\")) {\n JSONObject southwest = bounds.optJSONObject(\"southwest\");\n JSONObject northeast = bounds.optJSONObject(\"northeast\");\n assert southwest != null;\n LatLng sw = new LatLng(southwest.optDouble(\"lat\"), southwest.optDouble(\"lng\"));\n assert northeast != null;\n LatLng ne = new LatLng(northeast.optDouble(\"lat\"), northeast.optDouble(\"lng\"));\n mLatLngBounds = new LatLngBounds(sw, ne);\n }\n // get paths\n JSONArray paths = route.optJSONArray(\"paths\");\n assert paths != null;\n for (int i = 0; i < paths.length(); i++) {\n JSONObject path = paths.optJSONObject(i);\n List<LatLng> mPath = new ArrayList<>();\n JSONArray steps = path.optJSONArray(\"steps\");\n distanceText = path.getString(\"distanceText\");\n durationText = path.getString(\"durationText\");\n assert steps != null;\n for (int j = 0; j < steps.length(); j++) {\n JSONObject step = steps.optJSONObject(j);\n JSONArray polyline = step.optJSONArray(\"polyline\");\n assert polyline != null;\n for (int k = 0; k < polyline.length(); k++) {\n if (j > 0 && k == 0) {\n continue;\n }\n JSONObject line = polyline.getJSONObject(k);\n double lat = line.optDouble(\"lat\");\n double lng = line.optDouble(\"lng\");\n LatLng latLng = new LatLng(lat, lng);\n mPath.add(latLng);\n }\n }\n mPaths.add(i, mPath);\n }\n mHandler.sendEmptyMessage(ROUTE_PLANNING_SUCCESS);\n } catch (JSONException e) {\n }\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 DSRRoutingHeader(Address receiver, Location targetLocation, List route, boolean promisc,boolean protocoll) \n {\n super(null, null, true, false);\n validRoute= !(route == null||route.isEmpty()); \n if (route == null)\n route = new ArrayList();\n \n if (!route.contains(receiver) && receiver != null)\n route.add(receiver);\n \n setRoute \t(route);\n setTargetLocation \t(targetLocation);\n setPromiscousHeader( \ttrue);\n setPromiscousMessage(promisc);\n this. protocoll=protocoll;\n }", "private void getRoute(Point origin, Point destination){\n NavigationRoute.builder(this)\n .profile(DirectionsCriteria.PROFILE_WALKING) //Change Here for car navigation\n .accessToken(Mapbox.getAccessToken())\n .origin(origin)\n .destination(destination)\n .build()\n .getRoute(new Callback<DirectionsResponse>() {\n @Override\n public void onResponse(Call<DirectionsResponse> call, Response<DirectionsResponse> response) {\n if(response.body() == null)\n {\n Log.e(TAG, \"No routes found, check right user and access token\");\n return;\n }else if (response.body().routes().size() == 0){\n Log.e(TAG,\"No routes found\");\n return;\n }\n\n currentRoute = response.body().routes().get(0);\n\n if(navigationMapRoute != null){\n navigationMapRoute.removeRoute();\n }\n else{\n navigationMapRoute = new NavigationMapRoute(null,mapView,map);\n }\n navigationMapRoute.addRoute(currentRoute);\n }\n\n @Override\n public void onFailure(Call<DirectionsResponse> call, Throwable t) {\n Log.e(TAG, \"Error:\" + t.getMessage());\n }\n });\n }", "public Road(String name) {\n this.name = name;\n this.points = new ArrayList<>();\n }", "public static Destination createLocation(String[] _input){\n String name = _input[DATA_ARRAY_NAME];\n int zip = Integer.parseInt(_input[DATA_ARRAY_ZIP]);\n String airport = _input[DATA_ARRAY_AIRPORT];\n String cityCode = _input[DATA_ARRAY_CITY];\n String description = _input[DATA_ARRAY_DESCRIPTION];\n\n return new Destination(name, zip, airport, cityCode, description);\n }", "io.envoyproxy.envoy.type.metadata.v3.MetadataKind.Route getRoute();", "public Flight(String flightNumber, String airline, int passengerCapacity, String destination){\n this.flightNumber = flightNumber;\n this.airline = airline;\n this.passengerCapacity = passengerCapacity;\n this.destination = destination;\n passengerManifest = new ArrayList<Passenger>();\n\n }", "public RoutePacket(net.tinyos.message.Message msg, int base_offset) {\n super(msg, base_offset, DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "private Road()\n\t{\n\t\t\n\t}", "public interface RouteConfigurator {\n\n PSConnector setLocalIpAddress(String cidr);\n\n PSConnector setStaticRoute(String destCidr, String nextHopeIpAddress);\n\n void setTunnelStaticRoute(String siteId, String destCidr);\n\n PSConnector setTunnel(String tunnelId, String localIpAddress, String remoteIpAddress);\n\n void setSiteToTunnel(String siteId, String tunnelId);\n\n PSConnector setDefaultGateway(String ipAddress);\n\n Set<RouteEntry>getRouteEntrySet();\n\n\n\n}", "public static RouteFragment newInstance() {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n //fragment.setArguments(args);\n return fragment;\n }", "public interface BaseRouteConfig {\n\n String FRAGMENT_ID_TIP = \"fragment_id_tip\";\n String PAGE_PATH = \"page_path\";\n String BUNDLE_TIP = \"bundle_tip\";\n\n}", "public Transportation(String destination, String description) {\r\n\t\tthis.description = description;\r\n\t\tthis.destination = destination;\r\n\t\t\r\n\t}", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.RouteInfo getRoute() {\n if (stepInfoCase_ == 7) {\n return (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance();\n }", "public static String parseSingleRoute(ILogicEntityRoute r) {\n\n StringBuilder routeSB = new StringBuilder();\n\n // Add the ResourceDepotReport\n Optional<IResourceDepot> startDepotOpt = r.getCurrentVisitingResource().getResourceDepot();\n\n if (startDepotOpt.isPresent()) {\n routeSB.append(\n \"\\n------- ResourceDepot Report (\" + r.getCurrentVisitingResource().getId() + \")-------\");\n IResourceDepot depot = startDepotOpt.get();\n routeSB.append(\"\\nSTART:\");\n routeSB.append(\"\\n---\");\n routeSB.append(\"\\n\" + PNDReportExtractionExample.parseResourceDepot(depot));\n\n Optional<IResourceDepot> stopDepotOpt = r.getJoinedDetailController().getCurResourceDepot();\n if (stopDepotOpt.isPresent()) {\n IResourceDepot stopDepot = stopDepotOpt.get();\n\n routeSB.append(\"\\n\\nTERMINATION:\");\n routeSB.append(\"\\n---\");\n routeSB.append(\"\\n\" + PNDReportExtractionExample.parseResourceDepot(stopDepot));\n }\n routeSB.append(\"\\n------- ResourceDepot Report END -------\");\n }\n\n // Now add the NodeDepotReports\n List<ILogicRouteElementDetailItem> details =\n r.getRouteElementsDetailController().getAsSortedListByArrival();\n\n details.stream().map(PNDReportExtractionExample::parseNodeDetail).forEach(routeSB::append);\n\n return routeSB.toString();\n }", "private DirectionsResult getDirectionsDetails(String origin,String destination,TravelMode mode) {\n DateTime now = new DateTime();\n try {\n //Here we request the route from the Directions API. GeoContext is just a verifier for DirectionsAPI\n //so it doesn't take some random requests. It knows this API is trying to access the API and will return the route\n return DirectionsApi.newRequest(getGeoContext())\n //Pass in the MODE, origin, destination, and time. Time is set to right now based on the the line of code above\n .mode(mode)\n .origin(origin)\n .destination(destination)\n .departureTime(now)\n .await();\n } catch (ApiException e) {\n e.printStackTrace();\n return null;\n } catch (InterruptedException e) {\n e.printStackTrace();\n return null;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeString(northEastLatitude);\n\t\tdest.writeString(northEastLongitude);\n\t\tdest.writeString(southWestLatitude);\n\t\tdest.writeString(southWestLongitude);\n\t\tdest.writeString(arrivalTimeText);\n\t\tdest.writeString(arrivalTimeZone);\n\t\tdest.writeString(arrivalTimeValue);\n\t\tdest.writeString(departureTimeText);\n\t\tdest.writeString(departureTimeZone);\n\t\tdest.writeString(departureTimeValue);\n\t\tdest.writeString(distanceText);\n\t\tdest.writeString(distanceValue);\n\t\tdest.writeString(durationText);\n\t\tdest.writeString(durationValue);\n\t\tdest.writeString(arrivalAddress);\n\t\tdest.writeString(arrivalLatidute);\n\t\tdest.writeString(arrivalLongitude);\n\t\tdest.writeParcelableArray(stepsInfo.toArray(new RouteVO[stepsInfo.size()]), 0);\n\t}", "public Road(String name, Junction from, Junction to) {\n this.name = name;\n this.from = from;\n this.to = to;\n }", "public DSRRoutingHeader(DSRRoutingHeader header) \n {\n super(header);\n validRoute = header.validRoute;\n protocoll = header.protocoll;\n setTargetLocation(header.targetLocation);\n }", "static public Feedback createFeedbackRoute(RegisteredUser sender, int idRoute, String message, String date)\t{\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tboolean b = UserManager.checkUserRoute(sender.getId(), idRoute);\r\n\t\t\tif (b == false) {\r\n\t\t\t\treturn new FeedbackRoute();\r\n\t\t\t}\t\r\n\t\t\tlogger.info(\"Sono in createFeedbackRoute\");\r\n\t\t\tRoute receiver = RouteManager.fetchRoute(idRoute);\r\n\t\t\tFeedback feedback = null;\r\n\t\t\tif(receiver != null) {\r\n\t\t\t\tfeedback = new FeedbackRoute(sender, message, date,receiver);\r\n\t\t\t\tFeedbackManager.saveFeedbackToDB(feedback);\r\n\t\t\t}\r\n\t\t\treturn feedback;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} catch (DBException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn new FeedbackRoute();\r\n\t\t}\r\n\t}", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.RouteInfo getRoute() {\n if (routeBuilder_ == null) {\n if (stepInfoCase_ == 7) {\n return (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance();\n } else {\n if (stepInfoCase_ == 7) {\n return routeBuilder_.getMessage();\n }\n return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance();\n }\n }", "public ASLocation()\n\t{\n\t\tsuper() ;\n\t\tprepare() ;\n\t}", "public Location() {\r\n \r\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}", "private void addRouteMArkers()\n {\n //routeMarker.add(new MarkerOptions().position(new LatLng(geo1Dub,geo2Dub)));\n\n }", "void storeRoute(McastRoute route);", "@Override\n public void onRouteInfo(BNRGRouteInfo arg0) {\n Log.d(BNRemoteConstants.MODULE_TAG, \"onRouteInfo...... \");\n }", "public Person(Person o){\n destinationFloor=o.getDestinationFloor();\n }", "public Road(Town source, Town destination, int weight, String name) {\r\n\t\tthis.source = source;\r\n\t\tthis.destination = destination;\r\n\t\tthis.vertices = new HashSet<Town>();\r\n\t\tvertices.add(source);\r\n\t\tvertices.add(destination);\r\n\t\t\r\n\t\tthis.weight = weight;\r\n\t\tthis.name = name;\r\n\t\t\r\n\t}", "public Destination getDestination(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.destination.v1.Destination res){\n\t\tDestination destination = new Destination();\n\t\tdestination.setAirportCode( res.getAirportCode() );\n\t\tdestination.setAirportName( res.getAirportName() );\n\t\tdestination.setCityName( res.getCityName() );\n\t\tdestination.setStateCode( res.getStateCode() );\n\t\tdestination.setCountryCode( res.getCountryCode() );\n\t\tdestination.setLanguageCode( res.getLanguageCode() );\n\t\tif( res.isAirDestination() != null ){\n\t\t\tdestination.setAirDestination( res.isAirDestination().booleanValue() );\n\t\t}\n\t\tif( res.isHotelDestination() != null ){\n\t\t\tdestination.setHotelDestination( res.isHotelDestination().booleanValue() );\n\t\t}\n\t\tif( res.isVehicleDestination() != null ){\n\t\t\tdestination.setVehicleDestination( res.isVehicleDestination().booleanValue() );\n\t\t}\n\t\tdestination.setCountryDescription( res.getCountryDescription() );\n\t\tdestination.setNearbyAirports( res.getNearbyAirports() );\n\t\tif( (res.getServices() != null) && (res.getServices().size() > 0) ){\n\t\t\tList<DestinationService> services = new ArrayList<DestinationService>();\n\t\t\tfor(int i=0; i < res.getServices().size(); i++){\n\t\t\t\tif( res.getServices().get(i) != null ){\n\t\t\t\tservices.add( this.getDestinationService( res.getServices().get(i) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\tdestination.setServices( services );\n\t\t}\n\t\t\n\t\treturn destination;\n\t}", "public interface Route {\n boolean match(AreaPath path);\n\n Map<String, Object> getParameterValues();\n\n /**\n * target action path\n */\n ActionPath getActionPath();\n\n /**\n * target action processor\n */\n String getProcessor();\n\n /**\n * target action task\n */\n String getTask();\n}", "ShipmentPackageRouteSeg createShipmentPackageRouteSeg();", "public RouteInterface setName(String name);", "public void setRoute(List route) \n {\n this.route = route;\n }", "public static com.services.model.BusRoute create(long brId) {\n\t\treturn getPersistence().create(brId);\n\t}", "public RouteFinder(Maze m) {\n maze = m;\n }", "public static BusStopsFragment newInstance(BusRoute newBusRoute, String direction) {\n Bundle args = new Bundle();\n args.putParcelable(\"bus_route\", newBusRoute);\n args.putString(\"direction\", direction);\n // args.putString(\"string\", s);\n BusStopsFragment fragment = new BusStopsFragment();\n fragment.setArguments(args);\n return fragment;\n }", "boolean hasRouteDest();", "public MyLocation() {}", "public void setRoute(Route route) {\n this.route = route;\n }", "CreateDestinationResult createDestination(CreateDestinationRequest createDestinationRequest);", "public void init(String rawInfo) {\n try {\n destination = setValue(\"Destination\", rawInfo);\n vehicleNumber = Integer.parseInt(setValue(\"VehicleNo\", rawInfo));\n longitude = Double.parseDouble(setValue(\"Longitude\", rawInfo));\n latitude = Double.parseDouble(setValue(\"Latitude\", rawInfo));\n direction = setValue(\"Direction\", rawInfo);\n } catch (IllegalStateException e) {\n // This happens if the init string is in an invalid format. Set all members to their\n // default values.\n destination = \"null\";\n vehicleNumber = -1;\n longitude = 0.0;\n latitude = 0.0;\n direction = \"West\";\n }\n }", "public Flight(String FlightNumber, int departureTime, int arrivalTime, double price) {\r\n\t\tdetailsRoute[0] = this.FlightNumber = FlightNumber;\r\n\t\tdetailsRoute[1] = Integer.toString(this.departureTime = departureTime);\r\n\t\tdetailsRoute[3] = Integer.toString(this.arrivalTime = arrivalTime);\r\n\t\tdetailsRoute[4] = Double.toString(this.price = price);\r\n\t\tdetailsRoute[2] = Integer.toString(this.flightDuration = (arrivalTime - departureTime));\r\n\r\n\t}", "private String getDirectionsUrl(LatLng origin, LatLng dest) {\n // Parameter toa do nguon\n String str_origin = \"origin=\" + origin.latitude + \",\" + origin.longitude;\n // Parameter toa do dich\n String str_dest = \"destination=\" + dest.latitude + \",\" + dest.longitude;\n // Parameter sensor\n String sensor = \"sensor=false\";\n // Parameter di bo\n String mode = \"mode=walking\";\n // Parameter api key\n String key = \"key=\" + getString(R.string.map_api_key);\n // Gop tat ca parameter lai\n String parameters = str_origin + \"&\" + str_dest + \"&\" + sensor + \"&\" + mode + \"&\" + key;\n // Parameter ket qua tra ve dang json\n String output = \"json\";\n // Duong link sinh ra\n String url = \"https://maps.googleapis.com/maps/api/directions/\" + output + \"?\" + parameters;\n return url;\n }", "public Location() {\n\t}", "com.google.protobuf.ByteString\n getRouteDestBytes();", "private String getDirectionsUrl(String origin, String dest){\n\n // Origin of route\n String str_origin = \"origin=\"+origin;\n\n // Destination of route\n String str_dest = \"destination=\"+dest;\n\n // Sensor enabled\n String sensor = \"sensor=false\";\n\n // Building the parameters to the web service\n String parameters = str_origin+\"&\"+str_dest+\"&\"+sensor;\n\n // Output format\n String output = \"xml\";\n\n // Building the url to the web service\n String url = \"https://maps.googleapis.com/maps/api/directions/\"+output+\"?\"+parameters;\n\n return url;\n }" ]
[ "0.6387517", "0.6257478", "0.6195381", "0.5993502", "0.5987416", "0.59593344", "0.595845", "0.5950795", "0.58737135", "0.58719873", "0.58620524", "0.5853206", "0.5795377", "0.57863003", "0.5772319", "0.5741961", "0.57384586", "0.5736081", "0.57249004", "0.5723211", "0.56914043", "0.5674822", "0.56693524", "0.5657156", "0.56529164", "0.5649039", "0.5589601", "0.55753714", "0.55616856", "0.5561031", "0.55358636", "0.55220735", "0.5516781", "0.54841965", "0.5471086", "0.54544824", "0.5453624", "0.5452633", "0.5444832", "0.54164755", "0.54131204", "0.53968805", "0.53927004", "0.53872883", "0.5386623", "0.53838104", "0.53837556", "0.53730726", "0.5359961", "0.53430104", "0.5325085", "0.5322975", "0.5320728", "0.531427", "0.53139037", "0.53089666", "0.530202", "0.530128", "0.5297398", "0.52763414", "0.5270358", "0.52572775", "0.52558124", "0.5246524", "0.5244201", "0.5241124", "0.5238189", "0.52363694", "0.5233127", "0.5227115", "0.5205388", "0.52019894", "0.5201214", "0.519845", "0.5189226", "0.518735", "0.5187086", "0.5185192", "0.5180604", "0.51779383", "0.51766044", "0.5163189", "0.5160681", "0.5148088", "0.5139821", "0.5134021", "0.5131867", "0.51308537", "0.51296854", "0.5122011", "0.5115944", "0.5115514", "0.5100787", "0.509381", "0.50925845", "0.5092565", "0.50855213", "0.50754905", "0.5075166", "0.5067461" ]
0.76213235
0
TODO Autogenerated method stub
public TastyEntity get(TastyEntity entity,String idvalue) { return tastyDao.get(entity,idvalue); }
{ "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 List<TastyEntity> get(String ctable, String property, String value) { return tastyDao.get(ctable, property, value); }
{ "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 Object excute(String sql) { return this.tastyDao.excute(sql); }
{ "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
A constructor to solve the 8puzzle problem.
public Solver(Board initial) { MinPQ<Node> minPQ = new MinPQ<>(); if (initial == null) { throw new java.lang.IllegalArgumentException("Null content is not allowed."); } //minNode = new Node(initial, null); inNode = new Node(initial, null); Node inNodetwin = new Node(initial.twin(), null); minPQ.insert(inNode); minPQ.insert(inNodetwin); minNode = minPQ.delMin(); while (!minNode.getBoard().isGoal()) { for (Board board : minNode.getBoard().neighbors()) { if (minNode.getPrevious() == null) { minPQ.insert(new Node(board, minNode)); } else if (!minNode.getPrevious().getBoard().equals(board)) { minPQ.insert(new Node(board, minNode)); } } minNode = minPQ.delMin(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Board() {\n\t\tdimension = 9;\n\t\tpuzzle = new int[dimension][dimension];\n\t}", "public RedPuzzle() {\n }", "public Board()\r\n {\r\n board = new Piece[8][8];\r\n xLength = yLength = 8;\r\n }", "public Solver(String inputFile){\r\n\tthis();\r\n\tString[][] puzzle = readPuzzle(inputFile);\r\n\t\r\n\tfor (int r = 0; r < puzzle.length; r++){\r\n\t for (int c = 0; c < puzzle[0].length; c++){\r\n\t\tboard[r][c] = new Box();\r\n\t }\r\n\t}\r\n\r\n\tfor (int r = 0; r < puzzle.length; r++){\r\n\t for (int c = 0; c < puzzle[0].length; c++){\r\n\t if (!(puzzle[c][r].equals(\"_\"))){\r\n\t\t int given = Integer.parseInt(puzzle[c][r]);\r\n\t\t assign(given, r, c);\r\n\t\t}\r\n\t }\r\n\t}\r\n }", "public Board()\r\n\t{\r\n\t\tsuper(8, 8);\r\n\t}", "public Solver() {\n\t\t// TODO: Initialize the powersOf2 array with the first 16 powers of 2.\n\t}", "public TestGridSolver()\n {\n }", "public Sudoku() {\n this.board = new int[size][size];\n }", "public Sudoku() {\n\t\tgrid = new Variable[ROWS][COLUMNS];\n\t}", "private void SetUp() {\n numbers.add(0);\n numbers.add(1);\n numbers.add(2);\n numbers.add(3);\n numbers.add(4);\n numbers.add(5);\n numbers.add(6);\n numbers.add(7);\n numbers.add(8);\n numbers.add(9);\n\n PuzzleSolve(10, empty, numbers);\n }", "public SudokuMaker() {\n\t\t\n\t\t//Initialize puzzle\n\t\tpuzzle = new int[ 9 ][ 9 ];\n\t\t\n\t\t//Set Values to 0\n\t\tfor(int row = 0; row < puzzle.length; row++)\n\t\t\tfor(int col = 0; col < puzzle[row].length; col++)\n\t\t\tpuzzle[ row ][ col ] = 0;\n\t}", "public Sudoku() {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tthis.initialState[i][j] = this.currentState[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}", "private Solution() { }", "private Solution() { }", "public static String solve8Puzzle(State s0)\n\t{\n\t\n\t\t// 1) Return null if the puzzle is not solvable. \n\t\tif(s0.solvable() != true){\n\t\t\treturn null;\n\t\t}\n\n\t\t// 2) Otherwise, solve the puzzle with two heuristics. The two solutions may be different\n\t\t// but must have the same length for optimality. \n\t\t\n\t\tHeuristic h[] = {Heuristic.TileMismatch, Heuristic.ManhattanDist }; \n\t\tString [] moves = new String[2]; \n\t\t\n\t\tfor (int i = 0; i < 2; i++)\n\t\t{\n\t\t\tmoves[i] = AStar(s0, h[i]); \n\t\t}\n\t\t\n\t\t// 3) Combine the two solution strings into one that would print out in the \n\t\t// output format specified in Section 5 of the project description.\n\t\t\n\t\treturn null; \n\t}", "public Echiquier()\n\t{\n\t\ttableau = new Piece[8][8];\n\t}", "public SudokuSolver() {\n matrix = new int[DIM][DIM];\n\n IntStream.range(0, DIM * DIM)\n .forEach(\n n -> {\n int i = n / DIM;\n int j = n % DIM;\n matrix[i][j] = 0;\n });\n }", "public Board()\n\t{\n\t\tcols = DEFAULT_WIDTH;\n\t\trows = DEFAULT_HEIGHT;\n\t\t\n\t\tpieces = new int[rows][cols];\n\t\tif (pieces.length > 0)\n\t\t{\n\t\t\tfor (int i = 0; i < pieces.length; i++)\n\t\t\t\tfor (int j = 0; j < pieces[0].length; j++)\n\t\t\t\t\tpieces[i][j] = -1;\n\t\t}\n\t}", "public static void main(String[] args) {\n\n // create initial board from file\n In in = new In(args[0]);\n int N = in.readInt();\n int[][] tiles = new int[N][N];\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++)\n tiles[i][j] = in.readInt();\n Board initial = new Board(tiles);\n\n // check if puzzle is solvable; if so, solve it and output solution\n if (initial.isSolvable()) {\n Solver solver = new Solver(initial);\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n }\n\n // if not, report unsolvable\n else {\n StdOut.println(\"Unsolvable puzzle\");\n }\n}", "public Grid(int[] intBoard)\n\t{\n\t\tfor (int x =0;x<=8;x++)\n\t\t\tthis.grid[x]= intBoard[x];\n\t}", "public Grid()\n {\n height = 4;\n\twidth = 4;\n\tcases = new Case[height][width];\n }", "public Grid()\n\t{\n\t\tfor (int x =0;x<=8;x++)\n\t\t\tgrid[x]=0;\n }", "public Board(){\r\n \r\n //fill tile list with tile objects\r\n tiles.add(new Tile(new Coordinate(0,0)));\r\n tiles.add(new Tile(new Coordinate(0,1)));\r\n tiles.add(new Tile(new Coordinate(0,2)));\r\n tiles.add(new Tile(new Coordinate(1,0)));\r\n tiles.add(new Tile(new Coordinate(1,1)));\r\n tiles.add(new Tile(new Coordinate(1,2)));\r\n tiles.add(new Tile(new Coordinate(1,3)));\r\n tiles.add(new Tile(new Coordinate(2,0)));\r\n tiles.add(new Tile(new Coordinate(2,1)));\r\n tiles.add(new Tile(new Coordinate(2,2)));\r\n tiles.add(new Tile(new Coordinate(2,3)));\r\n tiles.add(new Tile(new Coordinate(2,4)));\r\n tiles.add(new Tile(new Coordinate(3,1)));\r\n tiles.add(new Tile(new Coordinate(3,2)));\r\n tiles.add(new Tile(new Coordinate(3,3)));\r\n tiles.add(new Tile(new Coordinate(3,4)));\r\n tiles.add(new Tile(new Coordinate(4,2)));\r\n tiles.add(new Tile(new Coordinate(4,3)));\r\n tiles.add(new Tile(new Coordinate(4,4)));\r\n \r\n //fills corner list with corner objects\r\n List<Coordinate> cornercoords = new ArrayList<>();\r\n for(Tile t : tiles){\r\n for(Coordinate c : t.getAdjacentCornerCoords()){\r\n if(cornercoords.contains(c)==false) cornercoords.add(c);\r\n }\r\n }\r\n for(Coordinate c : cornercoords){\r\n corners.add(new Corner(c));\r\n }\r\n \r\n //fills adjacent corner/tile fields\r\n for(Tile t: tiles){\r\n t.fillAdjacents(tiles,corners);\r\n }\r\n for(Corner c: corners){\r\n c.fillAdjacents(tiles,corners);\r\n }\r\n \r\n //generates an edge between each corner and fills the list of edges\r\n //results in lots of duplicates\r\n for(Corner c: corners){\r\n for(Corner adjacent: c.getAdjacentCorners()){\r\n edges.add(new Edge(c,adjacent));\r\n }\r\n }\r\n \r\n //hopefully removes duplicates from the edge list\r\n Iterator<Edge> iter = edges.iterator();\r\n boolean b = false;\r\n while (iter.hasNext()) {\r\n Edge e = iter.next();\r\n for(Edge edge : edges){\r\n if(e.sharesCorners(edge)==true && edge!=e){\r\n b = true;\r\n }\r\n }\r\n if(b==true) iter.remove();\r\n b = false;\r\n }\r\n \r\n //give each tile a token number and resource type \r\n ArrayList<Tile> randomtiles = randomize(tiles);\r\n int sheep = 3;\r\n int wood = 3;\r\n int rock = 2;\r\n int brick = 2;\r\n int wheat = 3;\r\n for(Tile t : randomtiles){\r\n if(sheep>0){\r\n t.setResource(Resource.SHEEP);\r\n sheep--;\r\n }\r\n if(wood>0){\r\n t.setResource(Resource.WOOD);\r\n wood--;\r\n }\r\n if(brick>0){\r\n t.setResource(Resource.CLAY);\r\n brick--;\r\n }\r\n if(wheat>0){\r\n t.setResource(Resource.WHEAT);\r\n wheat--;\r\n }\r\n if(rock>0){\r\n t.setResource(Resource.ROCK);\r\n rock--;\r\n }\r\n else t.setResource(Resource.DESERT); \r\n } \r\n randomtiles = randomize(randomtiles);\r\n int twos = 1;\r\n int twelves = 1;\r\n int threes = 2;\r\n int fours = 2;\r\n int fives = 2;\r\n int sixes = 2;\r\n int sevens = 2;\r\n int eights = 2;\r\n int nines = 2;\r\n int tens = 2;\r\n int elevens = 2; \r\n for(Tile t : randomtiles){\r\n if(t.getResource() != Resource.DESERT){\r\n if(twos != 0){\r\n t.setToken(2);\r\n twos--;\r\n }\r\n else if(threes !=0){\r\n t.setToken(3);\r\n threes--;\r\n }\r\n else if(fours !=0){\r\n t.setToken(4);\r\n fours--;\r\n } \r\n else if(fives !=0){\r\n t.setToken(5);\r\n fives--;\r\n } \r\n else if(sixes !=0){\r\n t.setToken(6);\r\n sixes--;\r\n } \r\n else if(sevens !=0){\r\n t.setToken(7);\r\n sevens--;\r\n } \r\n else if(eights !=0){\r\n t.setToken(8);\r\n eights--;\r\n } \r\n else if(nines !=0){\r\n t.setToken(9);\r\n nines--;\r\n } \r\n else if(tens !=0){\r\n t.setToken(10);\r\n tens--;\r\n } \r\n else if(elevens !=0){\r\n t.setToken(11);\r\n elevens--;\r\n } \r\n else if(twelves !=0){\r\n t.setToken(12);\r\n twelves--;\r\n } \r\n }\r\n }\r\n }", "public Problem38() {\n System.out.println(\"Problem38: \");\n }", "public static void main(String[] args) \r\n\t{\n\t\tint [][]board = new int[][]{\r\n\t\t\t{5,8,0,1,7,0,3,0,0},\r\n\t\t\t{0,0,9,0,0,8,0,1,0},\r\n\t\t\t{0,0,3,0,0,0,0,0,8},\r\n\t\t\t{4,0,6,8,0,7,0,0,5},\r\n\t\t\t{8,3,0,0,0,0,0,7,4},\r\n\t\t\t{2,0,0,6,0,5,8,0,3},\r\n\t\t\t{3,0,0,0,0,0,5,0,0},\r\n\t\t\t{0,6,0,5,0,0,2,0,0},\r\n\t\t\t{0,0,7,0,8,3,0,6,9}};\r\n\t\t//create the board\r\n\t\tBaseBoard x = new BaseBoard(board);\t\r\n\t\t//print the unsolved board\r\n\t\tSystem.out.println(\"Unsolved Board X:\");\r\n\t\tx.print();\r\n\t\t//if the board is completely solved then print it\r\n\t\tif(solved(x)) {\r\n\t\t\tSystem.out.println(\"\\n\\nSolved Sudoku Board X:\");\r\n\t\t\tx.print();\r\n\t\t}\r\n\t\t//extra board for a second test - Hard\r\n\t\tint [][]board2 = new int[][]{\r\n\t\t\t{0,0,0,0,0,4,3,7,0},\r\n\t\t\t{6,3,0,0,7,0,2,0,0},\r\n\t\t\t{0,0,0,8,6,0,0,0,0},\r\n\t\t\t{1,0,9,0,0,6,0,0,0},\r\n\t\t\t{0,0,4,0,0,0,9,0,0},\r\n\t\t\t{0,0,0,1,0,0,4,0,8},\r\n\t\t\t{0,0,0,0,4,7,0,0,0},\r\n\t\t\t{0,0,7,0,2,0,0,4,1},\r\n\t\t\t{0,2,8,9,0,0,0,0,0}};\r\n\t\t//create board\r\n\t\tBaseBoard y = new BaseBoard(board2);\r\n\t\t//print unsolved board\r\n\t\tSystem.out.println(\"\\n\\nUnsolved Board Y:\");\r\n\t\ty.print();\r\n\t\t//if the board is completely solved then print it\r\n\t\tif(solved(y)) {\r\n\t\t\tSystem.out.println(\"\\n\\nSolved Sudoku Board Y:\");\r\n\t\t\ty.print();\r\n\t\t}\r\n\t}", "public Puzzle exPuzzle() {\n List<Tile> tiles = new ArrayList<>(9);\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.C, Half.x), new Pic(Pattern.C, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y), new Pic(Pattern.C, Half.y)));\n return new Puzzle(tiles);\n }", "public Logic() {\n\t\tarr = new int [8][8];\n\t\tcreateNewGame();\n\t}", "public SudokuSolver(String filename) {\n this.board = new SudokuBoard(filename);\n }", "public Board() {\n tiles = new int[3][3];\n int[] values = genValues(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 0});\n\n int offset;\n for (int i = 0; i < 3; i++) {\n offset = 2 * i;\n tiles[i] = Arrays.copyOfRange(values, i + offset, i + offset + 3);\n }\n }", "public Board() {\n this.board = new Piece[16];\n }", "public Crazy8sBoard(){\n handComputer.clear();\n handHuman.clear();\n deck.clear();\n\n InitializeDeck();\n InitializeHumanHand();\n InitializeComputerHand();\n\n topCard = deck.get(0);\n }", "public Board() {\n this.x = 0;\n this.o = 0;\n }", "private Solution() {\n }", "private Solution() {\n //constructor\n }", "public Board(String blocks) { this(blocks, Heuristic.INT, null); }", "public Question12Review() {\n int gridSize = 8;\n int[] columns = new int[gridSize];\n ArrayList<Integer[]> results = new ArrayList<>();\n place(gridSize, new int[gridSize], 0, results);\n }", "public Board(int xLen, int yLen)\r\n {\r\n if(xLen <= 0 || yLen <= 0)\r\n xLen = yLen = 8;\r\n board = new Piece[xLen][yLen];\r\n xLength = xLen;\r\n yLength = yLen;\r\n }", "Solver(int grille[][]){\r\n\t\tthis.grille = grille;\r\n\t}", "Board() {\n this.ones = -1; // 1\n this.twos = -1; // 2\n this.threes = -1; // 3\n this.fours = -1; // 4\n this.fives = -1; // 5\n this.sixes = -1; // 6\n this.threeOfAKind = -1; // 7\n this.fourOfAKind = -1; // 8\n this.smallStraight = -1;// 9\n this.longStraight = -1; // 10\n this.fullHouse = -1; // 11\n this.yahtzee = -1; // 12\n }", "public Board() {\n\n for(int row = 0; row < size; row++) {\n for(int col = 0; col < size; col++) {\n\n grid[row][col] = \"-\";\n\n }\n }\n\n }", "public static void main(String args[]){\n\n QueenBoard zero = new QueenBoard(0);\n QueenBoard one = new QueenBoard(1);\n QueenBoard two = new QueenBoard(2);\n QueenBoard three = new QueenBoard(3);\n QueenBoard four = new QueenBoard(4);\n QueenBoard five = new QueenBoard(5);\n QueenBoard six = new QueenBoard(6);\n QueenBoard seven = new QueenBoard(7);\n QueenBoard eight = new QueenBoard(8);\n QueenBoard nine = new QueenBoard(9);\n\n\n //testing solve\n //also commented out as clear is private \n /*\n System.out.println(one.solve());\n one.clear();*/\n\n //tested countSolutions and the numbers crunched seem right\n //so by this olgic I can seemingly safely assume solve() works\n // as intended\n System.out.println(zero.countSolutions());\n System.out.println(one.countSolutions());\n System.out.println(two.countSolutions());\n System.out.println(three.countSolutions());\n System.out.println(four.countSolutions());\n System.out.println(five.countSolutions());\n System.out.println(six.countSolutions());\n System.out.println(seven.countSolutions());\n System.out.println(eight.countSolutions());\n System.out.println(nine.countSolutions());\n\n\n //check to make sure countSolutions keeps the board clear and it does\n System.out.println(nine);\n\n }", "public Board(int[][] b) {\n neighbors = new LinkedList<>();\n tiles = b;\n n = b.length;\n goal = new int[n][n];\n\n int counter = 1;\n for(int x = 0; x < n; x++){\n for(int y = 0; y < n; y++){\n goal[x][y] = counter;\n counter++;\n }\n }\n goal[n-1][n-1] = 0;\n }", "public RecursiveSolver(SudokuBoard sb) {\n this.sb = sb;\n }", "public SudokuTemplate(){\n\t\tsudoku = new int[9][9];\n\t}", "public Board() {\n\t\tboard = new int[8][8];\n\t\tbombs = 64 / 3;\n\t\tdifficulty = GlobalModel.BESTSCORE_EASY;\n\t\tfillBoard();\n\t\tsetDefaultScores();\n\t}", "public RedPuzzle(String[] args) {\n super(args);\n }", "public Board(int[][] tiles) {\n _N = tiles.length;\n _tiles = new int[_N][_N];\n _goal = new int[_N][_N];\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n _tiles[i][j] = tiles[i][j];\n _goal[i][j] = 1 + j + i * _N;\n }\n }\n _goal[_N-1][_N-1] = 0;\n }", "public JumbleBoard()\n {\n }", "public Board() {\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n this.grid[row][col] = 0;\n }\n }\n }", "public Game(InputStream in) throws Exception\n\t{\n\t\tif(in == null)\n\t\t\tthrow new Exception(\"Input cannot be null\");\n\n\t\t//initialize variables\n\t\toriginalPuzzle = new ArrayList<>();\n\t\tonePossibility = 0;\n\n\t\t//read in the game\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\t\tString str;\n\t\twhile((str = reader.readLine()) != null){\n\t\t\toriginalPuzzle.add(str);\n\t\t}\n\t\tin.close();\n\t\treader.close();\n\n\t\t//set the size and blocksize variables\n\t\tsize = Integer.parseInt(originalPuzzle.get(0));\n\n\t\tHashSet<String> characters = new HashSet<>(size * 2);\n\n\t\t//get the characters\n\t\tString[] stringCharacters = originalPuzzle.get(1).split(\"\\\\s\");\n\t\tfor(String character : stringCharacters){\n\t\t\tcharacters.add(character);\n\t\t}\n\n\t\t//validate the puzzle\n\t\tvalidatePuzzle(characters);\n\n\t\t//start creating the different houses\n\t\trows = new Row[size];\n\t\tcolumns = new Column[size];\n\t\tblocks = new Block[size/getBlockSize()][size/getBlockSize()];\n\n\t\t//construct a two dimensional cell array first\n\t\tCell[][] board = new Cell[size][size];\n\n\t\t// read all cells into the board array\n\t\tfor(int j = 0; j < size; j++){\n\t\t\tString[] boardLine = originalPuzzle.get(j+2).split(\"\\\\s\");\n\t\t\tfor(int i = 0; i < size; i++){\n\t\t\t\tboard[i][j] = new Cell(boardLine[i], stringCharacters, i, j);\n\t\t\t\tboard[i][j].Attach(this);\n\t\t\t}\n\t\t}\n\n\t\t//create the individual rows and columns\n\t\tfor(int i = 0; i < size; i++){\n\t\t\tCell[] row = new Cell[size];\n\t\t\tCell[] column = new Cell[size];\n\t\t\tfor(int j = 0; j < size; j++){\n\t\t\t\trow[j] = board[j][i];\n\t\t\t\tcolumn[j] = board[i][j];\n\t\t\t}\n\t\t\tRow r = new Row(row);\n\t\t\tColumn c = new Column(column);\n\n\t\t\trows[i] = r;\n\t\t\tcolumns[i] = c;\n\t\t}\n\n\t\t//create the blocks\n\t\tfor(int blockX = 0; blockX < size/getBlockSize(); blockX++){\n\t\t\tfor(int blockY = 0; blockY < size/getBlockSize(); blockY++){\n\t\t\t\tCell[][] block = new Cell[getBlockSize()][getBlockSize()];\n\t\t\t\tfor(int i = 0; i < getBlockSize(); i++){\n\t\t\t\t\tfor(int j = 0; j < getBlockSize(); j++){\n\t\t\t\t\t\tblock[i][j] = board[(blockX * getBlockSize()) + i][(blockY * getBlockSize()) + j];\n\t\t\t\t\t\tblock[i][j].Attach(this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tblocks[blockX][blockY] = new Block(block);\n\t\t\t}\n\t\t}\n\t}", "private Solution() {\n\n }", "public static void main(String[] args) throws Exception {\n Puzzle puzzle = new Puzzle(10, 10);\n ArrayList<Integer>[] row_clues = new ArrayList[puzzle.getRows()];\n ArrayList<Integer>[] column_clues = new ArrayList[puzzle.getColumns()];\n Integer[][] r_clues = {\n {1, 1, 2}, {2, 1, 3}, {2, 3}, {2, 5}, {1, 1},\n {7}, {3, 1}, {5}, {4}, {6}\n };\n Integer[][] c_clues = {\n {3, 1}, {7}, {3, 1}, {5}, {1, 3},\n {2, 1, 5}, {3, 3}, {3, 1}, {4}, {4}\n };\n for(int i = 0; i < r_clues.length; ++i) {\n row_clues[i] = new ArrayList<>(Arrays.asList(r_clues[i]));\n }\n for(int i = 0; i < c_clues.length; ++i) {\n column_clues[i] = new ArrayList<>(Arrays.asList(c_clues[i]));\n }\n puzzle.setRowClues(row_clues);\n puzzle.setColumnClues(column_clues);\n PuzzleSolver solver = new PuzzleSolver(puzzle);\n solver.solve();\n for(Board b : solver.getSolutions()) {\n System.out.println(b);\n }\n }", "public BitBoardImpl() {\n\tinitialPosition();\n }", "public static void main(String[] args) {\n\n int[][] blocks = new int[3][3];\n\n blocks[0][0] = 1;\n blocks[0][1] = 2;\n blocks[0][2] = 3;\n blocks[1][0] = 0;\n blocks[1][1] = 7;\n blocks[1][2] = 6;\n blocks[2][0] = 5;\n blocks[2][1] = 4;\n blocks[2][2] = 8;\n /*\n * blocks[0][0] = 1; blocks[0][1] = 2; blocks[0][2] = 3; blocks[1][0] =\n * 4; blocks[1][1] = 5; blocks[1][2] = 6; blocks[2][0] = 8; blocks[2][1]\n * = 7; blocks[2][2] = 0;\n */\n\n Board initial = new Board(blocks);\n\n // solve the puzzle\n Solver solver = new Solver(initial);\n\n // print solution to standard output\n if (!solver.isSolvable())\n StdOut.println(\"No solution possible\");\n else {\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n }\n\n }", "public Board() {\n initialize(3, null);\n }", "private Sudoku(int BlockSize) {\n\t\tB = BlockSize;\n\t\tN = B * B;\n\t\tpuzzle = new int[N + 1][N + 1];\n\t\tconstraints = new BitSet[N + 2][N + 1];\n\t\tnonAssignedCells = new ArrayList<Pair<Integer, Integer>>();\n\t}", "public SudokuBoard()\n\t{\n\t\tcurrentTime = 0;\n\t\tseconds = 0;\n\t\tminutes = 0;\n\t\tnumberOfHints = 0;\n\t\ttimeDisplay = null;\n\t\tuser = null;\n\t\tdifficulty = \"\";\n\t}", "public BandedArraySolution(int[][] a) {\n\t\tsuper(a);\n\t}", "public Board() {\n\t\tboard = new char[9][9];\n\t}", "public Board() {\r\n\t\tthis.size = 4;\r\n\t\tthis.gameBoard = createBoard(4);\r\n\t\tthis.openTiles = 16;\r\n\t\tthis.moves = 0;\r\n\t\tthis.xValues = new boolean[4][4];\r\n\t\tthis.yValues = new boolean[4][4];\r\n\t\tthis.complete = false;\r\n\t}", "public static void main(String[] args) {\n\t\tHomework5 test = new Homework5();\n\t\ttest.solver(new SlidingTilePuzzle(3, 3, 5));\n\t}", "public Sudoku(int[][] board){\n setBoard(board);\n }", "public TicTacToeBoard() {board = new int[rows][columns];}", "public AIPlayer(Board board) {\n cells = board.squares;\n }", "public Matrix33() {\r\n // empty\r\n }", "public Board() {\n this.board = new byte[][] { new byte[3], new byte[3], new byte[3] };\n }", "public static void main(String[] args) // solve a slider puzzle (given below)\n {\n In in = new In(args[0]);\n int N = in.readInt();\n int[][] blocks = new int[N][N];\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++)\n blocks[i][j] = in.readInt();\n Board initial = new Board(blocks);\n\n // solve the puzzle\n Solver solver = new Solver(initial);\n\n // print solution to standard output\n if (!solver.isSolvable())\n StdOut.println(\"No solution possible\");\n else {\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n \n \t\n }\n}", "public BoardTest() {\n initComponents();\n \n createSudoku();\n //createBoggle();\n }", "public GPProblem() {\n\n }", "public Solver(Board initial) {\n if (initial == null) throw new IllegalArgumentException();\n initialNode = new BoardNode(initial);\n\n solution = solve();\n if (solution == null) return;\n\n for (Board board : solution)\n moves++;\n\n }", "public Hacker() {\r\n \r\n }", "public Board()\r\n\t{\r\n\t\tfor(int x = 0; x < 9; x++)\r\n\t\t\tfor(int y = 0 ; y < 9; y++)\r\n\t\t\t{\r\n\t\t\t\tboard[x][y] = new Cell();\r\n\t\t\t\tboard[x][y].setBoxID( 3*(x/3) + (y)/3+1);\r\n\t\t\t}\r\n\t}", "public abstract SolutionPartielle solutionInitiale();", "public static void main(String[] args) {\n In in = new In(args[0]);\n int n = in.readInt();\n int[][] tiles = new int[n][n];\n for (int i = 0; i < n; i++)\n for (int j = 0; j < n; j++)\n tiles[i][j] = in.readInt();\n Board initial = new Board(tiles);\n\n // Solve the puzzle\n Solver solver = new Solver(initial);\n\n // Print solution to standard output\n if (!solver.isSolvable())\n StdOut.println(\" No solution possible \");\n else {\n StdOut.println(\" Minimum number of moves = \" + solver.moves());\n for (Board solutionboard : solver.solution())\n StdOut.println(solutionboard);\n }\n\n }", "private PerfectSquares() {\n register(new Solution1());\n register(new Solution2());\n register(new Solution3());\n register(new Solution4());\n register(new Solution5());\n register(new Solution6());\n register(new Solution7());\n }", "public DistrictBoard(int m, int n) {\r\n \r\n }", "public Grid(int h,int w)\n {\n height = h;\n\twidth = w;\n\tcases = new Case[height][width];\n }", "public BCDToSevenSegDecoder(Pin PinGrid[][], int x, int y) {\n super (x, y, 10, 13 , 3, 1, 4, 11, 7, 7); // x,y,w,h HitBox x,y,w,h,I,O\n IPin[LE] = new InputPin(\"LE\", 1, 2, 2, 0, 0, 0, ComponentPin.PIN_NEGATIVE); // name, x, y, w, h, inv\n IPin[BI] = new InputPin(\"BI\", 1, 4, 2, 0, 0, 0, ComponentPin.PIN_NEGATIVE); // name, x, y, w, h, inv\n IPin[LT] = new InputPin(\"LT\", 1, 6, 2, 0, 0, 0, ComponentPin.PIN_NEGATIVE); // name, x, y, w, h, inv\n IPin[A] = new InputPin(\"A\", 1, 8, 2, 0, 0, 0, ComponentPin.PIN_NORMAL); // name, x, y, w, h, inv\n IPin[B] = new InputPin(\"B\", 1, 9, 2, 0, 0, 0, ComponentPin.PIN_NORMAL); // name, x, y, w, h, inv\n IPin[C] = new InputPin(\"C\", 1, 10, 2, 0, 0, 0, ComponentPin.PIN_NORMAL); // name, x, y, w, h, inv\n IPin[D] = new InputPin(\"D\", 1, 11, 2, 0, 0, 0, ComponentPin.PIN_NORMAL); // name, x, y, w, h, inv\n\n OPin[a] = new OutputPin(\"a\", 9, 3, -2, 0, 0, 0, ComponentPin.PIN_NORMAL); // name, x, y, w, h, inv\n OPin[b] = new OutputPin(\"b\", 9, 4, -2, 0, 0, 0, ComponentPin.PIN_NORMAL); // name, x, y, w, h, inv\n OPin[c] = new OutputPin(\"c\", 9, 5, -2, 0, 0, 0, ComponentPin.PIN_NORMAL); // name, x, y, w, h, inv\n OPin[d] = new OutputPin(\"d\", 9, 6, -2, 0, 0, 0, ComponentPin.PIN_NORMAL); // name, x, y, w, h, inv\n OPin[e] = new OutputPin(\"e\", 9, 7, -2, 0, 0, 0, ComponentPin.PIN_NORMAL); // name, x, y, w, h, inv\n OPin[f] = new OutputPin(\"f\", 9, 8, -2, 0, 0, 0, ComponentPin.PIN_NORMAL); // name, x, y, w, h, inv\n OPin[g] = new OutputPin(\"g\", 9, 9, -2, 0, 0, 0, ComponentPin.PIN_NORMAL); // name, x, y, w, h, inv\n\n ComponentName = \"BCD to 7-segment decoder\";\n ClassName = \"BCDToSevenSegDecoder\";\n RegisterPins (PinGrid, x, y);\n }", "public static void main(String[] args) {\n\n PuzzleDay dayNinePartTwo = new DayNinePartTwo();\n\n dayNinePartTwo.solvePuzzle();\n }", "Board() {\n this(INITIAL_PIECES, BLACK);\n _countBlack = 12;\n _countWhite = 12;\n _moveHistory = new ArrayList<Move>();\n _movesMade = 0;\n }", "public Akari() {\n\t\tsuper(8, 8, PosValues);\n\t\tpuzzleName = \"Akari\";\n\t\treorderPuzzleList(puzzleName);\n\t\thasStaticValues(true);\n\t\tsetSpots();\n\t\tsetStaticValues(StaticValues);\n\t\tinitConstraints();\n\t\t\n\t}", "public void createBoard() {\n\t\tboard = new Piece[8][8];\n\t\t\n\t\tfor(int i=0; i<8; i++) {\n\t\t\tfor(int j=0; j<8; j++) {\n\t\t\t\tboard[i][j] = null;\n\t\t\t}\n\t\t}\n\t}", "public Board(int[][] n) {\n\t\tdimension = n.length;\n\t\tif(n.length != n[0].length) \n\t\t\tthrow new IllegalArgumentException(\"Parameter must be a square 2D array\");\n\t\tif(!isPerfectSquare(dimension))\n\t\t\tthrow new IllegalArgumentException(\"Parameter must have dimensions of a perfect square\");\n\t\tpuzzle = new int[dimension][dimension];\n\t\t//Deep copy of 2D Array\n\t\tfor(int row = 0; row < n.length; row++) {\n\t\t\tfor(int col = 0; col < n[0].length; col++) {\n\t\t\t\tpuzzle[row][col] = n[row][col];\n\t\t\t\tif(puzzle[row][col] < 0 || puzzle[row][col] > dimension)\n\t\t\t\t\tthrow new IllegalArgumentException(\"All values must be between 0-dimension inclusive\");\n\t\t\t}\n\t\t}\n\t}", "public Board(Board a)\n {\n mainBoard=false;\n squares = new Square[Chess.ROWS][Chess.COLUMNS];\n setLayout(new GridLayout(Chess.ROWS,Chess.COLUMNS,0,0));\n if (a.firstSelected==null)\n firstSelected=null;\n else\n firstSelected = new Piece(a.firstSelected);\n for (int i = 0; i < Chess.ROWS; i++)\n for (int j = 0; j < Chess.COLUMNS; j++)\n squares[i][j] = new Square(a.squares[i][j]);\n }", "public Board() {\n //Create all pieces\n board[0][0] = new Rook(\"black\", 0, 0);\n board[0][1] = new Knight(\"black\", 0, 1);\n board[0][2] = new Bishop(\"black\", 0, 2);\n board[0][3] = new Queen(\"black\", 0, 3);\n board[0][4] = new King(\"black\", 0, 4);\n board[0][5] = new Bishop(\"black\", 0, 5);\n board[0][6] = new Knight(\"black\", 0, 6);\n board[0][7] = new Rook(\"black\", 0, 7);\n\n board[7][0] = new Rook(\"white\", 7, 0);\n board[7][1] = new Knight(\"white\", 7, 1);\n board[7][2] = new Bishop(\"white\", 7, 2);\n board[7][3] = new Queen(\"white\", 7, 3);\n board[7][4] = new King(\"white\", 7, 4);\n board[7][5] = new Bishop(\"white\", 7, 5);\n board[7][6] = new Knight(\"white\", 7, 6);\n board[7][7] = new Rook(\"white\", 7, 7);\n\n for (int j = 0; j < 8; j++) {\n board[1][j] = new Pawn(\"black\", 1, j);\n board[6][j] = new Pawn(\"white\", 6, j);\n }\n\n //Printing everything\n for (Piece[] a : board) {\n for (Piece b : a) {\n System.out.printf(\"%-15s\", \"[\" + b + \"]\");\n }\n System.out.println(\"\");\n }\n }", "public ProblemSolver(int inRunMode){\n\t\trunmode = inRunMode;\n\t}", "public PersonalBoard(){\n this(0);\n }", "public AdvancedHeuristic(Puzzle puzzle) {\n this.puzzle = puzzle;\n }", "public Board()\r\n\t{\r\n\t\treset();\r\n\t}", "public MrnWoatlas5() {\n clearVars();\n if (dbg) System.out.println (\"<br>in MrnWoatlas5 constructor 1\"); // debug\n }", "public SudokuSolver(int[][] m) {\n // ideally we would have liked to have just done:\n // this.matrix = m; but this would allow outside class\n // to change our internal representation, safer to copy instead.\n // Note: intentionally not doing a clone of rows.\n matrix = new int[DIM][DIM];\n IntStream.range(0, DIM * DIM)\n .forEach(\n n -> {\n int i = n / DIM;\n int j = n % DIM;\n matrix[i][j] = m[i][j];\n });\n }", "private GameBoard() {}", "private void initializeBoard(){\r\n checks =new int[][]{{0,2,0,2,0,2,0,2},\r\n {2,0,2,0,2,0,2,0},\r\n {0,2,0,2,0,2,0,2},\r\n {0,0,0,0,0,0,0,0},\r\n {0,0,0,0,0,0,0,0},\r\n {1,0,1,0,1,0,1,0},\r\n {0,1,0,1,0,1,0,1},\r\n {1,0,1,0,1,0,1,0}};\r\n }", "public TicTacToe()\n\t{\n\t\t// board array has an index of 10\n\t\tboard = new String[ 10 ];\n\t\t\n\t}", "public void solver(){\n\n tohSolver(noDisks,1,3,2);\n\n }", "public PuzzleFrame() {\n initComponents();\n this.setLayout(new BorderLayout());\n this.setTitle(\"15-Puzzle - Team Gorila - Praktikum PBO\");\n\n // Mengatur ukuran default tile menjadi 4 x 4\n panelSize = 4;\n initPanel();\n }", "public Sudoku(int[][] state) {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tthis.initialState[i][j] = this.currentState[i][j] = state[i][j];\n\t\t\t}\n\t\t}\n\t}", "public Board(int[][] grid, Tetrimino piece) {\n //initComponents();\n this.grid = grid;\n this.piece = piece;\n setLayout(new GridLayout(grid.length-4, grid[0].length));\n init();\n }", "public Game() {\n board = new FourBoard();\n }", "public UIBoard()\r\n\t{\r\n\t\t//Creates a 10x10 \"Board\" object\r\n\t\tsuper(10,10);\r\n\t\tgrid = new int[getLength()][getWidth()];\r\n\t\t\r\n\t\t//Sets all coordinates to the value 0, which corresponds to \"not hit yet\"\r\n\t\tfor(int i=0; i<grid.length; i++)\r\n\t\t\tfor(int j=0; j<grid[i].length; j++)\r\n\t\t\t\tgrid[i][j] = 0;\t\t\r\n\t}", "public Board(int[][] tiles) {\n N = tiles.length;\n L = N * N;\n\n short[] res1d = new short[L];\n short k = 0;\n for (short i = 0; i < N; i++) {\n for (short j = 0; j < N; j++) {\n res1d[k] = (short) tiles[i][j];\n if (res1d[k] == 0) {\n blank_r = i;\n blank_c = j;\n }\n k++;\n }\n }\n arr1d = res1d;\n }" ]
[ "0.72558004", "0.6680927", "0.6635272", "0.6576992", "0.650841", "0.6322348", "0.63118035", "0.630062", "0.6247293", "0.6220534", "0.62025887", "0.6176535", "0.61650205", "0.61650205", "0.611935", "0.61165863", "0.60934955", "0.60861635", "0.6050838", "0.604276", "0.6038995", "0.60129887", "0.60099876", "0.60090184", "0.60076606", "0.60027444", "0.59904367", "0.59752387", "0.5971169", "0.59646577", "0.59493816", "0.5933553", "0.59261376", "0.59159607", "0.5913933", "0.5910779", "0.59045756", "0.5903379", "0.58964", "0.5879117", "0.5868637", "0.58603996", "0.585078", "0.5846388", "0.5823724", "0.58199674", "0.58181554", "0.5811961", "0.5807343", "0.58045304", "0.58009976", "0.5792353", "0.57902986", "0.5779563", "0.5760735", "0.57549363", "0.57396704", "0.57370675", "0.57345223", "0.5731494", "0.57256705", "0.5724971", "0.5719812", "0.5715596", "0.5713768", "0.57119167", "0.5703365", "0.5703201", "0.56912243", "0.567175", "0.5667016", "0.56573397", "0.5655327", "0.5648039", "0.563939", "0.56297624", "0.5627171", "0.5617768", "0.5611627", "0.5608878", "0.5605396", "0.5602082", "0.5596395", "0.5591912", "0.5583476", "0.55778295", "0.556606", "0.5560131", "0.5554875", "0.5554599", "0.5554048", "0.5553762", "0.555103", "0.55506146", "0.5549401", "0.5541211", "0.55399877", "0.553918", "0.5533836", "0.5532952", "0.552502" ]
0.0
-1
find a solution to the initial board (using the A algorithm) return true if the initial board is solvable, false otherwise.
public boolean isSolvable() { Node preNode = minNode; while (preNode.getPrevious() != null) { preNode = preNode.getPrevious(); } if (preNode.getBoard().equals(inNode.getBoard())) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSolvable() {\n Board twin = initial.twin();\n MinPQ<Node> mainQueue = new MinPQ<>(getComparator());\n MinPQ<Node> twinQueue = new MinPQ<>(getComparator());\n mainQueue.insert(new Node(initial, 0, null));\n twinQueue.insert(new Node(twin, 0, null));\n while (this.solution == null) {\n Node temp = mainQueue.delMin();\n if (temp.board.isGoal()) {\n this.solution = temp;\n return true;\n }\n Iterable<Board> nebrs = temp.board.neighbors();\n for (Board x : nebrs) {\n if (!x.equals(temp.previousNode.board)) {\n mainQueue.insert(new Node(x, temp.movesToBoard + 1, temp));\n }\n }\n Node temp2 = twinQueue.delMin();\n if (temp2.board.isGoal()) {\n this.solution = null;\n return false;\n }\n Iterable<Board> nebrs2 = temp2.board.neighbors();\n for (Board x : nebrs2) {\n if (!x.equals(temp2.previousNode.board)) {\n twinQueue.insert(new Node(x, temp2.movesToBoard + 1, temp2));\n }\n }\n }\n return false;\n }", "public boolean solved()\n\t{\n\t\tfor(int row = 0; row < board.length; row++)\n\t\t{\n\t\t\tfor(int col = 0; col < board.length; col++)\n\t\t\t{\n\t\t\t\tif(board[row][col] == 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static boolean solve(int[][] board) {\nfor (int x=0; x<9; x++) {\n for (int y=0; y<9; y++) {\nif (board[x][y] == 0) {\n \n // Try each possibile value in this space\n // and see if the rest of the puzzle can be filled in.\n for (board[x][y]=1; board[x][y]<=9; board[x][y]++) {\n if (isLegal(board) && solve(board)) {\n return true;\n }\n }\n \n // There is no value that we can put in the first\n // empty space that was found, so the puzzle is\n // unsolvable given the values put in up to this\n // point.\n board[x][y] = 0;\n return false;\n}\n }\n}\n \n// There were no empty spaces to fill in, so the\n// puzzle must be solved.\nreturn true;\n }", "public boolean isBoardSolved() {\n for (int goal : goalCells) {\n if (!((board[goal] & 15) == BOX_ON_GOAL)) {\n return false;\n }\n }\n return true;\n }", "public static boolean SolveNinePuzzle(int board [][]){\n\t\tfor(int i = 0; i < board.length;i++){\n\t\t\t\tfor (int j = 0;j < board[i].length;j++) {\n\t\t\t\t\tSystem.out.print(board[i][j] + \" \");\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Attempting to solve board ...\");\n \n\t\tQueue node_queue = new Queue();\n\t\tBoard start_board = new Board(board);\n\t\tint goal_board [][] = {{1,2,3},{4,5,6},{7,8,0}}; \n\t\tBoard goal = new Board(goal_board);\n\t\t//check if the start board is the solved board\n\t\tif(start_board.compare(goal)){\n\t\t\treturn true;\n\t\t}\n\t\t//new tree for unique moves; root node is start board\n\t\tBoard_Tree result_tree = new Board_Tree(start_board);\n\t\tnode_queue.enqueue(start_board);\n\t\t//add root node string representation to hashset\n\t\tvertex_check.add(start_board.board_string);\n\t\twhile(!node_queue.isEmpty()){\n\t\t\tBoard v = node_queue.dequeue();\n\t\t\tcompute_possible_moves(v);\n\t\t\tfor(Board s: possible_boards){\n\t\t\t\tif(s.compare(goal)){\n\t\t\t\t\tresult_tree.insert(v,s);\n\t\t\t\t\tresult_tree.goal_board(s);\n\t\t\t\t\treturn true;\n\t\t\t\t}else if(!(vertex_check.contains(s.board_string))){\n\t\t\t\t\tvertex_check.add(s.board_string);\n\t\t\t\t\tnode_queue.enqueue(s);\n\t\t\t\t\tresult_tree.insert(v,s);\n\t\t\t\t}else{\n\t\t\t\t\t//ignore\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean solve(){\n\t\t//Solve the puzzle using backtrack method\n\t\treturn solve(0,0);\n\t}", "private boolean solveNext(){\n Stack<Integer[]> emptyPositions = findEmptyPositions();\n\n while (!emptyPositions.isEmpty()) {\n\n //get the top empty position from the stack.\n Integer[] position = emptyPositions.peek();\n int row = position[0];\n int col = position[1];\n\n for (int value = 1; value <= size; value++) {\n if (isPositionValid(row, col, value)){\n\n //value is valid, we can set it to the board.\n board[row][col] = value;\n\n //recursive backtracking\n if(solveNext()) {\n\n //if the value leads to a solution, pop it from the stack.\n emptyPositions.pop();\n return true;\n }\n else board[row][col] = 0;\n\n }\n }\n return false;\n }\n return true;\n }", "public static boolean isSolved(int[][] board) {\n\t\tfor(int i = 0; i < 9; i++) {\n\t\t\tfor(int j = 0; j < 9; j++) {\n\t\t\t\tif(board[i][j] < 1) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//rows\n\t\tfor(int i = 0; i < 9; i++) {\n\t\t\tif(!checkRow(board, i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//columns\n\t\tfor(int i = 0; i < 9; i++) {\n\t\t\tif(!checkCol(board, i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//cells\n\t\tfor(int r = 0; r < 3; r++) {\n\t\t\tfor(int c = 0; c < 3; c++) {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn true;\n\t}", "public boolean solve() {\n Cell openCell = getOpenCell();\n if (openCell == END) {\n return true;\n }\n for (int n = 1; n < 10; n++) {\n if (isSafe(openCell.row, openCell.col, n)) {\n add(openCell, n);\n if (solve()) {\n return true;\n }\n add(openCell, 0); // reset\n }\n }\n\n return false;\n }", "public boolean isSolvable() {\n\t\tfor (Cell[] cellRow : board) {\n\t\t\tfor (Cell cell : cellRow) {\n\t\t\t\t// not solvable if empty with no possible values\n\t\t\t\tif (cell.val==0 && cell.pval.size()==0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean solve(){\n // Go through the grid\n for(int row = 0; row < 5; row++){\n for(int col = 0; col < 5; col++){\n // If there is a free space, try and fill it\n if(numberGrid[row][col] == 0){\n for(int num = 1; num <=5; num++){\n if(isValid(num, row, col)) { // if number is valid fill it in\n numberGrid[row][col] = num;\n if(solve()){\n return true;\n }\n else{\n numberGrid[row][col] = 0; // reset number if no solution from this point\n }\n }\n }\n return false;\n }\n }\n }\n return true;\n }", "public boolean solve(){\n\t\treturn solve(0,0);\n\t}", "public static boolean solved(BaseBoard x)\r\n\t\t{\r\n\t\t//get the board\r\n\t\tint [][] board = x.getBoard();\r\n\t\t\t//row\r\n\t\t\tfor (int i = 0; i <board.length;i++)\r\n\t\t\t{\r\n\t\t\t\t//column\r\n\t\t\t\tfor (int j= 0; j< board[0].length ; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t//if the value in the slot is a zero then try to find the right value for it\r\n\t\t\t\t\tif(x.getBoard()[i][j] == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//valid values k 1-9\r\n\t\t\t\t\t\tfor(int k = 1; k <10; k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//check if constraints are met\r\n\t\t\t\t\t\t\tif(good(board, i, j, k))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tx.fillSpot(k, i, j);\r\n\t\t\t\t\t\t\t\t//if the value k does not mess up the contraints then put it into the slot [i][j]\r\n\t\t\t\t\t\t\t\tif(solved(x))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tx.fillSpot(0, i, j);\r\n\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}return false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}return true;\r\n\t\t}", "public boolean isWinnable() {\n Solver<ArrayList<Integer>> mySolver =\n new Solver<ArrayList<Integer>>();\n ArrayList<ArrayList<Integer>> Solution =\n mySolver.SolveBFS(this);\n\n //Reset 'tried' to none\n tried = new HashSet<ArrayList<Integer>>();\n\n if(Solution.size() == 0) {\n //No Solution\n return false;\n }\n return true;\n }", "public boolean isSolvable() {\n return solution != null || initialNode.board.isGoal();\n }", "public boolean solvable() {\n // TODO: Your code here\n // TODO: NICK\n\n\n int parity = 0;\n int blankRow = 0; // the row with the blank tile\n\n\n for (int i = 0; i < n*n; i++){\n if(tiles[i/n][i%n] == 0){\n blankRow = i/3;\n continue;\n }\n for (int j = i + 1; j < n*n; j++) {\n if (tiles[i/n][i%n] > tiles[j/n][j%n] && tiles[j/n][j%n] != 0) {\n parity++;\n }\n }\n }\n\n\n\n // solvability conditions:\n if (n % 2 == 0) { // even grid\n if (blankRow % 2 == 0) { // blank on odd row; counting from bottom\n return parity % 2 == 0;\n } else { // blank on even row; counting from bottom\n return parity % 2 != 0;\n }\n } else { // odd grid\n return parity % 2 == 0;\n }\n }", "public boolean isPuzzleSolved() {\n\t\t// check rows/col/block )\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tif ((this.constraints[i][0].nextClearBit(1) < N + 1) || (this.constraints[0][i].nextClearBit(1) < N + 1)\n\t\t\t\t\t|| (this.constraints[N + 1][i].nextClearBit(1) < N + 1))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean solve(int row, int col){\n\n if (col >= 9){\n return true;\n }\n\t\n\t\t\n\t\t// If the cell is not empty and the number is not preset\n\t\t//\tskip to the next number\n\t\tif( puzzle[row][col] != 0 ){\n\t\t\tif(row == 8){\n\t\t\t\tif(solve(0,col+1)){\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(solve(row+1,col)){\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\t \n\t\t\n\t // Find a valid number for the empty cell\n\t\tfor( int num = 1; num <= MAX_VALUE; num++ ){\n\t\t\t\n\t\t if( validate(row,col,num) )\n\t\t {\n\t\t \tpuzzle[row][col] = num ;\n\t\t\n\t\t \t\n\t\t \t// next number\t\t \t\n\t \t\tif(row == 8){\n\t\t\t\t\tif(solve(0,col+1)){\n\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(solve(row+1,col)){\n\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t \t\t\n\t \t\t// No solution found\n\t \t\tpuzzle[row][col] = 0;\n\t\t }\n\t\t}\n\t\treturn false;\t\t\t\n\t\n\t}", "@Override\r\n\tpublic boolean solve(Board board){\r\n\t\t solve(board, 0);\r\n\t\t if(multiList.isEmpty()){\r\n\t\t\t return true;\r\n\t\t }\r\n\t\t else{\r\n\t\t\t return false;\r\n\t\t }\r\n\t}", "public boolean isSolved(){\n\t\t// if any of row, col, and block contains 1,2,...,size*size,\n\t\t// then the sudoku is solved\n\t\tList<Integer> correctArray = new ArrayList<Integer>(size*size);\n\t\tfor (int i = 0; i < size*size; i++){\n\t\t\tcorrectArray.add(i+1);\n\t\t}\n\t\tfor (int n = 0; n < size*size; n++){\n\t\t\tif (!(this.getRowAsList(n).containsAll(correctArray)))\n\t\t\t\treturn false;\n\t\t\tif (!(this.getColAsList(n).containsAll(correctArray)))\n\t\t\t\treturn false;\n\t\t\tif (!(this.getBlockAsList(n).containsAll(correctArray)))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static boolean isBasicJumpValid(int[][] board, int player, int fromRow, int fromCol, int toRow, int toCol) {\r\n\t\t\r\n\t\tboolean ans = false;\r\n\t\t//is the impot is legal\r\n\t\tif(fromRow<8&fromCol<8&toRow<8&toCol<8&fromRow>-1&fromCol>-1&toRow>-1&toCol>-1&player>-2&player<2&player!=0){\r\n\t\t\tif (board [toRow][toCol]==0){/*is the target slot avalibel*/\r\n\t\t\t\tif (board[fromRow][fromCol]==1||board[fromRow][fromCol]==2){/*is the player is red*/\t\t\t\r\n\t\t\t\t\tif((board[(fromRow+toRow)/2][(fromCol+toCol)/2]==-1)||(board[(fromRow+toRow)/2][(fromCol+toCol)/2]==-2)){/*is thier enemy solduers between the begning and the target*/\r\n\t\t\t\t\t\tif (board[fromRow][fromCol]==1){/*is thie simpol soldiuer in the bignning slot*/\r\n\t\t\t\t\t\t\tif(fromRow==toRow-2&&(fromCol==toCol+2||fromCol==toCol-2)){/*is eating diagonally upward and the move is two square*/\r\n\t\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{/*is thir queen in the starting slot*/\r\n\t\t\t\t\t\t\tif(((fromRow==toRow+2)||(fromRow==toRow-2))&&((fromCol==toCol+2)||(fromCol==toCol-2))){\r\n\t\t\t\t\t\t\t\t/*if is eating diagonally and the move is two square*/\r\n\t\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (board[fromRow][fromCol]==-1|board[fromRow][fromCol]==-2){/*is the solduer is blue*/\r\n\t\t\t\t\tif((board[(fromRow+toRow)/2][(fromCol+toCol)/2]==1)||(board[(fromRow+toRow)/2][(fromCol+toCol)/2]==2)){/*thie is an enemu betwen the teget and the begning*/\r\n\t\t\t\t\t\tif (board[fromRow][fromCol]==-1){\r\n\t\t\t\t\t\t\tif(fromRow==toRow+2&&(fromCol==toCol+2||fromCol==toCol-2)){/*is eating diagonally downward and the move is two square*/\r\n\t\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tif(((fromRow==toRow+2)||(fromRow==toRow-2))&&((fromCol==toCol+2)||(fromCol==toCol-2))){\r\n\t\t\t\t\t\t\t\t/*if is eating diagonally and the move is two square*/\r\n\t\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ans;\r\n\t}", "public boolean solve() {\r\n\r\n\tint nextBox = findLeast();\r\n\t//coors for the least box\r\n\tint c = nextBox % 10;\r\n\tint r = nextbox/10;\r\n\t\r\n\r\n\t//look for least\r\n\t//for the numbers in the least box\r\n\t//assignT == true \r\n\t//check the max; if max is 100; well done! return true\r\n\t//if its not then if (solve() == true) again\r\n\t//if \r\n }", "private boolean checkFinalPuzzle() throws Exception {\n for(int i = 0; i < puzzle.getColumns(); ++i) {\n var clues = puzzle.getColumnClue(i);\n var solver_col = searchBoard.getFilledGroups(i, TraversalType.COLUMN);\n if(clues.size() != solver_col.size()) {\n return false;\n }\n for(int j = 0; j < clues.size(); ++j) {\n if(!clues.get(j).equals(solver_col.get(j))) {\n return false;\n }\n }\n }\n for(int i = 0; i < puzzle.getRows(); ++i) {\n var clues = puzzle.getRowClue(i);\n var solver_row = searchBoard.getFilledGroups(i, TraversalType.ROW);\n if(clues.size() != solver_row.size()) {\n return false;\n }\n for(int j = 0; j < clues.size(); ++j) {\n if(!clues.get(j).equals(solver_row.get(j))) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean isXsolution() {\n\t\tfor (int k=1; k<size*size; k++) {\n\t\t\tint count1 = 0;\n\t\t\tint count2 = 0;\n\t\t\tfor (int l=0; l<size*size; l++) {\n\t\t\t\tif (board[l][l]==k) count1++;\n\t\t\t\tif (board[l][size*size-l-1]==k) count2++;\n\t\t\t}\n\t\t\tif (count1!=1 || count2!=1) return false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isGoal() {\n boolean result = false; \n for (int i = 0; i < this.N; i++) {\n for (int j = 0; j < this.N; j++) {\n int idx = (i * this.N) + (j + 1);\n if (idx != N * N - 1 && tiles[i][j] != idx) {\n return false;\n } \n if (idx == N * N - 1) {\n if (tiles[N - 1][N - 1] == 0) return true;\n return false;\n }\n }\n }\n return result;\n }", "public boolean isSolvable()\n {\n return moves() >= 0;\n }", "public boolean isSolvable() {\n int inversions = 0;\n int zrow = 0;\n int beg;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (tiles[i][j] == 0)\n zrow = i;\n else {\n for (int k = i; k < n; k++) {\n beg = (k == i)? j+1 : 0;\n for (int l = beg; l < n; l++) {\n if (tiles[i][j] != 0 && tiles[k][l] != 0 && tiles[i][j] > tiles[k][l])\n inversions++;\n }\n }\n }\n }\n }\n if (n%2 == 1)\n return (inversions%2 == 0);\n return ((inversions+zrow)%2 == 1);\n }", "public void trySolve() {\n\t\tboolean change = true;\n\t\twhile (change) {\n\t\t\tchange = boardSolve();\n\t\t}\n\t}", "private boolean isValidSolitaireBoard() {\n \n /**\n \u0016The number of piles should be greater than or equal to zero but smaller than piles.length\n should be true\n */\n boolean containsPiles = numPiles >= 0 && numPiles < piles.length;\n \n /**\n The number of piles should be equal to the CARD_TOTAL.\n should be true\n */\n boolean pilesSizeEqualCardTotal = (piles.length == CARD_TOTAL);\n \n /**\n None of the elements in the partially filled array is equal to zero\n should be true\n */\n boolean pilesDoesntContainZeros = true;\n \n /**\n The card sum is equal to the card total\n should be true\n */\n boolean cardSumEqualCardTotal = true;\n \n \n if (containsPiles && pilesSizeEqualCardTotal){\n int cardSum = 0;\n for (int i = 0; i < numPiles; i++){\n cardSum += piles[i];\n //checks if array has any zeros\n if (piles [i] == 0)\n pilesDoesntContainZeros = false;\n }\n //check if the card sum is equal to the card total\n if (cardSum != CARD_TOTAL){\n cardSumEqualCardTotal = false;\n }\n }\n \n //returns true if all true\n return containsPiles && pilesSizeEqualCardTotal && cardSumEqualCardTotal &&\n pilesDoesntContainZeros;\n }", "public boolean isSolved() {\n\t\tboolean solved = true;\n\t\tfor (int row = 0; row < Sudoku.ROWS; row++ ) {\n\t\t\tfor (int col = 0; col < Sudoku.COLUMNS; col++) {\n\t\t\t\tVariable var = Sudoku.grid[row][col];\n\t\t\t\tif (!var.isFound()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\treturn solved;\n\t}", "public boolean hasSolved()\r\n {\r\n for (Food food : getFoods())\r\n {\r\n //if food is moving the board is not solved yet\r\n if (food.hasVelocity())\r\n return false;\r\n \r\n //if the food is still in the playing area the board is not solved yet\r\n if (food.getRow() <= VALID_ROWS)\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "public boolean isSolvable()\n {\n if (goalNode!=null && goalNode.board.isGoal()){\n return true;\n }\n return false;\n\n }", "public boolean solve()\n\t{\n Position[] pos=path.getLastStep().neighbors();\n if (grid.isOnBoundary(path.getLastStep())&&grid.isOpen(path.getLastStep()))\n\t\treturn true;\n if (path.getLastStep()==start)\n return false;\n for (int i=0;i<4;i++)\n {\n if (pos[i]!=path.getLastStep() && grid.isOpen(pos[i]))\n path.extend(pos[i]);\n }\n if (grid.isBlocked(path.getLastStep())||grid.isRejected(path.getLastStep()))\n {\n path.backUp();\n solve();\n }\n return false;\n \n\t}", "public boolean isGameSolved() {\n Block[] blocks = board.getBlocks();\n\n for (Block block: blocks) {\n if (!isBlockSolved(block))\n return false;\n }\n\n for (int r = 0; r < 9; r++) {\n if (!isRowSolved(this.board, r)) {\n return false;\n }\n }\n\n for (int c = 0; c < 9; c++) {\n if (!isColumnSolved(this.board, c)) {\n return false;\n }\n }\n\n return true;\n }", "public boolean solve(final int startRow, final int startCol) {\r\n\r\n // TODO\r\n // validate arguments: ensure position is within maze area\r\n\r\n if(mazeData [startRow][startCol] == WALL) {\r\n throw new IllegalArgumentException(\" we're in a wall buddy\");\r\n }\r\n else if (startRow > mazeData.length-1 || startCol > mazeData.length-1 ){\r\n throw new IllegalArgumentException(\" we're out of bounds \");\r\n }\r\n\r\n\r\n\r\n\r\n\r\n // TODO create local class for row/col positions\r\n class Position {\r\n private int row;\r\n private int col;\r\n\r\n // TODO add instance variables\r\n public Position(final int row, final int col) {\r\n this.row = row;\r\n this.col= col;\r\n }\r\n\r\n\r\n\r\n // TODO toString if desired\r\n public String toString() {\r\n return \"Row: \" + this.row + \"Column: \"+ this.col;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n // define the stack (work queue)\r\n final var queue = Collections.asLifoQueue(new LinkedList<Position>());\r\n //Queue<Position> queue = new LinkedList<Position>(); // EXTRA CREDIT PART 2\r\n\r\n // put starting position in queue\r\n queue.add(new Position(startRow, startCol));\r\n\r\n\r\n\r\n\r\n\r\n // look for a way out of the maze from the current position\r\n while (!queue.isEmpty()) {\r\n\r\n\r\n final Position pos = queue.remove();\r\n\r\n // if this is a wall, then ignore this position (and skip the remaining steps of the loop body)\r\n if (mazeData [pos.row][pos.col]== WALL){\r\n continue; // jumps to next spot in que , by skipping to next iteration of loops by saying continue\r\n }\r\n\r\n\r\n // otherwise mark this place as visited (drop a breadcrumb)\r\n if (mazeData [pos.row][pos.col]== VISITED){\r\n continue; // jumps to next spot in que , by skipping to next iteration of loops by saying continue\r\n }\r\n else if(mazeData [pos.row][pos.col]== EMPTY){\r\n mazeData [pos.row][pos.col]= VISITED;\r\n }\r\n\r\n // if we're already on the perimeter, then this is a way out and we should return success (true) right away\r\n if (pos.row == 0|| pos.col ==0 || pos.row == mazeData.length-1 || pos.col == mazeData[0].length-1){\r\n mazeData[startRow][startCol] = START;\r\n return true;\r\n }\r\n\r\n queue.add(new Position(pos.row+1,pos.col ));//down\r\n queue.add(new Position(pos.row-1,pos.col ));//up\r\n queue.add(new Position(pos.row,pos.col-1 )); //left\r\n queue.add(new Position(pos.row, pos.col + 1)); //right\r\n\r\n\r\n }//end of while\r\n\r\n\r\n\r\n // mark starting position\r\n mazeData[startRow][startCol] = START;\r\n\r\n // if we've looked everywhere but haven't gotten out, then return failure (false)\r\n return false;\r\n }", "public static boolean hasWinningMove(int[][] gamePlay){\n\t\tfor(int i=0;i<4;i++){\n\t\t\tfor(int j=0;j<4;j++){\n\t\t\t\tif(gamePlay[i][j]==1){\n\t\t\t\t\tfor(int k=1;k<9;k++){\n\t\t\t\t\t\tint[] root={i,j};\n\t\t\t\t\t\tint[] root1={i,j};\n\t\t\t\t\t\tint[] source=root;\n\t\t\t\t\t\tsource=calculatePosition(root,k);\n\t\t\t\t\t\t//System.out.println(\"Looking in direction \"+k+\" For root\"+i+\",\"+j);\n\t\t\t\t\t\tif(isValidLocation(source)){ \n\t\t\t\t\t\t\tif(gamePlay[source[0]][source[1]]==1){\n\t\t\t\t\t\t\t\tint[] newSource=calculatePosition(source,k);\n\t//System.out.println(\"Two contigous isValid:\"+isValidLocation(newSource)+\"newSource(\"+newSource[0]+\",\"+newSource[1]+\")\"+\" gamePlay:\"+(isValidLocation(newSource)?gamePlay[newSource[0]][newSource[1]]:-1));\n\t\t\t\t\t\t\t\tif(isValidLocation(newSource)){ \n\t\t\t\t\t\t\t\t\tif(gamePlay[newSource[0]][newSource[1]]==0){\n\t\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Looking in opposite direction\");\n\t\t\t\t\t\t\t\t\t//Lookup in opposite direction\n\t\t\t\t\t\t\t\t\tnewSource=calculatePosition(root1,9-k);\n\t\t\t\t\t\t\t\t\tif(isValidLocation(newSource) && gamePlay[newSource[0]][newSource[1]]==1){\n\t\t\t\t\t\t\t\t\t\t//System.out.println(\"Valid Location:\"+newSource[0]+\" \"+newSource[1]+\" gamePlay\"+gamePlay[newSource[0]][newSource[1]]);\n\t\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\t}else if(gamePlay[source[0]][source[1]]==0){\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Looking for alternate\");\n\t\t\t\t\t\t\t\t\tsource=calculatePosition(source,k);\n\t\t\t\t\t\t\t\t\tif(isValidLocation(source) && gamePlay[source[0]][source[1]]==1){\n\t\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//System.out.println(\"Invalid direction or no move here isValid:\"+isValidLocation(source)+\"Source(\"+source[0]+\",\"+source[1]+\")\"+\" gamePlay:\"+(isValidLocation(source)?gamePlay[source[0]][source[1]]:-1));\n\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}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean ratinamaze(int[][] arr) {\n int[][] mazeTravel = new int[arr.length][arr.length]; //square matrix if arr[i][j] =1 already traveled\n return solution(arr, mazeTravel, 0, 0); //arr[i][j] =0 not traveled\n }", "public boolean solveSudoku(char[][] board) {\n//\t\tint[][] Blank = new int[9][9]; // matrix for store the available blank spot and possible value\n//\t\tfor(int i=0;i<9;i++)\n//\t\t\tfor(int j=0;j<9;j++)\n//\t\t\t\tBlank[i][j]=0;\n\t\tMap<Integer,List<Integer>> Blank=sudokuFindBlank(board);\n \t//Stack<Integer> pos=new Stack<Integer>();\n \t\treturn solveSudokuRecur(board,Blank) ;\n \t\t\t \t \t\n\t}", "public boolean play(int[][] board) //the recursive definition of fillling the board with valid moves\n {\n for (int r = 0; r < board.length; r++) //n\n {\n for (int c = 0; c < board.length; c++) //n\n { \n if (board[r][c] == 0) //1\n {\n for (int y = 1; y <= 9; y++) //n\n {\n if (safeRow(y, board, r) && safeCol(y, board, c) && safeBox(y, board, r, c)) //3n\n { \n board[r][c] = y; //fill cell with the given value (1-9) //1\n\n if (play(board))\n { //1\n return true; //1\n }\n else \n {\n board[r][c] = 0; //reset cell to 0\n }\n }\n } \n return false; //backtracking\n }\n }\n }\n return true; //returns true if board is completely filled with valid numbers //1\n }", "public boolean isSolved() {\n\t\tfor (int i=0; i<size*size; i++) {\n\t\t\tif (inRow(0, i) || inCol(0,i) || inBox(0,i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isGoal() {\n for (int row = 0; row < N; ++row) {\n for (int col = 0; col < N; ++col) {\n final int goalValue;\n if (row == N - 1 && col == N - 1) {\n goalValue = 0;\n }\n else {\n goalValue = N * row + col + 1;\n }\n if (tiles[row][col] != goalValue) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean solve()\n\t{\n\t\t// Call the internal solver with the initial values\n\t\treturn solve(numberOfDiscs, poles[0], poles[1], poles[2]);\n\t}", "public boolean generateSolution() {\n //first clear all filled in fields by user (they could be wrong)\n clearGame();\n\n //use solver\n SudokuSolver solver = new BacktrackSolver();\n return solver.solveSudoku(this);\n }", "public static boolean isBasicMoveValid(int[][] board, int player, int fromRow, int fromCol, int toRow, int toCol) {\r\n\t\t\t\r\n\t\tboolean ans = false;\r\n\t\t\r\n\t\t/*Checking if coordinates are OK*/\r\n\t\tif(fromRow<8&fromCol<8&toRow<8&toCol<8&fromRow>-1&fromCol>-1&toRow>-1&toCol>-1&player>-2&player<2&player!=0){\r\n\t\t\tif (board [toRow][toCol]==0){/*Checks if the tile is empty*/\r\n\t\t\t\tif (player==1){/*Checks if player is red*/\r\n\t\t\t\t\tif (board[fromRow][fromCol]==1){/*Checks if in tile there is soldier red */\r\n\t\t\t\t\t\tif(fromRow==toRow-1&&(fromCol==toCol+1||fromCol==toCol-1)){/*Did he move diagonally upward*/\r\n\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\tif (board[fromRow][fromCol]==2){/*Checks if in tile there is queen red*/\r\n\t\t\t\t\t\tif(((fromRow==toRow+1)||(fromRow==toRow-1))&&((fromCol==toCol+1)||(fromCol==toCol-1))){/*Did he move diagonally */\r\n\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\tif (player==-1){/*Checks if player is blue*/\r\n\t\t\t\t\tif (board[fromRow][fromCol]==-1){/*Checks if in tile there is soldier blue */\r\n\t\t\t\t\t\tif(fromRow==toRow+1&(fromCol==toCol+1||fromCol==toCol-1)){/*Did he move diagonally down*/\r\n\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (board[fromRow][fromCol]==-2){/*Checks if in tile there is queen blue*/\r\n\t\t\t\t\t\tif(((fromRow==toRow+1)||(fromRow==toRow-1))&&((fromCol==toCol+1)||(fromCol==toCol-1))){/*Did he move diagonally */\r\n\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ans;\r\n\t}", "public boolean solve (int row, int column) {\n\n boolean done = false;\n \n if (valid (row, column)) {\n\n grid[row][column] = 3; // cell has been tried\n\n if (row == grid.length-1 && column == grid[0].length-1)\n done = true; // maze is solved\n else {\n done = solve (row+1, column); // down\n if (!done)\n done = solve (row, column+1); // right\n if (!done)\n done = solve (row-1, column); // up\n if (!done)\n done = solve (row, column-1); // left\n }\n if (done) // part of the final path\n grid[row][column] = 7;\n }\n \n return done;\n\n }", "protected boolean solve(int currentRow, int currentColumn) {\n \tint currentBlock = m.maze[currentRow][currentColumn];\t\t\t\t\t\t\t// get the current block that we are on\r\n \t\r\n if (m.isBlockEmpty(currentBlock)) {\t\t\t\t\t\t\t\t\t\t\t\t// make sure current block is empty\r\n \tm.maze[currentRow][currentColumn] = 2; \t\t\t\t\t\t\t\t// add this block to the path as a potential solution\r\n repaint();\r\n \r\n m.blocksTraversed++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// keep track of how many blocks were traversed over\r\n \r\n if (currentRow == m.rows-2 && currentColumn == m.columns-2) {\t\t\t\t// current block is bottom right, path has been found\r\n \tGUI.ta.append(m.blocksTraversed + \" blocks were traversed while solving the maze.\\n\");\r\n \tdouble percentage = (((double) m.blocksTraversed / (m.rows * m.columns))*100) * 2;\r\n DecimalFormat f = new DecimalFormat(\"##.00\");\r\n \tGUI.ta.append(\"This results in \" + f.format(percentage) + \"% of the maze being traveled.\\n\");\r\n \treturn true;\r\n }\r\n \r\n try { Thread.sleep(1); }\r\n catch (InterruptedException e) { }\r\n \r\n int topBlock = currentRow - 1;\t\t\t\t\t\t\t\t\t\t\t\t// block directly above the current block\r\n int leftBlock = currentColumn - 1;\t\t\t\t\t\t\t\t\t\t\t// block directly left of the current block\r\n int bottomBlock = currentRow + 1;\t\t\t\t\t\t\t\t\t\t\t// block directly below the current block\r\n int rightBlock = currentColumn + 1;\t\t\t\t\t\t\t\t\t\t\t// block directly right of the current block\r\n \r\n if (solve(topBlock, currentColumn) || solve(currentRow, leftBlock) ||\t\t// a solution was found\r\n \tsolve(bottomBlock, currentColumn) || solve(currentRow, rightBlock))\r\n \treturn true;\r\n \r\n m.maze[currentRow][currentColumn] = 4; \t\t\t\t\t\t\t\t\t// no solution from current block so make the block visited instead\r\n repaint();\r\n \r\n synchronized(this) {\r\n try { wait(1); }\r\n catch (InterruptedException e) { }\r\n }\r\n }\r\n return false;\r\n }", "public static boolean isValid(int[][] board)\r\n\t{\r\n\t\t// Verifie les lignes et les colonnes\r\n\t\tfor (int i = 0; i < board.length; i++)\r\n\t\t{\r\n\t\t\tBitSet bsRow = new BitSet( 9);\r\n\t\t\tBitSet bsColumn = new BitSet( 9);\r\n\t\t\tfor (int j = 0; j < board[i].length; j++)\r\n\t\t\t{\r\n\t\t\t\tif (board[i][j] == 0 || board[j][i] == 0)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tif (bsRow.get( board[i][j] - 1) || bsColumn.get( board[j][i] - 1))\r\n\t\t\t\t\treturn false;\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbsRow.set( board[i][j] - 1);\r\n\t\t\t\t\tbsColumn.set( board[j][i] - 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Verifie la taille de la grile\r\n\t\tfor (int rowOffset = 0; rowOffset < 9; rowOffset += 3)\r\n\t\t{\r\n\t\t\tfor (int columnOffset = 0; columnOffset < 9; columnOffset += 3)\r\n\t\t\t{\r\n\t\t\t\tBitSet threeByThree = new BitSet( 9);\r\n\t\t\t\tfor (int i = rowOffset; i < rowOffset + 3; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor (int j = columnOffset; j < columnOffset + 3; j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (board[i][j] == 0)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tif (threeByThree.get( board[i][j] - 1))\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tthreeByThree.set( board[i][j] - 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Renvoie Vrai\r\n\t\treturn true;\r\n\t}", "public int[][] findSolution(){\n this.hasSolution = false;\n BoardStatus solution = findSolution(1, new BoardStatus(boardSize, this.initialPosition));\n if (solution == null){\n return null;\n }\n return solution.geBoard();\n }", "public boolean isGoal() {\n return hamming() == 0; // Board is solved if hamming distance is 0\n }", "private boolean isSolvable() {\n\t\tshort permutations = 0; // the number of incorrect orderings of tiles\n\t\tshort currentTileViewLocationScore;\n\t\tshort subsequentTileViewLocationScore;\n\n\t\t// Start at the first tile\n\t\tfor (int i = 0; i < tiles.size() - 2; i++) {\n\t\t\tTile tile = tiles.get(i);\n\n\t\t\t// Determine the tile's location value\n\t\t\tcurrentTileViewLocationScore = computeLocationValue(tile\n\t\t\t\t\t.getCorrectLocation());\n\n\t\t\t// Compare the tile's location score to all of the tiles that\n\t\t\t// follow it\n\t\t\tfor (int j = i + 1; j < tiles.size() - 1; j++) {\n\t\t\t\tTile tSub = tiles.get(j);\n\n\t\t\t\tsubsequentTileViewLocationScore = computeLocationValue(tSub\n\t\t\t\t\t\t.getCorrectLocation());\n\n\t\t\t\t// If a tile is found to be out of order, increment the number\n\t\t\t\t// of permutations.\n\t\t\t\tif (currentTileViewLocationScore > subsequentTileViewLocationScore) {\n\t\t\t\t\tpermutations++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// return whether number of permutations is even\n\t\treturn permutations % 2 == 0;\n\t}", "@Override\n\tpublic boolean isSolved () {\n\t\tCube222 solved = new Cube222();\n\t\tfor ( int ctr = 0 ; ctr < state_.length ; ctr++ ) {\n\t\t\tif ( state_[ctr].id() != ctr\n\t\t\t || state_[ctr].frontback() != solved.state_[ctr].frontback()\n\t\t\t || state_[ctr].updown() != solved.state_[ctr].updown()\n\t\t\t || state_[ctr].leftright() != solved.state_[ctr].leftright() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isSolvable() {\n return moves != -1;\n }", "public boolean checkEquality(){\n boolean flag = true;\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(this.currentBoardState[i][j] != this.goalBoardState[i][j]){\n flag = false;\n }\n }\n }\n return flag;\n }", "private boolean checkSolveSudoku() {\n\n // Check Rows\n for (int i = 0; i < rows.size(); i++) {\n ArrayList<Cell> row = rows.get(i);\n int[] temp = new int[getSize()];\n\n for (int j = 0; j < row.size(); j++) {\n if (row.get(j).getNumber() == -1)\n return false;\n temp[row.get(j).getNumber() - 1]++;\n }\n\n for (int j : temp)\n if (j == 0)\n return false;\n }\n\n // Check Columns\n for (int i = 0; i < columns.size(); i++) {\n ArrayList<Cell> column = columns.get(i);\n int[] temp = new int[getSize()];\n\n for (int j = 0; j < column.size(); j++)\n temp[column.get(j).getNumber() - 1]++;\n\n for (int j : temp)\n if (j == 0)\n return false;\n }\n\n // Check Boxes\n for (int i = 0; i < boxes.size(); i++) {\n ArrayList<Cell> box = rows.get(i);\n int[] temp = new int[getSize()];\n\n for (int j = 0; j < box.size(); j++)\n temp[box.get(j).getNumber() - 1]++;\n\n for (int j : temp)\n if (j == 0)\n return false;\n }\n\n return true;\n }", "private boolean isResolvable() {\n\t\tfinal int sourceParity = board.calculateParity() % 2;\n\t\tfinal int targetParity = goal.calculateParity() % 2;\n\t\treturn (((sourceParity != 0) && (targetParity != 0)) || ((sourceParity == 0) && (targetParity == 0)));\n\t}", "public boolean isGoal() {\n if (posX != N-1 || posY != N-1) return false;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (matrix[i][j] == 0) continue;\n if (i*N+j+1 != matrix[i][j]) return false;\n }\n }\n return true;\n }", "public boolean isSolution(int sol[], Square adjacents[], int s) {\n\t\tint accumulated=0,total=0; \n\t\tfor (int k = 0; k < sol.length; k++) {\n\t\t\taccumulated += sol[k];\n\t\t\ttotal += posibleAmount(getSquare(adjacents[k]));\n\t\t} \n\t\treturn (accumulated==Integer.min(total, s));\n\t}", "public boolean winCheck(){\n for(int i=0; i<3; i++){//goes through rows\n for(int j=0; j<4; j++){//goes through columns\n if(board[i][j+3] != 0 && board[i+1][j+2] != 0 && board[i+2][j+1] != 0 && \n board[i+3][j] != 0)\n if(board[i][j+3]==(board[i+1][j+2]))\n if(board[i][j+3]==(board[i+2][j+1]))\n if(board[i][j+3]==(board[i+3][j])){\n GBoard[i][j+3].setIcon(star);\n GBoard[i+1][j+2].setIcon(star);\n GBoard[i+2][j+1].setIcon(star);\n GBoard[i+3][j].setIcon(star);\n wonYet=true;\n return true;\n }\n }\n }\n //checks for subdiagonals\n for(int i=0; i<3; i++){//goes through rows\n for(int j=0; j<4; j++){//goes through columns\n if(board[i][j] != 0 && board[i+1][j+1] != 0 && board[i+2][j+2] != 0 &&\n board[i+3][j+3] != 0)\n if(board[i][j] == (board[i+1][j+1]))\n if(board[i][j] == (board[i+2][j+2]))\n if(board[i][j] == (board[i+3][j+3])){\n GBoard[i][j].setIcon(star);\n GBoard[i+1][j+1].setIcon(star);\n GBoard[i+2][j+2].setIcon(star);\n GBoard[i+3][j+3].setIcon(star);\n wonYet=true;\n return true;\n } \n }\n }\n //check horizontals\n for(int i=0; i<6; i++){//goes through rows\n for(int j=0; j<4; j++){//goes through columns\n if(board[i][j] != 0 && board[i][j+1] != 0 && board[i][j+2] != 0 && \n board[i][j+3] != 0){\n if(board[i][j]==(board[i][j+1]))\n if(board[i][j]==(board[i][j+2]))\n if(board[i][j]==(board[i][j+3])){\n GBoard[i][j].setIcon(star);\n GBoard[i][j+1].setIcon(star);\n GBoard[i][j+2].setIcon(star);\n GBoard[i][j+3].setIcon(star);\n wonYet=true;\n return true;\n }\n }\n }\n }\n //checks for vertical wins\n for(int i=0; i<3; i++){//checks rows\n for(int j=0; j<7; j++){//checks columns\n if(board[i][j] != 0 && board[i+1][j] != 0 && board[i+2][j] != 0 && \n board[i+3][j] != 0){\n if(board[i][j]==(board[i+1][j]))\n if(board[i][j]==(board[i+2][j]))\n if(board[i][j]==(board[i+3][j])){\n GBoard[i][j].setIcon(star);\n GBoard[i+1][j].setIcon(star);\n GBoard[i+2][j].setIcon(star);\n GBoard[i+3][j].setIcon(star);\n wonYet=true;\n return true;\n }\n }\n }\n }\n return false; \n }", "static boolean isSolved() {\n\t\tfor (int i=0; i<Play.NUM[TOTAL]; i++) {\t\n\t\t\tif (!isPieceCorrect(Play.jigsawPieces.get(i))) { //check if the piece is in the correct position and orientation\n\t\t\t\treturn false; //return if even once piece is not\n\t\t\t}\n\t\t}\n\t\treturn true; //if the method reached here, then it means that all the pieces are correctly placed\n\t}", "public static boolean checkForObviousMove(char[][] a){\r\n int rowNumber = a.length;\r\n int colNumber = a[0].length;\r\n //AI obvious to win\r\n for (int i = 0; i<rowNumber; i++){\r\n for (int j = 0; j<colNumber; j++){\r\n //check if on diagnol\r\n if (i == j && countDiag1(a, 'o')== (rowNumber-1) && spotIsEmpty(a[i][j])){\r\n writeOnBoard(a,'o',i,j);\r\n return true;\r\n }\r\n if (i+j == rowNumber-1 && countDiag2(a,'o')==(rowNumber-1) && spotIsEmpty(a[i][j])){\r\n writeOnBoard(a,'o',i,j);\r\n return true;\r\n }\r\n //check on a row\r\n if(countRow(a[i], 'o') == (colNumber-1) && spotIsEmpty(a[i][j])){\r\n writeOnBoard(a,'o',i,j);\r\n return true;\r\n }\r\n //check on a column\r\n if(countCol(a,j,'o') == (rowNumber-1) && spotIsEmpty(a[i][j])){\r\n writeOnBoard(a,'o',i,j);\r\n return true;\r\n }\r\n }\r\n }\r\n //when user obvious to win\r\n for (int i = 0; i<rowNumber; i++){\r\n for (int j = 0; j<colNumber; j++){\r\n //check if on diagnol\r\n if (i == j && countDiag1(a, 'x')== (rowNumber-1) && spotIsEmpty(a[i][j])){\r\n writeOnBoard(a,'o',i,j);\r\n return true;\r\n }\r\n if (i+j == rowNumber-1 && countDiag2(a,'x')==(rowNumber-1) && spotIsEmpty(a[i][j])){\r\n writeOnBoard(a,'o',i,j);\r\n return true;\r\n }\r\n //check on a row\r\n if(countRow(a[i], 'x') == (colNumber-1) && spotIsEmpty(a[i][j])){\r\n writeOnBoard(a,'o',i,j);\r\n return true;\r\n }\r\n //check on a column\r\n if(countCol(a,j,'x') == (rowNumber-1) && spotIsEmpty(a[i][j])){\r\n writeOnBoard(a,'o',i,j);\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public boolean couldSolve(char[][] board, int r, int c, int num) {\n if (row.get(r) != null && row.get(r).contains(num)) return false;\n if (col.get(c) != null && col.get(c).contains(num)) return false;\n if (block.get(getBlock(r, c)) != null && block.get(getBlock(r, c)).contains(num)) return false;\n\n return true;\n }", "public void solve(char[][] board) {\n\t\tMap<Integer, Boolean> resultRepo = new HashMap<Integer, Boolean>();\n\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tchar[] row = board[i];\n\t\t\tfor (int j = 0; j < row.length; j++) {\n\t\t\t\t// The edge\n\t\t\t\tif (j == row.length - 1 || i == board.length - 1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tList<Integer> footPrints = new LinkedList<Integer>();\n\t\t\t\tif (isSurrounded(i, j, board, footPrints, resultRepo)) {\n\t\t\t\t\tboard[i][j] = 'X';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private boolean winningBoard(char[][] board){\n for(int i = 0; i < boardHeight; i++ ){\n for(int j = 0; j < boardWidth; j++) {\n\n //if white was made it to the other side\n if(board[i][j] == 'P' && i == 0){\n return true;\n }\n\n //if black has made it to the other side\n if(board[i][j] == 'p' && i == boardHeight -1){\n return true;\n }\n }\n }\n //no winners\n return false;\n }", "private static boolean solution(int[][] arr, int[][] mazeTravel, int row, int column) {\n\n int size = arr.length;\n\n if (row < 0 || row >= size || column < 0 || column >= size || arr[row][column] == 0 || mazeTravel[row][column] == 1 ) {\n return false;\n }\n //Mark position as travelled\n mazeTravel[row][column] = 1;\n //Check if reached destination\n if(row== arr.length-1&&column== arr.length-1){\n return true;\n }\n //Top direction\n if (solution(arr, mazeTravel, row - 1, column) ) {\n return true;\n }\n //Right direction\n if (solution(arr, mazeTravel, row, column + 1)) {\n return true;\n }\n\n //Left direction\n if (solution(arr, mazeTravel, row, column - 1)) {\n return true;\n }\n\n //Down direction\n if (solution(arr, mazeTravel, row + 1, column)) {\n return true;\n }\n //Above 4 Conditions not satisfied\n return false;\n }", "public boolean isSolvable() {\r\n return solution() != null;\r\n }", "public boolean solveH(int c){\n if(c >= board.length){\n // if all queens are on board return true\n return true;}\n // go through column\n for(int i = 0; i < board.length; i++){\n // if can put queen do so\n if(board[i][c] == 0){\n edit(i, c, true);\n // advance to next column\n if(solveH(c + 1)){\n return true;}\n // if it doesn't work out go back and try underneath\n edit(i, c, false);}}\n // if all attempts don't work return false\n return false;}", "public static boolean isSolution(Grid grid2Test){\r\n\t\tfor(Piece[] linep : grid2Test.getAllPieces()){\r\n\t\t\tfor(Piece p : linep){\r\n\t\t\t\tif(!grid2Test.isTotallyConnected(p)) return false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public Solver(Board initial)\n {\n // validate input to Solver\n if (initial == null) throw new NullPointerException();\n if (!initial.isSolvable()) throw new IllegalArgumentException();\n \n // create first search node with pointer used for each iteration of A*\n step = new SearchNode();\n step.board = initial;\n \n // create new priority queue specifying the priority function\n MinPQ<SearchNode> pq = new MinPQ<SearchNode>(new HammingPriority());\n\n // run A-star search algorithm until goal board is dequeued\n while (!step.board.isGoal()) {\n // runs iterable of neighbors and adds non duplicates to pq\n Iterable<Board> neighbors = step.board.neighbors();\n for (Board b : neighbors) {\n // skips if possible board is duplicate of 2nd board back\n if (step.prev != null) // check not needed for first iteration\n if (b.equals(step.prev.board)) continue;\n \n // creates possible board's node and adds to pq\n SearchNode nextPossibleBoard = new SearchNode();\n nextPossibleBoard.board = b;\n nextPossibleBoard.prev = step;\n nextPossibleBoard.dist = step.dist + 1;\n pq.insert(nextPossibleBoard);\n }\n step = pq.delMin(); // dequeue next step toward goal board\n }\n \n moves = step.dist;\n goalNode = step;\n\n \n }", "private boolean solve(int i, int j){\n\t\tif(j == 9){\n\t\t\tj = 0;\n\t\t\ti++;\n\t\t}\n\t\tif(i == 9){\n\t\t\treturn true;\n\t\t} else if(sudoku[i][j] != 0 && !check(i, j, sudoku[i][j])){\n\t\t\t\treturn false;\n\t\t} else if(sudoku[i][j] != 0){\n\t\t\t\treturn solve(i, j+1);\n\t\t} else {\n\t\t\tfor(int n = 1; n <= 9; n++){\n\t\t\t\tif(check(i, j, n)){\n\t\t\t\t\tsudoku[i][j] = n;\n\t\t\t\t\tif(!solve(i, j+1)){\n\t\t\t\t\t\tsudoku[i][j] = 0;\n\t\t\t\t\t}else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean solveSudoku(int[][] board, int row, int col) {\r\n\r\n\t\tif (row == board.length) {\r\n\t\t\tdisplay(board);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// move to the next row\r\n\t\tif (col == board[0].length)\r\n\t\t\treturn solveSudoku(board, row + 1, 0);\r\n\r\n\t\t// in case the cell already holds a digit\r\n\t\tif (board[row][col] != 0)\r\n\t\t\treturn solveSudoku(board, row, col + 1);\r\n\r\n\t\tfor (int i = 1; i <= 9; i++) {\r\n\r\n\t\t\tif (isPossible(board, row, col, i)) {\r\n\t\t\t\tboard[row][col] = i;\r\n\t\t\t\tboolean ans = solveSudoku(board, row, col + 1);\r\n\r\n\t\t\t\tif (ans)\r\n\t\t\t\t\treturn true;\r\n\r\n\t\t\t\tboard[row][col] = 0;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn false;\r\n\r\n\t}", "void seeIfTrue() {\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tint tempCounter = 0;\n\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\tif (availMoves[i][j][k] == true) {\n\t\t\t\t\t\ttempCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (tempCounter == 1) {\n\t\t\t\t\tSystem.out.println(\"FOUND A SQUARE WITH ONLY ONE POSSIBLE OPTION\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//checking every vertical line if there is some number that has only one number available\n\t\t//for every number\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t//for every line\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\t//for every square\n\t\t\t\tint tempCounter = 0;\n\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\tif (availMoves[j][k][i] == true) {\n\t\t\t\t\t\ttempCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (tempCounter == 1) {\n\t\t\t\t\tSystem.out.println(\"found a vertical line that had an optional input the number \" + (i + 1) + \" at line: \" + j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//checking every vertical line if there is some number that has only one number available\n\t\t//for every number\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t//for every line\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\t//for every square\n\t\t\t\tint tempCounter = 0;\n\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\tif (availMoves[k][j][i] == true) {\n\t\t\t\t\t\ttempCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (tempCounter == 1) {\n\t\t\t\t\tSystem.out.println(\"found a horizontal line that had an optional input the number \" + (i + 1) + \" at line: \" + j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static boolean validMoves(AbstractBoard[] boards )\n\t{\n\t\tint x = boards[0].getSize();\n\t\tint y = boards[0].getWidth();\n\t\tint count = 1;\n\t\tint[][] Final = new int[x][y];\n\t\t\n\t\tfor( int i = 0; i < x; i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < y; j++ )\n\t\t\t{\n\t\t\t\tif( i == x - 1 && j == y - 1)\n\t\t\t\t\tFinal[i][j] = -1;\n\t\t\t\telse\n\t\t\t\t\tFinal[i][j] = count++;\n\t\t\t}\n\t\t}\n\t\tAbstractBoard temp = boards[boards.length - 1];\n\t\t\n\t\tfor( int i = 0; i < x; i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < y; j++ )\n\t\t\t{\n\t\t\t\tif( temp.cell(i, j) != Final[i][j] )\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif( boards.length >= 2) {\n\t\t\tint compareX, compareY;\n\t\t\tfor( int i = 0; i < boards.length - 1; i++)\n\t\t\t{\n\t\t\t\tx = boards[i].getLocationX();\n\t\t\t\ty = boards[i].getLocationY();\n\t\t\t\t\n\t\t\t\tcompareX = boards[i + 1].getLocationX();\n\t\t\t\tcompareY = boards[i + 1].getLocationY();\n\t\t\t\t\n\t\t\t\tif( Math.abs( x - compareX ) != 1 && Math.abs( x - compareX ) != 1)\n\t\t\t\t{\n\t\t\t\t\tif( x != compareX || y != compareY )\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private static boolean solveQueenProblem(int[][] board, int row) {\n\t\tif(row>=N)\n\t\t\treturn true;\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tif(isSafe(board,row,i)) {\n\t\t\t\tboard[row][i]=1;\n\t\t\t\tif(solveQueenProblem(board, row+1))\n\t\t\t\treturn true;\n\t\t\t\telse {\n\t\t\t\t\tboard[row][i]=0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean possible(){\n\t\tboolean psb = false;\n\t\tswitch(direction){\n\t\t\tcase RIGHT:\n\t\t\t\tif(hash_matrix.containsKey(x+1 + y*row_length)){\n\t\t\t\t\tpsb = true;\n\t\t\t\t}else if(hash_matrix.containsKey(x + (y+1)*row_length)){\n\t\t\t\t\tdirection = DOWN;\n\t\t\t\t\tpsb = true;\n\t\t\t\t}else if(hash_matrix.containsKey(x + (y-1)*row_length)){\n\t\t\t\t\tdirection = UP;\n\t\t\t\t\tpsb = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LEFT:\n\t\t\t\tif(hash_matrix.containsKey(x - 1 + y*row_length)){\n\t\t\t\t\tpsb = true;\n\t\t\t\t}else if(hash_matrix.containsKey(x + (y+1)*row_length)){\n\t\t\t\t\tdirection = DOWN;\n\t\t\t\t\tpsb = true;\n\t\t\t\t}else if(hash_matrix.containsKey(x + (y-1)*row_length)){\n\t\t\t\t\tdirection = UP;\n\t\t\t\t\tpsb = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\tif(hash_matrix.containsKey(x + (y-1)*row_length)){\n\t\t\t\t\tpsb = true;\n\t\t\t\t}else if(hash_matrix.containsKey(x + 1 + (y)*row_length)){\n\t\t\t\t\tdirection = RIGHT;\n\t\t\t\t\tpsb = true;\n\t\t\t\t}else if(hash_matrix.containsKey(x - 1 + (y)*row_length)){\n\t\t\t\t\tdirection = LEFT;\n\t\t\t\t\tpsb = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DOWN:\n\t\t\t\tif(hash_matrix.containsKey(x + (y+1)*row_length)){\n\t\t\t\t\tpsb = true;\n\t\t\t\t}else if(hash_matrix.containsKey(x + 1 + y*row_length)){\n\t\t\t\t\tdirection = RIGHT;\n\t\t\t\t\tpsb = true;\n\t\t\t\t}else if(hash_matrix.containsKey(x - 1 + (y)*row_length)){\n\t\t\t\t\tdirection = LEFT;\n\t\t\t\t\tpsb = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\tsteps++;\t\t\t//last step that will generate false also needs to be counted\n\t\treturn psb;\n\t}", "private boolean firstMilestoneAccomplished()\n {\n if(\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4)\n )\n return true;\n else\n return false;\n }", "public SudokuBoard solve() {\n return solve(board);\n }", "public boolean isSolvable() {\n return finalMove != null;\n }", "private boolean check(Board board, char symbol)\n {\n for (int i = 0; i < size; i ++)\n if (checkRow(board, i, symbol))\n return true;\n for (int i = 0; i < size; i++)\n if (checkColumn(board, i , symbol))\n return true;\n if (checkLeftDiagonal(board, symbol))\n return true;\n if (checkRightDiagonal(board, symbol))\n return false;\n return false;\n }", "public static boolean isMoveValid(int[][] board, int player, int fromRow, int fromCol, int toRow, int toCol) {\r\n\t\t\r\n\t\tboolean ans = false;\r\n\t\t\r\n\t\tif (board[toRow][toCol]==0){/*is the target slot ia emtey*/\r\n\t\t\tif (player==1){\r\n\t\t\t\tif (board[fromRow][fromCol]==1||board[fromRow][fromCol]==2){ /*is the starting slot is red player queen olayer solduer*/\r\n\t\t\t\t\tif (isBasicJumpValid(board,player,fromRow,fromCol,toRow,toCol)){/*is the eating is legal*/\r\n\t\t\t\t\t\tans = true;\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tif (canJump(board,player)==false){/*is ther no eating jump?*/\r\n\t\t\t\t\t\t\tif (isBasicMoveValid(board,player,fromRow,fromCol,toRow,toCol)){/*is this is legal move*/\r\n\t\t\t\t\t\t\t\tans = true;\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}\t\t\r\n\t\t\tif (player==-1){\r\n\t\t\t\tif (board[fromRow][fromCol]==-1||board[fromRow][fromCol]==-2){/*is the starting slot is blue player queen olayer solduer*/\r\n\t\t\t\t\tif (isBasicJumpValid(board,player,fromRow,fromCol,toRow,toCol)){/*is the eating is legal*/\r\n\t\t\t\t\t\tans = true;\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tif (canJump(board,player)==false){/*is ther are no eating move*/\r\n\t\t\t\t\t\t\tif (isBasicMoveValid(board,player,fromRow,fromCol,toRow,toCol)){/*is the move is legal*/\r\n\t\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ans;\r\n\t}", "public boolean isWinner() {\n\t\t//initialize row, column, and depth\n\t\tint row = 0;\n\t\tint col = 0;\n\t\tint dep = 0;\n\t\t\n\t\t//Checks for a vertical four in a row\n\t\t//row is restriced from the full size to >=3 to avoid\n\t\t//an out of bounds exception\n\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\tfor(col = 0; col < size; col ++)\n\t\t\t\tfor(dep = 0; dep < size; dep ++) {\n\t\t\t\t\t//a variable check is made to save lines\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\t//checks if the value is a player, and it\n\t\t\t\t\t//qualifies as a vertical win. If it does,\n\t\t\t\t\t//the for loop returns true.\n\t\t\t\t\tif (check != -1\n\t\t\t\t\t\t && check == board[row - 1][col][dep] &&\n\t\t\t\t\t\t\tcheck == board[row - 2][col][dep] &&\n\t\t\t\t\t\t\tcheck == board[row - 3][col][dep] )\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t//check for horizontal four in a row\n\t\t//col is restriced and increasing (+)\n\t\tfor (dep = 0; dep < size; dep ++)\n\t\t\tfor(row = size - 1; row >= 0; row --)\n\t\t\t\tfor(col = 0; col < size - 3; col ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t\t&& check == board[row][col + 1][dep]\n\t\t\t\t\t\t\t&& check == board[row][col + 2][dep] \n\t\t\t\t\t\t\t&& check == board[row][col + 3][dep])\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\t\t//check for x,y upDiagnol four in a row on each depth\n\t\t//row is restricted and decreasing (-)\n\t\t//col is restricted and increasing (+)\n\t\tfor (dep = 0; dep < size; dep ++)\n\t\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\t\tfor(col = 0; col < size - 3; col ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t\t&& check == board[row - 1][col + 1][dep]\n\t\t\t\t\t\t\t&& check == board[row - 2][col + 2][dep]\n\t\t\t\t\t\t\t&& check == board[row - 3][col + 3][dep])\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,y downDiagnol four in a row on each depth\n\t\t//row is restricted and increasing (+)\n\t\t//col is restricted and increasing (+)\n\t\tfor (dep = 0; dep < size; dep ++)\n\t\t\tfor(row = 0; row < size - 3; row ++)\n\t\t\t\tfor(col = 0; col < size - 3; col ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t\t&& check == board[row + 1][col + 1][dep]\n\t\t\t\t\t\t\t&& check == board[row + 2][col + 2][dep]\n\t\t\t\t\t\t\t&& check == board[row + 3][col + 3][dep])\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,z horizontal four in a row on each column\n\t\t//dep is restricted and increasing (+)\n\t\tfor(col = 0; col < size; col ++)\n\t\t\tfor(row = size - 1; row >= 0; row --)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t\t&& check == board[row][col][dep + 1]\n\t\t\t\t\t\t\t&& check == board[row][col][dep + 2]\n\t\t\t\t\t\t\t&& check == board[row][col][dep + 3])\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,z upDiagnol four in a row on ecah column\n\t\t//row is restricted and decreasing (-)\n\t\t//dep is restricted and increasing (+)\n\t\tfor(col = 0; col < size; col ++)\n\t\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t\t&& check == board[row - 1][col][dep + 1]\n\t\t\t\t\t\t\t&& check == board[row - 2][col][dep + 2]\n\t\t\t\t\t\t\t&& check == board[row - 3][col][dep + 3])\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,z downDiagnol four in a row\n\t\t// dep +, row +\n\t\tfor(col = 0; col < size; col ++)\n\t\t\tfor(row = 0; row > size - 3; row ++)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t\t&& check == board[row + 1][col][dep + 1]\n\t\t\t\t\t\t\t&& check == board[row + 2][col][dep + 2]\n\t\t\t\t\t\t\t&& check == board[row + 3][col][dep + 3])\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\t\t//check for x,y,z up diagnol to the top right\n\t\t//row -, col +, dep +\n\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\tfor(col = 0; col < size - 3; col ++)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row - 1][col + 1][dep + 1]\n\t\t\t\t\t\t&& check == board[row - 2][col + 2][dep + 2]\n\t\t\t\t\t\t&& check == board[row - 3][col + 3][dep + 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,y,z up diagnol to the top left\n\t\t//row -, col -, dep +\n\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\tfor(col = size -1; col >= 3; col --)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row - 1][col - 1][dep + 1]\n\t\t\t\t\t\t&& check == board[row - 2][col - 2][dep + 2]\n\t\t\t\t\t\t&& check == board[row - 3][col - 3][dep + 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,y,z up diagnol to the down left\n\t\t//row -, col -, dep -\n\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\tfor(col = size -1; col >= 3; col --)\n\t\t\t\tfor(dep = size - 1; dep >= 3; dep --) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row - 1][col - 1][dep - 1]\n\t\t\t\t\t\t&& check == board[row - 2][col - 2][dep - 2]\n\t\t\t\t\t\t&& check == board[row - 3][col - 3][dep - 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,y,z up diagnol to the down right\n\t\t//row -, col +, dep -\n\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\tfor(col = 0; col < size - 3; col ++)\n\t\t\t\tfor(dep = size - 1; dep >= 3; dep --) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row - 1][col + 1][dep - 1]\n\t\t\t\t\t\t&& check == board[row - 2][col + 2][dep - 2]\n\t\t\t\t\t\t&& check == board[row - 3][col + 3][dep - 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//Same as above, but now row increases rather than decreasing\n\t\t//check for down diagnol from top left to center\n\t\t//row +, col +, dep +\n\t\tfor(row = 0; row > size - 3; row ++)\n\t\t\tfor(col = 0; col < size - 3; col ++)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1\n\t\t\t\t\t\t&& check == board[row + 1][col + 1][dep + 1]\n\t\t\t\t\t\t&& check == board[row + 2][col + 2][dep + 2]\n\t\t\t\t\t\t&& check == board[row + 3][col + 3][dep + 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for down diagnol from top right to center\n\t\t//row + , col -, dep +\n\t\tfor(row = 0; row > size - 3; row ++)\n\t\t\tfor(col = size -1; col >= 3; col --)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row + 1][col - 1][dep + 1]\n\t\t\t\t\t\t&& check == board[row + 2][col - 2][dep + 2]\n\t\t\t\t\t\t&& check == board[row + 3][col - 3][dep + 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for down diagnol from bottom left to center\n\t\t//row +, col -, dep -\n\t\tfor(row = 0; row > size - 3; row ++)\n\t\t\tfor(col = size -1; col >= 3; col --)\n\t\t\t\tfor(dep = size - 1; dep >= 3; dep --) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row + 1][col - 1][dep - 1]\n\t\t\t\t\t\t&& check == board[row + 2][col - 2][dep - 2]\n\t\t\t\t\t\t&& check == board[row + 3][col - 3][dep - 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for down diagnol from bottom right to center\n\t\t//row +, col +, dep -\n\t\tfor(row = 0; row > size - 3; row ++)\n\t\t\tfor(col = 0; col < size - 3; col ++)\n\t\t\t\tfor(dep = size - 1; dep >= 3; dep --) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row + 1][col + 1][dep - 1]\n\t\t\t\t\t\t&& check == board[row + 2][col + 2][dep - 2]\n\t\t\t\t\t\t&& check == board[row + 3][col + 3][dep - 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\n\t\t//check for diagonals where row stays the same, but x,z change\n\t\t//depth up diagnol, col +, dep +\n\t\tfor(row = size - 1; row >= 0 ; row --)\n\t\t\tfor(col = 0; col < size - 3; col ++)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row][col + 1][dep + 1]\n\t\t\t\t\t\t&& check == board[row][col + 2][dep + 2]\n\t\t\t\t\t\t&& check == board[row][col + 3][dep + 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\n\t\t//depth down diagnol, col +, dep -\n\t\tfor(row = size - 1; row >= 0 ; row --)\n\t\t\tfor(col = 0; col < size - 3; col ++)\n\t\t\t\tfor(dep = size - 1; dep >= 3; dep --) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row][col + 1][dep - 1]\n\t\t\t\t\t\t&& check == board[row][col + 2][dep - 2]\n\t\t\t\t\t\t&& check == board[row][col + 3][dep - 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\n\t\t// depth down left diagnol, col -, dep +\n\t\tfor(row = size - 1; row >= 0 ; row --)\n\t\t\tfor(col = size - 1; col >= 3; col --)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row][col - 1][dep + 1]\n\t\t\t\t\t\t&& check == board[row][col - 2][dep + 2]\n\t\t\t\t\t\t&& check == board[row][col - 3][dep + 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\n\t\t//depth down right diagnol, col -, dep -\n\t\tfor(row = size - 1; row >= 0 ; row --)\n\t\t\tfor(col = size - 1; col >= 3; col --)\n\t\t\t\tfor(dep = size - 1; dep >= 3; dep --) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row][col - 1][dep - 1]\n\t\t\t\t\t\t&& check == board[row][col - 2][dep - 2]\n\t\t\t\t\t\t&& check == board[row][col - 3][dep - 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//returns false if none of the above return true\n\t\treturn false;\n\t}", "public int AI(){\n for(int i=0; i<3; i++){\n for(int j=0; j<7; j++){\n if(board[i][j]==0 && board[i+1][j]==2 && board[i+2][j]==2 && board[i+3][j]==2){\n return j;\n \n }\n }\n }\n //checks for horizontals (Y-YY)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==2 && board[i][j+1]==0 && board[i][j+2]==2 && board[i][j+3]==2){\n if((i==5)||\n (i==4&&board[5][j+1]!=0) ||\n (i==3&&board[5][j+1]!=0&&board[4][j+1]!=0) ||\n (i==2&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0) ||\n (i==1&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0&&board[2][j+1]!=0) ||\n (i==0&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0&&board[2][j+1]!=0&&board[1][j+1]!=0) ||\n (i==0&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0&&board[2][j+1]!=0&&board[1][j+1]!=0&&board[0][j+1]!=0)){\n return j+1;\n }\n }\n }\n }\n //checks for horizontals (YY-Y)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==2 && board[i][j+1]==2 && board[i][j+2]==0 && board[i][j+3]==2){\n if((i==5)||\n (i==4&&board[5][j+2]!=0) ||\n (i==3&&board[5][j+2]!=0&&board[4][j+2]!=0) ||\n (i==2&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0) ||\n (i==1&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0) ||\n (i==0&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0&&board[1][j+2]!=0) ||\n (i==0&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0&&board[1][j+2]!=0&&board[0][j+2]!=0)){\n return j+2;\n }\n }\n }\n }\n //checks for horizontals (-YYY)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==0 && board[i][j+1]==2 && board[i][j+2]==2 && board[i][j+3]==2){\n if((i==5)||\n (i==4&&board[5][j]!=0) ||\n (i==3&&board[5][j]!=0&&board[4][j]!=0) ||\n (i==2&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0) ||\n (i==1&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0) ||\n (i==0&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0&&board[1][j]!=0) ||\n (i==0&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0&&board[1][j]!=0&&board[0][j]!=0)){\n return j;\n }\n }\n }\n }\n //checks for horizontals (YYY-)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==2 && board[i][j+1]==2 && board[i][j+2]==2 && board[i][j+3]==0){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+3;\n }\n }\n }\n }\n //checks for diagonal (-YYY)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==0 && board[i+2][j+1]==2 && board[i+1][j+2]==2 && board[i][j+3]==2){\n if((i+3==5)||\n (i+2==4&&board[5][j]!=0)||\n (i+1==3&&board[5][j]!=0&&board[4][j]!=0)||\n (i==2&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0)||\n (i==1&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0)||\n (i==0&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0&&board[1][j]!=0)){\n return j;\n }\n }\n }\n }\n //checks for diagonal (Y-YY)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==2 && board[i+2][j+1]==0 && board[i+1][j+2]==2 && board[i][j+3]==2){\n if((i==2&&board[5][j+1]!=0)||\n (i==1&&board[5][j+1]!=0&&board[4][j+1]!=0)||\n (i==0&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0)){\n return j+1;\n }\n }\n }\n }\n //checks for diagonal (YY-Y)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==2 && board[i+2][j+1]==2 && board[i+1][j+2]==0 && board[i][j+3]==2){\n if((i==2&&board[5][j+2]!=0&&board[4][j+2]!=0)||\n (i==1&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0)||\n (i==0&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0)){\n return j+2;\n }\n }\n }\n }\n //checks for diagonal (YYY-)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==2 && board[i+2][j+1]==2 && board[i+1][j+2]==2 && board[i][j+3]==0){\n if((i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0)||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0)||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0)){\n return j+3;\n }\n }\n }\n }\n //checks for subdiagonal (-YYY)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==0 && board[i+1][j+1]==2 && board[i+2][j+2]==2 && board[i+3][j+3]==2){\n if((i==0&&board[1][j]!=0)||\n (i==1&&board[2][j]!=0)||\n (i==2&&board[3][j]!=0)){\n return j;\n }\n }\n }\n }\n //checks for subdiagonal (Y-YY)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==2 && board[i+1][j+1]==0 && board[i+2][j+2]==2 && board[i+3][j+3]==2){\n if((i==0&&board[2][j+1]!=0)||\n (i==1&&board[3][j+1]!=0)||\n (i==2&&board[4][j+1]!=0)){\n return j+1;\n }\n }\n }\n }\n //checks for subdiagonal (YY-Y)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==2 && board[i+1][j+1]==2 && board[i+2][j+2]==0 && board[i+3][j+3]==2){\n if((i==0&&board[3][j+2]!=0)||\n (i==1&&board[4][j+2]!=0)||\n (i==2&&board[5][j+2]!=0)){\n return j+2;\n }\n }\n }\n }\n //checks for subdiagonal (YYY-)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==2 && board[i+1][j+1]==2 && board[i+2][j+2]==2 && board[i+3][j+3]==0){\n if((i==0&&board[4][j+3]!=0)||\n (i==1&&board[5][j+3]!=0)||\n (i==2)){\n return j+3;\n }\n }\n }\n }\n //BLOCK CHECKER\n //columns\n for(int i=0; i<3; i++){\n for(int j=0; j<7; j++){\n if(board[i][j]==0 && board[i+1][j]==1 && board[i+2][j]==1 && board[i+3][j]==1){\n return j; \n }\n }\n }\n //Checks for blocks horizontal (R-RR)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==1 && board[i][j+1]==0 && board[i][j+2]==1 && board[i][j+3]==1){\n if((i==5)||\n (i==4&&board[5][j+1]!=0) ||\n (i==3&&board[5][j+1]!=0&&board[4][j+1]!=0) ||\n (i==2&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0) ||\n (i==1&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0&&board[2][j+1]!=0) ||\n (i==0&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0&&board[2][j+1]!=0&&board[1][j+1]!=0) ||\n (i==0&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0&&board[2][j+1]!=0&&board[1][j+1]!=0&&board[0][j+1]!=0)){\n return j+1;\n }\n }\n }\n }\n //checks for horizontal blocks (RR-R)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==1 && board[i][j+1]==1 && board[i][j+2]==0 && board[i][j+3]==1){\n if((i==5)||\n (i==4&&board[5][j+2]!=0) ||\n (i==3&&board[5][j+2]!=0&&board[4][j+2]!=0) ||\n (i==2&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0) ||\n (i==1&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0) ||\n (i==0&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0&&board[1][j+2]!=0) ||\n (i==0&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0&&board[1][j+2]!=0&&board[0][j+2]!=0)){\n return j+2;\n }\n }\n }\n }\n \n //checks for horizontals (-RRR)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==0 && board[i][j+1]==1 && board[i][j+2]==1 && board[i][j+3]==1){\n if((i==5)||\n (i==4&&board[5][j]!=0) ||\n (i==3&&board[5][j]!=0&&board[4][j]!=0) ||\n (i==2&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0) ||\n (i==1&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0) ||\n (i==0&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0&&board[1][j]!=0) ||\n (i==0&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0&&board[1][j]!=0&&board[0][j]!=0)){\n return j;\n }\n }\n }\n }\n //checks for horizontals (RRR-)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==1 && board[i][j+1]==1 && board[i][j+2]==1 && board[i][j+3]==0){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+3;\n }\n }\n }\n }\n //checks for diagonal (-RRR)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==0 && board[i+2][j+1]==1 && board[i+1][j+2]==1 && board[i][j+3]==1){\n if((i+3==5)||\n (i+2==4&&board[i+3][j]!=0)||\n (i+1==3&&board[i+3][j]!=0&&board[i+2][j]!=0)||\n (i==2&&board[i+3][j]!=0&&board[i+2][j]!=0&&board[i+1][j]!=0)||\n (i==1&&board[i+3][j]!=0&&board[i+2][j]!=0&&board[i+1][j]!=0&&board[i][j]!=0)||\n (i==0&&board[i+3][j]!=0&&board[i+2][j]!=0&&board[i+1][j]!=0&&board[i][j]!=0&&board[i-1][j]!=0)){\n return j;\n }\n }\n }\n }\n //checks for diagonal (R-RR)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==1 && board[i+2][j+1]==0 && board[i+1][j+2]==1 && board[i][j+3]==1){\n if((i+2==4&&board[i+3][j+1]!=0)||\n (i+1==3&&board[i+3][j+1]!=0&&board[i+2][j+1]!=0)||\n (i==2&&board[i+3][j+1]!=0&&board[i+2][j+1]!=0&&board[i+1][j+1]!=0)||\n (i==1&&board[i+3][j+1]!=0&&board[i+2][j+1]!=0&&board[i+1][j+1]!=0&&board[i][j+1]!=0)||\n (i==0&&board[i+3][j+1]!=0&&board[i+2][j+1]!=0&&board[i+1][j+1]!=0&&board[i][j+1]!=0&&board[i-1][j+1]!=0)){\n return j+1;\n }\n }\n }\n }\n //checks for diagonal (RR-R)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==1 && board[i+2][j+1]==1 && board[i+1][j+2]==0 && board[i][j+3]==1){\n if((i==2&&board[i+2][j+2]!=0)){//||\n return j+2;\n }\n }\n }\n }\n //checks for diagonal (RRR-)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==1 && board[i+2][j+1]==1 && board[i+1][j+2]==1 && board[i][j+3]==0){\n if((i==0&&board[1][j+3]!=0)||\n (i==1&&board[2][j+3]!=0)||\n (i==2&&board[3][j+3]!=0)){\n return j+3;\n }\n }\n }\n }\n //checks for subdiagonal blocks(-RRR)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==0 && board[i+1][j+1]==1 && board[i+2][j+2]==1 && board[i+3][j+3]==1){\n if((i==0&&board[1][j]!=0)||\n (i==1&&board[2][j]!=0)||\n (i==2&&board[3][j]!=0)){\n return j;\n }\n }\n }\n }\n //checks for subdiagonal blocks(Y-YY)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==1 && board[i+1][j+1]==0 && board[i+2][j+2]==1 && board[i+3][j+3]==1){\n if((i==0&&board[2][j+1]!=0)||\n (i==1&&board[3][j+1]!=0)||\n (i==2&&board[4][j+1]!=0)){\n return j+1;\n }\n }\n }\n }\n //checks for subdiagonal blocks(YY-Y)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==1 && board[i+1][j+1]==1 && board[i+2][j+2]==0 && board[i+3][j+3]==1){\n if((i==0&&board[3][j+2]!=0)||\n (i==1&&board[4][j+2]!=0)||\n (i==2&&board[5][j+2]!=0)){\n return j+2;\n }\n }\n }\n }\n //checks for subdiagonal blocks(YYY-)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==1 && board[i+1][j+1]==1 && board[i+2][j+2]==1 && board[i+3][j+3]==0){\n if((i==0&&board[4][j+3]!=0)||\n (i==1&&board[5][j+3]!=0)||\n (i==2)){\n return j+3;\n }\n }\n }\n }\n //INTERMEDIATE BLOCKING\n //If horizontal (RR--) make it (RRY-)\n for(int i=0; i<6; i++){\n for(int j=0; j<3; j++){\n if(board[i][j]==1 && board[i][j+1]==1 && board[i][j+2]==0){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+2;\n }\n }\n }\n }\n //If horizontal (--RR) make it (-YRR)\n for(int i=0; i<6; i++){\n for(int j=0; j<3; j++){\n if(board[i][j+1]==0 && board[i][j+2]==1 && board[i][j+3]==1){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+1;\n }\n }\n }\n }\n //The following attempts to set the computer up for a win, instead of first just generating a random number\n for(int i=0; i<3; i++){\n for(int j=0; j<7; j++){\n if(board[i+1][j]==0 && board[i+2][j]==2 && board[i+3][j]==2){\n return j;\n \n }\n }\n }\n //If horizontal (-YY-) make it (-YYY)\n for(int i=0; i<6; i++){\n for(int j=0; j<3; j++){\n if(board[i][j]==0 && board[i][j+1]==2 && board[i][j+2]==2 && board[i][j+3]==0){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+3;\n }\n }\n }\n }\n //If horizontal (YY--) make it (YYY-)\n for(int i=0; i<6; i++){\n for(int j=0; j<3; j++){\n if(board[i][j]==2 && board[i][j+1]==2 && board[i][j+2]==0 && board[i][j+3]==0){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+2;\n }\n }\n }\n }\n //If horizontal (--YY) make it (-YYY)\n for(int i=0; i<6; i++){\n for(int j=0; j<3; j++){\n if(board[i][j]==0 && board[i][j+1]==0 && board[i][j+2]==2 && board[i][j+3]==2){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+1;\n }\n }\n }\n }\n boolean sent = false;\n //The following code will simply generate a random number.\n int x = (int)((Math.random())*7);\n if(!wonYet){ \n while(!sent){\n if(board[0][x]!=0)\n x = (int)((Math.random())*7);\n else if(board[1][x]!=0)\n x = (int)((Math.random())*7);\n else if(board[2][x]!=0)\n x = (int)((Math.random())*7);\n else if(board[3][x]!=0)\n x = (int)((Math.random())*7);\n else if(board[4][x]!=0)\n x = (int)((Math.random())*7);\n else if(board[5][x]!=0)\n x = (int)((Math.random())*7);\n sent = true;\n } \n return x;\n }\n return -1; \n }", "public boolean isSolvable() {\n\t\tif (goal == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public void solveSudoku(char[][] board) {\n // input check\n if (board == null || board.length == 0) return;\n\n init(board);\n backtracking(board, 0, 0);\n }", "static boolean solve(Point cur)\n\t{\n\t\t// if the point is null, we have reached the end\n\t\tif (cur == null)\n\t\t\treturn true;\n\n\t\t// if sudoku[cur] already has a given value,\n\t\t// simply continue on to next point\n\t\tif ( sudoku[cur.y][cur.x] != 0 )\n\t\t\treturn solve(getNextPoint(cur));\n\n\t\t// if sudoku[cur] doesn't have a value, try each value from 1 to 9\n\t\tfor ( int i = 1; i < 10 ; i++ )\n\t\t{\n\t\t\tif ( !isValid(cur, i) ) // if not valid for this point, move on to next value\n\t\t\t\tcontinue;\n\n\t\t\tsudoku[cur.y][cur.x] = i; // assign the value i to the current position\n\n\t\t\t// continue with next point, if solved, return,\n\t\t\t// else move on to the next possible value\n\t\t\tif ( solve(getNextPoint(cur)) ) // the entire magic lies here\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\tsudoku[cur.y][cur.x] = 0; // go pick the next possible value\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private boolean winCheck(int x, int y, char symbol){\n\t\t/* Horizontal */\n\t\tif(y>=2 && board[x][y-2]==symbol && board[x][y-1]==symbol && board[x][y]==symbol)\n\t\t\treturn true;\n\t\tif(y>=1 && y+1<size && board[x][y-1]==symbol && board[x][y]==symbol && board[x][y+1]==symbol)\n\t\t\treturn true;\n\t\tif(y+2<size && board[x][y]==symbol && board[x][y+1]==symbol && board[x][y+2]==symbol)\n\t\t\treturn true;\n\t\t\n\t\t/* Vertical */\n\t\tif(x>=2 && board[x-2][y]==symbol && board[x-1][y]==symbol && board[x][y]==symbol)\n\t\t\treturn true;\n\t\tif(x>=1 && x+1<size && board[x-1][y]==symbol && board[x][y]==symbol && board[x+1][y]==symbol)\n\t\t\treturn true;\n\t\tif(x+2<size && board[x][y]==symbol && board[x+1][y]==symbol && board[x+2][y]==symbol)\n\t\t\treturn true;\n\t\t\n\t\t/* Main Diagonal */\n\t\tif(x>=2 && y>=2 && board[x-2][y-2]==symbol && board[x-1][y-1]==symbol && board[x][y]==symbol)\n\t\t\treturn true;\n\t\tif(x>=1 && x+1<size && y>=1 && y+1<size && board[x-1][y-1]==symbol && board[x][y]==symbol && board[x+1][y+1]==symbol)\n\t\t\treturn true;\n\t\tif(x+2<size && y+2<size && board[x][y]==symbol && board[x+1][y+1]==symbol && board[x+2][y+2]==symbol)\n\t\t\treturn true;\n\t\t\n\t\t/* Anti Diagonal */\n\t\tif(x>=2 && y+2<size && board[x-2][y+2]==symbol && board[x-1][y+1]==symbol && board[x][y]==symbol)\n\t\t\treturn true;\n\t\tif(x>=1 && x+1<size && y>=1 && y+1<size && board[x+1][y-1]==symbol && board[x][y]==symbol && board[x-1][y+1]==symbol)\n\t\t\treturn true;\n\t\tif(x+2<size && y>=2 && board[x][y]==symbol && board[x+1][y-1]==symbol && board[x+2][y-2]==symbol)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "public boolean solve()throws InterruptedException{\n\tint startx=0,starty=0;\n\t//Initialize startx and starty with the location of the S.\n\tfor (int r = 0; r < height; r++){\n\t for (int c = 0; c < length; c++){\n\t\tif (board[r][c] == 'S'){\n\t\t startx = r;\n\t\t starty = c;\n\t\t}\n\t }\n\t}\n\tboard[startx][starty] = ' ';//erase the S, and start solving!\n\treturn solveH(startx,starty);\n }", "private boolean solve(int i, int j, int pos, int[][] cells) {\n\t\tif (i == 9) {\n\t\t\ti = 0;\n\t\t\tif (++j == 9)\n\t\t\t\treturn true;\n\t\t}\n\t\tif (cells[i][j] != 0) // Skip filled cells\n\t\t\treturn solve(i + 1, j, pos, cells);\n\n\t\tfor (int k = 1; k <= 9; k++) {\n\t\t\tint val = k + pos;\n\t\t\tif (val > 9) {\n\t\t\t\tval = val - 9;\n\t\t\t}\n\t\t\tif (legal(i, j, val, cells)) {\n\t\t\t\tcells[i][j] = val;\n\t\t\t\tif (solve(i + 1, j, pos, cells))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tcells[i][j] = 0; // Reset on backtrack\n\t\treturn false;\n\t}", "public boolean checkBoardFull() {\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (grid[i][j].getSymbol() == '-')\n return false;\n }\n }\n return true;\n }", "public boolean checkForWin()\n {\n //Horizontal win\n for (int r = 0; r <= 5; r++)\n {\n for (int c = 0; c <= 3; c++)\n {\n if (current_board[c][r] == player_turn &&\n current_board[c+1][r] == player_turn &&\n current_board[c+2][r] == player_turn &&\n current_board[c+3][r] == player_turn)\n return true;\n }\n }\n //Vertical win\n for (int c = 0; c <= 6; c++)\n {\n for (int r = 0; r <= 2; r++)\n {\n if (current_board[c][r] == player_turn &&\n current_board[c][r+1] == player_turn &&\n current_board[c][r+2] == player_turn &&\n current_board[c][r+3] == player_turn)\n return true;\n }\n }\n //Shortest diagonals/anti diagonals (cell length == 4)\n //postive slope\n if (current_board[0][2] == player_turn && current_board[1][3] == player_turn && current_board[2][4] == player_turn && current_board[3][5] == player_turn)\n return true;\n if (current_board[3][0] == player_turn && current_board[4][1] == player_turn && current_board[5][2] == player_turn && current_board[6][3] == player_turn)\n return true;\n //negative slope\n if (current_board[0][3] == player_turn && current_board[1][2] == player_turn && current_board[2][1] == player_turn && current_board[3][0] == player_turn)\n return true;\n if (current_board[3][5] == player_turn && current_board[4][4] == player_turn && current_board[5][3] == player_turn && current_board[6][2] == player_turn)\n return true;\n\n //Medium-length diagonals/anti diagonals (cell length == 5)\n //positive slope\n if (current_board[0][1] == player_turn && current_board[1][2] == player_turn && current_board[2][3] == player_turn && current_board[3][4] == player_turn)\n return true;\n if (current_board[1][2] == player_turn && current_board[2][3] == player_turn && current_board[3][4] == player_turn && current_board[4][5] == player_turn)\n return true;\n if (current_board[2][0] == player_turn && current_board[3][1] == player_turn && current_board[4][2] == player_turn && current_board[5][3] == player_turn)\n return true;\n if (current_board[3][1] == player_turn && current_board[4][2] == player_turn && current_board[5][3] == player_turn && current_board[6][4] == player_turn)\n return true;\n //negative slope\n if (current_board[0][4] == player_turn && current_board[1][3] == player_turn && current_board[2][2] == player_turn && current_board[3][1] == player_turn)\n return true;\n if (current_board[1][3] == player_turn && current_board[2][2] == player_turn && current_board[3][1] == player_turn && current_board[4][0] == player_turn)\n return true;\n if (current_board[2][5] == player_turn && current_board[3][4] == player_turn && current_board[4][3] == player_turn && current_board[5][2] == player_turn)\n return true;\n if (current_board[3][4] == player_turn && current_board[4][3] == player_turn && current_board[5][2] == player_turn && current_board[6][1] == player_turn)\n return true;\n\n //Longest diagonals/anti diagonals (cell length == 6)\n //positive slope\n for (int c=0, r=0; c <= 2 && r <= 2; c++, r++)\n {\n if (current_board[c][r] == player_turn &&\n current_board[c+1][r+1] == player_turn &&\n current_board[c+2][r+2] == player_turn &&\n current_board[c+3][r+3] == player_turn)\n return true;\n }\n for (int c=1, r=0; c <= 3 && r <= 2; c++, r++)\n {\n if (current_board[c][r] == player_turn &&\n current_board[c+1][r+1] == player_turn &&\n current_board[c+2][r+2] == player_turn &&\n current_board[c+3][r+3] == player_turn)\n return true;\n }\n //negative slope\n for (int c=0, r=5; c <= 2 && r >= 3; c++, r--)\n {\n if (current_board[c][r] == player_turn &&\n current_board[c+1][r-1] == player_turn &&\n current_board[c+2][r-2] == player_turn &&\n current_board[c+3][r-3] == player_turn)\n return true;\n }\n for (int c=1, r=5; c <= 3 && r >= 3; c++, r--)\n {\n if (current_board[c][r] == player_turn &&\n current_board[c+1][r-1] == player_turn &&\n current_board[c+2][r-2] == player_turn &&\n current_board[c+3][r-3] == player_turn)\n return true;\n }\n\n return false;\n }", "private boolean findSolution(int row) throws InterruptedException {\n \tif (stopped) return true;\n \t\n if (rowCounter++ == height) {\n \tSystem.out.println(\"DONE :D\");\n \tSystem.out.println(this);\n \treturn true;\n }\n \n // predict as much as possible for the next row, given the current state.\n \tmakePrediction(row);\n \t\n \t// for all possible next solutions\n while (nextPermutation(row)) {\n \tif (delay > 0) Thread.sleep(delay);\n \t// make sure the calculated permutation is valid. If so, recursively call this function again with the next row.\n \tif (matchesPrediction(row) && matchesPreprocessed(row)) {\n \t\tif (findSolution(row + 1)) return true;\n \t}\n }\n // if no of the solutions are valid: reset this row and backtrack.\n resetRow(row);\n rowCounter--;\n return false;\n }", "public boolean isChessOnWay(location start, location end, chess[][] board) {\n int startX = start.getX();\n int startY = start.getY();\n int endX = end.getX();\n int endY = end.getY();\n\n if(Math.abs(startX-endX) > 0){\n int step = startX < endX ? 1 : -1;\n for(int i = startX+step; i != endX ; i+=step){\n if(board[i][startY]!=null){\n return true;\n }\n }\n }\n else if(Math.abs(startY-endY) > 0){\n int step = startY < endY ? 1 : -1;\n for(int i = startY+step; i != endY; i+=step){\n if(board[startX][i]!=null){\n return true;\n }\n }\n\n }\n return false;\n\n }", "private boolean hasPossibleMove()\n {\n for(int i=0; i<FieldSize; ++i)\n {\n for(int j=1; j<FieldSize; ++j)\n {\n if(field[i][j] == field[i][j-1])\n return true;\n }\n }\n for(int j=0; j<FieldSize; ++j)\n {\n for(int i=1; i<FieldSize; ++i)\n {\n if(field[i][j] == field[i-1][j])\n return true;\n }\n }\n return false;\n }", "public boolean isGoal() {\r\n\t\tint n = this.dimension();\r\n\t\tint k = 1;\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tfor (int j = 0; j < n; j++) {\r\n\t\t\t\tif (this.blocks[i][j] != k) {\r\n\t\t\t\t\tif (!(i == n - 1 && j == n - 1 && this.blocks[i][j] == 0)) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tk++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean isSolvable() {\n return goal != null;\n }", "boolean isFinalAnswer(List<List<Integer>> puzzle) {\n List<Integer> expectedList = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9);\n\n // check row\n int rowMatchedCount = 9;\n for (int rowIndex = 0; rowIndex < 9; rowIndex++) {\n List<Integer> rowNums = new ArrayList<>(puzzle.get(rowIndex));\n Collections.sort(rowNums);\n if (rowNums.equals(expectedList)) {\n rowMatchedCount -= 1;\n }\n }\n\n // check col\n int colMatchedCount = 9;\n for (int colIndex = 0; colIndex < 9; colIndex++) {\n List<Integer> colNums = new ArrayList<>(getColValues(colIndex, puzzle));\n Collections.sort(colNums);\n if (colNums.equals(expectedList)) {\n colMatchedCount -= 1;\n }\n }\n\n // check block\n int blockMatchedCount = 9;\n for (List<Integer> rowAndCol : getAllBlockTopLeftPos()) {\n List<Integer> blockNums =\n new ArrayList<>(getBlockValues(rowAndCol.get(0), rowAndCol.get(1), puzzle));\n Collections.sort(blockNums);\n if (blockNums.equals(expectedList)) {\n blockMatchedCount -= 1;\n }\n }\n\n return (rowMatchedCount + colMatchedCount + blockMatchedCount) == 0;\n }", "public boolean isGoal(){\n\t\tboolean ok = true;\n\t\tfor (int i = 0; i < getRows() && ok; i++) {\n\t\t\tfor (int j = 0; j < getColumns() && ok; j++) {\n\t\t\t\tif (cells[i][j].getSand() != getK()) \n\t\t\t\t\tok = false;\n\t\t\t}\n\t\t} \n\t\treturn ok;\n\t}", "public Solver(Board initial) {\n \tsolutionNode = null;\n \tpq = new MinPQ<>();\n \tpq.insert(new SearchNode(initial, null, 0));\n\n \twhile (true) {\n \t\tSearchNode currNode = pq.delMin();\n\t \tBoard currBoard = currNode.getBoard();\n\n\t \tif (currBoard.isGoal()) {\n\t \t\tisSolvable = true;\n\t \t\tsolutionNode = currNode;\n\t \t\tbreak;\n\t \t}\n\n\t \tif (currBoard.hamming() == 2 && currBoard.twin().isGoal()) {\n\t \t\tisSolvable = false;\n\t \t\tbreak;\n\t \t}\n\n\t \tint moves = currNode.getMoves();\n\t \tBoard prevBoard = moves > 0 ? currNode.prev().getBoard() : null;\n\t \tfor (Board nextBoard : currBoard.neighbors()) {\n\t \t\tif (nextBoard != null && nextBoard.equals(prevBoard)) {\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\tpq.insert(new SearchNode(nextBoard, currNode, moves + 1));\n\t \t}\n \t}\n \t\n }", "@Override\n\tpublic boolean check(piece[][] board) {\n\t\t\n\t\treturn false;\n\t\t\n\t}", "public Solver(Board initial) {\r\n this.board = initial;\r\n\r\n final Comparator<SearchNode> solverComparator = new Comparator<SearchNode>() {\r\n @Override\r\n public int compare(SearchNode o1, SearchNode o2) {\r\n return o1.weight() - o2.weight();\r\n }\r\n };\r\n MinPQ<SearchNode> pq = new MinPQ<SearchNode>(solverComparator);\r\n MinPQ<SearchNode> twinPq = new MinPQ<SearchNode>(solverComparator);\r\n\r\n pq.insert(new SearchNode(board, null, 0));\r\n twinPq.insert(new SearchNode(board.twin(), null, 0));\r\n do {\r\n SearchNode current = pq.delMin();\r\n SearchNode twin = twinPq.delMin();\r\n\r\n //solution.enqueue(current.getBoard());\r\n if (!current.getBoard().isGoal()) {\r\n for (Board neighbour : current.getBoard().neighbors()) {\r\n if (current.getParent() == null || current.getParent() != null && !neighbour.equals(current.getParent().getBoard())) {\r\n pq.insert(new SearchNode(neighbour, current, current.moves() + 1));\r\n }\r\n }\r\n } else {\r\n solution = new LinkedStack<Board>();\r\n SearchNode node = current;\r\n while (node != null) {\r\n solution.push(node.getBoard());\r\n node = node.getParent();\r\n }\r\n break;\r\n }\r\n\r\n if (!twin.getBoard().isGoal()) {\r\n for (Board neighbour : twin.getBoard().neighbors()) {\r\n if (twin.getParent() == null || twin.getParent() != null && !neighbour.equals(twin.getParent().getBoard())) {\r\n twinPq.insert(new SearchNode(neighbour, twin, twin.moves() + 1));\r\n }\r\n }\r\n } else {\r\n break;\r\n }\r\n } while (!pq.isEmpty() || !twinPq.isEmpty());\r\n }", "public boolean isValid(Board board) {\n if (!from.isValid(board.size) || !to.isValid(board.size)) {\r\n return false;\r\n }\r\n\r\n // Confirm the 'from' space is occupied\r\n if (!board.b[from.row][from.column]) {\r\n return false;\r\n }\r\n\r\n // Confirm the 'to' space is empty\r\n if (board.b[to.row][to.column]) {\r\n return false;\r\n }\r\n\r\n int rowJump = Math.abs(from.row - to.row);\r\n int colJump = Math.abs(from.column - to.column);\r\n\r\n if (rowJump == 0) {\r\n if (colJump != 2) {\r\n return false;\r\n }\r\n }\r\n else if (rowJump == 2) {\r\n if (colJump != 0 && colJump != 2) {\r\n return false;\r\n }\r\n }\r\n else {\r\n return false;\r\n }\r\n\r\n // Confirm the 'step' space is occupied\r\n return board.b[(from.row + to.row) / 2][(from.column + to.column) / 2];\r\n }" ]
[ "0.7665745", "0.7525502", "0.72729355", "0.72182834", "0.7185908", "0.7183053", "0.71286625", "0.70397216", "0.70076114", "0.69604707", "0.6900665", "0.68940705", "0.68156844", "0.68130326", "0.68013626", "0.67914355", "0.67656994", "0.6742241", "0.668153", "0.6621968", "0.66167265", "0.66140455", "0.6595638", "0.6581899", "0.6577675", "0.6574632", "0.6570659", "0.65685266", "0.6555859", "0.6519231", "0.65161824", "0.65131575", "0.6506976", "0.64934856", "0.64928895", "0.64902407", "0.6487274", "0.6467749", "0.6436916", "0.64292204", "0.64212686", "0.64049685", "0.63610554", "0.634779", "0.6346626", "0.6339364", "0.6330251", "0.6326952", "0.63123554", "0.6310429", "0.6307927", "0.62616235", "0.62597144", "0.6250939", "0.62494993", "0.6217678", "0.6204583", "0.62032735", "0.6203235", "0.61912143", "0.6184948", "0.6181279", "0.6128128", "0.61190754", "0.6117343", "0.6116439", "0.6114797", "0.61140364", "0.60863763", "0.60842013", "0.6083819", "0.6067774", "0.60651827", "0.6060153", "0.6051268", "0.6049751", "0.6044877", "0.60398924", "0.60328317", "0.603186", "0.60275525", "0.60274696", "0.6024006", "0.60213274", "0.6009206", "0.60034543", "0.600068", "0.59999174", "0.59966046", "0.59942484", "0.59931767", "0.59925437", "0.59824234", "0.59751666", "0.59683526", "0.5963382", "0.596243", "0.59591603", "0.5958222", "0.59577256" ]
0.705847
7
is the initial board solvable? return the move numbers for solution.
public int moves() { if (!isSolvable()) { return -1; } else { return minNode.getMove(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int moves() {\n\n return initialSolvable ? solutionNode.numberOfMovesMade : -1;\n }", "public int moves() {\n if (isSolvable())\n return _moves;\n else\n return -1;\n }", "public int moves() {\n return isSolvable() ? finalMove.moves : -1;\n }", "public int moves() {\n \tif (!isSolvable) return -1;\n \treturn solutionNode.getMoves();\n }", "public static void compute_possible_moves(Board s){\n\t\tint b [][] = s.board;\n\t\tint x = -1;\n\t\tint y = -1;\n\t\tfor (int i = 0;i < b.length;i++) {\n\t\t\tfor (int j = 0;j < b[i].length;j++) {\n\t\t\t\tif(b[i][j] == 0){\n\t\t\t\t\tx = i;\n\t\t\t\t\ty = j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\n\t\tint left [][];\n\t\tint right [][];\n\t\tint up [][];\n\t\tint down [][];\n\t\tpossible_boards.clear();\n\t\tif(x - 1 != -1 && x >= 0 && x < 3){\n\t\t\t//up is a legal move\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\n\t\t\tint temp = temporary_board[x - 1][y];\n\t\t\ttemporary_board[x - 1][y] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tup = temporary_board;\n\n\t\t\tBoard up_board = new Board(up);\n\t\t\tpossible_boards.add(up_board);\n\n\t\t}\n\t\tif(x + 1 != 3 && x >= 0 && x < 3){\n\t\t\t//down is a legal move\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x + 1][y];\n\t\t\ttemporary_board[x + 1][y] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tdown = temporary_board;\n\t\t\tBoard down_board = new Board(down);\n\t\t\tpossible_boards.add(down_board);\n\t\t}\n\t\tif(y - 1 != -1 && y >= 0 && y < 3){\n\t\t\t//left move is legal\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x][y - 1];\n\t\t\ttemporary_board[x][y - 1] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tleft = temporary_board;\n\t\t\tBoard left_board = new Board(left);\n\t\t\tpossible_boards.add(left_board);\n\n\t\t}\n\t\tif(y + 1 != 3 && y >= 0 && y < 3){\n\t\t\t//right move is legal\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x][y + 1];\n\t\t\ttemporary_board[x][y + 1] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tright = temporary_board;\n\t\t\tBoard right_board = new Board(right);\n\t\t\tpossible_boards.add(right_board);\n\n\t\t}\n\n\t}", "public int moves() {\r\n if (!isSolvable) return -1;\r\n return goal.previousMoves;\r\n }", "public int moves() {\n if (!isSolvable()) return -1;\n return realMoves;\n }", "public int moves() {\n\t\tif (!isSolvable())\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn result.size() - 1;\n\t}", "private ArrayList<int[][]> possiblePuzzleMoves(int[][] currentPuzzle) {\n ArrayList<int [][]> possibleMoves = new ArrayList<>();\n //find zero\n int zeroRow = 0;\n int zeroCol = 0;\n for(int i = 0; i < currentPuzzle.length; i++) {\n for (int j = 0; j < currentPuzzle[i].length; j++) {\n if(currentPuzzle[i][j] == 0) {\n zeroRow = i;\n zeroCol = j;\n break;\n }\n }\n }\n\n //check if zero isn't in top row\n if(zeroRow > 0) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileAbove = newPuzzleConfig[zeroRow - 1][zeroCol];\n newPuzzleConfig[zeroRow - 1][zeroCol] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileAbove;\n possibleMoves.add(newPuzzleConfig);\n }\n\n //check if zero isn't in bottom row\n if(zeroRow < 2) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileBelow = newPuzzleConfig[zeroRow + 1][zeroCol];\n newPuzzleConfig[zeroRow + 1][zeroCol] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileBelow;\n possibleMoves.add(newPuzzleConfig);\n\n }\n\n //check if zero isn't in left col\n if(zeroCol > 0) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileToLeft = newPuzzleConfig[zeroRow][zeroCol-1];\n newPuzzleConfig[zeroRow][zeroCol-1] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileToLeft;\n possibleMoves.add(newPuzzleConfig);\n }\n\n //check if zero isn't in right col\n if(zeroCol < 2) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileToRight = newPuzzleConfig[zeroRow][zeroCol+1];\n newPuzzleConfig[zeroRow][zeroCol+1] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileToRight;\n possibleMoves.add(newPuzzleConfig);\n }\n return possibleMoves;\n }", "public void getPossibleMoves() { \n\t\t\tsuper.getPossibleMoves();\n\t\t\tfor (int i = 0; i < Math.abs(xrange); i++) {\n\t\t\t\tif (currentx + xrange - ((int) Math.pow(-1,color)*i) >= 0) { \n\t\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + xrange - ((int) Math.pow(-1,color)*i) ][currenty]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( currentx - 1 >= 0 && currenty - 1 >= 0 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1].isOccupiedByOpponent()) {\t// Diagonol left space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1]);\n\t\t\t}\n\t\t\tif (currentx - 1 >= 0 && currenty + 1 <= 7 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1].isOccupiedByOpponent()) { \t//Diagonol right space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1]);\n\t\t\t}\n\t\t\t\n\t}", "public String computerMove() {\n\t\t// Look to win in a row\n\t\tfor (int r = 0; r < 3; r++) {\n\t\t\tif (rowSum[r] == -2) {\n\t\t\t\t// Find the empty space\n\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\t\treturn done(r, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Look to win in a col\n\t\tfor (int c = 0; c < 3; c++) {\n\t\t\tif (colSum[c] == -2) {\n\t\t\t\t// Find the empty space\n\t\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\t\treturn done(r, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Look to win a diag\n\t\tfor (int d = 0; d < 2; d++) {\n\t\t\tif (diagSum[d] == -2) {\n\t\t\t\t// Find the empty space\n\t\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\t\tint c = d == 0 ? r : 2 - r;\n\t\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\t\treturn done(r, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Look to block a row\n\t\tfor (int r = 0; r < 3; r++) {\n\t\t\tif (rowSum[r] == 2) {\n\t\t\t\t// Find the empty space\n\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\t\treturn done(r, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Look to block a col\n\t\tfor (int c = 0; c < 3; c++) {\n\t\t\tif (colSum[c] == 2) {\n\t\t\t\t// Find the empty space\n\t\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\t\treturn done(r, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Look to block a diag\n\t\tfor (int d = 0; d < 2; d++) {\n\t\t\tif (diagSum[d] == 2) {\n\t\t\t\t// Find the empty space\n\t\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\t\tint c = d == 0 ? r : 2 - r;\n\t\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\t\treturn done(r, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Find the non-full row and col w/ least val\n\t\tint bestR = -1;\n\t\tint bestC = -1;\n\t\tint minSum = 10;\n\t\tfor (int r = 0; r < 3; r++) {\n\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\tif (board[r][c] == 0) {\n\t\t\t\t\tint sum = rowSum[r] + colSum[c];\n\t\t\t\t\tif (sum < minSum) {\n\t\t\t\t\t\tminSum = sum;\n\t\t\t\t\t\tbestR = r;\n\t\t\t\t\t\tbestC = c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn done(bestR, bestC);\n\t}", "boolean findMove(int row, int col, int[][] someStatusBoard) {\n String leftPieces;\n if (_playerOnMove == ORANGE) {\n leftPieces = Game._orangePieces;\n } else {\n leftPieces = Game._violetPieces;\n }\n String trialMove = \"\";\n int numleftPieces = leftPieces.length();\n int l, ori;\n for (l = 0; l < numleftPieces; l++) {\n for (ori = 0; ori < 8; ori++) {\n String piecename = leftPieces.substring(l, l + 1);\n Pieces thispiece = new Pieces();\n int[][] initialPositions = thispiece.getInitialPositions(piecename);\n int[][] finalPositions = thispiece.processPositions(initialPositions, ori);\n int depth = finalPositions.length;\n int length = finalPositions[0].length;\n\n int m, n;\n for (m = 0; m < depth; m++) {\n for (n = 0; n < length; n++) {\n if (finalPositions[m][n] == 1) {\n int newCol = col - 1 - n;\n int newRow = 15 - row - depth;\n if (newCol >= 0 && newRow >= 0) {\n trialMove = piecename + changeBack(newCol) + changeBack(newRow) + ori;\n System.out.println(newCol);\n System.out.println(newRow);\n System.out.println(trialMove);\n if (isLegal(trialMove)) {\n return true;\n }\n }\n }\n }\n }\n }\n }\n return false;\n }", "public int[][] findSolution(){\n this.hasSolution = false;\n BoardStatus solution = findSolution(1, new BoardStatus(boardSize, this.initialPosition));\n if (solution == null){\n return null;\n }\n return solution.geBoard();\n }", "public int moves() {\n return solution.size() - 1;\n }", "public int AI(){\n for(int i=0; i<3; i++){\n for(int j=0; j<7; j++){\n if(board[i][j]==0 && board[i+1][j]==2 && board[i+2][j]==2 && board[i+3][j]==2){\n return j;\n \n }\n }\n }\n //checks for horizontals (Y-YY)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==2 && board[i][j+1]==0 && board[i][j+2]==2 && board[i][j+3]==2){\n if((i==5)||\n (i==4&&board[5][j+1]!=0) ||\n (i==3&&board[5][j+1]!=0&&board[4][j+1]!=0) ||\n (i==2&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0) ||\n (i==1&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0&&board[2][j+1]!=0) ||\n (i==0&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0&&board[2][j+1]!=0&&board[1][j+1]!=0) ||\n (i==0&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0&&board[2][j+1]!=0&&board[1][j+1]!=0&&board[0][j+1]!=0)){\n return j+1;\n }\n }\n }\n }\n //checks for horizontals (YY-Y)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==2 && board[i][j+1]==2 && board[i][j+2]==0 && board[i][j+3]==2){\n if((i==5)||\n (i==4&&board[5][j+2]!=0) ||\n (i==3&&board[5][j+2]!=0&&board[4][j+2]!=0) ||\n (i==2&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0) ||\n (i==1&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0) ||\n (i==0&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0&&board[1][j+2]!=0) ||\n (i==0&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0&&board[1][j+2]!=0&&board[0][j+2]!=0)){\n return j+2;\n }\n }\n }\n }\n //checks for horizontals (-YYY)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==0 && board[i][j+1]==2 && board[i][j+2]==2 && board[i][j+3]==2){\n if((i==5)||\n (i==4&&board[5][j]!=0) ||\n (i==3&&board[5][j]!=0&&board[4][j]!=0) ||\n (i==2&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0) ||\n (i==1&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0) ||\n (i==0&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0&&board[1][j]!=0) ||\n (i==0&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0&&board[1][j]!=0&&board[0][j]!=0)){\n return j;\n }\n }\n }\n }\n //checks for horizontals (YYY-)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==2 && board[i][j+1]==2 && board[i][j+2]==2 && board[i][j+3]==0){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+3;\n }\n }\n }\n }\n //checks for diagonal (-YYY)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==0 && board[i+2][j+1]==2 && board[i+1][j+2]==2 && board[i][j+3]==2){\n if((i+3==5)||\n (i+2==4&&board[5][j]!=0)||\n (i+1==3&&board[5][j]!=0&&board[4][j]!=0)||\n (i==2&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0)||\n (i==1&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0)||\n (i==0&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0&&board[1][j]!=0)){\n return j;\n }\n }\n }\n }\n //checks for diagonal (Y-YY)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==2 && board[i+2][j+1]==0 && board[i+1][j+2]==2 && board[i][j+3]==2){\n if((i==2&&board[5][j+1]!=0)||\n (i==1&&board[5][j+1]!=0&&board[4][j+1]!=0)||\n (i==0&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0)){\n return j+1;\n }\n }\n }\n }\n //checks for diagonal (YY-Y)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==2 && board[i+2][j+1]==2 && board[i+1][j+2]==0 && board[i][j+3]==2){\n if((i==2&&board[5][j+2]!=0&&board[4][j+2]!=0)||\n (i==1&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0)||\n (i==0&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0)){\n return j+2;\n }\n }\n }\n }\n //checks for diagonal (YYY-)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==2 && board[i+2][j+1]==2 && board[i+1][j+2]==2 && board[i][j+3]==0){\n if((i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0)||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0)||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0)){\n return j+3;\n }\n }\n }\n }\n //checks for subdiagonal (-YYY)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==0 && board[i+1][j+1]==2 && board[i+2][j+2]==2 && board[i+3][j+3]==2){\n if((i==0&&board[1][j]!=0)||\n (i==1&&board[2][j]!=0)||\n (i==2&&board[3][j]!=0)){\n return j;\n }\n }\n }\n }\n //checks for subdiagonal (Y-YY)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==2 && board[i+1][j+1]==0 && board[i+2][j+2]==2 && board[i+3][j+3]==2){\n if((i==0&&board[2][j+1]!=0)||\n (i==1&&board[3][j+1]!=0)||\n (i==2&&board[4][j+1]!=0)){\n return j+1;\n }\n }\n }\n }\n //checks for subdiagonal (YY-Y)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==2 && board[i+1][j+1]==2 && board[i+2][j+2]==0 && board[i+3][j+3]==2){\n if((i==0&&board[3][j+2]!=0)||\n (i==1&&board[4][j+2]!=0)||\n (i==2&&board[5][j+2]!=0)){\n return j+2;\n }\n }\n }\n }\n //checks for subdiagonal (YYY-)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==2 && board[i+1][j+1]==2 && board[i+2][j+2]==2 && board[i+3][j+3]==0){\n if((i==0&&board[4][j+3]!=0)||\n (i==1&&board[5][j+3]!=0)||\n (i==2)){\n return j+3;\n }\n }\n }\n }\n //BLOCK CHECKER\n //columns\n for(int i=0; i<3; i++){\n for(int j=0; j<7; j++){\n if(board[i][j]==0 && board[i+1][j]==1 && board[i+2][j]==1 && board[i+3][j]==1){\n return j; \n }\n }\n }\n //Checks for blocks horizontal (R-RR)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==1 && board[i][j+1]==0 && board[i][j+2]==1 && board[i][j+3]==1){\n if((i==5)||\n (i==4&&board[5][j+1]!=0) ||\n (i==3&&board[5][j+1]!=0&&board[4][j+1]!=0) ||\n (i==2&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0) ||\n (i==1&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0&&board[2][j+1]!=0) ||\n (i==0&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0&&board[2][j+1]!=0&&board[1][j+1]!=0) ||\n (i==0&&board[5][j+1]!=0&&board[4][j+1]!=0&&board[3][j+1]!=0&&board[2][j+1]!=0&&board[1][j+1]!=0&&board[0][j+1]!=0)){\n return j+1;\n }\n }\n }\n }\n //checks for horizontal blocks (RR-R)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==1 && board[i][j+1]==1 && board[i][j+2]==0 && board[i][j+3]==1){\n if((i==5)||\n (i==4&&board[5][j+2]!=0) ||\n (i==3&&board[5][j+2]!=0&&board[4][j+2]!=0) ||\n (i==2&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0) ||\n (i==1&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0) ||\n (i==0&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0&&board[1][j+2]!=0) ||\n (i==0&&board[5][j+2]!=0&&board[4][j+2]!=0&&board[3][j+2]!=0&&board[2][j+2]!=0&&board[1][j+2]!=0&&board[0][j+2]!=0)){\n return j+2;\n }\n }\n }\n }\n \n //checks for horizontals (-RRR)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==0 && board[i][j+1]==1 && board[i][j+2]==1 && board[i][j+3]==1){\n if((i==5)||\n (i==4&&board[5][j]!=0) ||\n (i==3&&board[5][j]!=0&&board[4][j]!=0) ||\n (i==2&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0) ||\n (i==1&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0) ||\n (i==0&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0&&board[1][j]!=0) ||\n (i==0&&board[5][j]!=0&&board[4][j]!=0&&board[3][j]!=0&&board[2][j]!=0&&board[1][j]!=0&&board[0][j]!=0)){\n return j;\n }\n }\n }\n }\n //checks for horizontals (RRR-)\n for(int i=0; i<6; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==1 && board[i][j+1]==1 && board[i][j+2]==1 && board[i][j+3]==0){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+3;\n }\n }\n }\n }\n //checks for diagonal (-RRR)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==0 && board[i+2][j+1]==1 && board[i+1][j+2]==1 && board[i][j+3]==1){\n if((i+3==5)||\n (i+2==4&&board[i+3][j]!=0)||\n (i+1==3&&board[i+3][j]!=0&&board[i+2][j]!=0)||\n (i==2&&board[i+3][j]!=0&&board[i+2][j]!=0&&board[i+1][j]!=0)||\n (i==1&&board[i+3][j]!=0&&board[i+2][j]!=0&&board[i+1][j]!=0&&board[i][j]!=0)||\n (i==0&&board[i+3][j]!=0&&board[i+2][j]!=0&&board[i+1][j]!=0&&board[i][j]!=0&&board[i-1][j]!=0)){\n return j;\n }\n }\n }\n }\n //checks for diagonal (R-RR)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==1 && board[i+2][j+1]==0 && board[i+1][j+2]==1 && board[i][j+3]==1){\n if((i+2==4&&board[i+3][j+1]!=0)||\n (i+1==3&&board[i+3][j+1]!=0&&board[i+2][j+1]!=0)||\n (i==2&&board[i+3][j+1]!=0&&board[i+2][j+1]!=0&&board[i+1][j+1]!=0)||\n (i==1&&board[i+3][j+1]!=0&&board[i+2][j+1]!=0&&board[i+1][j+1]!=0&&board[i][j+1]!=0)||\n (i==0&&board[i+3][j+1]!=0&&board[i+2][j+1]!=0&&board[i+1][j+1]!=0&&board[i][j+1]!=0&&board[i-1][j+1]!=0)){\n return j+1;\n }\n }\n }\n }\n //checks for diagonal (RR-R)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==1 && board[i+2][j+1]==1 && board[i+1][j+2]==0 && board[i][j+3]==1){\n if((i==2&&board[i+2][j+2]!=0)){//||\n return j+2;\n }\n }\n }\n }\n //checks for diagonal (RRR-)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i+3][j]==1 && board[i+2][j+1]==1 && board[i+1][j+2]==1 && board[i][j+3]==0){\n if((i==0&&board[1][j+3]!=0)||\n (i==1&&board[2][j+3]!=0)||\n (i==2&&board[3][j+3]!=0)){\n return j+3;\n }\n }\n }\n }\n //checks for subdiagonal blocks(-RRR)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==0 && board[i+1][j+1]==1 && board[i+2][j+2]==1 && board[i+3][j+3]==1){\n if((i==0&&board[1][j]!=0)||\n (i==1&&board[2][j]!=0)||\n (i==2&&board[3][j]!=0)){\n return j;\n }\n }\n }\n }\n //checks for subdiagonal blocks(Y-YY)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==1 && board[i+1][j+1]==0 && board[i+2][j+2]==1 && board[i+3][j+3]==1){\n if((i==0&&board[2][j+1]!=0)||\n (i==1&&board[3][j+1]!=0)||\n (i==2&&board[4][j+1]!=0)){\n return j+1;\n }\n }\n }\n }\n //checks for subdiagonal blocks(YY-Y)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==1 && board[i+1][j+1]==1 && board[i+2][j+2]==0 && board[i+3][j+3]==1){\n if((i==0&&board[3][j+2]!=0)||\n (i==1&&board[4][j+2]!=0)||\n (i==2&&board[5][j+2]!=0)){\n return j+2;\n }\n }\n }\n }\n //checks for subdiagonal blocks(YYY-)\n for(int i=0; i<3; i++){\n for(int j=0; j<4; j++){\n if(board[i][j]==1 && board[i+1][j+1]==1 && board[i+2][j+2]==1 && board[i+3][j+3]==0){\n if((i==0&&board[4][j+3]!=0)||\n (i==1&&board[5][j+3]!=0)||\n (i==2)){\n return j+3;\n }\n }\n }\n }\n //INTERMEDIATE BLOCKING\n //If horizontal (RR--) make it (RRY-)\n for(int i=0; i<6; i++){\n for(int j=0; j<3; j++){\n if(board[i][j]==1 && board[i][j+1]==1 && board[i][j+2]==0){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+2;\n }\n }\n }\n }\n //If horizontal (--RR) make it (-YRR)\n for(int i=0; i<6; i++){\n for(int j=0; j<3; j++){\n if(board[i][j+1]==0 && board[i][j+2]==1 && board[i][j+3]==1){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+1;\n }\n }\n }\n }\n //The following attempts to set the computer up for a win, instead of first just generating a random number\n for(int i=0; i<3; i++){\n for(int j=0; j<7; j++){\n if(board[i+1][j]==0 && board[i+2][j]==2 && board[i+3][j]==2){\n return j;\n \n }\n }\n }\n //If horizontal (-YY-) make it (-YYY)\n for(int i=0; i<6; i++){\n for(int j=0; j<3; j++){\n if(board[i][j]==0 && board[i][j+1]==2 && board[i][j+2]==2 && board[i][j+3]==0){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+3;\n }\n }\n }\n }\n //If horizontal (YY--) make it (YYY-)\n for(int i=0; i<6; i++){\n for(int j=0; j<3; j++){\n if(board[i][j]==2 && board[i][j+1]==2 && board[i][j+2]==0 && board[i][j+3]==0){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+2;\n }\n }\n }\n }\n //If horizontal (--YY) make it (-YYY)\n for(int i=0; i<6; i++){\n for(int j=0; j<3; j++){\n if(board[i][j]==0 && board[i][j+1]==0 && board[i][j+2]==2 && board[i][j+3]==2){\n if((i==5)||\n (i==4&&board[5][j+3]!=0) ||\n (i==3&&board[5][j+3]!=0&&board[4][j+3]!=0) ||\n (i==2&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0) ||\n (i==1&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0) ||\n (i==0&&board[5][j+3]!=0&&board[4][j+3]!=0&&board[3][j+3]!=0&&board[2][j+3]!=0&&board[1][j+3]!=0&&board[0][j+3]!=0)){\n return j+1;\n }\n }\n }\n }\n boolean sent = false;\n //The following code will simply generate a random number.\n int x = (int)((Math.random())*7);\n if(!wonYet){ \n while(!sent){\n if(board[0][x]!=0)\n x = (int)((Math.random())*7);\n else if(board[1][x]!=0)\n x = (int)((Math.random())*7);\n else if(board[2][x]!=0)\n x = (int)((Math.random())*7);\n else if(board[3][x]!=0)\n x = (int)((Math.random())*7);\n else if(board[4][x]!=0)\n x = (int)((Math.random())*7);\n else if(board[5][x]!=0)\n x = (int)((Math.random())*7);\n sent = true;\n } \n return x;\n }\n return -1; \n }", "public int moves()\n {\n\n if (goalNode!=null && goalNode.board.isGoal()){\n return goalNode.moves;\n }\n return -1;\n }", "private Coordinate firstMoveHeuristics(TicTacToeModel model, PossibleBoard possibleBoard) {\n BoardSpace[][] board = possibleBoard.board;\n\n if (possibleBoard.freeSpace == TicTacToeModel.BOARD_DIMENSION*TicTacToeModel.BOARD_DIMENSION) {\n if (board[0][0].getIcon() == Icon.EMPTY) {\n return new Coordinate(0,0);\n } else {\n return new Coordinate(0, TicTacToeModel.BOARD_DIMENSION - 1);\n }\n } else if (possibleBoard.freeSpace == TicTacToeModel.BOARD_DIMENSION*TicTacToeModel.BOARD_DIMENSION - 1) {\n if (model.cornerTaken()) {\n return new Coordinate(TicTacToeModel.BOARD_DIMENSION/2, TicTacToeModel.BOARD_DIMENSION/2);\n } else if (board[TicTacToeModel.BOARD_DIMENSION/2][TicTacToeModel.BOARD_DIMENSION/2].getIcon() != Icon.EMPTY) {\n return new Coordinate(0,0);\n } else {\n return model.getCornerNextToEdge();\n }\n }\n\n return null;\n }", "public ArrayList<Coordinate> getPossibleMoveCoordinate() {\n ChessBoard board = this.getChessBoard(); // get chess board\n ArrayList<Coordinate> coords = new ArrayList<Coordinate>(); // create return ArrayList\n int x, y;\n /*\n several cases\n 2 3\n 1 4\n\n 5 8\n 6 7\n\n */\n // case1\n x = this.x_coordinate - 2;\n y = this.y_coordinate + 1;\n if(x >= 0 && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case2\n x = this.x_coordinate - 1;\n y = this.y_coordinate + 2;\n if(x >= 0 && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case3\n x = this.x_coordinate + 1;\n y = this.y_coordinate + 2;\n if(x < board.getWidth() && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case4\n x = this.x_coordinate + 2;\n y = this.y_coordinate + 1;\n if(x < board.getWidth() && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case5\n x = this.x_coordinate - 2;\n y = this.y_coordinate - 1;\n if(x >= 0 && y >= 0 ){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case6\n x = this.x_coordinate - 1;\n y = this.y_coordinate - 2;\n if(x >= 0 && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case7\n x = this.x_coordinate + 1;\n y = this.y_coordinate - 2;\n if(x < board.getWidth() && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case1\n x = this.x_coordinate + 2;\n y = this.y_coordinate - 1;\n if(x < board.getWidth() && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n\n\n return coords;\n }", "public int moves() {\r\n if (solution != null) {\r\n return solution.size() - 1;\r\n } else {\r\n return -1;\r\n }\r\n }", "public boolean isBoardSolved() {\n for (int goal : goalCells) {\n if (!((board[goal] & 15) == BOX_ON_GOAL)) {\n return false;\n }\n }\n return true;\n }", "public Iterable<Board> solution() {\n if (!isSolvable()) {\n return null;\n }\n\n Stack<Board> solution = new Stack<Board>();\n\n Move current = finalMove;\n while (current.previous != null) {\n solution.push(current.board);\n current = current.previous;\n }\n solution.push(current.board);\n\n return solution;\n }", "private int Win_Move() {\n\t\tfinal int POSSIBLE_WIN = 8;\n\t\tint move = NO_MOVE;\n\t\tif(( gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[TOP_CENTER] == EMPTY){\n\t\t\t\tmove = TOP_CENTER;\n\t\t\t}else if (gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[CTR_LEFT] == EMPTY){\n\t\t\t\tmove = CTR_LEFT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[CTR_RIGHT] == EMPTY){\n\t\t\t\tmove = CTR_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}else if (gameBoard[BTM_CENTER] == EMPTY){\n\t\t\t\tmove = BTM_CENTER;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[CTR_LEFT] == EMPTY){\n\t\t\t\tmove = CTR_LEFT;\n\t\t\t}else if (gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[TOP_CENTER] == EMPTY){\n\t\t\t\tmove = TOP_CENTER;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_CENTER] == EMPTY){\n\t\t\t\tmove = BTM_CENTER;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}else if (gameBoard[CTR_RIGHT] == EMPTY){\n\t\t\t\tmove = CTR_RIGHT;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}\n\t\t}\n\t\treturn move;\n\t}", "@Test\n public void testThatCorrectMovesAreFound() {\n Solver solver = new Solver();\n PuzzleState state = new PuzzleState(Arrays.asList(CANNIBAL, CANNIBAL),\n Arrays.asList(MISSIONARY, MISSIONARY, CANNIBAL, MISSIONARY), PuzzleState.Position.LEFT_BANK);\n\n // get available moves\n List<Move> moves = solver.getAvailableMoves(state);\n\n Move expectedMove = new Move(Move.Direction.LEFT_TO_RIGHT, Arrays.asList(CANNIBAL, CANNIBAL));\n assertEquals(\"Only two moves should be available!\", 2, moves.size());\n assertTrue(\"List of moves doesn't contain exptected move!\", moves.contains(expectedMove));\n }", "public Iterable<Board> solution() {\n\n return initialSolvable ? solutionBoards : null;\n }", "public int[] minimax(IBoard board,char playerSymbol){\n\n List<int[][]> array = evaluate(board);\n\n /*In that case I found max and min scores*/\n int max = 0;\n int min = 0;\n for (int[][] move:array){\n int current = evaluateLine(board,move,playerSymbol);\n int oppcurrent = evaluateLineforOpp(board,move,playerSymbol);\n\n if (max < current){\n max = current;\n }\n\n if (min < oppcurrent){\n min = oppcurrent;\n }\n }\n\n for (int[][] move:array){\n int current = evaluateLine(board,move,playerSymbol);\n int oppcurrent = evaluateLineforOpp(board,move,playerSymbol);\n\n /*Here I check end score(bestscore)*/\n int end = 0;\n if(Math.abs(min) >= max){\n end = min;\n }else{\n end = max;\n }\n\n /*Here I return next place on table*/\n if (end == current) {\n for (int[] m : move) {\n char place = board.getTileSymbol(m[0], m[1]);\n if (place == '.') {\n return new int[]{m[0], m[1]};\n }\n }\n }else if(end == oppcurrent){\n for (int[] m : move) {\n char place = board.getTileSymbol(m[0], m[1]);\n if (place == '.') {\n return new int[]{m[0], m[1]};\n }\n }\n }\n\n }\n\n throw new RuntimeException(\"I don't know where to play!\");\n }", "public void performMove() {\n\t\tfor (int x = 0; x <= size-1; x++)\n\t\t\tfor (int y = 0; y <= size-1; y++)\n\t\t\t\tlocalBoard[y][x] = 0;\n\t\t\n\t\t//reset the flag that indicates if a move has been found that decreases the heuristic\n\t\tfoundBetterMove = false;\n\t\t\n\t\t//fill in the appropriate heuristic values\n\t\tpopulateHillValues();\n\t\tArrayList<PotentialMove> myBestList = new ArrayList<PotentialMove>();\n\n\t\t//Find the square with the lowest heuristic value. this should really write the values to an array. \n\t\tint squareDifferential = -1;\n\t\t//String outValue = \"\";\n\t\tfor (int y = 0; y <= size-1; y++) {\n\t\t\tfor (int x = 0; x <= size-1; x++){\n\t\t\t\t//outValue = outValue + localBoard[y][x];\n\t\t\t\tif (squareDifferential < 0) //lowestSquareFound not found yet \n\t\t\t\t{\n\t\t\t\t\tif ((NQueens.queens[x] != y) && //set if the current square isn't already occupied by a queen\n\t\t\t\t\t\t\t(localBoard[NQueens.queens[x]][x] >= localBoard[y][x])) {\n\t\t\t\t\t\tif (localBoard[y][x] == localBoard[NQueens.queens[x]][x])\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) > squareDifferential) { // find the square with the largest differential in value from the queen in the column\n\t\t\t\t\tmyBestList.clear();\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t}\n\t\t\t\telse if (((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) == squareDifferential) && // the differential is equal to the current best differential\n\t\t\t\t\t\t(NQueens.queens[x] != y)) { // and isn't already occupied by a queen\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t}\n\t\t\t\t//else the square is higher, has a queen or isn't marginally better than the current queen's position in the row\n\t\t\t}\n\t\t\t//outValue = outValue + \"\\n\";\n\t\t}\n\t\t//JOptionPane.showMessageDialog(null, outValue);\n\t\t\n\t\tif (myBestList.isEmpty())\n\t\t\treturn;\n\t\t\n\t\tint listSize = myBestList.size();\n\t\tPotentialMove bestMove;\n\t\t\n\t\t//grab the non-Sideways moves first\n\t\tfor (int i = 0; i < listSize; i++) {\n\t\t\tif (!(myBestList.get(i).isSideways)) {\n\t\t\t\tbestMove = myBestList.get(i);\n\t\t\t\tfoundBetterMove = true;\n\t\t\t\tsidewaysMoves = 0;\n\t\t\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (sidewaysMoves > MAXSIDEWAYSMOVES) { // hit MAXSIDEWAYSMOVES consecutive sideways moves, mark as unsolvable\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//all available moves sideways moves, let's select one randomly\n\t\tRandom generator = new Random();\n\t\tint randomElement = generator.nextInt(listSize);\n\t\t\n\t\tbestMove = myBestList.get(randomElement);\n\t\tfoundBetterMove = true;\n\t\tsidewaysMoves++;\n\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t}", "public static boolean SolveNinePuzzle(int board [][]){\n\t\tfor(int i = 0; i < board.length;i++){\n\t\t\t\tfor (int j = 0;j < board[i].length;j++) {\n\t\t\t\t\tSystem.out.print(board[i][j] + \" \");\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Attempting to solve board ...\");\n \n\t\tQueue node_queue = new Queue();\n\t\tBoard start_board = new Board(board);\n\t\tint goal_board [][] = {{1,2,3},{4,5,6},{7,8,0}}; \n\t\tBoard goal = new Board(goal_board);\n\t\t//check if the start board is the solved board\n\t\tif(start_board.compare(goal)){\n\t\t\treturn true;\n\t\t}\n\t\t//new tree for unique moves; root node is start board\n\t\tBoard_Tree result_tree = new Board_Tree(start_board);\n\t\tnode_queue.enqueue(start_board);\n\t\t//add root node string representation to hashset\n\t\tvertex_check.add(start_board.board_string);\n\t\twhile(!node_queue.isEmpty()){\n\t\t\tBoard v = node_queue.dequeue();\n\t\t\tcompute_possible_moves(v);\n\t\t\tfor(Board s: possible_boards){\n\t\t\t\tif(s.compare(goal)){\n\t\t\t\t\tresult_tree.insert(v,s);\n\t\t\t\t\tresult_tree.goal_board(s);\n\t\t\t\t\treturn true;\n\t\t\t\t}else if(!(vertex_check.contains(s.board_string))){\n\t\t\t\t\tvertex_check.add(s.board_string);\n\t\t\t\t\tnode_queue.enqueue(s);\n\t\t\t\t\tresult_tree.insert(v,s);\n\t\t\t\t}else{\n\t\t\t\t\t//ignore\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "int solve(char[][] currentBoard) {\n\n System.err.println();\n System.err.println(\"R-Level: \" + recursionLevel);\n System.err.println(sideOnMove);\n printBoard(currentBoard);\n\n //generate all possible moves for the current board\n ArrayList<Move> moveList = genLegalMoves(currentBoard);\n //printMoveList(moveList);\n\n //if i dont have any moves, i've lost\n if(moveList.size() == 0) {\n System.err.println(sideOnMove + \" Ran out of moves\");\n return -1;\n }\n\n int maxValue = -1;\n int val;\n\n //run through all moves in the mostList\n for(int i = 0; i < moveList.size(); i++){\n\n //try this move\n char[][] newBoard = makeMove(currentBoard, moveList.get(i));\n System.err.println();\n System.err.println(\"Trying move: \");\n System.err.println(sideOnMove);\n printBoard(newBoard);\n System.err.println();\n\n //if this board is a winner\n if(winningBoard(newBoard)){\n System.err.println(\"We found a win for: \" + sideOnMove);\n //printBoard(newBoard);\n return 1;\n }\n else {\n //toggles sideOnMove\n switchSides();\n\n //to to solve this new board\n recursionLevel++;\n val = - solve(newBoard);\n switchSides();\n recursionLevel--;\n if(val == 1) return 1;\n\n if(i != moveList.size() - 1) {\n System.err.println(sideOnMove + \" Is trying a new approach\");\n }\n }\n\n maxValue = Math.max(maxValue, val);\n\n }\n\n\n return maxValue;\n }", "public abstract ArrayList<Move> possibleMoves(Board board);", "public ArrayList<SlidingPuzzleState> getPossibleNextMoves(){\n\t\tArrayList<SlidingPuzzleState> moves = new ArrayList<SlidingPuzzleState>();\n\t\tint holeNum = 0;\n\t\tfor (Coordinate h: _holes){\n\t\t\t\n\t\t\t//for every hole, check if its not on the edges\n\t\t\t//of the puzzle and if his next position is not\n\t\t\t//already a hole\n\t\t\t\n\t\t\tif (h.getI() > 0 && _puzzle[h.getI()-1][h.getJ()]!=0){\n\t\t\t\t\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.UP));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getI() < (_rows-1) && _puzzle[h.getI()+1][h.getJ()]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.DOWN));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getJ() > 0 && _puzzle[h.getI()][h.getJ()-1]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.LEFT));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getJ() < (_cols-1) && _puzzle[h.getI()][h.getJ()+1]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.RIGHT));\n\t\t\t}\n\t\t\tholeNum++;\n\t\t}\n\t\treturn moves;\n\t}", "public Iterable<Board> solution()\n {\n Stack<Board> solution = new Stack<Board>();\n \n // for case where initial board is goal board\n if (moves == 0) {\n solution.push(goalNode.board);\n return solution;\n }\n\n step = goalNode;\n \n // add chain of previous node from goal node \n while (step != null) {\n solution.push(step.board);\n step = step.prev;\n }\n \n return solution;\n }", "public int[][] solve() throws UnableToSolveSudokuBoardException {\n if (solveNext()) return board;\n throw new UnableToSolveSudokuBoardException();\n }", "public int[] getAllPossibleMoves(boolean ignore) {\n int[] validMoves;\n int[] validMovesResized;\n int validMovesIndex = 0;\n int startRow = this.getRow();\n int startCol = this.getCol();\n \n validMoves = new int[28]; // For a bishop, there are a maximum of 14 possible squares it could move to\n\n // First move from the bishops spot up diagonally to the right (ie col++, row++)\n for (int i = startCol+1, j = startRow+1; i<=8 && j<8; i++,j++) {\n validMoves[validMovesIndex] = i; // the col\n validMoves[validMovesIndex + 1] = j; // the row\n validMovesIndex = validMovesIndex + 2;\n }\n\n // Next move from the bishops start spot down diagonally to the right (ie col++, row--)\n for (int i = startCol+1, j = startRow-1; i<=8 && j>0; i++,j--) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n\n // Next move from the bishops start spot down diagonally to the left (ie col--, row--)\n for (int i = startCol-1, j = startRow-1; i>0 && j>0; i--,j--) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n // Next move from the bishops start spot up diagonally to the left (ie col--, row++)\n for (int i = startCol-1, j = startRow+1; i>0 && j<=8; i--,j++) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n \n // depending on the position of the bishop, the final array of possible moves may not have 14 squares\n // although that is the maximum. Create a new array of the actual size and copy into it.\n validMovesResized = Arrays.copyOf(validMoves, validMovesIndex);\n return validMovesResized;\n }", "public int possibleMoves(int i, int x, int y, int[][] board) {\n\t\tint canMove = 0;\n\n\t\tif (i == 12) {\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 0 && y <= 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y - 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 2, y - 1, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y > 0 && y <= 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y - 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - 1.5, y - .5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - 1.5, y - .5, .5, .5);\n\t\t\t\tboard[x - 2][y - 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y + 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 2, y + 1, board, StdDraw.BLACK);\n\t\t\t}\n\n\t\t\tif (((y >= 0 && y < 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y + 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - 1.5, y + 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - 1.5, y + 1.5, .5, .5);\n\t\t\t\tboard[x - 2][y + 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 6) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y + 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 1, y + 2, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 6) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y + 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - .5, y + 2.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - .5, y + 2.5, .5, .5);\n\t\t\t\tboard[x - 1][y + 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 6) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y + 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 1, y + 2, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 6) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y + 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 1.5, y + 2.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 1.5, y + 2.5, .5, .5);\n\t\t\t\tboard[x + 1][y + 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y + 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 2, y + 1, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y + 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 2.5, y + 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 2.5, y + 1.5, .5, .5);\n\t\t\t\tboard[x + 2][y + 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 0 && y <= 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y - 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 2, y - 1, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y > 0 && y <= 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y - 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 2.5, y - .5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 2.5, y - .5, .5, .5);\n\t\t\t\tboard[x + 2][y - 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 1 && y <= 7) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y - 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 1, y - 2, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y > 1 && y <= 7) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y - 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 1.5, y - 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 1.5, y - 1.5, .5, .5);\n\t\t\t\tboard[x + 1][y - 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 1 && y <= 7) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y - 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 1, y - 2, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y > 1 && y <= 7) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y - 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - .5, y - 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - .5, y - 1.5, .5, .5);\n\t\t\t\tboard[x - 1][y - 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\n\t\t\tStdDraw.show(30);\n\t\t\treturn canMove;\n\t\t}\n\n\t\tif (i == 22) {\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 0 && y <= 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y - 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 2, y - 1, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y > 0 && y <= 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y - 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - 1.5, y - .5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - 1.5, y - .5, .5, .5);\n\t\t\t\tboard[x - 2][y - 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y + 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 2, y + 1, board, StdDraw.WHITE);\n\t\t\t}\n\n\t\t\tif (((y >= 0 && y < 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y + 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - 1.5, y + 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - 1.5, y + 1.5, .5, .5);\n\t\t\t\tboard[x - 2][y + 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 6) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y + 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 1, y + 2, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 6) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y + 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - .5, y + 2.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - .5, y + 2.5, .5, .5);\n\t\t\t\tboard[x - 1][y + 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 6) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y + 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 1, y + 2, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 6) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y + 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 1.5, y + 2.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 1.5, y + 2.5, .5, .5);\n\t\t\t\tboard[x + 1][y + 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y + 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 2, y + 1, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y + 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 2.5, y + 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 2.5, y + 1.5, .5, .5);\n\t\t\t\tboard[x + 2][y + 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 0 && y <= 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y - 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 2, y - 1, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y > 0 && y <= 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y - 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 2.5, y - .5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 2.5, y - .5, .5, .5);\n\t\t\t\tboard[x + 2][y - 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 1 && y <= 7) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y - 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 1, y - 2, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y > 1 && y <= 7) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y - 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 1.5, y - 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 1.5, y - 1.5, .5, .5);\n\t\t\t\tboard[x + 1][y - 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 1 && y <= 7) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y - 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 1, y - 2, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y > 1 && y <= 7) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y - 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - .5, y - 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - .5, y - 1.5, .5, .5);\n\t\t\t\tboard[x - 1][y - 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\n\t\t\tStdDraw.show(30);\n\t\t\treturn canMove;\n\t\t} else\n\t\t\treturn canMove;\n\t}", "public int moves() {\n\t\tif (goal == null)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn goal.moves;\n\t}", "ArrayList<int[]> findValidMoves();", "public int[] getMove(int[][] grid) {\n int tmp;\n int max = _MIN_EVAL;\n int maxi = -1;\n int maxj = -1;\n\n //Si la _profondeur est nulle ou la partie est finie,\n //on ne fait pas le calcul\n //On parcourt les cases du morpion\n for (int row = 0; row < 3; row++) {\n for (int column = 0; column < 3; column++) {\n //Si la case est vide\n if (RuleController.isMoveLegal(grid, row, column)) {\n grid = RuleController.playMoveAt(grid, player, row, column);\n tmp = calculateMin(grid, proof - 1);\n if (tmp > max) {\n //On le choisit\n max = tmp;\n maxi = row;\n maxj = column;\n }\n grid = RuleController.cancelMove(grid, row, column);\n }\n }\n }\n return new int[]{maxi, maxj};\n }", "public static boolean solve(int[][] board) {\nfor (int x=0; x<9; x++) {\n for (int y=0; y<9; y++) {\nif (board[x][y] == 0) {\n \n // Try each possibile value in this space\n // and see if the rest of the puzzle can be filled in.\n for (board[x][y]=1; board[x][y]<=9; board[x][y]++) {\n if (isLegal(board) && solve(board)) {\n return true;\n }\n }\n \n // There is no value that we can put in the first\n // empty space that was found, so the puzzle is\n // unsolvable given the values put in up to this\n // point.\n board[x][y] = 0;\n return false;\n}\n }\n}\n \n// There were no empty spaces to fill in, so the\n// puzzle must be solved.\nreturn true;\n }", "public abstract boolean validMove(ChessBoard board, Square from, Square to);", "@Override\n\tpublic Collection<Move> calculateLegalMoves(final Board board) {\n\t\t\n\t\t//Array that will hold of the legal moves for the Pawn\n\t\tfinal List<Move> legalMoves = new ArrayList<>();\n\t\t\n\t\t//Loop through all possible moves by applying of the offsets to the Pawn's current position\n\t\tfor(final int currentCandidateOffset: CANDIDATE_MOVE_COORDINATES){\n\t\t\t\n\t\t\t//Apply the offset to the Pawn's current position\n\t\t\tfinal int candidateDestinationCoordinate = this.piecePosition + (this.getPieceTeam().getDirection() * currentCandidateOffset);\n\t\t\t\n\t\t\t//Checks if the Destination Coordinate is valid\n\t\t\tif(!BoardUtils.isValidTileCoordinate(candidateDestinationCoordinate)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//Checks if this tile is occupied\n\t\t\tif(currentCandidateOffset == 8 && !board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnMove(board, this, candidateDestinationCoordinate)));\n\t\t\t\telse\n\t\t\t\t\tlegalMoves.add(new Move.PawnMove(board, this, candidateDestinationCoordinate));\t\n\t\t\t}\n\t\t\t//Checks if the Pawn is on it's first move\n\t\t\telse if(currentCandidateOffset == 16 && this.isFirstMove() && ((BoardUtils.SEVENTH_RANK[this.piecePosition] && \n\t\t\t\t\tthis.getPieceTeam().isBlack()) || (BoardUtils.SECOND_RANK[this.piecePosition] && this.getPieceTeam().isWhite()))) {\n\t\t\t\t\n\t\t\t\t//Calculate coordinate of the tile behind candidate coordinate\n\t\t\t\tfinal int behindCandidateDestinationCoordinate = this.piecePosition + (this.pieceTeam.getDirection() * 8);\n\t\t\t\t\n\t\t\t\t//Checks if the tile behind the candidate destination is NOT occupied & if the Tile at the Candidate Destination is NOT occupied\n\t\t\t\tif(!board.getTile(behindCandidateDestinationCoordinate).isTileOccupied() && \n\t\t\t !board.getTile(candidateDestinationCoordinate).isTileOccupied())\n\t\t\t\t\t\tlegalMoves.add(new Move.PawnJump(board, this, candidateDestinationCoordinate));\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t//Checks for edge cases in the 7 direction\t\n\t\t\t} else if(currentCandidateOffset == 7 &&\n\t\t\t\t\t!((BoardUtils.FILE_H[this.piecePosition] && this.getPieceTeam().isWhite() ||\n\t\t\t\t\t(BoardUtils.FILE_A[this.piecePosition] && this.getPieceTeam().isBlack())))){\n\t\t\t\t\n\t\t\t\tif(board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\t\tfinal Piece pieceOnCandidate = board.getTile(candidateDestinationCoordinate).getPiece();\n\t\t\t\t\t//If the pieces are not on the same team an Attack move is added to legal moves.\n\t\t\t\t\tif(this.getPieceTeam() != pieceOnCandidate.getPieceTeam())\n\t\t\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate)));\n\t\t\t\t\t\telse \n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t\t\t\n\t\t\t\t//This basically checks if En Passant Pawn is next to Player's pawn\t\n\t\t\t\t} else if(board.getEnPassantPawn() != null){\n\t\t\t\t\tif(board.getEnPassantPawn().getPiecePosition() == (this.piecePosition + (this.pieceTeam.getOppositeDirection()))){\n\t\t\t\t\t\tfinal Piece pieceOnCandidate = board.getEnPassantPawn();\n\t\t\t\t\t\tif(this.pieceTeam != pieceOnCandidate.getPieceTeam()){\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnEnPassantAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t//Checks for edge cases in the 9 direction\t\n\t\t\t} else if(currentCandidateOffset == 9 && \n\t\t\t\t\t!((BoardUtils.FILE_A[this.piecePosition] && this.getPieceTeam().isWhite() ||\n\t\t\t\t\t(BoardUtils.FILE_H[this.piecePosition] && this.getPieceTeam().isBlack())))){\n\t\t\t\t\n\t\t\t\tif(board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\t\tfinal Piece pieceOnCandidate = board.getTile(candidateDestinationCoordinate).getPiece();\n\t\t\t\t\t//If the pieces are not on the same team an Attack move is added to legal moves.\n\t\t\t\t\tif(this.getPieceTeam() != pieceOnCandidate.getPieceTeam())\n\t\t\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate)));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t} else if(board.getEnPassantPawn() != null){\n\t\t\t\t\tif(board.getEnPassantPawn().getPiecePosition() == (this.piecePosition - (this.pieceTeam.getOppositeDirection()))){\n\t\t\t\t\t\tfinal Piece pieceOnCandidate = board.getEnPassantPawn();\n\t\t\t\t\t\tif(this.pieceTeam != pieceOnCandidate.getPieceTeam()){\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnEnPassantAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\treturn ImmutableList.copyOf(legalMoves);\n\t}", "public Iterable<Board> solution() {\n if (!isSolvable()) {\n return null;\n }else {\n Stack<Board> sequenceBoard = new Stack<>();\n\n Node preNode = minNode;\n sequenceBoard.push(preNode.getBoard());\n\n while (preNode.getPrevious() != null) {\n preNode = preNode.getPrevious();\n sequenceBoard.push(preNode.getBoard());\n }\n\n return sequenceBoard;\n }\n }", "@Override\n public ArrayList<xMCTSStringGameState> getPossibleMoves(xMCTSStringGameState gameState)\n {\n\t ArrayList<xMCTSStringGameState> posMoves = new ArrayList<xMCTSStringGameState>();\n\t if (gameStatus(gameState) == xMCTSGame.status.ONGOING) {\n\t \t String activeCard = gameState.toString().substring(gameState.toString().length() - 2, gameState.toString().length());\n\t \t int gridSize = SIZE*2;\n\t for (int i = 0; i < gridSize; i += 2) {\n\t for (int j = 0; j < gridSize; j += 2) {\n\t int pos = i * SIZE + j;\n\t if (gameState.toString().charAt(pos) == '_') {\n\t String temp = gameState.toString().substring(0, pos)\n\t \t\t + activeCard\n\t + gameState.toString().substring(pos + 2,\n\t gameState.toString().length());\n\t posMoves.add(new xMCTSStringGameState(temp, 0.0, 0));\n\t }\n\t }\n\n\t }\n\t }\n\t else {\n\t \t // System.out.println(\"No moves can be made from this state\");\n\t \t// callsFromFullBoards++;\n\t \t// System.out.println(\"There have been \" + callsFromFullBoards + \"attempts to get possible moves from a full board\");\n\t }\n\t return posMoves;\n }", "public static boolean isBasicMoveValid(int[][] board, int player, int fromRow, int fromCol, int toRow, int toCol) {\r\n\t\t\t\r\n\t\tboolean ans = false;\r\n\t\t\r\n\t\t/*Checking if coordinates are OK*/\r\n\t\tif(fromRow<8&fromCol<8&toRow<8&toCol<8&fromRow>-1&fromCol>-1&toRow>-1&toCol>-1&player>-2&player<2&player!=0){\r\n\t\t\tif (board [toRow][toCol]==0){/*Checks if the tile is empty*/\r\n\t\t\t\tif (player==1){/*Checks if player is red*/\r\n\t\t\t\t\tif (board[fromRow][fromCol]==1){/*Checks if in tile there is soldier red */\r\n\t\t\t\t\t\tif(fromRow==toRow-1&&(fromCol==toCol+1||fromCol==toCol-1)){/*Did he move diagonally upward*/\r\n\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\tif (board[fromRow][fromCol]==2){/*Checks if in tile there is queen red*/\r\n\t\t\t\t\t\tif(((fromRow==toRow+1)||(fromRow==toRow-1))&&((fromCol==toCol+1)||(fromCol==toCol-1))){/*Did he move diagonally */\r\n\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\tif (player==-1){/*Checks if player is blue*/\r\n\t\t\t\t\tif (board[fromRow][fromCol]==-1){/*Checks if in tile there is soldier blue */\r\n\t\t\t\t\t\tif(fromRow==toRow+1&(fromCol==toCol+1||fromCol==toCol-1)){/*Did he move diagonally down*/\r\n\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (board[fromRow][fromCol]==-2){/*Checks if in tile there is queen blue*/\r\n\t\t\t\t\t\tif(((fromRow==toRow+1)||(fromRow==toRow-1))&&((fromCol==toCol+1)||(fromCol==toCol-1))){/*Did he move diagonally */\r\n\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ans;\r\n\t}", "public boolean isSolvable()\n {\n return moves() >= 0;\n }", "public int getComputerMove()\n {\n int move;\n\n // First see if there's a move O can make to win\n for (int i = 0; i < BOARD_SIZE; i++) {\n if (mBoard[i] != HUMAN_PLAYER && mBoard[i] != COMPUTER_PLAYER) {\n char curr = mBoard[i];\n mBoard[i] = COMPUTER_PLAYER;\n if (checkForWinner() == 3) {\n mBoard[i] = curr;\n return i;\n }\n else\n mBoard[i] = curr;\n }\n }\n\n // See if there's a move O can make to block X from winning\n for (int i = 0; i < BOARD_SIZE; i++) {\n if (mBoard[i] != HUMAN_PLAYER && mBoard[i] != COMPUTER_PLAYER) {\n char curr = mBoard[i]; // Save the current number\n mBoard[i] = HUMAN_PLAYER;\n if (checkForWinner() == 2) {\n //mBoard[i] = COMPUTER_PLAYER;\n mBoard[i] = curr;\n return i;\n }\n else\n mBoard[i] = curr;\n }\n }\n\n // Generate random move\n do\n {\n move = mRand.nextInt(BOARD_SIZE);\n } while (mBoard[move] == HUMAN_PLAYER || mBoard[move] == COMPUTER_PLAYER);\n\n return move;\n }", "public boolean isSolvable() {\n return moves != -1;\n }", "public int[] findMove(){\n int[] blackCheckerSpots = new int[12];\n int i =0;\n while(mCheckerBoard.indexOf(new Checker(1, false)) != -1){\n int startPosition = mCheckerBoard.indexOf(new Checker(1, false)); //need to override Checker equals method\n Checker current = mCheckerBoard.get(startPosition);\n int[] answer = jumpRight(startPosition, false, current);\n if(answer.length > 1)\n {\n //jumped right downwards\n return answer;\n }\n answer = jumpLeft(startPosition, false, current);\n if(answer.length > 1){\n //jumped left downwards\n return answer;\n }\n answer = moveDiagonalRight(startPosition, false, current);\n if(answer.length > 1){\n //moved diagonal right downwards\n return;\n }\n answer = moveDiagonalLeft(startPosition, false, current);\n if(answer.length > 1){\n //moved diagonal left downwards\n return;\n }\n\n //end of loop\n //these are the ones that need to be set back to black at the end\n current.setIsRed(true);\n blackCheckerSpots[i]=startPosition;\n i++;\n }\n\n for(int j =0; j<blackCheckerSpots.length; j++){\n Checker changed = mCheckerBoard.get(blackCheckerSpots[j]);\n changed.setIsRed(false);\n mCheckerBoard.set(blackCheckerSpots[j], changed);\n }\n\n }", "private int playMove(int[] board, int move) {\n boolean direction = false;\n boolean player1Move = isPlayer1Move(move);\n if ((move > 1) && (move < 8)) {\n direction = true;\n }\n if (move == 10) {\n move = 2;\n }\n if (move == 11) {\n move = 7;\n }\n int numberOfMarbleBalls = board[move];\n if (numberOfMarbleBalls < 2) {\n return -1;\n }\n board[move] = 0;\n while (numberOfMarbleBalls > 0) {\n move = goToNext(move, direction);\n board[move] = board[move] + 1;\n numberOfMarbleBalls = numberOfMarbleBalls - 1;\n }\n int takenMarbleBalls = 0;\n if (player1Move) {\n while (true) {\n if (move < 5) break;\n if (!((board[move] == 2) || (board[move] == 4))) break;\n takenMarbleBalls = takenMarbleBalls + board[move];\n board[move] = 0;\n move = goToNext(move, !(direction));\n }\n } else {\n while (true) {\n if (move > 4) break;\n if (!((board[move] == 2) || (board[move] == 4))) break;\n takenMarbleBalls = takenMarbleBalls + board[move];\n board[move] = 0;\n move = goToNext(move, !(direction));\n }\n }\n return takenMarbleBalls;\n }", "public void solve() {\n\t\tArrayList<Piece> pieceListBySize = new ArrayList<Piece>(pieceList);\n\t\tCollections.sort(pieceListBySize);\t// This is done since the order\n\t\t\t\t\t\t\t\t\t\t\t// of piece placements does not matter.\n\t\t\t\t\t\t\t\t\t\t\t// Placing larger pieces down first lets\n\t\t\t\t\t\t\t\t\t\t\t// pruning occur sooner.\n\t\t\n\t\t/**\n\t\t * Calculates number of resets needed for a game board.\n\t\t * A \"reset\" refers to a tile that goes from the solved state to\n\t\t * an unsolved state and back to the solved state.\n\t\t * \n\t\t * This is the calculation used for pruning.\n\t\t */\n\t\t\n\t\tArrayList<Integer> areaLeft = new ArrayList<Integer>();\n\t\tareaLeft.add(0);\n\t\tint totalArea = 0;\n\t\tfor (int i = pieceListBySize.size() - 1; i >= 0; i--) {\n\t\t\ttotalArea += pieceListBySize.get(i).numberOfFlips;\n\t\t\tareaLeft.add(0, totalArea);\n\t\t}\n\t\tint totalResets = (totalArea - gameBoard.flipsNeeded) / (gameBoard.goal + 1);\n\t\tSystem.out.println(\"Total Resets: \" + totalResets);\n\t\t\n\t\t/* \n\t\tint highRow = 0;\n\t\tint highCol = 0;\n\t\tint[][] maxDim = new int[2][pieceListBySize.size()];\n\t\tfor (int i = pieceListBySize.size() - 1; i >= 0; i--) {\n\t\t\tif (highRow < pieceListBySize.get(i).rows)\n\t\t\t\thighRow = pieceListBySize.get(i).rows;\n\t\t\t\n\t\t\tif (highCol < pieceListBySize.get(i).cols)\n\t\t\t\thighCol = pieceListBySize.get(i).cols;\n\t\t\t\n\t\t\tmaxDim[0][i] = highRow;\n\t\t\tmaxDim[1][i] = highCol;\n\t\t}\n\t\t*/\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\tNode<GameBoard> currentNode = new Node<GameBoard>(gameBoard);\n\t\tStack<Node<GameBoard>> stack = new Stack<Node<GameBoard>>();\n\t\tstack.push(currentNode);\n\t\t\n\t\twhile (!stack.isEmpty()) {\n\t\t\tnodeCount++;\n\t\t\t\n\t\t\tNode<GameBoard> node = stack.pop();\n\t\t\tGameBoard current = node.getElement();\n\t\t\tint depth = node.getDepth();\n\t\t\t\n\t\t\t// Checks to see if we reach a solved state.\n\t\t\t// If so, re-order the pieces then print out the solution.\n\t\t\tif (depth == pieceListBySize.size() && current.isSolved()) {\n\t\t\t\tArrayList<Point> moves = new ArrayList<Point>();\n\t\t\t\t\n\t\t\t\twhile (node.parent != null) {\n\t\t\t\t\tint index = node.level - 1;\n\t\t\t\t\tint sequence = pieceList.indexOf(pieceListBySize.get(index));\n\t\t\t\t\tPoint p = new Point(current.moveRow, current.moveCol, sequence);\n\t\t\t\t\tmoves.add(p);\n\t\t\t\t\t\n\t\t\t\t\tnode = node.parent;\n\t\t\t\t\tcurrent = node.getElement();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tCollections.sort(moves);\n\t\t\t\tfor (Point p : moves) {\n\t\t\t\t\tSystem.out.println(p);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Nodes opened: \" + nodeCount);\n\t\t\t\tlong endTime = System.currentTimeMillis();\n\t\t\t\tSystem.out.println(\"Elapsed Time: \" + ((endTime - startTime) / 1000) + \" secs.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tPiece currentPiece = pieceListBySize.get(depth);\n\t\t\tint pieceRows = currentPiece.rows;\n\t\t\tint pieceCols = currentPiece.cols;\n\t\t\t\n\t\t\tPriorityQueue<Node<GameBoard>> pQueue = new PriorityQueue<Node<GameBoard>>();\n\t\t\t\n\t\t\t// Place piece in every possible position in the board\n\t\t\tfor (int i = 0; i <= current.rows - pieceRows; i++) {\n\t\t\t\tfor (int j = 0; j <= current.cols - pieceCols; j++) {\n\t\t\t\t\tGameBoard g = current.place(currentPiece, i, j);\n\t\t\t\t\t\n\t\t\t\t\tif (totalResets - g.resets < 0)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\t// Put in the temporary priority queue\n\t\t\t\t\tpQueue.add(new Node<GameBoard>(g, node));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Remove from priority queue 1 at a time and put into stack.\n\t\t\t// The reason this is done is so that boards with the highest reset\n\t\t\t// count can be chosen over ones with fewer resets.\n\t\t\twhile (!pQueue.isEmpty()) {\n\t\t\t\tNode<GameBoard> n = pQueue.remove();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public boolean isSolvable() {\n Board twin = initial.twin();\n MinPQ<Node> mainQueue = new MinPQ<>(getComparator());\n MinPQ<Node> twinQueue = new MinPQ<>(getComparator());\n mainQueue.insert(new Node(initial, 0, null));\n twinQueue.insert(new Node(twin, 0, null));\n while (this.solution == null) {\n Node temp = mainQueue.delMin();\n if (temp.board.isGoal()) {\n this.solution = temp;\n return true;\n }\n Iterable<Board> nebrs = temp.board.neighbors();\n for (Board x : nebrs) {\n if (!x.equals(temp.previousNode.board)) {\n mainQueue.insert(new Node(x, temp.movesToBoard + 1, temp));\n }\n }\n Node temp2 = twinQueue.delMin();\n if (temp2.board.isGoal()) {\n this.solution = null;\n return false;\n }\n Iterable<Board> nebrs2 = temp2.board.neighbors();\n for (Board x : nebrs2) {\n if (!x.equals(temp2.previousNode.board)) {\n twinQueue.insert(new Node(x, temp2.movesToBoard + 1, temp2));\n }\n }\n }\n return false;\n }", "public List<Integer> getLegalMoves()\n\t{\n\t\tArrayList<Integer> moves = new ArrayList<Integer>();\n\t\tfor (int col = 0; col < cols; col++)\n\t\t{\n\t\t\tif (isEmpty(0,col))\n\t\t\t\tmoves.add(col);\n\t\t}\n\t\treturn moves;\n\t}", "public int move_diagonally(Square[][] squares, int [] move, Boolean turn) {\n\n /* going down and right = f4 h2 [4,5,6,7] */\n if (move[2] > move[0] && move[3] > move[1]) {\n ////System.out.println(\"Down right\");\n int x = move[0];\n int y = move[1];\n x++;\n y++;\n while (x < move[2] && y < move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x++;\n y++;\n }\n }\n /* going down and left */\n else if (move[2] > move[0] && move[3] < move[1]){\n ////System.out.println(\"Down Left\");\n int x = move[0];\n int y = move[1];\n x++;\n y--;\n while (x < move[2] && y > move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x++;\n y--;\n }\n }\n /* going up and left */\n else if (move[2] < move[0] && move[3] < move[1]){\n ////System.out.println(\"Up Left\");\n int x = move[0];\n int y = move[1];\n x--;\n y--;\n while (x > move[2] && y > move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x--;\n y--;\n }\n }\n /* going up and right c1 f4 [7,2,4,5] */\n else if (move[2] < move[0] && move[3] > move[1]){\n ////System.out.println(\"Up right\");\n int x = move[0];\n int y = move[1];\n x--;\n y++;\n while (x > move[2] && y < move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x--;\n y++;\n }\n }\n return 0;\n }", "private static int evaluateBoard(final int[][] givenBoard) {\n final int[][] board = cloneBoard(givenBoard);\n\n final int numRows = givenBoard.length;\n final int numCols = givenBoard[0].length;\n\n \n // If the game is complete\n if (!Utils.hasMove(board)) {\n // Find largest absolute move value for player and opponent\n int playerScore = 0;\n int opponentScore = 0;\n for (final int[] row : board) {\n for (final int val : row) {\n if (val > playerScore) playerScore = val;\n if (val < opponentScore) opponentScore = val;\n } \n }\n // Give a big reward + the ammount we won the game by\n return WIN_REWARD + playerScore + opponentScore;\n }\n boardsEvaluated++;\n\n \n // If the game is incomplete, return the diference between the average \n // distance that the player and opponent are from each empty square\n int[][] playerDistances = distanceGrid(board);\n int[][] opponentDistances = distanceGrid(flipBoard(board));\n \n int totalPlayerDistance = 0;\n int totalOpponentDistance = 0;\n \n int maxPlayerDistance = 0;\n int maxOpponentDistance = 0;\n \n \n int largestPlayerMove = 0;\n int smallestOpponentMove = 0;\n \n int numEmptySpaces = 0;\n \n for (int r = 0; r < numRows; r++) {\n for (int c = 0; c < numCols; c++) {\n if (playerDistances[r][c] > 0) {\n totalPlayerDistance += playerDistances[r][c];\n numEmptySpaces++;\n }\n if (opponentDistances[r][c] > 0) {\n totalOpponentDistance += opponentDistances[r][c];\n }\n \n int boardVal = board[r][c];\n if (largestPlayerMove < boardVal) largestPlayerMove = boardVal;\n if (smallestOpponentMove > boardVal) smallestOpponentMove = boardVal;\n \n } \n }\n int averageDistanceDifference = totalOpponentDistance - totalPlayerDistance;\n\n int largestMoveDifference = largestPlayerMove + smallestOpponentMove;\n\n\n return averageDistanceDifference + largestMoveDifference;\n }", "public static int[] showMoves(char[][] board){\r\n\r\n // iterate through the top row to see remaining valid moves\r\n \r\n int[] out = new int[7];\r\n int len = 0;\r\n for (int col = 0; col < board[0].length; col++){\r\n if (board[1][col] == 'o'){\r\n out[len] = col;\r\n len ++;\r\n }\r\n }\r\n\r\n // trim out to contain no null values\r\n int[] trimmed = new int[len];\r\n for (int col = 0; col < 7 ; col++){\r\n if (out[col] != 0){\r\n trimmed[col] = out[col];\r\n }\r\n }\r\n return trimmed;\r\n }", "void generateBoard(){\r\n rearrangeSolution();\r\n makeInitial();\r\n }", "public boolean solvable() {\n // TODO: Your code here\n // TODO: NICK\n\n\n int parity = 0;\n int blankRow = 0; // the row with the blank tile\n\n\n for (int i = 0; i < n*n; i++){\n if(tiles[i/n][i%n] == 0){\n blankRow = i/3;\n continue;\n }\n for (int j = i + 1; j < n*n; j++) {\n if (tiles[i/n][i%n] > tiles[j/n][j%n] && tiles[j/n][j%n] != 0) {\n parity++;\n }\n }\n }\n\n\n\n // solvability conditions:\n if (n % 2 == 0) { // even grid\n if (blankRow % 2 == 0) { // blank on odd row; counting from bottom\n return parity % 2 == 0;\n } else { // blank on even row; counting from bottom\n return parity % 2 != 0;\n }\n } else { // odd grid\n return parity % 2 == 0;\n }\n }", "public int determineWinner() {\n\t\tif(board[1][1] != 0 && (\n\t\t\t(board[1][1] == board[0][0] && board[1][1] == board[2][2]) ||\n\t\t\t(board[1][1] == board[0][2] && board[1][1] == board[2][0]) ||\n\t\t\t(board[1][1] == board[0][1] && board[1][1] == board[2][1]) ||\n\t\t\t(board[1][1] == board[1][0] && board[1][1] == board[1][2]))){\n\t\t\treturn board[1][1];\n\t\t}\n\t\telse if (board[0][0] != 0 &&(\n\t\t\t(board[0][0] == board[0][1] && board[0][0] == board[0][2]) ||\n\t\t\t(board[0][0] == board[1][0] && board[0][0] == board[2][0]))){\n\t\t\treturn board[0][0];\n\t\t}\n\t\telse if (board [2][2] != 0 && (\n\t\t\t(board[2][2] == board[2][0] && board[2][2] == board[2][1]) ||\n\t\t\t(board[2][2] == board[0][2] && board[2][2] == board[1][2]))) {\n\t\t\treturn board[2][2];\n\t\t}\n\t\t\n\t\t//See if every square has been marked, return still in progress if not\n\t\tfor(int i = 0; i < 3; ++i) {\n\t\t\tfor(int j = 0; j < 3; ++j) {\n\t\t\t\tif (board[i][j] == 0)\n\t\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Return tie\n\t\treturn 3;\n\t}", "public Iterable<Board> solution() {\n if (!isSolvable())\n return null;\n Stack<Board> solution = new Stack<Board>();\n for (Node s = goal; s != null; s = s.previousNode)\n solution.push(s.board);\n return solution;\n }", "private List<Coordinate> getAvailableMoves(ImmutableGameBoard gameBoard) {\n List<Coordinate> availableMoves = new ArrayList<Coordinate>();\n\n for (int x = 0; x < gameBoard.getWidth(); x++) {\n for (int y = 0; y < gameBoard.getHeight(); y++) {\n if(gameBoard.getSquare(x, y) == TicTacToeGame.EMPTY)\n availableMoves.add(new Coordinate(x, y));\n }\n }\n\n return availableMoves;\n }", "public int moves() {\n return goal == null ? -1 : goal.numMoves;\n }", "public List<int[][]> evaluate(IBoard board){\n\n int area = board.getHeight() * board.getWidth();\n\n int[][] newArray = new int[area][2];\n\n int k = 0;\n\n while (k < newArray.length) {\n for (int i = 0; i < board.getHeight(); i++) {\n for (int j = 0; j < board.getWidth(); j++) {\n newArray[k][0] = i;\n newArray[k][1] = j;\n k++;\n }\n }\n }\n\n List<int[][]> Allmoves = new ArrayList<>();\n\n int res = newArray.length / board.getHeight();\n\n /*For rows*/\n int q = 0;\n int w = res;\n\n for (int i = 0; i < res; i++) {\n int[][] arr = new int[res][2];\n\n int e = 0;\n\n for (int j = q; j < w; j++) {\n arr[e][0] = newArray[j][0];\n arr[e][1] = newArray[j][1];\n e++;\n }\n\n w += res;\n q += res;\n\n Allmoves.add(arr);\n\n }\n\n /*For columns*/\n int r = 0;\n for (int i = 0; i < res; i++) {\n\n int[][] arr = new int[res][2];\n int e = 0;\n\n for (int j = 0; j < res; j++) {\n arr[e][0] = newArray[r][0];\n arr[e][1] = newArray[r][1];\n\n r += res;\n e++;\n }\n r = 0;\n r += i + 1;\n\n Allmoves.add(arr);\n }\n\n /*For diagonal - 1*/\n int[][] arr = new int[res][2];\n int d1 = res + 1;\n int d = 0;\n int e = 0;\n for (int i = 0; i < res; i++) {\n arr[e][0] = newArray[d][0];\n arr[e][1] = newArray[d][1];\n d += d1;\n e++;\n }\n\n Allmoves.add(arr);\n\n int[][] arr1 = new int[res][2];\n int d2 = res - 1;\n int D = res - 1;\n int p = 0;\n for (int i = 0; i < res; i++) {\n arr1[p][0] = newArray[D][0];\n arr1[p][1] = newArray[D][1];\n D += d2;\n p++;\n }\n\n Allmoves.add(arr1);\n\n return Allmoves;\n\n }", "public int getComMove() {\n\n int move;\n\n // Checks if a computer played a move in that spot\n for (int i = 0; i < getBoardSize(); i++) {\n if (playBoard[i] != REAL_PLAYER && playBoard[i] != COM_PLAYER) {\n char currPlace = playBoard[i];\n playBoard[i] = COM_PLAYER;\n\n if (winCheck() == 3) {\n setMove(COM_PLAYER, i);\n return i;\n }\n else {\n playBoard[i] = currPlace;\n }\n }\n }\n\n // Check to block human player from winning\n for (int i = 0; i < getBoardSize(); i++) {\n if (playBoard[i] != REAL_PLAYER && playBoard[i] != COM_PLAYER) {\n char currPlace = playBoard[i];\n playBoard[i] = REAL_PLAYER;\n\n if (winCheck() == 2) {\n setMove(COM_PLAYER, i);\n return i;\n }\n else {\n playBoard[i] = currPlace;\n }\n }\n }\n\n // If play spot is empty, then make move\n do {\n move = randMove.nextInt(getBoardSize());\n } while (playBoard[move] == REAL_PLAYER || playBoard[move] == COM_PLAYER);\n setMove(COM_PLAYER, move);\n\n return move;\n }", "public LinkedList<Move> getPossibleMoves() {\n\t\tAIPossibleMoves.clear();\n\t\tint xOrigin = 0, yOrigin = 0, xMove1 = 0, xMove2 = 0, yMove1 = 0, yMove2 = 0;\n\t\tMove move = null;\t\n\t\t\tint type = 0;\n\t\t\tfor(Checker checker: model.whitePieces) {\n\t\t\t\t\n\t\t\t\txOrigin = checker.getCurrentXPosition();\n\t\t\t\tyOrigin = checker.getCurrentYPosition();\n\t\t\t\txMove1 = (checker.getCurrentXPosition() - 1);\n\t\t\t\txMove2 = (checker.getCurrentXPosition() + 1);\n\t\t\t\tyMove1 = (checker.getCurrentYPosition() - 1);\n\t\t\t\tyMove2 = (checker.getCurrentYPosition() + 1);\n\t\t\t\ttype = checker.getType();\n\t\t\t\tswitch(type) {\n\t\t\t\tcase 2:\n\n\t\t\t\t\tif((xMove1 < 0) || (yMove1 <0)) {\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove1, false, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove1)) {\n\t\t\t\t\t\t\t//System.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove1, false, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n \n\t\t\t\t\tif((xMove2 > 7) || (yMove1 < 0)) {\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove1, true, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove1)) {\n\t\t\t\t\t\t\t// System.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove1, true, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 4:\n\t\t\t\t\t//Moving up and left isMovingRight,IsMovingDown\n\t\t\t\t\tif((xMove1 <0) || (yMove1 < 0)) {\n\t\t\t\t\t\t//continue;\n\t\t\t\t\t} else {\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove1, false, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove1)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove1, false, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove2 > 7) || (yMove1 < 0)) {\n\t\t\t\t\t//continue;\n\t\t\t\t} else {\n\t\t\t\t\t//moving up and right\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove1, true, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove1)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove1, true, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove1 < 0) || (yMove2 > 7)) {\n\t\t\t\t//\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\t//moving down and left isMovingRight,IsMovingDown\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove2, false, true )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove2)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove2);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove2,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove2, false, true)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove2);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove2 > 7) || (yMove2 > 7)) {\n\t\t\t\t\t//continue;\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\t//moving down and right isMovingRight,IsMovingDown\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove2, true, true )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove2)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove2);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove2,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove2, true, true)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove2);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tbreak;\t\n\t\t\t\t}\t\n\t\t\t\n\t\t\t}\n\n\t\t\treturn AIPossibleMoves;\n\t\t\t\n\t\t}", "int moves() {\n return moves;\n }", "int movesMade() {\n return _moves.size();\n }", "public PossibleMove[] getPossibleMoves(Coordinate from);", "public List<Move> validMoves(){\n List<Move> results = new LinkedList<>();\n int kingVal = turn == WHITE ? WHITE_KING : BLACK_KING;\n int kingX = 0, kingY = 0;\n List<Piece> checks = null;\n kingSearch:\n for (int y = 0; y < 8; y++){\n for (int x = 0; x < 8; x++){\n if (board[y][x] == kingVal){\n kingX = x;\n kingY = y;\n checks = inCheck(x,y);\n break kingSearch;\n }\n }\n }\n if (checks.size() > 1){ // must move king\n for (int x = -1; x < 2; x++){\n for (int y = -1; y < 2; y++){\n if (kingX+x >= 0 && kingX + x < 8 && kingY+y >= 0 && kingY+y < 8){\n int val = board[kingY+y][kingX+x];\n if (val == 0 || turn == WHITE && val > WHITE_KING || turn == BLACK && val < BLACK_PAWN){\n // may still be a move into check, must test at end\n results.add(new Move(kingVal, kingX, kingY, kingX+x, kingY+y, val, 0, this));\n }\n }\n }\n }\n } else { // could be in check TODO: split into case of single check and none, identify pin/capture lines\n int queen = turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN;\n int knight = turn == WHITE ? WHITE_KNIGHT : BLACK_KNIGHT;\n int rook = turn == WHITE ? WHITE_ROOK : BLACK_ROOK;\n int bishop = turn == WHITE ? WHITE_BISHOP : BLACK_BISHOP;\n for (int y = 0; y < 8; y++) {\n for (int x = 0; x < 8; x++) {\n int piece = board[y][x];\n if (piece == (turn == WHITE ? WHITE_PAWN : BLACK_PAWN)) { // pawns\n // regular | 2 move\n if (board[y+turn][x] == 0){\n if (y+turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x, y + turn, 0, queen, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, knight, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, rook, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, bishop, this));\n }\n else {\n results.add(new Move(piece, x, y, x, y + turn, 0, 0, this));\n if ((y == (turn == WHITE ? 1 : 6)) && board[y + 2 * turn][x] == 0) { // initial 2 move\n results.add(new Move(piece, x, y, x, y + 2*turn, 0, 0, this));\n }\n }\n }\n // capture\n for (int dx = -1; dx <= 1; dx += 2){\n if (x + dx >= 0 && x + dx < 8) {\n int val = board[y+turn][x+dx];\n if (val > 0 && (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n if (y + turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x+dx, y + turn, val, queen, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, knight, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, rook, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, bishop, this));\n } else {\n results.add(new Move(piece, x, y, x+dx, y + turn, val, 0, this));\n }\n }\n if (val == 0 && y == (turn == WHITE ? 4 : 3) && x+dx == enPassant){ // en passant\n results.add(new Move(piece, x, y, x+dx, y + turn, 0, 0, this));\n }\n }\n }\n\n } else if (piece == knight) { // knights TODO: lookup table\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n if (x+dy >= 0 && x + dy < 8 && y + dx >= 0 && y + dx < 8){\n int val = board[y+dx][x+dy];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dy,y+dx,val,0,this));\n }\n }\n }\n }\n } else if (piece == bishop) { // bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == rook) { // rooks\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN)) { // queens\n // Diagonals - same as bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_KING : BLACK_KING)) { // king\n for (int dx = -1; dx < 2; dx++){\n for (int dy = -1; dy < 2; dy++){\n if ((dx != 0 || dy != 0) && x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n }\n }\n }\n }\n }\n // castle\n if (checks.size() == 0){\n if (turn == WHITE && (castles & 0b11) != 0){//(castles[0] || castles[1])){\n board[0][4] = 0; // remove king to avoid check test collisions with extra king\n if ((castles & WHITE_SHORT) != 0 && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n //if (castles[0] && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 6, 0, 0, 0, this));\n }\n if ((castles & WHITE_LONG) != 0 && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 &&\n inCheck(3,0).size() == 0){\n //if (castles[1] && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 && inCheck(3,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 2, 0, 0, 0, this));\n }\n board[0][4] = WHITE_KING;\n }else if (turn == BLACK && (castles & 0b1100) != 0){//(castles[2] || castles[3])) {\n board[7][4] = 0; // remove king to avoid check test collisions with extra king\n //if (castles[2] && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n if ((castles & BLACK_SHORT) != 0 && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 6, 7, 0, 0, this));\n }\n //if (castles[3] && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 && inCheck(3, 7).size() == 0) {\n if ((castles & BLACK_LONG) != 0 && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 &&\n inCheck(3, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 2, 7, 0, 0, this));\n }\n board[7][4] = BLACK_KING;\n }\n }\n }\n List<Move> fullLegal = new LinkedList<>();\n for (Move m : results){\n makeMove(m);\n turn = -turn;\n if (m.piece == WHITE_KING || m.piece == BLACK_KING){\n if (inCheck(m.toX,m.toY).size() == 0){\n fullLegal.add(m);\n }\n }else if (inCheck(kingX,kingY).size() == 0){\n fullLegal.add(m);\n }\n turn = -turn;\n undoMove(m);\n }\n Collections.sort(fullLegal, (o1, o2) -> o2.score - o1.score); // greatest score treated as least so appears first\n return fullLegal;\n }", "public int[][] legalMoves() {\n return legalMoves[nextPiece];\n }", "@Override\n public Collection<Move> calculateLegalMoves(Board board) {\n System.out.println(\"INSIDE Knight: calculateLegalMoves()\");\n System.out.println(\"------------------------------>\\n\");\n\n //ArrayList of moves used to store all possible legal moves.\n final List<Move> legalMoves = new ArrayList<>();\n\n //Iterate the constant class array of piece offsets.\n for(final int currentCandidate : CANDIDATE_MOVE_COORDS){\n //Add the current coordinate of the piece to each offset, storing as a destination coordinate.\n final int candidateDestinationCoord = this.piecePosition + currentCandidate;\n\n //If the destination coordinate is within legal board bounds (between 0 and 64)...\n if(BoardUtils.isValidCoord(candidateDestinationCoord)){\n //Check to see if the piece is in the first column and its destination would move it outside the board.\n if(isfirstColumnExclusion(this.piecePosition, currentCandidate) ||\n isSecondColumnExclusion(this.piecePosition, currentCandidate) ||\n isSeventhColumnExclusion(this.piecePosition, currentCandidate) ||\n isEighthColumnExclusion(this.piecePosition, currentCandidate)){\n continue; //Continue the loop if any of these methods return true\n }\n\n //Store the tile of the destination coordinate.\n final Tile candidateDestinationTile = board.getTile(candidateDestinationCoord);\n\n //If the tile is not marked as occupied by the Tile class...\n if(!candidateDestinationTile.isOccupied()){\n //Add the move to the list of legal moves as a non-attack move.\n legalMoves.add(new MajorMove(board, this, candidateDestinationCoord));\n }\n else{\n //Otherwise, get the type and alliance of the piece at the destination.\n final Piece pieceAtDestination = candidateDestinationTile.getPiece();\n final Alliance pieceAlliance = pieceAtDestination.getPieceAlliance();\n\n //If the piece at the occupied tile's alliance differs...\n if(this.pieceAlliance != pieceAlliance){\n //Add the move to the list of legal moves as an attack move.\n legalMoves.add(new MajorAttackMove(board, this, candidateDestinationCoord, pieceAtDestination));\n }\n }\n }\n }\n\n //Return the list of legal moves.\n return legalMoves;\n }", "public static int[][] queenMoves(int[] currentQueen, BoardModel model) {\n\n int[][] moveLevel = new int[10][10];\n boolean[][] visited = new boolean[10][10];\n Queue<int[]> nodesToCheck = new LinkedList<>();\n //initialize the queen array to show the location of the queen and the \n // number of moves it takes to get to the queen. \n int[] initQueen = new int[3];\n initQueen[0] = currentQueen[0];\n initQueen[1] = currentQueen[1];\n initQueen[2] = 0;\n moveLevel[initQueen[0]][initQueen[1]] = initQueen[2];\n nodesToCheck.add(initQueen);\n while (!nodesToCheck.isEmpty()) {\n int[] neighbourNode = nodesToCheck.poll();\n // search nodes above until positions are no longer available; \n for (int i = neighbourNode[0] + 1; i < 10; i++) {\n if (!visited[i][neighbourNode[1]]) {\n if (model.getTile(i, neighbourNode[1]) == BoardModel.POS_AVAILABLE) {\n visited[i][neighbourNode[1]] = true;\n int[] initCurrentSpot = new int[3];\n initCurrentSpot[0] = i;\n initCurrentSpot[1] = neighbourNode[1];\n initCurrentSpot[2] = neighbourNode[2] + 1;\n moveLevel[initCurrentSpot[0]][initCurrentSpot[1]] = initCurrentSpot[2];\n\n nodesToCheck.add(initCurrentSpot);\n\n } else {\n break;\n\n }\n }\n }\n // search nodes below until positions are no longer available\n for (int i = neighbourNode[0] - 1; i >= 0; i--) {\n if (!visited[i][neighbourNode[1]]) {\n if (model.getTile(i, neighbourNode[1]) == BoardModel.POS_AVAILABLE) {\n visited[i][neighbourNode[1]] = true;\n int[] initCurrentSpot = new int[3];\n initCurrentSpot[0] = i;\n initCurrentSpot[1] = neighbourNode[1];\n initCurrentSpot[2] = neighbourNode[2] + 1;\n moveLevel[initCurrentSpot[0]][initCurrentSpot[1]] = initCurrentSpot[2];\n nodesToCheck.add(initCurrentSpot);\n } else {\n break;\n }\n }\n\n }\n // search nodes to the right until positions are no longer available\n for (int i = neighbourNode[1] + 1; i < 10; i++) {\n if (!visited[neighbourNode[0]][i]) {\n if (model.getTile(neighbourNode[0], i) == BoardModel.POS_AVAILABLE) {\n visited[neighbourNode[0]][i] = true;\n int[] initCurrentSpot = new int[3];\n initCurrentSpot[0] = neighbourNode[0];\n initCurrentSpot[1] = i;\n initCurrentSpot[2] = neighbourNode[2] + 1;\n moveLevel[initCurrentSpot[0]][initCurrentSpot[1]] = initCurrentSpot[2];\n nodesToCheck.add(initCurrentSpot);\n } else {\n break;\n }\n }\n }\n\n // search nodes to the left until position are no longer available; \n for (int i = neighbourNode[1] - 1; i >= 0; i--) {\n if (!visited[neighbourNode[0]][i]) {\n if (model.getTile(neighbourNode[0], i) == BoardModel.POS_AVAILABLE) {\n visited[neighbourNode[0]][i] = true;\n int[] initCurrentSpot = new int[3];\n initCurrentSpot[0] = neighbourNode[0];\n initCurrentSpot[1] = i;\n initCurrentSpot[2] = neighbourNode[2] + 1;\n moveLevel[initCurrentSpot[0]][initCurrentSpot[1]] = initCurrentSpot[2];\n nodesToCheck.add(initCurrentSpot);\n } else {\n break;\n }\n }\n }\n // search nodes diagonally up and right until positions are no longer available;\n // up == decreasing in row, right == increasing in column \n for (int i = 1; neighbourNode[0] - i >= 0 && neighbourNode[1] + i < 10; i++) {\n if (!visited[neighbourNode[0] - i][neighbourNode[1] + i]) {\n if (model.getTile(neighbourNode[0] - i, neighbourNode[1] + i) == BoardModel.POS_AVAILABLE) {\n visited[neighbourNode[0] - i][neighbourNode[1] + i] = true;\n int[] initCurrentSpot = new int[3];\n initCurrentSpot[0] = neighbourNode[0] - i;\n initCurrentSpot[1] = neighbourNode[1] + i;\n initCurrentSpot[2] = neighbourNode[2] + 1;\n moveLevel[initCurrentSpot[0]][initCurrentSpot[1]] = initCurrentSpot[2];\n nodesToCheck.add(initCurrentSpot);\n } else {\n break;\n }\n }\n }\n\n //search nodes diagonally down and left until positions are no longer available \n for (int i = 1; neighbourNode[0] + i < 10 && neighbourNode[1] - i >= 0; i++) {\n if (!visited[neighbourNode[0] + i][neighbourNode[1] - i]) {\n if (model.getTile(neighbourNode[0] + i, neighbourNode[1] - i) == BoardModel.POS_AVAILABLE) {\n visited[neighbourNode[0] + i][neighbourNode[1] - i] = true;\n int[] initCurrentSpot = new int[3];\n initCurrentSpot[0] = neighbourNode[0] + i;\n initCurrentSpot[1] = neighbourNode[1] - i;\n initCurrentSpot[2] = neighbourNode[2] + 1;\n moveLevel[initCurrentSpot[0]][initCurrentSpot[1]] = initCurrentSpot[2];\n nodesToCheck.add(initCurrentSpot);\n } else {\n break;\n }\n }\n }\n\n // search nodes diagonally up and left until positions are no longer available \n for (int i = 1; neighbourNode[0] - i >= 0 && neighbourNode[1] - i >= 0; i++) {\n if (!visited[neighbourNode[0] - i][neighbourNode[1] - i]) {\n if (model.getTile(neighbourNode[0] - i, neighbourNode[1] - i) == BoardModel.POS_AVAILABLE) {\n visited[neighbourNode[0] - i][neighbourNode[1] - i] = true;\n int[] initCurrentSpot = new int[3];\n initCurrentSpot[0] = neighbourNode[0] - i;\n initCurrentSpot[1] = neighbourNode[1] - i;\n initCurrentSpot[2] = neighbourNode[2] + 1;\n moveLevel[initCurrentSpot[0]][initCurrentSpot[1]] = initCurrentSpot[2];\n nodesToCheck.add(initCurrentSpot);\n } else {\n break;\n }\n }\n }\n\n // search nodes diagonally down and right until positions are no longer available\n for (int i = 1; neighbourNode[0] + i < 10 && neighbourNode[1] + i < 10; i++) {\n if (!visited[neighbourNode[0] + i][neighbourNode[1] + i]) {\n if (model.getTile(neighbourNode[0] + i, neighbourNode[1] + i) == BoardModel.POS_AVAILABLE) {\n visited[neighbourNode[0] + i][neighbourNode[1] + i] = true;\n int[] initCurrentSpot = new int[3];\n initCurrentSpot[0] = neighbourNode[0] + i;\n initCurrentSpot[1] = neighbourNode[1] + i;\n initCurrentSpot[2] = neighbourNode[2] + 1;\n moveLevel[initCurrentSpot[0]][initCurrentSpot[1]] = initCurrentSpot[2];\n nodesToCheck.add(initCurrentSpot);\n } else {\n break;\n }\n }\n }\n\n }\n return moveLevel;\n }", "public static int[][] getPlayerFullMove(int[][] board, int player) {\r\n\t\t// Get first move/jump\r\n\t\tint fromRow = -1, fromCol = -1, toRow = -1, toCol = -1;\r\n\t\tboolean jumpingMove = canJump(board, player);\r\n\t\tboolean badMove = true;\r\n\t\tgetPlayerFullMoveScanner = new Scanner(System.in);//I've modified it\r\n\t\twhile (badMove) {\r\n\t\t\tif (player == 1){\r\n\t\t\t\tSystem.out.println(\"Red, Please play:\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Blue, Please play:\");\r\n\t\t\t}\r\n\r\n\t\t\tfromRow = getPlayerFullMoveScanner.nextInt();\r\n\t\t\tfromCol = getPlayerFullMoveScanner.nextInt();\r\n\r\n\t\t\tint[][] moves = jumpingMove ? getAllBasicJumps(board, player) : getAllBasicMoves(board, player);\r\n\t\t\tmarkPossibleMoves(board, moves, fromRow, fromCol, MARK);\r\n\t\t\ttoRow = getPlayerFullMoveScanner.nextInt();\r\n\t\t\ttoCol = getPlayerFullMoveScanner.nextInt();\r\n\t\t\tmarkPossibleMoves(board, moves, fromRow, fromCol, EMPTY);\r\n\r\n\t\t\tbadMove = !isMoveValid(board, player, fromRow, fromCol, toRow, toCol); \r\n\t\t\tif (badMove)\r\n\t\t\t\tSystem.out.println(\"\\nThis is an illegal move\");\r\n\t\t}\r\n\r\n\t\t// Apply move/jump\r\n\t\tboard = playMove(board, player, fromRow, fromCol, toRow, toCol);\r\n\t\tshowBoard(board);\r\n\r\n\t\t// Get extra jumps\r\n\t\tif (jumpingMove) {\r\n\t\t\tboolean longMove = (getRestrictedBasicJumps(board, player, toRow, toCol).length > 0);\r\n\t\t\twhile (longMove) {\r\n\t\t\t\tfromRow = toRow;\r\n\t\t\t\tfromCol = toCol;\r\n\r\n\t\t\t\tint[][] moves = getRestrictedBasicJumps(board, player, fromRow, fromCol);\r\n\r\n\t\t\t\tboolean badExtraMove = true;\r\n\t\t\t\twhile (badExtraMove) {\r\n\t\t\t\t\tmarkPossibleMoves(board, moves, fromRow, fromCol, MARK);\r\n\t\t\t\t\tSystem.out.println(\"Continue jump:\");\r\n\t\t\t\t\ttoRow = getPlayerFullMoveScanner.nextInt();\r\n\t\t\t\t\ttoCol = getPlayerFullMoveScanner.nextInt();\r\n\t\t\t\t\tmarkPossibleMoves(board, moves, fromRow, fromCol, EMPTY);\r\n\r\n\t\t\t\t\tbadExtraMove = !isMoveValid(board, player, fromRow, fromCol, toRow, toCol); \r\n\t\t\t\t\tif (badExtraMove)\r\n\t\t\t\t\t\tSystem.out.println(\"\\nThis is an illegal jump destination :(\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply extra jump\r\n\t\t\t\tboard = playMove(board, player, fromRow, fromCol, toRow, toCol);\r\n\t\t\t\tshowBoard(board);\r\n\r\n\t\t\t\tlongMove = (getRestrictedBasicJumps(board, player, toRow, toCol).length > 0);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn board;\r\n\t}", "public int winningPlayerIndex(int[][] board, Move lastMove) {\n int m = board.length;\n int n = board[0].length;\n\n\n int player = lastMove.playerIndex;\n int curRow = lastMove.row;\n int curCol = lastMove.col;\n\n\n int start = Math.max(0, curCol - 3);\n for (int i = start; i + 3 < n; i++) {\n if (board[curRow][i] == player && board[curRow][i + 1] == player\n && board[curRow][i + 2] == player && board[curRow][i + 3] == player) {\n return player;\n }\n }\n\n int startRow = Math.max(0, curRow - 3);\n for (int i = start; i + 3 < m; i++) {\n if (board[i][curCol] == player && board[i + 1][curCol] == player\n && board[i + 2][curCol] == player && board[i + 3][curCol] == player) {\n return player;\n }\n }\n\n int count = 0;\n int x = curRow;\n int y = curCol;\n while (x >= 0 && y >= 0) {\n if (board[x][y] == player) {\n count++;\n x--;\n y--;\n if (count >= 4) {\n return player;\n }\n } else {\n break;\n }\n }\n\n x = curRow + 1;\n y = curCol + 1;\n while (x < m && y < n) {\n if (board[x][y] == player) {\n count++;\n x++;\n y++;\n if (count >= 4) {\n return player;\n }\n } else {\n break;\n }\n }\n\n int count1 = 0;\n int x1 = curRow;\n int y1 = curCol;\n while (x1 < m && y1 >= 0) {\n if (board[x1][y1] == player) {\n count1++;\n x1++;\n y1--;\n if (count1 >= 4) {\n return player;\n }\n } else {\n break;\n }\n }\n\n x1 = curRow - 1;\n y1 = curCol + 1;\n while (x1 >= 0 && y1 < n) {\n if (board[x1][y1] == player) {\n count1++;\n x1--;\n y1++;\n if (count1 >= 4) {\n return player;\n }\n } else {\n break;\n }\n }\n\n\n\n// //horizontal\n// for (int i = 0; i < m; i++) {\n// for (int j = 0; j + 3 < n; j++) {\n// if (board[i][j] == player && board[i][j + 1] == player && board[i][j + 2] == player && board[i][j + 3] == player) {\n// return player;\n// }\n// }\n// }\n\n// //vertical\n// for (int i = 0; i + 3 < m; i++) {\n// for (int j = 0; j < n; j++) {\n// if (board[i][j] == player && board[i + 1][j] == player && board[i + 2][j] == player && board[i + 3][j] == player) {\n// return player;\n// }\n// }\n// }\n\n// //diagonal from upper left to lower right\n// for (int i = 3; i < m; i++) {\n// for (int j = 3; j < n; j++) {\n// if (board[i][j] == player && board[i - 1][j - 1] == player && board[i - 2][j - 2] == player && board[i - 3][j - 3] == player) {\n// return player;\n// }\n// }\n// }\n\n// //diagnoal from lower left to upper right\n// for (int i = 3; i < m; i++) {\n// for (int j = 0; j + 3 < n; j++) {\n// if (board[i][j] == player && board[i - 1][j + 1] == player && board[i - 2][j + 2] == player && board[i - 3][j + 3] == player) {\n// return player;\n// }\n// }\n// }\n\n return -1;\n }", "private int indexOfBoard(int no) {\n return 0;\n }", "@Override\n public Map<Direction, List<Coordinate>> getPossibleMoves() {\n\n Map<Direction, List<Coordinate>> moves = new HashMap<>();\n\n Coordinate coordinate = this.getCoordinate();\n int row = coordinate.getRow();\n int col = coordinate.getCol();\n\n //Jumps\n List<Coordinate> jumps = new ArrayList<>();\n\n //\n //\n ////\n int tempRow1 = row - 2;\n int tempCol1 = col - 1;\n Coordinate tempCoordinate1 = new Coordinate(tempRow1, tempCol1);\n if (Board.inBounds(tempCoordinate1)) {\n jumps.add(tempCoordinate1);\n }\n\n ////\n //\n //\n int tempRow2 = row + 2;\n int tempCol2 = col - 1;\n Coordinate tempCoordinate2 = new Coordinate(tempRow2, tempCol2);\n if (Board.inBounds(tempCoordinate2)) {\n jumps.add(tempCoordinate2);\n }\n\n //////\n //\n int tempRow3 = row - 1;\n int tempCol3 = col - 2;\n Coordinate tempCoordinate3 = new Coordinate(tempRow3, tempCol3);\n if (Board.inBounds(tempCoordinate3)) {\n jumps.add(tempCoordinate3);\n }\n\n ///////\n //\n int tempRow4 = row - 1;\n int tempCol4 = col + 2;\n Coordinate tempCoordinate4 = new Coordinate(tempRow4, tempCol4);\n if (Board.inBounds(tempCoordinate4)) {\n jumps.add(tempCoordinate4);\n }\n\n ////\n //\n //\n int tempRow5 = row + 2;\n int tempCol5 = col + 1;\n Coordinate tempCoordinate5 = new Coordinate(tempRow5, tempCol5);\n if (Board.inBounds(tempCoordinate5)) {\n jumps.add(tempCoordinate5);\n }\n\n //\n //\n ////\n int tempRow6 = row - 2;\n int tempCol6 = col + 1;\n Coordinate tempCoordinate6 = new Coordinate(tempRow6, tempCol6);\n if (Board.inBounds(tempCoordinate6)) {\n jumps.add(tempCoordinate6);\n }\n\n //\n //////\n int tempRow7 = row + 1;\n int tempCol7 = col - 2;\n Coordinate tempCoordinate7 = new Coordinate(tempRow7, tempCol7);\n if (Board.inBounds(tempCoordinate7)) {\n jumps.add(tempCoordinate7);\n }\n\n //\n //////\n int tempRow8 = row + 1;\n int tempCol8 = col + 2;\n Coordinate tempCoordinate8 = new Coordinate(tempRow8, tempCol8);\n if (Board.inBounds(tempCoordinate8)) {\n jumps.add(tempCoordinate8);\n }\n\n if (!jumps.isEmpty()) {\n moves.put(Direction.Jump, jumps);\n }\n return moves;\n }", "public void initializeDebugBoard() {\n\t\tboolean hasNotMoved = false;\n\t\tboolean hasMoved = true;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set empty rows\n\t\tfor (int row = 0; row < 8; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\tboard[5][4] = new Piece('k', white, hasMoved, 5, 4, PieceArray.E_kingId);\n//\t\tboard[1][4] = new Piece(\"rook\", white, hasMoved, 1, 4);\n\t\tboard[2][2] = new Piece('q', black, hasMoved, 2, 2, PieceArray.A_rookId);\n//\t\tboard[3][2] = new Piece('q', black, hasMoved, 3, 2, PieceArray.H_rookId);\n\t\t\n\n\t\tboard[0][0] = new Piece('k', black, hasMoved, 0, 0, PieceArray.E_kingId);\n//\t\tboard[7][7] = new Piece('r', black, hasNotMoved, 7, 7, PieceArray.A_rookId);\n//\t\tboard[6][7] = new Piece('p', black, hasNotMoved, 6, 7, PieceArray.A_pawnId);\n//\t\tboard[6][6] = new Piece('p', black, hasNotMoved, 6, 6, PieceArray.B_pawnId);\n//\t\tboard[6][5] = new Piece('p', black, hasNotMoved, 6, 5, PieceArray.C_pawnId);\n//\t\tboard[6][4] = new Piece('p', black, hasNotMoved, 6, 4, PieceArray.D_pawnId);\n\t\n//\t\tboard[6][6] = new Piece(\"pawn\", black, hasMoved, 6, 6);\n//\t\tboard[6][7] = new Piece(\"pawn\", black, hasMoved, 6, 7);\n//\t\tboard[6][4] = new Piece(\"pawn\", black, hasMoved, 6, 4);\n//\t\t\t\n//\t\t\n//\t\tboard[4][4] = new Piece(\"pawn\", black, hasMoved, 4,4);\n//\t\tboard[3][5] = new Piece(\"rook\", white,hasMoved,3,5);\n//\t\tboard[1][7] = new Piece(\"pawn\",black,hasMoved,1,7);\n\n\t}", "private Cell[] allPossibleMoves(Cell source) {\n\t\tCell[] moves = new Cell[2 * Board.BOARD_SIZE - 2]; // Вертикаль и горизонталь, которые бьет ладья\n\t\tint columnIndex = source.getColumn();\n\t\tint rowIndex = source.getRow();\n\t\tint k = 0;\n\t\tfor (int i = 0; i < Board.BOARD_SIZE; i++) {\n\t\t\tif (i != rowIndex) {\n\t\t\t\tmoves[k++] = new Cell(columnIndex, i);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < Board.BOARD_SIZE; i++) {\n\t\t\tif (i != columnIndex) {\n\t\t\t\tmoves[k++] = new Cell(i, rowIndex);\n\t\t\t}\n\t\t}\n\t\treturn moves;\n\t}", "private int[] getCoordinates(Board board) {\n int[] moves = new int[2];\n\n while (true) {\n System.out.print(\"Enter the coordinates: \");\n String input = scanner.nextLine().trim();\n String[] holder = input.split(\"\\\\s+\");\n\n //check for two coordinates\n if (holder.length != 2) {\n System.out.println(\"You should enter numbers!\");\n continue;\n }\n\n //check that coordinates aren't letters\n if (holder[0].matches(\"[a-zA-Z]+\") || holder[1].matches(\"[a-zA-Z]+\")) {\n System.out.println(\"You should enter numbers!\");\n continue;\n }\n\n //check that both coordinates are numbers from 1 - 3\n if (!holder[0].matches(\"[1-3]\") || !holder[1].matches(\"[1-3]\")) {\n System.out.println(\"Coordinates should be from 1 to 3!\");\n continue;\n }\n\n //at this point we have two string coordinates from 1 - 3, parse to in\n //subtract 1 to make sense to java\n moves[0] = Integer.parseInt(holder[0]) - 1;\n moves[1] = Integer.parseInt(holder[1]) - 1;\n\n //make sure move is not already played\n if (!board.isOpen(moves[0], moves[1])) {\n System.out.println(\"This cell is occupied! Choose another one!\");\n continue;\n }\n\n break;\n }\n\n return moves;\n }", "public State[] getSuccessors(char player) {\n\t\t// TO DO: get all successors and return them in proper order\r\n\t\tchar[][] board = convert2D(this.board);\r\n\r\n\t\tchar opponent;\r\n\t\tif(player == '2')\r\n\t\t\topponent = '1';\r\n\t\telse \r\n\t\t\topponent = '2';\r\n\r\n\t\tArrayList<State> successors = new ArrayList<State>();\r\n\r\n\t\tArrayList<Integer> row = new ArrayList<Integer>();\r\n\r\n\t\tArrayList<Integer> col = new ArrayList<Integer>();\r\n\t\t//ArrayList<Integer[]> indices = new ArrayList<Integer[]>();\r\n\r\n\t\tfor(int i = 0;i < 4; ++i){\r\n\r\n\t\t\tfor(int j = 0;j < 4; ++j){\r\n\r\n\t\t\t\tif(board[i][j] == opponent){\r\n\r\n\t\t\t\t\tint I = i, J = j; \r\n\t\t\t\t\t//upper left diag\r\n\t\t\t\t\tif(i-1 >= 0 && j-1 >= 0 && board[i-1][j-1] == '0'){ \r\n\r\n\t\t\t\t\t\ti = i+1; \r\n\t\t\t\t\t\tj = j+1;\r\n\r\n\t\t\t\t\t\twhile(i < 3 && j < 3 && board[i][j] == opponent)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ti++;j++;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(i <= 3 && j <= 3 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row,col,I-1,J-1)) {\r\n\r\n\t\t\t\t\t\t\t\trow.add(I-1);\r\n\t\t\t\t\t\t\t\tcol.add(J-1);\r\n\r\n\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\ti=I;j=J;\r\n\t\t\t\t\t//left\r\n\t\t\t\t\tif(i-1>=0 && board[i-1][j] == '0'){\r\n\t\t\t\t\t\ti = i+1;\r\n\r\n\t\t\t\t\t\twhile(i < 3 && board[i][j] == opponent) \r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tif(i<=3 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row,col,I-1,J)) {\r\n\r\n\t\t\t\t\t\t\t\trow.add(I-1);\r\n\t\t\t\t\t\t\t\tcol.add(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\ti=I;\r\n\r\n\t\t\t\t\t//lower left diag\r\n\t\t\t\t\tif(i-1 >= 0 && j+1 <= 3 && board[i-1][j+1] == '0'){\r\n\r\n\t\t\t\t\t\ti = i+1; j = j-1;\r\n\r\n\t\t\t\t\t\twhile(i<3 && j>0 && board[i][j] == opponent)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ti++;j--;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(i<=3 && j>=0 && board[i][j] == player) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(!exists(row,col,I-1,J+1)) {\r\n\t\t\t\t\t\t\t\trow.add(I-1);\r\n\t\t\t\t\t\t\t\tcol.add(J+1);\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} \r\n\r\n\t\t\t\t\ti=I;\r\n\t\t\t\t\tj=J;\r\n\r\n\t\t\t\t\t//up\r\n\t\t\t\t\tif(j-1>=0 && board[i][j-1] == '0'){\r\n\t\t\t\t\t\tj = j+1;\r\n\r\n\t\t\t\t\t\twhile(j < 3 && board[i][j] == opponent)\r\n\t\t\t\t\t\t\tj++;\r\n\r\n\t\t\t\t\t\tif(j <= 3 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row,col,I,J-1)) {\r\n\r\n\t\t\t\t\t\t\t\trow.add(I);\r\n\t\t\t\t\t\t\t\tcol.add(J-1);\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\r\n\t\t\t\t\tj=J;\r\n\t\t\t\t\t//down\r\n\t\t\t\t\tif(j+1 <= 3 && board[i][j+1] == '0'){\r\n\r\n\t\t\t\t\t\tj=j-1;\r\n\r\n\t\t\t\t\t\twhile(j > 0 && board[i][j] == opponent)\r\n\t\t\t\t\t\t\tj--;\r\n\r\n\t\t\t\t\t\tif(j >= 0 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row,col,I,J+1)) {\r\n\r\n\t\t\t\t\t\t\t\trow.add(I);\r\n\t\t\t\t\t\t\t\tcol.add(J+1);\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\tj=J;\r\n\t\t\t\t\t//upper right\r\n\t\t\t\t\tif(i+1<=3 && j-1>=0 && board[i+1][j-1] == '0'){\r\n\r\n\t\t\t\t\t\ti=i-1;\r\n\t\t\t\t\t\tj=j+1;\r\n\r\n\t\t\t\t\t\twhile(i > 0 && j < 3 && board[i][j] == opponent){\r\n\r\n\t\t\t\t\t\t\ti--;\r\n\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(i >= 0 && j <= 3 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row,col,I+1,J-1)) {\r\n\r\n\t\t\t\t\t\t\t\trow.add(I+1);\r\n\t\t\t\t\t\t\t\tcol.add(J-1);\r\n\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\r\n\t\t\t\t\ti=I;\r\n\t\t\t\t\tj=J;\r\n\t\t\t\t\t//right\r\n\t\t\t\t\tif(i+1 <= 3 && board[i+1][j] == '0'){\r\n\t\t\t\t\t\ti=i-1;\r\n\r\n\t\t\t\t\t\twhile(i > 0 && board[i][j] == opponent) \r\n\t\t\t\t\t\t\ti--;\r\n\r\n\t\t\t\t\t\tif(i >= 0 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row,col,I+1,J)) {\r\n\r\n\t\t\t\t\t\t\t\trow.add(I+1);\r\n\t\t\t\t\t\t\t\tcol.add(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\ti=I;\r\n\t\t\t\t\t//lower right diag\r\n\t\t\t\t\tif(i+1 <= 3 && j+1 <=3 && board[i+1][j+1] == '0'){\r\n\r\n\t\t\t\t\t\ti=i-1;\r\n\t\t\t\t\t\tj=j-1;\r\n\r\n\t\t\t\t\t\twhile(i > 0 && j > 0 && board[i][j] == opponent)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ti--;\r\n\t\t\t\t\t\t\tj--;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(i >= 0 && j >= 0 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row, col, I+1, J+1)) {\t\r\n\r\n\t\t\t\t\t\t\t\trow.add(I+1);\r\n\t\t\t\t\t\t\t\tcol.add(J+1);\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\r\n\t\t\t\t\ti=I;\r\n\t\t\t\t\tj=J;\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t} \r\n\t\t//Adding to successors\r\n\t\tfor(int i = 0; i < row.size(); i++) {\r\n\r\n\t\t\tsuccessors.add(move(player, row.get(i), col.get(i)));\r\n\t\t}\r\n\r\n\t\t//Create an array,\r\n\t\tState[] succsArray = new State[successors.size()];\r\n\t\t//get data in array\r\n\t\tsuccsArray = successors.toArray(succsArray);\r\n\r\n\t\treturn succsArray;\t\r\n\t}", "public boolean solved()\n\t{\n\t\tfor(int row = 0; row < board.length; row++)\n\t\t{\n\t\t\tfor(int col = 0; col < board.length; col++)\n\t\t\t{\n\t\t\t\tif(board[row][col] == 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private Move produceHeuristicMove(Board board){\n\n\t\tint numRows = board.getNumberOfRows();\n\t\tint[][] bins = new int[numRows][BINARY_LENGTH];\n\t\tint[] binarySum = new int[BINARY_LENGTH];\n\t\tint bitIndex,higherThenOne=0,totalOnes=0,lastRow=0,lastLeft=0,lastSize=0,lastOneRow=0,lastOneLeft=0;\n\t\t\n\t\tfor(bitIndex = 0;bitIndex<BINARY_LENGTH;bitIndex++){\n\t\t\tbinarySum[bitIndex] = 0;\n\t\t}\n\t\t\n\t\tfor(int k=0;k<numRows;k++){\n\t\t\t\n\t\t\tint curRowLength = board.getRowLength(k+1);\n\t\t\tint i = 0;\n\t\t\tint numOnes = 0;\n\t\t\t\n\t\t\tfor(bitIndex = 0;bitIndex<BINARY_LENGTH;bitIndex++){\n\t\t\t\tbins[k][bitIndex] = 0;\n\t\t\t}\n\t\t\t\n\t\t\tdo {\n\t\t\t\tif(i<curRowLength && board.isStickUnmarked(k+1,i+1) ){\n\t\t\t\t\tnumOnes++;\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tif(numOnes>0){\n\t\t\t\t\t\t\n\t\t\t\t\t\tString curNum = Integer.toBinaryString(numOnes);\n\t\t\t\t\t\twhile(curNum.length()<BINARY_LENGTH){\n\t\t\t\t\t\t\tcurNum = \"0\" + curNum;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(bitIndex = 0;bitIndex<BINARY_LENGTH;bitIndex++){\n\t\t\t\t\t\t\tbins[k][bitIndex] += curNum.charAt(bitIndex)-'0'; //Convert from char to int\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(numOnes>1){\n\t\t\t\t\t\t\thigherThenOne++;\n\t\t\t\t\t\t\tlastRow = k +1;\n\t\t\t\t\t\t\tlastLeft = i - numOnes + 1;\n\t\t\t\t\t\t\tlastSize = numOnes;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttotalOnes++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlastOneRow = k+1;\n\t\t\t\t\t\tlastOneLeft = i;\n\t\t\t\t\t\t\n\t\t\t\t\t\tnumOnes = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}while(i<=curRowLength);\n\t\t\t\n\t\t\tfor(bitIndex = 0;bitIndex<BINARY_LENGTH;bitIndex++){\n\t\t\t\tbinarySum[bitIndex] = (binarySum[bitIndex]+bins[k][bitIndex])%2;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//We only have single sticks\n\t\tif(higherThenOne==0){\n\t\t\treturn new Move(lastOneRow,lastOneLeft,lastOneLeft);\n\t\t}\n\t\t\n\t\t//We are at a finishing state\t\t\t\t\n\t\tif(higherThenOne<=1){\n\t\t\t\n\t\t\tif(totalOnes == 0){\n\t\t\t\treturn new Move(lastRow,lastLeft,lastLeft+(lastSize-1) - 1);\n\t\t\t} else {\n\t\t\t\treturn new Move(lastRow,lastLeft,lastLeft+(lastSize-1)-(1-totalOnes%2));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(bitIndex = 0;bitIndex<BINARY_LENGTH-1;bitIndex++){\n\t\t\t\n\t\t\tif(binarySum[bitIndex]>0){\n\t\t\t\t\n\t\t\t\tint finalSum = 0,eraseRow = 0,eraseSize = 0,numRemove = 0;\n\t\t\t\tfor(int k=0;k<numRows;k++){\n\t\t\t\t\t\n\t\t\t\t\tif(bins[k][bitIndex]>0){\n\t\t\t\t\t\teraseRow = k+1;\n\t\t\t\t\t\teraseSize = (int)Math.pow(2,BINARY_LENGTH-bitIndex-1);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int b2 = bitIndex+1;b2<BINARY_LENGTH;b2++){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(binarySum[b2]>0){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(bins[k][b2]==0){\n\t\t\t\t\t\t\t\t\tfinalSum = finalSum + (int)Math.pow(2,BINARY_LENGTH-b2-1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tfinalSum = finalSum - (int)Math.pow(2,BINARY_LENGTH-b2-1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnumRemove = eraseSize - finalSum;\n\t\t\t\t\n\t\t\t\t//Now we find that part and remove from it the required piece\n\t\t\t\tint numOnes=0,i=0;\n\t\t\t\twhile(numOnes<eraseSize){\n\n\t\t\t\t\tif(board.isStickUnmarked(eraseRow,i+1)){\n\t\t\t\t\t\tnumOnes++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnumOnes=0;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn new Move(eraseRow,i-numOnes+1,i-numOnes+numRemove);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If we reached here, and the board is not symmetric, then we only need to erase a single stick\n\t\tif(binarySum[BINARY_LENGTH-1]>0){\n\t\t\treturn new Move(lastOneRow,lastOneLeft,lastOneLeft);\n\t\t}\n\t\t\n\t\t//If we reached here, it means that the board is already symmetric, and then we simply mark one stick from the last sequence we saw:\n\t\treturn new Move(lastRow,lastLeft,lastLeft);\t\t\n\t}", "public int AvailableMoves(int disc){\n avMoves =0;\n for (int i=0; i<8; i++){\n for (int j=0; j<8; j++){\n if (isValidMove(i,j,disc))\n avMoves++;\n }\n }\n return avMoves;\n }", "public int moves()\n {\n return moves;\n }", "public MahjongSolitaireMove findMove()\n {\n // MAKE A MOVE TO FILL IN \n MahjongSolitaireMove move = new MahjongSolitaireMove();\n\n // GO THROUGH THE ENTIRE GRID TO FIND A MATCH BETWEEN AVAILABLE TILES\n for (int i = 0; i < gridColumns; i++)\n {\n for (int j = 0; j < gridRows; j++)\n {\n ArrayList<MahjongSolitaireTile> stack1 = tileGrid[i][j];\n if (stack1.size() > 0)\n {\n // GET THE FIRST TILE\n MahjongSolitaireTile testTile1 = stack1.get(stack1.size()-1);\n for (int k = 0; k < gridColumns; k++)\n {\n for (int l = 0; l < gridRows; l++)\n {\n if (!((i == k) && (j == l)))\n { \n ArrayList<MahjongSolitaireTile> stack2 = tileGrid[k][l];\n if (stack2.size() > 0) \n {\n // AND TEST IT AGAINST THE SECOND TILE\n MahjongSolitaireTile testTile2 = stack2.get(stack2.size()-1);\n \n // DO THEY MATCH\n if (testTile1.match(testTile2))\n {\n // YES, FILL IN THE MOVE AND RETURN IT\n move.col1 = i;\n move.row1 = j;\n move.col2 = k;\n move.row2 = l;\n return move;\n }\n }\n }\n }\n }\n }\n }\n }\n // WE'VE SEARCHED THE ENTIRE GRID AND THERE\n // ARE NO POSSIBLE MOVES REMAINING\n return null;\n }", "public Iterable<Board> solution()\n {\n Iterable<Board> result = null;\n if (isSolvable()) {\n result = shortestPath;\n }\n return result;\n }", "public int moves() {\n return moves;\n }", "public int moves() {\n return moves;\n }", "public int getIntelligentMove(int[] availableMoves, int[] board){\n for (int move : availableMoves){\n int[] tempBoard = board.clone();\n tempBoard[move] = 1;\n int result = checkWinner(tempBoard);\n if (result == 1){\n return move;\n }\n \n }\n \n // Check if user can win, if so then block\n \n for (int move : availableMoves){\n int[] tempBoard = board.clone();\n tempBoard[move] = -1;\n int result = checkWinner(tempBoard);\n if (result == 2){\n return move;\n }\n \n }\n \n // If middle is available, take it\n for (int move: availableMoves){\n if (move == 4){\n return move;\n }\n }\n \n // Move into a corner in a row/col that the user is in\n int cornerMove = checkCorners(board, availableMoves);\n if (cornerMove >= 0){\n \n }\n \n // Otherwise, take random move\n Random rand = new Random();\n int possibleMoves = availableMoves.length;\n int moveIndex = rand.nextInt(possibleMoves);\n \n return availableMoves[moveIndex];\n \n \n }", "public int[] getPlay(final Board board) {\n final boolean maximizing = false;\n BoardStateNode origin = new BoardStateNode(Board.copyState(board.getBoard()), null);\n\n List<BoardStateNode> nextMoves = origin.getChildren(!maximizing);\n\n double value = Double.NEGATIVE_INFINITY;\n steps = 0;\n for (BoardStateNode possibility : nextMoves) {\n double result = getResult(possibility, maximizing);\n if (result > value) {\n value = result;\n nextMove = possibility;\n }\n }\n\n //System.out.println(\"Nodes visited: \" + steps);\n return nextMove.getPlay();\n }", "@Override\n public IMove doMove(IGameState state) {\n\n //Find macroboard to play in\n for (int[] move : preferredMoves)\n {\n if(state.getField().getMacroboard()[move[0]][move[1]].equals(IField.AVAILABLE_FIELD))\n {\n \n Random rnd = new Random();\n //find move to play\n for (int[] selectedMove : preferredMoves)\n {\n \n int x = move[0]*3 + selectedMove[0];\n int y = move[1]*3 + selectedMove[1];\n if(!state.getField().getBoard()[x][y].contains(IField.EMPTY_FIELD)\n && !state.getField().getBoard()[x][y].contains(IField.AVAILABLE_FIELD))\n {\n try\n {\n x = x + (rnd.nextInt(selectedMove[0] % 2 + 1));\n \n \n } catch (Exception e)\n {\n \n }\n try\n {\n y = y - (rnd.nextInt(selectedMove[0] % 2 - 1));\n \n } catch (Exception e)\n {\n \n }\n try\n {\n x = x - (rnd.nextInt(selectedMove[0] % 2 -1));\n \n \n } catch (Exception e)\n {\n \n }\n \n \n \n \n }\n if(state.getField().getBoard()[x][y].equals(IField.EMPTY_FIELD))\n {\n \n return new Move(x,y);\n }\n }\n }\n }\n\n //NOTE: Something failed, just take the first available move I guess!\n return state.getField().getAvailableMoves().get(0);\n }", "private int getSmartMove(char[] boardConfig) {\n\n ArrayList<Integer> emptySpaces = getEmptySpaces(boardConfig);\n\n double bestScore = -1;\n String bestChoice = \"\";\n int move = 0;\n\n //Loop through each empty space on the board\n for (Integer emptySpace : emptySpaces) {\n int space = emptySpace;\n\n char[] tempBoard = new char[boardConfig.length];\n\n //Create a copy of the board array\n System.arraycopy(boardConfig, 0, tempBoard, 0, boardConfig.length);\n\n //Add the current player's piece to the current empty spot\n tempBoard[space] = game.getPlayer() == 0 ? 'X' : 'O';\n\n //Get a string from the possible move board\n String tempBoardString = boardToString(tempBoard);\n\n //Attempt to get the possible move board configuration data from the long term memory\n BoardRecord record = longTermMemory.get(tempBoardString);\n\n //Check if a record was found\n if (record != null) {\n\n //Calculate the score of the current move in question\n float currentValue = (float) (record.getWins() - record.getLosses()) / (record.getLosses() + record.getWins() + record.getTies());\n\n //If the new move is better than the current best move choose it\n if (currentValue > bestScore) {\n bestScore = currentValue;\n move = space;\n bestChoice = tempBoardString;\n }\n }\n }\n\n if (!Objects.equals(bestChoice, \"\")) {\n shortTermMemory.add(bestChoice);\n return move;\n } else {\n return getRandomMove(boardConfig);\n }\n }", "@Override\r\n\tpublic boolean movement(BoardCells[][] chessBoard, Piece targetPiece, int fromX,int fromY,int toX,int toY) {\t\t\r\n\t\t//DEBUG -- System.out.println(\"\"+fromX+fromY+\" \"+toX+toY);\r\n\t\t\r\n\t\tif(fromY == toY){\t\t\t\r\n\t\t\tif(fromX > toX) {\r\n\t\t\t\tfor(int i = fromX-1; i>toX; i--) {\r\n\t\t\t\t\tif(chessBoard[8-fromY][i].getPiece() != null) {\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t} else if (fromX < toX) {\r\n\t\t\t\tfor(int i = fromX+1; i<toX; i++) {\r\n\t\t\t\t\tif(chessBoard[8-fromY][i].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(getPieceID().equals(\"bR\")) {\r\n\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"bKc\")) {\r\n\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"bK\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(getPieceID().equals(\"wR\")) {\r\n\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"wKc\")) {\r\n\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"wK\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\tif(fromX == toX) {\t\t\t\t\r\n\t\t\tif(fromY > toY) {\t\r\n\t\t\t\tfor(int i = fromY-1; i>toY; i--) {\r\n\t\t\t\t\tif(chessBoard[8-i][toX].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} else if (fromY < toY) {\t\t\t\t\r\n\t\t\t\tfor(int i = fromY+1; i<toY; i++) {\t\t\t\t\t\r\n\t\t\t\t\tif(chessBoard[8-i][toX].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(getPieceID().equals(\"bR\")) {\r\n\t\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"bKc\")) {\r\n\t\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"bK\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(getPieceID().equals(\"wR\")) {\r\n\t\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"wKc\")) {\r\n\t\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"wK\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\t\treturn true;\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn false;\t\t\r\n\t}", "void onMove(Sudoku.State state, Location loc, Numeral num);", "@Override\n public ArrayList<AState> getAllPossibleStates(AState state){\n MazeState s = (MazeState)state;\n ArrayList<AState> moves = new ArrayList<AState> ();\n\n\n int row = s.getState().getRowIndex();\n int col = s.getState().getColumnIndex();\n int [][] matrix = mySearchableMaze.getMazeMatrix();\n\n\n if(row+1 < matrix.length){\n if( matrix[row+1][col]==0 ){\n moves.add(new MazeState(new Position(row+1,col),false,s.getCost()+1));\n\n }\n }\n if(row-1 >= 0 ){\n if( matrix[row-1][col]==0){\n moves.add(new MazeState(new Position(row-1,col),false,s.getCost()+1));\n\n }\n }\n if(col+1 < matrix[0].length ){\n if( matrix[row][col+1]==0 ){\n moves.add(new MazeState(new Position(row,col+1),false,s.getCost()+1));\n\n }\n }\n if(col-1 >= 0 ){\n if( matrix[row][col-1]==0 ){\n moves.add(new MazeState(new Position(row,col-1),false,s.getCost()+1));\n }\n }\n return moves;\n }", "public static int[][] playMove(int[][] board, int player, int fromRow, int fromCol, int toRow, int toCol) {\r\n\t\t\t\r\n\t\t\tboolean IBMV = isBasicMoveValid (board,player,fromRow,fromCol,toRow,toCol);\r\n\t\t\tboolean IBJV = isBasicJumpValid(board,player,fromRow,fromCol,toRow,toCol);\r\n\t\t\tint Discs = board[fromRow][fromCol];\r\n\t\t\t\r\n\t\t\tif (player==-1){//red qween crowns\r\n\t\t\t\tfor (int i =1;i<8;i=i+2){\r\n\t\t\t\t\tif (board[7][i]==1){\r\n\t\t\t\t\t\tboard[7][i]=2;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\t\r\n\t\t\tif (player==1){//blue qween crowns\r\n\t\t\t\tfor (int i =0;i<8;i=i+2){\r\n\t\t\t\t\tif (board[0][i]==-1){\r\n\t\t\t\t\t\tboard[0][i]=-2;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (IBMV){/*operation step change*/\r\n\t\t\t\tboard[fromRow][fromCol]\t=0;\r\n\t\t\t\tboard[toRow][toCol]=Discs;\r\n\t\t\t}\r\n\t\t\tif (IBJV){/*operation step eating*/\r\n\t\t\t\tboard[fromRow][fromCol]\t=0;\r\n\t\t\t\tboard[(fromRow+toRow)/2][(fromCol+toCol)/2]=0;\r\n\t\t\t\tboard[toRow][toCol]=Discs;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn board;\r\n\t\t}", "public ArrayList<ArrayList<Move>> getMoves(int color){//TODO\n \tArrayList<ArrayList<Move>> moves = new ArrayList<ArrayList<Move>>();\n \tboolean jumpsExist = false;\n \t//look for jumps\n \t//search the board for pieces of your color\n for (int i=0; i<8; i++){\n \tfor(int j=0; j<8; j++){\n \t\t//if the piece is the right color\n \t\tif ((gameState.getStateOfSquare(i, j) != 0)&&(gameState.getStateOfSquare(i, j)%2 == color)){\n// \t\t\tSystem.out.println(\"found a piece you own\");\n \t\t\t//find all jumps of that piece\n \t\t\t//get jumps\n \t\t\tArrayList<ArrayList<Move>> jumps = getJumps(color, i, j);\n \t\t\t//if there are jumps return only the jumps\n \t\t\tif (jumps.isEmpty() == false){\n \t\t\t\tmoves.addAll(jumps);\n \t\t\t\tjumpsExist = true;\n \t\t\t}\n \t\t}\n \t}\n }\n if (jumpsExist == false){\n\t //look for diagonals\n\t \t//search the board for pieces of your color\n\t for (int i=0; i<8; i++){\n\t \tfor(int j=0; j<8; j++){\n\t \t\t//if the piece is the right color\n\t \t\tif ((gameState.getStateOfSquare(i, j) != 0)&&(gameState.getStateOfSquare(i, j)%2 == color)){\n//\t \t\t\tSystem.out.println(\"found a piece you own\");\n\t \t\t\t//get diagonals\n\t \t\t\t//try up right\n\t \t\t\tMove tryMove = new Move(i,j,i+1,j+1);\n\t \t\t\tif (attemptMove(tryMove, color)){// if this move is valid add it to moves\n\t \t\t\t\taddMove(tryMove, moves);\n\t \t\t\t}\n\t \t\t\t//try up left\n\t \t\t\ttryMove = new Move(i,j,i-1,j+1);\n\t \t\t\tif (attemptMove(tryMove, color)){// if this move is valid add it to moves\n\t \t\t\t\taddMove(tryMove, moves);\n\t \t\t\t}\n\t \t\t\t//try down right\n\t \t\t\ttryMove = new Move(i,j,i+1,j-1);\n\t \t\t\tif (attemptMove(tryMove, color)){// if this move is valid add it to moves\n\t \t\t\t\taddMove(tryMove, moves);\n\t \t\t\t}\n\t \t\t\t//try down left\n\t \t\t\ttryMove = new Move(i,j,i-1,j-1);\n\t \t\t\tif (attemptMove(tryMove, color)){// if this move is valid add it to moves\n\t \t\t\t\taddMove(tryMove, moves);\n\t \t\t\t}\n\t \t\t\t}\n\t \t\t}\n\t }\n\t }\n if (moves.isEmpty() == true){\n \tnoMoves = true;\n }\n \t\t\t//\n \treturn moves;\n }", "public void solve() {\n \tsquares[0][0].fillInRemainingOfBoard();\n }", "public int minimax(Tile[][] board, int depth, boolean isMaximizing) {\n int result = WinnerChecker.checkWinner();\r\n if(result != 2) {\r\n return result;\r\n }\r\n\r\n int bestScore = 0;\r\n if(isMaximizing){\r\n bestScore = 1;\r\n for(int i = 0; i< 3; i++){\r\n for(int j = 0; j< 3; j++){\r\n // Is the spot available?\r\n if(board[i][j].text.getText().isEmpty()){\r\n board[i][j].text.setText(\"O\");\r\n TicTacToeApp.previous_move = board[i][j];\r\n int score = minimax(board, depth+1,false);\r\n board[i][j].text.setText(\"\");\r\n bestScore = Math.min(score, bestScore);\r\n }\r\n }\r\n }\r\n }else{\r\n bestScore = -1;\r\n for(int i = 0; i< 3; i++){\r\n for(int j = 0; j< 3; j++){\r\n // Is the spot available?\r\n if(board[i][j].text.getText().isEmpty()){\r\n board[i][j].text.setText(\"X\");\r\n TicTacToeApp.previous_move = board[i][j];\r\n int score = minimax(board, depth+1,true);\r\n board[i][j].text.setText(\"\");\r\n bestScore = Math.max(score, bestScore);\r\n }\r\n }\r\n }\r\n }\r\n return bestScore;\r\n }", "public void findTour( int x, int y, int moves )\n {\n delay(50); //slow it down enough to be followable\n if (solved) System.exit(0);\n\n //primary base case: tour completed\n if (moves == (sideLength * sideLength)) {\n solved = true;\n }\n //other base case: stepped off board or onto visited cell\n if ( board[x][y] != 0 ) {\n return;\n }\n //otherwise, mark current location\n //and recursively generate tour possibilities from current pos\n else {\n board[x][y] = moves;\n System.out.println(this);\n delay(10); //uncomment to slow down enough to view\n\n /*======================================\n Recursively try to solve (find tour) from\n each of knight's available moves.\n . e . d .\n f . . . c\n . . @ . .\n g . . . b\n . h . a .\n ======================================*/\n // right and down\n findTour(x + 1, y + 2, moves + 1);\n // left and down\n findTour(x - 1, y + 2, moves + 1);\n // down and right\n findTour(x + 2, y + 1, moves + 1);\n // up and left\n findTour(x - 2, y - 1, moves + 1);\n // right and up\n findTour(x + 1, y - 2, moves + 1);\n // left and up\n findTour(x - 1, y - 2, moves + 1);\n // up and right\n findTour(x + 2, y - 1, moves + 1);\n // down and left\n findTour(x - 2, y + 1, moves + 1);\n\n //If made it this far, path did not lead to tour, so back up.\n board[x][y] = 0;\n System.out.println(this);\n }\n }", "static List<Move> generateLegalMoves(Position pos) {\n\t\tList<Move> moves = new ArrayList<>();\n\n\t\t// for (int square : pos.pieces) {\n\t\t// \tif (pos.pieces.size() > 32) {\n\t\t// \t\tSystem.out.println(\"problem\" + pos.pieces.size());\n\t\t// \t}\n\t\t// \tif (pos.at(square) != 0 && Piece.isColor(pos.at(square), pos.toMove)) {\n\t\t// \t\tint piece = pos.at(square);\n\t\t// \t\tint name = Piece.name(piece);\n\t\t// \t\tif (name == Piece.Pawn) {\n\t\t// \t\t\tint step = pos.toMove == 'w' ? MoveData.Up : MoveData.Down;\n\t\t// \t\t\tif (square + step >= 0 && square + step < 64) {\n\t\t// \t\t\t\t// 1 square\n\t\t// \t\t\t\tif (pos.board.squares[square + step] == 0) {\n\t\t// \t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'q'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'b'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'n'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'r'));\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step));\n\t\t// \t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t// \t\t\t\t}\n\t\t// \t\t\t\t// 2 squares\n\t\t// \t\t\t\tif ((square < 16 && pos.toMove == 'w') || square > 47 && pos.toMove == 'b') {\n\t\t// \t\t\t\t\tif (pos.board.squares[square + 2*step] == 0 && pos.board.squares[square + step] == 0) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + 2*step));\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t\t// capture\n\t\t// \t\t\t\t// right\n\t\t// \t\t\t\tif (MoveData.DistanceToEdge[square][3] > 0) {\n\t\t// \t\t\t\t\tint target = square + step + 1;\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'q'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'b'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'n'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'r'));\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\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\t\t\t\n\t\t// \t\t\t\t\t} \n\t\t// \t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\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\t// left\n\t\t// \t\t\t\tif (MoveData.DistanceToEdge[square][2] > 0) {\n\t\t// \t\t\t\t\tint target = square + step - 1;\n\t\t// \t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'q'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'b'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'n'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'r'));\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\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\t\t\t\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t}\t\t\t\t\t\t\t\t\n\t\t// \t\t}\n\t\t// \t\telse if (name == Piece.Knight) {\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\tfor (int offset : MoveData.KnightOffsets.get(square)) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\tif (!Piece.isColor(pos.board.squares[square + offset], pos.toMove)) {\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tMove move = new Move(square, square + offset);\n\t\t// \t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\t\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t}\t\t\t\t\t\n\t\t// \t\t}\n\t\t// \t\telse {\n\t\t// \t\t\tint dirStart = name == Piece.Bishop ? 4 : 0;\n\t\t// \t\t\tint dirEnd = name == Piece.Rook ? 4 : 8;\n\t\t// \t\t\tfor (int dir = dirStart; dir < dirEnd; dir++) {\n\t\t// \t\t\t\tint maxDist = MoveData.DistanceToEdge[square][dir];\n\t\t// \t\t\t\tint dist = name == Piece.King ? Math.min(1, maxDist) : maxDist;\n\n\t\t// \t\t\t\tfor (int steps = 1; steps <= dist; steps++) {\n\t\t// \t\t\t\t\tint squareIdx = square + steps * MoveData.Offsets[dir];\t\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tif (!Piece.isColor(pos.board.squares[squareIdx], pos.toMove)) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, squareIdx));\n\t\t// \t\t\t\t\t\tif (Piece.isColor(pos.board.squares[squareIdx], Opposite(pos.toMove))) {\n\t\t// \t\t\t\t\t\t\tbreak;\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse {\n\t\t// \t\t\t\t\t\tbreak;\n\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}\n\t\t// \t\t}\n\t\t// \t}\n\t\t// }\n\n\t\tfor (int i = 0; i < 64; i++) {\n\t\t\tif (pos.board.squares[i] != 0 && Piece.isColor(pos.board.squares[i], pos.toMove)) {\n\t\t\t\tint piece = pos.board.squares[i];\n\t\t\t\tint name = Piece.name(piece);\n\t\t\t\tif (name == Piece.Pawn) {\n\t\t\t\t\tint step = pos.toMove == 'w' ? MoveData.Up : MoveData.Down;\n\t\t\t\t\tif (i + step >= 0 && i + step < 64) {\n\t\t\t\t\t\t// 1 square\n\t\t\t\t\t\tif (pos.board.squares[i + step] == 0) {\n\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'q'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'b'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'n'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'r'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step));\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// 2 squares\n\t\t\t\t\t\tif ((i < 16 && pos.toMove == 'w') || i > 47 && pos.toMove == 'b') {\n\t\t\t\t\t\t\tif (pos.board.squares[i + 2*step] == 0 && pos.board.squares[i + step] == 0) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + 2*step));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t// capture\n\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (MoveData.DistanceToEdge[i][3] > 0) {\n\t\t\t\t\t\t\tint target = i + step + 1;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'q'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'b'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'n'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'r'));\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\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\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\t// left\n\t\t\t\t\t\tif (MoveData.DistanceToEdge[i][2] > 0) {\n\t\t\t\t\t\t\tint target = i + step - 1;\n\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'q'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'b'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'n'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'r'));\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\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if (name == Piece.Knight) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tfor (int offset : MoveData.KnightOffsets.get(i)) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (!Piece.isColor(pos.board.squares[i + offset], pos.toMove)) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMove move = new Move(i, i + offset);\n\t\t\t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint dirStart = name == Piece.Bishop ? 4 : 0;\n\t\t\t\t\tint dirEnd = name == Piece.Rook ? 4 : 8;\n\t\t\t\t\tfor (int dir = dirStart; dir < dirEnd; dir++) {\n\t\t\t\t\t\tint maxDist = MoveData.DistanceToEdge[i][dir];\n\t\t\t\t\t\tint dist = name == Piece.King ? Math.min(1, maxDist) : maxDist;\n\t\t\t\t\t\tfor (int steps = 1; steps <= dist; steps++) {\n\t\t\t\t\t\t\tint squareIdx = i + steps * MoveData.Offsets[dir];\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!Piece.isColor(pos.board.squares[squareIdx], pos.toMove)) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, squareIdx));\n\t\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[squareIdx], Opposite(pos.toMove))) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tbreak;\n\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}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// castling\t\t\n\t\tif (pos.toMove == 'w' && !underAttack(pos, pos.whiteKing, 'b')) {\t\t\t\n\t\t\tif (pos.castlingRights.whiteKingSide && pos.at(Board.H1) == (Piece.Rook | Piece.White)) {\n\t\t\t\tif (pos.at(Board.F1) == Piece.Empty && pos.at(Board.G1) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.F1, 'b') && !underAttack(pos, Board.G1, 'b')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E1, Board.G1));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\tif (pos.castlingRights.whiteQueenSide && pos.at(Board.A1) == (Piece.Rook | Piece.White)) {\t\t\t\t\n\t\t\t\tif (pos.at(Board.B1) == Piece.Empty && pos.at(Board.C1) == Piece.Empty && pos.at(Board.D1) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.D1, 'b') && !underAttack(pos, Board.C1, 'b')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E1, Board.C1));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\telse if (pos.toMove == 'b' && !underAttack(pos, pos.blackKing, 'w')){\n\t\t\tif (pos.castlingRights.blackKingSide && pos.at(Board.H8) == (Piece.Rook | Piece.Black)) {\n\t\t\t\tif (pos.at(Board.F8) == Piece.Empty && pos.at(Board.G8) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.F8, 'w') && !underAttack(pos, Board.G8, 'w')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E8, Board.G8));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pos.castlingRights.blackQueenSide && pos.at(Board.A8) == (Piece.Rook | Piece.Black)) {\n\t\t\t\tif (pos.at(Board.B8) == Piece.Empty && pos.at(Board.C8) == Piece.Empty && pos.at(Board.D8) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.D8, 'w') && !underAttack(pos, Board.C8, 'w')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E8, Board.C8));\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// filter illegal moves\n\t\tList<Move> legalMoves = new ArrayList<>();\n\t\tchar color = pos.toMove;\n\t\tfor (Move move : moves) {\n\t\t\tpos.makeMove(move);\n\t\t\tif (!kingInCheck(pos, color)) {\n\t\t\t\tlegalMoves.add(move);\n\t\t\t}\t\t\t\n\t\t\tpos.undoMove();\n\t\t}\n\n\t\treturn legalMoves;\n\t}", "public boolean move(int x, int y, CheckersBoard board) {\n if (whiteTurn == true && team == Constants.TeamId.team1Id) {\n return false;\n }\n if (whiteTurn == false && team == Constants.TeamId.team2Id) {\n return false;\n }\n /**\n * then change the x - y coords of the piece\n * update the UI to remove the highlighted squares then move the piece\n * if chess and shared square you take a piece\n * if checkers you jumped them you take the piece\n * return new x - y components\n *\n * if this is too high up in the tree you can override this implementation or update it\n * to fit specific pieces if its not working for some reason\n */\n if (possible(x, y, gameBoard)) {\n int changex = this.getX()-x;\n int changey = this.getY()-y;\n CheckersPiece temp = gameBoard.boardPositions[getX()][getY()];\n gameBoard.boardPositions[getX()][getY()] = null;\n gameBoard.boardPositions[x][y] = temp;\n if (gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2] != null) {\n System.out.println(\"Here\");\n if (gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2].team != this.team) {\n gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2].imageView.setVisibility(View.GONE);\n gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2] = null;\n }\n }\n this.setX(x);\n this.setY(y);/*\n if (Math.abs(changex) == 2) {\n gameBoard.boardPositions[x + (changex/2)][y + (changey/2)] = null;\n if (team == Constants.TeamId.team1Id) {\n board.numPieces1--;\n } else if (team == Constants.TeamId.team2Id) {\n board.numPieces0--;\n }\n }*/\n\n gameBoard.boardPositions[x][y].imageView.setX(142*x);\n gameBoard.boardPositions[x][y].imageView.setY(142*y);\n // flips after move is\n whiteTurn = !whiteTurn;\n gameBoard.startTimer();\n }\n //setUpUI(gameBoard);\n if (getY() == 7 && team == Constants.TeamId.team2Id) {\n board.crown(this);\n }\n if (getY() == 0 && team == Constants.TeamId.team1Id) {\n board.crown(this);\n }\n return possible(x, y, gameBoard);\n }" ]
[ "0.7196386", "0.7190203", "0.7143908", "0.7129436", "0.7114557", "0.7089491", "0.69955206", "0.6970041", "0.6883541", "0.6854485", "0.68114465", "0.68047243", "0.67381823", "0.6697766", "0.6681636", "0.66632557", "0.6651097", "0.66481364", "0.66342604", "0.6630031", "0.6551126", "0.6543691", "0.65311307", "0.65276504", "0.65069413", "0.6489731", "0.64877003", "0.6451221", "0.6441233", "0.6425552", "0.64207935", "0.6418991", "0.64117604", "0.6403909", "0.6397339", "0.63945276", "0.63914263", "0.6384494", "0.6363265", "0.63414806", "0.6339135", "0.6336862", "0.6334483", "0.6325149", "0.6321795", "0.6300911", "0.6293899", "0.6292728", "0.6292028", "0.6290506", "0.62826985", "0.6281556", "0.6281429", "0.6274437", "0.6267645", "0.6267498", "0.6261896", "0.6261146", "0.6254446", "0.6250412", "0.62465924", "0.624265", "0.6236324", "0.6234188", "0.62244433", "0.62166184", "0.6211788", "0.6207219", "0.6204079", "0.6198511", "0.6197814", "0.6188416", "0.61880773", "0.61777097", "0.6175174", "0.61741185", "0.61691713", "0.6167216", "0.6166831", "0.61531436", "0.61500233", "0.6146579", "0.61422276", "0.6134648", "0.6129649", "0.6129649", "0.61279655", "0.61253554", "0.61229444", "0.611408", "0.6112842", "0.61047083", "0.6092524", "0.60897535", "0.60885215", "0.6088101", "0.6077076", "0.6070719", "0.60696054", "0.60687655" ]
0.6922888
8
min number of moves to solve initial board; 1 if unsolvable return an iterable collection for sequence of boards in a shortest solution.
public Iterable<Board> solution() { if (!isSolvable()) { return null; }else { Stack<Board> sequenceBoard = new Stack<>(); Node preNode = minNode; sequenceBoard.push(preNode.getBoard()); while (preNode.getPrevious() != null) { preNode = preNode.getPrevious(); sequenceBoard.push(preNode.getBoard()); } return sequenceBoard; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Iterable<Board> solution()\n {\n Iterable<Board> result = null;\n if (isSolvable()) {\n result = shortestPath;\n }\n return result;\n }", "public Iterable<Board> solution() {\n if (!isSolvable()) {\n return null;\n }\n Stack<Board> st = new Stack<>();\n SearchNode node = resultNode;\n while (node != null) {\n st.push(node.board);\n node = node.predecessor;\n }\n return st;\n\n }", "public Iterable<Board> solution() {\n if (!isSolvable()) {\n return null;\n }\n\n Stack<Board> solution = new Stack<Board>();\n\n Move current = finalMove;\n while (current.previous != null) {\n solution.push(current.board);\n current = current.previous;\n }\n solution.push(current.board);\n\n return solution;\n }", "public Iterable<Board> solution() {\n\n return initialSolvable ? solutionBoards : null;\n }", "public Iterable<Board> solution() {\n \tif (!isSolvable) return null;\n \tDeque<Board> solution = new LinkedList<>();\n \tSearchNode node = solutionNode;\n \twhile (node != null) {\n \t\tsolution.addFirst(node.getBoard());\n \t\tnode = node.prev();\n \t}\n \treturn solution;\n }", "public Iterable<Board> solution()\n {\n Stack<Board> solution = new Stack<Board>();\n \n // for case where initial board is goal board\n if (moves == 0) {\n solution.push(goalNode.board);\n return solution;\n }\n\n step = goalNode;\n \n // add chain of previous node from goal node \n while (step != null) {\n solution.push(step.board);\n step = step.prev;\n }\n \n return solution;\n }", "public Iterable<Board> solution() {\n if (!isSolvable())\n return null;\n Stack<Board> solution = new Stack<Board>();\n for (Node s = goal; s != null; s = s.previousNode)\n solution.push(s.board);\n return solution;\n }", "public Iterable<Board> solution() {\n if (!isSolvable) return null;\n return solutions;\n }", "public Iterable<Board> solution() {\n if (!isSolvable()) {\n return null;\n }\n return new BoardIterable();\n }", "public Iterable<Board> solution()\n {\n SearchNode element = getSolutionNode();\n\n Stack<Board> returnList= new Stack<>();\n returnList.push(element.board);\n while (element!=null &&element.previusNode!=null){\n\n element = element.previusNode;\n returnList.push(element.board);\n }\n\n return new Iterable<Board>() {\n @Override\n public Iterator<Board> iterator()\n {\n return returnList.iterator();\n }\n };\n }", "public Iterable<Board> solution() {\r\n if (!isSolvable) return null;\r\n return new NodeQueue();\r\n }", "public Iterable<Board> solution() {\n if (!solvable) {\n return null;\n }\n else {\n return new SolutionBoards();\n }\n\n }", "public Iterable<Board> solution() {\n if (isSolvable)\n return solutionTree;\n else\n return null;\n }", "public void solve() {\n\t\tArrayList<Piece> pieceListBySize = new ArrayList<Piece>(pieceList);\n\t\tCollections.sort(pieceListBySize);\t// This is done since the order\n\t\t\t\t\t\t\t\t\t\t\t// of piece placements does not matter.\n\t\t\t\t\t\t\t\t\t\t\t// Placing larger pieces down first lets\n\t\t\t\t\t\t\t\t\t\t\t// pruning occur sooner.\n\t\t\n\t\t/**\n\t\t * Calculates number of resets needed for a game board.\n\t\t * A \"reset\" refers to a tile that goes from the solved state to\n\t\t * an unsolved state and back to the solved state.\n\t\t * \n\t\t * This is the calculation used for pruning.\n\t\t */\n\t\t\n\t\tArrayList<Integer> areaLeft = new ArrayList<Integer>();\n\t\tareaLeft.add(0);\n\t\tint totalArea = 0;\n\t\tfor (int i = pieceListBySize.size() - 1; i >= 0; i--) {\n\t\t\ttotalArea += pieceListBySize.get(i).numberOfFlips;\n\t\t\tareaLeft.add(0, totalArea);\n\t\t}\n\t\tint totalResets = (totalArea - gameBoard.flipsNeeded) / (gameBoard.goal + 1);\n\t\tSystem.out.println(\"Total Resets: \" + totalResets);\n\t\t\n\t\t/* \n\t\tint highRow = 0;\n\t\tint highCol = 0;\n\t\tint[][] maxDim = new int[2][pieceListBySize.size()];\n\t\tfor (int i = pieceListBySize.size() - 1; i >= 0; i--) {\n\t\t\tif (highRow < pieceListBySize.get(i).rows)\n\t\t\t\thighRow = pieceListBySize.get(i).rows;\n\t\t\t\n\t\t\tif (highCol < pieceListBySize.get(i).cols)\n\t\t\t\thighCol = pieceListBySize.get(i).cols;\n\t\t\t\n\t\t\tmaxDim[0][i] = highRow;\n\t\t\tmaxDim[1][i] = highCol;\n\t\t}\n\t\t*/\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\tNode<GameBoard> currentNode = new Node<GameBoard>(gameBoard);\n\t\tStack<Node<GameBoard>> stack = new Stack<Node<GameBoard>>();\n\t\tstack.push(currentNode);\n\t\t\n\t\twhile (!stack.isEmpty()) {\n\t\t\tnodeCount++;\n\t\t\t\n\t\t\tNode<GameBoard> node = stack.pop();\n\t\t\tGameBoard current = node.getElement();\n\t\t\tint depth = node.getDepth();\n\t\t\t\n\t\t\t// Checks to see if we reach a solved state.\n\t\t\t// If so, re-order the pieces then print out the solution.\n\t\t\tif (depth == pieceListBySize.size() && current.isSolved()) {\n\t\t\t\tArrayList<Point> moves = new ArrayList<Point>();\n\t\t\t\t\n\t\t\t\twhile (node.parent != null) {\n\t\t\t\t\tint index = node.level - 1;\n\t\t\t\t\tint sequence = pieceList.indexOf(pieceListBySize.get(index));\n\t\t\t\t\tPoint p = new Point(current.moveRow, current.moveCol, sequence);\n\t\t\t\t\tmoves.add(p);\n\t\t\t\t\t\n\t\t\t\t\tnode = node.parent;\n\t\t\t\t\tcurrent = node.getElement();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tCollections.sort(moves);\n\t\t\t\tfor (Point p : moves) {\n\t\t\t\t\tSystem.out.println(p);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Nodes opened: \" + nodeCount);\n\t\t\t\tlong endTime = System.currentTimeMillis();\n\t\t\t\tSystem.out.println(\"Elapsed Time: \" + ((endTime - startTime) / 1000) + \" secs.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tPiece currentPiece = pieceListBySize.get(depth);\n\t\t\tint pieceRows = currentPiece.rows;\n\t\t\tint pieceCols = currentPiece.cols;\n\t\t\t\n\t\t\tPriorityQueue<Node<GameBoard>> pQueue = new PriorityQueue<Node<GameBoard>>();\n\t\t\t\n\t\t\t// Place piece in every possible position in the board\n\t\t\tfor (int i = 0; i <= current.rows - pieceRows; i++) {\n\t\t\t\tfor (int j = 0; j <= current.cols - pieceCols; j++) {\n\t\t\t\t\tGameBoard g = current.place(currentPiece, i, j);\n\t\t\t\t\t\n\t\t\t\t\tif (totalResets - g.resets < 0)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\t// Put in the temporary priority queue\n\t\t\t\t\tpQueue.add(new Node<GameBoard>(g, node));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Remove from priority queue 1 at a time and put into stack.\n\t\t\t// The reason this is done is so that boards with the highest reset\n\t\t\t// count can be chosen over ones with fewer resets.\n\t\t\twhile (!pQueue.isEmpty()) {\n\t\t\t\tNode<GameBoard> n = pQueue.remove();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public ArrayList<SlidingPuzzleState> getPossibleNextMoves(){\n\t\tArrayList<SlidingPuzzleState> moves = new ArrayList<SlidingPuzzleState>();\n\t\tint holeNum = 0;\n\t\tfor (Coordinate h: _holes){\n\t\t\t\n\t\t\t//for every hole, check if its not on the edges\n\t\t\t//of the puzzle and if his next position is not\n\t\t\t//already a hole\n\t\t\t\n\t\t\tif (h.getI() > 0 && _puzzle[h.getI()-1][h.getJ()]!=0){\n\t\t\t\t\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.UP));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getI() < (_rows-1) && _puzzle[h.getI()+1][h.getJ()]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.DOWN));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getJ() > 0 && _puzzle[h.getI()][h.getJ()-1]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.LEFT));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getJ() < (_cols-1) && _puzzle[h.getI()][h.getJ()+1]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.RIGHT));\n\t\t\t}\n\t\t\tholeNum++;\n\t\t}\n\t\treturn moves;\n\t}", "public Solver(Board initial) {\r\n this.board = initial;\r\n\r\n final Comparator<SearchNode> solverComparator = new Comparator<SearchNode>() {\r\n @Override\r\n public int compare(SearchNode o1, SearchNode o2) {\r\n return o1.weight() - o2.weight();\r\n }\r\n };\r\n MinPQ<SearchNode> pq = new MinPQ<SearchNode>(solverComparator);\r\n MinPQ<SearchNode> twinPq = new MinPQ<SearchNode>(solverComparator);\r\n\r\n pq.insert(new SearchNode(board, null, 0));\r\n twinPq.insert(new SearchNode(board.twin(), null, 0));\r\n do {\r\n SearchNode current = pq.delMin();\r\n SearchNode twin = twinPq.delMin();\r\n\r\n //solution.enqueue(current.getBoard());\r\n if (!current.getBoard().isGoal()) {\r\n for (Board neighbour : current.getBoard().neighbors()) {\r\n if (current.getParent() == null || current.getParent() != null && !neighbour.equals(current.getParent().getBoard())) {\r\n pq.insert(new SearchNode(neighbour, current, current.moves() + 1));\r\n }\r\n }\r\n } else {\r\n solution = new LinkedStack<Board>();\r\n SearchNode node = current;\r\n while (node != null) {\r\n solution.push(node.getBoard());\r\n node = node.getParent();\r\n }\r\n break;\r\n }\r\n\r\n if (!twin.getBoard().isGoal()) {\r\n for (Board neighbour : twin.getBoard().neighbors()) {\r\n if (twin.getParent() == null || twin.getParent() != null && !neighbour.equals(twin.getParent().getBoard())) {\r\n twinPq.insert(new SearchNode(neighbour, twin, twin.moves() + 1));\r\n }\r\n }\r\n } else {\r\n break;\r\n }\r\n } while (!pq.isEmpty() || !twinPq.isEmpty());\r\n }", "public Iterable<Board> solution() {\n\t\treturn result;\n\t}", "public Solver(Board initial) {\n \tsolutionNode = null;\n \tpq = new MinPQ<>();\n \tpq.insert(new SearchNode(initial, null, 0));\n\n \twhile (true) {\n \t\tSearchNode currNode = pq.delMin();\n\t \tBoard currBoard = currNode.getBoard();\n\n\t \tif (currBoard.isGoal()) {\n\t \t\tisSolvable = true;\n\t \t\tsolutionNode = currNode;\n\t \t\tbreak;\n\t \t}\n\n\t \tif (currBoard.hamming() == 2 && currBoard.twin().isGoal()) {\n\t \t\tisSolvable = false;\n\t \t\tbreak;\n\t \t}\n\n\t \tint moves = currNode.getMoves();\n\t \tBoard prevBoard = moves > 0 ? currNode.prev().getBoard() : null;\n\t \tfor (Board nextBoard : currBoard.neighbors()) {\n\t \t\tif (nextBoard != null && nextBoard.equals(prevBoard)) {\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\tpq.insert(new SearchNode(nextBoard, currNode, moves + 1));\n\t \t}\n \t}\n \t\n }", "public Iterable<Board> solution() {\n return solution;\n }", "public Solver(final Board initial) {\n\n Node solutionNodeTwin; // Solution node twin\n MinPQ<Node> thePQ; // Minimum priority queue\n MinPQ<Node> thePQTwin; // Minimum priority queue for the twin\n boolean initialSolvableTwin = false; // is initial twin board solvable\n\n solutionNode = new Node();\n solutionNodeTwin = new Node();\n\n solutionNode.theBoard = initial;\n solutionNodeTwin.theBoard = initial.twin();\n\n solutionNode.previousNode = null;\n solutionNodeTwin.previousNode = null;\n\n thePQ = new MinPQ<>(boardOrder());\n thePQTwin = new MinPQ<>(boardOrder());\n\n thePQ.insert(solutionNode);\n thePQTwin.insert(solutionNodeTwin);\n solutionBoards = new Queue<>();\n\n int count = 0;\n while (!solutionNode.theBoard.isGoal()\n || !solutionNodeTwin.theBoard.isGoal()) {\n\n solutionNode = thePQ.delMin();\n solutionBoards.enqueue(solutionNode.theBoard);\n\n if (solutionNode.theBoard.isGoal()) {\n initialSolvable = true;\n break;\n } else {\n solutionNode.numberOfMovesMade++;\n Iterable<Board> neighborBoards = solutionNode.theBoard.neighbors();\n Iterator<Board> itr = neighborBoards.iterator();\n while (itr.hasNext()) {\n Node neighborNode = new Node();\n neighborNode.theBoard = itr.next();\n neighborNode.numberOfMovesMade = solutionNode.numberOfMovesMade;\n neighborNode.previousNode = solutionNode;\n if (count == 0) {\n thePQ.insert((neighborNode));\n } else if (!neighborNode.theBoard.equals(solutionNode\n .previousNode.theBoard)) {\n thePQ.insert(neighborNode);\n }\n }\n }\n\n solutionNodeTwin = thePQTwin.delMin();\n if (solutionNodeTwin.theBoard.isGoal()) {\n initialSolvableTwin = true;\n break;\n } else {\n solutionNodeTwin.numberOfMovesMade++;\n Iterable<Board> neighborBoardsTwin = solutionNodeTwin.theBoard.neighbors();\n Iterator<Board> itr2 = neighborBoardsTwin.iterator();\n while (itr2.hasNext()) {\n Node neighborNodeTwin = new Node();\n neighborNodeTwin.theBoard = itr2.next();\n neighborNodeTwin.numberOfMovesMade = solutionNodeTwin.numberOfMovesMade;\n neighborNodeTwin.previousNode = solutionNodeTwin;\n if (count == 0) {\n thePQTwin.insert(neighborNodeTwin);\n } else if (!neighborNodeTwin.theBoard.equals(solutionNodeTwin.previousNode.theBoard)) {\n thePQTwin.insert(neighborNodeTwin);\n }\n }\n }\n count++;\n }\n }", "public static void compute_possible_moves(Board s){\n\t\tint b [][] = s.board;\n\t\tint x = -1;\n\t\tint y = -1;\n\t\tfor (int i = 0;i < b.length;i++) {\n\t\t\tfor (int j = 0;j < b[i].length;j++) {\n\t\t\t\tif(b[i][j] == 0){\n\t\t\t\t\tx = i;\n\t\t\t\t\ty = j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\n\t\tint left [][];\n\t\tint right [][];\n\t\tint up [][];\n\t\tint down [][];\n\t\tpossible_boards.clear();\n\t\tif(x - 1 != -1 && x >= 0 && x < 3){\n\t\t\t//up is a legal move\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\n\t\t\tint temp = temporary_board[x - 1][y];\n\t\t\ttemporary_board[x - 1][y] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tup = temporary_board;\n\n\t\t\tBoard up_board = new Board(up);\n\t\t\tpossible_boards.add(up_board);\n\n\t\t}\n\t\tif(x + 1 != 3 && x >= 0 && x < 3){\n\t\t\t//down is a legal move\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x + 1][y];\n\t\t\ttemporary_board[x + 1][y] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tdown = temporary_board;\n\t\t\tBoard down_board = new Board(down);\n\t\t\tpossible_boards.add(down_board);\n\t\t}\n\t\tif(y - 1 != -1 && y >= 0 && y < 3){\n\t\t\t//left move is legal\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x][y - 1];\n\t\t\ttemporary_board[x][y - 1] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tleft = temporary_board;\n\t\t\tBoard left_board = new Board(left);\n\t\t\tpossible_boards.add(left_board);\n\n\t\t}\n\t\tif(y + 1 != 3 && y >= 0 && y < 3){\n\t\t\t//right move is legal\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x][y + 1];\n\t\t\ttemporary_board[x][y + 1] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tright = temporary_board;\n\t\t\tBoard right_board = new Board(right);\n\t\t\tpossible_boards.add(right_board);\n\n\t\t}\n\n\t}", "public static boolean SolveNinePuzzle(int board [][]){\n\t\tfor(int i = 0; i < board.length;i++){\n\t\t\t\tfor (int j = 0;j < board[i].length;j++) {\n\t\t\t\t\tSystem.out.print(board[i][j] + \" \");\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Attempting to solve board ...\");\n \n\t\tQueue node_queue = new Queue();\n\t\tBoard start_board = new Board(board);\n\t\tint goal_board [][] = {{1,2,3},{4,5,6},{7,8,0}}; \n\t\tBoard goal = new Board(goal_board);\n\t\t//check if the start board is the solved board\n\t\tif(start_board.compare(goal)){\n\t\t\treturn true;\n\t\t}\n\t\t//new tree for unique moves; root node is start board\n\t\tBoard_Tree result_tree = new Board_Tree(start_board);\n\t\tnode_queue.enqueue(start_board);\n\t\t//add root node string representation to hashset\n\t\tvertex_check.add(start_board.board_string);\n\t\twhile(!node_queue.isEmpty()){\n\t\t\tBoard v = node_queue.dequeue();\n\t\t\tcompute_possible_moves(v);\n\t\t\tfor(Board s: possible_boards){\n\t\t\t\tif(s.compare(goal)){\n\t\t\t\t\tresult_tree.insert(v,s);\n\t\t\t\t\tresult_tree.goal_board(s);\n\t\t\t\t\treturn true;\n\t\t\t\t}else if(!(vertex_check.contains(s.board_string))){\n\t\t\t\t\tvertex_check.add(s.board_string);\n\t\t\t\t\tnode_queue.enqueue(s);\n\t\t\t\t\tresult_tree.insert(v,s);\n\t\t\t\t}else{\n\t\t\t\t\t//ignore\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public Set<Line> getPossibleMoves(Square[][] board) {\n Set<Line> empty = new HashSet<Line>();\n return getPossibleMoves(board, empty, 0);\n }", "public Solver(Board initial) {\n if (initial == null) {\n throw new IllegalArgumentException();\n }\n MinPQ<SearchNode> minPQ = new MinPQ<>();\n MinPQ<SearchNode> minPQTwin = new MinPQ<>();\n\n minPQ.insert(new SearchNode(initial, null, 0));\n minPQTwin.insert(new SearchNode(initial.twin(), null, 0));\n\n while (true) {\n SearchNode curr = minPQ.delMin();\n SearchNode currTwin = minPQTwin.delMin();\n\n if (curr.board.isGoal()) {\n moves = curr.moves;\n resultNode = curr;\n break;\n } else if (currTwin.board.isGoal()) {\n moves = -1;\n resultNode = null;\n break;\n }\n\n for (Board b : curr.board.neighbors()) {\n if (curr.predecessor == null || !b.equals(curr.predecessor.board))\n minPQ.insert(new SearchNode(b, curr, curr.moves + 1));\n }\n\n for (Board b : currTwin.board.neighbors()) {\n if (currTwin.predecessor == null || !b.equals(currTwin.predecessor.board))\n minPQTwin.insert(new SearchNode(b, currTwin, currTwin.moves + 1));\n }\n }\n\n }", "public Solver(Board initial) {\n this.initial = initial;\n if (this.isSolvable())\n minimumNumberOfMoves = this.solution.movesToBoard;\n else\n minimumNumberOfMoves = -1;\n }", "public Queen[] lowestHeuristic(Queen[] state){\n Queen[] min = new Queen[n];\n int minHeuristic = general.getHeuristic(state);\n Queen[] curr = new Queen[n];\n\n //Copy the state in min and curr\n for(int i = 0; i < n; i++){\n min[i] = new Queen(state[i].getRow(), state[i].getColumn());\n curr[i] = new Queen(state[i].getRow(), state[i].getColumn());\n }\n\n //Iterate all columns\n for(int i = 0; i < n; i++){\n if (i>0)\n curr[i-1] = new Queen (state[i-1].getRow(), state[i-1].getColumn());\n curr[i] = new Queen (0, curr[i].getColumn());\n //Iterate rows\n for(int j = 0; j < n; j++){\n\n //Check if a minimum is found\n if(general.getHeuristic(curr) < minHeuristic){\n minHeuristic = general.getHeuristic(curr);\n\n for(int k = 0; k < n; k++)\n min[k] = new Queen(curr[k].getRow(), curr[k].getColumn());\n }\n\n //Move the queen\n if(curr[i].getRow() != n-1)\n curr[i].move();\n }\n }\n return min;\n }", "public Solver(Board initial)\n {\n pq = new MinPQ<>();\n pqTwin = new MinPQ<>();\n\n pq.insert(new SearchNode(initial, 0, null));\n pqTwin.insert(new SearchNode(initial.twin(), 0, null));\n\n SearchNode solution = null;\n while (!pq.isEmpty() || !pqTwin.isEmpty()) {\n solution = processQueue(pq);\n if (solution != null) break;\n\n solution = processQueue(pqTwin);\n if (solution != null) {\n solution = null;\n break;\n }\n }\n if (solution != null) {\n numberOfMoves = solution.numberOfMoves;\n\n SearchNode current = solution;\n while (current != null) {\n shortestPath.add(0, current.board);\n current = current.previous;\n }\n }\n pq = null;\n pqTwin = null;\n }", "public Iterable<Board> solution() {\n\t\tif (goal == null)\n\t\t\treturn null;\n\t\telse {\n\t\t\tfinal Stack<Board> trace = new Stack<Board>();\n\t\t\tSearchNode iter = goal;\n\t\t\twhile (iter != null) {\n\t\t\t\ttrace.push(iter.getBoard());\n\t\t\t\titer = iter.getParent();\n\t\t\t}\n\t\t\treturn trace;\n\t\t}\n\t}", "public int[][] findSolution(){\n this.hasSolution = false;\n BoardStatus solution = findSolution(1, new BoardStatus(boardSize, this.initialPosition));\n if (solution == null){\n return null;\n }\n return solution.geBoard();\n }", "@Override\n\tpublic ArrayList<String> getAvailableSolutions(int player) {\n\t\tArrayList<String> moves = new ArrayList<String>();\n\t\tfor (int col = 0; col < board.getCOLS(); ++col) {\n\t\t\tif(validMove(col)){\n\t\t\t\tmoves.add(\"5,\"+col); \n\t\t\t}\t\t\t\n\t\t}\t\t\n\t\treturn moves;\n\t}", "public Solver(Board initial) {\n if (initial == null) {\n throw new IllegalArgumentException();\n }\n\n boolean solvable = false;\n int moves = -1;\n\n MinPQ<Node> queue = new MinPQ<Node>(new NodeComparator());\n queue.insert(new Node(initial, null));\n\n MinPQ<Node> queueTwin = new MinPQ<Node>(new NodeComparator());\n queueTwin.insert(new Node(initial.twin(), null));\n\n while (true) {\n Node node = queue.delMin();\n if (node._board.isGoal()) {\n moves = node._moves;\n solvable = true;\n _node = node;\n break;\n }\n\n Node nodeTwin = queueTwin.delMin();\n if (nodeTwin._board.isGoal()) {\n _node = null;\n break;\n }\n\n insert(node, queue);\n insert(nodeTwin, queueTwin);\n }\n\n _moves = moves;\n _solvable = solvable;\n if (_solvable) {\n _solution = new Board[_moves + 1];\n Node node = _node;\n for (int i = 0; i < _moves + 1; i++) {\n _solution[i] = node._board;\n node = node._prev;\n }\n }\n else {\n _solution = null;\n }\n }", "public Solver(Board initial) {\r\n if (initial == null) throw new IllegalArgumentException();\r\n\r\n\r\n SearchNode initialAdjacent = new SearchNode(initial.twin(), null, 0);\r\n MinPQ<SearchNode> adjacentPriorityQueue = new MinPQ<>(1);\r\n adjacentPriorityQueue.insert(initialAdjacent);\r\n\r\n\r\n SearchNode initialNode = new SearchNode(initial, null, 0);\r\n MinPQ<SearchNode> priorityQueue = new MinPQ<>(1);\r\n priorityQueue.insert(initialNode);\r\n\r\n if (initial.isGoal()) {\r\n goal = initialNode;\r\n isSolvable = true;\r\n return;\r\n } else if (initialAdjacent.board.isGoal()) {\r\n isSolvable = false;\r\n }\r\n\r\n\r\n SearchNode currentAdjacent = initialAdjacent;\r\n SearchNode currentBoard = initialNode;\r\n\r\n while (!currentAdjacent.board.isGoal() && !currentBoard.board.isGoal()) {\r\n\r\n currentAdjacent = adjacentPriorityQueue.delMin();\r\n currentBoard = priorityQueue.delMin();\r\n\r\n for (Board adjacentNeighbor : currentAdjacent.board.neighbors()) {\r\n SearchNode toBeInserted = new SearchNode(adjacentNeighbor, currentAdjacent, currentAdjacent.previousMoves + 1);\r\n if (currentAdjacent.previousSearchNode == null || !toBeInserted.board.equals(currentAdjacent.previousSearchNode.board)) {\r\n adjacentPriorityQueue.insert(toBeInserted);\r\n }\r\n }\r\n\r\n\r\n for (Board neighbor : currentBoard.board.neighbors()) {\r\n SearchNode toBeInserted = new SearchNode(neighbor, currentBoard, currentBoard.previousMoves + 1);\r\n if (currentBoard.previousSearchNode == null || !toBeInserted.board.equals(currentBoard.previousSearchNode.board)) {\r\n\r\n priorityQueue.insert(toBeInserted);\r\n }\r\n }\r\n }\r\n if (currentAdjacent.board.isGoal()) {\r\n isSolvable = false;\r\n goal = initialNode;\r\n } else {\r\n goal = currentBoard;\r\n isSolvable = true;\r\n }\r\n\r\n }", "public boolean isSolvable() {\n Board twin = initial.twin();\n MinPQ<Node> mainQueue = new MinPQ<>(getComparator());\n MinPQ<Node> twinQueue = new MinPQ<>(getComparator());\n mainQueue.insert(new Node(initial, 0, null));\n twinQueue.insert(new Node(twin, 0, null));\n while (this.solution == null) {\n Node temp = mainQueue.delMin();\n if (temp.board.isGoal()) {\n this.solution = temp;\n return true;\n }\n Iterable<Board> nebrs = temp.board.neighbors();\n for (Board x : nebrs) {\n if (!x.equals(temp.previousNode.board)) {\n mainQueue.insert(new Node(x, temp.movesToBoard + 1, temp));\n }\n }\n Node temp2 = twinQueue.delMin();\n if (temp2.board.isGoal()) {\n this.solution = null;\n return false;\n }\n Iterable<Board> nebrs2 = temp2.board.neighbors();\n for (Board x : nebrs2) {\n if (!x.equals(temp2.previousNode.board)) {\n twinQueue.insert(new Node(x, temp2.movesToBoard + 1, temp2));\n }\n }\n }\n return false;\n }", "public Solver(WorldState initial) {\n solution = new ArrayList<>();\n\n // create a priority queue of search nodes\n MinPQ<SNode> pq = new MinPQ<>();\n\n // insert an “initial search node” into the priority queue\n SNode start = new SNode(initial, 0, null);\n pq.insert(start);\n\n // If the search node with minimum priority is the goal node, then we’re done.\n while (!pq.min().ws.isGoal()) {\n\n // Remove the search node with minimum priority.\n SNode X = pq.delMin();\n\n // for each neighbor of X’s world state, create a new search node and\n // insert it into the priority queue.\n for (WorldState nb: X.ws.neighbors()) {\n\n // critical optimization\n if (X.prev == null || !(nb.equals(X.prev.ws))) {\n SNode nbNode = new SNode(nb, X.numberOfMove + 1, X);\n pq.insert(nbNode);\n }\n }\n }\n\n // generate the solution\n SNode goal = pq.min();\n while (goal != null) {\n solution.add(0, goal.ws);\n goal = goal.prev;\n }\n }", "public Solver(Board initial) {\n if (initial == null) throw new IllegalArgumentException();\n initialNode = new BoardNode(initial);\n\n solution = solve();\n if (solution == null) return;\n\n for (Board board : solution)\n moves++;\n\n }", "private Set<Line> getPossibleMoves(Square[][] board, Set<Line> moves, int sides) {\n if (moves.size() >= width || sides > 3) return moves;\n else {\n Set<Square> squares = squaresWithMarkedSides(board, order[sides]);\n for (Square square : squares) {\n for (Line line : square.openLines()) {\n if (moves.size() < width)\n moves.add(line);\n }\n }\n return getPossibleMoves(board, moves, sides+1);\n }\n }", "public Solver(Board initial) {\n if (initial == null) {\n throw new IllegalArgumentException(\"Solver initialized with null input\");\n }\n\n MinPQ<Move> moves = new MinPQ<>();\n moves.insert(new Move(initial));\n\n MinPQ<Move> twinMoves = new MinPQ<>();\n twinMoves.insert(new Move(initial.twin()));\n\n while (true) {\n Move current = moves.delMin();\n\n if (current.board.isGoal()) {\n finalMove = current;\n break;\n }\n\n for (Board board : current.board.neighbors()) {\n if (current.previous == null || !board.equals(current.previous.board)) {\n moves.insert(new Move(board, current));\n }\n }\n\n current = twinMoves.delMin();\n\n if (current.board.isGoal()) {\n break;\n }\n\n for (Board board : current.board.neighbors()) {\n if (current.previous == null || !board.equals(current.previous.board)) {\n twinMoves.insert(new Move(board, current));\n }\n }\n }\n }", "public int[][] solve() throws UnableToSolveSudokuBoardException {\n if (solveNext()) return board;\n throw new UnableToSolveSudokuBoardException();\n }", "public ArrayList<Move> getPossibleMoves() \n\t{\n\t\tArrayList<Move> possibleMoves = new ArrayList<Move>();\n\t\t\n\t\tfor(int i = - 1; i <= 1; i += 2)\n\t\t{\n\t\t\tfor(int j = -1; j <= 1; j += 2)\n\t\t\t{\n\t\t\t\tLocation currentLoc = new Location(getLoc().getRow() + j, getLoc().getCol() + i);\n\t\t\t\t\n\t\t\t\tif(getBoard().isValid(currentLoc))\n\t\t\t\t{\n\t\t\t\t\tif(getBoard().getPiece(currentLoc) == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tArrayList<Node> move = new ArrayList<Node>();\n\t\t\t\t\t\tmove.add(getNode());\n\t\t\t\t\t\tmove.add(getBoard().getNode(currentLoc));\n\t\t\t\t\t\t\n\t\t\t\t\t\tpossibleMoves.add(new CheckersMove(move, getBoard(), getLoyalty()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(ArrayList<Node> move : getNextJumps(getLoc(), new ArrayList<Location>()))\n\t\t{\n\t\t\tif(move.size() > 1)\n\t\t\t{\n\t\t\t\tpossibleMoves.add(new CheckersMove(move, getBoard(), getLoyalty()));\n\t\t\t}\n\t\t}\n\t\t\n\t\tArrayList<Move> jumpMoves = new ArrayList<Move>();\n\t\t\n\t\tfor(Move possibleMove : possibleMoves)\n\t\t{\n\t\t\tif(!possibleMove.getJumped().isEmpty())\n\t\t\t{\n\t\t\t\tjumpMoves.add(possibleMove);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!jumpMoves.isEmpty())\n\t\t{\n\t\t\treturn jumpMoves;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn possibleMoves;\n\t\t}\n\t}", "private ArrayList<int[][]> possiblePuzzleMoves(int[][] currentPuzzle) {\n ArrayList<int [][]> possibleMoves = new ArrayList<>();\n //find zero\n int zeroRow = 0;\n int zeroCol = 0;\n for(int i = 0; i < currentPuzzle.length; i++) {\n for (int j = 0; j < currentPuzzle[i].length; j++) {\n if(currentPuzzle[i][j] == 0) {\n zeroRow = i;\n zeroCol = j;\n break;\n }\n }\n }\n\n //check if zero isn't in top row\n if(zeroRow > 0) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileAbove = newPuzzleConfig[zeroRow - 1][zeroCol];\n newPuzzleConfig[zeroRow - 1][zeroCol] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileAbove;\n possibleMoves.add(newPuzzleConfig);\n }\n\n //check if zero isn't in bottom row\n if(zeroRow < 2) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileBelow = newPuzzleConfig[zeroRow + 1][zeroCol];\n newPuzzleConfig[zeroRow + 1][zeroCol] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileBelow;\n possibleMoves.add(newPuzzleConfig);\n\n }\n\n //check if zero isn't in left col\n if(zeroCol > 0) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileToLeft = newPuzzleConfig[zeroRow][zeroCol-1];\n newPuzzleConfig[zeroRow][zeroCol-1] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileToLeft;\n possibleMoves.add(newPuzzleConfig);\n }\n\n //check if zero isn't in right col\n if(zeroCol < 2) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileToRight = newPuzzleConfig[zeroRow][zeroCol+1];\n newPuzzleConfig[zeroRow][zeroCol+1] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileToRight;\n possibleMoves.add(newPuzzleConfig);\n }\n return possibleMoves;\n }", "public int moves() {\n if (!isSolvable()) {\n return -1;\n } else {\n return minNode.getMove();\n }\n\n }", "private List<Coordinate> getAvailableMoves(ImmutableGameBoard gameBoard) {\n List<Coordinate> availableMoves = new ArrayList<Coordinate>();\n\n for (int x = 0; x < gameBoard.getWidth(); x++) {\n for (int y = 0; y < gameBoard.getHeight(); y++) {\n if(gameBoard.getSquare(x, y) == TicTacToeGame.EMPTY)\n availableMoves.add(new Coordinate(x, y));\n }\n }\n\n return availableMoves;\n }", "public LinkedList<Move> getPossibleMoves() {\n\t\tAIPossibleMoves.clear();\n\t\tint xOrigin = 0, yOrigin = 0, xMove1 = 0, xMove2 = 0, yMove1 = 0, yMove2 = 0;\n\t\tMove move = null;\t\n\t\t\tint type = 0;\n\t\t\tfor(Checker checker: model.whitePieces) {\n\t\t\t\t\n\t\t\t\txOrigin = checker.getCurrentXPosition();\n\t\t\t\tyOrigin = checker.getCurrentYPosition();\n\t\t\t\txMove1 = (checker.getCurrentXPosition() - 1);\n\t\t\t\txMove2 = (checker.getCurrentXPosition() + 1);\n\t\t\t\tyMove1 = (checker.getCurrentYPosition() - 1);\n\t\t\t\tyMove2 = (checker.getCurrentYPosition() + 1);\n\t\t\t\ttype = checker.getType();\n\t\t\t\tswitch(type) {\n\t\t\t\tcase 2:\n\n\t\t\t\t\tif((xMove1 < 0) || (yMove1 <0)) {\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove1, false, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove1)) {\n\t\t\t\t\t\t\t//System.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove1, false, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n \n\t\t\t\t\tif((xMove2 > 7) || (yMove1 < 0)) {\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove1, true, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove1)) {\n\t\t\t\t\t\t\t// System.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove1, true, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 4:\n\t\t\t\t\t//Moving up and left isMovingRight,IsMovingDown\n\t\t\t\t\tif((xMove1 <0) || (yMove1 < 0)) {\n\t\t\t\t\t\t//continue;\n\t\t\t\t\t} else {\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove1, false, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove1)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove1, false, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove2 > 7) || (yMove1 < 0)) {\n\t\t\t\t\t//continue;\n\t\t\t\t} else {\n\t\t\t\t\t//moving up and right\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove1, true, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove1)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove1, true, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove1 < 0) || (yMove2 > 7)) {\n\t\t\t\t//\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\t//moving down and left isMovingRight,IsMovingDown\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove2, false, true )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove2)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove2);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove2,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove2, false, true)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove2);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove2 > 7) || (yMove2 > 7)) {\n\t\t\t\t\t//continue;\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\t//moving down and right isMovingRight,IsMovingDown\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove2, true, true )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove2)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove2);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove2,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove2, true, true)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove2);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tbreak;\t\n\t\t\t\t}\t\n\t\t\t\n\t\t\t}\n\n\t\t\treturn AIPossibleMoves;\n\t\t\t\n\t\t}", "public void performMove() {\n\t\tfor (int x = 0; x <= size-1; x++)\n\t\t\tfor (int y = 0; y <= size-1; y++)\n\t\t\t\tlocalBoard[y][x] = 0;\n\t\t\n\t\t//reset the flag that indicates if a move has been found that decreases the heuristic\n\t\tfoundBetterMove = false;\n\t\t\n\t\t//fill in the appropriate heuristic values\n\t\tpopulateHillValues();\n\t\tArrayList<PotentialMove> myBestList = new ArrayList<PotentialMove>();\n\n\t\t//Find the square with the lowest heuristic value. this should really write the values to an array. \n\t\tint squareDifferential = -1;\n\t\t//String outValue = \"\";\n\t\tfor (int y = 0; y <= size-1; y++) {\n\t\t\tfor (int x = 0; x <= size-1; x++){\n\t\t\t\t//outValue = outValue + localBoard[y][x];\n\t\t\t\tif (squareDifferential < 0) //lowestSquareFound not found yet \n\t\t\t\t{\n\t\t\t\t\tif ((NQueens.queens[x] != y) && //set if the current square isn't already occupied by a queen\n\t\t\t\t\t\t\t(localBoard[NQueens.queens[x]][x] >= localBoard[y][x])) {\n\t\t\t\t\t\tif (localBoard[y][x] == localBoard[NQueens.queens[x]][x])\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) > squareDifferential) { // find the square with the largest differential in value from the queen in the column\n\t\t\t\t\tmyBestList.clear();\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t}\n\t\t\t\telse if (((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) == squareDifferential) && // the differential is equal to the current best differential\n\t\t\t\t\t\t(NQueens.queens[x] != y)) { // and isn't already occupied by a queen\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t}\n\t\t\t\t//else the square is higher, has a queen or isn't marginally better than the current queen's position in the row\n\t\t\t}\n\t\t\t//outValue = outValue + \"\\n\";\n\t\t}\n\t\t//JOptionPane.showMessageDialog(null, outValue);\n\t\t\n\t\tif (myBestList.isEmpty())\n\t\t\treturn;\n\t\t\n\t\tint listSize = myBestList.size();\n\t\tPotentialMove bestMove;\n\t\t\n\t\t//grab the non-Sideways moves first\n\t\tfor (int i = 0; i < listSize; i++) {\n\t\t\tif (!(myBestList.get(i).isSideways)) {\n\t\t\t\tbestMove = myBestList.get(i);\n\t\t\t\tfoundBetterMove = true;\n\t\t\t\tsidewaysMoves = 0;\n\t\t\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (sidewaysMoves > MAXSIDEWAYSMOVES) { // hit MAXSIDEWAYSMOVES consecutive sideways moves, mark as unsolvable\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//all available moves sideways moves, let's select one randomly\n\t\tRandom generator = new Random();\n\t\tint randomElement = generator.nextInt(listSize);\n\t\t\n\t\tbestMove = myBestList.get(randomElement);\n\t\tfoundBetterMove = true;\n\t\tsidewaysMoves++;\n\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t}", "public static boolean solve(int[][] board) {\nfor (int x=0; x<9; x++) {\n for (int y=0; y<9; y++) {\nif (board[x][y] == 0) {\n \n // Try each possibile value in this space\n // and see if the rest of the puzzle can be filled in.\n for (board[x][y]=1; board[x][y]<=9; board[x][y]++) {\n if (isLegal(board) && solve(board)) {\n return true;\n }\n }\n \n // There is no value that we can put in the first\n // empty space that was found, so the puzzle is\n // unsolvable given the values put in up to this\n // point.\n board[x][y] = 0;\n return false;\n}\n }\n}\n \n// There were no empty spaces to fill in, so the\n// puzzle must be solved.\nreturn true;\n }", "abstract public List<Move> getPossibleMoves();", "public int moves() {\n\n return initialSolvable ? solutionNode.numberOfMovesMade : -1;\n }", "public Solver(Board initial)\n {\n // validate input to Solver\n if (initial == null) throw new NullPointerException();\n if (!initial.isSolvable()) throw new IllegalArgumentException();\n \n // create first search node with pointer used for each iteration of A*\n step = new SearchNode();\n step.board = initial;\n \n // create new priority queue specifying the priority function\n MinPQ<SearchNode> pq = new MinPQ<SearchNode>(new HammingPriority());\n\n // run A-star search algorithm until goal board is dequeued\n while (!step.board.isGoal()) {\n // runs iterable of neighbors and adds non duplicates to pq\n Iterable<Board> neighbors = step.board.neighbors();\n for (Board b : neighbors) {\n // skips if possible board is duplicate of 2nd board back\n if (step.prev != null) // check not needed for first iteration\n if (b.equals(step.prev.board)) continue;\n \n // creates possible board's node and adds to pq\n SearchNode nextPossibleBoard = new SearchNode();\n nextPossibleBoard.board = b;\n nextPossibleBoard.prev = step;\n nextPossibleBoard.dist = step.dist + 1;\n pq.insert(nextPossibleBoard);\n }\n step = pq.delMin(); // dequeue next step toward goal board\n }\n \n moves = step.dist;\n goalNode = step;\n\n \n }", "public void getPossibleMoves() { \n\t\t\tsuper.getPossibleMoves();\n\t\t\tfor (int i = 0; i < Math.abs(xrange); i++) {\n\t\t\t\tif (currentx + xrange - ((int) Math.pow(-1,color)*i) >= 0) { \n\t\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + xrange - ((int) Math.pow(-1,color)*i) ][currenty]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( currentx - 1 >= 0 && currenty - 1 >= 0 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1].isOccupiedByOpponent()) {\t// Diagonol left space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1]);\n\t\t\t}\n\t\t\tif (currentx - 1 >= 0 && currenty + 1 <= 7 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1].isOccupiedByOpponent()) { \t//Diagonol right space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1]);\n\t\t\t}\n\t\t\t\n\t}", "public int moves() {\n \tif (!isSolvable) return -1;\n \treturn solutionNode.getMoves();\n }", "public Iterable<Board> solution() {\r\n return this.solution;\r\n }", "public void generateSolutionList() {\n // Will probably solve it in a few years\n while (!isSolved()) {\n RubiksMove move = RubiksMove.random();\n solutionMoves.add(move);\n performMove(move);\n }\n }", "ArrayList<int[]> findValidMoves();", "public int[] minimax(IBoard board,char playerSymbol){\n\n List<int[][]> array = evaluate(board);\n\n /*In that case I found max and min scores*/\n int max = 0;\n int min = 0;\n for (int[][] move:array){\n int current = evaluateLine(board,move,playerSymbol);\n int oppcurrent = evaluateLineforOpp(board,move,playerSymbol);\n\n if (max < current){\n max = current;\n }\n\n if (min < oppcurrent){\n min = oppcurrent;\n }\n }\n\n for (int[][] move:array){\n int current = evaluateLine(board,move,playerSymbol);\n int oppcurrent = evaluateLineforOpp(board,move,playerSymbol);\n\n /*Here I check end score(bestscore)*/\n int end = 0;\n if(Math.abs(min) >= max){\n end = min;\n }else{\n end = max;\n }\n\n /*Here I return next place on table*/\n if (end == current) {\n for (int[] m : move) {\n char place = board.getTileSymbol(m[0], m[1]);\n if (place == '.') {\n return new int[]{m[0], m[1]};\n }\n }\n }else if(end == oppcurrent){\n for (int[] m : move) {\n char place = board.getTileSymbol(m[0], m[1]);\n if (place == '.') {\n return new int[]{m[0], m[1]};\n }\n }\n }\n\n }\n\n throw new RuntimeException(\"I don't know where to play!\");\n }", "public int[] getAllPossibleMoves(boolean ignore) {\n int[] validMoves;\n int[] validMovesResized;\n int validMovesIndex = 0;\n int startRow = this.getRow();\n int startCol = this.getCol();\n \n validMoves = new int[28]; // For a bishop, there are a maximum of 14 possible squares it could move to\n\n // First move from the bishops spot up diagonally to the right (ie col++, row++)\n for (int i = startCol+1, j = startRow+1; i<=8 && j<8; i++,j++) {\n validMoves[validMovesIndex] = i; // the col\n validMoves[validMovesIndex + 1] = j; // the row\n validMovesIndex = validMovesIndex + 2;\n }\n\n // Next move from the bishops start spot down diagonally to the right (ie col++, row--)\n for (int i = startCol+1, j = startRow-1; i<=8 && j>0; i++,j--) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n\n // Next move from the bishops start spot down diagonally to the left (ie col--, row--)\n for (int i = startCol-1, j = startRow-1; i>0 && j>0; i--,j--) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n // Next move from the bishops start spot up diagonally to the left (ie col--, row++)\n for (int i = startCol-1, j = startRow+1; i>0 && j<=8; i--,j++) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n \n // depending on the position of the bishop, the final array of possible moves may not have 14 squares\n // although that is the maximum. Create a new array of the actual size and copy into it.\n validMovesResized = Arrays.copyOf(validMoves, validMovesIndex);\n return validMovesResized;\n }", "private List<Integer> findMinNodes() {\n\t\tint minLabel = Integer.MAX_VALUE;\n\t\tList<Integer> result = new ArrayList<Integer>();\n\n\t\tfor (int node = 0; node < vertices.length; node++) {\n\t\t\tint nodeLabel = connectivity[node][node];\n\t\t\tif (nodeLabel < minLabel) {\n\t\t\t\tresult.clear();\n\t\t\t\tresult.add(node);\n\t\t\t\tminLabel = nodeLabel;\n\t\t\t} else if (nodeLabel == minLabel) {\n\t\t\t\tresult.add(node);\n\t\t\t} else\n\t\t\t\tcontinue;\n\t\t}\n\t\treturn result;\n\t}", "public Set<Square> validDestinations(Board b);", "public List<Configuration> solve(){\n int group = 0;\n for(List<Configuration> set : input){\n minimize(set);\n\n for(Configuration root : set) {\n root.setGroup(group);\n }\n group++;\n\n }\n\n // Step 2: Preprocess\n sortBySize(input);\n\n // Step 5: Initialize set of partial solutions\n List<Configuration> partialSolutions;\n if(input.size()==0){\n return null;\n }\n else {\n partialSolutions = input.get(0);\n input.remove(partialSolutions);\n }\n\n // Step 6: The compositional computations\n for(List<Configuration> set : input) {\n filter(partialSolutions, setCutoff);\n filter(set, setCutoff);\n partialSolutions = combine(partialSolutions, set, constraints);\n }\n\n // Step 7: Postprocessing\n //greedyPostProcessing(partialSolutions);\n\n return partialSolutions;\n }", "public int moves() {\n\t\tif (!isSolvable())\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn result.size() - 1;\n\t}", "public static int minJumps(int[] arr) {\n Map<Integer, List<Integer>> map = new HashMap<>();\n int n = arr.length;\n int step = 0;\n\n for (int i = 0; i < n; i++) {\n if (!map.containsKey(arr[i])) {\n map.put(arr[i], new ArrayList<>());\n }\n\n map.get(arr[i]).add(i);\n }\n\n Queue<Integer> queue = new LinkedList<>();\n boolean[] visited = new boolean[n];\n queue.offer(0);\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n for (int i = 0; i < size; i++) {\n int pos = queue.poll();\n\n if (pos == n - 1) {\n return step;\n }\n\n if (pos - 1 >= 0 && !visited[pos - 1]) {\n queue.offer(pos - 1);\n visited[pos - 1] = true;\n }\n\n if (pos + 1 < n && !visited[pos + 1]) {\n queue.offer(pos + 1);\n visited[pos + 1] = true;\n }\n\n for (int next: map.get(arr[pos])) {\n if (!visited[next]) {\n queue.offer(next);\n }\n }\n\n // 优化,对于 [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,11] 避免重复将7加入queue\n map.get(arr[pos]).clear();\n }\n step++;\n }\n\n return 0;\n }", "private static int minimum() {\n\t\tint popSize = 0;\n\t\tChromosome thisChromo = null;\n\t\tChromosome thatChromo = null;\n\t\tint winner = 0;\n\t\tboolean foundNewWinner = false;\n\t\tboolean done = false;\n\n\t\twhile (!done) {\n\t\t\tfoundNewWinner = false;\n\t\t\tpopSize = population.size();\n\t\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\t\tif (i != winner) { // Avoid self-comparison.\n\t\t\t\t\tthisChromo = population.get(i);\n\t\t\t\t\tthatChromo = population.get(winner);\n\t\t\t\t\tif (thisChromo.conflicts() < thatChromo.conflicts()) {\n\t\t\t\t\t\twinner = i;\n\t\t\t\t\t\tfoundNewWinner = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (foundNewWinner == false) {\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\t\treturn winner;\n\t}", "public List<Grid> getPossibleMoves(Grid g){\n\t\tint i=g.row, j=g.col;\n\t\tif(i>=0 && i<data.length && j>=0 && j<data[i].length){\n\t\t\tList<Grid> list=new ArrayList<>();\n\t\t\tif(isFree(i, j-1)) list.add(new Grid(i,j-1));\n\t\t\tif(isFree(i-1, j-1)) list.add(new Grid(i-1,j-1));\n\t\t\tif(isFree(i-1, j)) list.add(new Grid(i-1,j));\n\t\t\tif(isFree(i-1, j+1)) list.add(new Grid(i-1,j+1));\n\t\t\tif(isFree(i, j+1)) list.add(new Grid(i,j+1));\n\t\t\tif(isFree(i+1, j+1)) list.add(new Grid(i+1,j+1));\n\t\t\tif(isFree(i+1, j)) list.add(new Grid(i+1,j));\n\t\t\tif(isFree(i+1, j-1)) list.add(new Grid(i+1,j-1));\n\t\t\treturn list;\n\t\t}\n\t\treturn null;\n\t}", "public List<Integer> getLegalMoves()\n\t{\n\t\tArrayList<Integer> moves = new ArrayList<Integer>();\n\t\tfor (int col = 0; col < cols; col++)\n\t\t{\n\t\t\tif (isEmpty(0,col))\n\t\t\t\tmoves.add(col);\n\t\t}\n\t\treturn moves;\n\t}", "public static int applyMinMax(int d, BoardModel model, boolean maximizingTeam, int alpha, int beta, boolean whiteTeam, int startDepth) {\n //base case, figure out determinaion of game over\n\n // printMap(model);\n // System.out.println(\"Depth: \"+d);\n \n\n //allPossibleMoves moveTree = new allPossibleMoves();\n int[] currentQueen;\n ArrayList<int[]> whiteQueens = new ArrayList<>();\n ArrayList<int[]> blackQueens = new ArrayList<>();\n ArrayList<int[]> myQueens = new ArrayList<>();\n // possibleMove bestestMove = null;\n\n// for (int count = 0; count < model.queenPositions.size(); count++) {\n// if (model.getTile(model.queenPositions.get(count)).equals(POS_MARKED_BLACK)) {\n// blackQueens.add(model.queenPositions.get(count));\n// // System.out.println(\"Black: \"+model.getTile(model.queenPositions.get(count)));\n// } else {\n// whiteQueens.add(model.queenPositions.get(count));\n// // System.out.println(\"White: \"+model.getTile(model.queenPositions.get(count)));\n// }\n// }\n//set black and white queens \n for (int jam = 0; jam < 10; jam++) {\n for (int pb = 0; pb < 10; pb++) {\n if (model.getTile(new int[]{jam, pb}).equals(POS_MARKED_WHITE)) {\n whiteQueens.add(new int[]{jam, pb});\n }\n if (model.getTile(new int[]{jam, pb}).equals(POS_MARKED_BLACK)) {\n blackQueens.add(new int[]{jam, pb});\n }\n }\n }\n if (maximizingTeam){\n if (whiteTeam){\n myQueens = whiteQueens;\n }\n else{\n myQueens = blackQueens;\n }\n }\n if (!maximizingTeam){\n if (whiteTeam){\n myQueens = blackQueens;\n }\n else{\n myQueens = whiteQueens;\n }\n }\n \n if (d == 0 || findAllMoves(model,myQueens).isEmpty() ) {\n return baseCase(model, whiteTeam);\n }\n\n // System.out.println(\"White Queens identified as: \" + whiteQueens.get(0)[0] + \"\" + whiteQueens.get(0)[1] + \" \" + whiteQueens.get(1)[0] + whiteQueens.get(1)[1] + \" \" + whiteQueens.get(2)[0] + whiteQueens.get(2)[1] + \" \" + whiteQueens.get(3)[0] + whiteQueens.get(3)[1]);\n //if (whiteTeam) {\n // myQueens = whiteQueens;\n //} else {\n // myQueens = blackQueens;\n // }\n // perform a check to see which side we are on. \n // System.out.println(\"Status: \"+maximizingTeam);\n if (maximizingTeam) {\n // System.out.println(\"Maximizing turn\");\n if (whiteTeam) {\n myQueens = whiteQueens;\n } else {\n myQueens = blackQueens;\n }\n\n int maxEval = -1000000;\n // considering this move was played. \n\n // printMap(model);\n // System.out.println();\n //find all children from this state\n ArrayList<ArrayList<int[]>> children = findAllMoves(model, myQueens);\n if (children.size() == 0){\n return baseCase(model, whiteTeam);\n }\n if(children.size()==0 && d == startDepth){\n System.out.println(\"We Lost :( \");\n }\n // printMap(model);\n // System.out.println();\n for (int i = 0; i < children.size(); i++) {\n\n String m1 = stringMap(model);\n\n BoardModel recursionModel = new BoardModel(10);\n\n for (int jam = 0; jam < 10; jam++) {\n for (int pb = 0; pb < 10; pb++) {\n recursionModel.setTile(new int[]{jam, pb}, model.getTile(new int[]{jam, pb}));\n }\n }\n recursionModel.queenPositions = new ArrayList<>();\n for (int x = 0; x < model.queenPositions.size(); x++) {\n recursionModel.queenPositions.add(model.queenPositions.get(x));\n }\n\n // printMap(recursionModel);\n recursionModel.moveQueen(children.get(i).get(0), children.get(i).get(1));\n recursionModel.setTile(children.get(i).get(2), POS_MARKED_ARROW);\n // System.out.println(\"max recursive call\");\n int childVal = applyMinMax(d - 1, recursionModel, false, alpha, beta, whiteTeam, startDepth);\n recursionModel.moveQueen(children.get(i).get(1), children.get(i).get(0));\n recursionModel.setTile(children.get(i).get(2), POS_AVAILABLE);\n\n String m2 = stringMap(model);\n // System.out.println(\"Check board Validity Max: \"+m1.equals(m2));\n\n maxEval = max(maxEval, childVal);\n if (d == startDepth) {\n ArrayList<int[]> blah = new ArrayList<int[]>();\n blah.add(children.get(i).get(0));\n blah.add(children.get(i).get(1));\n blah.add(children.get(i).get(2));\n blah.add(new int[]{childVal});\n maxMinMoves.add(blah);\n }\n alpha = max(maxEval, alpha);\n // System.out.println(\"A: \"+alpha);\n if (alpha >= beta) {\n break;\n }\n }\n return maxEval;\n\n } else {\n // System.out.println(\"Minimizing turn\");\n if (!whiteTeam) {\n myQueens = whiteQueens;\n } else {\n myQueens = blackQueens;\n }\n\n int maxEval = 1000000;\n // considering this move was played. \n\n // printMap(model);\n // System.out.println();\n //find all children from this state\n ArrayList<ArrayList<int[]>> children = findAllMoves(model, myQueens);\n if (children.size() == 0){\n return baseCase(model, whiteTeam);\n }\n if(children.size()==0 && d == startDepth){\n System.out.println(\"We Lost :( \");\n }\n // printMap(model);\n // System.out.println();\n for (int i = 0; i < children.size(); i++) {\n\n String m1 = stringMap(model);\n\n BoardModel recursionModel = new BoardModel(10);\n\n for (int jam = 0; jam < 10; jam++) {\n for (int pb = 0; pb < 10; pb++) {\n recursionModel.setTile(new int[]{jam, pb}, model.getTile(new int[]{jam, pb}));\n }\n }\n recursionModel.queenPositions = new ArrayList<>();\n for (int x = 0; x < model.queenPositions.size(); x++) {\n recursionModel.queenPositions.add(model.queenPositions.get(x));\n }\n\n // printMap(recursionModel);\n recursionModel.moveQueen(children.get(i).get(0), children.get(i).get(1));\n recursionModel.setTile(children.get(i).get(2), POS_MARKED_ARROW);\n // System.out.println(\"min recursive call\");\n int childVal = applyMinMax(d - 1, recursionModel, true, alpha, beta, whiteTeam, startDepth);\n recursionModel.moveQueen(children.get(i).get(1), children.get(i).get(0));\n recursionModel.setTile(children.get(i).get(2), POS_AVAILABLE);\n\n String m2 = stringMap(model);\n // System.out.println(\"Check board Validity Max: \"+m1.equals(m2));\n\n maxEval = min(maxEval, childVal);\n if (d == startDepth) {\n ArrayList<int[]> blah = new ArrayList<int[]>();\n blah.add(children.get(i).get(0));\n blah.add(children.get(i).get(1));\n blah.add(children.get(i).get(2));\n blah.add(new int[]{childVal});\n maxMinMoves.add(blah);\n }\n beta = min(maxEval, alpha);\n // System.out.println(\"A: \"+alpha);\n if (alpha >= beta) {\n break;\n }\n }\n return maxEval;\n }\n\n }", "static int minJumps(int[] arr){\n int n = arr.length;\n int[] dp = new int[n];\n for(int i = 0; i < n; i++) dp[i] = Integer.MAX_VALUE;\n dp[0] = 0;\n for(int i = 1; i < n; i++){\n //checking from 0 to index i that if there is a shorter path for \n //current position to reach from any of the previous indexes\n //also previous index should not be MAX_VALUE as this will show that\n //we were not able to reach this particular index\n for(int j = 0; j < i; j++){\n if(dp[j] != Integer.MAX_VALUE && arr[j] + j >= i){\n if(dp[j] + 1 < dp[i]){\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n \n if(dp[n - 1] != Integer.MAX_VALUE){\n return dp[n - 1];\n }\n \n return -1;\n }", "public Solver(Board initial) {\n MinPQ<Node> minPQ = new MinPQ<>();\n\n if (initial == null) {\n throw new java.lang.IllegalArgumentException(\"Null content is not allowed.\");\n }\n //minNode = new Node(initial, null);\n inNode = new Node(initial, null);\n Node inNodetwin = new Node(initial.twin(), null);\n minPQ.insert(inNode);\n minPQ.insert(inNodetwin);\n\n minNode = minPQ.delMin();\n while (!minNode.getBoard().isGoal()) {\n for (Board board : minNode.getBoard().neighbors()) {\n if (minNode.getPrevious() == null) {\n minPQ.insert(new Node(board, minNode));\n } else if (!minNode.getPrevious().getBoard().equals(board)) {\n minPQ.insert(new Node(board, minNode));\n }\n\n }\n\n minNode = minPQ.delMin();\n }\n\n }", "public int shortestPathBinaryMatrix(int[][] grid) {\n if (grid[0][0] != 0) { return -1; }\n\n int n = grid.length;\n boolean[][] visited = new boolean[n][n];\n visited[0][0] = true;\n Queue<int[]> queue = new LinkedList<>();\n queue.offer(new int[2]);\n for (int res = 1; !queue.isEmpty(); res++) {\n for (int i = queue.size(); i > 0; i--) {\n int[] cur = queue.poll();\n int x = cur[0];\n int y = cur[1];\n if (x == n - 1 && y == n - 1) { return res; }\n\n for (int[] move : MOVES) {\n int nx = x + move[0];\n int ny = y + move[1];\n if (nx >= 0 && nx < n && ny >= 0 && ny < n && !visited[nx][ny]\n && grid[nx][ny] == 0) {\n visited[nx][ny] = true;\n queue.offer(new int[] {nx, ny});\n }\n }\n }\n }\n return -1;\n }", "ArrayList<ArrayList<Integer>> solveSoduku(ArrayList<ArrayList<Integer>> board) {\n solvePartialSodoku(0,0, board);\n return board;\n }", "public boolean isSolvable()\n {\n return moves() >= 0;\n }", "private ArrayList<Move> generatePossibleMovesFor(Player player) {\n ArrayList<Point> selfStonePlacements = new ArrayList<>();\n ArrayList<Point> opponentStonePlacements = new ArrayList<>();\n for (int x = 0; x < field.length; x++)\n for (int y = 0; y < field[x].length; y++) {\n if (field[x][y] == null)\n continue;\n if (field[x][y] == this.color)\n selfStonePlacements.add(new FieldPoint(x, y));\n if (field[x][y] == opponent.getColor())\n opponentStonePlacements.add(new FieldPoint(x, y));\n }\n\n ArrayList<Move> possibleMoves = new ArrayList<>();\n\n // Check if player is in set phase or only has three stones left\n if (!player.isDoneSetting()) {\n // Every free field is a possible move\n for (Point point : pointsOfMovement) {\n if (opponentStonePlacements.contains(point) || selfStonePlacements.contains(point))\n continue;\n possibleMoves.add(new StoneMove(null, point));\n }\n } else if (player.isDoneSetting() && getCountOfStonesFor(player) > 3) {\n // Move is only possible if the neighbour field of a stone is free\n for (Point point : player == opponent ? opponentStonePlacements : selfStonePlacements) {\n for (Point neighbour : neighbourPoints.get(point)) {\n if (opponentStonePlacements.contains(neighbour) || selfStonePlacements.contains(neighbour))\n continue;\n possibleMoves.add(new StoneMove(point, neighbour));\n }\n }\n } else {\n for (Point point : player == opponent ? opponentStonePlacements : selfStonePlacements) {\n for (Point another : pointsOfMovement) {\n if (opponentStonePlacements.contains(point) || selfStonePlacements.contains(point))\n continue;\n possibleMoves.add(new StoneMove(point, another));\n }\n }\n }\n\n Collections.shuffle(possibleMoves);\n return possibleMoves;\n }", "public Solver(Board initial) {\n\t\tgoal = null;\n\t\tminpq = new MinPQ<Solver.SearchNode>();\n\t\tminpqTwin = new MinPQ<SearchNode>();\n\t\tcheck = new HashMap<String, Integer>();\n\t\tcheckTwin = new HashMap<String, Integer>();\n\t\t\n\t\tminpq.insert(new SearchNode(initial, null));\n\t\tminpqTwin.insert(new SearchNode(initial.twin(), null));\n\t\t\n\t\tcheck.put(initial.toString(), 1);\n\t\tcheckTwin.put(initial.twin().toString(), 1);\n\t\t\n\t\t//StdOut.println(\"Hamming =\" + initial.hamming());\n\t\t//StdOut.println(\"Manhattan =\" + initial.manhattan());\n\t\t//StdOut.println(\"Original:\\n\" + initial.toString());\n\t\t//StdOut.println(\"Twin:\\n\" + initial.twin().toString());\n\t\t\n\t\tSearchNode minNode = minpq.delMin();\n\t\tSearchNode minNodeTwin = minpqTwin.delMin();\n\t\t\n\t\twhile (true) {\n\t\t\t\n\t\t\tif (minNode.getBoard().isGoal()) {\n\t\t\t\tgoal = minNode;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (minNodeTwin.getBoard().isGoal()) {\n\t\t\t\tgoal = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tpushNodes(minNode, minpq, check);\n\t\t\tpushNodes(minNodeTwin, minpqTwin, checkTwin);\n\t\t\t\n\t\t\tminNode = minpq.delMin();\n\t\t\tminNodeTwin = minpqTwin.delMin();\n\t\t}\n\t}", "private String[][] buildSmallBoard(String board[][]) {\n\t\tint maxI = 0;\n\t\tint maxJ = 0;\n\n\t\tint minI = boardSize - 1;\n\t\tint minJ = boardSize - 1;\n\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tif (board[i][j] == \"X\" || board[i][j] == \"O\") {\n\t\t\t\t\tif (minI > i) {\n\t\t\t\t\t\tminI = i;\n\t\t\t\t\t}\n\t\t\t\t\tif (minJ > j) {\n\t\t\t\t\t\tminJ = j;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (maxI < i) {\n\t\t\t\t\t\tmaxI = i;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxJ < j) {\n\t\t\t\t\t\tmaxJ = j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tString[][] smallBoard = new String[boardSize][boardSize];\n\n\t\tint x = 1;\n\t\tif (minI >= x)\n\t\t\tminI -= x;\n\t\telse\n\t\t\tminI = 0;\n\t\tif (minJ >= x)\n\t\t\tminJ -= x;\n\t\telse\n\t\t\tminJ = 0;\n\n\t\tif (maxI < boardSize - 1)\n\t\t\tmaxI += x;\n\t\telse\n\t\t\tmaxI = boardSize - 1;\n\t\tif (maxJ < boardSize - 1)\n\t\t\tmaxJ += x;\n\t\telse\n\t\t\tmaxJ = boardSize - 1;\n\n\t\tstartI = minI;\n\t\tstartJ = minJ;\n\n\t\tendI = maxI + 1;\n\t\tendJ = maxJ + 1;\n\n\t\tfor (int i = minI; i <= maxI; i++) {\n\t\t\tfor (int j = minJ; j <= maxJ; j++) {\n\t\t\t\tsmallBoard[i][j] = board[i][j];\n\t\t\t}\n\t\t}\n\n\t\treturn smallBoard;\n\n\t}", "public int moves() {\n if (isSolvable())\n return _moves;\n else\n return -1;\n }", "private Cell[] allPossibleMoves(Cell source) {\n\t\tCell[] moves = new Cell[2 * Board.BOARD_SIZE - 2]; // Вертикаль и горизонталь, которые бьет ладья\n\t\tint columnIndex = source.getColumn();\n\t\tint rowIndex = source.getRow();\n\t\tint k = 0;\n\t\tfor (int i = 0; i < Board.BOARD_SIZE; i++) {\n\t\t\tif (i != rowIndex) {\n\t\t\t\tmoves[k++] = new Cell(columnIndex, i);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < Board.BOARD_SIZE; i++) {\n\t\t\tif (i != columnIndex) {\n\t\t\t\tmoves[k++] = new Cell(i, rowIndex);\n\t\t\t}\n\t\t}\n\t\treturn moves;\n\t}", "void findSoloAvailMoves(int x, int y) {\n\t\tint counter;\n\t\tint toInsert = 0;\n\t\tfor(int i = 0; i < boardSize; i++) {\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tcounter = 0;\n\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\tif (availMoves[i][j][k] == true) {\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\ttoInsert = k + 1;\n\t\t\t\t\t\tif (counter > 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(counter == 1) {\n\t\t\t\t\tinsertNumber(i, j, toInsert);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "static int[][] solvePuzzle(int[] clues) {\n\n //System.out.println(\"clues = [\" + Arrays.toString(clues) + \"]\");\n\n if (clues.length < MAX_HEIGHT * MAX_HEIGHT)\n throw new RuntimeException();\n\n //list of pairs: clue + cell indices that clue concerns\n List<ClueWithCellIndices> cluesWithCellIndices = matchCluesWithCellIndices(clues);\n\n //if there are no clues > 0\n if (cluesWithCellIndices.size() == 0)\n throw new RuntimeException();\n\n //sort list from greater clue to less one\n cluesWithCellIndices.sort(new Comparator<ClueWithCellIndices>() {\n @Override\n public int compare(ClueWithCellIndices o1, ClueWithCellIndices o2) {\n return (((Integer) o2.getClue()).compareTo((Integer) o1.getClue()));\n }\n });\n\n //initialize new board to put skyscrapers on it\n Board board = new Board(MAX_HEIGHT);\n //try populate the board with skyscrapers based on clues\n Optional<Board> result = calculateBoardForClues(board, cluesWithCellIndices, 0);\n\n if(!result.isPresent())\n return null; //could not solve the puzzle\n\n //check if any uninitialized cells left\n board = result.get();\n if(!board.allCellsInitialized()) {\n //initialize them\n result = calculateBlocksForCellsWithoutClues(board, 0);\n if (!result.isPresent())\n return null; //could not solve the puzzle\n board = result.get();\n }\n\n //all cells have a skyscraper\n //return complete board of skyscrapers\n return board.getBoard();\n }", "public List<BoardPos> getMoves(BoardPos from) {\n List<BoardPos> result;\n\n // strike check\n if (board.get(from).isCrown())\n result = getStrikesCrown(from);\n else result = getStrikes(from);\n\n // regular moves\n final int[] shifts = {-1, 1};\n if (result.isEmpty() && !board.get(from).isEmpty()) {\n if (board.get(from).isCrown())\n for (int shiftX : shifts)\n for (int shiftY : shifts) {\n BoardPos to = from.add(shiftX, shiftY);\n while (to.inBounds(board.side()) && board.get(to).isEmpty()) {\n result.add(to);\n to = to.add(shiftX, shiftY);\n }\n }\n else for (int shift : shifts) { // add adjacent empty positions\n BoardPos move = from.add(new BoardPos(shift,\n board.get(from).color() ? 1 : -1));\n if (board.get(move) != null && board.get(move).isEmpty())\n result.add(new BoardPos(move));\n } }\n\n // complete by adding the start position to every legal route, so that\n // it will be cleared as well when the player will move\n for (BoardPos pos : result)\n pos.addToRoute(new BoardPos(from));\n\n return result;\n }", "@Override\n public ArrayList<AState> getAllPossibleStates(AState state){\n MazeState s = (MazeState)state;\n ArrayList<AState> moves = new ArrayList<AState> ();\n\n\n int row = s.getState().getRowIndex();\n int col = s.getState().getColumnIndex();\n int [][] matrix = mySearchableMaze.getMazeMatrix();\n\n\n if(row+1 < matrix.length){\n if( matrix[row+1][col]==0 ){\n moves.add(new MazeState(new Position(row+1,col),false,s.getCost()+1));\n\n }\n }\n if(row-1 >= 0 ){\n if( matrix[row-1][col]==0){\n moves.add(new MazeState(new Position(row-1,col),false,s.getCost()+1));\n\n }\n }\n if(col+1 < matrix[0].length ){\n if( matrix[row][col+1]==0 ){\n moves.add(new MazeState(new Position(row,col+1),false,s.getCost()+1));\n\n }\n }\n if(col-1 >= 0 ){\n if( matrix[row][col-1]==0 ){\n moves.add(new MazeState(new Position(row,col-1),false,s.getCost()+1));\n }\n }\n return moves;\n }", "void generateBoard(){\r\n rearrangeSolution();\r\n makeInitial();\r\n }", "private static List<Move> pathSolve(Level level){\n\t\tOptimisticMap optMap = new OptimisticMap(level);\n\t\t\n\t\tPoint dst = level.getExitPos();\n\t\t\n\t\t// Open nodes\n\t\tSortedMap<Integer, List<SolveNode>> nodes = new TreeMap<Integer, List<SolveNode>>();\n\t\t\n\t\t// Current costs to arrive to solve nodes\n\t\tint[][][] arrived = new int[level.getMapSize().x][level.getMapSize().y][Move.values().length];\n\t\tfor ( int x = 0 ; x < level.getMapSize().x ; x++ ){\n\t\t\tfor ( int y = 0 ; y < level.getMapSize().y ; y++ ){\n\t\t\t\tfor ( int d = 0 ; d < Move.values().length ; d++ ){\n\t\t\t\t\tarrived[x][y][d] = Integer.MAX_VALUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Create initial nodes\n\t\t{\n\t\t\tPoint box = level.getBoxPos();\n\t\t\tPoint player = level.getPlayerPos();\n\t\t\tfor ( Move dir : Move.values()){\n\t\t\t\tPoint playerDst = dir.nextPosition(box);\n\t\t\t\tif ( level.isClearSafe(playerDst.x, playerDst.y)){\n\t\t\t\t\tList<Move> pathNoDesiredPlayerPosition = pathTo(level, player, box, playerDst);\n\t\t\t\t\tif ( pathNoDesiredPlayerPosition != null ){\n\t\t\t\t\t\tSolveNode node = new SolveNode();\n\t\t\t\t\t\tnode.moves = pathNoDesiredPlayerPosition;\n\t\t\t\t\t\tnode.box = (Point)box.clone();\n\t\t\t\t\t\tnode.playerDir = dir;\n\t\t\t\t\t\taddSolveNode(nodes, node, node.moves.size() + optMap.getValue(node.box.x, node.box.y));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\twhile ( nodes.isEmpty() == false ){\n\t\t\t// Get node to process\n\t\t\tSolveNode node = removeSolveNode(nodes);\n\t\t\tif ( node.box.equals(dst) ){\n\t\t\t\t// This is the best solution\n\t\t\t\treturn node.moves;\n\t\t\t}\n\t\t\t\n\t\t\t// Create new nodes trying to move the box in each direction\n\t\t\tfor ( Move dir : Move.values() ){\n\t\t\t\tSolveNode newNode = new SolveNode();\n\t\t\t\tnewNode.box = dir.nextPosition(node.box);\n\t\t\t\tnewNode.playerDir = dir.opposite();\n\t\t\t\t\n\t\t\t\t// First check if the box can be moved to that position (is clear)\n\t\t\t\tif ( level.isClearSafe(newNode.box.x, newNode.box.y) == false ){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Check if the player can move to the pushing position\n\t\t\t\tPoint player = node.playerDir.nextPosition(node.box);\n\t\t\t\tPoint playerDst = dir.opposite().nextPosition(node.box);\n\t\t\t\tList<Move> playerMoves = pathTo(level, player, node.box, playerDst);\n\t\t\t\tif ( playerMoves == null ){\n\t\t\t\t\t// The player can't move itself to the pushing position\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Check if the cost to arrive to the new node is less that the previous known\n\t\t\t\tif ( node.moves.size() + playerMoves.size() + 1 >= arrived[newNode.box.x][newNode.box.y][dir.index()] ){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\" + newNode.box.x + \" \" + newNode.box.y);\n\t\t\t\t\n\t\t\t\t// Add the new node to the open nodes\n\t\t\t\tnewNode.moves.addAll(node.moves);\n\t\t\t\tnewNode.moves.addAll(playerMoves);\n\t\t\t\tnewNode.moves.add(dir);\n\t\t\t\taddSolveNode(nodes, newNode, newNode.moves.size() + optMap.getValue(newNode.box.x, newNode.box.y));\n\t\t\t\tarrived[newNode.box.x][newNode.box.y][dir.index()] = newNode.moves.size();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// There is no solution\n\t\treturn null;\n\t}", "public PossibleMove[] getPossibleMoves(Coordinate from);", "public ArrayList<Coordinate> possibleTiles(Coordinate start) {\n\t\t\tHashMap<Coordinate, MapTile> wallMap = World.getMap();\n\t\t\tLinkedList<Coordinate> queue = new LinkedList<Coordinate>();\n\t\t\tArrayList<Coordinate> visited = new ArrayList<Coordinate>();\n\t\t\tqueue.add(start);\n\t\t\twhile (!queue.isEmpty()) {\n\t\t\t\tCoordinate temp = queue.poll();\n\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\tCoordinate next = new Coordinate(temp.toString());\n\t\t\t\t\tswitch(i) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tnext.y--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tnext.x++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tnext.y++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tnext.x--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (!visited.contains(next) && !wallMap.get(next).isType(MapTile.Type.WALL)) {\n\t\t\t\t\t\tqueue.add(next);\n\t\t\t\t\t\tvisited.add(next);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn visited;\n\t\t}", "public Solver(Board initial) {\n\t\tif (initial == null)\n\t\t\tthrow new NullPointerException();\n\t\torig = new MinPQ<>();\n\t\ttwin = new MinPQ<>();\n\t\torig.insert(new Node(initial, 0, null));\n\t\ttwin.insert(new Node(initial.twin(), 0, null));\n\t\twhile (!solved) {\n\t\t\tgoForSolution(orig);\n\t\t\tgoForSolution(twin);\n\t\t}\n\t}", "public PossibleMoves getPossibleMoves(State state){\n if(possibleMoves == null){\n possibleMoves = new PossibleMoves(state);\n }\n return possibleMoves;\n }", "public List<BoardPos> longestAvailableMoves(int minDepth, boolean color) {\n List<BoardPos> result = new ArrayList<>();\n\n for (int i = 0; i < board.side(); i++)\n for (int j = 0; j < board.side(); j++)\n if (!board.get(i, j).isEmpty() &&\n board.get(i, j).color() == color) {\n List<BoardPos> _legalPos = getMoves(new BoardPos(i, j));\n // some moves are available from the current position...\n if (!_legalPos.isEmpty()) {\n // ...with routes longer then the last longest...\n if (_legalPos.get(0).routeLen() > minDepth) {\n // contains positions with routes shorter than new\n // longest, so clear it\n result.clear();\n // update last longest route length\n minDepth = _legalPos.get(0).routeLen();\n }\n // ...and equal to the last longest\n if (_legalPos.get(0).routeLen() == minDepth)\n result.add(new BoardPos(i, j));\n }\n }\n\n return result;\n }", "public static int minCostClimbingStairs(int[] cost) {\n int n=cost.length;\n int[] dp =new int[n+1];\n dp[0]=0;\n dp[1]=0;\n for(int i=2;i<=n;i++)\n dp[i]=Math.min(dp[i-2]+cost[i-2],dp[i-1]+cost[i-1]);\n\n return dp[n];\n\n }", "public int moves() {\n return solution.size() - 1;\n }", "@Test\n public void testThatCorrectMovesAreFound() {\n Solver solver = new Solver();\n PuzzleState state = new PuzzleState(Arrays.asList(CANNIBAL, CANNIBAL),\n Arrays.asList(MISSIONARY, MISSIONARY, CANNIBAL, MISSIONARY), PuzzleState.Position.LEFT_BANK);\n\n // get available moves\n List<Move> moves = solver.getAvailableMoves(state);\n\n Move expectedMove = new Move(Move.Direction.LEFT_TO_RIGHT, Arrays.asList(CANNIBAL, CANNIBAL));\n assertEquals(\"Only two moves should be available!\", 2, moves.size());\n assertTrue(\"List of moves doesn't contain exptected move!\", moves.contains(expectedMove));\n }", "public abstract ArrayList<Move> possibleMoves(Board board);", "public int moves() {\r\n if (!isSolvable) return -1;\r\n return goal.previousMoves;\r\n }", "public static int findMinMoves(int[] machines) {\n int sum = Arrays.stream(machines).sum();\n if (sum % machines.length > 0) {\n return -1;\n }\n\n int target = sum / machines.length;\n int steps = 0, gap = 0;\n\n for (int m : machines) {\n gap += m - target;\n steps = Math.max(steps, Math.max(Math.abs(gap), m - target));\n }\n return steps;\n }", "@Override\n public ArrayList<xMCTSStringGameState> getPossibleMoves(xMCTSStringGameState gameState)\n {\n\t ArrayList<xMCTSStringGameState> posMoves = new ArrayList<xMCTSStringGameState>();\n\t if (gameStatus(gameState) == xMCTSGame.status.ONGOING) {\n\t \t String activeCard = gameState.toString().substring(gameState.toString().length() - 2, gameState.toString().length());\n\t \t int gridSize = SIZE*2;\n\t for (int i = 0; i < gridSize; i += 2) {\n\t for (int j = 0; j < gridSize; j += 2) {\n\t int pos = i * SIZE + j;\n\t if (gameState.toString().charAt(pos) == '_') {\n\t String temp = gameState.toString().substring(0, pos)\n\t \t\t + activeCard\n\t + gameState.toString().substring(pos + 2,\n\t gameState.toString().length());\n\t posMoves.add(new xMCTSStringGameState(temp, 0.0, 0));\n\t }\n\t }\n\n\t }\n\t }\n\t else {\n\t \t // System.out.println(\"No moves can be made from this state\");\n\t \t// callsFromFullBoards++;\n\t \t// System.out.println(\"There have been \" + callsFromFullBoards + \"attempts to get possible moves from a full board\");\n\t }\n\t return posMoves;\n }", "public int moves() {\n return isSolvable() ? finalMove.moves : -1;\n }", "public int conflicts() {\n int total = 0;\n int dist;\n if (!isValid()) return 0;\n for (int r = 0; r < Board.dim; r++) {\n int row = r*Board.dim; \n for (int i = row; i < row + Board.dim; i++)\n for (int j = i + 1; j < row + Board.dim; j++) \n if (Board.rowOf[state[i]] == r && \n Board.rowOf[state[j]] == r &&\n state[i] != 0 && state[j] != 0 &&\n state[i] > state[j])\n total = total + 1;\n }\n for (int col = 0; col < Board.dim; col++) \n for (int i = col; i < state.length - Board.dim; i+= Board.dim) {\n for (int j = i + Board.dim; j < state.length; j+= Board.dim) \n if (Board.colOf[state[i]] == col &&\n Board.colOf[state[j]] == col &&\n state[i] != 0 && state[j] != 0 &&\n state[i] > state[j])\n total = total + 1;\n } \n return total; \n }", "public Stack<Point> shortestPath() {\n\t\tresetVisited();\n\t\tStack <Point> shortestPath = new Stack<Point>();\n\t\tprev = new HashMap<Point,Point>();\n\t\tCompass[] direction = Compass.values();\n\t\tQueue <Point> path = new LinkedList<Point>();\n\t\tpath.add(playerStart);\n\t\twhile(!path.isEmpty()) {\n\t\t\tPoint current = path.poll();\n\t\t\tfor (Compass pointing: direction) {\n\t\t\t\tif (current.equals(goal)) {\n\t\t\t\t\tshortestPath.push(current);\n\t\t\t\t\twhile (prev.containsKey(shortestPath.peek()) && !shortestPath.peek().equals(playerStart)){\n\t\t\t\t\t\tshortestPath.push(prev.get(shortestPath.peek()));\n\t\t\t\t\t}\n\t\t\t\t\treturn shortestPath;\n\t\t\t\t}\n\t\t\t\tint nextW = (int)current.getX() + pointing.mapX;\n\t\t\t\tint nextH = (int)current.getY() + pointing.mapY;\n\t\t\t\tPoint nextPoint = new Point(nextW, nextH);\n\t\t\t\tif (arrayBounds(nextW, width) && arrayBounds (nextH, height) && maze[nextW][nextH] == 0 && !visited.contains(nextPoint)) {\n\t\t\t\t\tpath.add(nextPoint);\n\t\t\t\t\tvisited.add(nextPoint);\n\t\t\t\t\tprev.put(nextPoint, current);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn shortestPath;\t\t\n\t}", "public static String solve8Puzzle(State s0)\n\t{\n\t\n\t\t// 1) Return null if the puzzle is not solvable. \n\t\tif(s0.solvable() != true){\n\t\t\treturn null;\n\t\t}\n\n\t\t// 2) Otherwise, solve the puzzle with two heuristics. The two solutions may be different\n\t\t// but must have the same length for optimality. \n\t\t\n\t\tHeuristic h[] = {Heuristic.TileMismatch, Heuristic.ManhattanDist }; \n\t\tString [] moves = new String[2]; \n\t\t\n\t\tfor (int i = 0; i < 2; i++)\n\t\t{\n\t\t\tmoves[i] = AStar(s0, h[i]); \n\t\t}\n\t\t\n\t\t// 3) Combine the two solution strings into one that would print out in the \n\t\t// output format specified in Section 5 of the project description.\n\t\t\n\t\treturn null; \n\t}", "private boolean solveNext(){\n Stack<Integer[]> emptyPositions = findEmptyPositions();\n\n while (!emptyPositions.isEmpty()) {\n\n //get the top empty position from the stack.\n Integer[] position = emptyPositions.peek();\n int row = position[0];\n int col = position[1];\n\n for (int value = 1; value <= size; value++) {\n if (isPositionValid(row, col, value)){\n\n //value is valid, we can set it to the board.\n board[row][col] = value;\n\n //recursive backtracking\n if(solveNext()) {\n\n //if the value leads to a solution, pop it from the stack.\n emptyPositions.pop();\n return true;\n }\n else board[row][col] = 0;\n\n }\n }\n return false;\n }\n return true;\n }", "public void solve() {\n \tsquares[0][0].fillInRemainingOfBoard();\n }", "public int moves() {\n if (!isSolvable()) return -1;\n return realMoves;\n }", "static List<Move> generateLegalMoves(Position pos) {\n\t\tList<Move> moves = new ArrayList<>();\n\n\t\t// for (int square : pos.pieces) {\n\t\t// \tif (pos.pieces.size() > 32) {\n\t\t// \t\tSystem.out.println(\"problem\" + pos.pieces.size());\n\t\t// \t}\n\t\t// \tif (pos.at(square) != 0 && Piece.isColor(pos.at(square), pos.toMove)) {\n\t\t// \t\tint piece = pos.at(square);\n\t\t// \t\tint name = Piece.name(piece);\n\t\t// \t\tif (name == Piece.Pawn) {\n\t\t// \t\t\tint step = pos.toMove == 'w' ? MoveData.Up : MoveData.Down;\n\t\t// \t\t\tif (square + step >= 0 && square + step < 64) {\n\t\t// \t\t\t\t// 1 square\n\t\t// \t\t\t\tif (pos.board.squares[square + step] == 0) {\n\t\t// \t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'q'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'b'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'n'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'r'));\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step));\n\t\t// \t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t// \t\t\t\t}\n\t\t// \t\t\t\t// 2 squares\n\t\t// \t\t\t\tif ((square < 16 && pos.toMove == 'w') || square > 47 && pos.toMove == 'b') {\n\t\t// \t\t\t\t\tif (pos.board.squares[square + 2*step] == 0 && pos.board.squares[square + step] == 0) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + 2*step));\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t\t// capture\n\t\t// \t\t\t\t// right\n\t\t// \t\t\t\tif (MoveData.DistanceToEdge[square][3] > 0) {\n\t\t// \t\t\t\t\tint target = square + step + 1;\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'q'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'b'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'n'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'r'));\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\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\t\t\t\n\t\t// \t\t\t\t\t} \n\t\t// \t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\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\t// left\n\t\t// \t\t\t\tif (MoveData.DistanceToEdge[square][2] > 0) {\n\t\t// \t\t\t\t\tint target = square + step - 1;\n\t\t// \t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'q'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'b'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'n'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'r'));\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\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\t\t\t\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t}\t\t\t\t\t\t\t\t\n\t\t// \t\t}\n\t\t// \t\telse if (name == Piece.Knight) {\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\tfor (int offset : MoveData.KnightOffsets.get(square)) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\tif (!Piece.isColor(pos.board.squares[square + offset], pos.toMove)) {\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tMove move = new Move(square, square + offset);\n\t\t// \t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\t\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t}\t\t\t\t\t\n\t\t// \t\t}\n\t\t// \t\telse {\n\t\t// \t\t\tint dirStart = name == Piece.Bishop ? 4 : 0;\n\t\t// \t\t\tint dirEnd = name == Piece.Rook ? 4 : 8;\n\t\t// \t\t\tfor (int dir = dirStart; dir < dirEnd; dir++) {\n\t\t// \t\t\t\tint maxDist = MoveData.DistanceToEdge[square][dir];\n\t\t// \t\t\t\tint dist = name == Piece.King ? Math.min(1, maxDist) : maxDist;\n\n\t\t// \t\t\t\tfor (int steps = 1; steps <= dist; steps++) {\n\t\t// \t\t\t\t\tint squareIdx = square + steps * MoveData.Offsets[dir];\t\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tif (!Piece.isColor(pos.board.squares[squareIdx], pos.toMove)) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, squareIdx));\n\t\t// \t\t\t\t\t\tif (Piece.isColor(pos.board.squares[squareIdx], Opposite(pos.toMove))) {\n\t\t// \t\t\t\t\t\t\tbreak;\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse {\n\t\t// \t\t\t\t\t\tbreak;\n\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}\n\t\t// \t\t}\n\t\t// \t}\n\t\t// }\n\n\t\tfor (int i = 0; i < 64; i++) {\n\t\t\tif (pos.board.squares[i] != 0 && Piece.isColor(pos.board.squares[i], pos.toMove)) {\n\t\t\t\tint piece = pos.board.squares[i];\n\t\t\t\tint name = Piece.name(piece);\n\t\t\t\tif (name == Piece.Pawn) {\n\t\t\t\t\tint step = pos.toMove == 'w' ? MoveData.Up : MoveData.Down;\n\t\t\t\t\tif (i + step >= 0 && i + step < 64) {\n\t\t\t\t\t\t// 1 square\n\t\t\t\t\t\tif (pos.board.squares[i + step] == 0) {\n\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'q'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'b'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'n'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'r'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step));\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// 2 squares\n\t\t\t\t\t\tif ((i < 16 && pos.toMove == 'w') || i > 47 && pos.toMove == 'b') {\n\t\t\t\t\t\t\tif (pos.board.squares[i + 2*step] == 0 && pos.board.squares[i + step] == 0) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + 2*step));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t// capture\n\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (MoveData.DistanceToEdge[i][3] > 0) {\n\t\t\t\t\t\t\tint target = i + step + 1;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'q'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'b'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'n'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'r'));\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\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\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\t// left\n\t\t\t\t\t\tif (MoveData.DistanceToEdge[i][2] > 0) {\n\t\t\t\t\t\t\tint target = i + step - 1;\n\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'q'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'b'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'n'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'r'));\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\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if (name == Piece.Knight) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tfor (int offset : MoveData.KnightOffsets.get(i)) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (!Piece.isColor(pos.board.squares[i + offset], pos.toMove)) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMove move = new Move(i, i + offset);\n\t\t\t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint dirStart = name == Piece.Bishop ? 4 : 0;\n\t\t\t\t\tint dirEnd = name == Piece.Rook ? 4 : 8;\n\t\t\t\t\tfor (int dir = dirStart; dir < dirEnd; dir++) {\n\t\t\t\t\t\tint maxDist = MoveData.DistanceToEdge[i][dir];\n\t\t\t\t\t\tint dist = name == Piece.King ? Math.min(1, maxDist) : maxDist;\n\t\t\t\t\t\tfor (int steps = 1; steps <= dist; steps++) {\n\t\t\t\t\t\t\tint squareIdx = i + steps * MoveData.Offsets[dir];\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!Piece.isColor(pos.board.squares[squareIdx], pos.toMove)) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, squareIdx));\n\t\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[squareIdx], Opposite(pos.toMove))) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tbreak;\n\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}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// castling\t\t\n\t\tif (pos.toMove == 'w' && !underAttack(pos, pos.whiteKing, 'b')) {\t\t\t\n\t\t\tif (pos.castlingRights.whiteKingSide && pos.at(Board.H1) == (Piece.Rook | Piece.White)) {\n\t\t\t\tif (pos.at(Board.F1) == Piece.Empty && pos.at(Board.G1) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.F1, 'b') && !underAttack(pos, Board.G1, 'b')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E1, Board.G1));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\tif (pos.castlingRights.whiteQueenSide && pos.at(Board.A1) == (Piece.Rook | Piece.White)) {\t\t\t\t\n\t\t\t\tif (pos.at(Board.B1) == Piece.Empty && pos.at(Board.C1) == Piece.Empty && pos.at(Board.D1) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.D1, 'b') && !underAttack(pos, Board.C1, 'b')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E1, Board.C1));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\telse if (pos.toMove == 'b' && !underAttack(pos, pos.blackKing, 'w')){\n\t\t\tif (pos.castlingRights.blackKingSide && pos.at(Board.H8) == (Piece.Rook | Piece.Black)) {\n\t\t\t\tif (pos.at(Board.F8) == Piece.Empty && pos.at(Board.G8) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.F8, 'w') && !underAttack(pos, Board.G8, 'w')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E8, Board.G8));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pos.castlingRights.blackQueenSide && pos.at(Board.A8) == (Piece.Rook | Piece.Black)) {\n\t\t\t\tif (pos.at(Board.B8) == Piece.Empty && pos.at(Board.C8) == Piece.Empty && pos.at(Board.D8) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.D8, 'w') && !underAttack(pos, Board.C8, 'w')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E8, Board.C8));\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// filter illegal moves\n\t\tList<Move> legalMoves = new ArrayList<>();\n\t\tchar color = pos.toMove;\n\t\tfor (Move move : moves) {\n\t\t\tpos.makeMove(move);\n\t\t\tif (!kingInCheck(pos, color)) {\n\t\t\t\tlegalMoves.add(move);\n\t\t\t}\t\t\t\n\t\t\tpos.undoMove();\n\t\t}\n\n\t\treturn legalMoves;\n\t}" ]
[ "0.7198465", "0.693155", "0.6900863", "0.6869302", "0.6787406", "0.67819804", "0.6740423", "0.6578298", "0.65622693", "0.6530978", "0.6482033", "0.6358198", "0.6252933", "0.6164928", "0.6149656", "0.61275357", "0.61073273", "0.6093751", "0.60618937", "0.6059461", "0.60539013", "0.6050743", "0.5993295", "0.5990961", "0.5969935", "0.5969159", "0.59518707", "0.594143", "0.59264266", "0.5907113", "0.58857864", "0.5874505", "0.5862712", "0.5833724", "0.5833488", "0.5768364", "0.5759538", "0.57292676", "0.5727026", "0.5726941", "0.5712976", "0.57128215", "0.571261", "0.57119006", "0.5695402", "0.5692046", "0.5691067", "0.5684491", "0.5680949", "0.56655395", "0.5641679", "0.5639471", "0.5634673", "0.5629645", "0.55998707", "0.559575", "0.5588962", "0.5588496", "0.55827373", "0.5580635", "0.5580044", "0.55639726", "0.5563266", "0.5560886", "0.5546959", "0.553783", "0.55350673", "0.553456", "0.5531195", "0.5524628", "0.55173135", "0.55001897", "0.5482505", "0.5475849", "0.5466141", "0.54609704", "0.5460795", "0.5454744", "0.54487747", "0.54465085", "0.5444268", "0.544184", "0.54396665", "0.5434604", "0.5414375", "0.5397305", "0.53942263", "0.5389694", "0.537638", "0.53735435", "0.53721744", "0.53670686", "0.5365468", "0.5364604", "0.5356286", "0.5356208", "0.5353789", "0.53494275", "0.5347747", "0.53344667" ]
0.72969276
0
Callback interface for retrieving parse data.
public interface ParseRetrieveDrawingCallback { /** * Retrieves drawings * * @param returnCode * @param drawings */ public void retrieveDrawingsCallback(int returnCode, List<ParseDrawing> drawings); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<ParseData> parse(ParseDataSettings parseData);", "public void parse() {\n }", "private void parseData() {\n\t\t\r\n\t}", "@Override\n protected Void doInBackground(Void... arg0) {\n helper = new LiveFeedParser(999);\n helper.get();\n viewEntries = helper.getViewEntries();\n return null;\n }", "void parse();", "public interface ValueParsingCallback {\n\n\tvoid beginDoc();\n\n\tvoid beginLeadMetadata();\n\n\tvoid endLeadMetadata();\n\n\tvoid beginSource();\n\t\n\tvoid endSource();\n\n\tvoid excludeSource();\n\n\tvoid beginTrailMetadata();\n\t\n\tvoid endTrailMetadata();\n\t\n\tvoid endDoc();\n\n // Geo fields are special\n // add hooks for them so the parser is aware\n void beginGeoField();\n\n void endGeoField();\n}", "public abstract void parse() throws IOException;", "private void parseData(String dataToParse)\n {\n try\n {\n XmlPullParserFactory factory = XmlPullParserFactory.newInstance();\n factory.setNamespaceAware(true);\n XmlPullParser xpp = factory.newPullParser();\n xpp.setInput( new StringReader( dataToParse ) );\n int eventType = xpp.getEventType();\n while (eventType != XmlPullParser.END_DOCUMENT)\n {\n\n // Found a start tag\n if(eventType == XmlPullParser.START_TAG)\n {\n //Check for which tag we have\n if (xpp.getName().equalsIgnoreCase(\"geonameId\"))\n {\n //focuses parser on the <geometry> tags\n String temp = xpp.nextText();\n Log.e(\"Geocode\", \"geocode is \" + temp);\n geoname = Integer.parseInt(temp);\n }\n }\n else if (eventType == XmlPullParser.END_TAG)\n {\n if(xpp.getName().equalsIgnoreCase(\"geonameId\")) {\n Log.e(\"Parsing geoname\", \"parse finished\");//finished\n\n }\n }\n\n\n // Get the next event\n eventType = xpp.next();\n\n } // End of while\n }\n catch (XmlPullParserException ae1)\n {\n Log.e(\"MyTag\",\"Parsing error\" + ae1.toString());\n }\n catch (IOException ae1)\n {\n Log.e(\"MyTag\",\"IO error during parsing\");\n }\n\n Log.e(\"MyTag\",\"End document\");\n\n }", "protected abstract void retrievedata();", "@Override\n\tpublic void postParse() {\n\t}", "@Override\n\tpublic void postParse() {\n\t}", "@Override\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\tgetdata(number);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}", "@Override\n\tpublic void parse() throws IOException {\n\t}", "@Override\n\tpublic void onParser(JSONArray response) {\n\n\t}", "private Object iterateData(String urlString, String name, ParseElementHandler parseElementHandler, String... additionalArguments)\n throws RedmineException\n {\n getData(urlString,name,parseElementHandler,additionalArguments);\n\n return parseElementHandler.getResult();\n }", "public void parseResponse();", "@Override\n\t\tprotected List<NewsBean> doInBackground(Void... params) {\n\t\t\tsynchronized (this) {\n\t\t\t\treturn new ParseXMLUtil().parseNewsXml(ls, url);\n\t\t\t}\n\t\t}", "public interface IParseObjectListener {\n void onItemCLick(ParseObject parseObject);\n}", "@Override\n\t\tprotected List<NewsBean> doInBackground(Void... params) {\n\t\t\tsynchronized (this) {\t\t\t\n\t\t\t\treturn new ParseXMLUtil().parseNewsXml(ls,url);\n\t\t\t}\t\t\t\n\t\t}", "public void parse() throws IOException, StopDataMissingException, JSONException{\n DataProvider dataProvider = new FileDataProvider(filename);\n\n parseStops(dataProvider.dataSourceToString());\n }", "private void fetchParseData() {\n // Look for group containing current user\n ParseQuery<ParseObject> query = new ParseQuery<ParseObject>(ParseConstants.CLASS_GROUPS);\n query.whereEqualTo(ParseConstants.KEY_GROUP_MEMBER_IDS, mCurrentUser.getObjectId());\n query.getFirstInBackground(new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject group, ParseException e) {\n handleParseData(group);\n }\n });\n }", "void onParsableDataResult(List<T> parsableData);", "@Override\n public void onResponse(String response) {\n parseData(url, response);\n }", "@Override\n public Void doInBackground() {\n \tsetProgress(0);\n \tparseMapData(filename);\n \tsetProgress(100);\n return null;\n }", "@Override\r\n protected void parseDocuments()\r\n {\n\r\n }", "@Override\n public List<Movie> loadInBackground() {\n\n // obtain the Url, used for the http request\n URL url = AppUtilities.buildUrl(pageNumberBeingQueried, sortOrderOfResults,\n searchQuerySubmitted, preferredMovieGenre, preferredStartYear,\n preferredEndYear, preferenceValuesAreDefault);\n\n // perform the url request\n String jsonResponseString = null;\n try {\n jsonResponseString = AppUtilities.getResponseFromHttpUrl(url);\n } catch (IOException io_exception) {\n io_exception.printStackTrace();\n }\n\n // initialise the return object\n List<Movie> movieList = null;\n\n // if the response String is not null - parse it\n if (jsonResponseString != null) {\n // call helper method to parse JSON\n Pair<List<Movie>, Integer> result = JsonUtilities.extractFromJSONString(jsonResponseString);\n movieList = result.first;\n jsonResponseCode = result.second;\n }\n return movieList;\n }", "@Override\n public void done(ParseObject object, ParseException e) {\n\n if (object == null){\n Toast.makeText(getApplicationContext(), \"Please upload your timetable here\", Toast.LENGTH_LONG).show();\n }else {\n\n ParseFile fileObject = (ParseFile) object.get(\"ImageFile\");\n\n fileObject.getDataInBackground(new GetDataCallback() {\n public void done(byte[] data, ParseException e) {\n if (e == null) {\n Log.d(\"test\", \"We've got data in data.\");\n // Decode the Byte[] into\n // Bitmap\n Bitmap bmp = BitmapFactory.decodeByteArray(data, 0, data.length);\n\n // Get the ImageView from\n // main.xml\n ImageView image = (ImageView) findViewById(R.id.ivImage);\n\n // Set the Bitmap into the\n // ImageView\n image.setImageBitmap(bmp);\n\n\n } else {\n Log.d(\"test\",\n \"There was a problem downloading the data.\");\n }\n }\n });\n\n }\n }", "public interface iOnParse {\n\tvoid onParse(String htmlEle);\n}", "public void endParsing();", "public abstract void parseReport();", "@Override\r\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\tgetDataFromDatabase();\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}", "@Override\n public List<Report> loadInBackground() {\n// Log for testing purposes\n// android.util.Log.i(LOG_TAG, \"Test: Report Loader loadInBackground() called.\");\n\n if (mUrl == null) {\n return null;\n }\n\n // Perform the network request, parse the response, and extract a list of reports.\n List<Report> reports = QueryUtils.fetchReportData(mUrl);\n return reports;\n }", "@Override\n protected List<Flower> doInBackground(String... params) {\n // InputStream in = null;\n String content = HttpManager.getData(params[0]);\n flowerList = JSONParser.parserFeed(content);\n return flowerList;\n }", "@Override\n protected String doInBackground(String... arg0) {\n jobj = jsonparser.makeHttpRequest(url);\n try {\n metadata = jobj.getString(TAG_METADATA);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return metadata;\n }", "protected void postParse(T fileParsed) {\n\t}", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "@Override\n\t\t\t\tprotected EbooksPageFile doInBackground(String... params) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\treturn Serialization.deserializeEbooksAndStore(getContext(),params[0]);\n\t\t\t\t}", "@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}", "Request getGeneralData(AsyncCallback<GeneralData> callback);", "private Object onParse(final String content) throws IOException{\n if(null == this.mBean)\n return null;\n\n try{\n return JSON.parseObject(content, this.mBean);\n }catch(Exception e){\n throw new IOException(e.getMessage());\n }\n }", "CParserResult getParserResult();", "public void runParser() throws Exception {\n\t\tparseXmlFile();\r\n\t\t\r\n\t\t//get each employee element and create a Employee object\r\n\t\tparseDocument();\r\n\t\t\r\n\t\t//Iterate through the list and print the data\r\n\t\t//printData();\r\n\t\t\r\n\t}", "public interface Parser {\n\n ParsedObject[] parse();\n}", "@Override\n public void onResponse(JSONArray response) {\n parseData(response);\n }", "@Override\r\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\r\n\r\n JSONObject jObject;\r\n List<List<HashMap<String, String>>> routes = null;\r\n\r\n try {\r\n jObject = new JSONObject(jsonData[0]);\r\n Log.d(\"ParserTask\", jsonData[0].toString());\r\n DataParser parser = new DataParser();\r\n Log.d(\"ParserTask\", parser.toString());\r\n\r\n // Starts parsing data\r\n routes = parser.parse(jObject);\r\n Log.d(\"ParserTask\", \"Executing routes\");\r\n Log.d(\"ParserTask\", routes.toString());\r\n\r\n } catch (Exception e) {\r\n Log.d(\"ParserTask\", e.toString());\r\n e.printStackTrace();\r\n }\r\n return routes;\r\n }", "@Override\n protected Void doInBackground(Void... arg0) {\n getInbox(latitude, longitude);\n return null;\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\", jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\", \"Executing routes\");\n Log.d(\"ParserTask\", routes.toString());\n } catch (Exception e) {\n Log.d(\"ParserTask\", e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "@Override\r\n\t\tprotected String doInBackground(String... arg0) {\n\t\t\t xmlInput = (EditText) findViewById(R.id.xmlInput);\r\n\t\t response = new xmlRequest().XMLUrlHttpRequest(xmlInput.getText().toString());\r\n\r\n\t\t\tString parsedData = \"\";\r\n\t \r\n\t try {\r\n\t \r\n\t Log.w(\"AndroidParseXMLActivity\", \"Start\");\r\n\t SAXParserFactory spf = SAXParserFactory.newInstance();\r\n\t SAXParser sp = spf.newSAXParser();\r\n\t XMLReader xr = sp.getXMLReader();\r\n\t \r\n\t Bookhandler XMLHandler = new Bookhandler();\r\n\t xr.setContentHandler(XMLHandler);\r\n\t InputSource inStream = new InputSource();\r\n\t \r\n\t inStream.setCharacterStream(new StringReader(response));\r\n\t \r\n\t xr.parse(inStream);\r\n\t Log.w(\"response\",response);\r\n\t int i=0;\r\n\t ArrayList<BookData> BooksList = XMLHandler.getBooksList();\r\n\t for(;i<BooksList.size();i++){\r\n\t BookData book = BooksList.get(i);\r\n\t parsedData = parsedData + \"Book \"+(i+1) +\"Detail----->\\n\";\r\n\t parsedData = parsedData + \"Book Number: \" + book.getBookNumber() + \"\\n\";\r\n\t parsedData = parsedData + \"Description: \" + book.getDescription() + \"\\n\";\r\n\t parsedData = parsedData + \"Price: \" + book.getPrice() + \"\\n\";\r\n\t parsedData = parsedData + \"Rating: \"+ book.getRating() + \"\\n\";\r\n\t \r\n\t }\r\n\t Log.w(\"i==\",String.valueOf(i));\r\n\t Log.w(\"Data\",parsedData);\r\n\r\n\t Log.w(\"ParsingXml and populating\", \"Done\");\r\n\t }\r\n\t catch (Exception e) {\r\n\t Log.w(\"AndroidParseXMLActivity\",e );\r\n\t }\r\n\t \r\n\t return parsedData;\r\n\t\t\r\n\t\t}", "private void parse() {\n if (workingDirectory != null) {\n Parser.initConstants(this, workingDirectory, remainderFile);\n Parser.parseIt();\n workingDirectory = null;\n remainderFile = null;\n jbParse.setEnabled(false);\n }\n }", "public void parse() {\n if (commandSeparate.length == 1) {\n parseTaskType();\n } else if (commandSeparate.length == 2) {\n parseTaskType();\n index = commandSeparate[1];\n taskName = commandSeparate[1];\n } else {\n parseTaskType();\n parseTaskName();\n parseTaskDate();\n }\n }", "public abstract <T> void read(String path, ValueCallback<T> callback) throws ValueReadingException;", "@Override\n\t\tprotected List<ProjectModel> doInBackground(Void... params) {\n\t\t\tLog.i(\"LOGGER\", \"Starting...doInBackground loadList\");\n\t\t\tList<ProjectModel> projectsList = searchController.searchIntoXML();\n\t\t\treturn projectsList;\n\t\t}", "void handleParsedRecord(SampleRecord record);", "Parse createParse();", "public Object parseItem(int rssType, Document doc, int index) throws Exception;", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\", jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\", \"Executing routes\");\n Log.d(\"ParserTask\", routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask exp\", e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "public abstract void fetchNodes(NodeCallback callback);", "public interface TripsListCallback {\n\n void serverResponseWithTripsList(List<ParseObject> objects);\n\n }", "@Override\r\n protected Boolean doInBackground(Void... params) {\n getData(pageIndex);\r\n return true;\r\n }", "@Override\n public RecordType parseMetadata() {\n \n this.stationIndex = StationLookup.lookup(getStationId(this.filename));\n \n try {\n reader.mark(READ_AHEAD_LIMIT);\n String line = null;\n boolean headerRead = false;\n List<Variable> vars = null;\n while (null != (line = reader.readLine())) {\n Matcher matcher = headerLinePattern.matcher(line);\n if (matcher.matches()) {\n vars = headerVariables(matcher.group(1));\n reader.mark(READ_AHEAD_LIMIT);\n headerRead = true;\n }\n else if (headerRead) {\n matcher = dataLinePattern.matcher(line);\n if (matcher.matches()) {\n String date = matcher.group(1);\n Instant timestep = Instant.parse(date, getInputDateFormatter());\n this.baseDate = timestep;\n \n RecordType recordType = new RecordType(\"days since \" + baseDate.toString());\n for (Variable var : vars) {\n recordType.addType(var);\n }\n \n reader.reset();\n return recordType;\n }\n }\n }\n \n }\n catch (IOException ex) {\n LOG.debug(\"Error reading metadata\", ex);\n }\n return null;\n }", "@Override\n\tpublic void run() {\n\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));\n\t\t\tString line = null;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] record = line.trim().split(\"@\");\n\t\t\t\tif (record.length != 2)\n\t\t\t\t\tcontinue;\n\t\t\t\tparse(record[0], record[1]);\n\n\t\t\t}\n\t\t\t// close buffer reader\n\t\t\tbr.close();\n\t\t\t// Debug catch An exception\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\n\t\t}\n\t}", "public void retrieveData(){\n\t\tloaderImage.loadingStart();\n\t\tJsonClient js = new JsonClient();\n\t\tjs.retrieveData(JSON_URL, this);\n\t}", "@Override\n public void parse() {\n if (file == null)\n throw new IllegalStateException(\n \"File cannot be null. Call setFile() before calling parse()\");\n\n if (parseComplete)\n throw new IllegalStateException(\"File has alredy been parsed.\");\n\n FSDataInputStream fis = null;\n BufferedReader br = null;\n\n try {\n fis = fs.open(file);\n br = new BufferedReader(new InputStreamReader(fis));\n\n // Go to our offset. DFS should take care of opening a block local file\n fis.seek(readOffset);\n records = new LinkedList<T>();\n\n LineReader ln = new LineReader(fis);\n Text line = new Text();\n long read = readOffset;\n\n if (readOffset != 0)\n read += ln.readLine(line);\n\n while (read < readLength) {\n int r = ln.readLine(line);\n if (r == 0)\n break;\n\n try {\n T record = clazz.newInstance();\n record.fromString(line.toString());\n records.add(record);\n } catch (Exception ex) {\n LOG.warn(\"Unable to instantiate the updateable record type\", ex);\n }\n read += r;\n }\n\n } catch (IOException ex) {\n LOG.error(\"Encountered an error while reading from file \" + file, ex);\n } finally {\n try {\n if (br != null)\n br.close();\n\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n LOG.error(\"Can't close file\", ex);\n }\n }\n\n LOG.debug(\"Read \" + records.size() + \" records\");\n }", "@Override\n\t\t\tprotected List<NewsBean> doInBackground(CarouselBean... params) {\n\t\t\t\t\n\t\t\t\tsynchronized (params) {\n\t\t\t\t\treturn new ParseXMLUtil().parseCarouselXml(params[0]);\n\t\t\t\t}\n\t\t\t}", "void retrievePageContents()\n\t{\n\t\tStringBuilder longString = new StringBuilder();\n\t\tfor (int i = 0; i < pageContents.size(); i++)\n\t\t{\n\t\t\tlongString.append(pageContents.get(i));\n\t\t}\n\t\tString pageMarkup = longString.toString().toLowerCase();\n\t\textractComments(pageMarkup);\n\n\t}", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\",jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\",\"Executing routes\");\n Log.d(\"ParserTask\",routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask\",e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\",jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\",\"Executing routes\");\n Log.d(\"ParserTask\",routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask\",e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\",jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\",\"Executing routes\");\n Log.d(\"ParserTask\",routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask\",e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tif(resp.contains(\"success\"))\n\t\t\t{\n\t\t\t\tparsingmethod();\n\t\t\t\tToast.makeText(getApplicationContext(), resp, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tToast.makeText(getApplicationContext(), resp, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}", "public IParser getParserSuccessfull ( ){ return mParserSuccessfull; }", "@Override\n\t\tprotected Boolean doInBackground(Void... params) {\n\t\t\tlinklist = parseRSS();\n\t\t\treturn updateDatabase(linklist);\n\t\t}", "private void readEntry(XmlPullParser parser) throws XmlPullParserException, IOException {\n\n while (parser.next() != XmlPullParser.END_TAG) {\n if (parser.getEventType() != XmlPullParser.START_TAG) {\n continue;\n }\n String name = parser.getName();\n\n switch (name) {\n case \"profile\":\n readProfile(parser);\n break;\n case \"examresult\":\n readExamResult(parser);\n break;\n case \"feesrecord\":\n readFee(parser);\n break;\n case \"attendancerecord\":\n readAttendance(parser);\n break;\n case \"noticesrecord\":\n readNoticeRecord(parser);\n break;\n case \"teachersrecord\":\n readTeacherRecord(parser);\n break;\n default:\n skip(parser);\n break;\n }\n\n }\n complete_flag = true;\n }", "@Override\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\ttry {\n\t\t\t\tif (getNews() == null) {\n\t\t\t\t\tprocessNewsInitial();\n\t\t\t\t} else {\n\t\t\t\t\tprocessNews();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "private void loadContent()\n {\n // locking the function to prevent the adapter\n // from calling multiples async requests with\n // the same definitions which produces duplicate\n // data.\n locker.lock();\n\n // this function contruct a GraphRequest to the next paging-cursor from previous GraphResponse.\n GraphRequest nextGraphRequest = lastGraphResponse.getRequestForPagedResults(GraphResponse.PagingDirection.NEXT);\n\n // if we reached the end of our pages, the above method 'getRequestForPagedResults'\n // return 'null' object\n if(nextGraphRequest != null)\n {\n // for clarificating and formatting purposes\n // I declared the callback besides the members\n // variables.\n nextGraphRequest.setCallback(callback);\n nextGraphRequest.executeAsync();\n }\n }", "public interface Parser {\n\t\n\t/**\n\t * A method to parse the file\n\t * @param file the file\n\t * @return the content\n\t */\n\tpublic String parse(File file);\n\t\n}", "@Override\n public void done(List<ParseObject> objects, ParseException e) {\n if( e == null) {\n //...and objects returned is greater than 0...\n if(objects.size() > 0) {\n //loop through all objects that were returned\n for(ParseObject object : objects) {\n //create a parseFile file, get the the object i.e. the current image on the loop, and assign it to the created parseFile file.\n ParseFile file = (ParseFile) object.get(\"profilepicture\");\n //convert the image to a bitmap file.\n file.getDataInBackground(new GetDataCallback() {\n @Override\n public void done(byte[] data, ParseException e) {\n if(e == null && data != null) {\n Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);\n\n imageView.setImageBitmap(bitmap);\n } else {\n Toast.makeText(getActivity().getApplicationContext(), \"Error!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n //if the object.size returned from the server is less than or equal to 0, tell the user that the user does not have any pictures\n } else {\n Toast.makeText(getActivity().getApplicationContext(),\"This User has no Pictures\" ,Toast.LENGTH_LONG).show();\n }\n //if the exception is not equal to null, tell the user the reason.\n } else {\n Toast.makeText(getActivity().getApplicationContext(),e.getMessage() ,Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\t\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\t\tparseRespense(response);\n\t\t\t\t\t\t}", "public void get (final NodeID nodeID, GetCallBack listener);", "CParser getParser();", "@Nullable\n @Override\n public Movie[] loadInBackground() {\n if (mUrl == null) {\n return null;\n }\n try {\n URL movieRequestUrl = new URL(mUrl);\n // get json response in a string\n String jsonMovieResponse = NetworkUtils\n .getResponseFromHttpUrl(movieRequestUrl);\n return MovieJsonUtils.getMovies(jsonMovieResponse);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n return null;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\r\n\t protected void onPostExecute(String result) {\r\n\t super.onPostExecute(result);\r\n\t \r\n\t ParserTask parserTask = new ParserTask();\r\n\t \r\n\t // Invokes the thread for parsing the JSON data\r\n\t parserTask.execute(result);\r\n\t }", "@Override\n protected void onTextData(Reader r) throws IOException {\n\n }", "public void onFinishedParsingInput() {\n // To output line to file: outputLine(string);\n }", "@Override\n public List<Movie> loadInBackground() {\n MovieDataExtractor movieDataExtractor = new MovieDataExtractor(getContext());\n List<Movie> movies = movieDataExtractor.extractFeatureFromJson();\n moviesList = movies;\n return moviesList;\n }", "public interface ResponseParser {\r\n\t\r\n\tList<Place> parseSearchResponse(String rawJson) throws Exception;\r\n\t\r\n\tList<Place> parseFilteredSearchResponse(String rawJson) throws Exception;\r\n\r\n}", "@Override\n\t\tprotected JSONObject doInBackground(String... param) {\n\t\t\treturn processHomeData(param[0], param[1]);\n\n\t\t}", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tparseFile(\"english_file.txt\");\r\n\t\t\t\t}", "public void readData() {\n ConnectivityManager connMgr = (ConnectivityManager)\n this.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n\n // number the loaderManager with mPage as may be requesting up to three lots of JSON for each tab\n loaderManager.restartLoader(FETCH_STOCK_PICKING_LOADER_ID, null, loadStockDetailFromServerListener);\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n View loadingIndicator = findViewById(R.id.loading_spinner);\n loadingIndicator.setVisibility(View.GONE);\n\n // Update empty state with no connection error message\n TextView noConnectionView = (TextView) findViewById(R.id.empty_view);\n noConnectionView.setText(getString(R.string.error_no_internet_connection));\n noConnectionView.setVisibility(View.VISIBLE);\n }\n }", "@Override\n\t\t protected Void doInBackground(Void... params) {\n\t\t \tUnidataSuperActivity.setDone(false);\n\t\t \t\n\t\t \t/* Gets the URL address of the data wanted\n\t\t \t * URL comes from the Super, which is set by the MainActivity\n\t\t \t */\n\t\t URL textUrl;\n\t\t String address = UnidataSuperActivity.getURL();\n\t\t \n\t\t /* Converts the URL into a temporary XML file, which then is converted into a String\n\t\t * Uses the Commons IO library for FileUtils\n\t\t */\n\t\t try {\n\t\t textUrl = new URL(address);\n\t\t System.out.println(textUrl);\n\t\t File testFile2 = File.createTempFile(\"temp2\", \".dat\");\n\t\t testFile2.deleteOnExit();\n\t\t FileUtils.copyURLToFile(textUrl, testFile2);\n\t\t textResult = FileUtils.readFileToString(testFile2);\n\t\t \n\t\t } catch (MalformedURLException e) {\n\t\t e.printStackTrace();\n\t\t textResult = e.toString(); \n\t\t } catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t textResult = e.toString(); \n\t\t }\n\t\t \n\t\t /* sets the XML String in the super class so it can be parsed in the main thread\n\t\t * and then lets the main thread know it has finished\n\t\t */\n\t\t UnidataSuperActivity.setXML(textResult);\n\t\t UnidataSuperActivity.setDone(true);\n\n\t\t return null;\n\t\t \n\t\t }", "@Override\n protected String doInBackground(String... strings) {\n\n String text = strings[0];\n\n// Parse[] parses = NLP.getParse(context, text);\n// StringBuffer sb = new StringBuffer();\n// if (parses != null) {\n// for (Parse parse : parses) {\n// parse.show(sb);\n// }\n// }\n\n // get tokens\n String[] results = NLP.getTokens(context, text);\n\n// String[] partsOfSpeech = NLP.getPartsOfSpeech(context, results);\n// if (partsOfSpeech != null) {\n// for (String string : partsOfSpeech) {\n// Timber.e(string);\n// }\n// }\n\n Span[] names = NLP.getNames(context, results);\n if (names != null && names.length > 0) {\n Timber.e(\"Size: %d\", names.length);\n for (Span name : names) {\n Timber.e(name.getType());\n if (name.getType().equalsIgnoreCase(\"person\")) {\n Timber.e(\"Start: %d, End: %d\", name.getStart(), name.getEnd());\n String fullName = \"\";\n for (int i = name.getStart(); i < name.getEnd(); i++) {\n if (results != null) {\n fullName += results[i] + \" \";\n }\n }\n return fullName;\n }\n }\n } else {\n Timber.e(\"names is null\");\n }\n\n return null;\n }", "void Parse(Source source);", "public interface DataParser {\n public static final String TAG = \"DataParser\";\n \n /**\n * Gets an user object from InputStream\n * @param in\n * @return\n */\n public User parseUser(InputStream in) throws DataParseException;\n}", "@Override\n protected void onPostExecute(String result) {\n super.onPostExecute(result);\n\n ParseTask parserTask = new ParseTask();\n\n // Invokes the thread for parsing the JSON data\n parserTask.execute(result);\n }", "private ArrayList<?> ParseXMLResponse(StringBuilder response, IDataInterface myHandler){\n \t\t SAXParserFactory spf = SAXParserFactory.newInstance();\n \t\t try {\n \t\t\tSAXParser sp = spf.newSAXParser();\n \t\t\tXMLReader xr = sp.getXMLReader();\n \t\t\t\n \t\t\txr.setContentHandler((ContentHandler) myHandler);\n \t\t\tInputSource is = new InputSource();\n \t\t\tis.setCharacterStream(new StringReader(response.toString()));\n \t\t\txr.parse(is);\n \t\t\t\n \t\t} catch (ParserConfigurationException e) {\n \t\t\te.printStackTrace();\n \t\t} catch (SAXException e) {\n \t\t\te.printStackTrace();\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\treturn myHandler.getData();\n \t}", "public abstract List<EXIFContent> parse();", "@Override\n \t\t\tpublic void done(List<ParseObject> arg0, com.parse.ParseException arg1) {\n \t\t\t\tif (arg1 == null) {\n \t\t\t\t\tif (!arg0.isEmpty()) {\n \t\t\t\t\t\tfor (int i = 0; i < arg0.size(); i++) {\n \t\t\t\t\t\t\tParseObject row=arg0.get(i);\n \t\t\t\t\t\t\tif(row.getString(\"type\").equals(\"Schedule\")){\n \t\t\t\t\t\t\t\taddMarkerSchedule(row.getString(\"name\"), row.getDouble(\"latitude\"), row.getDouble(\"longitude\"), row.getString(\"type\"));\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tif(row.getString(\"type\").equals(\"To Do\")){\n \t\t\t\t\t\t\t\taddMarkerTodo(row.getString(\"name\"), row.getDouble(\"latitude\"), row.getDouble(\"longitude\"), row.getString(\"type\"));\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tif(row.getString(\"type\").equals(\"Meet\")){\n \t\t\t\t\t\t\t\taddMarkerMeet(row.getString(\"name\"), row.getDouble(\"latitude\"), row.getDouble(\"longitude\"), row.getString(\"type\"));\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}", "protected void returnData() {\n\t\t// go through queued messages\n\t\twhile (_messages.size() > 0) {\n\t\t\tKeyword kw =\n\t\t\t\tnew Keyword(\n\t\t\t\t\t\"mirrorKFkeyword: \" + _counter++ +\" \" + _messages.get(0),\n\t\t\t\t\tnew Context(),\n\t\t\t\t\tKeyword.NO_DELAY,\n\t\t\t\t\tnew Relevance());\n\t\t\t// add the keyword to the return container\n\t\t\ttry {\n\t\t\t\t_returnData.add(kw);\n\t\t\t} catch (GenericException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t_messages.remove(0);\n\t\t}\n\t}", "public void parse(String filename);", "@Override\n public D loadInBackground() {\n mData = SerializeUtils.readSerializableObject(mContext, mFilename);\n return mData;\n }", "@Override\r\n public void onResponse(JSONArray response) {\n parseData(response, requestCount);\r\n }" ]
[ "0.6719749", "0.65391517", "0.6354405", "0.62217396", "0.6183724", "0.6064104", "0.59922194", "0.5890102", "0.58408254", "0.57604694", "0.57604694", "0.5722855", "0.5704309", "0.56708664", "0.56311035", "0.55803585", "0.5512725", "0.55074894", "0.54482484", "0.54477125", "0.5437232", "0.5422678", "0.54117656", "0.53732705", "0.53520715", "0.5327983", "0.5310424", "0.5306076", "0.52823687", "0.5271082", "0.52656996", "0.52603525", "0.5251404", "0.52512133", "0.5220475", "0.5214341", "0.52048576", "0.5193361", "0.5190338", "0.5155919", "0.5153657", "0.5144121", "0.51334745", "0.5127068", "0.5112347", "0.51073295", "0.5104109", "0.51014775", "0.50968385", "0.5089718", "0.50868386", "0.50808007", "0.50767916", "0.50767124", "0.5071629", "0.5068951", "0.5059999", "0.5054897", "0.50532246", "0.50496984", "0.5047619", "0.50460076", "0.5032735", "0.5030879", "0.503067", "0.50269717", "0.50269717", "0.50269717", "0.5026642", "0.5014398", "0.50138974", "0.5012561", "0.50097287", "0.5003018", "0.49885792", "0.498748", "0.49780095", "0.4975273", "0.49750346", "0.4973195", "0.49694416", "0.49590346", "0.49483246", "0.49386373", "0.49279532", "0.49262106", "0.49227536", "0.49186122", "0.49033093", "0.4897246", "0.4896041", "0.4894687", "0.4890548", "0.48897287", "0.48886642", "0.4885173", "0.48842326", "0.4883651", "0.48724556", "0.485895" ]
0.5720995
12
Creates a new NetUser object
NetUser(String name, int totalGridlet, double baud_rate, double delay, int MTU, Broker broker) throws Exception { super( name, new SimpleLink(name+"_link",baud_rate,delay, MTU) ); this.receiveJobs = new GridletList(); this.jobs = new GridletList(); this.broker = broker; this.auctions = new LinkedList(); // Gets an ID for this entity this.myId_ = super.getEntityId(name); // Creates a list of Gridlets or Tasks for this grid user this.createGridlet(myId_, totalGridlet); long seed = 11L*13*17*19*23+1; Sim_uniform_obj genReservePrice = new Sim_uniform_obj("price",1, 90, seed); try{ int choice = 1; for(int i=0; i<jobs.size(); i++){ if(choice == 1){ // creates a FPSA with duration of 120.0 ReverseFirstPriceSealedBidAuction fpsa = new ReverseFirstPriceSealedBidAuction( super.get_name() + "_FPSA_" + i, 120.0); // To make sure that there will be offers to all jobs, // we set the reserve price to something up to 100 // and offers at 10 maximum fpsa.setReservePrice((double)(10 + genReservePrice.sample())); // the auction has a referente to the job/gridlet fpsa.setAttribute("job",(Gridlet)jobs.get(i)); System.out.println(super.get_name() + " " + "creating a FPSA to acquire resource to execute job " + ((Gridlet)jobs.get(i)).getGridletID() + " from user " + super.get_id()); auctions.add(fpsa); } else if(choice == 2){ // creates an English Auction with duration of 120.0 each round // and maximum of 10 rounds ReverseEnglishAuction ea = new ReverseEnglishAuction( super.get_name() + "_EA_" + i, 120.0, 5); // To make sure that there will be offers to all jobs, // we set the reserve price to something up to 100 // and offers at 10 maximum ea.setReservePrice((double)(10 + genReservePrice.sample())); ea.setMaxPrice(90); ea.setMinPrice(0); // the auction has a referente to the job/gridlet ea.setAttribute("job",(Gridlet)jobs.get(i)); System.out.println(super.get_name() + " " + "creating an EA to acquire resource to execute job " + ((Gridlet)jobs.get(i)).getGridletID() + " from user " + super.get_id()); auctions.add(ea); } else if(choice == 3){ // creates a Dutch Auction with duration of 120.0 each round // and maximum of 10 rounds ReverseDutchAuction da = new ReverseDutchAuction( super.get_name() + "_DA_" + i,120.0, 5); // To make sure that there will be offers to all jobs, // we set the reserve price to something up to 100 // and offers at 10 maximum da.setReservePrice((double)(10 + genReservePrice.sample())); da.setMaxPrice(90); da.setMinPrice(0); // the auction has a referente to the job/gridlet da.setAttribute("job",(Gridlet)jobs.get(i)); System.out.println(super.get_name() + " " + "creating a DA to acquire resource to execute job " + ((Gridlet)jobs.get(i)).getGridletID() + " from user " + super.get_id()); auctions.add(da); choice = 0; } choice++; } } catch(Exception ex){ ex.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);", "int newUser(String username, String password, Time creationTime);", "public IUser CreateUser() {\n\t\tIUser iUser = null;\n\t\tswitch (db) {\n\t\tcase \"Mysql\":\n\t\t\tiUser = new MysqlUserImpl();\n\t\t\tbreak;\n\t\tcase \"Access\":\n\t\t\tiUser = new AccessUserImpl();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn iUser;\n\t}", "@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}", "public static void createUser(String fname, String lname, String username, String password) {\n\t\tUser newUser = new User(fname, lname, username, password);\t\n\t}", "public void creatUser(String name, String phone, String email, String password);", "User createUser();", "public User createUser() {\n printer.println(\"Welcome! Enter you name and surname:\");\n printer.println(\"Name:\");\n String name = input.nextString();\n printer.println(\"Surname:\");\n String surname = input.nextString();\n return new User(name, surname);\n }", "public void newUser(User user);", "private User createUser(org.picketlink.idm.model.User picketLinkUser) {\n User user = new User(picketLinkUser.getLoginName());\n user.setFullName(picketLinkUser.getFirstName() + \" \" + picketLinkUser.getLastName());\n user.setShortName(picketLinkUser.getLastName());\n return user;\n }", "@Override\n\tpublic User createNewUser(Account account) {\n\t\treturn new User(account);\n\t\t\n\t}", "public void createUser(User user);", "public void createUser(User user) {\n\n\t}", "public synchronized User createAccount(String username, String password, String type, String actualName, String email) {\r\n\t\tUser user = new User();\r\n\t\tuser.setActualName(actualName);\r\n\t\tuser.setEmail(email);\r\n\t\tuser.setPassword(password);\r\n\t\tuser.setType(type);\r\n\t\tuser.setUsername(username);\r\n\t\tboolean added = addUser(user);\r\n\t\tif (added) {\r\n\t\t\treturn user;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private Appuser newUser() {\n //TODO: get logged user from security context\n String createdBy = \"REST\";\n Appuser au = new Appuser();\n Userdetails ud = new Userdetails();\n boolean idOK = false;\n Long id = 0L;\n while (!idOK) {\n id = EntityIdGenerator.random();\n idOK = !userRepository.exists(id);\n }\n //notNull\n ud.setNotes(\"none\");\n au.setPasswdHash(\"*\");\n au.setCreatedBy(createdBy);\n au.setUserId(id);\n ud.setUserId(id);\n au.setUserdetails(ud);\n return au;\n }", "Human_User createHuman_User();", "void createUser(User newUser, String token) throws AuthenticationException, InvalidUserException, UserAlreadyExistsException;", "boolean createUser(String username, String password);", "private void createUser(final String email, final String password) {\n\n }", "UserCreateResponse createUser(UserCreateRequest request);", "int createUser(User data) throws Exception;", "public NewMember(String username, String password, String email) {\n this.username = username;\n this.password = password;\n this.email = email;\n this.has_role = \"User\";\n this.signingDate = new Date(System.currentTimeMillis());\n }", "public User createUser(User newUser) {\n if(userRepository.findByUsername(newUser.getUsername()) != null){\n throw new UsernameException(\"The username is already taken please choose another one\");\n }\n newUser.setToken(\"dummy_token\"); //not really needed after registration;\n\n newUser.setStatus(UserStatus.ONLINE);\n userRepository.save(newUser); //userRepository creates User entity for the first time\n\n newUser.setToken(generateToken(newUser));\n userRepository.save(newUser); //userRepository saves the new entity items to existing user\n\n log.debug(\"Created Information for User: {}\", newUser);\n return newUser;\n }", "public static User createBasicUser () {\n User user = new User();\n user.setUsername(\"basicUser\");\n user.setPassword(\"secret\");\n user.setEmail(\"me@example.com\");\n user.setFirstName(\"firstName\");\n user.setLastName(\"lastName\");\n user.setPhoneNumber(\"123456789123\");\n user.setCountry(\"GB\");\n user.setEnabled(true);\n user.setDescription(\"A basic user\");\n user.setProfileImageUrl(\"https://blabla.images.com/basicuser\");\n\n return user;\n }", "@Override\n\tpublic ApplicationResponse createUser(UserRequest request) {\n\t\tUserEntity entity = repository.save(modeltoentity.apply(request));\n\t\tif (entity != null) {\n\t\t\treturn new ApplicationResponse(true, \"Success\", enitytomodel.apply(entity));\n\t\t}\n\t\treturn new ApplicationResponse(false, \"Failure\", enitytomodel.apply(entity));\n\t}", "public User(String username, String nPassword)\n {\n userName = username;\n password = nPassword;\n }", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "@Test\n public void testGetNewUser() throws Exception {\n UserMultiID umk = createRU(\"remote-user-\" + getRandomString());\n String idp = \"test-idp-\" + getRandomString();\n // create a new user.\n XMLMap map = getDBSClient().getUser(umk, idp);\n assert getDBSClient().hasUser(umk, idp);\n Identifier uid = BasicIdentifier.newID(map.get(userKeys.identifier()).toString());\n User user2 = getUserStore().get(uid);\n checkUserAgainstMap(map, user2);\n }", "protected User createUser(final Request req) {\n final User user = new ServletUser(req);\n return user;\n }", "public User(String _username, String _password, String _employeeType) {\n // TODO implement here\n username = _username;\n password = _password;\n employeeType = _employeeType;\n// String taskId = UUID.randomUUID().toString();\n }", "User createUser(User user);", "@Override\n\t\tpublic MyUserBasicInfo create() {\n\t\t\treturn new MyUserBasicInfo();\n\t\t}", "static MinimalUser create(ServletRequest request,\n\t\t\t\tShibbolethUserConfiguration config) {\n\t\t\tHttpServletRequest req = (HttpServletRequest) request;\n\n\t\t\tString username = getHeader(req, config.getUsernameKey(), \"\");\n\t\t\tString surname = getHeader(req, config.getSurnameKey(), \"\");\n\t\t\tString firstname = getHeader(req, config.getFirstnameKey(), \"\");\n\t\t\tString profile = getHeader(req, config.getProfileKey(), \"\");\n\n\t\t\tif (username.trim().length() > 0) {\n\n\t\t\t\tMinimalUser user = new MinimalUser();\n\t\t\t\tuser.setUsername(username);\n\t\t\t\tuser.setName(firstname);\n\t\t\t\tuser.setSurname(surname);\n\t\t\t\tuser.setProfile(profile);\n\t\t\t\treturn user;\n\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "UserModel createUserModel(UserModel userModel);", "CreateUserResult createUser(CreateUserRequest createUserRequest);", "public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"email@gmail.com\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }", "public eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser addNewCreateUser()\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser target = null;\n target = (eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser)get_store().add_element_user(CREATEUSER$0);\n return target;\n }\n }", "private User createUser(String username, String name, String email, String password) {\n UserDTO userDTO = new UserDTO();\n userDTO.setEmail(email);\n userDTO.setName(name);\n userDTO.setPassword(password);\n userDTO.setUsername(username);\n\n userService.registerUser(userDTO);\n\n User user = userService.getUserByEmail(email);\n return user;\n }", "private String createUser(String name) {\n\t\treturn null;\n\t}", "public User(String username, String password) {\n this.userID = UUID.randomUUID();\n this.username = username;\n this.password = password;\n this.isTechAgent = false;\n }", "String createUserRequest(String username, UserRequestType type);", "private User createUser(int index, boolean deleted) {\n User entity = new User();\n\n entity.setDeleted(deleted);\n entity.setUsername(\"username\" + index);\n entity.setDefaultTab(ActionTab.ADMIN);\n entity.setNetworkId(\"networkId\" + index);\n\n Role role = new Role();\n role.setName(\"role\" + index);\n entity.setRole(role);\n create(entity.getRole());\n\n entity.setFirstName(\"firstName\" + index);\n entity.setLastName(\"lastName\" + index);\n entity.setEmail(\"email\" + index);\n entity.setTelephone(\"telephone\" + index);\n\n UserStatus userStatus = new UserStatus();\n userStatus.setName(\"userStatus\" + index);\n entity.setStatus(userStatus);\n create(entity.getStatus());\n\n create(entity);\n\n return entity;\n }", "public void createUserAccount(UserAccount account);", "public boolean newUser(String username, String password, int uType, String fName, String lName, String email){\n\t\ttry{\n\t\t\tresultSet = statement.executeQuery(\"select uid from User where username='\"+username+\"' or email='\"+email+\"'\");\n\t\t\tif(resultSet.next()){\n\t\t\t\tSystem.out.println(\"already in\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tresultSet = statement.executeQuery(\"select max(Uid) from User\");\n\t\t\tresultSet.next();\n\t\t\tint userNumber = resultSet.getInt(1)+1;\n\t\t\tstatement.executeUpdate(\"insert into User values(\"+userNumber+\",'\"+username+\"','\"+password+\"',\"+uType+\",'\"+fName+\"','\"+lName+\"','\"+email+\"',\"+1+\")\");\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "static void CreateNewUserToDB(String[] userData, boolean[] userPermissions) throws IOException, InvalidKeySpecException, NoSuchAlgorithmException, ClassNotFoundException {\n if (CreateNewUser(userData, GetListOfUsers())) {\n Socket client = ConnectionToServer();\n\n // connects to the server with information and attempts to get the auth token\n // for the user after successful Login\n if (client.isConnected()) {\n OutputStream outputStream = client.getOutputStream();\n InputStream inputStream = client.getInputStream();\n\n ObjectOutputStream send = new ObjectOutputStream(outputStream);\n ObjectInputStream receiver = new ObjectInputStream(inputStream);\n\n send.writeUTF(\"createNewUser\");\n send.writeUTF(userData[0]);\n send.writeUTF(userData[1]);\n send.writeUTF(userData[2]);\n send.writeUTF(userData[3]);\n send.writeBoolean(userPermissions[0]);\n send.writeBoolean(userPermissions[1]);\n send.writeBoolean(userPermissions[2]);\n send.writeBoolean(userPermissions[3]);\n send.writeUTF(loggedInUser);\n send.writeUTF(token);\n send.flush();\n\n WasRequestSuccessful(receiver.readBoolean(), receiver.readUTF());\n\n // End connections\n send.close();\n receiver.close();\n client.close();\n }\n }\n }", "public static User create(String firstName, String lastName, String nickName) {\n\t\tUser user = new User();\n\t\tuser.setNickName(nickName);\n\t\tuser.setFirstName(firstName);\n\t\tuser.setLastName(lastName);\n\n\t\treturn user;\n\t}", "public String clientCreateUser(User caller, String type) throws MupeException {\r\n return Person.clientGetCreator(caller, \"Person\");\r\n }", "private void newUser(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\ttry {\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tString name = req.getParameter(Constants.NAME_USER);\n\t\t\tUserDB.introduceUser(name);\n\t\t\tlong id = UserDB.getUserId(name);\n\t\t\tUsuario u = new Usuario(name, Long.toString(id));\n\t\t\tout.print(gson.toJson(u));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t}\n\t}", "private User createWithParameters(Map<String, String> userParameters) {\n User user = new User();\n String passHashed = BCrypt.hashpw(userParameters.get(PASSWORD_PARAMETER_NAME), BCrypt.gensalt());\n user.setUsername(userParameters.get(USERNAME_PARAMETER_NAME));\n user.setPassword(passHashed);\n user.setFirstName(userParameters.get(FIRST_NAME_PARAMETER_NAME));\n user.setLastName(userParameters.get(LAST_NAME_PARAMETER_NAME));\n user.setEmail(userParameters.get(EMAIL_PARAMETER_NAME));\n user.setPhone(userParameters.get(PHONE_PARAMETER_NAME));\n user.setAddress(userParameters.get(ADDRESS_PARAMETER_NAME));\n user.setAccount(BigDecimal.ZERO);\n user.setInitDate(LocalDate.now());\n user.setBlockedUntil(LocalDate.now());\n user.setRole(User.Role.USER);\n return user;\n }", "@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}", "boolean create(User user) throws Exception;", "public IdentifiedUser createNewUser() {\n\t\treturn new Gamer();\n\t}", "private void createUser(Request request, Response response) {\r\n\t\tUserBean userBean = new UserBean();\r\n\t\tRESTfulSession session = null;\r\n\r\n\t\ttry {\r\n\t\t\tBeanHelper.populateUserBeanFromRequest(request, userBean);\r\n\t\t\tString username = userBean.getUsername();\r\n\t\t\tString password = userBean.getPassword();\r\n\t\t\tString email = userBean.getEmail();\r\n\r\n\t\t\tif (StringHelper.isNullOrNullString(username)\r\n\t\t\t\t\t|| StringHelper.isNullOrNullString(password)\r\n\t\t\t\t\t|| StringHelper.isNullOrNullString(email)) {\r\n\t\t\t\tthrow new InvalidInputException();\r\n\t\t\t}\r\n\r\n\t\t\tsession = userService.createUser(userBean);\r\n\t\t} catch (InvalidInputException e) {\r\n\t\t\tresponse.setStatus(Status.CLIENT_ERROR_BAD_REQUEST, e.getMessage());\r\n\t\t} catch (Exception e) {\r\n\t\t\tresponse.setStatus(Status.SERVER_ERROR_INTERNAL, e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tlog.error(e);\r\n\t\t} finally {\r\n\t\t\t// generate response XML\r\n\t\t\txmlSerializationService.generateXMLResponse(request, response,\r\n\t\t\t\t\tsession);\r\n\t\t}\r\n\t}", "@Test\n public void canCreateUser() {\n String nickname = \"test\";\n \n User user = new User(nickname);\n \n assertNotNull(user);\n assertEquals(nickname, user.getNickname());\n assertEquals(0, user.getScore());\n }", "@Test\n\tpublic void newUser() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\n\t\tassertThat(user).isNotNull();\n\t\tassertThat(user).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t}", "public User addNewUser(String entity)\n\t{\n\t\tElement userElement = document.createElement(USER_ELEMENT_NAME);\n\t\tUser user = new User(userElement);\n\t\tuser.setEntity(entity);\n\n\t\tusers.appendChild(userElement);\n\t\tusersList.add(user);\n\n\t\treturn user;\n\t}", "private void createUser(String Address, String Phone_number,String needy) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(userId)) {\n userId = mFirebaseDatabase.push().getKey();\n }\n\n com.glitch.annapurna.needy user = new needy(Address,Phone_number,needy);\n\n mFirebaseDatabase.child(userId).setValue(user);\n\n addUserChangeListener();\n }", "public void createUser(VUser vUser) {\n\t\tUser user = new User();\n\n\t\tboolean match = Pattern.matches(Constants.REGEX_EMAIL, vUser.getEmail());\n\t\tif (!match) {\n\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST, \"El email tiene formato incorrecto.\");\n\t\t}\n\n\t\tif (repo.getUserByEmail(vUser.getEmail()) != null) {\n\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Ya hay un usuario con ese email.\");\n\t\t}\n\n\t\tuser.setEmail(vUser.getEmail());\n\t\tuser.setFullName(vUser.getFullName());\n\t\t\n\t\tif(vUser.getFullName() == null || vUser.getFullName().isEmpty()) {\n\t\t\tuser.setFullName(vUser.getEmail());\n\t\t}\n\n\t\t// TODO: hashear password\n\t\tuser.setPasswordHash(vUser.getPassword());\n\n\t\tuser.setRoles(vUser.getRoles());\n\t\tuser.setUserType(vUser.getUserType());\n\n\t\trepo.createUser(user);\n\t}", "public void create(String userName, String password, String userFullname,\r\n\t\t\tString userSex, int userTel, String role);", "public eu.aladdin_project.xsd.User addNewUser()\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.xsd.User target = null;\n target = (eu.aladdin_project.xsd.User)get_store().add_element_user(USER$0);\n return target;\n }\n }", "public User(String name) {\n this(UUID.randomUUID().toString(), name, String.format(\"User account for %s\", name) );\n }", "public UserTO createUser(String name, String email, String password) {\n\t\tUserTO res = new UserTO();\n\n\t\tres.setName(name);\n res.setEmail(email);\n res.setPassword(password);\n\t\tres.setCreationDate(new Date());\n\t\tres.setModifyDate(new Date());\n\t\tres.setActive(true);\n\n\t\treturn res;\n\t}", "public User(String username, String password, UserType type) {\r\n\t if (username == null || username.isEmpty() || password == null || password.isEmpty() || type == null) {\r\n\t throw new IllegalArgumentException(\"User : username or password or user type passed can not be null.\");\r\n\t }\r\n this.email = new Email(EmailType.PERSONAL, username);\r\n\t\tthis.username = username;\r\n\t\tthis.password = encrypt(password);\r\n\t\tthis.displayname = username;\r\n this.type = type;\r\n\t\tthis.status = InstanceStatus.TRANSCIENT;\r\n\t}", "public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}", "public void createUser(int usertype) {\n\t\tthePerson = PersonFactory.getPerson(usertype);\n\t}", "Account create();", "void registerNewUser(String login, String name, String password, String matchingPassword,\n String email);", "@Test\n void createUserReturnsNull() {\n Address address = new Address(\"Earth\", \"Belgium\", \"City\", \"Street\", 0);\n User user = new User(\"Mira\", \"Vogelsang\", \"0412345678\", \"maarten@maarten\", \"pass\", address);\n\n assertNull(controller.createUser(user));\n }", "@Override\n public User signUpUser(String name, String username, String password, String email) throws UsernameExistsException {\n User u = new User(name, username, password, email);\n if (userDataMapper.getUserByUserName(username) != null)\n throw new UsernameExistsException();\n userDataMapper.add(u);\n return u;\n }", "public UserProfile createUserProfile(String username, UserProfile newProfile);", "Boolean registerNewUser(User user);", "public void createUser(String userName, String password,\n boolean createDB) throws Exception;", "public void createUser(SignUpDto signupdto) {\n\t\tUser user = new User();\r\n\t\t\r\n\t\tuser.setId(signupdto.getId());\r\n\t\tuser.setPw(signupdto.getPw());\r\n\t\tuser.setNickname(signupdto.getNickname());\r\n\t\t\r\n\t\tuserRepository.save(user);\t\r\n\t}", "@Test\n public void testCreateValidUser() {\n LocalUserManager ua = new LocalUserManager();\n\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"gburdell1@gatech.edu\", \"George\", \"Burdell\", \"MANAGER\");\n } catch (Exception e) {\n Assert.fail();\n }\n Assert.assertEquals(1, ua.getUsers().size());\n Assert.assertEquals(\"gburdell1\", ua.getUsers().get(0).getUsername());\n Assert.assertEquals(\"gburdell1@gatech.edu\", ua.getUsers().get(0).getEmail());\n Assert.assertEquals(UserClass.MANAGER, ua.getUsers().get(0).getUserClass());\n }", "public static User createUser(Integer userId, String firstName, String lastName,\r\n\t\t\tString email, String userName, String companyName) {\r\n\t\tUser user = new User();\r\n\t\tif (userId != null) {\r\n\t\t\tuser.setUserId(userId);\r\n\t\t}\r\n\t\tuser.setFirstName(firstName);\r\n\t\tuser.setLastName(lastName);\r\n\t\tuser.setEmail(email);\r\n\t\tuser.setUserName(userName);\r\n\t\tuser.setCompanyName(companyName); \r\n\t\treturn user;\r\n\t}", "public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void createUser() throws ServletException, IOException {\n\t\tString fullname = request.getParameter(\"fullname\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString email = request.getParameter(\"email\");\n\t\tUsers getUserByEmail = productDao.findUsersByEmail(email);\n\t\t\n\t\tif(getUserByEmail != null) {\n\t\t\tString errorMessage = \"we already have this email in database\";\n\t\t\trequest.setAttribute(\"message\", errorMessage);\n\t\t\t\n\t\t\tString messagePage = \"message.jsp\";\n\t\t\tRequestDispatcher requestDispatcher = request.getRequestDispatcher(messagePage);\n\t\t\trequestDispatcher.forward(request, response);\n\t\t}\n\t\t// create a new instance of users class;\n\t\telse {\n\t\t\tUsers user = new Users();\n\t\t\tuser.setPassword(password);\n\t\t\tuser.setFullName(fullname);\n\t\t\tuser.setEmail(email);\n\t\t\tproductDao.Create(user);\n\t\t\tlistAll(\"the user was created\");\n\t\t}\n\n\t\t\n\t}", "public Person createAdminUser(Register entity) {\t\t\n\t\tPerson person = new Person();\n\t\tif(!searchPersonNew(entity)) {\t\t\t\n\t\t\tperson = factory.createPerson(entity);\t\t\t\t\t\t\n\t\t\tcreate(person);\t\t\t\n\t\t}\t\t\n\t\treturn person;\n\t}", "@Override\n\tpublic void create(User user) {\n\t\t\n\t}", "public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }", "User create(User user);", "public static ExUser createEntity(EntityManager em) {\n ExUser exUser = new ExUser()\n .userKey(DEFAULT_USER_KEY);\n return exUser;\n }", "User create(final User user) throws DatabaseException;", "public void createAndAddUser(String fName, String lName){\n ModelPlayer user = new ModelPlayer(fName, lName);\n user.setUserID(this.generateNewId());\n userListCtrl.addUser(user);\n }", "public boolean newUser(String email, String senha) {\n try {\n return usDao.newUser(email, senha);\n } catch (SQLException ex) {\n throw new RuntimeException(\"an error occurred trying to add a new user to database: \" + ex.getMessage());\n }\n }", "public void createUtilisateur(UtilisateurBean u) {\n\t}", "public User(String n) { // constructor\r\n name = n;\r\n }", "public User(String username, String password, boolean isTechAgent) {\n // The hashpw method hashes password with a random salt.\n String pw_hash = BCrypt.hashpw(password, BCrypt.gensalt());\n this.userID = UUID.randomUUID();\n this.username = username;\n this.password = pw_hash;\n this.isTechAgent = isTechAgent;\n }", "User createUser(UserCreationModel user);", "public User(String nom, String prenom, String email, String pwd) {\r\n\t\tsuper();\r\n\t\tthis.nom = nom;\r\n\t\tthis.prenom = prenom;\r\n\t\tthis.email = email;\r\n\t\tthis.pwd = pwd;\r\n\t}", "public User() {}", "public User() {}", "public User() {}", "UserAccount createUserAccount(User user, double amount);", "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 }", "public CreateUser(UserRepository userRepo, String username,\n\t\t\tString password, String email, String fullname) {\n\t\tthis.userRepository = userRepo;\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t\tthis.email = email;\n\t\tthis.fullname = fullname;\n\t}", "public MetaUser createMetaUser(String sName) throws IOException;", "public static UserProcess newUserProcess() {\n\treturn (UserProcess)Lib.constructObject(Machine.getProcessClassName());\n }", "public static User newUser(User user){\n //add into map\n users.put(user.getUserID(), user);\n //return user object, ik its kinda stupid cuz it doesn't do anything lol\n return user;\n }", "void registerUser(User newUser);" ]
[ "0.7351117", "0.71109444", "0.6882757", "0.67565775", "0.67250305", "0.67177755", "0.66996545", "0.66743356", "0.6616342", "0.66116285", "0.65399545", "0.6499985", "0.64473146", "0.64243525", "0.6403742", "0.6372616", "0.63623697", "0.6326778", "0.6317413", "0.6316049", "0.6284669", "0.6282738", "0.6232933", "0.62239355", "0.62180036", "0.62081033", "0.61985", "0.61923325", "0.61888456", "0.6188071", "0.6172666", "0.61530405", "0.6138193", "0.6136774", "0.6130956", "0.6121856", "0.6118754", "0.61121994", "0.6110267", "0.61100197", "0.6107958", "0.60941666", "0.6089866", "0.6087121", "0.60732824", "0.60663116", "0.60604846", "0.6023312", "0.6021796", "0.60205585", "0.60052055", "0.5994233", "0.5987119", "0.59867764", "0.5976946", "0.59692216", "0.5967744", "0.5964393", "0.59616977", "0.595951", "0.59488285", "0.5943256", "0.59418577", "0.59373665", "0.5936849", "0.5936685", "0.59362245", "0.59319896", "0.5930615", "0.5929712", "0.59265924", "0.5925399", "0.59238327", "0.59185636", "0.591658", "0.59094894", "0.5908563", "0.59054", "0.59052014", "0.5899474", "0.58943796", "0.5893791", "0.58873624", "0.58809197", "0.5875369", "0.58665705", "0.5865271", "0.5856806", "0.58396727", "0.5835744", "0.58280283", "0.5821653", "0.5821653", "0.5821653", "0.5820551", "0.5816746", "0.5813172", "0.5812084", "0.58095443", "0.58064115", "0.5797143" ]
0.0
-1
The core method that handles communications among GridSim entities.
public void body() { // wait for a little while for about 10 seconds. // This to give a time for GridResource entities to register their // services to GIS (GridInformationService) entity. super.gridSimHold(10.0); //////////////////////////////////////////////// // SUBMIT Gridlets super.send(broker.get_id(), GridSimTags.SCHEDULE_NOW, GridSimTags.EXPERIMENT, auctions); // hold for few period - few seconds since the Gridlets length are // quite huge for a small bandwidth super.gridSimHold(5); Sim_event ev = new Sim_event(); // waits until experiment results are sent back sim_get_next(ev); while(ev.get_tag() != GridSimTags.EXPERIMENT){ sim_get_next(ev); } receiveJobs = (GridletList) ev.get_data(); //////////////////////////////////////////////////////// // shut down I/O ports shutdownUserEntity(); terminateIOEntities(); super.send(broker.get_id(), GridSimTags.SCHEDULE_NOW, GridSimTags.END_OF_SIMULATION); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void execute() {\n\t\tlog.info(\"running...\");\n\n\n\t\t/* example for finding the server agent */\n\t\tIAgentDescription serverAgent = thisAgent.searchAgent(new AgentDescription(null, \"ServerAgent\", null, null, null, null));\n\t\tif (serverAgent != null) {\n\t\t\tthis.server = serverAgent.getMessageBoxAddress();\n\n\t\t\t// TODO\n\t\t\tif (!hasGameStarted) {\n\t\t\t\tStartGameMessage startGameMessage = new StartGameMessage();\n\t\t\t\tstartGameMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\tstartGameMessage.gridFile = \"/grids/h_01.grid\";\n\t\t\t\t// Send StartGameMessage(BrokerID)\n\t\t\t\tsendMessage(server, startGameMessage);\n\t\t\t\treward = 0;\n\t\t\t\tthis.hasGameStarted = true;\n\t\t\t}\n\n\t\t} else {\n\t\t\tSystem.out.println(\"SERVER NOT FOUND!\");\n\t\t}\n\n\n\t\t/* example of handling incoming messages without listener */\n\t\tfor (JiacMessage message : memory.removeAll(new JiacMessage())) {\n\t\t\tObject payload = message.getPayload();\n\n\t\t\tif (payload instanceof StartGameResponse) {\n\t\t\t\t/* do something */\n\n\t\t\t\t// TODO\n\t\t\t\tStartGameResponse startGameResponse = (StartGameResponse) message.getPayload();\n\n\t\t\t\tthis.maxNum = startGameResponse.initialWorkers.size();\n\t\t\t\tthis.agentDescriptions = getMyWorkerAgents(this.maxNum);\n\t\t\t\tthis.gameId = startGameResponse.gameId;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + startGameResponse.toString());\n\n\t\t\t\t// TODO handle movements and obstacles\n\t\t\t\tthis.gridworldGame = new GridworldGame();\n\t\t\t\tthis.gridworldGame.obstacles.addAll(startGameResponse.obstacles);\n\n\n\n\t\t\t\t// TODO nicht mehr worker verwenden als zur Verfügung stehen\n\n\t\t\t\t/**\n\t\t\t\t * Initialize the workerIdMap to get the agentDescription and especially the\n\t\t\t\t * MailBoxAdress of the workerAgent which we associated with a specific worker\n\t\t\t\t *\n\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAId.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\t\t\t\t} */\n\n\t\t\t\t/**\n\t\t\t\t * Send the Position messages to each Agent for a specific worker\n\t\t\t\t * PositionMessages are sent to inform the worker where it is located\n\t\t\t\t * additionally put the position of the worker in the positionMap\n\t\t\t\t */\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tpositionMap.put(worker.id, worker.position);\n\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAID.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(worker.id);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\t// Send each Agent their current position\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = startGameResponse.gameId;\n\t\t\t\t\tpositionMessage.position = worker.position;\n\t\t\t\t\tpositionMessage.workerIdForServer = worker.id;\n\t\t\t\t\t//System.out.println(\"ADDRESS IS \" + workerAddress);\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t\t//break;\n\t\t\t\t}\n\n\t\t\t\thasAgents = true;\n\n\t\t\t\tfor (Order order: savedOrders) {\n\t\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(order);\n\t\t\t\t\tPosition workerPosition = null;\n\t\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tint steps = workerPosition.distance(order.position) + 2;\n\t\t\t\t\tint rewardMove = (steps > order.deadline)? 0 : order.value - steps * order.turnPenalty;\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\t\ttakeOrderMessage.orderId = order.id;\n\t\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\t\ttakeOrderMessage.gameId = gameId;\n\t\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionConfirm) {\n\t\t\t\tPositionConfirm positionConfirm = (PositionConfirm) message.getPayload();\n\t\t\t\tif(positionConfirm.state == Result.FAIL) {\n\t\t\t\t\tString workerId = workerIdReverseAID.get(positionConfirm.workerId);\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(workerId);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = positionConfirm.gameId;\n\t\t\t\t\tpositionMessage.position = positionMap.get(workerId);\n\t\t\t\t\tpositionMessage.workerIdForServer = workerId;\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t} else {\n\t\t\t\t\tactiveWorkers.add(message.getSender());\n\t\t\t\t\tfor (String orderId: orderMessages) {\n\t\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(this.orderMap.get(orderId));\n\t\t\t\t\t\tif(workerAddress.equals(message.getSender())){\n\t\t\t\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\t\t\t\tassignOrderMessage.order = this.orderMap.get(orderId);\n\t\t\t\t\t\t\tassignOrderMessage.gameId = gameId;\n\t\t\t\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tif (payload instanceof OrderMessage) {\n\n\t\t\t\t// TODO entscheide, ob wir die Order wirklich annehmen wollen / können\n\n\t\t\t\tOrderMessage orderMessage = (OrderMessage) message.getPayload();\n\n\t\t\t\tif (!hasAgents){\n\t\t\t\t\tsavedOrders.add(orderMessage.order);\n\t\t\t\t\tcontinue;\n\t\t\t\t}else {\n\t\t\t\t\tOrder thisOrder = orderMessage.order;\n\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(thisOrder);\n\t\t\t\tPosition workerPosition = null;\n\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tint steps = workerPosition.distance(thisOrder.position) + 1;\n\t\t\t\t\tint rewardMove = (steps > thisOrder.deadline)? 0 : thisOrder.value - steps * thisOrder.turnPenalty;\n\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\ttakeOrderMessage.orderId = orderMessage.order.id;\n\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\ttakeOrderMessage.gameId = orderMessage.gameId;\n\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\tOrder order = ((OrderMessage) message.getPayload()).order;\n\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + orderMessage.toString());\n\n\t\t\t\t// Save order into orderMap\n\n\t\t\t}\n\n\t\t\tif (payload instanceof TakeOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\t// Got Order ?!\n\t\t\t\tTakeOrderConfirm takeOrderConfirm = (TakeOrderConfirm) message.getPayload();\n\t\t\t\tResult result = takeOrderConfirm.state;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + takeOrderConfirm.toString());\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\n\t\t\t\t\t// Remove order from orderMap as it was rejected by the server\n\t\t\t\t\tthis.orderMap.remove(takeOrderConfirm.orderId);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\t// TODO send serverAddress\n\t\t\t\t// Assign order to Worker(Bean)\n\t\t\t\t// Send the order to the first agent\n\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\tassignOrderMessage.order = this.orderMap.get(takeOrderConfirm.orderId);\n\t\t\t\tassignOrderMessage.gameId = takeOrderConfirm.gameId;\n\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(assignOrderMessage.order);\n\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t} else {\n\t\t\t\t\torderMessages.add(takeOrderConfirm.orderId);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (payload instanceof AssignOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\tAssignOrderConfirm assignOrderConfirm = (AssignOrderConfirm) message.getPayload();\n\t\t\t\tResult result = assignOrderConfirm.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\t\t\t\t\t// TODO\n\t\t\t\t\tICommunicationAddress alternativeWorkerAddress = getAlternativeWorkerAddress(((AssignOrderConfirm) message.getPayload()).workerId);\n\t\t\t\t\treassignOrder(alternativeWorkerAddress, assignOrderConfirm);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\torderMessages.remove(assignOrderConfirm.orderId);\n\n\t\t\t\t// TODO Inform other workers that this task is taken - notwendig??\n\n\t\t\t}\n\n\t\t\tif (payload instanceof OrderCompleted) {\n\n\t\t\t\tOrderCompleted orderCompleted = (OrderCompleted) message.getPayload();\n\t\t\t\tResult result = orderCompleted.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// TODO Handle failed order completion -> minus points for non handled rewards\n\t\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t// TODO remove order from the worker specific order queues\n\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionUpdate) {\n\n\t\t\t\tPositionUpdate positionUpdate = (PositionUpdate) message.getPayload();\n\t\t\t\tupdateWorkerPosition(positionUpdate.position, positionUpdate.workerId);\n\n\t\t\t}\n\n\t\t\tif (payload instanceof EndGameMessage) {\n\n\t\t\t\tEndGameMessage endGameMessage = (EndGameMessage) message.getPayload();\n\t\t\t\t// TODO lernen lernen lernen lol\n\t\t\t\tSystem.out.println(\"Reward: \" + endGameMessage.totalReward);\n\t\t\t}\n\n\t\t}\n\t}", "@Override\n protected void postConnect() {\n super.postConnect();\n //creates arrays list for buildings, roads and refuges of the world model\n \n buildingIDs = new ArrayList<EntityID>();\n roadIDs = new ArrayList<EntityID>();\n refugeIDs = new ArrayList<EntityID>();\n \n \n //assign values to buildings, roads and refuges according to model\n for (StandardEntity next : model) {\n if (next instanceof Building) {\n buildingIDs.add(next.getID());\n }\n if (next instanceof Road) {\n roadIDs.add(next.getID());\n }\n if (next instanceof Refuge) {\n refugeIDs.add(next.getID());\n }\n \n }\n \n /**\n * sets communication via radio\n */\n boolean speakComm = config.getValue(Constants.COMMUNICATION_MODEL_KEY).equals(ChannelCommunicationModel.class.getName());\n\n int numChannels = this.config.getIntValue(\"comms.channels.count\");\n \n if((speakComm) && (numChannels > 1)){\n \tthis.channelComm = true;\n }else{\n \tthis.channelComm = false;\n }\n \n /*\n * Instantiate a new SampleSearch\n * Sample Search creates a graph for the world model\n * and implements a bread first search for use as well.\n */\n search = new SampleSearch(model);\n\n neighbours = search.getGraph();\n useSpeak = config.getValue(Constants.COMMUNICATION_MODEL_KEY).equals(SPEAK_COMMUNICATION_MODEL);\n Logger.debug(\"Modelo de Comunicação: \" + config.getValue(Constants.COMMUNICATION_MODEL_KEY));\n Logger.debug(useSpeak ? \"Usando modelo SPEAK\" : \"Usando modelo SAY\");\n }", "public interface CommunicationUser {\n\t\n\t/**\n\t * Provide communication API that allows for communication with other object in the simulator.\n\t * Method is a callback for the registration of the object in {@link CommunicationModel}\n\t * @param api the access to the communication infrastructure \n\t */\n\tvoid setCommunicationAPI(CommunicationAPI api);\n\t\n\t/**\n\t * Get position. The position is required to determine the entities you can communicate with \n\t * @return positing on the communication user or <code>null</code> if object is not positioned \n\t */\n\tPoint getPosition();\n\t\n\t/**\n\t * Get the distance in which you want to communicate. \n\t * @return\n\t */\n\tdouble getRadius();\n\t\n\t/**\n\t * Get the connection reliability. This is probability (0,1] that the message is send/received.\n\t * When two entities communicate the probability of message delivery is a product of their reliability. \n\t * @return\n\t */\n\tdouble getReliability();\n\t\n\t/**\n\t * Receive the message. Multiple messages might be delivered during one tick of the simulator. \n\t * The simple implementation of handling multiple messages is provided in {@link Mailbox} \n\t * @param message delivered\n\t */\n\tvoid receive(Message message);\n}", "public void send() {\n\t}", "private void invokeSync()\n \t{\n if (iDeviceList.size() == 0)\n {\n System.out.println(\"No devices found, so nothing to test\");\n return;\n }\n CpDevice device = iDeviceList.get(0);\n System.out.println(\"\\n\\nSync call to device \" + device.getUdn());\n \n CpProxyUpnpOrgConnectionManager1 connMgr = new CpProxyUpnpOrgConnectionManager1(device);\n try {\n GetProtocolInfo points = connMgr.syncGetProtocolInfo();\n System.out.println(\"source is \" + points.getSource() + \"\\nsink is \" + points.getSink());\n } catch (ProxyError pe) { }\n connMgr.dispose();\n \t}", "public void communicate() {\n // Send\n for (int i = 0; i < robots.length; i++) {\n if (i != this.id) {\n if (objectFound) {\n System.out.println(\"Robot \" + this.id + \": Telling everyone else...\");\n this.robots[i].mailbox[i] = new Message(this.id, this.objectFound, goal);\n } else {\n this.robots[i].mailbox[i] = new Message(this.id, this.objectFound, null);\n }\n }\n }\n // Read\n for (int i = 0; i < mailbox.length; i++) {\n if (i != this.id && mailbox[i] != null && mailbox[i].objectFound) {\n this.objectFound = true;\n this.goal = mailbox[i].objectLocation;\n }\n }\n }", "@Override\r\n\tpublic void send() throws Exception {\n\t\t\r\n\t}", "@Override\n/**\n * Communication Tester method\n */\npublic String Communicate() throws RemoteException {\n\treturn \"Server Says Hi\";\n}", "protected CommunicationsHandler(){}", "public void run(){\r\n\t\tsynchronized(this){\r\n\t\t\tObjectServer db4oServer = Db4o.openServer(getDbDirectory() + FILE, PORT);\r\n\t\t\tdb4oServer.grantAccess(USER, PASS);\r\n\r\n\t\t\t// Using the messaging functionality to redirect all\r\n\t\t\t// messages to this.processMessage\r\n\t\t\tdb4oServer.ext().configure().clientServer().setMessageRecipient(this);\r\n\r\n\t\t\t// to identify the thread in a debugger\r\n\t\t\tThread.currentThread().setName(this.getClass().getName());\r\n\r\n\t\t\t// We only need low priority since the db4o server has\r\n\t\t\t// it's own thread.\r\n\t\t\tThread.currentThread().setPriority(Thread.MIN_PRIORITY);\r\n\t\t\ttry {\r\n\t\t\t\t\tif(! stop){\r\n\t\t\t\t\t\t// wait forever for notify() from close()\r\n\t\t\t\t\t\tthis.wait(Long.MAX_VALUE);\r\n\t\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tdb4oServer.close();\r\n\t\t}\r\n\t}", "public interface NogServer extends Remote {\n \n /**\n * getParticipants\n * @return list of participants\n * @throws RemoteException thrown when problem with remote method-call occurs.\n */\n public ArrayList<Participant> getParticipants() throws RemoteException;\n \n /**\n * putParticipants\n * @param tableParticipants list of participantDTO\n * @throws RemoteException thrown when problem with remote method-call occurs.\n */\n public void putParticipants(ArrayList<ParticipantDTO> tableParticipants) throws RemoteException;\n \n /**\n * register a client\n * @param client remote client\n * @throws RemoteException thrown when problem with remote method-call occurs.\n */\n public void registerClient(Client client) throws RemoteException;\n \n /**\n * deRegister client\n * @param client remote client\n * @throws RemoteException thrown when problem with remote method-call occurs.\n */\n public void deRegisterClient(Client client) throws RemoteException;\n \n /**\n * Edit participant\n * @param p edited participant\n * @throws RemoteException thrown when problem with remote method-call occurs.\n */\n public void editParticipant(ParticipantDTO p) throws RemoteException;\n \n /**\n * Add new participant\n * @param p participant to add\n * @throws RemoteException thrown when problem with remote method-call occurs.\n */\n public void addParticipant(ParticipantDTO p) throws RemoteException;\n \n /**\n * Delete participant\n * @param p participant to delete\n * @throws RemoteException thrown when problem with remote method-call occurs.\n */\n public void deleteParticipant(ParticipantDTO p) throws RemoteException;\n \n}", "private void sendUpdateConnectionInfo() {\n\n }", "@Override\n\tpublic void run()\n\t{\n\t\tSocket clientSocket;\n\t\tMemoryIO serverIO;\n\t\t// Detect whether the listener is shutdown. If not, it must be running all the time to wait for potential connections from clients. 11/27/2014, Bing Li\n\t\twhile (!super.isShutdown())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Wait and accept a connecting from a possible client residing on the coordinator. 11/27/2014, Bing Li\n\t\t\t\tclientSocket = super.accept();\n\t\t\t\t// Check whether the connected server IOs exceed the upper limit. 11/27/2014, Bing Li\n\t\t\t\tif (MemoryIORegistry.REGISTRY().getIOCount() >= ServerConfig.MAX_SERVER_IO_COUNT)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// If the upper limit is reached, the listener has to wait until an existing server IO is disposed. 11/27/2014, Bing Li\n\t\t\t\t\t\tsuper.holdOn();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (InterruptedException e)\n\t\t\t\t\t{\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the upper limit of IOs is not reached, a server IO is initialized. A common Collaborator and the socket are the initial parameters. The shared common collaborator guarantees all of the server IOs from a certain client could notify with each other with the same lock. Then, the upper limit of server IOs is under the control. 11/27/2014, Bing Li\n//\t\t\t\tserverIO = new MemoryIO(clientSocket, super.getCollaborator(), ServerConfig.COORDINATOR_PORT_FOR_MEMORY);\n\t\t\t\tserverIO = new MemoryIO(clientSocket, super.getCollaborator());\n\t\t\t\t// Add the new created server IO into the registry for further management. 11/27/2014, Bing Li\n\t\t\t\tMemoryIORegistry.REGISTRY().addIO(serverIO);\n\t\t\t\t// Execute the new created server IO concurrently to respond the client requests in an asynchronous manner. 11/27/2014, Bing Li\n\t\t\t\tsuper.execute(serverIO);\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void run(){\r\n\t\tsynchronized(this){\r\n\t\t\tObjectServer db4oServer = Db4o.openServer(FILE, PORT);\r\n\t\t\tdb4oServer.grantAccess(USER, PASS);\r\n\t\t\t\r\n\t\t\t// Using the messaging functionality to redirect all\r\n\t\t\t// messages to this.processMessage\r\n\t\t\tdb4oServer.ext().configure().clientServer().setMessageRecipient(this);\r\n\t\t\t\r\n\t\t\t// to identify the thread in a debugger\r\n\t\t\tThread.currentThread().setName(this.getClass().getName());\r\n\t\t\t\r\n\t\t\t// We only need low priority since the db4o server has\r\n\t\t\t// it's own thread.\r\n\t\t\tThread.currentThread().setPriority(Thread.MIN_PRIORITY);\r\n\t\t\ttry {\r\n\t\t\t\t\tif(! stop){\r\n\t\t\t\t\t\t// wait forever for notify() from close()\r\n\t\t\t\t\t\tthis.wait(Long.MAX_VALUE); \r\n\t\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tdb4oServer.close();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}", "@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"this is send\");\n\t}", "public interface Transport {\n\n /**\n * This method returns id of the current transport\n * @return\n */\n String id();\n\n /**\n * This methos returns Id of the upstream node\n * @return\n */\n String getUpstreamId();\n\n /**\n * This method returns random\n *\n * @param id\n * @param exclude\n * @return\n */\n String getRandomDownstreamFrom(String id, String exclude);\n\n /**\n * This method returns consumer that accepts messages for delivery\n * @return\n */\n Consumer<VoidMessage> outgoingConsumer();\n\n /**\n * This method returns flow of messages for parameter server\n * @return\n */\n Publisher<INDArrayMessage> incomingPublisher();\n\n /**\n * This method starts this Transport instance\n */\n void launch();\n\n /**\n * This method will start this Transport instance\n */\n void launchAsMaster();\n\n /**\n * This method shuts down this Transport instance\n */\n void shutdown();\n\n /**\n * This method will send message to the network, using tree structure\n * @param message\n */\n void propagateMessage(VoidMessage message, PropagationMode mode) throws IOException;\n\n /**\n * This method will send message to the node specified by Id\n *\n * @param message\n * @param id\n */\n void sendMessage(VoidMessage message, String id);\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id) throws InterruptedException;\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id, long waitTime, TimeUnit timeUnit) throws InterruptedException;\n\n /**\n * This method will be invoked for all incoming messages\n * PLEASE NOTE: this method is mostly suited for tests\n *\n * @param message\n */\n void processMessage(VoidMessage message);\n\n\n /**\n * This method allows to set callback instance, which will be called upon restart event\n * @param callback\n */\n void setRestartCallback(RestartCallback callback);\n\n /**\n * This methd allows to set callback instance for various\n * @param cls\n * @param callback\n * @param <T1> RequestMessage class\n * @param <T2> ResponseMessage class\n */\n <T extends RequestMessage> void addRequestConsumer(Class<T> cls, Consumer<T> consumer);\n\n /**\n * This method will be called if mesh update was received\n *\n * PLEASE NOTE: This method will be called ONLY if new mesh differs from current one\n * @param mesh\n */\n void onMeshUpdate(MeshOrganizer mesh);\n\n /**\n * This method will be called upon remap request\n * @param id\n */\n void onRemap(String id);\n\n /**\n * This method returns total number of nodes known to this Transport\n * @return\n */\n int totalNumberOfNodes();\n\n\n /**\n * This method returns ID of the root node\n * @return\n */\n String getRootId();\n\n /**\n * This method checks if all connections required for work are established\n * @return true\n */\n boolean isConnected();\n\n /**\n * This method checks if this node was properly introduced to driver\n * @return\n */\n boolean isIntroduced();\n\n /**\n * This method checks connection to the given node ID, and if it's not connected - establishes connection\n * @param id\n */\n void ensureConnection(String id);\n}", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "public void treatment()\n {\n\t\tCommunicationManagerServer cms = CommunicationManagerServer.getInstance();\n\t\tDataServerToComm dataInterface = cms.getDataInterface();\n\t\t/** On récupère et stocke l'adresse IP du serveur\n\t\t */\n\t\tdataInterface.updateUserChanges(user);\n\n\t /** Création du message pour le broadcast des informations**/\n\t updatedAccountMsg message = new updatedAccountMsg(this.user);\n\t\tmessage.setPort(this.getPort());\n\t cms.broadcast(message);\n\t}", "public void DispatchUpdates()\n {\n //Dispatch the updates.\n bBufferingUpdates = false;\n \n for(LaunchEntity entity : DispatchList)\n {\n for(LaunchServerSession session : Sessions.values())\n {\n if(session.CanReceiveUpdates())\n {\n session.SendEntity(entity);\n }\n }\n }\n }", "public void sendEntity(Entity entity);", "public interface Communicator {\n\n\n public void sendData(String string);\n public void sendNIDcardObject(NIDCard nidCard);\n public void startWelcomeFragment();\n public void stopWelcomeFragment();\n public void startStepOne();\n}", "public void body() {\r\n \t // wait for a little while for about 3 seconds.\r\n // This to give a time for GridResource entities to register their\r\n // services to GIS (GridInformationService) entity.\r\n super.gridSimHold(1000.0);\r\n System.out.println(name_ + \": retrieving GridResourceList\");\r\n LinkedList resList = super.getGridResourceList();\r\n double[] sendTime = new double[totalGridlet];\r\n double[] receiveTime = new double[totalGridlet];\r\n \r\n // initialises all the containers\r\n int totalResource = resList.size();\r\n write(name_ + \": obtained \" + totalResource + \" resource IDs in GridResourceList\");\r\n int resourceID[] = new int[totalResource];\r\n String resourceName[] = new String[totalResource];\r\n \r\n //get characteristics of resources\r\n ResourceCharacteristics resChar;\r\n double resourceCost[] = new double[totalResource];\r\n double resourcePEs[] = new double[totalResource];\r\n int i = 0 ;\r\n for (i = 0; i < totalResource; i++)\r\n {\r\n // Resource list contains list of resource IDs not grid resource\r\n // objects.\r\n resourceID[i] = ( (Integer)resList.get(i) ).intValue();\r\n\r\n // Requests to resource entity to send its characteristics\r\n super.send(resourceID[i], GridSimTags.SCHEDULE_NOW,\r\n GridSimTags.RESOURCE_CHARACTERISTICS, this.myId_);\r\n\r\n // waiting to get a resource characteristics\r\n resChar = (ResourceCharacteristics) super.receiveEventObject();\r\n resourceName[i] = resChar.getResourceName();\r\n resourceCost[i] = resChar.getCostPerSec();\r\n resChar.getNumFreePE();\r\n resourcePEs[i] = resChar.getNumPE();\r\n\r\n write(\"Received ResourceCharacteristics from \" +\r\n resourceName[i] + \", with id = \" + resourceID[i] + \" with \" + resourcePEs[i] + \" PEs\");\r\n\r\n // record this event into \"stat.txt\" file\r\n super.recordStatistics(\"\\\"Received ResourceCharacteristics \" +\r\n \"from \" + resourceName[i] + \"\\\"\", \"\");\r\n }\r\n \r\n //total PE number\r\n double totalPEs = 0;\r\n for(i = 0; i < totalResource; i++){\r\n \ttotalPEs += resourcePEs[i];\r\n }\r\n\r\n\r\n ////////////////////////////////////////////////\r\n // SUBMIT Gridlets\r\n Gridlet gl = null;\r\n boolean success;\r\n \r\n //initial populating of PEs\r\n \r\n int j = 0; //number of gridlet\r\n int k = 0; // number of PE\r\n startTime = GridSim.clock(); ///Start time of the submission;\r\n for(i = 0; i < totalResource; i++){ \r\n \tfor(k = 0; k < resourcePEs[i] && j < list_.size(); k++){\r\n \t\tgl = (Gridlet) list_.get(j);\r\n \t\tif(j % chunkSize == 0){\r\n \t\t\tSystem.out.println(\" .\" + j + \" / \" + totalGridlet );\r\n \t\t\t//write(name_ + \"Sending Gridlet #\" + j + \"with id \" + gl.getGridletID() + \" to PE \" + k + \" at \" + resourceName[i] + \" at time \" + GridSim.clock());\r\n \t\t}\r\n \t\t\t//write(gridletToString(gl));\r\n success = super.gridletSubmit(gl, resourceID[i]);\r\n sendTime[j]= GridSim.clock(); //remember the time when the gridlet was submited\r\n j++;\r\n \t}\r\n }\r\n write(name_ +\"%%%%%%%%%%% \" + j + \"gridlets submitted, \" + (list_.size() - j) + \" gridlets left after initial submision\");\r\n \r\n ////////////////////////////////////////////////////////\r\n // RECEIVES Gridlets and submit new\r\n\r\n // hold for few period - few seconds since the Gridlets length are\r\n // quite huge for a small bandwidth\r\n //super.gridSimHold(5);\r\n \r\n int resourceFromID = 0;\r\n String resourceFromName = null;\r\n \r\n // receives the gridlet back\r\n for (i = 0; i < totalGridlet; i++){ //loop over received gridlets\r\n gl = (Gridlet) super.receiveEventObject(); // gets the Gridlet\r\n if( i==0 ) { saturationStart = GridSim.clock();} //first gridlet received \r\n receiveTime[list_.indexOf(gl)]= GridSim.clock(); //remember the time when the gridlet was received\r\n receiveList_.add(gl); // add into the received list \r\n resourceFromID = gl.getResourceID(); //resource which has a free PE\r\n resourceFromName = GridSim.getEntityName(resourceFromID);\r\n //if(j % (list_.size() / 100) == 0){\r\n \t//write(name_ + \": Receiving Gridlet #\" +\r\n //gl.getGridletID() + \"from: \" + resourceFromName + \" at time = \" + GridSim.clock() );\r\n //}\r\n \r\n if(j < totalGridlet){ //if not all gridlets are submitted\r\n \t//submit next gridlet\r\n \tgl = (Gridlet) list_.get(j);\r\n \t//if(j % (list_.size() / 100) == 0){\r\n \t\t//write(name_ + \"Sending next Gridlet #\" + j + \"with id \" + gl.getGridletID() + \" to \" + resourceFromName + \" at time \" + GridSim.clock());\r\n \t//}\r\n \t\r\n \t\tif(j % chunkSize == 0){\r\n \t\t\tSystem.out.println(\" .\" + j + \" / \" + totalGridlet );\r\n \t\t}\r\n \tsuccess = super.gridletSubmit(gl, resourceFromID);\r\n sendTime[j]= GridSim.clock(); //remember the time when the gridlet was submited\r\n j++;\r\n if (j == totalGridlet){\r\n \twrite(name_ + \" ALL GRIDLETS SUBMITTED\");\r\n \tsaturationFinish = GridSim.clock();\r\n }\r\n } \r\n }\r\n finishTime = GridSim.clock();\r\n \r\n ////////////print statistics\r\n //printGridletList(receiveList_, name_);\r\n for (i = 0; i < list_.size(); i += list_.size() / 5){\r\n \tgl = (Gridlet) list_.get(i);\r\n \tprintGridletHist(gl);\r\n }\r\n \r\n ////print transfer times \r\n System.out.println(\"-------------gridlet log--------------\");\r\n System.out.println(\"getGridletID getResourceID getGridletLength \tgetGridletFileSize\t getGridletOutputSize\t \tinTransfer\t \t\toutTransfer\t\t getWallClockTime\t\ttotalTime \t\t\tslowdown\");\r\n\r\n double inTransfer, outTransfer, totalTime, slowdown; \r\n String indent = \"\t\t\";\r\n for (i = 0; i < list_.size(); i += chunkSize / 5){\r\n \tgl = (Gridlet) list_.get(i);\r\n \tinTransfer = gl.getExecStartTime() - sendTime[i];\r\n \toutTransfer = receiveTime[i] - gl.getFinishTime();\r\n \ttotalTime = receiveTime[i] - sendTime[i];\r\n \tslowdown = totalTime / gl.getWallClockTime();\r\n \twrite(gl.getGridletID() + indent + gl.getResourceID() + indent + gl.getGridletLength() + indent + gl.getGridletFileSize() + indent + gl.getGridletOutputSize() + indent +\r\n \t\t\tinTransfer + indent + outTransfer + indent + gl.getWallClockTime() + indent + totalTime + indent + slowdown);\r\n \t\r\n }\r\n\r\n\r\n ////////////////////////////////////////////////////////\r\n //ping resources\r\n for(i = 0; i < totalResource; i++){ \r\n \tpingRes(resourceID[i]);\r\n }\r\n \r\n ///calculate computational efficiency per resource\r\n double[] firstJobSend = new double[totalResource];\r\n double[] lastJobReceived = new double[totalResource];\r\n double[] work = new double[totalResource];\r\n int[] jobs = new int[totalResource];\r\n \r\n double[] outminTransferTime = new double[totalResource];\r\n double[] outmaxTransferTime = new double[totalResource];\r\n double[] outtransferTime = new double[totalResource];\r\n \r\n double[] minTransferTime = new double[totalResource];\r\n double[] maxTransferTime = new double[totalResource];\r\n double[] transferTime = new double[totalResource];\r\n //initialize values\r\n for(i = 0; i < totalResource; i++){\r\n \tfirstJobSend[i] = Double.MAX_VALUE;\r\n \tlastJobReceived[i] = 0.0;\r\n \twork[i] = 0.0;\r\n \tjobs[i] = 0;\r\n \tminTransferTime[i] = Double.MAX_VALUE;\r\n \tmaxTransferTime[i] = 0.0;\r\n \ttransferTime[i] = 0.0;\r\n \t\r\n \toutminTransferTime[i] = Double.MAX_VALUE;\r\n \toutmaxTransferTime[i] = 0.0;\r\n \touttransferTime[i] = 0.0;\r\n }\r\n \r\n double gridletTransferTime;\r\n double outgridletTransferTime;\r\n for (j = 0; j < list_.size(); j++){ //loop over gridlets\r\n \tgl = (Gridlet) list_.get(j);\r\n \tfor(i = 0; i < totalResource; i++){ //loop over resources\r\n \t\tif(gl.getResourceID() == resourceID[i]){\r\n \t\t\tjobs[i]++;\r\n \t\t\twork[i] += gl.getActualCPUTime();\r\n \t\t\tgridletTransferTime = gl.getSubmissionTime() - sendTime[j];\r\n \t\t\toutgridletTransferTime = receiveTime[j] - gl.getFinishTime();\r\n \t\t\ttransferTime[i] += gridletTransferTime;\r\n \t\t\touttransferTime[i] += outgridletTransferTime;\r\n \t\t\tif(firstJobSend[i] > sendTime[j]) { firstJobSend[i] = sendTime[j]; } //serch for the first job submited to the resource \r\n \t\t\tif( lastJobReceived[i] < receiveTime[j] ) { lastJobReceived[i] = receiveTime[j]; } //search for the last job arrived from the resource \r\n \t\t\tif( minTransferTime[i] > gridletTransferTime ) { minTransferTime[i] = gridletTransferTime; }\r\n \t\t\tif( maxTransferTime[i] < gridletTransferTime ) { maxTransferTime[i] = gridletTransferTime; }\r\n \t\t\tif( outminTransferTime[i] > outgridletTransferTime ) { outminTransferTime[i] = outgridletTransferTime; }\r\n \t\t\tif( outmaxTransferTime[i] < outgridletTransferTime ) { outmaxTransferTime[i] = outgridletTransferTime; }\r\n \t\t\t\r\n \t\t\tbreak;\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }\r\n \r\n ///////////////////////////////////////\r\n //print computational efficiency \r\n double cost = 1.0;\r\n double efficiency = 0.0;\r\n indent = \"\t\";\r\n System.out.println(\"#####################Computational efficiency######################\");\r\n System.out.println(\"Name PEs\tjobs\tfirstJobSend\tlastJobReceived\tcost\t\twork\tefficiency\tminTransfer\tmaxTransfer\t\"\r\n \t\t+ \"averageTransfer\toutminTrans\toutmaxTrans\taverageOutTrans\");\r\n for(i = 0; i < totalResource; i++){ //loop over resources\r\n \tcost = (lastJobReceived[i] - firstJobSend[i]) * resourcePEs[i] ;\r\n \tefficiency = work[i] / cost; \t\r\n \t\r\n \tSystem.out.print(String.format(\"%6s\t\", resourceName[i]));\r\n \tSystem.out.print(String.format(\"%5.0f\t\",resourcePEs[i] ));\r\n \tSystem.out.print(String.format(\"%d\t\",jobs[i] ));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",firstJobSend[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",lastJobReceived[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",cost));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",work[i])); \t\r\n \tSystem.out.print(String.format(\"%2.3f\t\",efficiency));\r\n \t\r\n \tSystem.out.print(String.format(\"%10.3f\t\",minTransferTime[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",maxTransferTime[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",(transferTime[i] / jobs[i]) ) );\r\n \tSystem.out.print(String.format(\"%10.3f\t\",outminTransferTime[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",outmaxTransferTime[i]));\r\n \tSystem.out.println(String.format(\"%10.3f\t\",(outtransferTime[i] / jobs[i]) ));\r\n \t\r\n\r\n \r\n \tSystem.out.println();\r\n \r\n }\r\n \r\n /////////////////////////////\r\n //print overall statistics\r\n write(\"---------------summary------------------\");\r\n write(\"Number of gridlets: \" + totalGridlet);\r\n write(\" Resources: \" + totalResource);\r\n write(\" PEs: \" + totalPEs);\r\n \r\n write(\" Submission start: \" + startTime);\r\n write(\" saturationStart: \" + saturationStart);\r\n write(\" saturationFinish: \" + saturationFinish);\r\n write(\" Last receive: \" + finishTime);\r\n \r\n write(\" Makespan: \" + (finishTime - startTime));\r\n write(\" Saturated interval: \" + (saturationFinish - saturationStart));\r\n write(\" Saturated time ratio: \" + (saturationFinish - saturationStart) / (finishTime - startTime));\r\n write(\"------------------------------------------\");\r\n\r\n ////////////////////////////////////////////////////////\r\n // shut down I/O ports\r\n shutdownUserEntity();\r\n terminateIOEntities();\r\n\r\n // don't forget to close the file\r\n if (report_ != null) {\r\n report_.finalWrite();\r\n }\r\n\r\n write(this.name_ + \": sending and receiving of Gridlets\" +\r\n \" complete at \" + GridSim.clock() );\r\n \r\n\r\n \r\n \r\n ////////////////////////////////////////////////////////\r\n // shut down I/O ports\r\n shutdownUserEntity();\r\n terminateIOEntities();\r\n System.out.println(this.name_ + \":%%%% Exiting body() at time \" +\r\n GridSim.clock());\r\n }", "@Override\n\tpublic void send(String msg) {\n\t}", "@Override\n\tprotected void runProtocol() throws AtmException\n\t{\n\t\ttrace(\"runProtocol()\");\n\t\twhileConnected();\n\t}", "@Override\n public void run(){\n ServerConnection[] clients = new ServerConnection[]{client2, client3, client1};\n\n for( ServerConnection c : clients ) {\n if ( c != null ){\n if ( client3 == null ){\n c.send(\"Game has started with code:\" + gameID + \".\\n\" + \"Current players are \" +\n client1.getName() + \", \" + client2.getName());\n }\n else {\n c.send(\"Game has started with code:\" + gameID + \".\\n\" + \"Current players are \" +\n client1.getName() + \", \" + client2.getName() + \", \" + client3.getName());\n }\n c.setGameID(gameID);\n }\n }\n\n String[] gods = readChallengerMessage();\n\n for (int i=0; i<2 && currClient != client1; i++){\n currClient.send(Arrays.toString(gods) );\n clientMessage = readClientMessage();\n if (i == 0) {\n gameMessage.setGod2(clientMessage.getGod());\n gameMessage.setName2(clientMessage.getName());\n } else if (i == 1) {\n gameMessage.setGod3(clientMessage.getGod());\n gameMessage.setName3(clientMessage.getName());\n }\n List<String> list = new ArrayList<String>(Arrays.asList(gods));\n list.remove( clientMessage.getGod().name());\n gods = list.toArray(new String[0]);\n currClient.send(\"Choice confirmed\");\n updateCurrClient();\n }\n\n currClient.send(gods[0]);\n gameMessage.setGod1(God.valueOf(gods[0]));\n gameMessage.setName1(client1.getName());\n updateCurrClient();\n resetUpdate();\n gameMessage.notify(gameMessage);\n sendLiteGame();\n\n for( ServerConnection c : clients ) {\n resetUpdate();\n if ( c != null ) {\n while ( !updateModel) {\n sendToCurrClient(\"Placing workers\");\n clientMessage = readClientMessage();\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.setSpace2(clientMessage.getSpace2());\n gameMessage.notify(gameMessage);\n if (!updateModel) {\n sendLiteGame();\n }\n }\n updateCurrClient();\n liteGame.setPlayer(currClient.getName());\n sendLiteGame();\n }\n }\n\n\n while ( !endOfTheGame ) {\n sendToCurrClient(\"Next action\");\n clientMessage = readClientMessage();\n\n if ( \"Choose Worker\".equals(clientMessage.getAction()) ) {\n chooseWorker();\n }\n else if ( \"Charon Switch\".equals(clientMessage.getAction()) ) {\n charonSwitch();\n }\n else if ( \"Prometheus Build\".equals(clientMessage.getAction()) ) {\n build();\n }\n else if ( \"Move\".equals(clientMessage.getAction()) ) {\n move();\n }\n else if ( \"Build\".equals(clientMessage.getAction()) ) {\n build();\n }\n\n if ( \"End\".equals(clientMessage.getAction()) ) {\n gameMessage.resetGameMessage();\n updateCurrClient();\n liteGame.setCurrWorker(5,5);\n liteGame.setPlayer(currClient.getName());\n sendLiteGame();\n }\n else {\n sendLiteGame();\n if ( !endOfTheGame && !playerRemoved ) {\n if (!updateModel) {\n currClient.send(\"Invalid action\");\n } else currClient.send(\"Action performed\");\n }\n else playerRemoved = false;\n }\n }\n\n sendToCurrClient(\"You won the match.\");\n server.endMatch(gameID, null);\n }", "public static interface Client\n\t{\n\n\t\t/**\n\t\t * Server notify the client to refresh the player list.\n\t\t * @param playerList New player list.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid refreshPlayerList(Map<String, IPlayerConfig> playerList) throws RpcException;\n\n\t\t/**\n\t\t * Server notify the client to refresh the game config. Client is expected to display it in GameCreation panel.\n\t\t * @param gameCfg New game config.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid refreshGameConfig(GameConfig gameCfg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast game creation message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveGameCreationMessage(String fromPlayer, String msg) throws RpcException;\n\n\t\t/**\n\t\t * Server broadcast running game message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveRunningGameMessage(String fromPlayer, String msg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast paused game message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receivePausedGameMessage(String fromPlayer, String msg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast new turn events.\n\t\t * Client should process these events on local gameboard.\n\t\t * If there is an error processins events on local gameboard, then it means local gameboard and server gameboard view for this player are out of sync.\n\t\t * In that case, client should call {@link ServerRunningGame#getEntireGameLog()} methods to recreate a fresh local gameboard.\n\t\t * @param newTurnEvents Events generated on turn resolution.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveNewTurnGameBoard(List<IGameEvent> newTurnEvents) throws RpcException;\n\t}", "protected abstract void sendInternal(List<String> messages) throws NotificationException;", "public abstract void handleServerSide(T message, EntityPlayer player);", "public void handleObject(SocketManager sm, Object msg)\n\t\t{\n\t\t\tif (msg instanceof RequestPeerListMsg)\n\t\t\t{\n\t\t\t\t// start a new thread to send the peer list\n\t\t\t\tif(SessionManager.debug) System.out.println(\"New leader \" + _sm.getIdentity() + \"received RequestPeerListMsg. Sending peer list.\");\n\t\t\t\tnew PeerListSender().start();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// handle a promotion event\n\t\t\tif (msg instanceof PromoteMsg)\n\t\t\t{\n\t\t\t\tif(SessionManager.debug) System.out.println(\"PromoteMsg received by \" + _sm.getIdentity() + \". New leader is \" + ((PromoteMsg) msg).new_leader);\n\t\t\t\t_sm.peerPromoted( ( (PromoteMsg) msg).new_leader);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (msg instanceof ByteBundle)\n\t\t\t{\n\t\t\t\tByteBundle bb = (ByteBundle) msg;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (bb.hasInt)\n\t\t\t\t\t{\n\t\t\t\t\t\t_pos.write(bb.val);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t_pos.write(bb.array);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (IOException ioe)\n\t\t\t\t{\n\t\t\t\t\tioe.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if it wasn't one of the above, pass handling off to the\n\t\t\t// MessageListener.\n\t\t\tsynchronized (PeerChannel.this)\n\t\t\t{\n\t\t\t\t// queue up messages until we get a MessageListener to give these\n\t\t\t\t// to.\n\t\t\t\tif (_ml == null)\n\t\t\t\t{\n\t\t\t\t\t_msg_queue.addLast(msg);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t_ml.messageReceived( (Serializable) msg);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Test\n\tpublic void runSend(){\n\t\tstandard();\n\t}", "void send();", "public void run()\r\n\t\t{\n\t\t\ttheVMKClient.sendMessageToServer(m);\r\n\t\t}", "@Override\r\n\tpublic void sendGeneralNotification() {\n\t\t\r\n\t}", "@Override\n\tpublic void send(IMessage sending) throws RPCException {\n\t\t\n\t}", "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "static void sendNotifications() {\n\t\testablishConnection();\n\t\tSystem.out.println(\"sending multiple notificatiosn\");\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tinitBroadCastClient();\n\t\t\t\t\t\t\t\t\tReceivePublicKey();\n\t\t\t\t\t\t\t\t\tReceiveEncryptPrice();\n\t\t\t\t\t\t\t\t\tgenerateEProduct();\n\t\t\t\t\t\t\t\t\tsendEProduct();\n\t\t\t\t\t\t\t\t\tGarbleCircuits();\n\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "public abstract void handleClientSide(T message, EntityPlayer player);", "protected abstract void send(final IMessageWrapper message, final ISender sender);", "public void communicate() {\n\t\tconnect();\n\t\ttry {\n\t\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\tout = new PrintWriter((socket.getOutputStream()), true);\n\t\t\tobjOut = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tobjIn = new ObjectInputStream(socket.getInputStream());\n\t\t\twhile (!socket.isClosed()) {}\t// Doesn't need to do anything besides stay awake, GUI handles all in/outputs\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\tobjIn.close();\n\t\t\tobjOut.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Sending error: \" + e.getMessage());\n\t\t}\t\t\n\t}", "@Override\n\tpublic void run() \n\t{\n\t\tcommunicator = com.zeroc.Ice.Util.initialize();\n GameServerPrx clientPrx = GameServerPrx.checkedCast(\n communicator.stringToProxy(\"client:default -h 58.167.142.74 -p 10002\")).ice_twoway().ice_secure(false).ice_collocationOptimized(false).ice_compress(true);\n\n if(clientPrx == null)\n {\n //If connection is failed due to server problems\n System.err.println(\"SB Connect: \" + \"Invalid proxy\");\n return;\n }\n System.out.println(\"SB Connect: \" + \"Connected\");\n Server server = new Server();\n server.address = ServerInfo.ADDRESS;\n server.UUID = ServerInfo.UUID;\n server.port = ServerInfo.PORT;\n server.name = ServerInfo.NAME;\n server.players = (short) players;\n\t\tclientPrx.sendServerDetails(server);\n\t\tSystem.out.println(\"SB Connect: \" + \"Data sent\");\n\t}", "void send() throws ImsException;", "void sendMessage() {\n\n\t}", "private void sendGroupInit() {\n \t\ttry {\n \t\t\tmyEndpt=new Endpt(serverName+\"@\"+vsAddress.toString());\n \n \t\t\tEndpt[] view=null;\n \t\t\tInetSocketAddress[] addrs=null;\n \n \t\t\taddrs=new InetSocketAddress[1];\n \t\t\taddrs[0]=vsAddress;\n \t\t\tview=new Endpt[1];\n \t\t\tview[0]=myEndpt;\n \n \t\t\tGroup myGroup = new Group(\"DEFAULT_SERVERS\");\n \t\t\tvs = new ViewState(\"1\", myGroup, new ViewID(0,view[0]), new ViewID[0], view, addrs);\n \n \t\t\tGroupInit gi =\n \t\t\t\tnew GroupInit(vs,myEndpt,null,gossipServers,vsChannel,Direction.DOWN,this);\n \t\t\tgi.go();\n \t\t} catch (AppiaEventException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} catch (NullPointerException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} catch (AppiaGroupException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} \n \t}", "abstract public void sendData(Account account, SyncResult syncResult) throws Exception;", "void process(ToSend m) {\n ByteBuffer requestBuffer = buildMsg(m.state.ordinal(), m.leader, m.zxid, m.electionEpoch, m.peerEpoch, m.configData);\n\n manager.toSend(m.sid, requestBuffer);\n\n }", "public static void main(String[] args) {\n // Set MessageDispatcher.\n // /////////////////////////////////////\n MessageDispatcher dispatcher = new MessageDispatcher(\n SYSTEM_MGR_ID,\n DISPATCHER_IP,\n Integer.parseInt(DISPATCHER_PORT));\n dispatcher.start();\n\n // /////////////////////////////////////\n // // Set SystemManager Interface\n // /////////////////////////////////////\n SystemManagerInterface systemMngInterface =\n new SystemManagerInterface(dispatcher);\n \n // /////////////////////////////////////\n // Set NetworkIntece\n // /////////////////////////////////////\n NetworkInterface originalNwInterface =\n new NetworkInterface(dispatcher, ORIGINAL_NW_ID);\n NetworkInterface aggregatedNwInterface =\n new NetworkInterface(dispatcher, AGGREGATED_NW_ID);\n\n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (1) Delete All Flows.\");\n outMsg(\"//////////////////////////////////////////////////\");\n List<Response> rsps = originalNwInterface.deleteAllFlow(); \n for (Response rsp : rsps) {\n outMsg(\" -DELETE FLow. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME);\n\n rsps = aggregatedNwInterface.deleteAllFlow(); \n for (Response rsp : rsps) {\n outMsg(\" -DELETE FLow. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME);\n \n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (2) Delete Topology.\");\n outMsg(\"//////////////////////////////////////////////////\");\n rsps = originalNwInterface.deleteTopology();\n for (Response rsp : rsps) {\n outMsg(\" -PUT (empty)Topology (Delete Topology). \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME * 2);\n \n rsps = aggregatedNwInterface.deleteTopology();\n for (Response rsp : rsps) {\n outMsg(\" -PUT (empty)Topology (Delete Topology). \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n } \n wait(WAIT_TIME * 2);\n \n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (3) Delete Connections.\");\n outMsg(\"//////////////////////////////////////////////////\");\n Response rsp = systemMngInterface.delConnection(\"conn1\");\n outMsg(\" -DELETE Connection. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n rsp = systemMngInterface.delConnection(\"conn2\");\n outMsg(\" -DELETE Connection. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n\n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (4) Delete Components.\");\n outMsg(\"//////////////////////////////////////////////////\");\n rsp = systemMngInterface.delComponent(ORIGINAL_NW_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n rsp = systemMngInterface.delComponent(AGGREGATED_NW_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n \n rsp = systemMngInterface.delComponent(AGGREGATOR_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n dispatcher.close();\n System.exit(0);\n\n }", "private void sendRegistrationIdToBackend() {\n // Your implementation here.\n }", "@Override\n\tpublic void messageSent(IoSession arg0, Object arg1) throws Exception {\n\n\t}", "@Override\n\tpublic void messageSent(IoSession arg0, Object arg1) throws Exception {\n\n\t}", "@Override\n\tpublic void messageReceived(IoSession session, Object message) throws Exception {\n\t\t\n\t\tSmsObject sms = (SmsObject) message;\n\t\t//log.info(\"The message is [\" + sms.getMessage() + \"]\");\n\n\t\t/*\n\t\t * other operate\n\n\t\tSystem.out.println(\"================================================\");\n\t\tSystem.out.println(\"Data From : \" + session.getRemoteAddress());\n\t\tSystem.out.println(\"Receiver : [\" + sms.getReceiver() + \"]\");\n\t\tSystem.out.println(\"Data Type : [\" + sms.getDataType() + \"]\");\n\t\tSystem.out.println(\"Data Receiver : [\" + sms.getDataReceiver() + \"]\");\n\t\tSystem.out.println(\"Data Sender : [\" + sms.getDataSender() + \"]\");\n\t\tSystem.out.println(\"Data : [\" + sms.getData() + \"]\");\n\t\tSystem.out.println(\"================================================\");\n\t\t\n\t\t * */\t\n\t\t\n\t\t//The processing of registration information \n\t\tInteger i = new Integer(255);\n\t\tif( i.equals(sms.getReceiver()) &&\n\t\t\ti.equals(sms.getDataType()) &&\n\t\t\ti.equals(sms.getDataReceiver()) &&\n\t\t\ti.equals(sms.getDataSender())) {\n\t\t\t\n\t\t\tcli.addCli(session, sms.getData());\n\t\t\tSystem.out.println(\"Client : \" + session.getRemoteAddress() + \" DONE\");\n\t\t} else {\n\t\t\t//Forwarding\n\t\t\tArrayList<IoSession> tempList = new ArrayList<IoSession>();\n\t\t\ttempList = cli.getCli(sms.getReceiver());\n\t\t\t\n\t\t\tSystem.out.println(\"tempting=======>\" + session.getRemoteAddress() + \" with receiver : \" + sms.getReceiver());\n\t\t\tif(tempList != null) {\n\t\t\t\t//System.out.println(\"true\");\n\t\t\t\tfor (IoSession session1 : tempList){\n\t\t\t\t\tSystem.out.println(\"Send =========>\" + session1.getRemoteAddress());\n\t\t\t\t\tsession1.write(sms);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"================================================\");\n\t\t\t}\n\t\t\telse System.out.println(\"forwarding false\");\n\t\t}\n\t\t\n\t\t//Trigger the client\n\t\tsms.setReceiver(i);\n\t\tsms.setDataType(i);\n\t\tsms.setDataReceiver(i);\n\t\tsms.setDataSender(i);\n\t\tsms.setData(\" \");\n\t\tsession.write(sms);\n\n\t}", "public void execute() throws DTFException {\n if (!getTunneled()) { \n CommClient client = new CommRMIClient(getAddress(), getPort());\n if ( client.heartbeat().booleanValue() ) { \n if (getLogger().isDebugEnabled())\n getLogger().debug(\"Direction connection to component being used.\");\n \n Comm.addClient(getOwner(), client);\n } \n }\n \n /*\n * Recreate the Agent base config from the main config that the agent\n * has when it starts for the first time and connects to the DTFC. \n */\n ActionState as = ActionState.getInstance();\n DTFState state = as.getState(\"main\").duplicate();\n state.setGlobalContext((Hashtable)state.getGlobalContext().clone());\n as.setState(Node.BASE_CONFIG, state);\n \n DTFNode.setOwner(this);\n getLogger().info(\"This agent [\" + getId() + \"] in use by [\" + \n getOwner() + \"]\");\n }", "public abstract void handleConnected() throws Exception;", "public interface ICore {\n\n /**\n * Send a request by unicast to the hostname.\n *\n * @param hostname IP address of the hostname.\n * @param message Message to send to the hostname.\n */\n void sendUnicast(InetAddress hostname, String message);\n\n /**\n * Send a request by multicast.\n *\n * @param message Message to send.\n */\n void sendMulticast(String message);\n\n /**\n * Stop the core.\n */\n void stop();\n}", "@Override\n public void socket() {\n }", "@Override\r\n public void handleMessage(Message msg) {\n }", "public abstract void SendData(int sock, String Data) throws LowLinkException, TransportLayerException, CommunicationException;", "public interface MessagingService {\n\n /**\n * Checks whether message receivers are registered for this channel.\n * \n * @param ccid the channel id\n * @return <code>true</code> if there are message receivers on this channel,\n * <code>false</code> if not.\n */\n boolean hasMessageReceiver(String ccid);\n\n /**\n * Passes the message to the registered message receiver.\n * \n * @param ccid the channel to pass the message on\n * @param serializedMessage the message to send (serialized SMRF message)\n */\n void passMessageToReceiver(String ccid, byte[] serializedMessage);\n\n /**\n * Check whether the messaging component is responsible to send messages on\n * this channel.<br>\n * \n * In scenarios with only one messaging component, this will always return\n * <code>true</code>. In scenarios in which channels are assigned to several\n * messaging components, only the component that the channel was assigned\n * to, returns <code>true</code>.\n * \n * @param ccid\n * the channel ID or cluster controller ID, respectively.\n * @return <code>true</code> if the messaging component is responsible for\n * forwarding messages on this channel, <code>false</code>\n * otherwise.\n */\n boolean isAssignedForChannel(String ccid);\n\n /**\n * Check whether the messaging component was responsible before but the\n * channel has been assigned to a new messaging component in the mean time.\n * \n * @param ccid the channel id\n * @return <code>true</code> if the messaging component was responsible\n * before but isn't any more, <code>false</code> if it either never\n * was responsible or still is responsible.\n */\n boolean hasChannelAssignmentMoved(String ccid);\n}", "@Override\n public void callSync() {\n\n }", "@Override\n\tpublic void sendMsg(String msg) {\n\n\t}", "public interface IClient extends Remote {\n /**\n * Gets called by the server to start game if desired number of player (2,3,4) in registration is achieved\n * @param playerList\n * @param player\n * @throws IClientException\n * @throws RemoteException\n */\n public boolean startGame(ArrayList<RemotePlayer> playerList, RemotePlayer player) throws IClientException, RemoteException;\n\t\n /**\n * Gets called for propagating a move to the other players\n * @param player \n * @param prisoner\n * @param roworCol\n * @param row\n * @param col\n * @throws IClientException\n * @throws RemoteException\n */\n public boolean doMoveRemote(Player player, Prisoner prisoner, int rowOrCol, int row, int col) throws IClientException, RemoteException;\n}", "@Override\r\n\tpublic void sendNotifications() {\n\r\n\t}", "private void sendNotification() {\n }", "public void send(Message msg);", "private void sendToNodes(Sm.RetrieveChunkResponse chunkResponse, ArrayList<Sm.StorageNode> toSend) {\n\n System.out.println(\"Nodes to send to: \" + toSend);\n\n if (toSend.size() != 0) {\n EventLoopGroup workerGroup = new NioEventLoopGroup();\n PatrolMessagePipeline pipeline = new PatrolMessagePipeline();\n Bootstrap bootstrap = new Bootstrap()\n .group(workerGroup)\n .channel(NioSocketChannel.class)\n .option(ChannelOption.SO_KEEPALIVE, true)\n .handler(pipeline);\n\n// for (Sm.StorageNode node: toSend) {\n\n //create StoreChunkRequest\n Sm.StoreChunk chunk = Sm.StoreChunk.newBuilder()\n .setFileName(chunkResponse.getFilename())\n .setChunkId(chunkResponse.getChunkId())\n .setChunkSize(chunkResponse.getChunkSize())\n .setData(chunkResponse.getData())\n .setChunkName(chunkResponse.getChunkName())\n .build();\n\n Sm.StorageNodes nodes = Sm.StorageNodes.newBuilder()\n .addAllNodeList(toSend)\n .build();\n\n Sm.StorageNode primary = toSend.get(0);\n System.out.println(\"Primary: \" + primary.getIp());\n System.out.println(\"Primary: \" + primary.getPort());\n\n //Connect to the first replica\n ChannelFuture cf = bootstrap.connect(primary.getIp(), primary.getPort());\n cf.syncUninterruptibly();\n\n //Prepare Request & Wrap\n Sm.StoreChunkRequest request = Sm.StoreChunkRequest.newBuilder()\n .setChunk(chunk)\n .setNodes(nodes)\n .build();\n\n Sm.StorageMessageWrapper msgWrapper = Sm.StorageMessageWrapper.newBuilder()\n .setScRequest(request)\n .build();\n\n //Send\n Channel chan = cf.channel();\n PatrolInboundHandler handler = chan.pipeline().get(PatrolInboundHandler.class);\n Sm.StorageMessageWrapper response = handler.request(msgWrapper);\n\n if (response.getScResponse().getSuccess()) {\n System.out.println(\"StoreChunk successful?: \" + response.getScResponse().getSuccess());\n Controller.getInstance().updateReplicasAndChunkNames(toSend, chunk.getChunkName());\n }\n\n workerGroup.shutdownGracefully();\n }\n }", "public interface Protocol\n{\n\t// ProductiveCelestialBody == !Vortex\n\t/**\n\t * Celestial body types.\n\t */\n\tpublic static enum eCelestialBodyType/* implements RelationshipType*/ {Vortex, Planet, AsteroidField, Nebula};\n\t\n\t/**\n\t * Building types.\n\t */\n\tpublic static enum eBuildingType/* implements RelationshipType*/ {PulsarLaunchingPad, SpaceCounter, GovernmentModule, DefenseModule, StarshipPlant, ExtractionModule};\n\t\n\t/**\n\t * Unit types.\n\t */\n\tpublic static enum eUnitType/* implements RelationshipType*/ {PulsarMissile, Probe, AntiProbeMissile, Fleet, CarbonCarrier, SpaceRoadDeliverer};\n\t\n\t/**\n\t * Special unit types.\n\t */\n\tpublic static enum eSpecialUnitType {Hero};\n\t\n\tpublic static class SEPImplementationError extends Error\n\t{\n\t\tprivate static final long serialVersionUID = 1L;\n\n\t\tpublic SEPImplementationError(String msg)\n\t\t{\n\t\t\tsuper(msg);\n\t\t}\n\n\t\tpublic SEPImplementationError(String msg, Throwable t)\n\t\t{\n\t\t\tsuper(msg, t);\n\t\t}\n\t}\n\t\n\t/**\n\t * Methods that can be called by the client at any game stage.\n\t */\n\tpublic static interface ServerCommon\n\t{\n\t\t/**\n\t\t * Return player list.\n\t\t * @return Set<Player> currently connected players.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tMap<String, IPlayerConfig> getPlayerList() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Return the current game config.\n\t\t * @return GameConfig current game config.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException.\n\t\t */\n\t\tIGameConfig getGameConfig() throws RpcException, StateMachineNotExpectedEventException;\t\t\t\t\t\t\t\t\n\t}\n\t\n\t/**\n\t * Methods that can be called by the client while the game is pending creation.\n\t */\n\tpublic static interface ServerGameCreation extends ServerCommon\n\t{\n\t\t/**\n\t\t * Update the player config and broadcast it to other players.\n\t\t * @param playerCfg New player config.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tvoid updatePlayerConfig(IPlayerConfig playerCfg) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Send a message to the GameCreation Chat.\n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tvoid sendMessage(String msg) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Updage the game configuration.\n\t\t * @param gameCfg new game config.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws ServerPrivilegeException If player is not authorised (admin).\n\t\t */\n\t\tvoid updateGameConfig(GameConfig gameCfg) throws ServerPrivilegeException, RpcException, StateMachineNotExpectedEventException;\n\t}\n\t\n\t/**\n\t * Methods that can be called by the client while the game is running.\n\t */\n\tpublic static interface ServerRunningGame extends ServerCommon\n\t{\n\t\t/**\n\t\t * Return the entire game log for this player.\n\t\t * This log can be used to recreate a full player local game view.\n\t\t * @return List<IGameEvent> Ordered list of all game event for this player, from the beginning to the current game turn.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tList<IGameEvent> getEntireGameLog() throws RpcException, StateMachineNotExpectedEventException;\n\n\t\t/**\n\t\t * Send a message to the RunningGame Chat.\n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tvoid sendMessage(String msg) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Test if building type can be build on selected celestial body.\n\t\t * @param ceslestialBodyName Name of the celestial body where to build.\n\t\t * @param buildingType Building type.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canBuild(String celestialBodyName, Class<? extends IBuilding> buildingType) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order construction of a new building on the given celestial body.\n\t\t * @param ceslestialBodyName Name of the celestial body where to build.\n\t\t * @param buildingType Building type.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException If command is not expected or arguments are not corrects. \n\t\t */\n\t\t//void build(String ceslestialBodyName, Class<? extends IBuilding> buildingType) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if selected building can be demolished.\n\t\t * @param ceslestialBodyName Name of the celestial body the building is build on. \n\t\t * @param buildingType Building type to demolish.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canDemolish(String celestialBodyName, Class<? extends IBuilding> buildingType) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order demolition of a building on the given celestial body.\n\t\t * @param ceslestialBodyName Name of the celestial body the building is build on.\n\t\t * @param buildingType Building type.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//void demolish(String ceslestialBodyName, Class<? extends IBuilding> buildingType) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if starship can be made on the selected planet\n\t\t * @param starshipToMake\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canMakeStarships(String planetName, Map<StarshipTemplate, Integer> starshipsToMake) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Make given starships on the given planet.\n\t\t * @param planetName Planet where is the starship plant.\n\t\t * @param starshipType Startship type to make.\n\t\t * @param quantity Quantity to make.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException If command is not expected or arguments are not corrects.\n\t\t */\n\t\t//void makeStarships(String planetName, Map<StarshipTemplate, Integer> starshipsToMake) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if probe can be made on the selected planet with given name.\n\t\t * @param planetName\n\t\t * @param probeName\n\t\t * @return\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException\n\t\t */\n\t\t//CommandCheckResult canMakeProbes(String planetName, String probeName, int quantity) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Make the given quantity of probes on the given planet, named by probeName+unit_number.\n\t\t * @param planetName\n\t\t * @param probeName\n\t\t * @param quantity\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException\n\t\t */\n\t\t//void makeProbes(String planetName, String probeName, int quantity) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if probe can be made on the selected planet with given name.\n\t\t * @param planetName\n\t\t * @param antiProbeMissileName\n\t\t * @return\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException\n\t\t */\n\t\t//CommandCheckResult canMakeAntiProbeMissiles(String planetName, String antiProbeMissileName, int quantity) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Make the given quantity of probes on the given planet, named by probeName+unit_number.\n\t\t * @param planetName\n\t\t * @param antiProbeMissileName\n\t\t * @param quantity\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException\n\t\t */\n\t\t//void makeAntiProbeMissiles(String planetName, String antiProbeMissileName, int quantity) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if fleet can be formed on this planet (starship plant existence).\n\t\t * @param fleetToForm Planet where the fleet is supposed to be formed.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canFormFleet(String planetName, String fleetName, Map<StarshipTemplate, Integer> fleetToFormStarships, Set<String> fleetToFormSpecialUnits) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Form a new fleet from the given starships composition.\n\t\t * @param planetName Planet where is the starship plant.\n\t\t * @param composition Starships composition (number of each starship type).\n\t\t * @param fleetName New fleet name.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException If command is not expected or arguments are not corrects.\n\t\t */\n\t\t//void formFleet(String planetName, String fleetName, Map<StarshipTemplate, Integer> fleetToFormStarships, Set<String> fleetToFormSpeciaUnits) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if the given fleet can be dismantled.\n\t\t * @param fleetName\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canDismantleFleet(String fleetName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Dismantle the given fleet and land the starships in the starship plant.\n\t\t * @param fleetName\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void dismantleFleet(String fleetName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if the government can be embarked.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canEmbarkGovernment() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to embark the government (from government module) on a government starship.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void embarkGovernment() throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if the government can be settled according to the government starship current location.\n\t\t * @param planetName Planet where to test if government can settle.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canSettleGovernment(String planetName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to settle the government (from government starship) in the planet the government starship is currently landed.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//void settleGovernment(String planetName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if pulsar missile can be fired from the given celestial body.\n\t\t * @param celestialBodyName Celestial body to check.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canFirePulsarMissile(String celestialBodyName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to fire a pulsar missile from the given celestial body with the given bonus modifier.\n\t\t * @param celestialBodyName Celestial body where the pulsar launching pad are supposed to be.\n\t\t * @param bonusModifier Bonus modifier.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//void firePulsarMissile(String celestialBodyName, float bonusModifier) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Test if player can build a space road.\n\t\t */\n\t\t//CommandCheckResult canBuildSpaceRoad(String sourceName, String destinationName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to build a space road between the given celestial bodies.\n\t\t * @param celestialBodyNameA\n\t\t * @param celestialBodyNameB\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void buildSpaceRoad(String sourceName, String destinationName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if player can demolish a space road.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canDemolishSpaceRoad(String sourceName, String destinationName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to demolish a space road.\n\t\t * @param celestialBodyNameA\n\t\t * @param celestialBodyNameB\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void demolishSpaceRoad(String celestialBodyNameA, String celestialBodyNameB) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if player can modify a carbon order.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state. \n\t\t */\n\t\t//CommandCheckResult canModifyCarbonOrder(String originCelestialBodyName, Stack<CarbonOrder> nextCarbonOrders) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Modify/create a carbon order from two celestial bodies.\n\t\t * @param originCelestialBodyName\n\t\t * @param destinationCelestialBodyName\n\t\t * @param amount\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void modifyCarbonOrder(String originCelestialBodyName, Stack<CarbonOrder> nextCarbonOrders) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if fleet can be moved.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canMoveFleet() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order a fleet to move with optionnal delay and checkpoints list.\n\t\t * @param fleetName\n\t\t * @param delay\n\t\t * @param checkpoints\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void moveFleet(String fleetName, Stack<Fleet.Move> checkpoints) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if he given antiprobe missile can be fired on the given target.\n\t\t * @param antiProbeMissileName\n\t\t * @param targetProbeName\n\t\t * @return\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t */\n\t\t//CommandCheckResult canFireAntiProbeMissile(String antiProbeMissileName, String targetOwnerName, String targetProbeName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to fire the antiprobe missile onto the given probe target.\n\t\t * @param antiProbeMissileName\n\t\t * @param targetProbeName\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void fireAntiProbeMissile(String antiProbeMissileName, String targetOwnerName, String targetProbeName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if probe can be launched.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canLaunchProbe(String probeName, RealLocation destination) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to launch a probe to the specified destination.\n\t\t * @param probeName\n\t\t * @param destination\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void launchProbe(String probeName, RealLocation destination) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if player can attack enemies fleet.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canAttackEnemiesFleet(String celestialBodyName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order a celestial body to attack enemies fleet.\n\t\t * @param celestialBodyName\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void attackEnemiesFleet(String celestialBodyName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if player can change its diplomaty.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canChangeDiplomacy(Map<String,PlayerPolicies> newPolicies) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Change the player domestic policy.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void changeDiplomacy(Map<String,PlayerPolicies> newPolicies) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\n\t\t/**\n\t\t * Test if turn can be reseted (not ended yet).\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t */\n\t\t//CommandCheckResult canResetTurn() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Reset current player turn (erase commands).\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException If command is not expected or arguments are not corrects.\n\t\t */\n\t\t//void resetTurn() throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\n\t\t/**\n\t\t * Test if turn can be ended (not already ended).\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t */\n\t\t//CommandCheckResult canEndTurn() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Terminate the current turn.\n\t\t * @param commands List of commands generated by the player during this turn.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tvoid endTurn(List<ICommand> commands) throws RpcException, StateMachineNotExpectedEventException, GameCommandException;\n\t}\n\t\n\t/**\n\t * Methods that can be called by the client while the game is paused.\n\t */\n\tpublic static interface ServerPausedGame extends ServerCommon\n\t{\n\t\t/**\n\t\t * Return player list.\n\t\t * @return Set<Player> currently connected players.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tMap<String, Boolean> getPlayerStateList() throws RpcException, StateMachineNotExpectedEventException;\n\n\t\t/**\n\t\t * Send a message to the PausedGame Chat.\n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tvoid sendMessage(String msg) throws RpcException, StateMachineNotExpectedEventException;\t\t\t\t\n\t}\n\t\n\t/**\n\t * Methods that can be called by the server.\n\t */\n\tpublic static interface Client\n\t{\n\n\t\t/**\n\t\t * Server notify the client to refresh the player list.\n\t\t * @param playerList New player list.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid refreshPlayerList(Map<String, IPlayerConfig> playerList) throws RpcException;\n\n\t\t/**\n\t\t * Server notify the client to refresh the game config. Client is expected to display it in GameCreation panel.\n\t\t * @param gameCfg New game config.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid refreshGameConfig(GameConfig gameCfg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast game creation message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveGameCreationMessage(String fromPlayer, String msg) throws RpcException;\n\n\t\t/**\n\t\t * Server broadcast running game message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveRunningGameMessage(String fromPlayer, String msg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast paused game message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receivePausedGameMessage(String fromPlayer, String msg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast new turn events.\n\t\t * Client should process these events on local gameboard.\n\t\t * If there is an error processins events on local gameboard, then it means local gameboard and server gameboard view for this player are out of sync.\n\t\t * In that case, client should call {@link ServerRunningGame#getEntireGameLog()} methods to recreate a fresh local gameboard.\n\t\t * @param newTurnEvents Events generated on turn resolution.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveNewTurnGameBoard(List<IGameEvent> newTurnEvents) throws RpcException;\n\t}\n}", "@Override\n\tpublic void run() {\n\t\tfor (Communication communication: listCommunication) {\n\t\t\tcommunication.run();\n\t\t}\n\t}", "void send(TransportPacket pkt) throws CCommException, IllegalStateException;", "private void sendGMToAll(String msg){\r\n for(ClientHandler ch: clientThreads){\r\n try{\r\n //Get the client's ObjectOutputStream\r\n ObjectOutputStream oos = ch.getOOS();\r\n //Print the message to the client\r\n oos.writeObject(new DataWrapper(0, msg, true));\r\n } catch(IOException ioe) {\r\n System.out.println(\"IOException occurred: \" + ioe.getMessage());\r\n ioe.printStackTrace();\r\n }\r\n }\r\n }", "private void sendToAll(String msg){\r\n for(ClientHandler ch: clientThreads){\r\n try{\r\n //Get the client's ObjectOutputStream\r\n ObjectOutputStream oos = ch.getOOS();\r\n //Print the message to the client\r\n oos.writeObject(new DataWrapper(DataWrapper.STRINGCODE, msg, false));\r\n } catch(IOException ioe) {\r\n System.out.println(\"IOException occurred: \" + ioe.getMessage());\r\n ioe.printStackTrace();\r\n }\r\n }\r\n }", "public void transmitEvents(){\n Log.info(\"Transmitting Events\", EventShare.class);\n for(Entry<Class, List<EventTrigger>> eventGroup: HandlerRegistry.getHandlers().entrySet()){\n String annotation = eventGroup.getKey().getName();\n for(EventTrigger trigger : eventGroup.getValue()){\n if(trigger.getServer()!=this) { // do not send own events...\n if(trigger.getMethod()!=null){ // its a local event\n if(trigger.getMethod().isAnnotationPresent(ES.class)){\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }else {\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n }", "public void sendToManager(){\n String receiveMessage;\n while((receiveMessage=receiveFrom(messageReader)) != null){\n manager.manage(receiveMessage);\n }\n }", "public void run() {\n try {\n //Create the input object stream and output object stream for this client\n toClient = new ObjectOutputStream(client.getOutputStream());\n fromClient = new ObjectInputStream(client.getInputStream());\n login = false;\n\n while (!login) {/*Wait for a client to login*/\n try {\n receviedProtocol = (Protocol) fromClient.readObject();\n if (receviedProtocol.getMethod().equals(\"HELP\"))\n sendHelpMenu();\n else if (receviedProtocol.getMethod().equals(\"LOGIN\")) {\n authorize(receviedProtocol);\n login = true;\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n logout = false;\n while (!logout) {/*Keep conncetion between client and server until the client logout*/\n try{\n receviedProtocol = (Protocol)fromClient.readObject(); //Wait for client input\n startIndex = 0;//This will be used to track the starting point of next n groups to be send\n if(receviedProtocol.getMethod().equals(\"AG\"))\n allGroupHandler(receviedProtocol);\n else if(receviedProtocol.getMethod().equals(\"LOGOUT\")){\n logout();\n logout = true;\n }\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }\n\n } catch (IOException e) {\n System.out.println(e);\n\n } finally {\n try {\n client.close();\n } catch (IOException e) {\n System.out.println(e);\n }\n }\n }", "public abstract void connectSystem();", "public Intermediary()\r\n\t{\r\n\t\ttry {\r\n\t\t\treceiveSocket = new DatagramSocket(68);\r\n\t\t\tsendReceiveSocket = new DatagramSocket();\t\t\t\r\n\t\t\t\r\n\t\t} catch (SocketException se) {\r\n\t\t\tse.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t} \r\n\t\t\r\n\t\treqID = 1;\r\n\t\tSystem.out.println(\"===== INTERMEDIATE HOST STARTED =====\\n\");\r\n\t}", "protected abstract void sendMessage(UUID[] players, BaseComponent[][] messages, IntConsumer response);", "@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 setUpNetworking() throws Exception {\n this.serverSock = new ServerSocket(4242);\n\n groupChats = new HashMap<String, ArrayList<String>>();\n groupMessages = new HashMap<String, ArrayList<String>>();\n groupMessages.put(\"Global\", new ArrayList<String>());\n\n int socketOn = 0;\n\n while (true) {\n\n Socket clientSocket = serverSock.accept();\n System.out.println(\"Received connection \" + clientSocket);\n\n ClientObserver writer = new ClientObserver(clientSocket.getOutputStream());\n\n Thread t = new Thread(new ClientHandler(clientSocket, writer));\n t.start();\n System.out.println(\"Connection Established\");\n socketOn = 1;\n }\n }", "@Override\n\tpublic void send(Message event) {\n\t\t// read and parse heyOOCSI message\n\t\tif (event.getRecipient().equals(\"heyOOCSI!\")) {\n\t\t\tsynchronized (clients) {\n\t\t\t\tevent.data.forEach((k, v) -> {\n\t\t\t\t\tif (v instanceof ObjectNode) {\n\t\t\t\t\t\tObjectNode on = ((ObjectNode) v);\n\n\t\t\t\t\t\t// seems we have an object, let's parse it\n\t\t\t\t\t\tOOCSIDevice od = new OOCSIDevice();\n\t\t\t\t\t\tod.name = k;\n\t\t\t\t\t\tod.deviceId = on.at(\"/properties/device_id\").asText(\"\");\n\t\t\t\t\t\ton.at(\"/components\").fields().forEachRemaining(e -> {\n\t\t\t\t\t\t\tDeviceEntity dc = new DeviceEntity();\n\t\t\t\t\t\t\tdc.name = e.getKey();\n\t\t\t\t\t\t\tJsonNode value = e.getValue();\n\t\t\t\t\t\t\tdc.channel = value.get(\"channel_name\").asText(\"\");\n\t\t\t\t\t\t\tdc.type = value.get(\"type\").asText(\"\");\n\t\t\t\t\t\t\tdc.icon = value.get(\"icon\").asText(\"\");\n\t\t\t\t\t\t\t// retrieve default value or state which are mutually exclusive\n\t\t\t\t\t\t\tif (value.has(\"value\")) {\n\t\t\t\t\t\t\t\tdc.value = value.get(\"value\").asText();\n\t\t\t\t\t\t\t} else if (value.has(\"state\")) {\n\t\t\t\t\t\t\t\tdc.value = value.get(\"state\").asText();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tod.components.add(dc);\n\t\t\t\t\t\t});\n\t\t\t\t\t\ton.at(\"/location\").fields().forEachRemaining(e -> {\n\t\t\t\t\t\t\tif (e.getValue().isArray()) {\n\t\t\t\t\t\t\t\tFloat[] locationComponents = new Float[2];\n\t\t\t\t\t\t\t\tlocationComponents[0] = new Float(((ArrayNode) e.getValue()).get(0).asDouble());\n\t\t\t\t\t\t\t\tlocationComponents[1] = new Float(((ArrayNode) e.getValue()).get(1).asDouble());\n\t\t\t\t\t\t\t\tod.locations.put(e.getKey(), locationComponents);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\ton.at(\"/properties\").fields().forEachRemaining(e -> {\n\t\t\t\t\t\t\tod.properties.put(e.getKey(), e.getValue().asText());\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// check contents of device\n\n\t\t\t\t\t\t// then add to clients\n\t\t\t\t\t\tclients.put(k, od);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tif (event.data.containsKey(\"clientHandle\")) {\n\t\t\t\tString clientHandle = (String) event.data.get(\"clientHandle\");\n\t\t\t\tif (clients.containsKey(clientHandle)) {\n\t\t\t\t\tOOCSIDevice od = clients.get(clientHandle);\n\t\t\t\t\tClient c = server.getClient(event.getSender());\n\t\t\t\t\tif (c != null) {\n\t\t\t\t\t\tc.send(new Message(token, event.getSender()).addData(\"clientHandle\", clientHandle)\n\t\t\t\t\t\t .addData(\"location\", od.serializeLocations())\n\t\t\t\t\t\t .addData(\"components\", od.serializeComponents())\n\t\t\t\t\t\t .addData(\"properties\", od.serializeProperties()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (event.data.containsKey(\"x\") && event.data.containsKey(\"y\")\n\t\t\t && event.data.containsKey(\"distance\")) {\n\t\t\t\ttry {\n\t\t\t\t\tfinal float x = ((Number) event.data.get(\"x\")).floatValue();\n\t\t\t\t\tfinal float y = ((Number) event.data.get(\"y\")).floatValue();\n\t\t\t\t\tfinal float distance = ((Number) event.data.get(\"distance\")).floatValue();\n\n\t\t\t\t\t// check if we need to truncate the client list, according to the \"n closest clients\"\n\t\t\t\t\tfinal int closest;\n\t\t\t\t\tif (event.data.containsKey(\"closest\")) {\n\t\t\t\t\t\tclosest = ((Number) event.data.get(\"closest\")).intValue();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclosest = 100;\n\t\t\t\t\t}\n\n\t\t\t\t\t// build list of all client within given distance\n\t\t\t\t\tMap<Double, String> clientNames = new HashMap<>();\n\t\t\t\t\tclients.values().stream().forEach(od -> {\n\t\t\t\t\t\tod.locations.entrySet().forEach(loc -> {\n\t\t\t\t\t\t\tFloat[] location = loc.getValue();\n\t\t\t\t\t\t\tdouble dist = Math.hypot(Math.abs(location[0] - x), Math.abs(location[1] - y));\n\t\t\t\t\t\t\tif (dist < distance) {\n\t\t\t\t\t\t\t\tclientNames.put(dist, od.deviceId);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t\t// create sorted list of clients, potentially truncated by \"closest\"\n\t\t\t\t\tList<String> cns = clientNames.entrySet().stream().sorted(Map.Entry.comparingByKey()).limit(closest)\n\t\t\t\t\t .map(e -> e.getValue()).collect(Collectors.toList());\n\n\t\t\t\t\t// assemble the clients within distance from reference point and send back\n\t\t\t\t\tClient c = server.getClient(event.getSender());\n\t\t\t\t\tif (c != null) {\n\t\t\t\t\t\tc.send(new Message(token, event.getSender()).addData(\"x\", x).addData(\"y\", y)\n\t\t\t\t\t\t .addData(\"distance\", distance).addData(\"clients\", cns.toArray(new String[] {})));\n\t\t\t\t\t}\n\t\t\t\t} catch (NumberFormatException | ClassCastException e) {\n\t\t\t\t\t// could not parse the coordinates or distance, do nothing\n\t\t\t\t}\n\t\t\t} else if (event.data.containsKey(\"location\")) {\n\t\t\t\tString location = ((String) event.data.get(\"location\")).trim();\n\t\t\t\tSet<String> clientNames = new HashSet<>();\n\t\t\t\tclients.values().stream().forEach(od -> {\n\t\t\t\t\tod.locations.keySet().forEach(loc -> {\n\t\t\t\t\t\tif (loc.equalsIgnoreCase(location)) {\n\t\t\t\t\t\t\tclientNames.add(od.deviceId);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t// assemble the clients within given location and send back\n\t\t\t\tClient c = server.getClient(event.getSender());\n\t\t\t\tif (c != null) {\n\t\t\t\t\tc.send(new Message(token, event.getSender()).addData(\"location\", location).addData(\"clients\",\n\t\t\t\t\t clientNames.toArray(new String[] {})));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void execute() {\n\n\t\tPropertiesParser propertiesParser = new PropertiesParser();\n\t\t\n\t\tsetupServer(propertiesParser);\n\t\ttry {\n\t\t\t\n\t\t\tThread.sleep(SERVER_AFTER_RUN_DELAY);\n\t\t\t\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tint i=0;\n\t\tfor( ; i < propertiesParser.getReadersNum() ; i++){\n\t\t\t\n\t\t\tsetupClient(propertiesParser , i,true);\n\t\t\t\n\t\t}\n\t\tfor(; i < propertiesParser.getReadersNum()+ propertiesParser.getWritersNum() ; i++){\n\t\t\t\n\t\t\tsetupClient(propertiesParser , i,false);\n\t\t\t\n\t\t}\n\t\t\n\t}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.591 -0500\", hash_original_method = \"73417FF22870072B41D9E8892C6ACEAF\", hash_generated_method = \"98D30C9AEE1B66AD2FCFA7D7A2E2B430\")\n \nprivate static Message sendMessageSynchronously(Messenger dstMessenger, Message msg) {\n SyncMessenger sm = SyncMessenger.obtain();\n try {\n if (dstMessenger != null && msg != null) {\n msg.replyTo = sm.mMessenger;\n synchronized (sm.mHandler.mLockObject) {\n dstMessenger.send(msg);\n sm.mHandler.mLockObject.wait();\n }\n } else {\n sm.mHandler.mResultMsg = null;\n }\n } catch (InterruptedException e) {\n sm.mHandler.mResultMsg = null;\n } catch (RemoteException e) {\n sm.mHandler.mResultMsg = null;\n }\n Message resultMsg = sm.mHandler.mResultMsg;\n sm.recycle();\n return resultMsg;\n }", "@Override\n public void establishConnectionWithYourTower() {\n }", "Communicator createCommunicator();", "public interface Communicator {\n void sendPositionAndJson(int position , String json);\n}", "@Override\n public void run() {\n try {\n boolean autoFlush = true;\n fromClient = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\n toClient = new PrintWriter(clientSocket.getOutputStream(), autoFlush);\n } catch (IOException ioe) {\n throw new UncheckedIOException(ioe);\n }\n for (String entry : communicationWhenStarting) {\n sendMsg(entry);\n }\n while (connected) {\n try {\n Message msg = new Message(fromClient.readLine());\n updateClientAction(msg);\n } catch (IOException ioe) {\n disconnectClient();\n throw new MessageException(ioe);\n }\n }\n }", "public abstract void sendInternal(NotificationType type, List<String> messages) throws NotificationException;", "@Override\n\tpublic void execute() {\n\t\t\n\t\tif (GamesHandler.test) {\n\t\t\tserverModel = ServerFacadeTest.getSingleton().getGameModel(gameID);\n\t\t} else {\n\t\t\tserverModel = ServerFacade.getSingleton().getGameModel(gameID);\n\t\t}\n\t\t\n\t\tPlayer player = serverModel.getPlayers().get(sender);\n\t\tDevCardList playerOldDevCards = player.getOldDevCards();\n\t\t\n\t\tplayerOldDevCards.setRoadBuilding(playerOldDevCards.getRoadBuilding() - 1);\n\t\t\n\t\tserverModel.getMap().addRoad(new Road(sender, spot1));\n\t\tserverModel.getMap().addRoad(new Road(sender, spot2));\n\t\t\n\t\tplayer.setRoads(player.getRoads() - 2);\n\t\t\n\t\tplayer.setPlayedDevCard(true);\n\t\t\n\t\tMessageLine line = new MessageLine();\n\t\tString username = player.getName();\n\t\tif(username.toLowerCase().equals(\"ife\") || username.toLowerCase().equals(\"ogeorge\")){\n\t\t\tline.setMessage(\"Ife built a couple of roads to try to catch up with Paul, but Daniel always wins anyway\");\n\t\t}\n\t\telse{\n\t\t\tline.setMessage(username + \" built a couple roads with a road building development card\");\n\t\t}\n//\t\tline.setMessage(username + \" built a couple roads with a road building development card\");\n\t\tline.setSource(username);\n\t\tserverModel.getLog().addLine(line);\n\t}", "public static void broadcast(BaseComponent[] baseComp){\n Bukkit.getServer().getOnlinePlayers().forEach((target) -> {\n target.spigot().sendMessage(baseComp);\n });\n String logmsg = \"\";\n for (BaseComponent comp : baseComp){\n logmsg += comp.toPlainText();\n }\n logMessage(logmsg, \"general\");\n }", "@Override\n\t\tpublic void onDirectMessage(DirectMessage arg0) {\n\t\t\t\n\t\t}", "public void syncMessages() {\n\t\tArrayList<ChatEntity> nonSyncedChatEntities = new ArrayList<>();\n\t\tnonSyncedChatEntities.addAll(chatViewModel.loadChatsWithSyncStatus(false, nameID));\n\n\t\tif (nonSyncedChatEntities.size() > 0) {\n\t\t\tfor (int i = 0; i < nonSyncedChatEntities.size(); i++) {\n\t\t\t\tChatEntity chatEntity = nonSyncedChatEntities.get(i);\n\t\t\t\tchatEntity.setSynced(true);\n\t\t\t\tchatViewModel.updateSource(chatEntity);\n\t\t\t\tgetChatResult(nonSyncedChatEntities.get(i).getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void handleMessageFromClient(Object msg) {\n\n }", "public void send(Object data) {\n\t\t//do nothing - override to do something\n\t}", "public void doBehaviour( Object sessionContext ) {\n \n // The sessionContext is here a PlayerImpl.\n PlayerImpl player = (PlayerImpl) sessionContext;\n WotlasLocation location = player.getLocation();\n\n // 0 - We check the length of the chat room name\n if( name.length() > ChatRoom.MAXIMUM_NAME_SIZE )\n name = name.substring(0,ChatRoom.MAXIMUM_NAME_SIZE-1);\n\n // 1 - We get the message router\n MessageRouter mRouter = player.getMessageRouter();\n\n if( mRouter==null ) {\n Debug.signal( Debug.ERROR, this, \"No Message Router !\" );\n player.sendMessage( new WarningMessage(\"Error #ChCreMsgRtr while performing creation !\\nPlease report the bug !\") );\n return; // rare internal error occured !\n }\n\n // 2 - Do we have to delete the previous chatroom ?\n if( !player.getCurrentChatPrimaryKey().equals(ChatRoom.DEFAULT_CHAT) ) {\n // The following message behaviour does this job...\n RemPlayerFromChatRoomMsgBehaviour remPlayerFromChat =\n new RemPlayerFromChatRoomMsgBehaviour( player.getPrimaryKey(),\n player.getCurrentChatPrimaryKey() );\n\n try{\n remPlayerFromChat.doBehaviour( player );\n }catch( Exception e ) {\n Debug.signal( Debug.ERROR, this, e );\n player.setCurrentChatPrimaryKey(ChatRoom.DEFAULT_CHAT);\n }\n }\n\n // 3 - We try to create the new chatroom\n ChatRoom chatRoom = new ChatRoom();\n chatRoom.setPrimaryKey( ChatRoom.getNewChatPrimaryKey() );\n chatRoom.setName(name);\n chatRoom.setCreatorPrimaryKey(creatorPrimaryKey);\n chatRoom.addPlayer(player);\n\n synchronized( mRouter.getPlayers() ) {\n ChatList chatList = player.getChatList();\n \n if(chatList==null) {\n \tchatList = (ChatList) new ChatListImpl();\n \t\n // We set the chatList to all the players in the chat room...\n \tIterator it = mRouter.getPlayers().values().iterator();\n \n \twhile( it.hasNext() ) {\n \t PlayerImpl p = (PlayerImpl) it.next();\n \t p.setChatList( chatList );\n \t}\n }\n\n if( chatList.getNumberOfChatRooms() > ChatRoom.MAXIMUM_CHATROOMS_PER_ROOM \n && !isBotChatRoom )\n return; // can't add ChatRoom : too many already !\n\n chatList.addChatRoom( chatRoom );\n }\n\n player.setCurrentChatPrimaryKey( chatRoom.getPrimaryKey() );\n player.setIsChatMember(true);\n\n // 4 - We advertise the newly created chatroom\n // We send the information to all players of the same room or town or world\n mRouter.sendMessage( new ChatRoomCreatedMessage( chatRoom.getPrimaryKey(),\n name, creatorPrimaryKey ) );\n }", "public interface INetworkHandler<T> extends Runnable {\n\n /**\n * The main method which starts the protocol implementation.\n * <p>\n * {@inheritDoc}\n */\n void run();\n\n /**\n * Sends the request of the network handler to all online peers of the node.\n *\n * @throws ConnectionFailedException If the other online clients can not be determined\n */\n void sendRequest(IRequest request)\n throws ConnectionFailedException;\n\n /**\n * Blocks until all notified clients have responded\n *\n * @throws InterruptedException If the thread got interrupted while waiting\n */\n void await()\n throws InterruptedException;\n\n /**\n * Blocks for the given timeout.\n *\n * @param timeout The timeout to wait\n * @param timeUnit The time unit which qualifies the timeout\n *\n * @throws InterruptedException If the thread got interrupted while waiting\n */\n void await(long timeout, TimeUnit timeUnit)\n throws InterruptedException;\n\n /**\n * Returns true once all notified clients have responded.\n *\n * @return True, if all notified clients have responded, false otherwise.\n */\n boolean isCompleted();\n\n /**\n * Returns the progress until this handler's communication\n * is considered complete (See {@link INetworkHandler#isCompleted()}).\n *\n * Returns values between 100 and 0 (inclusive).\n *\n * @return The progress\n */\n int getProgress();\n\n\n /**\n * Returns the final result of the exchange.\n * Note, that the result may be null before all clients have responded.\n *\n * @return The result once the all necessary clients responded. May be null before all clients have responded\n */\n T getResult();\n}", "@Override\n\tpublic String execute() throws Exception {\n\t\treturn \"send\";\n\t}", "@Override\n\tpublic void run() {\n\t\twhile(!Server.killServer){\n\t\t\ttry {\n\t\t\t\tThread.sleep(Constants.BROADCAST_BATTLEFIELD_PERIOD_TO_CLIENTS);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t//send to EACH client\n\t\t\tfor(Node client : Server.getClientList().keySet()){\n\t\t\t\t//get client's RMI instance\n\t\t\t\tClientServer clientComm = null;\n\t\t\t\tclientComm = Server.getClientReg(client); \n\t\t\t\t//create Message\n\t\t\t\tClientServerMessage sendBattlefieldMessage = new ClientServerMessage(\n\t\t\t\t\t\t\tMessageType.GetBattlefield,\n\t\t\t\t\t\t\tthis.serverOwner.getName(),\n\t\t\t\t\t\t\tthis.serverOwner.getIP(),\n\t\t\t\t\t\t\tclient.getName(),\n\t\t\t\t\t\t\tclient.getIP());\n\t\t\t\tsendBattlefieldMessage.setBattlefield(Server.getBattlefield());\n\t\t\t\t\n\t\t\t\tif(clientComm==null){\n\t\t\t\t\tSystem.out.println(\"clientComm is null\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Server: Battlefield sent\");\n\n\t\t\t\ttry {\n\t\t\t\t\tclientComm.onMessageReceived(sendBattlefieldMessage);\n\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t} catch (NotBoundException e) {\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@Override\n protected void process(List<String> chunks) {\n\n logger.debug(LOG_TAG + \".process()\");\n\n logger.info(chunks.get(chunks.size() - 1));\n\n if (newConnection) {\n // save email address for distributing communication message\n emailAddress = chunks.get(chunks.size() - 1);\n // send email address and remote address to server\n server.newConnection(chunks.get(chunks.size() - 1),\n socket.getRemoteSocketAddress().toString());\n\n // send 'welcome' message to client\n sendMessage(\"@welcome\");\n\n newConnection = false;\n\n return;\n }\n\n if (chunks.get(chunks.size() - 1).equals(\"@disconnect\")) {\n // send message to server\n server.removeConnection(clientId);\n\n // send 'goodbye' message to client\n sendMessage(\"@goodbye\");\n\n newConnection = true;\n\n return;\n }\n\n // communication message from client, distribute message\n // to all clients\n server.distributeMessage(emailAddress + \">\" + chunks.get(chunks.size() - 1));\n\n }", "@Override\n protected void sendSpawnPackets(AttachmentViewer viewer, Vector motion) {\n if (isLivingEntity()) {\n // Spawn living entity\n PacketPlayOutSpawnEntityLivingHandle spawnPacket = PacketPlayOutSpawnEntityLivingHandle.createNew();\n spawnPacket.setEntityId(this.entityId);\n spawnPacket.setEntityUUID(this.entityUUID);\n spawnPacket.setEntityType(this.entityType);\n spawnPacket.setPosX(this.syncAbsPos.getX() - motion.getX());\n spawnPacket.setPosY(this.syncAbsPos.getY() - motion.getY());\n spawnPacket.setPosZ(this.syncAbsPos.getZ() - motion.getZ());\n spawnPacket.setMotX(motion.getX());\n spawnPacket.setMotY(motion.getY());\n spawnPacket.setMotZ(motion.getZ());\n spawnPacket.setYaw(this.syncYaw);\n spawnPacket.setPitch(this.syncPitch);\n spawnPacket.setHeadYaw((this.syncMode == SyncMode.ITEM) ? 0.0f : this.syncYaw);\n viewer.sendEntityLivingSpawnPacket(spawnPacket, getUsedMeta());\n } else {\n // Spawn entity (generic)\n PacketPlayOutSpawnEntityHandle spawnPacket = PacketPlayOutSpawnEntityHandle.T.newHandleNull();\n spawnPacket.setEntityId(this.entityId);\n spawnPacket.setEntityUUID(this.entityUUID);\n spawnPacket.setEntityType(this.entityType);\n spawnPacket.setPosX(this.syncAbsPos.getX() - motion.getX());\n spawnPacket.setPosY(this.syncAbsPos.getY() - motion.getY());\n spawnPacket.setPosZ(this.syncAbsPos.getZ() - motion.getZ());\n spawnPacket.setMotX(motion.getX());\n spawnPacket.setMotY(motion.getY());\n spawnPacket.setMotZ(motion.getZ());\n spawnPacket.setYaw(this.syncYaw);\n spawnPacket.setPitch(this.syncPitch);\n viewer.send(spawnPacket);\n\n PacketPlayOutEntityMetadataHandle metaPacket = PacketPlayOutEntityMetadataHandle.createNew(this.entityId, getUsedMeta(), true);\n viewer.send(metaPacket.toCommonPacket());\n }\n\n if (this.syncMode == SyncMode.SEAT) {\n PacketPlayOutRelEntityMoveLookHandle movePacket = PacketPlayOutRelEntityMoveLookHandle.createNew(\n this.entityId,\n motion.getX(), motion.getY(), motion.getZ(),\n this.syncYaw,\n this.syncPitch,\n false);\n viewer.send(movePacket);\n } else if (motion.lengthSquared() > 0.001) {\n CommonPacket movePacket = PacketType.OUT_ENTITY_MOVE.newInstance(this.entityId, motion.getX(), motion.getY(), motion.getZ(), false);\n viewer.send(movePacket);\n }\n\n // Resend velocity if one is set\n if (this.syncVel > 0.0) {\n viewer.send(PacketPlayOutEntityVelocityHandle.createNew(this.entityId, this.syncVel, 0.0, 0.0));\n }\n }", "protected void setup(){\n\n\t\tsuper.setup();\n\n\t\tfinal Object[] args = getArguments();\n\t\tif(args!=null && args[0]!=null && args[1]!=null){\n\t\t\tdeployAgent((Environment) args[0],(EntityType)args[1]);\n\t\t}else{\n\t\t\tSystem.err.println(\"Malfunction during parameter's loading of agent\"+ this.getClass().getName());\n System.exit(-1);\n }\n\t\t\n\t\t//############ PARAMS ##########\n\n\t\tthis.nbmodifsmin \t\t= 30;\t\t\t//nb modifs minimum pour renvoyer la carte\n\t\tthis.timeOut \t\t\t= 1000 * 4;\t\t//secondes pour timeout des messages (*1000 car il faut en ms)\n\t\tthis.sleepbetweenmove \t= 200;\t\t\t//in MS\n\t\tthis.nbmoverandom\t\t= 4;\t\t\t// nb random moves by default\n\t\t\n\t\t//#############################\n\t\t//setup graph\n\t\t//setupgraph();\n\t\tthis.graph = new SingleGraph(\"graphAgent\");\n\t\tinitMyGraph();\n\t\tthis.step = 0;\n\t\tthis.stepMap = new HashMap<String, Integer>();\n\t\tthis.path = new ArrayList<String>();\n\t\tthis.mailbox = new Messages(this);\n\t\tthis.lastMsg = null;\n\t\tthis.switchPath = true;\n\t\tthis.lastsender = null;\n\t\tthis.lastSentMap = new HashMap<String, Integer>(); //nbmodifs\n\t\tthis.remakepath = false; // changes to true if the map changed in a way that requires a new path\n\t\tthis.nbmoverandomoriginal = this.nbmoverandom;\n\t\t\n\t\tthis.toSendMap = new HashMap<String, Graph>(); //actual hashmap graph\n\t\t\n\t\tSystem.out.println(\"the agent \"+this.getLocalName()+ \" is started\");\n\t}" ]
[ "0.63223785", "0.6248415", "0.61825246", "0.60278034", "0.5976909", "0.5950603", "0.5883809", "0.57664645", "0.57593095", "0.57265687", "0.5725753", "0.57145697", "0.56873775", "0.5680166", "0.5671305", "0.5667127", "0.56655675", "0.5661999", "0.565705", "0.5651833", "0.5620711", "0.56179297", "0.5596385", "0.55868584", "0.5576125", "0.5575187", "0.5562524", "0.5552053", "0.5543363", "0.5536674", "0.55325305", "0.5530098", "0.5508868", "0.550512", "0.55018383", "0.54931456", "0.54918826", "0.54867345", "0.5485438", "0.5458287", "0.545737", "0.5454392", "0.5438261", "0.5433725", "0.54328954", "0.54238987", "0.5408433", "0.54062", "0.54055804", "0.54006344", "0.54006344", "0.53988266", "0.5380247", "0.5376334", "0.5374347", "0.53658634", "0.5356489", "0.5356328", "0.5355363", "0.5349282", "0.53469855", "0.5346627", "0.53390825", "0.53345764", "0.53265864", "0.532418", "0.53228265", "0.53205514", "0.5319282", "0.5313489", "0.5312264", "0.5303173", "0.52941924", "0.5291875", "0.5291028", "0.52908516", "0.5289273", "0.5279872", "0.5277608", "0.5273621", "0.5272475", "0.5270723", "0.5270312", "0.5267033", "0.52664304", "0.5263106", "0.5256959", "0.5254841", "0.52428013", "0.5241857", "0.5241785", "0.52397466", "0.5239311", "0.52385247", "0.5236192", "0.5235697", "0.52350426", "0.5234231", "0.523298", "0.5230771" ]
0.5488495
37
Gets a list of received Gridlets
public GridletList getGridletList() { return receiveJobs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void handleListOperation() {\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks/\");\n webTarget.register(auth);\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n Response response = invocationBuilder.get();\n\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n List<BrickDto> brickDtoList = response.readEntity(new GenericType<List<BrickDto>>() {\n });\n System.out.println(\"Number of bricks returned: \" + brickDtoList.size());\n\n for (BrickDto b : brickDtoList) {\n System.out.println(b);\n }\n } else {\n System.out.println(\"Error code:\" + response.getStatus());\n }\n }", "public PacketLinkedList<SimplePacket> getListBuffer() {\n\t\treturn list;\n\t}", "void retrieveBrokerList() {\n java.util.logging.Logger.getLogger(TAG).log(Level.INFO, \"Start: retrieveBrokerList()\");\n // request the list to the cloud\n // parse the response and add brokers to \"brokers\"\n NetworkThread thread = new NetworkThread();\n thread.start();\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n java.util.logging.Logger.getLogger(TAG).log(Level.INFO, \"Finish: retrieveBrokerList()\");\n }", "java.util.List<com.message.BagProto.PlayerBagMsg> \n getListPlayerBagsList();", "public List<T> showAllClients();", "public List<Clients> getallClients();", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionsList();", "java.util.List<Rsp.Msg>\n getMsgList();", "java.util.List<pb4client.TransportRequest> \n getReqList();", "java.util.List<com.rpg.framework.database.Protocol.Item> \n getItemsList();", "java.util.List<Rsp.RequestFromSelf>\n getRequestsList();", "List<TrackerPayload> getBuffer();", "com.ctrip.ferriswheel.proto.v1.Grid getGrid();", "java.util.List<com.message.EquipmentProto.PlayerEquipmentMsg> \n getListPlayerEquipmentsList();", "public void getGameList() {\n try {\n write(\"get gamelist\");\n } catch (IOException e) {\n System.out.println(\"No connecting with server:getGameList\");\n }\n }", "private void getEcoleList(){\r\n\t\tEcoleRequestFactory rf = GWT.create(EcoleRequestFactory.class);\r\n\t\trf.initialize(this.getEventBus(), new EventSourceRequestTransport(this.getEventBus()));\r\n\t\tEcoleRequestContext rc = rf.ecoleRequest();\r\n\t\trc.listAllActive().fire(new Receiver<List<EcoleProxy>>(){\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccess(List<EcoleProxy> response){\r\n\t\t\t\tgetView().setEcoleAddList(response);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(ServerFailure error){\r\n\t\t\t\tWindow.alert(error.getMessage());\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public static ArrayList<Grid> getGrids() {\n\n return grids;\n }", "List<IInboundAdapter> getInboundAdapterList();", "public List getList() throws HibException;", "public LobbyList getLobbyList()\r\n\t{\r\n\t\treturn receiver.getList();\r\n\t}", "java.util.List<Pokemon.Request> \n getRequestsList();", "public JsonArray getGridInfo() {\r\n\t\t\r\n\t\tif (restClient == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"/wapi/v2.3/grid\");\r\n\t\tsb.append(\"?_return_type=json\");\r\n\t\t\r\n\t\tString value = restClient.Get(sb.toString(), null);\r\n\t\t\r\n\t\tif (value == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\t// Change unescape-unicode\r\n\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\r\n\t\t// JsonArray Parser\r\n\t\treturn JsonUtils.parseJsonArray(value);\r\n\t}", "ArrayList<Tile> getTilesPlayerOne() throws RemoteException;", "java.util.List<Res.Msg>\n getMsgList();", "java.util.List<TransmissionProtocol.Request> \n getRequestList();", "public Collection selectAllRssPortlets( )\n {\n String strPortletTypeId = DocumentListPortletHome.getInstance( ).getPortletTypeId( );\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_ALL_RSS );\n\n daoUtil.setString( 1, strPortletTypeId );\n\n daoUtil.executeQuery( );\n\n ArrayList list = new ArrayList( );\n\n while ( daoUtil.next( ) )\n {\n PortletImpl portlet = new PortletImpl( );\n portlet.setId( daoUtil.getInt( 1 ) );\n portlet.setName( daoUtil.getString( 2 ) );\n portlet.setDateUpdate( daoUtil.getTimestamp( 3 ) );\n list.add( portlet );\n }\n\n daoUtil.free( );\n\n return list;\n }", "private List<TOMMessage> getRequestsToRelay() {\n\n List<TOMMessage> messages = lcManager.getCurrentRequestTimedOut();\n\n if (messages == null) {\n\n messages = new LinkedList<>();\n }\n\n // Include requests from STOP messages in my own STOP message\n List<TOMMessage> messagesFromSTOP = lcManager.getRequestsFromSTOP();\n if (messagesFromSTOP != null) {\n\n for (TOMMessage m : messagesFromSTOP) {\n\n if (!messages.contains(m)) {\n\n messages.add(m);\n }\n }\n }\n\n logger.debug(\"I need to relay \" + messages.size() + \" requests\");\n\n return messages;\n }", "java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult> \n getReaultList();", "List<Long> getServers();", "Object getTolist();", "public List getPortletComponents() {\n return components;\n }", "public Collection selectRssPortlets( )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_RSS_PORTLET );\n daoUtil.executeQuery( );\n\n ArrayList list = new ArrayList( );\n\n while ( daoUtil.next( ) )\n {\n PortletImpl portlet = new PortletImpl( );\n portlet.setId( daoUtil.getInt( 1 ) );\n portlet.setName( daoUtil.getString( 2 ) );\n portlet.setDateUpdate( daoUtil.getTimestamp( 3 ) );\n list.add( portlet );\n }\n\n daoUtil.free( );\n\n return list;\n }", "List<Server> servers() {\n return servers;\n }", "java.util.List<com.google.protobuf.ByteString> getResponseList();", "public List<ContentInterventoBOBean> execGetAll() {\n System.out.println(\"InterventoLogics - execGetAll\");\n InterventoClient client = new InterventoClient(new ContentInterventoRequestBean());\n try {\n client.getAll();\n return BOFactory.convertWorkableToBOInterventi(client.getResList());\n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "private static void printGridletList(GridletList list, String name)\r\n {\r\n int size = list.size();\r\n Gridlet gridlet = null;\r\n\r\n String indent = \" \";\r\n System.out.println();\r\n System.out.println(\"============= OUTPUT for \" + name + \" ==========\");\r\n System.out.println(\"Gridlet ID\" + indent + \"getResourceID\" + \"STATUS\" + indent +\r\n \"Resource ID\" + \" getGridletLength getGridletFileSize getGridletOutputSize getGridletOutputSize getSubmissionTime getWaitingTime getWallClockTime getExecStartTime\");\r\n\r\n // a loop to print the overall result\r\n int i = 0;\r\n for (i = 0; i < size; i++)\r\n {\r\n gridlet = (Gridlet) list.get(i);\r\n printGridlet(gridlet);\r\n \r\n\r\n System.out.println();\r\n }\r\n }", "public List<ServerHardware> getServers();", "public List<String> getListOfTemplatesInGadget(){\r\n\t\tList<String> templates = new ArrayList<String>();\r\n\t\tList<WebElement> ele = driver.findElements(By.xpath(\"//div[contains(@class,'x-gadget')]//div[contains(@class,'helpdesk-newcall')]//div[@class='tplLabel']\"));\r\n\t\tfor(WebElement template : ele)\r\n\t\t\ttemplates.add(template.getText());\r\n\t\treturn templates;\r\n\t}", "java.util.List<com.flipkart.vbroker.proto.PartitionLagRequest>\n getPartitionLagsList();", "public List<ProductTilePojo> getLandingProductList() {\n\t\tLOGGER.info(\"getLandingProductList -> Start\");\n\t\tResource landingNodeResource = resolver.getResource(landinggridPath);\n\t\tif (landingNodeResource != null) {\n\t\t\tValueMap nodeValues = landingNodeResource.adaptTo(ValueMap.class);\n\t\t\tif (null != nodeValues) {\n\t\t\t\tpages = nodeValues.get(\"pages\", String[].class);\n\t\t\t\tString orderProduct = nodeValues.get(\"orderProduct\", String.class);\n\t\t\t\tif (orderProduct != null) {\n\t\t\t\t\tif (orderProduct.equals(\"manual\")) {\n\t\t\t\t\t\tlandingProductList = productGalleryAndLandingService.getAllTiles(pages, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString currentPath = homePagePath + PropertyReaderUtils.getProductPath();\n\t\t\t\t\t\tlandingProductList = productGalleryAndLandingService.getTilesByDate(currentPath, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (landingProductList.size() > 12) {\n\t\t\t\t\treturn landingProductList.subList(0, 12);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tLOGGER.debug(\"landingProductList size {}\", \n\t\t\t\t\t\tlandingProductList.size());\n\t\t\t}\n\t\t}\n\t\tLOGGER.info(\"getLandingProductList -> End\");\n\t\treturn landingProductList;\n\t}", "java.util.List<Pokemon.Payload> \n getPayloadList();", "java.util.List<PCommon_Base.CommonBase.NetTransferMsg> \n getNetTransferMsgsList();", "ArrayList<Tile> getTilesPlayerTwo() throws RemoteException;", "java.util.List<org.landxml.schema.landXML11.LanesDocument.Lanes> getLanesList();", "edu.usfca.cs.dfs.StorageMessages.List getList();", "public List<Server> getServerList() {\n return serverList;\n }", "@Override\n\tpublic List<Portlet> getListForSync(Map<String, Object> param) {\n\t\treturn portletDao.getListForSync(param);\n\t}", "private static LightSource[] getAllLightSources(MyLighting server) {\r\n\tint[] lamps = server.getLampIDs();\r\n\tLightSource[] result = new LightSource[lamps.length];\r\n\tfor (int i = 0; i < lamps.length; i++)\r\n\t result[i] = new LightSource(\r\n\t // first param: instance URI\r\n\t\t constructLampURIfromLocalID(lamps[i]),\r\n\t\t // second param: light type\r\n\t\t ElectricLight.lightBulb,\r\n\t\t // thrid param: light location\r\n\t\t new Room(constructLocationURIfromLocalID(server\r\n\t\t\t .getLampLocation(lamps[i]))));\r\n\treturn result;\r\n }", "public static ArrayList<Sample> getAllSamples(int chan) {\n\t\tString path = ALL + chan;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\treturn getSamples(response);\n\t}", "private Vector getContactItems() {\n return protocol.getContactItems();\n }", "java.util.List<lightpay.lnd.grpc.Peer> \n getPeersList();", "public List<ClientThread> getClients(){\n return clients;\n }", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "java.util.List<online_info>\n getInfoList();", "public List<Volume> list() {\n List<Volume> volumes = new ArrayList<Volume>();\n\n try {\n\n HttpResponse<Volume[]> jsonResponse = Unirest.get(rootUrl + ENDPOINT_DATASET_LIST)\n .basicAuth(auth.getUsername(),auth.getPassword())\n .header(\"accept\", \"application/json\")\n .asObject(Volume[].class);\n //System.out.print(jsonResponse.getBody());\n\n if (jsonResponse.getStatus() == HttpStatus.SC_OK) {\n Volume [] body = jsonResponse.getBody();\n System.out.println(body);\n\n for (Volume b: body){\n volumes.add(b);\n }\n }\n\n } catch (UnirestException e) {\n e.printStackTrace();\n }\n\n return volumes;\n }", "public List<String> getCPanelServerList() {\n\t\tString cPanelServerList = getProperties().getProperty(\"cpanel.server.list\").trim();\n\t\tString[] cPanelServerArray= cPanelServerList.split(\"#\");\n\t\tList<String> result = new ArrayList<String>(); \n\t\tfor(String cPanelServer: cPanelServerArray){\n\t\t\tString[] params = cPanelServer.split(\",\");\n\t\t\tif(params!= null && params.length>1){\n\t\t\t\tString cpanelIP = params[0];\n\t\t\t\tresult.add(cpanelIP);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "java.util.List<java.lang.Integer> getListSnIdList();", "private Vector getGroupItems() {\n return protocol.getGroupItems();\n }", "List<IMEInventoryHandler> getCellArray();", "@GetMapping(value=\"/\")\n\t\tpublic static Collection<Lobby> lobbies(){\n\t\t\treturn lobbies.values();\n\t\t}", "public ArrayList<Server> getServers(){\n return this.serversList;\n }", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionList();", "com.google.protobuf.ProtocolStringList\n getListList();", "java.util.List<io.netifi.proteus.admin.om.Node> \n getNodesList();", "public List getList();", "public NetworkInstance[] getServers();", "List<storage_server_connections> getAllForLun(String lunId);", "public void getPlayerList() {\n if (connected == true) {\n try {\n write(\"get playerlist\");\n } catch (IOException e) {\n System.out.println(\"No connecting with server:ServerCommunication:getPlayerList()\");\n }\n }\n }", "void getRequests();", "public Set list() {\n //sanity check\n if (this.isClosed()) {\n //probably an exception should be thrown here!!\n throw new RuntimeException(RLI_NOT_CONNECTED_MSG + this.mRLIURL);\n }\n Set result = new HashSet();\n String url = null,message = null;\n //we need to get hold of all the LRC\n //that report to the RLI and call the\n //list() method on each of them\n for(Iterator it = this.getReportingLRC().iterator();it.hasNext();){\n url = (String)it.next();\n message = \"Querying LRC \" + url;\n mLogger.log(message,LogManager.DEBUG_MESSAGE_LEVEL);\n\n //push the lrcURL to the properties object\n mConnectProps.setProperty(this.URL_KEY,url);\n LRC lrc = new LRC();\n if(!lrc.connect(mConnectProps)){\n //log an error/warning message\n mLogger.log(\"Unable to connect to LRC \" + url,\n LogManager.ERROR_MESSAGE_LEVEL);\n continue;\n }\n try{\n result.addAll(lrc.list());\n }\n catch(Exception e){\n mLogger.log(\"list()\",e,LogManager.ERROR_MESSAGE_LEVEL);\n }\n finally{\n lrc.close();\n }\n mLogger.log(message + LogManager.MESSAGE_DONE_PREFIX,LogManager.DEBUG_MESSAGE_LEVEL);\n }\n\n return result;\n }", "java.util.List<com.lvl6.proto.QuestProto.FullQuestProto> \n getNewlyAvailableQuestsList();", "public List<Integer> getGridData() {\n List<Integer> newGrid = new ArrayList<>();\n newGrid.addAll(gridData);\n return newGrid;\n }", "java.util.List<rina.object.gpb.Neighbour_t.neighbor_t> \n getNeighborList();", "List<String> getHosts();", "public java.util.Enumeration enumeratePortlet()\r\n {\r\n return _portletList.elements();\r\n }", "public ArrayList<ServerClient> displayAll() throws SQLException\n\t{\n\t\tString SQL_P = \"SELECT * FROM Clients\";\n\t\tResultSet rs;\n\n\t\tArrayList<ServerClient> array = new ArrayList<>();\n\t\tStatement stmt = con.createStatement();\n\t\ttry\n\t\t{\n\t\t\trs = stmt.executeQuery(SQL_P);\n\t\t\twhile (rs.next())\n\t\t\t{\n\n\t\t\t}\n\t\t\treturn array;\n\t\t} finally\n\t\t{\n\t\t\tif (stmt != null)\n\t\t\t{\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}", "java.util.List<com.rpg.framework.database.Protocol.Quest> \n getQuestList();", "java.util.List<WorldUps.UInitTruck> \n getTrucksList();", "protected void listClients() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tif (procCount > 0) {\r\n\t\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\t\tSystem.out.print(proc.getSystemId());\r\n\t\t\t\t\t\tif (!proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.println(\" (inactive)\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println();\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\tSystem.out.println(\"No client connected.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}", "public List<T> getAll() {\n return Arrays.asList(buffer);\n }", "public ArrayList<Integer> getConnections(){\n return connectedKeys;\n }", "public BuffList buffs();", "public List<Server> getServerList() {\n return new ArrayList<Server>(serversList);\n }", "public List<String> listeners();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "public void get_all_rooms(){\n new Thread(new Runnable() {\n @Override\n public void run() {\n// throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n try {\n HttpResponse<String> httpResponse = Unirest.get(GlobalClass.ip+\"fetch_all_rooms\")\n .asString();\n if(httpResponse.getStatus() == 200){\n String res = httpResponse.getBody();\n \n arrayList.clear();\n StringTokenizer st1 = new StringTokenizer(res,\"~~\"); //row\n while(st1.hasMoreTokens()){\n String res2 = st1.nextToken();\n StringTokenizer st2 = new StringTokenizer(res2,\"$$\");//column\n while(st2.hasMoreTokens()){\n int rid = Integer.parseInt(st2.nextToken());\n String roomname = st2.nextToken();\n String photo = st2.nextToken();\n String category = st2.nextToken();\n arrayList.add(new Rooms(rid, roomname, category, photo));\n System.out.println(\"\"+roomname);\n }\n \n }\n \n System.out.println(\"\"+arrayList.size());\n j_rooms.getColumnModel().getColumn(3).setCellRenderer(new ImageRenderer());\n j_rooms.setRowHeight(100);\n tm.fireTableDataChanged();\n \n }\n \n \n } catch (Exception ex) {\n Logger.getLogger(Admin_Mage_Rooms.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n \n }\n }).start();\n}", "private void createGridlet(int userID, int numGridlet)\n {\n int data = 500; // 500KB of data\n for (int i = 0; i < numGridlet; i++)\n {\n // Creates a Gridlet\n Gridlet gl = new Gridlet(i, data, data, data);\n gl.setUserID(userID);\n\n // add this gridlet into a list\n this.jobs.add(gl);\n }\n }", "java.util.List<phaseI.Hdfs.BlockLocations> \n getBlockLocationsList();", "public LinkedList getList() {\n\treturn this.roomList;\n}", "public List < Entity > getPassengers ( ) {\n\t\treturn extract ( handle -> handle.getPassengers ( ) );\n\t}" ]
[ "0.5770265", "0.5712883", "0.561869", "0.56018126", "0.5595282", "0.55726594", "0.55696803", "0.5562641", "0.5553655", "0.5544097", "0.5539804", "0.55315346", "0.55117327", "0.54742527", "0.5472967", "0.547223", "0.54661536", "0.5438751", "0.5426783", "0.54213417", "0.5406708", "0.54034746", "0.5402949", "0.5388473", "0.5375585", "0.537269", "0.53408104", "0.53355855", "0.5330369", "0.5326641", "0.5324953", "0.53240657", "0.53154117", "0.53088903", "0.5296931", "0.5294294", "0.52695256", "0.5248002", "0.5236949", "0.5229591", "0.52100074", "0.5208842", "0.5206666", "0.5204656", "0.52041245", "0.52002394", "0.5188366", "0.51739866", "0.5173017", "0.516507", "0.51629865", "0.51532763", "0.5152567", "0.5148642", "0.5145385", "0.5145164", "0.51401305", "0.5123772", "0.5117369", "0.5113325", "0.5110775", "0.51056737", "0.51047903", "0.5104698", "0.5103464", "0.5101305", "0.50994927", "0.50934005", "0.508555", "0.50836396", "0.5082568", "0.50808454", "0.5080329", "0.50801075", "0.50800836", "0.506431", "0.50429446", "0.5041994", "0.50371665", "0.50289506", "0.5024096", "0.50168645", "0.501632", "0.5012423", "0.501168", "0.501168", "0.501168", "0.501168", "0.501168", "0.501168", "0.5009733", "0.5009733", "0.5009733", "0.5009733", "0.5009733", "0.50096416", "0.5004973", "0.5004081", "0.4999255", "0.49931127" ]
0.7489332
0
This method will show you how to create Gridlets
private void createGridlet(int userID, int numGridlet) { int data = 500; // 500KB of data for (int i = 0; i < numGridlet; i++) { // Creates a Gridlet Gridlet gl = new Gridlet(i, data, data, data); gl.setUserID(userID); // add this gridlet into a list this.jobs.add(gl); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createGrid() {\r\n generator.generate();\r\n }", "private TilePane createGrid() {\n\t\tTilePane board = new TilePane();\n\t\tboard.setPrefRows(9);\n\t\tboard.setPrefColumns(9);\n\t\tboard.setPadding(new Insets(3,3,3,3));\n\t\tboard.setHgap(3); //Horisontal gap between tiles\n\t\tboard.setVgap(3); //Vertical gap between tiles\n\t\t\n\t\t//Creates and colors tiles\n\t\tfor(int i = 0; i < 9; i++){\n\t\t\tfor(int k = 0; k < 9; k++){\n\t\t\t\tLetterTextField text = new LetterTextField();\n\t\t\t\ttext.setPrefColumnCount(1);\n\t\t\t\t\n\t\t\t\tif(!(i/3 == 1 || k/3 == 1) || (i/3 == 1 && k/3 == 1)){\n\t\t\t\t\ttext.setStyle(\"-fx-background-color: #daa520;\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfield[i][k] = text;\n\t\t\t\tboard.getChildren().add(text);\n\t\t\t}\n\t\t}\t\t\n\t\treturn board;\n\t}", "public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}", "private void init() {\r\n\r\n createGUI();\r\n\r\n setSize(new Dimension(600, 600));\r\n setTitle(\"Grid - Regular Grid Renderer\");\r\n }", "private void setGrid() {\r\n maxRows = (FORM_HEIGHT - FORM_HEIGHT_ADJUST) / SQUARE_SIZE;\r\n maxColumns = (FORM_WIDTH - FORM_WIDTH_ADJUST) / SQUARE_SIZE; \r\n grid = new JLabel[maxRows][maxColumns];\r\n int y = (FORM_HEIGHT - (maxRows * SQUARE_SIZE)) / 2;\r\n for (int row = 0; row < maxRows; row++) {\r\n int x = (FORM_WIDTH - (maxColumns * SQUARE_SIZE)) / 2;\r\n for (int column = 0; column < maxColumns; column++) {\r\n createSquare(x,y,row,column);\r\n x += SQUARE_SIZE;\r\n }\r\n y += SQUARE_SIZE;\r\n } \r\n }", "GridPanel create(GridDataModel model);", "private void createWidgets() {\n\t\tgrid = new GridPane();\n\t\ttxtNickname = new TextField();\n\t\ttxtPort = new TextField();\n\t\ttxtAdress = new TextField();\n\n\t\tlblNick = new Label(\"Nickname\");\n\t\tlblNickTaken = new Label();\n\t\tlblPort = new Label(\"Port\");\n\t\tlblAdress = new Label(\"Adress\");\n\t\tlblCardDesign = new Label(\"Carddesign\");\n\n\t\tbtnLogin = new Button(\"\");\n\t\timageStart = new Image(BTNSTARTWOOD, 85, 35, true, true);\n\t\timvStart = new ImageView();\n\n\t\tcardDesignOptions = FXCollections.observableArrayList(\n\t\t\t\t\"original design\", \"pirate design\", \"graveyard design\");\n\t\tcomboBoxCardDesign = new ComboBox<String>(cardDesignOptions);\n\n\t\tcomboBoxCardDesign\n\t\t\t\t.setCellFactory(new Callback<ListView<String>, ListCell<String>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ListCell<String> call(ListView<String> list) {\n\t\t\t\t\t\treturn new ExtCell();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t}", "private GridPane inicializarPanelGrid() {\n GridPane gridPane = new GridPane();\n\n // Position the pane at the center of the screen, both vertically and horizontally\n gridPane.setAlignment(Pos.CENTER);\n\n // Set a padding of 20px on each side\n gridPane.setPadding(new Insets(40, 40, 40, 40));\n\n // Set the horizontal gap between columns\n gridPane.setHgap(10);\n\n // Set the vertical gap between rows\n gridPane.setVgap(10);\n\n // Add Column Constraints\n // columnOneConstraints will be applied to all the nodes placed in column one.\n ColumnConstraints columnOneConstraints = new ColumnConstraints(100, 100, Double.MAX_VALUE);\n columnOneConstraints.setHalignment(HPos.RIGHT);\n\n // columnTwoConstraints will be applied to all the nodes placed in column two.\n ColumnConstraints columnTwoConstrains = new ColumnConstraints(200, 200, Double.MAX_VALUE);\n columnTwoConstrains.setHgrow(Priority.ALWAYS);\n\n gridPane.getColumnConstraints().addAll(columnOneConstraints, columnTwoConstrains);\n\n return gridPane;\n }", "private GridLayout buildGridData() {\n\t\tgridData = new GridLayout();\r\n\t\tgridData.setImmediate(false);\r\n\t\tgridData.setWidth(\"-1px\");\r\n\t\tgridData.setHeight(\"100.0%\");\r\n\t\tgridData.setMargin(false);\r\n\t\tgridData.setSpacing(true);\r\n\t\tgridData.setColumns(2);\r\n\t\tgridData.setRows(2);\r\n\t\t\r\n\t\t// labelA\r\n\t\tlabelA = new Label();\r\n\t\tlabelA.setImmediate(false);\r\n\t\tlabelA.setWidth(\"-1px\");\r\n\t\tlabelA.setHeight(\"-1px\");\r\n\t\tlabelA.setValue(\"<b>Autor:</b>\");\r\n\t\tlabelA.setContentMode(3);\r\n\t\tgridData.addComponent(labelA, 0, 0);\r\n\t\t\r\n\t\t// labelAuthor\r\n\t\tlabelAuthor = new Label();\r\n\t\tlabelAuthor.setImmediate(false);\r\n\t\tlabelAuthor.setWidth(\"-1px\");\r\n\t\tlabelAuthor.setHeight(\"-1px\");\r\n\t\tlabelAuthor.setValue(\"Label\");\r\n\t\tgridData.addComponent(labelAuthor, 1, 0);\r\n\t\t\r\n\t\t// labelB\r\n\t\tlabelB = new Label();\r\n\t\tlabelB.setImmediate(false);\r\n\t\tlabelB.setWidth(\"-1px\");\r\n\t\tlabelB.setHeight(\"-1px\");\r\n\t\tlabelB.setValue(\"<b>Editorial:</b>\");\r\n\t\tlabelB.setContentMode(3);\r\n\t\tgridData.addComponent(labelB, 0, 1);\r\n\t\t\r\n\t\t// labelPublisher\r\n\t\tlabelPublisher = new Label();\r\n\t\tlabelPublisher.setImmediate(false);\r\n\t\tlabelPublisher.setWidth(\"-1px\");\r\n\t\tlabelPublisher.setHeight(\"-1px\");\r\n\t\tlabelPublisher.setValue(\"Label\");\r\n\t\tgridData.addComponent(labelPublisher, 1, 1);\r\n\t\t\r\n\t\treturn gridData;\r\n\t}", "private void createGrid() {\n Platform.runLater(() -> {\n\n // Update UI here\n //createGrid(numRows); // E.g. let's create a 20 x 20 grid\n createGrid(20);\n });\n }", "public GridPane initializeGridPane() {\n\t\tGridPane world = new GridPane();\n\t\t\n\t\tfor (int x = 0; x < this.columns; x++) {\n\t\t\tfor (int y = 0; y < this.rows; y++) {\n\t\t\t\tRectangle cellGUI = new Rectangle(this.widthOfCells - 1, this.heightOfCells - 1);\n\t\t\t\tcellGUI.setFill(Color.web(\"#FFFFFF\"));\t\t// White cell background color\n cellGUI.setStroke(Color.web(\"#C0C0C0\")); \t// Grey cell border color\n cellGUI.setStrokeWidth(1); \t\t\t\t\t// Width of the border\n\n world.add(cellGUI, x, y);\n this.cellGUIArray[x][y] = cellGUI;\n\n cellGUI.setOnMouseClicked((event) -> {\n \tthis.currentGeneration = this.simulation.getCurrentGeneration();\n for (int i = 0; i < columns; i++) {\n for (int j = 0; j < rows; j++) {\n if (this.cellGUIArray[i][j].equals(cellGUI) && this.currentGeneration[i][j] == 0) {\n this.currentGeneration[i][j] = 1;\n } else if (this.cellGUIArray[i][j].equals(cellGUI) && this.currentGeneration[i][j] == 1) {\n this.currentGeneration[i][j] = 0;\n }\n }\n }\n this.simulation.setCurrentGeneration(this.currentGeneration);\n });\n\t\t\t}\n\t\t}\n\t\treturn world;\n\t}", "private void initComponents() {\n rootLayout = new Grid();\n rootLayout.setWidth(new Extent(100, Extent.PERCENT));\n rootLayout.setSize(2);\n add(rootLayout);\n Empsn_Label= new nextapp.echo2.app.Label();\n Empsn_Label.setText(\"N_TIME_BEAR.EMPSN\");\n rootLayout.add(Empsn_Label);\n \n Empsn_DscField = new dsc.echo2app.component.DscField();\n Empsn_DscField.setId(\"Empsn_DscField\");\n Empsn_DscField.setWidth(new Extent(4, Extent.CM));\n rootLayout.add(Empsn_DscField);\n \n\t}", "public void addPanelForResult(GridPane gridPane) {\n\t\tint nbrCols = gridPane.getColumnCount(); \n\t\tint nbrRows = gridPane.getRowCount();\n\t\tfor(int i =0; i<nbrRows; i++) {\n\t\t\tPane pane = new Pane(); \n\t\t\tpane.setStyle(\"-fx-background-color: #FFFFFF;\"); \n\n\t\t\tLabel label = new Label(\"C\"+(i+1)); \n\t\t\tgridPane.add(pane,0, i);\n\t\t\tgridPane.add(label, 0,i);\n\t\t\tGridPane.setHalignment(label, HPos.CENTER);\n\n\t\t}\n\n\t\t// Ajout d'un panel aux autres cellules \n\t\tfor(int i=1; i<=nbrCols; i++) {\n\t\t\tfor(int j=0; j<=nbrRows; j++) {\n\t\t\t\tPane pane = new Pane(); \n\t\t\t\tpane.setStyle(\"-fx-border-color: black; -fx-border-width: 1 1 0 0;\");\n\n\t\t\t\tgridPane.add(pane, i, j);\n\t\t\t}\n\t\t}\n\t}", "private void init() {\n List<Contructor> list = servisContructor.getAllContructors();\n for (Contructor prod : list) {\n contructor.add(new ContructorViewer(prod));\n }\n\n Label label = new Label(\"Catalog Contructors\");\n label.setLayoutX(140);\n label.setLayoutY(20);\n label.setStyle(\"-fx-font-size:20px\");\n\n initTable();\n table.setLayoutX(120);\n table.setLayoutY(60);\n table.setStyle(\"-fx-font-size:16px\");\n\n GridPane control = new ControlPanel(this, 2).getPanel();\n control.setLayoutX(120);\n control.setLayoutY(300);\n\n panel.setAlignment(Pos.CENTER);\n panel.add(label, 0, 0);\n panel.add(table, 0, 1);\n panel.add(control, 0, 2);\n }", "private void initializeGrid() {\n // 50 pixel first row for banner\n addPercentRows(root, 5);\n // second row takes up 100% of the remaining space\n addPercentRows(root, 95);\n // One column at 100% width\n addPercentColumns(root, 100);\n\n Label title = new Label(\"Mission Control\");\n title.setFont(new Font(\"Arial\", 22));\n title.setTextFill(Color.WHITE);\n\n GridPane contentGrid = new GridPane();\n // Only need one row as content will fill the entire vertical space\n addPercentRows(contentGrid, 100);\n\n // Need three columns, 1/6 column for nav, 2/3 for main content, 1/6 for warnings\n double sidePanelPercent = (1d / 6d) * 100d;\n double centerPanelPercent = (2d / 3d) * 100d;\n addPercentColumns(contentGrid, sidePanelPercent, centerPanelPercent, sidePanelPercent);\n\n\n addNodeToGrid(title, root, 0, 0, Pos.CENTER, Colours.PRIMARY_COLOUR, Insets.EMPTY);\n // NOTE:: This assumes that it is the only child added to root by this point to set ID.\n // If this is changed DynamicGuiTests will break.\n root.getChildren().get(0).setId(\"pnBanner\");\n\n addNodeToGrid(contentGrid, root, 1, 0);\n\n setupCenterPanel(contentGrid);\n setupRightHandSidePanel(contentGrid);\n setupLeftHandSidePanel(contentGrid);\n\n // Assert they are created - mainly to bypass Spot bugs issues.\n assert this.navigationView != null;\n assert this.graphView != null;\n assert this.informationView != null;\n }", "protected void createLayout() {\n\t\tthis.layout = new GridLayout();\n\t\tthis.layout.numColumns = 2;\n\t\tthis.layout.marginWidth = 2;\n\t\tthis.setLayout(this.layout);\n\t}", "private void create() {\n\t\tGridLayout grid = new GridLayout(3,2);\n\t\tthis.setLayout(grid);\n\t\tthis.setBackground(Color.WHITE);\n\t\t\n\t\tadd(new JLabel(\"Username/Library Card #:\", SwingConstants.LEFT), grid);\n\t\tusername.setPreferredSize(new Dimension(1, 12));\n\t\tadd(username,grid);\n\t\t\n\t\tadd(new JLabel(\"Password:\", SwingConstants.LEFT), grid);\n\t\tadd(password, grid);\n\t\t\n\t\tLoginAction();\n\t\tadd(submit, grid);\n\t}", "private TileGrid createItemsTileGrid() {\n\t\titemsTileGrid.setBorder(\"1px solid #C0C3C7\");\r\n\t\titemsTileGrid.setTileWidth(100);\r\n\t\titemsTileGrid.setTileHeight(140);\r\n\t\titemsTileGrid.setTileValueAlign(\"left\");\r\n\t\titemsTileGrid.setWidth100();\r\n\t\titemsTileGrid.setHeight100();\r\n\t\titemsTileGrid.setAnimateTileChange(true);\r\n\t\t\r\n\t\titemsTileGrid.setShowAllRecords(true);\r\n\t\titemsTileGrid.setDataSource(SmartGWTRPCDataSource.getInstance());\r\n\t\titemsTileGrid.setAutoFetchData(false);\r\n\r\n\t\tDetailViewerField imageField = new DetailViewerField(\"imageKey\");\r\n\t\tDetailViewerField name = new DetailViewerField(\"name\");\r\n\t\tDetailViewerField company = new DetailViewerField(\"company\");\r\n\t\tDetailViewerField ownerNickName = new DetailViewerField(\"ownerNickName\");\r\n\t\tDetailViewerField averageRating = new DetailViewerField(\"averageRating\");\r\n\t\t//show star images for the average rating\r\n\t\taverageRating.setDetailFormatter(new DetailFormatter() {\r\n\t\t\tpublic String format(Object value, DetailViewerRecord record,\r\n\t\t\t\t\tDetailViewerField field) {\r\n\t\t\t\t\tint averageRating = record.getAttributeAsInt(\"averageRating\");\r\n\t\t\t\t\tint numberOfRatings = record.getAttributeAsInt(\"numberOfRatings\");\r\n\t\t\t\treturn createStarsHTMLString(averageRating) + \" / \" + numberOfRatings;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tDetailViewerField lastUpdated = new DetailViewerField(\"lastUpdated\");\r\n\t\tlastUpdated.setDetailFormatter(new DetailFormatter() {\r\n\t\t\tpublic String format(Object value, DetailViewerRecord record,\r\n\t\t\t\t\tDetailViewerField field) {\r\n\t\t\t\t\tDate lastUpdated = record.getAttributeAsDate(\"lastUpdated\");\r\n\t\t\t if(lastUpdated == null) return null; \r\n\t\t\t return dateFormatter.format(lastUpdated);\r\n\t\t\t}\r\n\t\t}\r\n\t\t);\r\n\t\titemsTileGrid.setFields(imageField, name, company ,ownerNickName, \r\n\t\t\t\taverageRating, lastUpdated);\r\n\t\titemsTileGrid.addRecordClickHandler(new RecordClickHandler() {\r\n\t\t\tpublic void onRecordClick(RecordClickEvent event) {\r\n\t\t\t\tSwagItemGWTDTO dto = new SwagItemGWTDTO();\r\n\t\t\t\tSmartGWTRPCDataSource.copyValues(event.getRecord(),dto);\r\n\t\t\t\tprepareAndShowEditForm(event.getRecord());\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn itemsTileGrid;\r\n\t}", "private void createGrid(int numRows) {\n // Creates a grid so that we can display the animation. We will see\n // other layout panes in the lectures.\n grid = new GridPane();\n\n // We need to create a 2D array of javafx Buttons that we will\n // add to the grid. The 2D array makes it much easier to change\n // the colour of the buttons in the grid; easy lookup using\n // 2D indicies. Note that we make this read-only for this display\n // onlt grid. If you go for flair marks, then I'd imagine that you\n // could create something similar that allows you to edits frames\n // in the footage.\n gridArray = new Button[numRows][numRows];\n Button displayButton = null;\n for (int row = 0; row < numRows; row++) {\n for (int col = 0; col < numRows; col++) { // The display is square\n displayButton = new Button();\n gridArray[row][col] = displayButton;\n displayButton.setDisable(true);\n grid.add(displayButton, col, row);\n }\n }\n\n // Create a scene to hold the grid of buttons\n // The stage will \"shrink wrap\" around the grid of buttons,\n // so we don't need to set its height and width.\n scene = new Scene(grid);\n stage.setScene(scene);\n scene.getStylesheets().add(Animator.class.getResource(\"styling.css\").toExternalForm());\n\n // Make it resizable so that the window shrinks to fit the scene grid\n stage.setResizable(true);\n stage.sizeToScene();\n // Raise the curtain on the stage!\n stage.show();\n // Stop the user from resizing the window\n stage.setResizable(false);\n }", "public RegularGrid() {\r\n }", "private VerticalLayout buildGridInfo() {\n\t\tgridInfo = new VerticalLayout();\r\n\t\tgridInfo.setImmediate(false);\r\n\t\tgridInfo.setWidth(\"100%\");\r\n\t\tgridInfo.setHeight(\"100.0%\");\r\n\t\tgridInfo.setMargin(false);\r\n\t\tgridInfo.setSpacing(true);\r\n\t\t\r\n\t\t// gridTitle\r\n\t\tgridTitle = buildGridTitle();\r\n\t\tgridInfo.addComponent(gridTitle);\r\n\t\tgridInfo.setExpandRatio(gridTitle, 1.0f);\r\n\t\t\r\n\t\t// gridData\r\n\t\tgridData = buildGridData();\r\n\t\tgridInfo.addComponent(gridData);\r\n\t\tgridInfo.setExpandRatio(gridData, 1.0f);\r\n\t\t\r\n\t\treturn gridInfo;\r\n\t}", "public ControlPanel(TileGrid grid){\n\t\tsetSize(WIDTH, HEIGHT);\n\t\t\n\t\t/*itrLabel = new JLabel(\"Number of iterations to run:\");\n\t\tadd(itrLabel);\n\t\titerations = new JTextField(\"50\", 5);\n\t\tadd(iterations);*/\n\t\t\n\t\tstart = new JButton(\"Start game\");\n\t\tstart.addActionListener(this);\n\t\tadd(start);\n\t\treset = new JButton(\"Reset\");\n\t\treset.addActionListener(this);\n\t\tadd(reset);\n\t\tresume = new JButton(\"Resume\");\n\t\tresume.addActionListener(this);\n\t\tadd(resume);\n\t\tstop = new JButton(\"Stop\");\n\t\tstop.addActionListener(this);\n\t\tadd(stop);\n\t\t\n\t\tpresetLabel = new JLabel(\"Preset configurations:\");\n\t\tadd(presetLabel);\n\t\tString[] presetList = {\"Select a preset\", \"Glider\", \"Small Explosion\", \"Gosper Glider Gun\"};\n\t\tpresets = new JComboBox<String>(presetList);\n\t\tpresets.addItemListener(this);\n\t\tadd(presets);\n\t\t\n\t\tthis.grid = grid;\n\t}", "public static void displayGrid(int[][] grid){\n // JFrame to open a new window.\n JFrame frame = new JFrame();\n\t\n\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\tfinal int FRAME_WIDTH = offset + width * (grid[0].length + 1);\n\tfinal int FRAME_HEIGHT = offset + width * (grid.length+2);\n\n Grid panel = new Grid(grid);\n\t//creates a window of appropriate (variable) size.\n\tframe.setSize(FRAME_WIDTH,FRAME_HEIGHT); \n\n\tframe.add(panel); \n\tframe.setVisible(true); // makes the application visible.\n }", "private void createRenderables()\n {\n this.gridElements = new ArrayList<GridElement>();\n\n ArrayList<Position> positions = new ArrayList<Position>();\n double step = sector.getDeltaLatDegrees() / this.divisions;\n\n // Generate meridians with labels\n double lon = sector.getMinLongitude().degrees + (this.level == 0 ? 0 : step);\n while (lon < sector.getMaxLongitude().degrees - step / 2)\n {\n Angle longitude = Angle.fromDegrees(lon);\n // Meridian\n positions.clear();\n positions.add(new Position(this.sector.getMinLatitude(), longitude, 0));\n positions.add(new Position(this.sector.getMaxLatitude(), longitude, 0));\n\n Object polyline = createLineRenderable(positions, Polyline.LINEAR);\n Sector sector = Sector.fromDegrees(\n this.sector.getMinLatitude().degrees, this.sector.getMaxLatitude().degrees, lon, lon);\n String lineType = lon == this.sector.getMinLongitude().degrees ?\n GridElement.TYPE_LINE_WEST : GridElement.TYPE_LINE;\n GridElement ge = new GridElement(sector, polyline, lineType);\n ge.value = lon;\n this.gridElements.add(ge);\n\n // Increase longitude\n lon += step;\n }\n\n // Generate parallels\n double lat = this.sector.getMinLatitude().degrees + (this.level == 0 ? 0 : step);\n while (lat < this.sector.getMaxLatitude().degrees - step / 2)\n {\n Angle latitude = Angle.fromDegrees(lat);\n positions.clear();\n positions.add(new Position(latitude, this.sector.getMinLongitude(), 0));\n positions.add(new Position(latitude, this.sector.getMaxLongitude(), 0));\n \n Object polyline = createLineRenderable(positions, Polyline.LINEAR);\n Sector sector = Sector.fromDegrees(\n lat, lat, this.sector.getMinLongitude().degrees, this.sector.getMaxLongitude().degrees);\n String lineType = lat == this.sector.getMinLatitude().degrees ?\n GridElement.TYPE_LINE_SOUTH : GridElement.TYPE_LINE;\n GridElement ge = new GridElement(sector, polyline, lineType);\n ge.value = lat;\n this.gridElements.add(ge);\n\n // Increase latitude\n lat += step;\n }\n }", "@AutoGenerated\r\n\tprivate GridLayout buildGridLayout_5() {\n\t\tgridLayout_5 = new GridLayout();\r\n\t\tgridLayout_5.setWidth(\"100.0%\");\r\n\t\tgridLayout_5.setHeight(\"100.0%\");\r\n\t\tgridLayout_5.setImmediate(false);\r\n\t\tgridLayout_5.setMargin(false);\r\n\t\tgridLayout_5.setSpacing(true);\r\n\t\tgridLayout_5.setColumns(4);\r\n\t\tgridLayout_5.setRows(7);\r\n\t\t\r\n\t\t// chnlsLbl\r\n\t\tchnlsLbl = new Label();\r\n\t\tchnlsLbl.setWidth(\"-1px\");\r\n\t\tchnlsLbl.setHeight(\"-1px\");\r\n\t\tchnlsLbl.setValue(\"Channels\");\r\n\t\tchnlsLbl.setImmediate(false);\r\n\t\tgridLayout_5.addComponent(chnlsLbl, 0, 1);\r\n\t\t\r\n\t\t// slctChnls\r\n\t\tslctChnls = new NativeSelect();\r\n\t\tslctChnls.setWidth(\"-1px\");\r\n\t\tslctChnls.setHeight(\"-1px\");\r\n\t\tslctChnls.setImmediate(false);\r\n\t\tslctChnls.addItem(1);\r\n\t\tslctChnls.addItem(2);\r\n\t\tslctChnls.setValue(2); //set default number of channels\r\n\t\tgridLayout_5.addComponent(slctChnls, 1, 1);\r\n\t\t\r\n\t\t// smplSzLbl\r\n\t\tsmplSzLbl = new Label();\r\n\t\tsmplSzLbl.setWidth(\"-1px\");\r\n\t\tsmplSzLbl.setHeight(\"-1px\");\r\n\t\tsmplSzLbl.setValue(\"Sample size\");\r\n\t\tsmplSzLbl.setImmediate(false);\r\n\t\tgridLayout_5.addComponent(smplSzLbl, 0, 2);\r\n\t\t\r\n\t\t// slctSmplSz\r\n\t\tslctSmplSz = new NativeSelect();\r\n\t\tslctSmplSz.setWidth(\"-1px\");\r\n\t\tslctSmplSz.setHeight(\"-1px\");\r\n\t\tslctSmplSz.setImmediate(false);\r\n\t\tslctSmplSz.addItem(\"8-bit\");\r\n\t\tslctSmplSz.addItem(\"16-bit\");\r\n\t\tslctSmplSz.setValue(\"16-bit\"); //set default sample size\r\n\t\tgridLayout_5.addComponent(slctSmplSz, 1, 2);\r\n\t\t\r\n\t\t// splRtLbl\r\n\t\tsplRtLbl = new Label();\r\n\t\tsplRtLbl.setWidth(\"-1px\");\r\n\t\tsplRtLbl.setHeight(\"-1px\");\r\n\t\tsplRtLbl.setValue(\"Sample rate\");\r\n\t\tsplRtLbl.setImmediate(false);\r\n\t\tgridLayout_5.addComponent(splRtLbl, 0, 3);\r\n\t\t\r\n\t\t// slctSmplRt\r\n\t\tslctSmplRt = new NativeSelect();\r\n\t\tslctSmplRt.setWidth(\"-1px\");\r\n\t\tslctSmplRt.setHeight(\"-1px\");\r\n\t\tslctSmplRt.setImmediate(false);\r\n\t\tslctSmplRt.addItem(8000);\r\n\t\tslctSmplRt.addItem(11025);\r\n\t\tslctSmplRt.addItem(16000);\r\n\t\tslctSmplRt.addItem(22050);\r\n\t\tslctSmplRt.addItem(44100);\r\n\t\tslctSmplRt.setValue(44100); //set default sample rate\r\n\t\tgridLayout_5.addComponent(slctSmplRt, 1, 3);\r\n\t\t\r\n\t\treturn gridLayout_5;\r\n\t}", "public GridButton(int column, int row) {\n\n // YOUR CODE HERE\n this.column = column;\n this.row =row;\n this.lbl = new JLabel();\n\n\n }", "protected void createComponents() {\n sampleText = new JTextField(20);\n displayArea = new JLabel(\"\");\n displayArea.setPreferredSize(new Dimension(200, 75));\n displayArea.setMinimumSize(new Dimension(200, 75));\n }", "private Grid makeGrid()\n\t{\n\t\tGrid grid = Grid.grid().\n\t\t\t\tBus(\"1\").\n\t\t\t\tSlackSource(\"Slack\", BASE_VOLTAGE, 0, 0, 0).\n\t\t\t\tLine(\"1-2\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\tBus(\"2\").\n\t\t\t\t\t\tControllableDemand(\"S\").\n\t\t\t\t\t\tLine(\"2-3\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\t\tBus(\"3\").\n\t\t\t\t\t\t\t\tLoad(\"L\").\n\t\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tLine(\"2-4\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\tBus(\"4\").\n\t\t\t\t\t\t\tDistributedSource(\"DG\").\n\t\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\tterminate().\n\t\t\tterminate().\n\t\tgrid();\n\t\t\n\t\t// x_0:\n\t\tLoad load = grid.getLoad(\"L\");\n\t\tControllableDemand storage = grid.getControllableDemand(\"S\");\n\t\tDistributedSource dg = grid.getDistributedSource(\"DG\");\n\t\tsetupUnits(load, storage, dg);\n\t\t\n\t\treturn grid;\n\t}", "public Grid() {\n super(); // create a new JPanel\n grid = new ArrayList<>(); // initialize a list containing the blocks\n \n setLayout(null); // format the component\n setFocusable(false);\n setBackground(Block.deadColor);\n addComponentListener(new java.awt.event.ComponentAdapter() { // detects when the window is resized to resize the grid\n @Override\n public void componentResized(java.awt.event.ComponentEvent evt) {\n resizeGrid();\n }\n });\n \n // provide a link to the grid to classes so that all instances have access to it\n PathFinder.setGrid(this);\n EscapeBlock.setGrid(this);\n Character.setGrid(this);\n \n }", "private void addElementsGridPane(GridPane infosPane, Label toDrawLbl, \n Label wordLbl, Label avgPropsTitleLbl, \n Label avgPropsLbl) {\n infosPane.add(super.getGameStatusTitleLbl(), 0, 0);\n infosPane.add(super.getGameStatusLbl(), 0, 1);\n infosPane.add(toDrawLbl, 0, 5);\n infosPane.add(wordLbl, 0, 6);\n infosPane.add(avgPropsTitleLbl, 0, 8);\n infosPane.add(avgPropsLbl, 0, 9);\n infosPane.add(super.getHistoryLbl(), 0, 11);\n infosPane.add(super.getPropositionHist(), 0, 12);\n infosPane.add(super.getHistoryBtn(), 0, 18);\n infosPane.add(super.getQuitBtn(), 0, 20);\n }", "private Pane getGridPane ()\r\n {\r\n GridPane gridPane = new GridPane();\r\n \r\n int i = 0;\r\n for(Button b : this.buttons)\r\n {\r\n gridPane.add( b, i*(i+(int)b.getWidth()), 0);\r\n i++;\r\n }\r\n \r\n return gridPane;\r\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n // TODO\n\n\n GridPane grid = new GridPane();\n\n grid.setPadding(new javafx.geometry.Insets(10,10,10,10));\n \n \n \nProduitService sb=new ProduitService();\nList<Produit>lst=sb.FindAll();\nint elements=sb.counte();\n\n\n grid.setHgap(10);\n grid.setVgap(10);\n int cols=4, colCnt = 0, rowCnt = 0;\n\n for (int i=0; i<elements; i++) {\nFileInputStream input = null;\n try {\n input = new FileInputStream(\"C:\\\\images\\\\\"+lst.get(i).getPhoto());\n \n Image image = new Image(input);\n ImageView imageView = new ImageView(image);\n imageView.setFitHeight(100);\n imageView.setFitWidth(100);\n Label label1 = new Label(lst.get(i).getModel());\n Label label2 = new Label(lst.get(i).getType());\n Label label3 = new Label(lst.get(i).getQuantity());\n Label label4 = new Label(lst.get(i).getPrice()+\" $\");\n int x=lst.get(i).getId();\n \n VBox root = new VBox(label1,imageView,label2,label3,label4);\n grid.add(root,colCnt,rowCnt);\n colCnt+=1;\n if (colCnt>cols) {\n rowCnt++;\n colCnt=0;\n } } catch (FileNotFoundException ex) {\n Logger.getLogger(FXML_ProductController.class.getName()).log(Level.SEVERE, null, ex);\n } \n }\n panell.getChildren().add(grid);\n \n \n\n \n\n \n \n \n \n \n \n }", "private void addWidgets() {\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(5);\n\t\tgrid.setPadding(new Insets(150, 80, 80, 80));\n\t\tgrid.add(lblPort, 0, 1);\n\t\tgrid.add(txtPort, 1, 1);\n\t\tgrid.add(lblAdress, 0, 2);\n\t\tgrid.add(txtAdress, 1, 2);\n\t\tgrid.add(lblNick, 0, 4);\n\t\tgrid.add(txtNickname, 1, 4);\n\t\tgrid.add(lblNickTaken, 1, 5);\n\t\tgrid.add(lblCardDesign, 0, 3);\n\t\tgrid.add(comboBoxCardDesign, 1, 3);\n\t\tgrid.add(btnLogin, 0, 7);\n\t\timvStart.setImage(imageStart);\n\t}", "private Grid<Movimiento> createGrid() {\n\t\tgrid = new Grid<>();\n\t\tgrid.addThemeVariants(GridVariant.LUMO_NO_BORDER,GridVariant.LUMO_ROW_STRIPES);\n\t\t\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\n\t\tgrid.addComponentColumn(c -> new IconoMovimientoTarjeta(c))\n\t\t.setWidth(\"100px\").setHeader(\"Tarjeta\").setFlexGrow(1);\n\t\tgrid.addColumn(c -> c.getCantidad()+\" €\").setHeader(\"Cantidad\").setFlexGrow(1);\n grid.addColumn(c -> c.getConcepto()).setHeader(\"Concepto\").setFlexGrow(1);\n grid.addColumn(c -> dateFormat.format(c.getFecha())).setHeader(\"Fecha\").setWidth(\"125px\").setFlexGrow(0);\n \n return grid;\n\t}", "private static void createAndShowGUI() {\n\t JFrame frame = new JFrame(\"GridLines\");\n\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t GridLinesPanel paintPanel = new GridLinesPanel();\n\t paintPanel.setPreferredSize(new Dimension(500,500));\n\t frame.getContentPane().add(paintPanel,BorderLayout.CENTER);\n\n\t frame.pack();\n\t frame.setVisible(true);\n }", "private void createComponents() {\n\n add(createSetDataPanel(), BorderLayout.NORTH);\n add(createResourcesListAndButtonsPanel(), BorderLayout.CENTER);\n }", "private void createGrid() {\n String imageButtonID;\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n imageButtonID = \"painterImageButton_\" + i + j;\n\n //This step allows easy assignment of each imageButton with a nested loop\n int resID = this.getResources().getIdentifier(imageButtonID, \"id\", this.getPackageName());\n grid[i][j] = findViewById(resID);\n grid[i][j].setOnClickListener(this); //Response to each button click\n\n //Generate a random number to decide whether to put white or black here\n double x = Math.random() * 2;\n if (x < 1) {\n grid[i][j].setImageResource(R.drawable.black_circle);\n grid[i][j].setContentDescription(getString(R.string.alien_painter_black));\n } else if (x < 2) {\n grid[i][j].setImageResource(R.drawable.white_circle);\n grid[i][j].setContentDescription(getString(R.string.alien_painter_white));\n }\n\n }\n }\n\n //Make sure the grid isn't entirely black at the beginning\n grid[1][1].setImageResource(R.drawable.white_circle);\n grid[1][1].setContentDescription(\"white\");\n }", "GridType createGridType();", "private void initGrids() {\n grid0 = new Grid(100f, 50f, 100f, 0);\n grid1 = new Grid(100f, 150f, 100f, 1);\n grid2 = new Grid(100f, 250f, 100f, 2);\n grid3 = new Grid(100f, 350f, 100f, 3);\n grid4 = new Grid(100f, 50f, 200f, 4);\n grid5 = new Grid(100f, 150f, 200f, 5);\n grid6 = new Grid(100f, 250f, 200f, 6);\n grid7 = new Grid(100f, 350f, 200f, 7);\n grid8 = new Grid(100f, 50f, 300f, 8);\n grid9 = new Grid(100f, 150f, 300f, 9);\n grid10 = new Grid(100f, 250f, 300f, 10);\n grid11 = new Grid(100f, 350f, 300f, 11);\n grid12 = new Grid(100f, 50f, 400f, 12);\n grid13 = new Grid(100f, 150f, 400f, 13);\n grid14 = new Grid(100f, 250f, 400f, 14);\n grid15 = new Grid(100f, 350f, 400f, 15);\n\n /**\n * Adding grids from 0 to 15 to static ArayList of all grids\n */\n grids.clear();\n\n grids.add(grid0);\n grids.add(grid1);\n grids.add(grid2);\n grids.add(grid3);\n grids.add(grid4);\n grids.add(grid5);\n grids.add(grid6);\n grids.add(grid7);\n grids.add(grid8);\n grids.add(grid9);\n grids.add(grid10);\n grids.add(grid11);\n grids.add(grid12);\n grids.add(grid13);\n grids.add(grid14);\n grids.add(grid15);\n }", "@AutoGenerated\n\tprivate GridLayout buildGridLayout_1() {\n\t\tgridLayout_1 = new GridLayout();\n\t\tgridLayout_1.setImmediate(false);\n\t\tgridLayout_1.setWidth(\"-1px\");\n\t\tgridLayout_1.setHeight(\"-1px\");\n\t\tgridLayout_1.setMargin(true);\n\t\tgridLayout_1.setSpacing(true);\n\t\tgridLayout_1.setColumns(2);\n\t\tgridLayout_1.setRows(13);\n\t\t\n\t\t// l_nombre\n\t\tl_nombre = new Label();\n\t\tl_nombre.setImmediate(false);\n\t\tl_nombre.setWidth(\"200px\");\n\t\tl_nombre.setHeight(\"18px\");\n\t\tl_nombre.setValue(\"Nombres:\");\n\t\tgridLayout_1.addComponent(l_nombre, 0, 0);\n\t\t\n\t\t// tf_nombres\n\t\ttf_nombres = new TextField();\n\t\ttf_nombres.setImmediate(false);\n\t\ttf_nombres.setWidth(\"300px\");\n\t\ttf_nombres.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_nombres, 1, 0);\n\t\t\n\t\t// l_apellidos\n\t\tl_apellidos = new Label();\n\t\tl_apellidos.setImmediate(false);\n\t\tl_apellidos.setWidth(\"-1px\");\n\t\tl_apellidos.setHeight(\"-1px\");\n\t\tl_apellidos.setValue(\"Apellidos:\");\n\t\tgridLayout_1.addComponent(l_apellidos, 0, 1);\n\t\t\n\t\t// tf_apellidos\n\t\ttf_apellidos = new TextField();\n\t\ttf_apellidos.setImmediate(false);\n\t\ttf_apellidos.setWidth(\"100.0%\");\n\t\ttf_apellidos.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_apellidos, 1, 1);\n\t\t\n\t\t// l_pass\n\t\tl_pass = new Label();\n\t\tl_pass.setImmediate(false);\n\t\tl_pass.setWidth(\"-1px\");\n\t\tl_pass.setHeight(\"-1px\");\n\t\tl_pass.setValue(\"Contraseña:\");\n\t\tgridLayout_1.addComponent(l_pass, 0, 2);\n\t\t\n\t\t// pw_pass\n\t\tpw_pass = new PasswordField();\n\t\tpw_pass.setImmediate(false);\n\t\tpw_pass.setWidth(\"100.0%\");\n\t\tpw_pass.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(pw_pass, 1, 2);\n\t\t\n\t\t// l_confirmarPass\n\t\tl_confirmarPass = new Label();\n\t\tl_confirmarPass.setImmediate(false);\n\t\tl_confirmarPass.setWidth(\"-1px\");\n\t\tl_confirmarPass.setHeight(\"-1px\");\n\t\tl_confirmarPass.setValue(\"Confirmar Contraseña:\");\n\t\tgridLayout_1.addComponent(l_confirmarPass, 0, 3);\n\t\t\n\t\t// pw_confirmarPass\n\t\tpw_confirmarPass = new PasswordField();\n\t\tpw_confirmarPass.setImmediate(false);\n\t\tpw_confirmarPass.setWidth(\"100.0%\");\n\t\tpw_confirmarPass.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(pw_confirmarPass, 1, 3);\n\t\t\n\t\t// l_nick\n\t\tl_nick = new Label();\n\t\tl_nick.setImmediate(false);\n\t\tl_nick.setWidth(\"-1px\");\n\t\tl_nick.setHeight(\"-1px\");\n\t\tl_nick.setValue(\"Nombre Usuario/Nick:\");\n\t\tgridLayout_1.addComponent(l_nick, 0, 4);\n\t\t\n\t\t// tf_nick\n\t\ttf_nick = new TextField();\n\t\ttf_nick.setImmediate(false);\n\t\ttf_nick.setWidth(\"100.0%\");\n\t\ttf_nick.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_nick, 1, 4);\n\t\t\n\t\t// l_Registro\n\t\tl_Registro = new Label();\n\t\tl_Registro.setImmediate(false);\n\t\tl_Registro.setWidth(\"-1px\");\n\t\tl_Registro.setHeight(\"-1px\");\n\t\tl_Registro.setValue(\"Fecha de Registro:\");\n\t\tgridLayout_1.addComponent(l_Registro, 0, 5);\n\t\t\n\t\t// l_fechaRegistro\n\t\tl_fechaRegistro = new Label();\n\t\tl_fechaRegistro.setImmediate(false);\n\t\tl_fechaRegistro.setWidth(\"100.0%\");\n\t\tl_fechaRegistro.setHeight(\"-1px\");\n\t\tl_fechaRegistro.setValue(\"---------\");\n\t\tgridLayout_1.addComponent(l_fechaRegistro, 1, 5);\n\t\t\n\t\t// l_genero\n\t\tl_genero = new Label();\n\t\tl_genero.setImmediate(false);\n\t\tl_genero.setWidth(\"-1px\");\n\t\tl_genero.setHeight(\"-1px\");\n\t\tl_genero.setValue(\"Genero:\");\n\t\tgridLayout_1.addComponent(l_genero, 0, 6);\n\t\t\n\t\t// opg_sexo\n\t\topg_sexo = new OptionGroup();\n\t\topg_sexo.setImmediate(false);\n\t\topg_sexo.setWidth(\"100.0%\");\n\t\topg_sexo.setHeight(\"30px\");\n\t\tgridLayout_1.addComponent(opg_sexo, 1, 6);\n\t\t\n\t\t// l_email\n\t\tl_email = new Label();\n\t\tl_email.setImmediate(false);\n\t\tl_email.setWidth(\"-1px\");\n\t\tl_email.setHeight(\"-1px\");\n\t\tl_email.setValue(\"Email:\");\n\t\tgridLayout_1.addComponent(l_email, 0, 7);\n\t\t\n\t\t// tf_email\n\t\ttf_email = new TextField();\n\t\ttf_email.setImmediate(false);\n\t\ttf_email.setWidth(\"100.0%\");\n\t\ttf_email.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_email, 1, 7);\n\t\t\n\t\t// l_nacionalidad\n\t\tl_nacionalidad = new Label();\n\t\tl_nacionalidad.setImmediate(false);\n\t\tl_nacionalidad.setWidth(\"-1px\");\n\t\tl_nacionalidad.setHeight(\"-1px\");\n\t\tl_nacionalidad.setValue(\"Nacionalidad:\");\n\t\tgridLayout_1.addComponent(l_nacionalidad, 0, 8);\n\t\t\n\t\t// cb_nacionalidad\n\t\tcb_nacionalidad = new ComboBox();\n\t\tcb_nacionalidad.setImmediate(false);\n\t\tcb_nacionalidad.setWidth(\"100%\");\n\t\tcb_nacionalidad.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(cb_nacionalidad, 1, 8);\n\t\t\n\t\t// l_blog\n\t\tl_blog = new Label();\n\t\tl_blog.setImmediate(false);\n\t\tl_blog.setWidth(\"-1px\");\n\t\tl_blog.setHeight(\"-1px\");\n\t\tl_blog.setValue(\"Tu Blog/Web:\");\n\t\tgridLayout_1.addComponent(l_blog, 0, 9);\n\t\t\n\t\t// tf_blogWeb\n\t\ttf_blogWeb = new TextField();\n\t\ttf_blogWeb.setImmediate(false);\n\t\ttf_blogWeb.setWidth(\"100.0%\");\n\t\ttf_blogWeb.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_blogWeb, 1, 9);\n\t\t\n\t\t// l_facebook\n\t\tl_facebook = new Label();\n\t\tl_facebook.setImmediate(false);\n\t\tl_facebook.setWidth(\"-1px\");\n\t\tl_facebook.setHeight(\"-1px\");\n\t\tl_facebook.setValue(\"Facebook:\");\n\t\tgridLayout_1.addComponent(l_facebook, 0, 10);\n\t\t\n\t\t// tf_facebook\n\t\ttf_facebook = new TextField();\n\t\ttf_facebook.setImmediate(false);\n\t\ttf_facebook.setWidth(\"100.0%\");\n\t\ttf_facebook.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_facebook, 1, 10);\n\t\t\n\t\t// l_twitter\n\t\tl_twitter = new Label();\n\t\tl_twitter.setImmediate(false);\n\t\tl_twitter.setWidth(\"-1px\");\n\t\tl_twitter.setHeight(\"-1px\");\n\t\tl_twitter.setValue(\"Twitter:\");\n\t\tgridLayout_1.addComponent(l_twitter, 0, 11);\n\t\t\n\t\t// tf_twitter\n\t\ttf_twitter = new TextField();\n\t\ttf_twitter.setImmediate(false);\n\t\ttf_twitter.setWidth(\"100.0%\");\n\t\ttf_twitter.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_twitter, 1, 11);\n\t\t\n\t\t// l_descripcion\n\t\tl_descripcion = new Label();\n\t\tl_descripcion.setImmediate(false);\n\t\tl_descripcion.setWidth(\"-1px\");\n\t\tl_descripcion.setHeight(\"-1px\");\n\t\tl_descripcion.setValue(\"Descripción:\");\n\t\tgridLayout_1.addComponent(l_descripcion, 0, 12);\n\t\t\n\t\t// ta_descripcion\n\t\tta_descripcion = new TextArea();\n\t\tta_descripcion.setImmediate(false);\n\t\tta_descripcion.setWidth(\"100.0%\");\n\t\tta_descripcion.setHeight(\"60px\");\n\t\tgridLayout_1.addComponent(ta_descripcion, 1, 12);\n\t\t\n\t\treturn gridLayout_1;\n\t}", "private void initComponents(MinesweeperView frame, int[] gridef, Checkerboard panGrid, Score panScore) {\r\n frame.add(new JButton());\r\n String[] table = {\"Retour et sauvegarder\", \"Quitter et sauvegarder\", \"Rejouer\"};\r\n for (int i = 0 ; i < 3 ; i++) {\r\n JButton btn = new JButton(table[i]);\r\n btn.setSize(200, 50);\r\n btn.setLocation(953, 470+60*i);\r\n btn.addActionListener(new ListenerGame(frame, panGrid, panScore, table, gridef));\r\n frame.add(btn);\r\n }\r\n }", "private void createPageContent() \n\t{\n\t\tGridLayout gl = new GridLayout(4, true);\n gl.verticalSpacing = 10;\n\t\t\n\t\tGridData gd;\n\t\tfinal Label wiz1Label = new Label(shell, SWT.NONE);\n\t\twiz1Label.setText(\"Enter Fields\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\twiz1Label.setLayoutData(gd);\n\t\twiz1Label.pack();\n\t\tText nameInput = new Text(shell, SWT.BORDER);\n\t\tnameInput.setMessage(\"Name\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tnameInput.setLayoutData(gd);\n\t\tnameInput.pack();\n\t\t//Component\n\t\tText componentInput = new Text(shell, SWT.BORDER);\n\t\tcomponentInput.setMessage(\"Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcomponentInput.setLayoutData(gd);\n\t\tcomponentInput.pack();\n\t\t//school\n\t\tText schoolInput = new Text(shell, SWT.BORDER);\n\t\tschoolInput.setMessage(\"School\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tschoolInput.setLayoutData(gd);\n\t\tschoolInput.pack();\n\t\t//range\n\t\tText rangeInput = new Text(shell, SWT.BORDER);\n\t\trangeInput.setMessage(\"Range\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\trangeInput.setLayoutData(gd);\n\t\trangeInput.pack();\n\t\t//Effect\n\t\tText effectInput = new Text(shell, SWT.BORDER);\n\t\teffectInput.setMessage(\"Effect\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\teffectInput.setLayoutData(gd);\n\t\teffectInput.pack();\n\t\t//castingtime\n\t\tText castimeInput = new Text(shell, SWT.BORDER);\n\t\tcastimeInput.setMessage(\"Casting Time\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcastimeInput.setLayoutData(gd);\n\t\tcastimeInput.pack();\n\t\t//materialcomponent\n\t\tText materialInput = new Text(shell, SWT.BORDER);\n\t\tmaterialInput.setMessage(\"Material Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tmaterialInput.setLayoutData(gd);\n\t\tmaterialInput.pack();\n\t\t//Savingthrow\n\t\tText savthrowInput = new Text(shell, SWT.BORDER);\n\t\tsavthrowInput.setMessage(\"Saving Throw\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tsavthrowInput.setLayoutData(gd);\n\t\tsavthrowInput.pack();\n\t\t//Focus\n\t\tText focusInput = new Text(shell, SWT.BORDER);\n\t\tfocusInput.setMessage(\"Focus\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tfocusInput.setLayoutData(gd);\n\t\tfocusInput.pack();\n\t\t//Duration\n\t\tText durationInput = new Text(shell, SWT.BORDER);\n\t\tdurationInput.setMessage(\"Duration\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdurationInput.setLayoutData(gd);\n\t\tdurationInput.pack();\n\t\t//spellresistance\n\t\tLabel resistanceLabel = new Label(shell, SWT.NONE);\n\t\tresistanceLabel.setText(\"Can Spell Be Resisted\");\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceLabel.setLayoutData(gd);\n\t\tresistanceLabel.pack();\n\t\tButton resistanceInput = new Button(shell, SWT.CHECK);\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceInput.setLayoutData(gd);\n\t\tresistanceInput.pack();\n\t\t//level\n\t\tText levelInput = new Text(shell, SWT.BORDER);\n\t\tlevelInput.setMessage(\"Level\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tlevelInput.setLayoutData(gd);\n\t\tlevelInput.pack();\n\t\t//Damage\n\t\tText damageInput = new Text(shell, SWT.BORDER);\n\t\tdamageInput.setMessage(\"Damage\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 1;\n\t\tdamageInput.setLayoutData(gd);\n\t\tdamageInput.pack();\n\t\t//DamageAlternative\n\t\tText damagealterInput = new Text(shell, SWT.BORDER);\n\t\tdamagealterInput.setMessage(\"Damage Alternative\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdamagealterInput.setLayoutData(gd);\n\t\tdamagealterInput.pack();\n\t\n\t\t//description\n\t\t\n\t\tText descriptionInput = new Text(shell, SWT.WRAP | SWT.V_SCROLL);\n\t\tdescriptionInput.setText(\"Description (Optional)\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\tgd.verticalSpan = 15;\n\t\tdescriptionInput.setLayoutData(gd);\n\t\tdescriptionInput.pack();\n\t\tLabel blank = new Label(shell, SWT.NONE);\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, true);\n\t\tgd.horizontalSpan = 4;\n\t\tblank.setLayoutData(gd);\n\t\tblank.pack();\n\t\tButton save = new Button(shell, SWT.PUSH);\n\n\t\tsave.setText(\"Save\");\n\t\tsave.addListener(SWT.Selection, new Listener()\n\t\t{\n\t\t\tpublic void handleEvent(Event event)\n\t\t\t{\n\t\t\t\tBoolean checkfault = false;\n\t\t\t\tLinkedHashMap<String, String> a = new LinkedHashMap<String, String>();\n\t\t\t\tif(nameInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tnameInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(componentInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcomponentInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(schoolInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tschoolInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(castimeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcastimeInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(levelInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tlevelInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(checkfault)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ta.put(\"NAME\", nameInput.getText());\n\t\t\t\ta.put(\"COMPONENTS\", componentInput.getText());\n\t\t\t\ta.put(\"SCHOOL\", schoolInput.getText());\n\t\t\t\ta.put(\"CASTINGTIME\", castimeInput.getText());\n\t\t\t\ta.put(\"LEVEL\", levelInput.getText());\n\t\t\t\tif(resistanceInput.getSelection())\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"YES\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"NO\");\n\t\t\t\t}\n\t\t\t\tif(!materialInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"MATERIALCOMPONENT\", materialInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!savthrowInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SAVINGTHROW\", savthrowInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!focusInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"FOCUS\", focusInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!durationInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DURATION\", durationInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damageInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGE\", damageInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damagealterInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGEALTERNATE\", damagealterInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!rangeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"RANGE\", rangeInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!effectInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"EFFECT\", effectInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ta.put(\"DESCRIPTION\", descriptionInput.getText());\n\t\t\t\tnewspell = new SpellEntity(a);\n\t\t\t\tMain.gameState.abilities.put(newspell.getName(), newspell);\n\t\t\t\tMain.gameState.customContent.put(newspell.getName(), newspell);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t}\n\t\t);\n\t\tgd = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tsave.setLayoutData(gd);\n\t\tsave.pack();\n\t\tshell.setLayout(gl);\n\t\tshell.layout();\n\t\tshell.pack();\n//\t\t//wizard\n//\t\t\t\tfinal Composite wizPanel = new Composite(shell, SWT.BORDER);\n//\t\t\t\twizPanel.setBounds(0,0,WIDTH, HEIGHT);\n//\t\t\t\tfinal StackLayout wizLayout = new StackLayout();\n//\t\t\t\twizPanel.setLayout(wizLayout);\n//\t\t\t\t\n//\t\t\t\t//Page1 -- Name\n//\t\t\t\tfinal Composite wizpage1 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\twizpage1.setBounds(0,0,WIDTH,HEIGHT);\n//\t\t\t\t\n//\t\t\t\tfinal Label wiz1Label = new Label(wizpage1, SWT.NONE);\n//\t\t\t\twiz1Label.setText(\"Enter Name (required)\");\n//\t\t\t\twiz1Label.pack();\n//\t\t\t\tfinal Text wizpage1text = new Text(wizpage1, SWT.BORDER);\n//\t\t\t\twizpage1text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage1text.setText(\"FireBall\");\n//\t\t\t\tButton next1 = createNextButton(wizpage1);//TODO cancel and previous button\n//\t\t\t\tcreateBackButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tnext1.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage1text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellname = wizpage1text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tSystem.out.println(\"PANIC: ITEM WIZARD PAGE 1 OUT\");\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz1Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\t);\n//\t\t\t\t\n//\t\t\t\twizPages.add(wizpage1);\n//\t\t\t\t//Page2 -- component\n//\t\t\t\tfinal Composite wizpage2 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz2Label = new Label(wizpage2, SWT.NONE);\n//\t\t\t\twiz2Label.setText(\"Enter Component: (required)\");\n//\t\t\t\twiz2Label.pack();\n//\t\t\t\tfinal Text wizpage2text = new Text(wizpage2, SWT.BORDER);\n//\t\t\t\twizpage2text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage2text.setText(\"Fire\");\n//\t\t\t\tButton next2 = createNextButton(wizpage2);\n//\t\t\t\tcreateBackButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tnext2.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage2text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellcomp = wizpage2text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz2Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage2);\n//\t\t\t\t//Page3 -- School\n//\t\t\t\tfinal Composite wizpage3 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz3Label = new Label(wizpage3, SWT.NONE);\n//\t\t\t\twiz3Label.setText(\"Enter School: (required)\");\n//\t\t\t\twiz3Label.pack();\n//\t\t\t\tfinal Text wizpage3text = new Text(wizpage3, SWT.BORDER);\n//\t\t\t\twizpage3text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage3text.setText(\"Descruction\");\n//\t\t\t\tButton next3 = createNextButton(wizpage3);\n//\t\t\t\tcreateBackButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tnext3.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage3text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellschool = wizpage3text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz3Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage3);\n//\t\t\t\t//Page4 -- Range\n//\t\t\t\tfinal Composite wizpage4 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz4Label = new Label(wizpage4, SWT.NONE);\n//\t\t\t\twiz4Label.setText(\"Enter Range: (required)\");\n//\t\t\t\twiz4Label.pack();\n//\t\t\t\tfinal Text wizpage4text = new Text(wizpage4, SWT.BORDER);\n//\t\t\t\twizpage4text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage4text.setText(\"50 feet\");\n//\t\t\t\tButton next4 = createNextButton(wizpage4);\n//\t\t\t\tcreateBackButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tnext4.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage4text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellrange = wizpage4text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz4Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage4);\n//\t\t\t\t//Page5 -- effect\n//\t\t\t\tfinal Composite wizpage5 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz5Label = new Label(wizpage5, SWT.NONE);\n//\t\t\t\twiz5Label.setText(\"Enter Effect: (required)\");\n//\t\t\t\twiz5Label.pack();\n//\t\t\t\tfinal Text wizpage5text = new Text(wizpage5, SWT.BORDER);\n//\t\t\t\twizpage5text.setBounds(50, 50, 250, 150);\n//\t\t\t\twizpage5text.setText(\"No effect\");\n//\t\t\t\tButton next5 = createNextButton(wizpage5);\n//\t\t\t\tcreateBackButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tnext5.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelleffect = wizpage5text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz5Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage5);\n//\t\t\t\t//Page6 -- casting time\n//\t\t\t\tfinal Composite wizpage6 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz6Label = new Label(wizpage6, SWT.NONE);\n//\t\t\t\twiz6Label.setText(\"Enter Casting Time: (required)\");\n//\t\t\t\twiz6Label.pack();\n//\t\t\t\tfinal Text wizpage6text = new Text(wizpage6, SWT.BORDER);\n//\t\t\t\twizpage6text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage6text.setText(\"1 turn\");\n//\t\t\t\tButton next6 = createNextButton(wizpage6);\n//\t\t\t\tcreateBackButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tnext6.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellcastime = wizpage6text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz6Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage6);\n//\t\t\t\t//Page7 -- Material Component\n//\t\t\t\tfinal Composite wizpage7 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz7Label = new Label(wizpage7, SWT.NONE);\n//\t\t\t\twiz7Label.setText(\"Enter Material Component: (required)\");\n//\t\t\t\twiz7Label.pack();\n//\t\t\t\tfinal Text wizpage7text = new Text(wizpage7, SWT.BORDER);\n//\t\t\t\twizpage7text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage7text.setText(\"None\");\n//\t\t\t\tButton next7 = createNextButton(wizpage7);\n//\t\t\t\tcreateBackButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tnext7.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage7text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellmaterial = wizpage7text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz7Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage7);\n//\t\t\t\t//Page8 -- saving throw\n//\t\t\t\tfinal Composite wizpage8 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz8Label = new Label(wizpage8, SWT.NONE);\n//\t\t\t\twiz8Label.setText(\"Enter Saving Throw: (required)\");\n//\t\t\t\twiz8Label.pack();\n//\t\t\t\tfinal Text wizpage8text = new Text(wizpage8, SWT.BORDER);\n//\t\t\t\twizpage8text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage8text.setText(\"Will negate XX\");\n//\t\t\t\tButton next8 = createNextButton(wizpage8);\n//\t\t\t\tcreateBackButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tnext8.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage8text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellsaving = wizpage8text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz8Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage8);\n//\t\t\t\t//Page9 -- Focus\n//\t\t\t\tfinal Composite wizpage9 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz9Label = new Label(wizpage9, SWT.NONE);\n//\t\t\t\twiz9Label.setText(\"Enter Focus: (required)\");\n//\t\t\t\twiz9Label.pack();\n//\t\t\t\tfinal Text wizpage9text = new Text(wizpage9, SWT.BORDER);\n//\t\t\t\twizpage9text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage9text.setText(\"A dart\");\n//\t\t\t\tButton next9 = createNextButton(wizpage9);\n//\t\t\t\tcreateBackButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tnext9.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage9text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellfocus = wizpage9text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz9Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage9);\n//\t\t\t\t//Page10 -- Duration\n//\t\t\t\tfinal Composite wizpage10 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz10Label = new Label(wizpage10, SWT.NONE);\n//\t\t\t\twiz10Label.setText(\"Enter Duration: (required)\");\n//\t\t\t\twiz10Label.pack();\n//\t\t\t\tfinal Text wizpage10text = new Text(wizpage10, SWT.BORDER);\n//\t\t\t\twizpage10text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage10text.setText(\"5 Turns\");\n//\t\t\t\tButton next10 = createNextButton(wizpage10);\n//\t\t\t\tcreateBackButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tnext10.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage10text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellduration = wizpage10text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz10Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage10);\n//\t\t\t\t//Page11 -- Level\n//\t\t\t\tfinal Composite wizpage11 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz11Label = new Label(wizpage11, SWT.NONE);\n//\t\t\t\twiz11Label.setText(\"Enter Level (required)\");\n//\t\t\t\twiz11Label.pack();\n//\t\t\t\tfinal Text wizpage11text = new Text(wizpage11, SWT.BORDER);\n//\t\t\t\twizpage11text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage11text.setText(\"1\");\n//\t\t\t\tButton next11 = createNextButton(wizpage11);\n//\t\t\t\tcreateBackButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tnext11.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage11text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\ttry\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tif(Integer.parseInt(wizpage11text.getText()) >= 0)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelllevel = String.valueOf(Integer.parseInt(wizpage11text.getText()));\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\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{\n//\t\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tcatch(NumberFormatException a)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage11);\n//\t\t\t\t//Page12 -- resistance\n//\t\t\t\tfinal Composite wizpage12 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz12Label = new Label(wizpage12, SWT.NONE);\n//\t\t\t\twiz12Label.setText(\"Enter Spell resistance: (Yes/No)\");\n//\t\t\t\twiz12Label.pack();\n//\t\t\t\tfinal Text wizpage12text = new Text(wizpage12, SWT.BORDER);\n//\t\t\t\twizpage12text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage12text.setText(\"Yes\");\n//\t\t\t\tButton next12 = createNextButton(wizpage12);\n//\t\t\t\tcreateBackButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tnext12.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage12text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellresistance = wizpage12text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz12Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage12);\n//\t\t\t\t//Page13 - Description\n//\t\t\t\tfinal Composite wizpage13 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tLabel wiz13Label = new Label(wizpage13, SWT.NONE);\n//\t\t\t\twiz13Label.setText(\"Enter Description (Optional)\");\n//\t\t\t\twiz13Label.pack(); \n//\t\t\t\tfinal Text wizpage13text = new Text(wizpage13, SWT.BORDER);\n//\t\t\t\twizpage13text.setBounds(50, 50, 300, 200);\n//\t\t\t\twizpage13text.setText(\"Description here\");\n//\t\t\t\tButton next13 = createNextButton(wizpage13);\n//\t\t\t\tcreateBackButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tnext13.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage13text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = wizpage13text.getText();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = \"<empty>\";\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tCreateVerificationPage(wizPanel, wizLayout);\n//\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\n//\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage13);\n//\t\t\t\t\n//\t\t\t\twizLayout.topControl = wizpage1;\n//\t\t\t\twizPanel.layout();\n\t}", "public static void main(String[] args) {\n\t\tDynamicGrid<String> sgrid = new DynamicGrid<>();\n\t\tDynamicArray<String> srow = new DynamicArray<>();\n\t\tsrow.add(\"English\");\n\t\tsrow.add(\"Spanish\");\n\t\tsrow.add(\"German\");\n\t\tif (sgrid.getNumRow() == 0 && sgrid.getNumCol() == 0 && sgrid.addRow(0, srow) && sgrid.getNumRow() == 1\n\t\t\t\t&& sgrid.getNumCol() == 3) {\n\t\t\tSystem.out.println(\"Yay 1\");\n\t\t}\n\t\t// System.out.println(\"Number of sgrid rows is: \" + sgrid.getNumRow() +\n\t\t// \" Number of sgrid cols is: \" + sgrid.getNumCol());\n\t\t// sgrid.toString();\n\n\t\tif (sgrid.get(0, 0).equals(\"English\") && sgrid.set(0, 1, \"Espano\").equals(\"Spanish\")\n\t\t\t\t&& sgrid.get(0, 1).equals(\"Espano\")) {\n\t\t\tSystem.out.println(\"Yay 2\");\n\t\t}\n\t\t// sgrid.toString();\n\n\t\t// more complicated grids\n\t\tDynamicGrid<Integer> igrid = new DynamicGrid<Integer>();\n\t\tboolean ok = true;\n\t\t// System.out.println(\"Number of igrid rows is: \" + igrid.getNumRow() +\n\t\t// \" Number of sgrid cols is: \" + igrid.getNumCol());\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tDynamicArray<Integer> irow = new DynamicArray<>();\n\t\t\tirow.add((i + 1) * 10);\n\t\t\tok = ok && igrid.addRow(igrid.getNumRow(), irow);\n\t\t\t// System.out.println(\"Addrow entry is: \" + ok + \" New row capacity\n\t\t\t// is: \" + irow.capacity() +\" Number of Rows is: \" +\n\t\t\t// igrid.getNumRow() + \" Number of Cols is: \" + igrid.getNumCol());\n\t\t}\n\t\t// System.out.println(\"Number of igrid rows is: \" + igrid.getNumRow() +\n\t\t// \" Number of sgrid cols is: \" + igrid.getNumCol() + \" Igrid at 2, 0\n\t\t// is: \" + igrid.get(2, 0));\n\n\t\tif (ok && igrid.getNumRow() == 3 && igrid.getNumCol() == 1 && igrid.get(2, 0) == 30) {\n\t\t\tSystem.out.println(\"Yay 3\");\n\t\t}\n\t\t// igrid.toString();\n\n\t\tDynamicArray<Integer> icol = new DynamicArray<>();\n\t\ticol.add(-10);\n\t\ticol.add(-20);\n\t\tok = igrid.addCol(1, icol);\n\t\ticol.add(-30);\n\t\t// System.out.println(\"Addcol entry is: \" + ok + \" Num of rows is: \" +\n\t\t// igrid.getNumRow() + \" Number of Cols is: \" + igrid.getNumCol());\n\t\tif (!ok && igrid.addCol(1, icol) && igrid.getNumRow() == 3 && igrid.getNumCol() == 2) {\n\t\t\tSystem.out.println(\"Yay 4\");\n\t\t}\n\t\t// igrid.toString();\n\n\t\tDynamicArray<Integer> irow = new DynamicArray<>();\n\t\tirow.add(5);\n\t\tirow.add(10);\n\n\t\tif (!igrid.addRow(5, irow) && igrid.addRow(0, irow) && igrid.getNumRow() == 4 && igrid.get(0, 0) == 5\n\t\t\t\t&& igrid.get(3, 1) == -30) {\n\t\t\tSystem.out.println(\"Yay 5\");\n\t\t}\n\t\t// System.out.println(\"Igrid at 0, 0 is \" + igrid.get(0,0) + \" Number of\n\t\t// Rows in igrid is: \" + igrid.getNumRow());\n\t\t// igrid.toString();\n\n\t\t// System.out.println(igrid.toString());\n\t\t// System.out.println(\" Number of Cols in igrid is: \" +\n\t\t// igrid.getNumCol() + \", \" + igrid.get(2,1));\n\n\t\tirow = igrid.removeCol(1);\n\t\t// System.out.println(\" Number of Rows in igrid is: \" +\n\t\t// igrid.getNumRow() + \" Number of Cols in igrid is: \" +\n\t\t// igrid.getNumCol());\n\n\t\tif (igrid.getNumRow() == 4 && igrid.getNumCol() == 1 && irow.get(0) == 10 && igrid.get(0, 0) == 5\n\t\t\t\t&& igrid.get(2, 0) == 20) {\n\t\t\tSystem.out.println(\"Yay 6\");\n\t\t}\n\t\t// igrid.toString();\n\n\t}", "private void createComponents() {\n view = new JPanel(new GridBagLayout());\n\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.gridx = 0;\n constraints.gridy = 0;\n constraints.weightx = 1;\n constraints.weighty = 1;\n constraints.fill = GridBagConstraints.BOTH;\n\n view.add(new JPanel(), constraints);\n\n constraints.gridy = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 1;\n constraints.weighty = 4;\n constraints.weightx = 6;\n view.add(renderMain(), constraints);\n\n constraints.gridx = 2;\n constraints.weightx = 1;\n constraints.weighty = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 0;\n constraints.gridy = 2;\n view.add(renderBottom(), constraints);\n\n registerEvents();\n }", "private void createTileViews() {\n\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\tTileView tv = new TileView(context, row, column);\n\t\t\t\ttileViews.add(tv);\n\t\t\t\ttableRow.get(row).addView(tv);\n\t\t\t} // end column\n\t\t\tparentLayout.addView(tableRow.get(row));\n\t\t} // end row\n\n\t}", "private GridLayout initGridLayout(int rows, int colums) {\n GridLayout gridLayout = new GridLayout(this);\n gridLayout = findViewById(R.id.game_grid);\n gridLayout.setColumnCount(colums);\n gridLayout.setRowCount(rows);\n\n // gridLayout.setLayoutParams(gridLayoutParams);\n gridLayout.setOrientation(GridLayout.HORIZONTAL);\n return gridLayout;\n }", "private void buildGrid()\n {\n actions.setText(\"Select\");\n\n actions.setMenu(new MenuBuilder()\n .build(visit, icons.contact16())\n .build(delete, icons.delete16())\n .build(message, icons.mail16())\n .get());\n\n contactsColumnModel = new ColumnModel<ContactInfo>(new ColumnsBuilder<ContactInfo>()\n .build(\"\", props.name(), 50, true, new IconCell(icons.contact16()))\n .build(\"Name\", props.name(), 150, false)\n .build(\"Lastname1\", props.lastname1(), 150, false)\n .build(\"Lastname2\", props.lastname2(), 150, true)\n .build(\"Actions\", props.name(), 50, false, actions)\n .get());\n }", "public DynamicGrid() {\n\t\t// constructor\n\t\t// create an empty table of 0 rows and 0 cols\n\t\tthis.storage = new DynamicArray<DynamicArray<T>>();\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 2, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(11, 3, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Tags\");\n panel1.add(label1, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n listTags = new JList();\n panel1.add(listTags, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(7, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n addTagButton = new JButton();\n addTagButton.setText(\"Add Tag\");\n panel2.add(addTagButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n panel2.add(spacer2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n deleteTagButton = new JButton();\n deleteTagButton.setText(\"Delete Tag\");\n panel2.add(deleteTagButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"State\");\n panel1.add(label2, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Media Type\");\n panel1.add(label3, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label4 = new JLabel();\n label4.setText(\"New Contributor\");\n panel1.add(label4, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel3, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label5 = new JLabel();\n label5.setText(\"Type\");\n panel3.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboContributorType = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"select\");\n defaultComboBoxModel1.addElement(\"USER\");\n defaultComboBoxModel1.addElement(\"MACHINE\");\n comboContributorType.setModel(defaultComboBoxModel1);\n panel3.add(comboContributorType, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label6 = new JLabel();\n label6.setText(\"Username\");\n panel3.add(label6, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textUsername = new JTextField();\n panel3.add(textUsername, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label7 = new JLabel();\n label7.setText(\"Created\");\n panel1.add(label7, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textCreatedDate = new JTextField();\n panel1.add(textCreatedDate, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label8 = new JLabel();\n label8.setText(\"Field Sets\");\n panel1.add(label8, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n listFieldSets = new JList();\n panel1.add(listFieldSets, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JLabel label9 = new JLabel();\n label9.setText(\"Contributors\");\n panel1.add(label9, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n listContributors = new JList();\n panel1.add(listContributors, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JLabel label10 = new JLabel();\n label10.setText(\"Workgroups\");\n panel1.add(label10, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n listWorkgroups = new JList();\n panel1.add(listWorkgroups, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JLabel label11 = new JLabel();\n label11.setText(\"Last Updated\");\n panel1.add(label11, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textLastUpdated = new JTextField();\n panel1.add(textLastUpdated, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n comboMediaType = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel2 = new DefaultComboBoxModel();\n defaultComboBoxModel2.addElement(\"select\");\n defaultComboBoxModel2.addElement(\"CHAT\");\n defaultComboBoxModel2.addElement(\"EMAIL\");\n defaultComboBoxModel2.addElement(\"EVENT\");\n defaultComboBoxModel2.addElement(\"MOBILE\");\n defaultComboBoxModel2.addElement(\"SOCIAL\");\n defaultComboBoxModel2.addElement(\"VIDEO\");\n defaultComboBoxModel2.addElement(\"VOICE\");\n defaultComboBoxModel2.addElement(\"WEB\");\n comboMediaType.setModel(defaultComboBoxModel2);\n panel1.add(comboMediaType, new GridConstraints(9, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboState = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel3 = new DefaultComboBoxModel();\n defaultComboBoxModel3.addElement(\"select\");\n defaultComboBoxModel3.addElement(\"ACTIVE\");\n defaultComboBoxModel3.addElement(\"CLOSED\");\n comboState.setModel(defaultComboBoxModel3);\n panel1.add(comboState, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label12 = new JLabel();\n label12.setText(\"Pod ID\");\n panel1.add(label12, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textFieldId = new JTextField();\n panel1.add(textFieldId, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JPanel panel4 = new JPanel();\n panel4.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel4, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer3 = new Spacer();\n panel4.add(spacer3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel5 = new JPanel();\n panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel4.add(panel5, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonSave = new JButton();\n buttonSave.setText(\"Save\");\n panel5.add(buttonSave, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));\n buttonClose = new JButton();\n buttonClose.setText(\"Close\");\n panel5.add(buttonClose, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));\n final JPanel panel6 = new JPanel();\n panel6.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(300, -1), null, 0, false));\n panel6.add(panelDataElements, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 1, false));\n final Spacer spacer4 = new Spacer();\n panel6.add(spacer4, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n }", "public GridMapPanel() {\n super();\n initialize();\n }", "@AutoGenerated\r\n\tprivate GridLayout buildGridLayout_3() {\n\t\tgridLayout_3 = new GridLayout();\r\n\t\tgridLayout_3.setWidth(\"100.0%\");\r\n\t\tgridLayout_3.setHeight(\"100.0%\");\r\n\t\tgridLayout_3.setImmediate(false);\r\n\t\tgridLayout_3.setMargin(false);\r\n\t\tgridLayout_3.setSpacing(true);\r\n\t\tgridLayout_3.setColumns(4);\r\n\t\tgridLayout_3.setRows(7);\r\n\t\t\r\n\t\t// flnmLbl\r\n\t\tflnmLbl = new Label();\r\n\t\tflnmLbl.setWidth(\"-1px\");\r\n\t\tflnmLbl.setHeight(\"-1px\");\r\n\t\tflnmLbl.setValue(\"Filename\");\r\n\t\tflnmLbl.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(flnmLbl, 0, 1);\r\n\t\t\r\n\t\t// txtFlnm\r\n\t\ttxtFlnm = new TextField();\r\n\t\ttxtFlnm.setWidth(\"-1px\");\r\n\t\ttxtFlnm.setHeight(\"-1px\");\r\n\t\ttxtFlnm.setImmediate(false);\r\n\t\ttxtFlnm.setValue(\"test\"); //set default filename\r\n\t\tgridLayout_3.addComponent(txtFlnm, 1, 1);\r\n\t\t\r\n\t\t// svlcLbl\r\n\t\tsvlcLbl = new Label();\r\n\t\tsvlcLbl.setWidth(\"-1px\");\r\n\t\tsvlcLbl.setHeight(\"-1px\");\r\n\t\tsvlcLbl.setValue(\"Save location\");\r\n\t\tsvlcLbl.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(svlcLbl, 0, 2);\r\n\t\t\r\n\t\t// txtSvLc\r\n\t\ttxtSvLc = new TextField();\r\n\t\ttxtSvLc.setWidth(\"-1px\");\r\n\t\ttxtSvLc.setHeight(\"-1px\");\r\n\t\ttxtSvLc.setImmediate(false);\r\n\t\ttxtSvLc.setValue(System.getProperty(\"user.home\") + File.separator);\r\n\t\tgridLayout_3.addComponent(txtSvLc, 1, 2);\r\n\t\t\r\n\t\t// brwBtn\r\n\t\tbrwBtn = new NativeButton();\r\n\t\tbrwBtn.setWidth(\"-1px\");\r\n\t\tbrwBtn.setHeight(\"-1px\");\r\n\t\tbrwBtn.setCaption(\"Browse...\");\r\n\t\tbrwBtn.setImmediate(true);\r\n\t\tgridLayout_3.addComponent(brwBtn, 2, 2);\r\n\t\t\r\n\t\tbrwBtn.addListener(new Button.ClickListener() {\r\n\r\n\t\t\tprivate static final long serialVersionUID = -8389582613309805795L;\r\n\r\n\t\t\tpublic void buttonClick(Button.ClickEvent event) {\r\n//\t\t\t\tbrowse();\r\n\t\t\t}\r\n });\r\n\t\t\r\n\t\t// rcrdLbl\r\n\t\trcrdLbl = new Label();\r\n\t\trcrdLbl.setWidth(\"-1px\");\r\n\t\trcrdLbl.setHeight(\"-1px\");\r\n\t\trcrdLbl.setValue(\"Record type\");\r\n\t\trcrdLbl.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(rcrdLbl, 0, 3);\r\n\t\t\r\n\t\t// slctRrcdTp\r\n\t\tslctRrcdTp = new NativeSelect();\r\n\t\tslctRrcdTp.setWidth(\"-1px\");\r\n\t\tslctRrcdTp.setHeight(\"-1px\");\r\n\t\tslctRrcdTp.setImmediate(false);\r\n\t\tslctRrcdTp.addItem(\"audio+video\");\r\n\t\tslctRrcdTp.addItem(\"video only\");\r\n\t\tslctRrcdTp.addItem(\"audio only\");\r\n\t\tslctRrcdTp.setValue(\"audio+video\"); //set default record type\r\n\t\tgridLayout_3.addComponent(slctRrcdTp, 1, 3);\r\n\t\t\r\n\t\t// RcrdCtdLbl\r\n\t\tRcrdCtdLbl = new Label();\r\n\t\tRcrdCtdLbl.setWidth(\"-1px\");\r\n\t\tRcrdCtdLbl.setHeight(\"-1px\");\r\n\t\tRcrdCtdLbl.setValue(\"Recording countdown\");\r\n\t\tRcrdCtdLbl.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(RcrdCtdLbl, 0, 4);\r\n\t\t\r\n\t\t// txtRrcdCtd\r\n\t\ttxtRrcdCtd = new TextField();\r\n\t\ttxtRrcdCtd.setWidth(\"-1px\");\r\n\t\ttxtRrcdCtd.setHeight(\"-1px\");\r\n\t\ttxtRrcdCtd.setValue(0);\r\n\t\ttxtRrcdCtd.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(txtRrcdCtd, 1, 4);\r\n\t\t\r\n\t\t// DrRcrdLbl\r\n\t\tDrRcrdLbl = new Label();\r\n\t\tDrRcrdLbl.setWidth(\"-1px\");\r\n\t\tDrRcrdLbl.setHeight(\"-1px\");\r\n\t\tDrRcrdLbl.setValue(\"Duration of record\");\r\n\t\tDrRcrdLbl.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(DrRcrdLbl, 0, 5);\r\n\t\t\r\n\t\t// txtDrRcrd\r\n\t\ttxtDrRcrd = new TextField();\r\n\t\ttxtDrRcrd.setWidth(\"-1px\");\r\n\t\ttxtDrRcrd.setHeight(\"-1px\");\r\n\t\ttxtDrRcrd.setValue(0);\r\n\t\ttxtDrRcrd.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(txtDrRcrd, 1, 5);\r\n\t\t\r\n\t\treturn gridLayout_3;\r\n\t}", "private void initIslandGrid()\n {\n // Add the grid\n int rows = game.getNumRows();\n int columns = game.getNumColumns();\n // set up the layout manager for the island grid panel\n pnlIsland.setLayout(new GridLayout(rows, columns));\n // create all the grid square panels and add them to the panel\n // the layout manager of the panel takes care of assigning them to the\n // the right position\n for ( int row = 0 ; row < rows ; row++ )\n {\n for ( int col = 0 ; col < columns ; col++ )\n {\n pnlIsland.add(new GridSquarePanel(game, row, col));\n }\n }\n }", "public Stage() {\n\n for (int i = 0; i < 20; i++) { // Generate the basic grid array\n ArrayList<Cell> cellList = new ArrayList<Cell>();\n cells.add(cellList);\n for (int j = 0; j < 20; j++) {\n cells.get(i).add(new Cell(10 + 35 * i, 10 + 35 * j));\n }\n }\n\n for (int i = 0; i < cells.size(); i++) { // Generate the list of environment blocks\n ArrayList<Environment> envList = new ArrayList<Environment>();\n environment.add(envList);\n for (int j = 0; j < cells.size(); j++) {\n int cellGenerator = (int) (Math.random() * 100) + 1;\n environment.get(i).add(generateCell(cellGenerator, cells.get(i).get(j)));\n }\n }\n\n grid = new Grid(cells, environment); // Initialise the grid with the generated cells array\n }", "public Node createGrid() {\n\t\tGroup gridGroup = new Group();\n\t\tgridGroup.getChildren().addAll(buildXYPlane());\n\t\t/*\n\t\t * XXX extend the grid\n\t\t * \n\t\t * here it would be possible to extend the grid, e.g. with a graph\n\t\t * or another plane with a grid (XZ, YZ, ...).\n\t\t * \n\t\t * it would look like this:\n\t\t * gridGroup.getChildren().addAll(buildGraph());\n\t\t */\n\t\treturn gridGroup;\n\t}", "private GridPane setInfoVindu(){\r\n GridPane grid = new GridPane();\r\n grid.setPadding(new Insets(13, 13, 13,13));\r\n grid.setHgap(15);\r\n grid.setVgap(5);\r\n\r\n nyeTall = new TextField();\r\n settInnTall = new Button(\"Sett inn\");\r\n leggInnTilfeldigeTall = new Button(\"Legg inn 10 tilfeldige tall\");\r\n slettTre = new Button(\"Slett tre\");\r\n nodeFarge = new ColorPicker();\r\n nodeFarge.setValue(Color.LIGHTGREEN);\r\n\r\n grid.add(nyeTall, 0,0);\r\n grid.add(settInnTall, 1, 0);\r\n grid.add(leggInnTilfeldigeTall, 2, 0);\r\n grid.add(slettTre, 3, 0);\r\n grid.add(nodeFarge, 4, 0);\r\n\r\n return grid;\r\n }", "@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }", "Juego(){\r\n\r\n GridLayout layout = new GridLayout(1,2);\r\n\tsetLayout(layout);\r\n\t\t\r\n\t// Creacion del tablero del contrincante (computadora)\t\r\n\t\r\n t_contrincante = new Tablero(false);\r\n\tadd(t_contrincante);\r\n\t\t\t\t\r\n\t// Creacion del tablero del jugador\r\n\t\t\t\t\r\n t_jugador = new Tablero(true);\r\n\tadd(t_jugador);\r\n }", "public void createLayout() {\n\t\tpersons = createPersonGuessPanel();\t\t\n\t\tweapons = createWeaponGuessPanel();\n\t\trooms = createRoomGuessPanel();\n\t\t\n\t\tpersonCheckList = createPeoplePanel();\n\t\tweaponCheckList =createWeaponsPanel(); \n\t\troomCheckList = createRoomsPanel();\n\t\t\n\t\tJPanel completed = new JPanel();\n\t\tcompleted.setLayout(new GridLayout(3, 2));\n\t\tadd(completed, BorderLayout.CENTER);\n\t\tcompleted.add(personCheckList);\n\t\tcompleted.add(persons);\n\t\tcompleted.add(weaponCheckList);\n\t\tcompleted.add(weapons);\n\t\tcompleted.add(roomCheckList);\n\t\tcompleted.add(rooms);\n\t}", "public void drawGrid() {\r\n\t\tsetLayout(new GridLayout(getSize_w(), getSize_h()));\r\n\t\tfor (int i = 0; i < getSize_h(); i++) {\r\n\t\t\tfor (int j = 0; j < getSize_w(); j++) {\r\n\t\t\t\tcity_squares[i][j] = new Gridpanel(j, i);\r\n\t\t\t\tadd(city_squares[i][j]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void init ()\n\t// layout the applet\n\t{\tPlotarea=new Plot();\n\t\tPanel panel1=new Panel();\n\t\tPanel panel2=new Panel();\n\t\tClear=new Button(\" Clear \");\n\t\tRandomize=new Button(\" Random \");\n\t\tNRandom=new TextField(\"\",4);\n\t\tLocalOptimize=new Button(\"Local Optimum\");\n\t\tNIterations=new TextField(\"\",4);\n\t\tpanel1.add(Clear);\n\t\tpanel1.add(Randomize);\n\t\tpanel1.add(NRandom);\n\t\tpanel2.add(LocalOptimize);\n\t\tpanel2.add(new Label(\" Iterations:\"));\n\t\tpanel2.add(NIterations);\n\t\tsetLayout(gridbag);\n\t\tsetConstrain(Plotarea,0,0,1,1,\n\t\t\tGridBagConstraints.BOTH,GridBagConstraints.CENTER,\n\t\t\t1.0,1.0);\n\t\tadd(Plotarea);\n\t\tsetConstrain(panel1,0,2,1,1,\n\t\t\tGridBagConstraints.NONE,GridBagConstraints.CENTER,\n\t\t\t1.0,0.0);\n\t\tadd(panel1);\n\t\tsetConstrain(panel2,0,3,1,1,\n\t\t\tGridBagConstraints.NONE,GridBagConstraints.CENTER,\n\t\t\t1.0,0.0);\n\t\tadd(panel2);\n\t}", "private void addGrid() {\n\n\t\tList<ColumnConfig> configs = new LinkedList<ColumnConfig>();\n\n\t\tColumnConfig column = new ColumnConfig(InheritedComponentInstanceSelModelData.PROPERTY_ID, messages\n\t\t\t.columnHeaderId(), 15);\n\t\tcolumn.setSortable(false);\n\t\tcolumn.setRenderer(idCellRenderer);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig(Constants.PROPERTY_KEY, Constants.EMPTY_STRING, 15);\n\t\tcolumn.setRenderer(gearCellRenderer);\n\t\tcolumn.setSortable(false);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(Constants.PROPERTY_NAME);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderName());\n\t\tcolumn.setWidth(COLUMN_NAME_WIDTH);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_MODULE);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderModule());\n\t\tcolumn.setWidth(COLUMN_MODULE_WIDTH);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_CONFIGURATION);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderConfiguration());\n\t\tcolumn.setWidth(COLUMN_CONFIGURATION_WIDTH);\n\t\tcolumn.setRenderer(new GridCellRenderer<InheritedComponentInstanceSelModelData>() {\n\n\t\t\tpublic Object render(InheritedComponentInstanceSelModelData model, String property, ColumnData config,\n\t\t\t\tint rowIndex, int colIndex, ListStore<InheritedComponentInstanceSelModelData> store,\n\t\t\t\tGrid<InheritedComponentInstanceSelModelData> grid) {\n\n\t\t\t\tString icon = null;\n\t\t\t\tString title = null;\n\t\t\t\tBoolean configuration = model.getDTO().getConfiguration();\n\t\t\t\tif (configuration == null) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t} else if (configuration) {\n\t\t\t\t\ticon = Constants.OK_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentOverrideConfiguration();\n\t\t\t\t} else {\n\t\t\t\t\ticon = Constants.ERROR_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentInheritedConfiguration();\n\t\t\t\t}\n\t\t\t\treturn TEMPLATE_ICON_CELL.replaceAll(PATTERN_ICON, icon).replaceAll(PATTERN_TITLE, title);\n\t\t\t}\n\t\t});\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_DEPENDENCIES);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderDependences());\n\t\tcolumn.setWidth(COLUMN_DEPENDENCIES_WIDTH);\n\t\tcolumn.setRenderer(new GridCellRenderer<InheritedComponentInstanceSelModelData>() {\n\n\t\t\tpublic Object render(InheritedComponentInstanceSelModelData model, String property, ColumnData config,\n\t\t\t\tint rowIndex, int colIndex, ListStore<InheritedComponentInstanceSelModelData> store,\n\t\t\t\tGrid<InheritedComponentInstanceSelModelData> grid) {\n\n\t\t\t\tString icon = null;\n\t\t\t\tString title = null;\n\t\t\t\tBoolean dependencies = model.getDTO().getDependencies();\n\t\t\t\tif (dependencies == null) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t} else if (dependencies) {\n\t\t\t\t\ticon = Constants.OK_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentOverrideDependences();\n\t\t\t\t} else {\n\t\t\t\t\ticon = Constants.ERROR_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentInheritedDependences();\n\t\t\t\t}\n\t\t\t\treturn TEMPLATE_ICON_CELL.replaceAll(PATTERN_ICON, icon).replaceAll(PATTERN_TITLE, title);\n\t\t\t}\n\t\t});\n\t\tconfigs.add(column);\n\n\t\tColumnModel cm = new ColumnModel(configs);\n\n\t\tstore = new ListStore<InheritedComponentInstanceSelModelData>();\n\t\tstore.setStoreSorter((StoreSorter) storeSorter);\n\t\tstore.setSortField(ModuleInstanceSelModelData.PROPERTY_NAME);\n\n\t\tgrid = new Grid<InheritedComponentInstanceSelModelData>(\n\t\t\t(ListStore<InheritedComponentInstanceSelModelData>) store, cm);\n\t\tgrid.setSelectionModel(new GridSelectionModel<InheritedComponentInstanceSelModelData>());\n\t\tgrid.setAutoExpandColumn(InheritedComponentInstanceSelModelData.PROPERTY_MODULE);\n\t\tgrid.setLoadMask(true);\n\n\t\tGridView gridView = grid.getView();\n\t\tgridView.setForceFit(true);\n\n\t\tadd(grid);\n\t}", "public void initGrid(Game game) {\n\t\t\t\n\t\t\tint size = game.getBoard().size();\n\t\t\tcellLabels = new Matrix<JLabel>(size);\n\t\t\t\n\t\t\t\n\t\t\tleftPanel.removeAll();\n\t\t\tleftPanel.setLayout(new GridLayout(size,size));\n\t\t\t\n\t\t\tBorder border = BorderFactory.createLineBorder(Color.black,1);\n\t\t\tfor(int i = 0 ; i < cellLabels.size(); ++i) {\n\t\t\t\tfor(int j = 0 ; j < cellLabels.size() ; ++j) {\n\t\t\t\t\tJLabel curr_l = new JLabel(\"\");\n\t\t\t\t\t\n\t\t\t\t\tcurr_l.setBorder(border);\n\t\t\t\t\tcurr_l.setHorizontalAlignment(JLabel.CENTER);\n\t\t\t\t\tcellLabels.set(j, i, curr_l);\n\t\t\t\t\t\n\t\t\t\t\tJLabel label = cellLabels.get(j, i);\n\t\t\t\t\tlabel.setOpaque(true);\n\t\t\t\t\t\n\t\t\t\t\tleftPanel.add(label);\n\t\t\t\t\tCell curr = game.getBoard().get(j, i);\n\t\t\t\t\t\n\t\t\t\t\tlabel.setBackground(curr.color());\n\t\t\t\t\t\n\t\t\t\t\tif(curr.color() == Color.blue) {\n\t\t\t\t\t\tlabel.setText(curr.toString());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// We can't place a hunter on a corner because he could be blocked\n\t\t\t\t\tif((j == 1 && i == 1) || (j == cellLabels.size()-2 && i == 1) || (j == cellLabels.size()-2 && i == cellLabels.size()-2) ||(j == 1 && i == cellLabels.size()-2)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinal int i_inner = i;\n\t\t\t\t\tfinal int j_inner = j;\n\t\t\t\t\t\n\t\t\t\t\t// Set the listener to place hunters by clicking\n\t\t\t\t\tif(curr.color() == Color.blue || curr.color() == Color.gray) {\n\t\t\t\t\t\tlabel.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\t\tcontroller.addHunter(j_inner, i_inner);\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\n\t\t\t\n\t\t\tleftPanel.repaint();\n\t\t\tleftPanel.revalidate();\n\t\t\tthis.gridIsInit = true;\n\t\t\t\n\t\t\tframe.setEnable(\"play\",true);\n\t\t\tframe.setEnable(\"save\",true);\n\t\t\tframe.setEnable(\"round\",true);\n\t\t\tframe.setEnable(\"replay\",true);\n\n\t\t\tinitDataPanel(game);\n\t\t\t\n\t\t}", "private void setPanel()\r\n\t{\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setLayout(new GridLayout(5, 2));\r\n\t\t\r\n\t\tpanel.add(bubbleL);\r\n\t\tpanel.add(bubblePB);\r\n\t\t\r\n\t\tpanel.add(insertionL);\r\n\t\tpanel.add(insertionPB);\r\n\t\t\r\n\t\tpanel.add(mergeL);\r\n\t\tpanel.add(mergePB);\r\n\t\t\r\n\t\tpanel.add(quickL);\r\n\t\tpanel.add(quickPB);\r\n\t\t\r\n\t\tpanel.add(radixL);\r\n\t\tpanel.add(radixPB);\r\n\t}", "private void makeContainer(){\n Container X = (Container) ((SpringGridLayout) headlineContainer.getLayout()).getChild(1, 0);\n if (!(X == null)) headlineContainer.removeChild(X);\n\n Container sub = new Container(new SpringGridLayout(Axis.X,Axis.Y,FillMode.Last,FillMode.None));\n sub.setBackground(null); // just in case style sets an bg here\n Container sub1 = new Container();\n sub1.setBackground(null);\n Container sub2 = new Container();\n sub2.setBackground(null);\n Container sub3 = new Container();\n sub3.setBackground(null);\n\n sub.addChild(sub1);\n sub.addChild(sub2);\n sub.addChild(sub3);\n\n headlineContainer.addChild(sub ,1,0);\n/*\n sub2.setName(\"TEST\");\n sub3.setBackground(new QuadBackgroundComponent(ColorRGBA.Pink));\n\n // sub1.setPreferredSize(new Vector3f(25,50,0));\n sub1.setBackground(new QuadBackgroundComponent(ColorRGBA.Green));\n */\n }", "private void createComponents() {\n\t\tbuttons = new Button[9];\r\n\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\tbuttons[i] = new Button();\r\n\t\t}\r\n\r\n\t\t// Initialize components\r\n\t\tplayAgainButton = new Button(\"Play Again\");\r\n\t\tquitButton = new Button(\"Quit\");\r\n\r\n\t\t// Initialize layouts\r\n\t\tgameButtonGrid = new GridPane();\r\n\t\tgameButtonGrid.setStyle(\"-fx-background-color:Aquamarine;\");\r\n\t\tbottomButtonsHBox = new HBox();\r\n\t\tbottomButtonsHBox.setStyle(\"-fx-background-color:LightSlateGray;\");\r\n\t\tsceneVBox = new VBox();\r\n\t\t\r\n\t\t//Game components\r\n\t\tgameInfo = new GameInfo();\r\n\t}", "public void createButtonGrid() {\n\t\tbuttonPanel.setOpaque(false);\n\t\t\n\t\t// designs array of buttons\n\t\tfor (int counter = 1; counter <= 20; counter++) {\n\t\t\tbuttonArray[counter] = new JButton();\n\t\t\tbuttonArray[counter].setOpaque(false);\n\t\t\tbuttonArray[counter].setVisible(true);\n\t\t\tbuttonArray[counter].setBorderPainted(false);\n\t\t\tbuttonArray[counter].setHorizontalTextPosition(JButton.CENTER);\n\t\t\tbuttonArray[counter].setVerticalTextPosition(SwingConstants.CENTER);\n\t\t\tbuttonArray[counter].setFont(new Font(\"Courier\", Font.PLAIN, 15));\n\t\t\tbuttonArray[counter].setText(\"<html><font color = white>\" + Integer.toString(counter) + \"</font></html>\");\n\t\t\t// add action listener to each button\n\t\t\tbuttonArray[counter].addActionListener(eventsMain);\n\t\t\t// add each button to the container\n\t\t\tbuttonPanel.add(buttonArray[counter]);\n\t\t}\n\t\t\n\t\t// set colour for ach row of buttons\n\t\tfor (int counter = 1; counter <= 20; counter++) {\n\t\t\tif (counter >= 1 && counter < 6) {\n\t\t\t\tbuttonArray[counter].setIcon(btnBlue);\n\t\t\t} else if (counter > 5 && counter < 11) {\n\t\t\t\tbuttonArray[counter].setIcon(btnGreen);\n\t\t\t} else if (counter > 10 && counter < 16) {\n\t\t\t\tbuttonArray[counter].setIcon(btnRed);\n\t\t\t} else if (counter > 15 && counter < 21) {\n\t\t\t\tbuttonArray[counter].setIcon(btnGray);\n\t\t\t}\n\t\t}\n\t}", "public void createHomePage(){\n\t\tsetLayout(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints(); \n\t\t//insert username and password fields\n\t\tJLabel title;\n\n\t\t//build the title panel\n\t\ttitlePanel = new JPanel();\n\t\ttitle = new JLabel(\"Budgie\");\n\t\ttitle.setSize(new Dimension(40, 40));\n\t\ttitlePanel.add(title);\n\n\t\tc.anchor = GridBagConstraints.CENTER;\n\t\tc.gridy = 0;\n\t\tc.weighty = .5;\n\t\tadd(titlePanel, c);\n\n\t\tinputField = addinputField();\n\n\t\t//positioning of the grid field\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tc.gridy = 1;\n\t\tc.ipady = 10;\n\t\tc.weighty = .5;\n\t\tadd(inputField, c);\n\n\t\tc.gridy++;\n\t\tJButton debug = new JButton(\"Debug\");\n\t\tdebug.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tDebugPrinter.toggleDebug();\n\t\t\t}\n\n\t\t});\n\t\tadd(debug,c);\n\n\n\t\tpack();\n\n\n\t}", "public SameGnomeFrame() {\n\t\tsetSize(DEFUALT_WIDTH,DEFUALT_WIDTH);\n\t\tintializeGridBall();\n\t\tgrid = new GridComponent(gridBall);\n\t\tadd(grid);\n\t\t\n\t}", "private void createGUI() {\r\n\r\n cgRect modelSpace = new cgRect(0, 0, 11, 11);\r\n cgRect deviceSpace = new cgRect(0, 0, 600, 600);\r\n\r\n cgTransformation tr = new cgTransformation(modelSpace, deviceSpace, false, false);\r\n\r\n /**\r\n *\r\n */\r\n // The formatter of axis' labels will use default locale and pattern\r\n NumberFormat nf = NumberFormat.getInstance();\r\n\r\n // We will use \"fixed size\" axis renderer for all axes\r\n \r\n // 参数一:标签刻度长度大小 参数二:标签数字长度大小 参数三:数字和刻度之间的距离大小,长度为像素\r\n cgAxisRenderer ar = new cgFixedSizeAxisRenderer(5, 15, 50, nf);\r\n\r\n // ----------------------------------------------------\r\n // First axis - values match the model coordinates,\r\n // model origin is at 0.0\r\n // ----------------------------------------------------\r\n \r\n // 第三个参数为显示的数字数\r\n cgRect bbox1 = new cgRect(0, 0, 11, 1);\r\n TickGenerator tg1 = new NumericTickGenerator(1.0);\r\n cgAxisShape axis1 = new cgAxisShape(cgAxisShape.NORTH, bbox1, tg1, ar);\r\n\r\n cgShapeListLayer layer = new cgShapeListLayer();\r\n\r\n layer.addShape(axis1);\r\n\r\n /**\r\n *\r\n */\r\n // ----------------------------------------------------\r\n // Create grid using regular grid renderer\r\n // ----------------------------------------------------\r\n cgRect bbox = new cgRect(0, 0, 10, 10);\r\n TickGenerator htg = new NumericTickGenerator(1.0);\r\n TickGenerator vtg = new NumericTickGenerator(1.0);\r\n cgGridRenderer gr = new cgRegularGridRenderer();\r\n cgGridShape grid = new cgGridShape(bbox, htg, vtg, gr);\r\n\r\n // ----------------------------------------------------\r\n // Create view\r\n // ----------------------------------------------------\r\n// cgShapeListLayer layer = new cgShapeListLayer();\r\n// layer.addShape( grid );\r\n cgContainerModel model = new cgContainerModel();\r\n model.setBoundingBox(modelSpace);\r\n model.addLayer(layer);\r\n\r\n cgPlotView view = new cgPlotView(model, tr);\r\n\r\n // ----------------------------------------------------\r\n // Create plot\r\n // ----------------------------------------------------\r\n cgPlot plot = new cgPlot(view);\r\n\r\n plot.addScrollbar(cgGenericPlotLayout.SOUTH);\r\n plot.addScrollbar(cgGenericPlotLayout.EAST);\r\n\r\n getContentPane().add(plot);\r\n\r\n // ----------------------------------------------------\r\n // Set up listeners\r\n // ----------------------------------------------------\r\n // Set window listener\r\n addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent e) {\r\n System.exit(0);\r\n }\r\n });\r\n }", "GridPane body();", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n memberImportTagButton = new JButton();\n Font memberImportTagButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagButton.getFont());\n if (memberImportTagButtonFont != null) memberImportTagButton.setFont(memberImportTagButtonFont);\n memberImportTagButton.setText(\"导入选择的标签分组-取并集\");\n panel2.add(memberImportTagButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportTagRetainButton = new JButton();\n Font memberImportTagRetainButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagRetainButton.getFont());\n if (memberImportTagRetainButtonFont != null)\n memberImportTagRetainButton.setFont(memberImportTagRetainButtonFont);\n memberImportTagRetainButton.setText(\"导入选择的标签分组-取交集\");\n panel2.add(memberImportTagRetainButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportAllButton = new JButton();\n Font memberImportAllButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportAllButton.getFont());\n if (memberImportAllButtonFont != null) memberImportAllButton.setFont(memberImportAllButtonFont);\n memberImportAllButton.setText(\"导入所有关注公众号的用户\");\n panel2.add(memberImportAllButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n importOptionPanel = new JPanel();\n importOptionPanel.setLayout(new GridLayoutManager(1, 5, new Insets(0, 0, 0, 0), -1, -1));\n panel3.add(importOptionPanel, new GridConstraints(1, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n importOptionOpenIdCheckBox = new JCheckBox();\n importOptionOpenIdCheckBox.setEnabled(false);\n importOptionOpenIdCheckBox.setSelected(true);\n importOptionOpenIdCheckBox.setText(\"openId\");\n importOptionPanel.add(importOptionOpenIdCheckBox, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n importOptionPanel.add(spacer1, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n importOptionBasicInfoCheckBox = new JCheckBox();\n importOptionBasicInfoCheckBox.setText(\"昵称、性别等基本信息\");\n importOptionBasicInfoCheckBox.setToolTipText(\"每获取一条信息会花费一次每日接口调用量\");\n importOptionPanel.add(importOptionBasicInfoCheckBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n importOptionAvatarCheckBox = new JCheckBox();\n importOptionAvatarCheckBox.setText(\"头像\");\n importOptionAvatarCheckBox.setToolTipText(\"勾选会导致左侧列表甚至WePush变卡哦\");\n importOptionPanel.add(importOptionAvatarCheckBox, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n clearDbCacheButton = new JButton();\n clearDbCacheButton.setText(\"清空本地缓存\");\n importOptionPanel.add(clearDbCacheButton, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportTagComboBox = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n memberImportTagComboBox.setModel(defaultComboBoxModel1);\n panel3.add(memberImportTagComboBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n memberImportTagFreshButton = new JButton();\n Font memberImportTagFreshButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagFreshButton.getFont());\n if (memberImportTagFreshButtonFont != null) memberImportTagFreshButton.setFont(memberImportTagFreshButtonFont);\n memberImportTagFreshButton.setText(\"刷新\");\n panel3.add(memberImportTagFreshButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, 1, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"标签分组\");\n panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void initialize() {\n\n\t\tGridLayout gridLayout = new GridLayout();\n\t\tgridLayout.setRows(1);\n\t\t\n\t\tGridBagLayout gridbag = new GridBagLayout();\n\t\tbase=new JPanel(gridbag);\n\t\tbase.setBackground(new Color(250,251,245));\n\t\t// default size\n\t\tbase.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\t//base.setPreferredSize(new Dimension(200,320));\n\t\t\n\t\t/*\n\t\t// separator\n\t\tGridBagConstraints constraints1 = new GridBagConstraints();\n\t\tconstraints1.gridx = 0;\n\t\tconstraints1.gridy = 0;\n\t\tconstraints1.gridwidth= 1;\n\t\tconstraints1.gridheight = 1;\n\t\tconstraints1.insets = new Insets(0, 0, 0, 0);\n\n\t\tJSeparator vspr=new JSeparator(JSeparator.HORIZONTAL);\n\t\tvspr.setPreferredSize(new Dimension(200, 20));\n\t\tgridbag.setConstraints(vspr, constraints1);\n\t\tbase.add(vspr);\n\t\t*/\n\t\t\n\t\t// panel1\n\t\tString st = Path.getPath()+\"/images//program_h6_bg_illuminance.gif\";\n\t\tif(IsMacorWin.isMacOrWin()==false) st = Path.getPath()+\"images\\\\/program_h6_bg_illuminance.gif\";\n\n\t\tgJPanel = new GJPanel(st);\n\t\tgJPanel.setText(\"LEDライト\");\n\n\t\tGridBagConstraints constraints1 = new GridBagConstraints();\n\t\tconstraints1.gridx = 0;\n\t\tconstraints1.gridy = 1;\n\t\tconstraints1.gridwidth= 1;\n\t\tconstraints1.gridheight = 1;\n\t\tconstraints1.insets = new Insets(0, 0, 0, 0);\n\t\tgridbag.setConstraints(gJPanel, constraints1);\n\t\tbase.add(gJPanel);\n\t\t\n\t\t\n\t\t// panel\n\t\tJPanel jp1=new JPanel();\n\t\tjp1.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\tjp1.setLayout(gridLayout);\n//\t\tjp1.setPreferredSize(new Dimension(gJPanel.getWidth(),gJPanel.getHeight()));\n\t\tjp1.setPreferredSize(new Dimension(160,50));\n\t\tjp1.setBackground(Color.gray);\n\t\n//\n\t\tifD1=new InfoDispEdit();\n\t\tifD1.setText(\"警告下限照度\");\n\t\t// lux\n\t\tString[] illumdata=new String[50];\n\t\tfor(int i=0;i<50;i++){\n\t\t\tillumdata[i]= String.valueOf(i*100);\n\t\t}\n\t\tifD1.setSelectionItems(illumdata);\n\t\tifD1.setSelectedIndex(22);// 2500 lux\n\t\tifD1.setUnit(\"lux\");\n\t\t//\n\t\tGridBagConstraints constraints2 = new GridBagConstraints();\n\t\tconstraints2.gridy = 0;\t\n\t\tconstraints2.gridy = 2;\t\n\t\tconstraints2.gridwidth= 1;\n\t\tconstraints2.gridheight = 1;\n\t\tconstraints2.insets = new Insets(0, 0, 0, 0);\n\t\tgridbag.setConstraints(ifD1, constraints2);\n\t\t\n\t\tif(Version.getRevision().equals(\"Education\")!=true)\n\t\t\tbase.add(ifD1);\n\n\t\tsetParentClass(this);\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.add( base, BorderLayout.CENTER );\n\n\t\t// 観察される人を生成\n\t\tobservableMan = new ObservableMan();\n\n\t\t// デフォルトの観察者を追加\n\t\tdefaultO=new PlantPrgEdit.ObserverA();\n\t\tobservableMan.addObserver(defaultO);\n\t}", "private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "private void createUIComponents() {\n this.removeAll();\n this.setLayout(new GridBagLayout());\n\n selectionListener = e -> update();\n\n categorySet_panel = new DataObject_DisplayList<>(database.getSchema(), CategorySet.class, new Full_Set<>(database, CategorySet.class), false, this);\n categorySet_panel.addControlButtons(new CategorySet_ElementController(database, this));\n categorySet_panel.getMainPanel().getListSelectionModel().addListSelectionListener(selectionListener);\n\n virtualCategory_set = new OneParent_Children_Set<>(VirtualCategory.class, null);\n virtualCategory_elementController = new VirtualCategory_ElementController(database, this);\n virtualCategory_panel = new DataObject_DisplayList<>(database.getSchema(), VirtualCategory.class, virtualCategory_set, false, this);\n virtualCategory_panel.addControlButtons(virtualCategory_elementController);\n virtualCategory_panel.getMainPanel().getListSelectionModel().addListSelectionListener(selectionListener);\n\n categoryToCategorySet_set = new OneParent_Children_Set<>(CategoryToCategorySet.class, null);\n categoryToCategorySet_elementController = new CategoryToCategorySet_ElementController(database, this);\n categoryToCategorySet_panel = new DataObject_DisplayList<>(database.getSchema(), CategoryToCategorySet.class, categoryToCategorySet_set, false, this);\n categoryToCategorySet_panel.addControlButtons(categoryToCategorySet_elementController);\n\n categoryToVirtualCategory_set = new OneParent_Children_Set<>(CategoryToVirtualCategory.class, null);\n categoryToVirtualCategory_elementController = new CategoryToVirtualCategory_ElementController(database, this);\n categoryToVirtualCategory_panel = new DataObject_DisplayList<>(database.getSchema(), CategoryToVirtualCategory.class, categoryToVirtualCategory_set, false, this);\n categoryToVirtualCategory_panel.addControlButtons(categoryToVirtualCategory_elementController);\n\n GridBagConstraints gridBagConstraints = new GridBagConstraints();\n gridBagConstraints.fill = GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1;\n gridBagConstraints.weighty = 1;\n gridBagConstraints.gridheight = 2;\n\n gridBagConstraints.gridx = 0;\n this.add(categorySet_panel, gridBagConstraints);\n\n gridBagConstraints.gridheight = 1;\n gridBagConstraints.gridx = 1;\n this.add(virtualCategory_panel, gridBagConstraints);\n\n gridBagConstraints.weighty = 2;\n this.add(categoryToCategorySet_panel, gridBagConstraints);\n\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.weighty = 1;\n gridBagConstraints.gridx = 2;\n this.add(categoryToVirtualCategory_panel, gridBagConstraints);\n }", "void initLayout() {\n\t\t/* Randomize the number of rows and columns */\n\t\tNUM = Helper.randomizeNumRowsCols();\n\n\t\t/* Remove all the children of the gridContainer. It will be added again */\n\t\tpiecesGrid.removeAllViews();\n\t\t\n\t\t/* Dynamically calculate the screen positions and sizes of the individual pieces\n\t * Store the starting (x,y) of all the pieces in pieceViewLocations */\n\t\tpieceViewLocations = InitDisplay.initialize(getScreenDimensions(), getRootLayoutPadding());\n\t\t\n\t\t/* Create an array of ImageViews to store the individual piece images */\n\t\tcreatePieceViews();\n\t\t\n\t\t/* Add listeners to the ImageViews that were created above */\n\t\taddImageViewListeners();\n\t}", "public static void createAndShowGUI() {\n windowContent.add(\"Center\",p1);\n\n //Create the frame and set its content pane\n JFrame frame = new JFrame(\"GridBagLayoutCalculator\");\n frame.setContentPane(windowContent);\n\n // Set the size of the window to be big enough to accommodate all controls\n frame.pack();\n\n // Display the window\n frame.setVisible(true);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "public Grid() {\n }", "private void generateLayout() {\n\t\tJPanel generatePanel = new JPanel();\n\t\tgeneratePanel.setLayout(new GridBagLayout());\n\t\tJButton generatePrimes = new JButton(\"Generate Primes\");\n\t\tgeneratePrimes.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgeneratePrimesPopup();\n\t\t\t}\n\t\t});\n\t\tJButton generateHex = new JButton(\"Generate Hex Cross\");\n\t\tgenerateHex.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tprimes.clearCrosses();\n\t\t\t\tprimes.generateHexPrimes();\n\t\t\t\tupdateValues(\"Succesful Hex Cross Prime Numbers Generated\");\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\tgbc.fill = GridBagConstraints.CENTER;\n\t\tgbc.insets = new Insets(1,1,0,0);\n\t\tJPanel digitsPanel = new JPanel();\n\t\tdigitsPanel.setLayout(new GridLayout(2,1));\n\t\tLPrimedigits.setFont(new Font(\"Tahoma\", Font.BOLD,15));\n\t\tLHexDigits.setFont(new Font(\"Tahoma\", Font.BOLD,15));\n\t\tdigitsPanel.add(LPrimedigits);\n\t\tdigitsPanel.add(LHexDigits);\n\t\tgbc.gridx = 0;\n\t\tgbc.weightx = 0.1;\n\t\tgeneratePanel.add(generatePrimes,gbc);\n\t\tgbc.gridx = 1;\n\t\tgbc.weightx = 0.1;\n\t\tgeneratePanel.add(digitsPanel,gbc);\n\t\tgbc.weightx = 0.1;\n\t\tgbc.gridx = 2;\n\t\tgeneratePanel.add(generateHex,gbc);\n\t\tgeneratePanel.setBorder(BorderFactory.createLineBorder(new Color(150,0,0), 2));\n\t\tmainLayout.add(generatePanel);\n\t}", "public static void main(String[] args) {\n\t\tJFrame frame = new PE1203_GridLayoutManager();\n\t\tframe.setTitle(\"PE1203_GridLayoutManager\");\n\t\tframe.pack();\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n materialFirstWordLabel = new JLabel();\n materialFirstWordLabel.setText(\"нет данных\");\n contentPane.add(materialFirstWordLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(10, -1), null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n materialMarkLabel = new JLabel();\n materialMarkLabel.setText(\" \");\n materialMarkLabel.setVerticalTextPosition(1);\n panel1.add(materialMarkLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialProfileLabel = new JLabel();\n materialProfileLabel.setText(\" \");\n materialProfileLabel.setVerticalTextPosition(3);\n panel1.add(materialProfileLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialSeparator = new JSeparator();\n panel1.add(materialSeparator, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n contentPane.add(spacer1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }", "public BoardGUI(int gridsize, int gridwidth) {\r\n\r\n gridSize = gridsize;\r\n gridWidth = gridwidth;\r\n double actualWidth = (double) (gridWidth - 20);\r\n blockSize = (actualWidth / (double) gridSize);\r\n\r\n board = new GridPane();\r\n board.setPrefSize(gridWidth, gridWidth);\r\n board.setPadding(new Insets(5)); //margin for the slot the grid will be in\r\n //https://pngtree.com/freebackground/blue-watercolor-background-material_754790.html\r\n Image bg = new Image(\"images/sea.jpg\");\r\n BackgroundImage bgImage = new BackgroundImage(bg, null, null, null, null);\r\n board.setBackground(new Background(bgImage));\r\n //sets the grid depending on size\r\n for (int x = 0; x < gridSize; x++) {\r\n //this sets the constraints for box size so the size doesn't automatically adjust to child inside\r\n ColumnConstraints column = new ColumnConstraints();\r\n RowConstraints row = new RowConstraints();\r\n //so it fits the parent slot (center) for the grid whatever the size of the grid\r\n column.setPercentWidth(50);\r\n row.setPercentHeight(50);\r\n board.getColumnConstraints().add(column);\r\n board.getRowConstraints().add(row);\r\n }\r\n board.setGridLinesVisible(true);\r\n }", "public VBox addGridPane() {\n\n //Name column\n TableColumn<Product, String> nameColumn = new TableColumn<>(\"Description\");\n nameColumn.setMinWidth(200);\n nameColumn.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n\n //Price column\n TableColumn<Product, Double> priceColumn = new TableColumn<>(\"Amount\");\n priceColumn.setMinWidth(100);\n priceColumn.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n //Name input\n nameInput = new TextField();\n nameInput.setPromptText(\"Description: \");\n nameInput.setMinWidth(100);\n\n //Price input\n priceInput = new TextField();\n priceInput.setPromptText(\"Amount :\");\n\n\n //Button\n Button addButton = new Button(\"Add\");\n addButton.setOnAction(e -> addButtonClicked());\n Button deleteButton = new Button(\"Delete\");\n deleteButton.setOnAction(e -> deleteButtonClicked());\n\n HBox hBox = new HBox();\n hBox.setPadding(new Insets(10,10,10,10));\n hBox.setSpacing(10);\n hBox.getChildren().addAll(nameInput, priceInput, addButton, deleteButton);\n\n table = new TableView<>();\n table.setItems(getProduct());\n table.getColumns().addAll(nameColumn, priceColumn);\n\n VBox vBox = new VBox();\n vBox.getChildren().addAll(table, hBox);\n\n return vBox;\n }", "public Grid() { //Constructs a new grid and fills it with Blank game objects.\r\n\t\tthis.grid = new GameObject[10][10];\r\n\t\tthis.aliveShips = new Ships[4];\r\n\t\tfor (int i = 0; i < this.grid.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.grid[i].length; j++) {\r\n\t\t\t\tthis.grid[i][j] = new Blank(i,j);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static GridPane createGridPane (GridPane gridPane) {\n\t\t//Set controls to UI\n\t\tgridPane.setHgap(5);\n\t\tgridPane.setVgap(5);\n\t\tgridPane.add(new Label(\"First Name\"), 0, 0);\n\t\tgridPane.add(tfFirstName, 1,0);\n\t\tgridPane.add(new Label(\"Last Name\"), 0, 1);\n\t\tgridPane.add(tfLastName, 1,1);\n\t\tgridPane.add(new Label(\"Annual Interest Rate\"), 0, 2);\n\t\tgridPane.add(tfAnnualInterestRate, 1, 2);\n\t\tgridPane.add(new Label(\"Number of Years\"), 0, 3);\n\t\tgridPane.add(tfNumberOfYears, 1,3);\n\t\tgridPane.add(new Label(\"Loan Amount\"), 0, 4);\n\t\tgridPane.add(tfLoanAmount, 1,4);\n\t\tgridPane.add(new Label(\"Monthly Payment\"), 0, 5);\n\t\tgridPane.add(tfMonthlyPayment, 1,5);\n\t\tgridPane.add(new Label(\"Total Payment\"), 0, 6);\n\t\tgridPane.add(tfTotalPayment, 1,6);\n\t\tgridPane.add(btCalculate, 1, 7);\n\t\t\n\t\t//Set Properties for UI\n\t\tgridPane.setAlignment(Pos.CENTER);\n\t\ttfAnnualInterestRate.setAlignment(Pos.BOTTOM_RIGHT);\n\t\ttfNumberOfYears.setAlignment(Pos.BASELINE_RIGHT);\n\t\ttfLoanAmount.setAlignment(Pos.BASELINE_RIGHT);\n\t\ttfMonthlyPayment.setAlignment(Pos.BOTTOM_RIGHT);\n\t\ttfTotalPayment.setAlignment(Pos.BOTTOM_RIGHT);\n\t\ttfMonthlyPayment.setEditable(false);\n\t\ttfTotalPayment.setEditable(false);\n\t\tGridPane.setHalignment(btCalculate, HPos.RIGHT);\n\t\t\n\t\treturn gridPane;\n\t}", "private void createCompositeGoodsShow() {\r\n\t\tGridData gridData4 = new GridData();\r\n\t\tgridData4.grabExcessHorizontalSpace = true;\r\n\t\tgridData4.horizontalSpan = 3;\r\n\t\tgridData4.heightHint = 380;\r\n\t\tgridData4.widthHint = 560;\r\n\t\tgridData4.grabExcessVerticalSpace = true;\r\n\t\tGridLayout gridLayout3 = new GridLayout();\r\n\t\tgridLayout3.numColumns = 3;\r\n\t\tcompositeGoodsShow = new Composite(compositeGoodsMange, SWT.NONE);\r\n\t\tcompositeGoodsShow.setLayout(gridLayout3);\r\n\t\tcompositeGoodsShow.setLayoutData(gridData4);\r\n\t\tdisplayRoom(compositeGoodsShow);\r\n\t}", "public static void newUAV(){\n GridPane gp = new GridPane();\n Text title = new Text(\"Create a UAV:\\nUAV Settings\");\n title.setTextAlignment(TextAlignment.CENTER);\n title.setId(\"title\"); // Set CSS style for the title\n GridPane.setColumnSpan(title,3);\n GridPane.setHalignment(title, HPos.CENTER);\n\n gp.setId(\"gridpane\"); // Set CSS style ID for the gridpane\n gp.getStyleClass().add(\"grid\");\n\n // Create the labels for the menu\n Label nameLabel = new Label(\"Name:\");\n Label weightLabel = new Label(\"Weight (g):\");\n Label turnRadiusLabel = new Label(\"Turn Radius (m):\");\n Label maxInclineLabel = new Label(\"Max incline angle (deg):\");\n Label batteryLabel = new Label(\"Battery Type:\");\n Label batteryCapacityLabel = new Label(\"Battery Capacity (mAh):\");\n\n name.setPromptText(\"Name of craft\");\n weight.setPromptText(\"Weight of craft\");\n turnRadius.setPromptText(\"Min turn radius of craft\");\n maxIncline.setPromptText(\"Max incline/decline angle\");\n battery.setPromptText(\"Battery used in craft (Lipo, NiMH, Li-ion...)\");\n batteryCapacity.setPromptText(\"Battery capacity in mAh\");\n\n // Create the buttons for the menu\n Button save = new Button(\"Save\");\n Button cancel = new Button(\"Cancel\");\n Button clear = new Button(\"Clear\");\n\n // Add all elements to the menu gridpane\n gp.add(title,0,0);\n\n // Add the components to the menu gridpane\n gp.add(nameLabel,0,1);\n gp.add(weightLabel,0,2);\n gp.add(turnRadiusLabel,0,3);\n gp.add(maxInclineLabel,0,4);\n gp.add(batteryLabel,0,5);\n gp.add(batteryCapacityLabel,0,6);\n\n gp.add(name,1,1);\n gp.add(weight,1,2);\n gp.add(turnRadius,1,3);\n gp.add(maxIncline,1,4);\n gp.add(battery,1,5);\n gp.add(batteryCapacity,1,6);\n\n // Add the buttons to the menu\n gp.add(save,0,7);\n gp.add(cancel,2,7);\n gp.add(clear,1,7);\n\n gp.setHgap(10);\n gp.setVgap(20);\n gp.setAlignment(Pos.CENTER);\n\n // If the save button is pressed\n save.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n // If a name has not been set\n if(name.getText().isEmpty()){\n System.out.println(\"Missing name for UAV\");\n }else {\n File file = new File(\"src/uavs/\"+name.getText()+\".uav\");\n if(file.exists()){\n dialogMessage.setText(\"The filename \"+ name.getText() +\n \".uav already exists in \"+path+\".\\n Would you like to overwrite?\");\n dialog.show();\n }else {\n writeUAV(); // Write the UAV settings\n createStage.close();\n }\n }\n }\n });\n\n // Close the menu\n cancel.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n createStage.close();\n }\n });\n\n // Clear all text fields\n clear.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n name.clear();\n weight.clear();\n turnRadius.clear();\n maxIncline.clear();\n battery.clear();\n batteryCapacity.clear();\n }\n });\n\n createScene = new Scene(gp,500,700);\n createScene.setUserAgentStylesheet(\"style/menus.css\"); // Set the style of the menu\n createStage.setScene(createScene);\n createStage.show();\n }", "public void createCollections() {\n \n\t\t//Creating columns for the collection\n collectionToolName = new VBox();\n collectionPurchaseDate = new VBox();\n collectionReturnButtons = new VBox();\n \n //Creating columns for the owned tools section\n ownedToolName = new VBox();\n ownedPurchaseDate = new VBox();\n ownedLendable = new VBox();\n \n collectionList.getChildren().add(collectionToolName);\n collectionList.getChildren().add(new Separator());\n collectionList.getChildren().add(collectionPurchaseDate);\n collectionList.getChildren().add(new Separator());\n collectionList.getChildren().add(collectionReturnButtons);\n \n \n ownedList.getChildren().add(ownedToolName);\n ownedList.getChildren().add(new Separator());\n ownedList.getChildren().add(ownedPurchaseDate);\n ownedList.getChildren().add(new Separator());\n ownedList.getChildren().add(ownedLendable);\n \n\t}", "private static void createAndShowGUI() {\r\n //Disable boldface controls.\r\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE); \r\n\r\n //Create and set up the window.\r\n JFrame frame = new JFrame(\"Exertion Scripting\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n //Create and set up the content pane.\r\n NetletEditor newContentPane = new NetletEditor(null);\r\n newContentPane.setOpaque(true); //content panes must be opaque\r\n frame.setContentPane(newContentPane);\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "private void initialize() {\r\n\t\tGridBagConstraints gridBagConstraints1 = new GridBagConstraints();\r\n\t\tgridBagConstraints1.gridx = 0;\r\n\t\tgridBagConstraints1.gridy = 1;\r\n\t\tlaunchSubLabel = new JLabel();\r\n\t\tlaunchSubLabel.setText(Message.getMessage(\"reportmaker.process.sublabel\"));\r\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\r\n\t\tgridBagConstraints.gridx = 0;\r\n\t\tgridBagConstraints.gridy = 0;\r\n\t\tthis.setSize(800, 400);\r\n\t\tthis.setLayout(new GridBagLayout());\r\n\t\tthis.setPreferredSize(new Dimension(800, 400));\r\n\t\tthis.setBackground(Color.white);\r\n\t\tthis.add(getLaunchButton(), gridBagConstraints);\r\n\r\n\t\tGridBagConstraints gridBagConstraints2 = new GridBagConstraints();\r\n\t\tgridBagConstraints2.insets = new Insets(50, 0, 0, 0);\r\n\t\tgridBagConstraints2.gridx = 0;\r\n\t\tgridBagConstraints2.gridy = 2;\r\n\t\tthis.add(getViewButton(), gridBagConstraints2);\r\n\t\tthis.add(launchSubLabel, gridBagConstraints1);\r\n\t}", "public static void main(String[] args) {\n\n frame = new JFrame(\"List\");\n\n JLabel firstColumnLabel = new JLabel(\"First Name\");\n JLabel secondColumnLabel = new JLabel(\"Last Name\");\n\n JTextField tf = new JTextField();\n // tf.setBounds(20,20, 100,20);\n\n JTextField tf2 = new JTextField();\n JTextField tf3 = new JTextField();\n JTextField tf4 = new JTextField();\n JTextField tf5 = new JTextField();\n JTextField tf6 = new JTextField();\n\n frame.add(firstColumnLabel);\n frame.add(secondColumnLabel);\n\n frame.add(tf);\n\n frame.add(tf2);\n\n frame.add(tf3);\n frame.add(tf4);\n frame.add(tf4);\n frame.add(tf5);\n frame.add(tf6);\n\n frame.setLayout(new GridLayout(4, 2));\n\n frame.setVisible(true);\n frame.setSize(500, 500);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n }", "private void initializeGrid() {\r\n if (this.rowCount > 0 && this.columnCount > 0) {\r\n this.cellViews = new Rectangle[this.rowCount][this.columnCount];\r\n for (int row = 0; row < this.rowCount; row++) {\r\n for (int column = 0; column < this.columnCount; column++) {\r\n Rectangle rectangle = new Rectangle();\r\n rectangle.setX((double)column * CELL_WIDTH);\r\n rectangle.setY((double)row * CELL_WIDTH);\r\n rectangle.setWidth(CELL_WIDTH);\r\n rectangle.setHeight(CELL_WIDTH);\r\n this.cellViews[row][column] = rectangle;\r\n this.getChildren().add(rectangle);\r\n }\r\n }\r\n }\r\n }", "private void initComponents() {\n\t\tSplitPane mainSplitPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);\n\t\tmainSplitPane.setSeparatorPosition(new Extent(34));\n\t\tnavigator = new AnyRowNavigator();\n\t\tmainSplitPane.add(navigator);\n\t\tSplitPane splitPane = new SplitPane();\n\t\tsplitPane.setOrientation(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);\n\t\tsplitPane.setSeparatorPosition(new Extent(200));\n\t\tsplitPane.setResizable(true);\n\t\tmainSplitPane.add(splitPane);\n\t\tadd(mainSplitPane);\t\t\n rootLayout = new Grid();\n rootLayout.setWidth(new Extent(100, Extent.PERCENT));\n rootLayout.setSize(8);\n splitPane.add(rootLayout);\n EMPSN_CaptionLabel = new nextapp.echo2.app.Label();\n EMPSN_CaptionLabel.setText(\"N_GET_DATA.EMPSN\");\n rootLayout.add(EMPSN_CaptionLabel);\n GridLayoutData infoLayout = new GridLayoutData();\n infoLayout.setColumnSpan(7);\n Row row = new Row();\n row.setLayoutData(infoLayout);\n EMPSN_DscField1 = new dsc.echo2app.component.DscField();\n EMPSN_DscField1.setWidth(new Extent(60));\n EMPSN_DscField1.setId(\"EMPSN_DscField1\");\n row.add(EMPSN_DscField1);\n lblInfo = new DirectHtml();\n row.add(lblInfo);\n rootLayout.add(row);\n// DEPSN_CaptionLabel = new nextapp.echo2.app.Label();\n// rootLayout.add(DEPSN_CaptionLabel);\n// DEPSN_DscField1 = new dsc.echo2app.component.DscField();\n// DEPSN_DscField1.setWidth(new Extent(60));\n// DEPSN_DscField1.setId(\"DEPSN_DscField1\");\n// rootLayout.add(DEPSN_DscField1);\n MONTHS_CaptionLabel = new nextapp.echo2.app.Label();\n MONTHS_CaptionLabel.setText(\"N_GET_DATA.MONTHS\");\n rootLayout.add(MONTHS_CaptionLabel);\n MONTHS_DscField2 = new dsc.echo2app.component.DscField();\n MONTHS_DscField2.setWidth(new Extent(60));\n MONTHS_DscField2.setId(\"MONTHS_DscField2\");\n rootLayout.add(MONTHS_DscField2);\n YEARS_CaptionLabel = new nextapp.echo2.app.Label();\n YEARS_CaptionLabel.setText(\"N_GET_DATA.YEARS\");\n rootLayout.add(YEARS_CaptionLabel);\n YEARS_DscField3 = new dsc.echo2app.component.DscField();\n YEARS_DscField3.setWidth(new Extent(60));\n YEARS_DscField3.setId(\"YEARS_DscField3\");\n rootLayout.add(YEARS_DscField3);\n DUCLS_CaptionLabel = new nextapp.echo2.app.Label();\n DUCLS_CaptionLabel.setText(\"N_GET_DATA.DUCLS\");\n rootLayout.add(DUCLS_CaptionLabel);\n DUCLS_DscField4 = new dsc.echo2app.component.DscField();\n DUCLS_DscField4.setWidth(new Extent(60));\n DUCLS_DscField4.setDisabledBackground(new Color(0xFBF4D4));\n DUCLS_DscField4.setDisabledForeground(new Color(0x2A7FFF));\n DUCLS_DscField4.setId(\"DUCLS_DscField4\");\n rootLayout.add(DUCLS_DscField4);\n NDUCLS_CaptionLabel = new nextapp.echo2.app.Label();\n NDUCLS_CaptionLabel.setText(\"N_GET_DATA.NDUCLS\");\n rootLayout.add(NDUCLS_CaptionLabel);\n NDUCLS_DscField5 = new dsc.echo2app.component.DscField();\n NDUCLS_DscField5.setWidth(new Extent(60));\n NDUCLS_DscField5.setId(\"NDUCLS_DscField5\");\n rootLayout.add(NDUCLS_DscField5);\n ADDHOL_CaptionLabel = new nextapp.echo2.app.Label();\n ADDHOL_CaptionLabel.setText(\"N_GET_DATA.ADDHOL\");\n rootLayout.add(ADDHOL_CaptionLabel);\n ADDHOL_DscField6 = new dsc.echo2app.component.DscField();\n ADDHOL_DscField6.setWidth(new Extent(60));\n ADDHOL_DscField6.setId(\"ADDHOL_DscField6\");\n rootLayout.add(ADDHOL_DscField6);\n ADDCLS1_CaptionLabel = new nextapp.echo2.app.Label();\n ADDCLS1_CaptionLabel.setText(\"N_GET_DATA.ADDCLS1\");\n rootLayout.add(ADDCLS1_CaptionLabel);\n ADDCLS1_DscField7 = new dsc.echo2app.component.DscField();\n ADDCLS1_DscField7.setWidth(new Extent(60));\n ADDCLS1_DscField7.setId(\"ADDCLS1_DscField7\");\n rootLayout.add(ADDCLS1_DscField7);\n NADDCLS_CaptionLabel = new nextapp.echo2.app.Label();\n NADDCLS_CaptionLabel.setText(\"N_GET_DATA.NADDCLS\");\n rootLayout.add(NADDCLS_CaptionLabel);\n NADDCLS_DscField8 = new dsc.echo2app.component.DscField();\n NADDCLS_DscField8.setWidth(new Extent(60));\n NADDCLS_DscField8.setId(\"NADDCLS_DscField8\");\n rootLayout.add(NADDCLS_DscField8);\n LATE_CaptionLabel = new nextapp.echo2.app.Label();\n LATE_CaptionLabel.setText(\"N_GET_DATA.LATE\");\n rootLayout.add(LATE_CaptionLabel);\n LATE_DscField9 = new dsc.echo2app.component.DscField();\n LATE_DscField9.setWidth(new Extent(60));\n LATE_DscField9.setId(\"LATE_DscField9\");\n rootLayout.add(LATE_DscField9);\n SIGN_CaptionLabel = new nextapp.echo2.app.Label();\n SIGN_CaptionLabel.setText(\"N_GET_DATA.SIGN\");\n rootLayout.add(SIGN_CaptionLabel);\n SIGN_DscField10 = new dsc.echo2app.component.DscField();\n SIGN_DscField10.setWidth(new Extent(60));\n SIGN_DscField10.setId(\"SIGN_DscField10\");\n rootLayout.add(SIGN_DscField10);\n ACN_CaptionLabel = new nextapp.echo2.app.Label();\n ACN_CaptionLabel.setText(\"N_GET_DATA.ACN\");\n rootLayout.add(ACN_CaptionLabel);\n ACN_DscField11 = new dsc.echo2app.component.DscField();\n ACN_DscField11.setWidth(new Extent(60));\n ACN_DscField11.setId(\"ACN_DscField11\");\n rootLayout.add(ACN_DscField11);\n ACNM_CaptionLabel = new nextapp.echo2.app.Label();\n ACNM_CaptionLabel.setText(\"N_GET_DATA.ACNM\");\n rootLayout.add(ACNM_CaptionLabel);\n ACNM_DscField12 = new dsc.echo2app.component.DscField();\n ACNM_DscField12.setWidth(new Extent(60));\n ACNM_DscField12.setId(\"ACNM_DscField12\");\n rootLayout.add(ACNM_DscField12);\n REST_CaptionLabel = new nextapp.echo2.app.Label();\n REST_CaptionLabel.setText(\"N_GET_DATA.REST\");\n rootLayout.add(REST_CaptionLabel);\n REST_DscField13 = new dsc.echo2app.component.DscField();\n REST_DscField13.setWidth(new Extent(60));\n REST_DscField13.setId(\"REST_DscField13\");\n rootLayout.add(REST_DscField13);\n REST_PAY_CaptionLabel = new nextapp.echo2.app.Label();\n REST_PAY_CaptionLabel.setText(\"N_GET_DATA.REST_PAY\");\n rootLayout.add(REST_PAY_CaptionLabel);\n REST_PAY_DscField14 = new dsc.echo2app.component.DscField();\n REST_PAY_DscField14.setWidth(new Extent(60));\n REST_PAY_DscField14.setId(\"REST_PAY_DscField14\");\n rootLayout.add(REST_PAY_DscField14);\n REST_SICK_CaptionLabel = new nextapp.echo2.app.Label();\n REST_SICK_CaptionLabel.setText(\"N_GET_DATA.REST_SICK\");\n rootLayout.add(REST_SICK_CaptionLabel);\n REST_SICK_DscField15 = new dsc.echo2app.component.DscField();\n REST_SICK_DscField15.setWidth(new Extent(60));\n REST_SICK_DscField15.setId(\"REST_SICK_DscField15\");\n rootLayout.add(REST_SICK_DscField15);\n OTHER_CaptionLabel = new nextapp.echo2.app.Label();\n OTHER_CaptionLabel.setText(\"N_GET_DATA.OTHER\");\n rootLayout.add(OTHER_CaptionLabel);\n OTHER_DscField16 = new dsc.echo2app.component.DscField();\n OTHER_DscField16.setWidth(new Extent(60));\n OTHER_DscField16.setId(\"OTHER_DscField16\");\n rootLayout.add(OTHER_DscField16);\n NWHOUR_CaptionLabel = new nextapp.echo2.app.Label();\n NWHOUR_CaptionLabel.setText(\"N_GET_DATA.NWHOUR\");\n rootLayout.add(NWHOUR_CaptionLabel);\n NWHOUR_DscField17 = new dsc.echo2app.component.DscField();\n NWHOUR_DscField17.setWidth(new Extent(60));\n NWHOUR_DscField17.setId(\"NWHOUR_DscField17\");\n rootLayout.add(NWHOUR_DscField17);\n ADDHOLN_CaptionLabel = new nextapp.echo2.app.Label();\n ADDHOLN_CaptionLabel.setText(\"N_GET_DATA.ADDHOLN\");\n rootLayout.add(ADDHOLN_CaptionLabel);\n ADDHOLN_DscField18 = new dsc.echo2app.component.DscField();\n ADDHOLN_DscField18.setWidth(new Extent(60));\n ADDHOLN_DscField18.setId(\"ADDHOLN_DscField18\");\n rootLayout.add(ADDHOLN_DscField18);\n LMATER_CaptionLabel = new nextapp.echo2.app.Label();\n LMATER_CaptionLabel.setText(\"N_GET_DATA.LMATER\");\n rootLayout.add(LMATER_CaptionLabel);\n LMATER_DscField19 = new dsc.echo2app.component.DscField();\n LMATER_DscField19.setWidth(new Extent(60));\n LMATER_DscField19.setId(\"LMATER_DscField19\");\n rootLayout.add(LMATER_DscField19);\n LOCKED_CaptionLabel = new nextapp.echo2.app.Label();\n LOCKED_CaptionLabel.setText(\"N_GET_DATA.LOCKED\");\n rootLayout.add(LOCKED_CaptionLabel);\n LOCKED_DscField20 = new dsc.echo2app.component.DscField();\n LOCKED_DscField20.setWidth(new Extent(60));\n LOCKED_DscField20.setId(\"LOCKED_DscField20\");\n rootLayout.add(LOCKED_DscField20);\n// UP_DATE_CaptionLabel = new nextapp.echo2.app.Label();\n// UP_DATE_CaptionLabel.setText(\"N_GET_DATA.UP_DATE\");\n// rootLayout.add(UP_DATE_CaptionLabel);\n// UP_DATE_DscDateField1 = new dsc.echo2app.component.DscDateField();\n// UP_DATE_DscDateField1.setId(\"UP_DATE_DscDateField1\");\n// rootLayout.add(UP_DATE_DscDateField1);\n// UP_USER_CaptionLabel = new nextapp.echo2.app.Label();\n// UP_USER_CaptionLabel.setText(\"N_GET_DATA.UP_USER\");\n// rootLayout.add(UP_USER_CaptionLabel);\n// UP_USER_DscField22 = new dsc.echo2app.component.DscField();\n// UP_USER_DscField22.setId(\"UP_USER_DscField22\");\n// rootLayout.add(UP_USER_DscField22);\n dailyContent = new DataDailyBrowserContent();\n splitPane.add(dailyContent);\n\t}", "private void geometry()\n\t\t{\n\t\tjLabelNickName = new JLabel(\"Pseudo: \");\n\t\tjLabelPort = new JLabel(\"Port: \");\n\t\tjNickname = new JTextField();\n\t\tjIPLabel = new JIPLabel();\n\t\tjIP = new JTextField();\n\t\tjPort = new JSpinner();\n\t\tjButtonConnection = new JButton(\"Connexion\");\n\n\t\tthis.setLayout(new GridLayout(-1, 1));\n\n\t\tthis.add(jLabelNickName);\n\t\tthis.add(jNickname);\n\t\tthis.add(jIPLabel);\n\t\tthis.add(jIP);\n\t\tthis.add(jLabelPort);\n\t\tthis.add(jPort);\n\t\tthis.add(Box.createVerticalStrut(SPACE));\n\t\tthis.add(jButtonConnection);\n\t\tthis.add(Box.createVerticalGlue());\n\t\t}", "public GriddedPanel() {\n this(new Insets(2, 2, 2, 2));\n\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(new GridLayout(0, 2, 20, 15));\n\t\t\n\t\tJLabel Nombre = new JLabel(\"Nombre\");\n\t\tframe.getContentPane().add(Nombre);\n\t\t\n\t\ttextNombre = new JTextField();\n\t\tframe.getContentPane().add(textNombre);\n\t\ttextNombre.setColumns(10);\n\t\t\n\t\tJLabel Apellidos = new JLabel(\"Apellidos\");\n\t\tframe.getContentPane().add(Apellidos);\n\t\t\n\t\ttextApellidos = new JTextField();\n\t\tframe.getContentPane().add(textApellidos);\n\t\ttextApellidos.setColumns(10);\n\t\t\n\t\tLocalidad = new JLabel(\"Localidad\");\n\t\tframe.getContentPane().add(Localidad);\n\t\t\n\t\ttextLocalidad = new JTextField();\n\t\tframe.getContentPane().add(textLocalidad);\n\t\ttextLocalidad.setColumns(10);\n\t\t\n\t\tCiudad = new JLabel(\"Ciudad\");\n\t\tframe.getContentPane().add(Ciudad);\n\t\t\n\t\tcomboBox = new JComboBox();\n\t\tcomboBox.setModel(new DefaultComboBoxModel(new String[] {\"Jaén\", \"Cordoba\", \"Sevilla \", \"Granada\", \"Huelva\", \"Madrid\"}));\n\t\tframe.getContentPane().add(comboBox);\n\t\t\n\t\tbtnNewButton = new JButton(\"New button\");\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tbtnNewButton_1 = new JButton(\"New button\");\n\t\tframe.getContentPane().add(btnNewButton_1);\n\t}", "public PanelTKPhong() {\n\t\tinitComponents();\n\t\tloaddataTable();\n\t\tloaddataLabel();\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n scrollPane1.setViewportView(table);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonRegister = new JButton();\n buttonRegister.setText(\"Track\");\n panel1.add(buttonRegister, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonMenu = new JButton();\n buttonMenu.setText(\"Menu\");\n panel1.add(buttonMenu, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "private void createGraphics() {\n\t\toppStatGrid = new GridPane();\n\t\toppStatGrid.setHgap(5);\n\t\tColumnConstraints columnOpp1 = new ColumnConstraints();\n\t\tcolumnOpp1.setMinWidth(gameScene.getWidth()*0.3);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnOpp2 = new ColumnConstraints();\n\t\tcolumnOpp2.setMinWidth(gameScene.getWidth()*0.3);\n\t\toppStatGrid.getColumnConstraints().addAll(columnOpp1,columnOpp2);\n\t\tRowConstraints rowOpp = new RowConstraints();\n\t\trowOpp.setMinHeight(gameScene.getHeight()*0.1);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\n\t\tlocStatGrid = new GridPane();\n\t\tlocStatGrid.setHgap(5);\n\t\tColumnConstraints columnLoc1 = new ColumnConstraints();\n\t\tcolumnLoc1.setMinWidth(gameScene.getWidth()*0.1);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnLoc2 = new ColumnConstraints();\n\t\tcolumnLoc2.setMinWidth(gameScene.getWidth()*0.3);\n\t\tlocStatGrid.getColumnConstraints().addAll(columnLoc1,columnLoc2);\n\t\tRowConstraints rowLoc2 = new RowConstraints();\n\t\trowLoc2.setMinHeight(gameScene.getHeight()*0.1);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\n\t\topponentName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\tlocalName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\topponentLevel.setFont(Font.font(defaultFont, 14));\n\t\tlocalLevel.setFont(Font.font(defaultFont, 14));\n\t\topponentHealth.setFont(Font.font(defaultFont, 14));\n\t\tlocalHealth.setFont(Font.font(defaultFont, 14));\n\n\t\topponentName.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localName, HPos.RIGHT);\n\t\topponentLevel.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalLevel.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localLevel, HPos.RIGHT);\n\t\topponentHealth.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalHealth.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localHealth, HPos.RIGHT);\n\n\t\topponentHealthBar = new Rectangle();\n\t\tlocalHealthBar = new Rectangle();\n\t\topponentHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\tlocalHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\topponentHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\tlocalHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\topponentHealthBar.setArcWidth(5);\n\t\topponentHealthBar.setArcHeight(5);\n\t\tlocalHealthBar.setArcWidth(5);\n\t\tlocalHealthBar.setArcHeight(5);\n\t\t/*NumberBinding oppHealthBind = gameScene.property\n\t\topponentHealthBar.prop*/\n\n\t\topponentHealthBar.setEffect(new Lighting());\n\t\tlocalHealthBar.setEffect(new Lighting());\n\n\t\topponentHealthBar.setFill(Color.DARKRED);\n\t\tlocalHealthBar.setFill(Color.DARKRED);\n\n\t\toppStatGrid.add(opponentName, 0, 0);\n\t\toppStatGrid.add(opponentLevel, 1, 0);\n\t\toppStatGrid.add(opponentHealthBar, 0, 1);\n\t\toppStatGrid.add(opponentHealth, 1, 1);\n\n\t\tlocStatGrid.add(localLevel, 0, 0);\n\t\tlocStatGrid.add(localName, 1, 0);\n\t\tlocStatGrid.add(localHealthBar, 1, 1);\n\t\tlocStatGrid.add(localHealth, 0, 1);\n\n\t\tAnchorPane.setTopAnchor(oppStatGrid, 10.0);\n\t\tAnchorPane.setLeftAnchor(oppStatGrid, 10.0);\n\n\t\tAnchorPane.setBottomAnchor(locStatGrid, 10.0);\n\t\tAnchorPane.setRightAnchor(locStatGrid, 10.0);\n\n\t\tthis.getChildren().addAll(oppStatGrid,locStatGrid);\n\t\t\n\t\toppPane = new Pane();\n\t\toppPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\toppPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tlocPane = new Pane();\n\t\tlocPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\tlocPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tAnchorPane.setBottomAnchor(locPane, 10.0);\n\t\tAnchorPane.setLeftAnchor(locPane, 10.0);\n\t\t\n\t\tAnchorPane.setTopAnchor(oppPane, 10.0);\n\t\tAnchorPane.setRightAnchor(oppPane, 10.0);\n\t\t\n\t\tthis.getChildren().addAll(locPane,oppPane);\n\t\t\n\n\t}", "public void setUpPanel() {\n\t\tsetBorder(new CompoundBorder(new EtchedBorder(EtchedBorder.LOWERED,\n\t\t\t\tnull, null), new TitledBorder(null, \"Manage Auction Records\",\n\t\t\t\tTitledBorder.CENTER, TitledBorder.TOP, null, null)));\n\n\t\tgridBagLayout.columnWidths = new int[] { 48, 215, 228, 150, 0 };\n\t\tgridBagLayout.rowHeights = new int[] { 70, 15, 21, 57, 15, 21, 58, 15,\n\t\t\t\t21, 85, 39, 0 };\n\t\tgridBagLayout.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0,\n\t\t\t\tDouble.MIN_VALUE };\n\t\tgridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,\n\t\t\t\t0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };\n\t\tsetLayout(gridBagLayout);\n\n\t\tlblArtistFirstName.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tGridBagConstraints gbc_lblArtistFirstName = new GridBagConstraints();\n\t\tgbc_lblArtistFirstName.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_lblArtistFirstName.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblArtistFirstName.gridx = 1;\n\t\tgbc_lblArtistFirstName.gridy = 1;\n\t\tadd(lblArtistFirstName, gbc_lblArtistFirstName);\n\n\t\tformattedFirstName.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tformattedFirstName.setColumns(20);\n\t\tGridBagConstraints gbc_formattedFirstName = new GridBagConstraints();\n\t\tgbc_formattedFirstName.anchor = GridBagConstraints.NORTH;\n\t\tgbc_formattedFirstName.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_formattedFirstName.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_formattedFirstName.gridx = 1;\n\t\tgbc_formattedFirstName.gridy = 2;\n\t\tadd(formattedFirstName, gbc_formattedFirstName);\n\n\t\tlblArtistLastName.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tGridBagConstraints gbc_lblArtistLastName = new GridBagConstraints();\n\t\tgbc_lblArtistLastName.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_lblArtistLastName.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblArtistLastName.gridx = 1;\n\t\tgbc_lblArtistLastName.gridy = 4;\n\t\tadd(lblArtistLastName, gbc_lblArtistLastName);\n\n\t\tformattedLastName.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tformattedLastName.setColumns(20);\n\t\tGridBagConstraints gbc_formattedLastName = new GridBagConstraints();\n\t\tgbc_formattedLastName.anchor = GridBagConstraints.NORTH;\n\t\tgbc_formattedLastName.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_formattedLastName.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_formattedLastName.gridx = 1;\n\t\tgbc_formattedLastName.gridy = 5;\n\t\tadd(formattedLastName, gbc_formattedLastName);\n\t\tlblTitleOfWork = new JLabel(\"Title Of Work (max 40 characters)\");\n\n\t\tlblTitleOfWork.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tGridBagConstraints gbc_lblTitleOfWork = new GridBagConstraints();\n\t\tgbc_lblTitleOfWork.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_lblTitleOfWork.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblTitleOfWork.gridx = 1;\n\t\tgbc_lblTitleOfWork.gridy = 7;\n\t\tadd(lblTitleOfWork, gbc_lblTitleOfWork);\n\n\t\tformattedTitleOfWork.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tformattedTitleOfWork.setColumns(40);\n\t\tGridBagConstraints gbc_formattedTitleOfWork = new GridBagConstraints();\n\t\tgbc_formattedTitleOfWork.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_formattedTitleOfWork.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_formattedTitleOfWork.gridwidth = 3;\n\t\tgbc_formattedTitleOfWork.gridx = 1;\n\t\tgbc_formattedTitleOfWork.gridy = 8;\n\t\tadd(formattedTitleOfWork, gbc_formattedTitleOfWork);\n\n\t\tbtnSearch.setMnemonic('S');\n\t\tbtnSearch.setFont(new Font(\"Cambria\", Font.BOLD, 12));\n\t\tGridBagConstraints gbc_btnSearch = new GridBagConstraints();\n\t\tgbc_btnSearch.fill = GridBagConstraints.BOTH;\n\t\tgbc_btnSearch.insets = new Insets(0, 0, 0, 5);\n\t\tgbc_btnSearch.gridx = 1;\n\t\tgbc_btnSearch.gridy = 10;\n\t\tadd(btnSearch, gbc_btnSearch);\n\n\t\tbtnCancel.setMnemonic('C');\n btnCancel.setFont(new Font(\"Cambria\", Font.BOLD, 12));\n\t\tGridBagConstraints gbc_btnCancel = new GridBagConstraints();\n\t\tgbc_btnCancel.fill = GridBagConstraints.BOTH;\n\t\tgbc_btnCancel.gridx = 3;\n\t\tgbc_btnCancel.gridy = 10;\n\t\tadd(btnCancel, gbc_btnCancel);\n\n\t}" ]
[ "0.69804263", "0.660071", "0.6595148", "0.65541035", "0.6422474", "0.63925743", "0.6384868", "0.6382851", "0.63612056", "0.63147974", "0.6271584", "0.6188412", "0.6182148", "0.6142672", "0.61342484", "0.61332583", "0.612958", "0.6097158", "0.6089252", "0.60877234", "0.6057498", "0.6043041", "0.6032271", "0.60227174", "0.60139954", "0.60005426", "0.599185", "0.5990812", "0.5990349", "0.59866464", "0.59853476", "0.59696466", "0.5967898", "0.5963035", "0.5953268", "0.5947963", "0.593291", "0.59286374", "0.59173846", "0.59125227", "0.58932006", "0.58915836", "0.5886651", "0.5882325", "0.58802074", "0.5878281", "0.58639675", "0.58637094", "0.5863038", "0.58629805", "0.5847457", "0.5838212", "0.58273906", "0.58195215", "0.5819205", "0.58188474", "0.5815608", "0.58104926", "0.58085847", "0.58075535", "0.5807225", "0.580054", "0.57832664", "0.57809657", "0.57802534", "0.5780251", "0.576984", "0.57654893", "0.5749533", "0.5723704", "0.5722706", "0.57165456", "0.5714637", "0.5708271", "0.57031727", "0.57006997", "0.56950533", "0.56938016", "0.5677606", "0.56729716", "0.565884", "0.56572896", "0.565349", "0.56526107", "0.56459516", "0.56352895", "0.5632515", "0.56254566", "0.56224966", "0.5620986", "0.5614765", "0.56144285", "0.56099933", "0.5607932", "0.5606645", "0.5605851", "0.56044155", "0.56029767", "0.55997926", "0.559165" ]
0.6751081
1
TODO Autogenerated method stub
@Override public Pagination<Voice> paginationVoice(Pagination<Voice> pagination, Map<String, String> queryMap) { Integer page = null; Integer limit = null; if (queryMap == null || (page = Integer.valueOf(queryMap.get("page"))) == null || (limit = Integer.valueOf(queryMap.get("limit"))) == null) { throw new WebServiceException(CodeMsg.SERVER_ERROR); } pagination.setPageNum(page); pagination.setPageSize(limit); Integer totalItemsCount = videoDao.getCountByQuery(queryMap); List<Voice> secondCategoryItems = videoDao.paginationVoice(queryMap, pagination); pagination.setItems(secondCategoryItems); pagination.setTotalItemsCount(totalItemsCount); return pagination; }
{ "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
para cabelos, rosto / limpeza, roupa
public Higiene(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }", "public void ganarDineroPorAutomoviles() {\n for (Persona p : super.getMundo().getListaDoctores()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaAlbaniles()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaHerreros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n }", "Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);", "public void regolaOrdineInMenu(int codRiga) {\n\n /** variabili e costanti locali di lavoro */\n Modulo moduloPiatto = null;\n Modulo moduloRighe = null;\n\n Campo campoOrdineRiga = null;\n\n int codPiatto = 0;\n int codiceMenu = 0;\n int codiceCategoria = 0;\n\n Filtro filtro = null;\n\n int ordineMassimo = 0;\n Integer nuovoOrdine = null;\n int valoreOrdine = 0;\n Integer valoreNuovo = null;\n\n Object valore = null;\n int[] chiavi = null;\n int chiave = 0;\n\n try { // prova ad eseguire il codice\n\n /* regolazione variabili di lavoro */\n moduloRighe = this.getModulo();\n moduloPiatto = this.getModuloPiatto();\n campoOrdineRiga = this.getModulo().getCampoOrdine();\n\n /* recupera il codice del piatto dalla riga */\n valore = moduloRighe.query().valoreCampo(RMP.CAMPO_PIATTO, codRiga);\n codPiatto = Libreria.objToInt(valore);\n\n /* recupera il codice del menu dalla riga */\n valore = moduloRighe.query().valoreCampo(RMP.CAMPO_MENU, codRiga);\n codiceMenu = Libreria.objToInt(valore);\n\n /* recupera il codice categoria dal piatto */\n valore = moduloPiatto.query().valoreCampo(Piatto.CAMPO_CATEGORIA, codPiatto);\n codiceCategoria = Libreria.objToInt(valore);\n\n /* crea un filtro per ottenere tutte le righe comandabili di\n * questa categoria esistenti nel menu */\n filtro = this.filtroRigheCategoriaComandabili(codiceMenu, codiceCategoria);\n\n /* aggiunge un filtro per escludere la riga corrente */\n filtro.add(this.filtroEscludiRiga(codRiga));\n\n /* determina il massimo numero d'ordine tra le righe selezionate dal filtro */\n ordineMassimo = this.getModulo().query().valoreMassimo(campoOrdineRiga, filtro);\n\n /* determina il nuovo numero d'ordine da assegnare alla riga */\n if (ordineMassimo != 0) {\n nuovoOrdine = new Integer(ordineMassimo + 1);\n } else {\n nuovoOrdine = new Integer(1);\n } /* fine del blocco if-else */\n\n /* apre un \"buco\" nella categoria spostando verso il basso di una\n * posizione tutte le righe di questa categoria che hanno un numero\n * d'ordine uguale o superiore al numero d'ordine della nuova riga\n * (sono le righe non comandabili) */\n\n /* crea un filtro per selezionare le righe non comandabili della categoria */\n filtro = filtroRigheCategoriaNonComandabili(codiceMenu, codiceCategoria);\n\n /* aggiunge un filtro per escludere la riga corrente */\n filtro.add(this.filtroEscludiRiga(codRiga));\n\n /* recupera le chiavi dei record selezionati dal filtro */\n chiavi = this.getModulo().query().valoriChiave(filtro);\n\n /* spazzola le chiavi */\n for (int k = 0; k < chiavi.length; k++) {\n chiave = chiavi[k];\n valore = this.getModulo().query().valoreCampo(campoOrdineRiga, chiave);\n valoreOrdine = Libreria.objToInt(valore);\n valoreNuovo = new Integer(valoreOrdine + 1);\n this.getModulo().query().registraRecordValore(chiave, campoOrdineRiga, valoreNuovo);\n } // fine del ciclo for\n\n /* assegna il nuovo ordine alla riga mettendola nel buco */\n this.getModulo().query().registraRecordValore(codRiga, campoOrdineRiga, nuovoOrdine);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void carroPulando() {\n\t\tpulos++;\n\t\tpulo = (int) (PULO_MAXIMO/10);\n\t\tdistanciaCorrida += pulo;\n\t\tif (distanciaCorrida > distanciaTotalCorrida) {\n\t\t\tdistanciaCorrida = distanciaTotalCorrida;\n\t\t}\n\t}", "public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}", "private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}", "private void priorizar() {\r\n if (ini == fin) {\r\n return;\r\n }\r\n\r\n int t1 = fin, t2 = fin - 1;\r\n TDAPrioridad aux = new TDAPrioridad(0, '0');\r\n while (t1 != ini) {\r\n if (datos[t1].getPrioridad() > datos[t2].getPrioridad()) {\r\n aux.setObjeto(datos[t1]);\r\n datos[t1].setObjeto(datos[t2]);\r\n datos[t2].setObjeto(aux);\r\n t2--;\r\n t1--;\r\n } else {\r\n break;\r\n }\r\n }\r\n }", "public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }", "public void rodar(){\n\t\tmeuConjuntoDePneus.rodar();\r\n\t}", "public int esquinas(){\n int v=0;\n if (fila==0 && columna==0){\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==0 && columna==15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==15 && columna==0){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if(fila==15 && columna==15){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n }\n return v;\n }", "@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}", "@Override\n public void imprimir() {\n System.out.println(\"Vehiculos ordenados por precio mayor a menor:\");\n if(a1.precio>a2.precio && a1.precio >m1.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\"\"+a2.modelo);\n if(m1.precio >m2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n System.out.println(m2.marca+\"\"+m2.modelo);\n }else{\n System.out.println(m2.marca+\"\"+m1.modelo);\n System.out.println(m1.marca+\"\"+m1.modelo);\n \n }\n }else{\n if(m1.precio >a2.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n if(a2.precio >m2.precio){\n System.out.println(a2.marca+\"\"+a2.modelo);\n System.out.println(m2.marca+\"\"+m2.modelo);\n }else{\n System.out.println(m2.marca+\"\"+m2.modelo);\n System.out.println(a2.marca+\"\"+a2.modelo);\n \n }\n }else{\n if(m2.precio >a2.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\"\"+m2.modelo);\n if(m1.precio >a2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n System.out.println(a2.marca+\"\"+a2.modelo);\n }else{\n System.out.println(a2.marca+\"\"+a2.modelo);\n System.out.println(m1.marca+\"\"+m1.modelo);\n }\n }\n }\n }\n }else{\n if(a2.precio>a1.precio && a2.precio >m1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m1.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n if(m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n \n }\n }else{\n if(m1.precio >a1.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(m2.precio >a1.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(m1.precio >a1.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }else{\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }\n }\n }\n }\n }else{\n if(m1.precio>a2.precio && m1.precio >a1.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a2.precio >a1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(a1.precio >a2.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n \n }\n }else{\n if(m2.precio >a2.precio && m2.precio >a1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(a1.precio >a2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n }else{\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }\n }\n }\n }\n }else{ \n if(m2.precio>a2.precio && m2.precio >a1.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(a2.precio >a1.precio && a2.precio >m1.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m1.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }else{\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(a1.precio >a2.precio && a1.precio >m1.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m1.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }else{\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n \n }\n }else{\n if(m1.precio >a2.precio && m1.precio >a1.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a1.precio >a2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n }else{\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }\n }\n }\n }\n } \n \n }\n\n }\n }\n }", "protected void jouerOrdinateur() {\n Random rdmPropoOrdi = new Random();\n\n for (int i = 0; i < nbrPosition; i++) {\n int min = 0;\n int max = propositionHaute[i];\n if (propositionBasse[i] != 0) {\n min = propositionBasse[i] + 1;\n }\n\n if (propositionOrdinateur[i] != combinaisonJoueur[i]) {\n int propoOrdi = min + rdmPropoOrdi.nextInt(max - min);\n propositionOrdinateur[i] = (byte) (propoOrdi);\n\n if (propositionOrdinateur[i] < combinaisonJoueur[i]) {\n propositionBasse[i] = propositionOrdinateur[i];\n } else {\n propositionHaute[i] = propositionOrdinateur[i];\n }\n }\n }\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "private void moverJogadorAPosicao(int jogador, int valorDados, boolean iguais) {\n int tentativasDeSairDaPrisao = this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao();\n //Analisando se o cara esta preso, se a prisao ta ativada e se o cara tentou um numero de vezes menos que tres\n //ou se a funcao prisao esta falsa\n //ou se o jogador nao esta preso\n if ((JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao <= 2) || this.prisao == false || (!JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && this.prisao == true)) {\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao < 2);\n {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n }\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n }\n\n //analisando se o jogador esta preso e lanca numeros diferentes nos dados\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && !iguais && this.prisao == true) {\n //analisa se estourou as tentativas\n //se estourou\n if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() == 2) {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(50);\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n\n } //se nao estourou\n else if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() < 2) {\n this.listaJogadores.get(jogadorAtual()).addTentativasSairDaPrisao();\n }\n\n\n }\n\n\n }", "public int limitesX(){\n int v=0;\n if (fila==0 && columna>0 && columna<15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if (fila==15 && columna>0 && columna<15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else{v=limitesY();}\n return v;\n }", "private void mueveObjetos()\n {\n // Mueve las naves Ufo\n for (Ufo ufo : ufos) {\n ufo.moverUfo();\n }\n \n // Cambia el movimiento de los Ufos\n if (cambiaUfos) {\n for (Ufo ufo : ufos) {\n ufo.cambiaMoverUfo();\n }\n cambiaUfos = false;\n }\n\n // Mueve los disparos y los elimina los disparos de la nave Guardian\n if (disparoGuardian.getVisible()) {\n disparoGuardian.moverArriba();\n if (disparoGuardian.getPosicionY() <= 0) {\n disparoGuardian.setVisible(false);\n }\n }\n\n // Dispara, mueve y elimina los disparos de las naves Ufo\n disparaUfo();\n if (disparoUfo.getVisible()) {\n disparoUfo.moverAbajo();\n if (disparoUfo.getPosicionY() >= altoVentana) {\n disparoUfo.setVisible(false);\n }\n }\n\n // Mueve la nave Guardian hacia la izquierda\n if (moverIzquierda) {\n guardian.moverIzquierda();\n }\n // Mueve la nave Guardian hacia la derecha\n if (moverDerecha) {\n guardian.moverDerecha();\n }\n // Hace que la nave Guardian dispare\n if (disparar) {\n disparaGuardian();\n }\n }", "private Punto getPuntoPriorizado(Punto puntoini, List<Punto> puntos ){\n\t\t\n\t\tPunto puntopriorizado = null;\n\t\t// calculamos la heuristica de distancias a los demas puntos\n\t\tfor (Punto punto : puntos) {\n\t\t\tif( (puntoini!=null && punto!=null) && !puntoini.equals(punto) ){\n\t\t\t\tdouble d = Geometria.distanciaDeCoordenadas(puntoini, punto);\n\t\t\t\tpunto.getDatos().put(\"distanci\", d);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// ordenamos por las heuristicas definidad en la clase comparator\n\t\t// hora atencion, prioridad, urgencia, distancia\n\t\tCollections.sort(puntos, new PuntoHeuristicaComparator1());\n\t\tSystem.out.println(\"### mostrando las heuristicas #####\");\n\t\tmostratPuntosHeuristica(puntos);\n\t\n\t\tif( puntos!=null && puntos.size()>0){\n\t\t\tpuntopriorizado = puntos.get(0);\n\t\t}\n\t\t\n\t\t/*Punto pa = null ;\n\t\tfor (Punto p : puntos) {\n\t\t\tif(pa!=null){\n\t\t\t\tString key = p.getDatos().toString();\n\t\t\t\tString keya = pa.getDatos().toString();\n\t\t\t\tif(!key.equals(keya)){\n\t\t\t\t\tpuntopriorizado = p;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tpa = p ;\n\t\t}*/\n\n\t\treturn puntopriorizado;\n\t}", "public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }", "public void Ordenamiento() {\n\n\t}", "public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }", "private int obstaculos() {\n\t\treturn this.quadricula.length * this.quadricula[0].length - \n\t\t\t\tthis.ardiveis();\n\t}", "public int limitesY(){\n int v=0;\n if (columna==0 && fila>0 && fila<15){\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n }\n else if (columna==15 && fila>0 && fila<15){\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n }\n else{v=esquinas();}\n return v;\n }", "public void naplnVrcholy() {\r\n System.out.println(\"Zadajte pocet vrcholov: \");\r\n pocetVrcholov = skener.nextInt();\r\n for (int i=0; i < pocetVrcholov; i++) {\r\n nekonecno = (int)(Double.POSITIVE_INFINITY);\r\n if(i==0) { //pre prvy vrchol potrebujeme nastavit vzdialenost 0 \r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu, 0, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n } else { //ostatne budu mat nekonecno alebo v tomto pripade 9999 (lebo tuto hodnotu v mensich grafoch nepresiahnem)\r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu,nekonecno, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n }\r\n }\r\n }", "private void moverJogadorDaVez(int dado1, int dado2) throws Exception {\n // System.out.println(\"moverJogadorDaVez\" + dado1 + \" , \" + dado2);\n\n print(\"\\ttirou nos dados: \" + dado1 + \" , \" + dado2);\n int valorDados = dado1 + dado2;\n\n int jogador = this.jogadorAtual();\n\n boolean ValoresIguais = false;\n\n\n //preciso saber se o jogador vai passar pela posição 40, o que significa\n //ganhar dinheiro\n this.completouVolta(jogador, valorDados);\n\n if (dado1 == dado2) {\n ValoresIguais = true;\n } else {\n ValoresIguais = false;\n }\n\n //movendo à posição\n this.moverJogadorAPosicao(jogador, valorDados, ValoresIguais);\n this.print(\"\\tAtual dinheiro antes de ver a compra:\" + this.listaJogadores.get(jogador).getDinheiro());\n this.print(\"\\tVai até a posição \" + this.posicoes[jogador]);\n\n //vendo se caiu na prisao\n if (this.posicoes[this.jogadorAtual()] == 30 && this.prisao == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n DeslocarJogador(jogador, 10);\n listaJogadores.get(jogadorAtual()).adicionarComandoPay();\n }\n\n\n\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);//busca em -1, pois eh um vetor\n\n\n if (this.isCompraAutomatica()) {\n this.realizarCompra(jogador, lugar);\n }\n\n if (!this.posicaoCompravel(this.posicoes[jogador])) {\n this.print(\"\\t\" + lugar.getNome() + \" não está à venda!\");\n\n\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n //não cobrar aluguel de si mesmo\n if (!nomeDono.equals(this.listaJogadores.get(this.jogadorAtual()).getNome())) {\n\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n if (!lugar.estaHipotecada()) {\n this.pagarFerrovia(possivelDono.getId(), jogador, 25, lugar.getNome());\n }\n } else {\n\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n int valorAluguel = 0;\n if (this.posicoes[this.jogadorAtual()] != 12 && this.posicoes[this.jogadorAtual()] != 28) {\n valorAluguel = this.tabuleiro.getLugarPrecoAluguel(this.posicoes[jogador]);\n\n } else {\n if (possivelDono.getQuantidadeCompanhias() == 1) {\n valorAluguel = 4 * valorDados;\n\n }\n if (possivelDono.getQuantidadeCompanhias() == 2) {\n valorAluguel = 10 * valorDados;\n\n }\n }\n if (!lugar.estaHipotecada()) {\n this.pagarAluguel(possivelDono.getId(), jogador, valorAluguel, lugar.getNome());\n }\n\n }\n\n }\n }\n\n }\n\n\n this.pagarEventuaisTaxas(jogador);\n\n if ((this.posicoes[this.jogadorAtual()] == 2 || this.posicoes[jogadorAtual()] == 17 || this.posicoes[jogadorAtual()] == 33) && cards == true) {\n realizaProcessamentoCartaoChest();\n }\n\n if ((this.posicoes[this.jogadorAtual()] == 7 || this.posicoes[jogadorAtual()] == 22 || this.posicoes[jogadorAtual()] == 36) && cards == true) {\n realizaProcessamentoCartaoChance();\n }\n\n\n\n\n this.print(\"\\tAtual dinheiro depois:\" + this.listaJogadores.get(jogador).getDinheiro());\n\n\n\n }", "public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }", "private boolean procesoComer(int a, int b)\n {\n ArrayList<Integer> muertes;\n muertes = animales.get(a).get(b).come();\n if (muertes.get(0) > krill) {\n krill = 0;\n return false;\n } else {\n krill -= muertes.get(0);\n }\n for (int i = 1; i < muertes.size(); i++) {\n for (int j = 0; j < muertes.get(i); j++) {\n if (animales.get(i).size() > 0) {\n animales.get(i).get(0).destruir(); //Reduce en 1 la cantidad\n animales.get(i).remove(0);\n } else {\n return false;\n }\n }\n }\n return true;\n }", "public SuperRodada(){\n this.pontos_em_disputa=0;\n this.truco=false;\n this.Desafiante=null;\n this.addPontosEmDisputa(2);\n Game game = Game.getGame();\n DonoDoBaralho=(DonoDoBaralho==null)?game.getDupla(1).getJogadorA():this.proximoAJogar(DonoDoBaralho);\n \n }", "public int orientaceGrafu(){\n\t\tint poc = 0;\n\t\tfor(int i = 0 ; i < hrana.length ; i++){\n\t\t\tif(!oriNeboNeoriHrana(hrana[i].zacatek,hrana[i].konec))\n\t\t\t poc++;\n\t\t}\n\t\tif(poc == 0 )\n\t\t\treturn 0;\n\t\t\n\t\tif(poc == pocetHr)\n\t\t\treturn 1;\n\t\t\n\t\t\n\t\t\treturn 2;\n\t\t \n\t\t\n\t\t\t\t\t\n\t}", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "@Override\n public void subida(){\n // si es mayor a la eperiencia maxima sube de lo contrario no\n if (experiencia>(100*nivel)){\n System.out.println(\"Acabas de subir de nivel\");\n nivel++;\n System.out.println(\"Nievel: \"+nivel);\n }else {\n\n }\n }", "public void buscarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setDescripcionSeccion(\"Primaria\");\n \tgrado.setNumGrado(4);\n \tgrado.setDescripcionUltimoGrado(\"NO\");\n \tString respuesta = negocio.buscarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }", "public void jugarMaquinaSola(int turno) {\n if (suspenderJuego) {\n return;\n }\n CuadroPieza cuadroActual;\n CuadroPieza cuadroDestino;\n CuadroPieza MovDestino = null;\n CuadroPieza MovActual = null;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n cuadroActual = tablero[x][y];\n if (cuadroActual.getPieza() != null) {\n if (cuadroActual.getPieza().getColor() == turno) {\n for (int x1 = 0; x1 < 8; x1++) {\n for (int y1 = 0; y1 < 8; y1++) {\n cuadroDestino = tablero[x1][y1];\n if (cuadroDestino.getPieza() != null) {\n if (cuadroActual.getPieza().validarMovimiento(cuadroDestino, this)) {\n if (MovDestino == null) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n } else {\n if (cuadroDestino.getPieza().getPeso() > MovDestino.getPieza().getPeso()) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n }\n if (cuadroDestino.getPieza().getPeso() == MovDestino.getPieza().getPeso()) {\n //Si es el mismo, elijo al azar si moverlo o no\n if (((int) (Math.random() * 3) == 1)) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n }\n }\n }\n }\n\n }\n }\n }\n }\n }\n }\n }\n if (MovActual == null) {\n boolean b = true;\n do {//Si no hay mov recomendado, entonces genero uno al azar\n int x = (int) (Math.random() * 8);\n int y = (int) (Math.random() * 8);\n tablero[x][y].getPieza();\n int x1 = (int) (Math.random() * 8);\n int y1 = (int) (Math.random() * 8);\n\n MovActual = tablero[x][y];\n MovDestino = tablero[x1][y1];\n if (MovActual.getPieza() != null) {\n if (MovActual.getPieza().getColor() == turno) {\n b = !MovActual.getPieza().validarMovimiento(MovDestino, this);\n //Si mueve la pieza, sale del while.\n }\n }\n } while (b);\n }\n if (MovActual.getPieza().MoverPieza(MovDestino, this)) {\n this.setTurno(this.getTurno() * -1);\n if (getRey(this.getTurno()).isInJacke(this)) {\n if (Pieza.isJugadorAhogado(turno, this)) {\n JOptionPane.showMessageDialog(null, \"Hacke Mate!!! - te lo dije xD\");\n if (JOptionPane.showConfirmDialog(null, \"Deseas Empezar una nueva Partida¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n } else {\n JOptionPane.showMessageDialog(null, \"Rey en Hacke - ya t kgste\");\n }\n } else {\n if (Pieza.isJugadorAhogado(turno, this)) {\n JOptionPane.showMessageDialog(null, \"Empate!!!\\nComputadora: Solo por que te ahogaste...!!!\");\n if (JOptionPane.showConfirmDialog(null, \"Deseas Empezar una nueva Partida¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n }\n if (Pieza.getCantMovimientosSinCambios() >= 50) {\n JOptionPane.showMessageDialog(null, \"Empate!!! \\nComputadora: Vaya, han pasado 50 turnos sin comernos jeje!!!\");\n if (JOptionPane.showConfirmDialog(null, \"Otra Partida Amistosa¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n }\n }\n }\n if (this.getTurno() == turnoComputadora) {\n jugarMaquinaSola(this.getTurno());\n }\n }", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "@Override\n\tvoid geraDados() {\n\n\t}", "public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}", "private void acabarJogo() {\n\t\tif (mapa.isFimDeJogo() || mapa.isGanhouJogo()) {\r\n\r\n\t\t\tthis.timer.paraRelogio();\r\n\r\n\t\t\tif (mapa.isFimDeJogo()) {//SE PERDEU\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"VOCÊ PERDEU\", \"FIM DE JOGO\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t} else {//SE GANHOU\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\r\n\t\t\t\t\t\t\"PARABÉNS \" + this.nomeJogador + \"! \" + \"TODAS AS BOMBAS FORAM ENCONTRADAS\", \"VOCÊ GANHOU\",\r\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\tiniciarRanking();//SE VENCEU MANDA O JOGADOR PRO RANKING\r\n\t\t\t}\r\n\t\t\tthis.voltarMenu();//VOLTA PRO MENU\r\n\r\n\t\t}\r\n\t}", "private Filtro getFiltroFissiGiornoConto(Date data, int codConto) {\n /* variabili e costanti locali di lavoro */\n Filtro filtro = null;\n Filtro filtroDate = null;\n Filtro filtroInizio = null;\n Filtro filtroSincro;\n Filtro filtroVuota;\n Filtro filtroIntervallo;\n Filtro filtroFine;\n Filtro filtroConto = null;\n Modulo modConto;\n Date dataVuota;\n\n try { // prova ad eseguire il codice\n\n modConto = Progetto.getModulo(Conto.NOME_MODULO);\n\n filtroDate = new Filtro();\n\n filtroInizio = FiltroFactory.crea(Cam.dataInizioValidita.get(),\n Filtro.Op.MINORE_UGUALE,\n data);\n filtroSincro = FiltroFactory.crea(Cam.dataSincro.get(), Filtro.Op.MINORE, data);\n dataVuota = Lib.Data.getVuota();\n filtroVuota = FiltroFactory.crea(Cam.dataSincro.get(), dataVuota);\n\n filtroFine = FiltroFactory.crea(Cam.dataFineValidita.get(),\n Filtro.Op.MAGGIORE_UGUALE,\n data);\n filtroIntervallo = new Filtro();\n filtroIntervallo.add(filtroSincro);\n filtroIntervallo.add(filtroFine);\n\n filtroDate.add(filtroIntervallo);\n filtroDate.add(Filtro.Op.OR, filtroVuota);\n\n /* filtro per il conto */\n filtroConto = FiltroFactory.codice(modConto, codConto);\n\n filtro = new Filtro();\n filtro.add(filtroInizio);\n filtro.add(filtroDate);\n filtro.add(filtroConto);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n /* valore di ritorno */\n return filtro;\n }", "public Roleta()\r\n {\r\n contadorJogadas = new LinkedHashMap<>(); \r\n //adiciona os valores ao mapa de resultados.\r\n valores = new ArrayList<>();\r\n valores.add(EnumResultados.PASSA_VEZ);\r\n valores.add(EnumResultados.PASSA_VEZ);\r\n valores.add(EnumResultados.PERDE_TUDO);\r\n valores.add(EnumResultados.PERDE_TUDO);\r\n valores.add(EnumResultados.PONTOS_100);\r\n valores.add(EnumResultados.PONTOS_100);\r\n valores.add(EnumResultados.PONTOS_100);\r\n valores.add(EnumResultados.PONTOS_100);\r\n valores.add(EnumResultados.PONTOS_200);\r\n valores.add(EnumResultados.PONTOS_200);\r\n valores.add(EnumResultados.PONTOS_200);\r\n valores.add(EnumResultados.PONTOS_200);\r\n valores.add(EnumResultados.PONTOS_400);\r\n valores.add(EnumResultados.PONTOS_400);\r\n valores.add(EnumResultados.PONTOS_400);\r\n valores.add(EnumResultados.PONTOS_400);\r\n valores.add(EnumResultados.PONTOS_500);\r\n valores.add(EnumResultados.PONTOS_500);\r\n valores.add(EnumResultados.PONTOS_1000);\r\n valores.add(EnumResultados.PONTOS_1000); \r\n \r\n }", "public int getFlores(int avenida, int calle);", "private void gerarLaudoPermanenciaMaior(MpmPrescricaoMedica prescricao,\r\n\t\t\tList<MpmLaudo> laudoList, FatConvenioSaudePlano convenioSaudePlano,\r\n\t\t\tAghParametros seqLaudoMaiorPermanencia) {\r\n\t\tMpmTipoLaudoConvenio tipoLaudoConvenio = this\r\n\t\t\t\t.getMpmTipoLaudoConvenioDAO()\r\n\t\t\t\t.obterTempoValidadeTipoLaudoPermanenciaMaior(\r\n\t\t\t\t\t\tseqLaudoMaiorPermanencia.getVlrNumerico().shortValue(),\r\n\t\t\t\t\t\tconvenioSaudePlano);\r\n\r\n\t\tif (tipoLaudoConvenio != null) {\r\n\r\n\t\t\tShort quantidadeDiasFaturamento = 0;\r\n\t\t\tShort diasPermanenciaMaior = 0;\r\n\r\n\t\t\tMpmTipoLaudo tipoLaudoMaiorPermanencia = this.getMpmTipoLaudoDAO()\r\n\t\t\t\t\t.obterPorChavePrimaria(\r\n\t\t\t\t\t\t\tseqLaudoMaiorPermanencia.getVlrNumerico()\r\n\t\t\t\t\t\t\t\t\t.shortValue());\r\n\r\n\t\t\tif (prescricao.getAtendimento().getInternacao() != null) {\r\n\t\t\t\tif (prescricao.getAtendimento()\r\n\t\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar() != null){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (prescricao.getAtendimento()\r\n\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t.getQuantDiasFaturamento() != null){\r\n\t\t\t\t\t\tquantidadeDiasFaturamento = prescricao.getAtendimento()\r\n\t\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t\t.getQuantDiasFaturamento();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdiasPermanenciaMaior = prescricao.getAtendimento()\r\n\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t.getDiasPermanenciaMaior();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (diasPermanenciaMaior == null || diasPermanenciaMaior > 0){\r\n\t\t\t\t\r\n\t\t\t\tInteger adicionalDias = 0;\r\n\t\t\t\tif (quantidadeDiasFaturamento != null) {\r\n\t\t\t\t\tadicionalDias = (quantidadeDiasFaturamento * 2) + 1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (DateUtil.validaDataTruncadaMaiorIgual(new Date(), DateUtil\r\n\t\t\t\t\t\t.adicionaDias(prescricao.getAtendimento().getInternacao()\r\n\t\t\t\t\t\t\t\t.getDthrInternacao(), adicionalDias))) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.getMpmLaudoDAO()\r\n\t\t\t\t\t\t\t.obterCountLaudosPorTipoEAtendimento(\r\n\t\t\t\t\t\t\t\t\tprescricao.getAtendimento(),\r\n\t\t\t\t\t\t\t\t\ttipoLaudoMaiorPermanencia) <= 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tMpmLaudo laudo = new MpmLaudo();\r\n\t\t\t\t\t\tlaudo.setDthrInicioValidade(prescricao.getAtendimento()\r\n\t\t\t\t\t\t\t\t.getInternacao().getDthrInternacao());\r\n\t\t\t\t\t\tlaudo.setContaDesdobrada(false);\r\n\t\t\t\t\t\tlaudo.setImpresso(false);\r\n\t\t\t\t\t\tlaudo.setLaudoManual(false);\r\n\t\t\t\t\t\tlaudo.setAtendimento(prescricao.getAtendimento());\r\n\t\t\t\t\t\tlaudo.setTipoLaudo(tipoLaudoMaiorPermanencia);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlaudoList.add(laudo);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "Object obtenerPolizasPorFolioSolicitudNoCancelada(int folioSolicitud,String formatoSolicitud);", "@Override\r\n\tpublic float chekearDatos(){\r\n\t\t\r\n\t\tfloat monto = 0f;\r\n\t\tfloat montoPorMes = creditoSolicitado/plazoEnMeses;\r\n\t\tdouble porcentajeDeSusIngesosMensuales = (cliente.getIngresosMensuales()*0.7);\r\n\t\t\r\n\t\tif(cliente.getIngresoAnual()>=15000f && montoPorMes<=porcentajeDeSusIngesosMensuales){\r\n\t\t\t\r\n\t\t\tmonto = this.creditoSolicitado;\r\n\t\t\tsetEstadoDeSolicitud(true);\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn monto;\r\n\t}", "public void abrirManoMaximo()\n {\n brazo.manoAbrirMaximo();\n }", "private static void cajas() {\n\t\t\n\t}", "public void statoIniziale()\n {\n int r, c;\n for (r=0; r<DIM_LATO; r++)\n for (c=0; c<DIM_LATO; c++)\n {\n if (eNera(r,c))\n {\n if (r<3) // le tre righe in alto\n contenutoCaselle[r][c] = PEDINA_NERA;\n else if (r>4) // le tre righe in basso\n contenutoCaselle[r][c] = PEDINA_BIANCA;\n else contenutoCaselle[r][c] = VUOTA; // le 2 righe centrali\n }\n else contenutoCaselle[r][c] = VUOTA; // caselle bianche\n }\n }", "public void notificaAlgiocatore(int azione, Giocatore g) {\n\r\n }", "private void balancearAgrega(Vertice<T> v){\n\tif(v == this.raiz){\n\t v.color = Color.NEGRO;\n\t return;\n\t}else if(v.padre.getColor() == Color.NEGRO){\n\t return;\n\t}\n\tVertice<T> abuelo = v.padre.padre;\n\tif(v.padre == abuelo.derecho){\n\t if(abuelo.izquierdo != null &&\n\t abuelo.izquierdo.getColor() == Color.ROJO){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.izquierdo.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tbalancearAgrega(abuelo);\n\t\treturn;\t \n\t }else if(v.padre.izquierdo == v){\n\t\tVertice<T> v2 = v.padre;\n\t\tsuper.giraDerecha(v.padre);\n\t\tbalancearAgrega(v2); \n\t }else if(v.padre.derecho == v){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tsuper.giraIzquierda(abuelo);\n\t }\n\t}else if(v.padre == abuelo.izquierdo){\n\t if(abuelo.derecho != null &&\n\t abuelo.derecho.getColor() == Color.ROJO){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.derecho.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tbalancearAgrega(abuelo);\n\t\treturn;\n\t }else if(v.padre.derecho == v){\n\t\tVertice<T> v2 = v.padre;\n\t\tsuper.giraIzquierda(v.padre);\n\t\tbalancearAgrega(v2); \n\t \n\t }else if(v.padre.izquierdo == v){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tsuper.giraDerecha(abuelo);\n\t }\n\t} \t\n\t\n }", "public void zmiana_rozmiaru_okna()\n {\n b.dostosowanie_rozmiaru(getWidth(),getHeight());\n w.dostosowanie_rozmiaru(getWidth(),getHeight());\n\n for (Pilka np : p) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Naboj np : n) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Bonus np : bon) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n\n }", "public void dividirDineroGobierno() {\n\n double dineroDividible = super.getMundo().getGobierno().getCapitalEconomico() / 2;\n double dineroPorPersona = super.getMundo().contarPersonas();\n\n if (dineroDividible > 0) {\n\n super.getMundo().gobiernoDarDinero(dineroDividible);\n\n for (Persona p : super.getMundo().getListaDoctores())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaCocineros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaAlbaniles())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaHerreros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaCocineros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaDoctores())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaCocineros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaAlbaniles())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaHerreros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaCocineros())\n p.ganarDinero(dineroPorPersona);\n }\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "public void reinicio() {\n iNumBloques = 54; // se reinicia la cantidad de bloques\n iNivel = 1; // vuelve al nivel 1\n iScore = 0; // se reinicia el score\n iVidas = 3; // se reinicia la cantidad de vidas\n // La direccion del proyectil sera para arriba\n bDireccionY = false;\n // la direccion del proyectil sera al contrario de donde iba\n bDireccionX = !bDireccionX;\n // Se reposiciona el proyectil\n objProyectil.reposiciona((objBarra.getX() + objBarra.getAncho() / 2\n - (objProyectil.getAncho() / 2)), (objBarra.getY()\n - objProyectil.getAlto()));\n // Se reincia la velocidad del proyectil\n objProyectil.setVelocidad(5);\n // Se reposiciona la barra\n objBarra.reposiciona(((getWidth() / 2)\n - (objProyectil.getAncho() / 2)), (getHeight()\n - objBarra.getAlto()));\n // se limpia la lista de bloques\n lnkBloques.clear();\n // se vuelve a llenar y se acomoda\n try {\n acomodaBloques();\n } catch (IOException ioeError) {\n System.out.println(\"Hubo un error al cargar el juego: \"\n + ioeError.toString());\n }\n }", "private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}", "public static void curar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int curador;\n //condicion de puntos de mana para ejecutar la curacion del jugador\n if(puntosDeMana>=1){\n //acciones de la funcion curar en el jugador\n aleatorio = (numeroAleatorio.nextInt(25-15+1)+15);\n curador= ((nivel+1)*5)+aleatorio;\n puntosDeVida= puntosDeVida+curador;\n puntosDeMana=puntosDeMana-1;\n }\n else{//imprimiendo el mensaje de curacion fallada\n System.out.println(\"no cuentas con Puntos De mana (MP) para curarte\");\n }\n }", "public void repartirGanancias() {\n\t\t \n\t\t System.out.println(\"JUGADORES EN GANANCIAS:\");\n\t\t for(int i = 0; i < idJugadores.length;i++) {\n\t\t\t System.out.println(\"idJugador [\"+i+\"] : \"+idJugadores[i]);\n\t\t }\n\t\t System.out.println(\"GANADORES EN GANANCIA\");\n\t\t for(int i = 0; i < ganador.size();i++) {\n\t\t\t System.out.println(\"Ganador [\"+i+\"] : \"+ganador.get(i));\n\t\t }\n\t\t if(ganador.size() >= 1) {\n\t\t\t for(int i = 0; i < idJugadores.length; i++) {\n\n\t\t\t\t if(contieneJugador(ganador, idJugadores[i])) {\n\t\t\t\t\t System.out.println(\"Entra ganador \"+idJugadores[i]);\n\t\t\t\t\t if(verificarJugadaBJ(manosJugadores.get(i))) {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado: \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],25));\n\t\t\t\t\t }else {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado --> \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],20));\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t } \n\t\t }else {\n\t\t\t System.out.println(\"no ganó nadie\");\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"null\",0));\n\t\t }\n\t }", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "public void distribuirAportes2(){\n\n if(comprobanteSeleccionado.getAporteorganismo().floatValue() > 0f){\n comprobanteSeleccionado.setAportecomitente(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo())));\n }\n }", "private void limpiarDatos() {\n\t\t\n\t}", "private void aggiornamento()\n {\n\t gestoreTasti.aggiornamento();\n\t \n\t /*Se lo stato di gioco esiste eseguiamo il suo aggiornamento.*/\n if(Stato.getStato() != null)\n {\n \t Stato.getStato().aggiornamento();\n }\n }", "public int cargarCombustible(){ //creamos metodo cargarCombustible\r\n return this.getNivel();//retornara el nivel de ese mecanico\r\n }", "private Karta kartaErabaki(ArrayList<ArrayList<Karta>> pMatrizea) \r\n\t{\r\n\t\tKarta karta = (Karta) new KartaNormala(ElementuMota.ELURRA,0,KoloreMota.BERDEA);\r\n\t\tfor(int i=0;i<pMatrizea.size();i++) \r\n\t\t{\r\n\t\t\tfor(int x=0;x<5;x++) \r\n\t\t\t{\r\n\t\t\t\tif(pMatrizea.get(i).get(0).getElementua()!=pMatrizea.get(i).get(1).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getElementua()!=this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getElementua()!=this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getBalioa()>karta.getBalioa() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getErabilgarria()) \r\n\t\t\t\t{\r\n\t\t\t\t\tkarta = lortuJolastekoKartaPosz(x);\r\n\t\t\t\t}\r\n\t\t\t\tif(pMatrizea.get(i).get(0).getElementua()==pMatrizea.get(i).get(1).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getElementua()==this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getElementua()==this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getBalioa()>karta.getBalioa() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getErabilgarria()) \r\n\t\t\t\t{\r\n\t\t\t\t\tkarta = this.lortuJolastekoKartaPosz(x);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn karta;\r\n\t}", "private void BajarPieza1posicion() {\n for (int i = 0; i < 4; ++i) {\r\n int x = posicionX + piezaActual.x(i);\r\n int y = posicionY - piezaActual.y(i);\r\n piezas[(y * anchoTablero) + x] = piezaActual.getPieza();\r\n }\r\n\r\n BorrarLineas();\r\n\r\n if (!finalizoQuitarFilas) {\r\n nuevaPieza();\r\n }\r\n }", "public logicaEnemigos(){\n\t\t//le damos una velocidad inicial al enemigo\n\t\tsuVelocidad = 50;\n\t\tsuDireccionActual = 0.0;\n\t\tposX = 500 ;\n\t\tposY = 10;\n\t}", "public figuras(int opcion) {\r\n this.opcion = opcion;\r\n // this.aleatorio = aleatorio;\r\n }", "public void faiLavoro(){\n System.out.println(\"Scrivere 1 per Consegna lunga\\nSeleziona 2 per Consegna corta\\nSeleziona 3 per Consegna normale\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n soldiTam += 500;\n puntiVita -= 40;\n puntiFame -= 40;\n puntiFelicita -= 40;\n }\n case 2 -> {\n soldiTam += 300;\n puntiVita -= 20;\n puntiFame -= 20;\n puntiFelicita -= 20;\n }\n case 3 -> {\n soldiTam += 100;\n puntiVita -= 10;\n puntiFame -= 10;\n puntiFelicita -= 10;\n }\n }\n checkStato();\n }", "private Map<String, List<PreDocumentoEntrata>> raggruppaPrimoLivelloConStatoCompleto(List<PreDocumentoEntrata> preDocumentiEntrata) {\n\t\tString methodName = \"raggruppaPrimoLivelloConStatoCompleto\";\n\t\t\n\t\tMap<String, List<PreDocumentoEntrata>> result = new HashMap<String, List<PreDocumentoEntrata>>();\n\t\t\n\t\tfor(PreDocumentoEntrata preDoc : preDocumentiEntrata) {\n\t\t\t\n\t\t\tpreDoc = getDettaglioPreDocumentoEntrata(preDoc);\n\t\t\t\n\t\t\tString key = getDocumentoKey(preDoc);\n\t\t\t\t\t\t\n\t\t\tif(!isCompleto(preDoc)) {\t\n\t\t\t\tlog.info(methodName, \"Saltato perche' non completo: \"+key);\n\t\t\t\tinserisciDettaglioOperazioneAsinc(\"SALTATO\", \" predocumento: \" + preDoc.getNumero() + \" [\"+preDoc.getUid()+\"] - \" + preDoc.getDescrizione(), Esito.FALLIMENTO, \"Non completo\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tinserisciDettaglioOperazioneAsinc(\"AGGIORNATO\", \" predocumento: \" + preDoc.getNumero() + \" [\"+preDoc.getUid()+\"] - \" + preDoc.getDescrizione(), Esito.SUCCESSO);\n\t\t\t\n\t\t\t\n\t\t\tif(!result.containsKey(key)) {\n\t\t\t\tresult.put(key, new ArrayList<PreDocumentoEntrata>());\t\t\t\t\n\t\t\t\tlog.debug(methodName, \"Nuovo gruppo di primo livello: \"+key);\n\t\t\t}\n\t\t\t\n\t\t\tList<PreDocumentoEntrata> list = result.get(key);\t\t\t\n\t\t\tlist.add(preDoc);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn result;\n\t}", "public float calcular(float dinero, float precio) {\n // Cálculo del cambio en céntimos de euros \n cambio = Math.round(100 * dinero) - Math.round(100 * precio);\n // Se inicializan las variables de cambio a cero\n cambio1 = 0;\n cambio50 = 0;\n cambio100 = 0;\n // Se guardan los valores iniciales para restaurarlos en caso de no \n // haber cambio suficiente\n int de1Inicial = de1;\n int de50Inicial = de50;\n int de100Inicial = de100;\n \n // Mientras quede cambio por devolver y monedas en la máquina \n // se va devolviendo cambio\n while(cambio > 0) {\n // Hay que devolver 1 euro o más y hay monedas de 1 euro\n if(cambio >= 100 && de100 > 0) {\n devolver100();\n // Hay que devolver 50 céntimos o más y hay monedas de 50 céntimos\n } else if(cambio >= 50 && de50 > 0) {\n devolver50();\n // Hay que devolver 1 céntimo o más y hay monedas de 1 céntimo\n } else if (de1 > 0){\n devolver1();\n // No hay monedas suficientes para devolver el cambio\n } else {\n cambio = -1;\n }\n }\n \n // Si no hay cambio suficiente no se devuelve nada por lo que se\n // restauran los valores iniciales\n if(cambio == -1) {\n de1 = de1Inicial;\n de50 = de50Inicial;\n de100 = de100Inicial;\n return -1;\n } else {\n return dinero - precio;\n }\n }", "@Override\r\n\tpublic boolean lancar(Combativel origem, Combativel alvo) {\r\n DadoVermelho dado = new DadoVermelho();\r\n int valor = dado.jogar();\r\n if(valor < origem.getInteligencia()) {\r\n alvo.defesaMagica(dano);\r\n return true;\r\n }\r\n else {\r\n \tSystem.out.println(\"Voce nao conseguiu usar a magia\");\r\n }\r\n return false;\r\n }", "public static Pot oceni_moder(Igra igra) {\n\t\tTocka[][] plosca = igra.getPlosca();\n\t\tint N = Igra.N;\n\n\t\t\n\t\tSet<Vrednost> modra_pot = new HashSet<Vrednost>();\n\t\tVrednost[][] tabela_dolzin_modri = new Vrednost[N][N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\ttabela_dolzin_modri[i][j] = new Vrednost(new Koordinati(j, i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 1. vrstica\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (plosca[i][0].polje == Polje.Moder) tabela_dolzin_modri[i][0].vrednost = 0;\n\t\t\tif (plosca[i][0].polje == Polje.PRAZNO) tabela_dolzin_modri[i][0].vrednost = 1;\n\t\t}\n\t\t\n\t\t// ostalo\n\t\tfor (int j = 1; j < N; j++) {\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\n\t\t\t\tint gor_gor_lev;\n\t\t\t\tint gor_lev;\n\t\t\t\tint dol_lev;\n\t\t\t\tint dol_dol_lev;\n\t\t\t\tint levo;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i - 1][j].polje == Polje.PRAZNO && plosca[i][j - 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tgor_gor_lev = tabela_dolzin_modri[i - 1][j - 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse gor_gor_lev = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { gor_gor_lev = POLNO; }\n\t\t\t\t\n\t\t\t\ttry { gor_lev = tabela_dolzin_modri[i][j - 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { gor_lev = POLNO; }\n\t\t\t\ttry { dol_lev = tabela_dolzin_modri[i + 1][j - 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { dol_lev = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i + 1][j - 1].polje == Polje.PRAZNO && plosca[i + 1][j].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tdol_dol_lev = tabela_dolzin_modri[i + 2][j - 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse dol_dol_lev = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { dol_dol_lev = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i + 1][j - 1].polje == Polje.PRAZNO && plosca[i][j - 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tlevo = tabela_dolzin_modri[i + 1][j - 2].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse levo = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { levo = POLNO; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tVrednost pointer = null;\n\t\t\t\tSkok skok = null;\n\t\t\t\tint vrednost_polja;\n\t\t\t\tvrednost_polja = Math.min(gor_gor_lev, Math.min(gor_lev, Math.min(dol_lev, Math.min(dol_dol_lev, levo))));\n\t\t\t\t\n\t\t\t\tif (vrednost_polja != POLNO) {\n\t\t\t\t\tif (vrednost_polja == gor_gor_lev) {\n\t\t\t\t\t\tpointer = tabela_dolzin_modri[i - 1][j - 1];\n\t\t\t\t\t\tskok = Skok.Skok1;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == gor_lev) pointer = tabela_dolzin_modri[i][j - 1];\n\t\t\t\t\tif (vrednost_polja == dol_lev) pointer = tabela_dolzin_modri[i + 1][j - 1];\n\t\t\t\t\tif (vrednost_polja == dol_dol_lev) {\n\t\t\t\t\t\tpointer = tabela_dolzin_modri[i + 2][j - 1];\n\t\t\t\t\t\tskok = Skok.Skok3;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == levo) {\n\t\t\t\t\t\tpointer = tabela_dolzin_modri[i + 1][j - 2];\n\t\t\t\t\t\tskok = Skok.Skok2;\n\t\t\t\t\t}\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja += 1;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Rdec) vrednost_polja = POLNO;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_modri[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_modri[i][j].pointer = pointer;\n\t\t\t\ttabela_dolzin_modri[i][j].skok = skok;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Ponovni pregled\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tint gor;\n\t\t\t\tint dol;\n\t\t\t\tint vrednost_polja = tabela_dolzin_modri[i][j].vrednost;\n\t\t\t\tVrednost pointer = tabela_dolzin_modri[i][j].pointer;\n\t\t\t\tSkok skok = tabela_dolzin_modri[i][j].skok;\n\t\t\t\tVrednost nov_pointer = pointer;\n\t\t\t\t\n\t\t\t\ttry { gor = tabela_dolzin_modri[i - 1][j].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { gor = POLNO; }\n\t\t\t\ttry { dol = tabela_dolzin_modri[i + 1][j].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { dol = POLNO; }\n\t\t\t\t\n\t\t\t\tif (dol != POLNO && dol < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Moder) vrednost_polja = dol;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = dol + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_modri[i + 1][j];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\tif (gor != POLNO && gor < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Moder) vrednost_polja = gor;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = gor + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_modri[i - 1][j];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_modri[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_modri[i][j].pointer = nov_pointer;\n\t\t\t\ttabela_dolzin_modri[i][j].skok = skok;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Koncna vrednost\n\t\tint najmanjsa_modra = POLNO;\n\t\tVrednost pointer_modra = null;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint vrednost = tabela_dolzin_modri[i][N - 1].vrednost;\n\t\t\tif (najmanjsa_modra > vrednost) {\n\t\t\t\tnajmanjsa_modra = vrednost;\n\t\t\t\tpointer_modra = tabela_dolzin_modri[i][N - 1];\n\t\t\t}\t\n\t\t}\n\t\t\n\t\n\t\t// Izracun poti\n\t\tVrednost spremenljivka = pointer_modra;\n\t\twhile (spremenljivka != null) {\n\t\t\tmodra_pot.add(spremenljivka);\n\t\t\tspremenljivka = spremenljivka.pointer;\n\t\t}\n\t\t\n\t\treturn new Pot(najmanjsa_modra, modra_pot);\n\t}", "private void compruebaColisiones()\n {\n // Comprobamos las colisiones con los Ufo\n for (Ufo ufo : ufos) {\n // Las naves Ufo chocan con la nave Guardian\n if (ufo.colisionaCon(guardian) && ufo.getVisible()) {\n mensajeDialogo(0);\n juego = false;\n }\n // Las naves Ufo llegan abajo de la pantalla\n if ((ufo.getPosicionY() - ufo.getAlto() > altoVentana)) {\n mensajeDialogo(0);\n juego = false;\n }\n // El disparo de la nave Guardian mata a una nave Ufo\n if (ufo.colisionaCon(disparoGuardian) && ufo.getVisible()) {\n ufo.setVisible(false);\n disparoGuardian.setVisible(false);\n disparoGuardian.setPosicion(0, 0);\n ufosMuertos++;\n }\n }\n\n // El disparo de las naves Ufo mata a la nave Guardian\n if (guardian.colisionaCon(disparoUfo)) {\n disparoUfo.setVisible(false);\n mensajeDialogo(0);\n juego = false;\n }\n\n // Si el disparo Guardian colisiona con el disparo de los Ufo, se\n // eliminan ambos\n if (disparoGuardian.colisionaCon(disparoUfo)) {\n disparoGuardian.setVisible(false);\n disparoGuardian.setPosicion(0, 0);\n disparoUfo.setVisible(false);\n }\n }", "public void controllore() {\n if (puntiVita > maxPunti) puntiVita = maxPunti;\n if (puntiFame > maxPunti) puntiFame = maxPunti;\n if (puntiFelicita > maxPunti) puntiFelicita = maxPunti;\n if (soldiTam < 1) {\n System.out.println(\"Hai finito i soldi\");\n System.exit(3);\n }\n //controlla che la creatura non sia morta, se lo è mette sonoVivo a false\n if (puntiVita <= minPunti && puntiFame <= minPunti && puntiFelicita <= minPunti) sonoVivo = false;\n }", "@Override\n\tpublic void emprestimo(Livros livro, Aluno usuario) {\n\t\t\n\t}", "private Pares(){\n\t\t\tprimero=null;\n\t\t\tsegundo=null;\n\t\t\tdistancia=0;\n\t\t}", "@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }", "public void inicialAleatorio() {\n //aqui adiciona naquele vetor que de auxilio\n alocacao.add(Estados.ELETRICISTAS);\n alocacao.add(Estados.ELETRICISTAS2);\n alocacao.add(Estados.QUALIDADE);\n alocacao.add(Estados.QUALIDADE2);\n alocacao.add(Estados.FABRICACAO_ESTRUTURAL);\n alocacao.add(Estados.FABRICACAO_ESTRUTURAL2);\n alocacao.add(Estados.FABRICACAO_ESTRUTURAL3);\n alocacao.add(Estados.PLANEJAMENTO);\n\n //biblioteca que sorteia aleatoriamente os departamentos\n Collections.shuffle(alocacao);\n\n for (int i = 0; i < 4; i++) {\n matrix[1][i] = alocacao.get(i);\n\n }\n\n for (int i = 0; i < 4; i++) {\n matrix[3][i] = alocacao.get(i + 4);\n }\n\n }", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "public void avvia() {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n getModuloRisultati().avvia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n super.avvia();\n\n }", "private void posicionePosicoes() {\n\t\tGroupLayout gl = new GroupLayout(this);\n\n\t\tgl.setAutoCreateContainerGaps(true);\n\t\tgl.setAutoCreateGaps(true);\n\n\t\tsetLayout(gl);\n\n\t\t// Horizontal\n\t\t{\n\t\t\tSequentialGroup sgDados = gl.createSequentialGroup();\n\t\t\tSequentialGroup sgProgresso = gl.createSequentialGroup();\n\n\t\t\tParallelGroup pg = gl.createParallelGroup(Alignment.LEADING);\n\n\t\t\tsgDados.addComponent(lQntDados).addComponent(tfQntDados)\n\t\t\t\t\t.addComponent(btCadastrar).addComponent(barraProgresso);\n\t\t\tsgProgresso.addComponent(lresultado).addComponent(tfResultado);\n\t\t\tpg.addGroup(sgDados).addGroup(sgProgresso);\n\t\t\tgl.setHorizontalGroup(pg);\n\n\t\t}\n\n\t\t// Vertical\n\t\t{\n\t\t\tParallelGroup pgDados = gl.createParallelGroup(Alignment.CENTER);\n\t\t\tParallelGroup pgResultado = gl\n\t\t\t\t\t.createParallelGroup(Alignment.LEADING);\n\n\t\t\tSequentialGroup sg = gl.createSequentialGroup();\n\n\t\t\tpgDados.addComponent(lQntDados).addComponent(tfQntDados)\n\t\t\t\t\t.addComponent(btCadastrar).addComponent(barraProgresso);\n\t\t\tpgResultado.addComponent(lresultado).addComponent(tfResultado);\n\n\t\t\tsg.addGroup(pgDados).addGroup(pgResultado);\n\n\t\t\tgl.setVerticalGroup(sg);\n\n\t\t}\n\n\t}", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "private void esvaziaMensageiro() {\n\t\tMensageiro.arquivo=null;\n\t\tMensageiro.lingua = linguas.indexOf(lingua);\n\t\tMensageiro.linguas=linguas;\n\t\tMensageiro.nomeArquivo=null;\n\t}", "private void aggiornaContiFiglioRicorsivamente(Conto contoPadre) {\n\t\tString methodName = \"aggiornaContiFiglioRicorsivamente\";\n\t\tcontoPadre.setDataInizioValiditaFiltro(this.conto.getDataInizioValidita());\n\t\t\n\t\tListaPaginata<Conto> contiFiglio = contoDad.ricercaSinteticaContoFigli(contoPadre, new ParametriPaginazione(0,Integer.MAX_VALUE));\n\t\tfor (Conto contoFiglio : contiFiglio) {\n\t\t\t\n\t\t\t//TODO aggiungere qui tutti i parametri da ribaltare sui conti figli.\n\t\t\tcontoFiglio.setAttivo(contoPadre.getAttivo()); //in analisi c'è solo questo parametro!\n\t\t\t\n\t\t\tif(isContoDiLivelloDiLegge()) {\n\t\t\t\tlog.debug(methodName, \"Conto di livello di legge: aggiorno tutti i campi del figlio \" + contoFiglio.getCodice());\n\t\t\t\t\n\t\t\t\t//TODO controllare eventuali altri parametri da ribaltare ai conti figlio.\n\t\t\t\tcontoFiglio.setElementoPianoDeiConti(contoPadre.getElementoPianoDeiConti());\n\t\t\t\tcontoFiglio.setCategoriaCespiti(contoPadre.getCategoriaCespiti());\n\t\t\t\tcontoFiglio.setTipoConto(contoPadre.getTipoConto());\n\t\t\t\tcontoFiglio.setTipoLegame(contoPadre.getTipoLegame());\n\t\t\t\tcontoFiglio.setContoAPartite(contoPadre.getContoAPartite());\n\t\t\t\tcontoFiglio.setContoDiLegge(contoPadre.getContoDiLegge());\n\t\t\t\tcontoFiglio.setCodiceBilancio(contoPadre.getCodiceBilancio());\n\t\t\t\tcontoFiglio.setContoCollegato(contoPadre.getContoCollegato());\n\t\t\t} else {\n\t\t\t\tlog.debug(methodName, \"Conto NON di livello di legge: aggiorno solo il flag Attivo del figlio \" + contoFiglio.getCodice());\n\t\t\t}\n\t\t\t\n\t\t\tcontoDad.aggiornaConto(contoFiglio);\n\t\t\tlog.debug(methodName, \"Aggiornato conto figlio: \"+ contoFiglio.getCodice());\n\t\t\taggiornaContiFiglioRicorsivamente(contoFiglio);\n\t\t}\n\t}", "public static void miedo(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n aleatorio = (numeroAleatorio.nextInt(10-5+1)+5);\n \n if(oro>aleatorio){//condicion de finalizar battalla y sus acciones\n oroPerdido= (nivel*2)+aleatorio;\n oro= oro-oroPerdido;\n System.out.println(\"Huiste de la batalla!!!\");\n\t\t System.out.println(\"oro perdido:\"+oroPerdido);\n opcionMiedo=1; //finalizando battalla por huida del jugador \n }\n else{\n System.out.println(\"No pudes huir de la batalla\");\n } \n }", "private CapitoloUscitaGestione ricercaCapitoloUscitaGestione() {\n\t\tRicercaPuntualeCapitoloUGest ricercaPuntualeCapitoloUGest = new RicercaPuntualeCapitoloUGest();\n\t\tricercaPuntualeCapitoloUGest.setAnnoEsercizio(req.getCapitoloUPrev().getAnnoCapitolo());\n\t\tricercaPuntualeCapitoloUGest.setAnnoCapitolo(req.getCapitoloUPrev().getAnnoCapitolo());\n\t\tricercaPuntualeCapitoloUGest.setNumeroCapitolo(req.getCapitoloUPrev().getNumeroCapitolo());\n\t\tricercaPuntualeCapitoloUGest.setNumeroArticolo(req.getCapitoloUPrev().getNumeroArticolo());\n\t\tricercaPuntualeCapitoloUGest.setNumeroUEB(req.getCapitoloUPrev().getNumeroUEB());\n\t\tricercaPuntualeCapitoloUGest.setStatoOperativoElementoDiBilancio(req.getCapitoloUPrev().getStatoOperativoElementoDiBilancio());\n\n\t\tRicercaPuntualeCapitoloUscitaGestione ricercaPuntualeCapitoloUscitaGestione = new RicercaPuntualeCapitoloUscitaGestione();\n\t\tricercaPuntualeCapitoloUscitaGestione.setEnte(req.getEnte());\n\t\tricercaPuntualeCapitoloUscitaGestione.setRichiedente(req.getRichiedente());\n\t\tricercaPuntualeCapitoloUscitaGestione.setRicercaPuntualeCapitoloUGest(ricercaPuntualeCapitoloUGest);\n\t\tricercaPuntualeCapitoloUscitaGestione.setDataOra(new Date());\n\t\t\t\t\t\n\t\tRicercaPuntualeCapitoloUscitaGestioneResponse ricercaPuntualeCapitoloUscitaGestioneResponse = executeExternalService(ricercaPuntualeCapitoloUscitaGestioneService,ricercaPuntualeCapitoloUscitaGestione);\n\t\treturn ricercaPuntualeCapitoloUscitaGestioneResponse.getCapitoloUscitaGestione();\n\t}", "private void BajarPiezaRapido() {\n if (!Mover(piezaActual, posicionX, posicionY - 1)) {\r\n BajarPieza1posicion();\r\n }\r\n }", "public void sueldo(){\n if(horas <= 40){\n sueldo = horas * cuota;\n }else {\n if (horas <= 50) {\n sueldo = (40 * cuota) + ((horas - 40) * (cuota * 2));\n } else {\n sueldo = ((40 * cuota) + (10 * cuota * 2)) + ((horas - 50) + (cuota * 3));\n }\n }\n\n }", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "private void comerFantasma(Fantasma fantasma) {\n // TODO implement here\n }", "public void MieiOrdini()\r\n {\r\n getOrdini();\r\n\r\n }", "private void actualizaEstadoMapa() {\n if(cambiosFondo >= 0 && cambiosFondo < 10){\n estadoMapa= EstadoMapa.RURAL;\n }\n if(cambiosFondo == 10){\n estadoMapa= EstadoMapa.RURALURBANO;\n }\n if(cambiosFondo > 10 && cambiosFondo < 15){\n estadoMapa= EstadoMapa.URBANO;\n }\n if(cambiosFondo == 15 ){\n estadoMapa= EstadoMapa.URBANOUNIVERSIDAD;\n }\n if(cambiosFondo > 15 && cambiosFondo < 20){\n estadoMapa= EstadoMapa.UNIVERSIDAD;\n }\n if(cambiosFondo == 20){\n estadoMapa= EstadoMapa.UNIVERSIDADSALONES;\n }\n if(cambiosFondo > 20 && cambiosFondo < 25){\n estadoMapa= EstadoMapa.SALONES;\n }\n\n }", "public Maquina() {\n savia = 0;\n reflejosLagrimas = 0;\n estado = false;\n }", "public static void main(String[] args) { \n /* Grafo grafo = new Grafo();\n \n No no;\n no = new No(\"1\");//0\n grafo.addNo(no);\n no = new No(\"2\");//1\n grafo.addNo(no);\n no = new No(\"3\");//2\n grafo.addNo(no);\n no = new No(\"4\");//3\n grafo.addNo(no);\n no = new No(\"5\");//4\n grafo.addNo(no);\n no = new No(\"6\");//5\n grafo.addNo(no);\n no = new No(\"7\");//6\n grafo.addNo(no);\n \n //Cria as arestas do nó\n \n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(1), 2);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(2), 5);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(3), 4);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(2), 2);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(4), 7);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(3), 1);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(4), 4);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(5), 3);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(5), 4);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(5), 1);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(6), 5);\n Aresta.inserirAresta(grafo.getNo(5), grafo.getNo(6), 7);\n \n No no;\n no = new No(\"SF\");//0\n grafo.addNo(no);\n no = new No(\"LA\");//1\n grafo.addNo(no);\n no = new No(\"D\");//2\n grafo.addNo(no);\n no = new No(\"C\");//3\n grafo.addNo(no);\n no = new No(\"A\");//4\n grafo.addNo(no);\n no = new No(\"B\");//5\n grafo.addNo(no);\n no = new No(\"NY\");//6\n grafo.addNo(no);\n no = new No(\"M\");//7\n grafo.addNo(no);\n \n \n //Cria as arestas do nó\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(1), 39);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(2), 89);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(3), 120);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(6), 210);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(2), 50);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(6), 170);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(3), 65);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(5), 79);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(6), 59);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(4), 99);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(6), 80);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(7), 70);\n Aresta.inserirAresta(grafo.getNo(5), grafo.getNo(6), 20);\n Aresta.inserirAresta(grafo.getNo(6), grafo.getNo(7), 66);*/\n \n Grafo grafo = GrafoAleatorioKruskal.gerar(1000, 10, 10, 100);\n //Gera a arvore geradora com custo minimo\n grafo.kruskal();\n \n //TESTE\n int teste = grafo.getNo(0).getConjunto();\n boolean answer = true;\n for(No n : grafo.getNos()){\n if (teste!= n.getConjunto()){\n answer = false;\n }\n }\n if(answer){\n System.out.println(\"Todos os nós pertecem ao mesmo conjunto\");\n }\n else{\n System.out.println(\"Deu erro\");\n }\n }", "public void restarPunto ( ) {\n\t\tif ( vida > 0 )\n\t\t\tvida--;\n\t}", "public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }", "public void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }", "public int vecinos(){\n int v=0;\n if(fila<15 && columna<15 && fila>0 && columna>0){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;} \n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n }\n else{v=limitesX();}\n return v;\n }", "private static void ordenamientoMezclaNatural(Comparable[] a, int primero, int ultimo) {\r\n\t\tint i = primero;\r\n\t\tint j = 0;\r\n\t\tint medio = 0;\r\n\t\tint az = 0;\r\n\t\twhile(true) {\r\n\t\t\ti = 0;\r\n\t\t\twhile(i < a.length) {\r\n\t\t\t\tif( i == a.length - 1) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}else if(a[i].compareTo(a[i + 1]) > 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tj ++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//medio = primero + ( j - primero) / 2;\r\n\t\t\t\r\n\t\t\tMezcla(a, primero, i, j);\r\n\t\t\tprimero = 0;\r\n\t\t\t\r\n\t\t\tif(estaOrdenado(a)) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n int numeros[] = {2, 3, 4, 2, 4, 5, 6, 2, 1, 2};\n //Creamos segundo arreglo con iguall tamaño que el arreglo nùmeros\n int cuadrados[] = new int[numeros.length];\n //Arreglo para almacenar el proceso de la operación\n String procesos[] = new String[numeros.length];\n //Creamos ciclo de repeticiòn para recorrer arreglo \n for (int indice = 0; indice < numeros.length; indice++) {\n int cuadrado = numeros[indice] * numeros[indice];\n //Almacenamos el proceso de la opreaciòn en el arreglo cuadrados\n cuadrados[indice] = cuadrado;\n \n //Almacenar resultado en el arreglo procesos\n procesos[indice] = numeros[indice] + \"x\" + numeros[indice];\n }\n //Ciclo de repetición para mostrar arreglos\n String print_numeros = \"numeros - \";\n String print_cuadrados = \"cuadrados - \";\n String print_procesos = \"procesoss - \";\n for (int indice = 0; indice < numeros.length; indice++) {\n print_numeros = print_numeros + numeros[indice] + \", \";\n print_cuadrados = print_cuadrados + cuadrados[indice] + \", \";\n print_procesos = print_procesos + procesos[indice] + \", \";\n\n }\n System.out.println(print_numeros);\n System.out.println(print_cuadrados);\n System.out.println(print_procesos);\n \n //suma solo numeros pares\n int acumulador_pares=0;\n for (int indice = 0; indice < 10; indice++) {\n boolean par= detectar_par(numeros[indice]);\n if (par == true) {\n acumulador_pares = acumulador_pares + numeros[indice];\n \n }\n }\n System.out.println(\"La suma de los nùmeros pares es: \"+acumulador_pares);\n \n }", "public void pagarFerrovia(int credor, int devedor, int valor, String NomePopriedade) {\n\n Jogador JogadorDevedor = listaJogadores.get(devedor);\n Jogador JogadorCredor = listaJogadores.get(credor);\n if ((NomePopriedade.equals(\"Reading Railroad\")) ||\n (NomePopriedade.equals(\"Pennsylvania Railroad\")) ||\n (NomePopriedade.equals(\"B & O Railroad\")) ||\n (NomePopriedade.equals(\"Short Line Railroad\"))) {\n int quantidadeFerrovias = DonosFerrovias[credor];\n int divida = quantidadeFerrovias * valor;\n this.print(\"Credor tem \" + quantidadeFerrovias);\n this.print(\"Divida eh \" + divida);\n\n if (listaJogadores.get(devedor).getDinheiro() >= divida) {\n JogadorDevedor.retirarDinheiro(divida);\n JogadorCredor.addDinheiro(divida);\n this.print(\"aqui\");\n\n } else {\n int DinheiroRestante = listaJogadores.get(devedor).getDinheiro();\n JogadorDevedor.retirarDinheiro(DinheiroRestante);\n\n if(bankruptcy);\n\n else\n JogadorCredor.addDinheiro(DinheiroRestante);\n this.removePlayer(devedor);\n\n }\n\n }\n }", "@Override\n\tpublic int sacameVida(ElementoPiedra a) {\n\t\treturn 20;\n\t}" ]
[ "0.6662851", "0.66220176", "0.6581393", "0.653332", "0.65086466", "0.6393735", "0.6350451", "0.6344382", "0.6316932", "0.6295141", "0.6247335", "0.6246869", "0.624637", "0.623254", "0.6224603", "0.6219886", "0.6202931", "0.61913776", "0.6174807", "0.6173472", "0.61658067", "0.61618894", "0.6133108", "0.61124057", "0.6110035", "0.6102289", "0.60998076", "0.6089331", "0.6081477", "0.60813093", "0.6075235", "0.60674614", "0.6051026", "0.6050433", "0.6049196", "0.60487235", "0.6037888", "0.6037834", "0.60366774", "0.60314053", "0.60300136", "0.6027087", "0.6025553", "0.60250443", "0.60235745", "0.6015466", "0.6013038", "0.6005278", "0.6004741", "0.600345", "0.5992964", "0.5992068", "0.5990656", "0.59852797", "0.59803176", "0.59723705", "0.59684515", "0.5968067", "0.5965724", "0.59651816", "0.596457", "0.5963703", "0.59618926", "0.59610915", "0.5957772", "0.5956808", "0.5956055", "0.5955633", "0.5952696", "0.59519297", "0.5948408", "0.59463465", "0.59425443", "0.5941768", "0.59359527", "0.5931188", "0.5929639", "0.5929624", "0.5929473", "0.5925791", "0.5922323", "0.59217644", "0.5918249", "0.59127", "0.59088176", "0.5891052", "0.58896965", "0.5884292", "0.58840716", "0.5883176", "0.5883106", "0.58803767", "0.58782905", "0.5875172", "0.58750206", "0.58746123", "0.5873022", "0.586812", "0.5865895", "0.5865013", "0.58618075" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { String phoneN = "010351111234"; MiniPhone smp = new MiniPhone(phoneN); smp.sebdSNS(); smp.receiveSMS(); }
{ "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
Metodo para la barra principal del programa y la ventana interna
public void barraprincipal(){ setJMenuBar(barra); //Menu archivo archivo.add("Salir del Programa").addActionListener(this); barra.add(archivo); //Menu tareas tareas.add("Registros Diarios").addActionListener(this); tareas.addSeparator(); tareas.add("Ver Catalogo de Cuentas").addActionListener(this); tareas.addSeparator(); tareas.add("Empleados").addActionListener(this); tareas.addSeparator(); tareas.add("Productos").addActionListener(this); tareas.addSeparator(); tareas.add("Generacion de Estados Financieros").addActionListener(this); barra.add(tareas); //Menu Ayuda ayuda.add("Acerca de...").addActionListener(this); ayuda.addSeparator(); barra.add(ayuda); //Para ventana interna acciones.addItem("Registros Diarios"); acciones.addItem("Ver Catalogo de Cuentas"); acciones.addItem("Empleados"); acciones.addItem("Productos"); acciones.addItem("Generacion de Estados Financieros"); aceptar.addActionListener(this); salir.addActionListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JanelaPrincipal() {\r\n\r\n\t\tsetTitle(\"Trabalho de Sistemas Operacionais I\");\r\n\t\tsetSize(tamanhoPrograma);\r\n\t\tsetResizable(false);\r\n\t\taddWindowListener(this);\r\n\t\tsetLocation((screenSize.width - ProgramaLargura) / 2,\r\n\t\t\t\t(screenSize.height - ProgramaAltura) / 2);\r\n\t}", "public static void main(String[] args) {\n \r\n ventanaPrincipal ventana = new ventanaPrincipal();\r\n ventana.setTitle(\"DemoTallerDeProgramacion\");\r\n \r\n\t\t\t\t\r\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\r\n\t\tif ((screenSize.getWidth() < 1024 || screenSize.getWidth() > 2770)\r\n\t\t\t\t|| (screenSize.getHeight() < 720\r\n\t\t\t\t\t\t|| screenSize.getHeight() > 1600))\r\n\t\t\tJOptionPane.showMessageDialog(ventana,\r\n\t\t\t\t\t\"Resolution [\" + Math.round(screenSize.getWidth()) + \"x\"\r\n\t\t\t\t\t\t\t+ Math.round(screenSize.getHeight())\r\n\t\t\t\t\t\t\t+ \"] No Soportado!\\r\\n\"\r\n\t\t\t\t\t\t\t+ \"Requires [720x720] to [720x720].\",\r\n\t\t\t\t\t\"Resolucion Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\telse {\r\n\t\t\t//ventana.setUndecorated(true);\r\n\t\t\tventana.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\tventana.setExtendedState(ventanaPrincipal.MAXIMIZED_BOTH); //JFrame\r\n\t\t\t//ventana.getContentPane().setBackground(new Color(0, 0, 0)); fonfo negro\r\n\t\t\tventana.setVisible(true);\r\n\t\t\t//ventanaPrincipal view = new ventanaPrincipal();//frame, screenSize);\r\n\t\t\t//ventana.getContentPane().add(view);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public static void main(String[] args) {// mais é o Start Point da aplicação\n\t// estou na classe e dentro do metodo\n\tSystem.out.print(\"Olá mundo\");\n\t\n}", "public static void main(String args []){\n Vista miVista=new Vista();\n ListaEstudiantes miListaEstudiantes=new ListaEstudiantes();\n Grupo miGrupo=new Grupo();\n Controlador miControlador=new Controlador(miVista,miListaEstudiantes,miGrupo);\n miControlador.iniciar();\n\n }", "public static void main(String[] args) {\n\t\tVeturi veturi = Veturi.getInstance();\n\t\t\n\t\tveturi.junanPituus();\n\t\tveturi.lisaaVaunu(\"matkustajia\");\n\t\tveturi.lisaaVaunu(\"puuta\");\n\t\tveturi.junanPituus();\n\t\tveturi.junanSisalto();\n\t\t\n\t\tSystem.out.print(\"\\nuudelleen kutsuttuna getInstance() palauttaa saman veturin joka oli jo käytössä\");\n\t\tVeturi veturi2 = Veturi.getInstance();\n\t\tSystem.out.println(\"\");\n\t\tveturi2.junanSisalto();\n\t\t\n\t\tveturi.poistaVaunu(0);\t\n\t\tveturi2.junanSisalto();\n\t}", "public VentanaPrincipal() {\n\t\tinitComponents();\n\t\tthis.setLocationRelativeTo(this);\n\t\ttry {\n\t\t\tcontroladorCliente = new ControladorVentanaCliente();\n\t\t\tcargarFranquicia();\n\t\t\tcargarTipoTransacion();\n\t\t\ttipoCompra();\n\t\t} catch (NamingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public ProgramWilmaa()\n\t{\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tcoche nissan = new coche();//se pone coche para instanciar constructor es el coche\n\t\t\n\t\t\n\t\tSystem.out.println(nissan.dime_largo());\n\t\t\n\t\t\n\t\t//MODULArizaACION ES DIVIDIR LOS PROGRAMAS EN JAVA \n\t\t\n\t\t//ENCAPSULACION es poner private\n\t\t\n\t\t//aqui se coloca para que impprima metdodo geters y seters\n\t\tnissan.establece_color();\n\t\tSystem.out.println(nissan.dime_color());\n\t\t\n\t}", "public static void main(String[] arhg) {\n\n Conta p1 = new Conta();\n p1.setNumConta(1515);\n p1.abrirConta(\"cp\");\n p1.setDono(\"wesley\");\n p1.deposita(500);\n // p1.saca(700); -> irá gera um erro pois o valor de saque especificado é superior ao valor que tem na conta\n\n p1.estadoAtual();\n }", "public static void main(String[] args) {\nBasePotencia pot=new BasePotencia();\r\npot.calculaPot();\r\n\t}", "public static void main(String[] args) {\n\t\tCarroAlugavel carroAlugavel = new CarroAlugavel();\n\t\tCarro carroAlugado = carroAlugavel.getCarroDisponivel();\n\t\tSystem.out.println(\"Usando o carro por um mês\");\n\t\tcarroAlugavel.devolverCarro(carroAlugado);\n\n\t}", "public Ventana(){\r\n\t\t\r\n\t\tsuper.setTitle(\"Operaciones\");\r\n\t\tsuper.setSize(320, 480);\r\n\t\tsuper.setDefaultCloseOperation(EXIT_ON_CLOSE); //para el botón de cerrar\r\n\t\tcargarControles();\r\n\t}", "public static void main(String[] args) {\n\t\tCampoContraseņa ventana = new CampoContraseņa();\n\t\tventana.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tventana.setVisible(true);\n\t\t\n\n\t}", "public static void main(String[] args) {\r\n\t\tjava.awt.EventQueue.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t VentanaPrincipal = new CInterfazGrafica();\r\n\t\t\t\tVentanaPrincipal.setVisible(true);\r\n\t\t //ColaEntrada Cola1 = new ColaEntrada();\r\n\t\t //ColaSalida Cola2 = new ColaSalida(); \t\r\n\t\t //InterfazHWVer3 Maurix = new InterfazHWVer3(Cola1, Cola2, VentanaPrincipal);\r\n\t\t\t}\r\n\t });\r\n\t}", "public static void main (String args []) {\n\t\t Automovel a = new Automovel ( \"Edurdo\",\"Palio\", \"JWO2125\", \n 2002);\n\t\t //troca de mensagens (chamada ao metodo imprimir())\n\t\t //a.getAno();\n\t\t a.imprimirInfo();\n\t\t System.out.println (\"***Transferencia de Proprietario***\");\n\t\t a.setNomeProprietario(\"Rosa\");\n\t\t a.imprimirInfo();\n\t\t Automovel b = new Automovel (\"Rodrigo\", \"Parati\", \n\t\t \"JSX6481\", 1999);\n\t\t b.imprimirInfo();\n\t\t System.out.println (\"***Mudanca de Placa***\");\n\t\t b.setPlaca(\"SDK2581\");\n\t\t b.imprimirInfo();\n\t\t }", "public static void main(String args[]){\n ControlAcceso controlador = new ControlAcceso();\n\n //se asignan los comportamientos\n controlador.asignarComportamientoAcceso(new AccesoPassword());\n\n controlador.asignarComportamientoCifrado(new CifradoNormal());\n\n controlador.acceder();\n controlador.cifrar(\"texto\");\n\n //de forma dinamica cmbio el comportamiento\n controlador.asignarComportamientoCifrado(new CifradoNulo());\n controlador.cifrar(\"djad\");\n }", "public static void main(String[] args) {\n\t\tnew Ventana();\n/*\n\t\tCollection<MuroDeEnergia> muros = new ArrayList<MuroDeEnergia>();\n\t\tCollection<NaveInvasora> naves = new ArrayList<NaveInvasora>();\n\t\tBateria jugador = new Bateria();\n\t\t\n\t\tJuego.getInstancia();\n\t\tmuros = Juego.getInstancia().getMuros();\n\t\tnaves = Juego.getInstancia().getEnemigos();\n\t\tjugador = Juego.getInstancia().getJugador();\n\t\t\n\t\tIterator<MuroDeEnergia> i;\n\t\tfor (i = muros.iterator(); i.hasNext();) {\n\t\t\tMuroDeEnergia act = i.next();\n\t\t\tSystem.out.println(\"El muro \" + act.getCodigoMuro() + \" esta ubicado en: (\" + act.getCoordenadaX() + \", \" + act.getCoordenadaY() + \")\");\n\t\t}\n\t\t\n\t\tIterator<NaveInvasora> j;\n\t\tfor (j = naves.iterator(); j.hasNext();) {\n\t\t\tNaveInvasora act = j.next();\n\t\t\tSystem.out.println(\"El enemigo \" + act.getCodigoNave() + \" esta ubicado en: (\" + act.getCoordenadaX() + \", \" + act.getCoordenadaY() + \")\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\"El jugador esta ubicado en (\" + jugador.getCoordenadaX() + \", \" + jugador.getCoordenadaY() + \")\" );\n\n\t\tSystem.out.println(\"Hay \" + muros.size() + \" muros de energia.\");\n\t\tJuego.getInstancia().destruirMuro(1);\n\t\tSystem.out.println(\"El muro 1 fue destruido.\");\n\t\tmuros = Juego.getInstancia().getMuros();\n\t\tSystem.out.println(\"Hay \" + muros.size() + \" muros de energia.\");\n\t\t\n\t\tSystem.out.println(\"Hay \" + naves.size() + \" enemigos. El jugador tiene \" + jugador.getPuntos() + \" puntos.\");\n\t\tJuego.getInstancia().destruirNave(9);\n\t\tSystem.out.println(\"La nave 9 fue destruida.\");\n\t\tnaves = Juego.getInstancia().getEnemigos();\n\t\tSystem.out.println(\"Hay \" + naves.size() + \" enemigos. El jugador tiene \" + jugador.getPuntos() + \" puntos.\");\n\t\tSystem.out.println(\"Usted esta en el nivel \" + Juego.getInstancia().getDificultad());\n\t\tSystem.out.println(\"Destruyendo naves...\");\n\t\tint idNave = 0;\n\t\twhile(idNave < 15) {\n\n\t\t\tJuego.getInstancia().destruirNave(idNave);\n\n\t\t\tidNave++;\n\n\t\t}\n\t\tSystem.out.println(\"Todas las naves fueron destruidas. Usted esta en el nivel \" + Juego.getInstancia().getDificultad() + \".\");\n\n\t\tSystem.out.println(\"El jugador esta ubicado en (\" + jugador.getCoordenadaX() + \", \" + jugador.getCoordenadaY() + \")\" );\n\t\t\n\t\tSystem.out.println(\"El jugador se mueve a la izquierda\");\n\t\tJuego.getInstancia().presionaFlechaIzq();\n\t\tSystem.out.println(\"El jugador esta ubicado en (\" + jugador.getCoordenadaX() + \", \" + jugador.getCoordenadaY() + \")\" );\n\t\t\n\t\tSystem.out.println(\"El jugador se mueve a la izquierda\");\n\t\tJuego.getInstancia().presionaFlechaIzq();\n\t\tSystem.out.println(\"El jugador esta ubicado en (\" + jugador.getCoordenadaX() + \", \" + jugador.getCoordenadaY() + \")\" );\n\n\t\tSystem.out.println(\"El jugador se mueve a la derecha\");\n\t\tJuego.getInstancia().presionaFlechaDer();\n\t\tSystem.out.println(\"El jugador esta ubicado en (\" + jugador.getCoordenadaX() + \", \" + jugador.getCoordenadaY() + \")\" );\n\n\t\tSystem.out.println(\"Se termina el juego:\");\n\t\tJuego.getInstancia().finalizarJuego();\n\t\t\n*/\n\t}", "public static void main(String[] args) {\n\t\tAula05Encapsulamento garrafa = new Aula05Encapsulamento();\n\t\tgarrafa.setCapacidade(1000);\n\t\tgarrafa.setTipomaterial(\"Vidro\");\n\t\tgarrafa.mostrarConteudo();\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Hola Mundo\");\n\t\t\n\t\t//--------------------------------------------------\n\t\t\n\t\t// Tipos de datos primitivos inician con minúscula\n\t\t\n\t\t// Enteros\n\t\tbyte edad = 24; // Tamaño: -128 a 127\n\t\tshort año = 20020;\n\t\tint idUsuario = 1847590;\n\t\tlong idAmazon = 109399029304012092L; // L es necesario al final, para identificarlo como long\n\t\t\n\t\t// Floante (Decimal)\n\t\tfloat radio = 35.63F; //F es necesario al final, para identificarlo como float\n\t\tdouble precio_acumulado = 34542342.546404935945034; // Se usa para datos con mayor precisión\n\t\t\n\t\t// Char (Un solo caracter)\n\t\tchar genero = 'M';\n\t\t\n\t\t// Lógico (Booleano)\n\t\tboolean visible = false;\n\t\tboolean funciona = true;\n\t\t\n\t\t// Constantes siempre en Mayúsculas\n\t\tint INICIA = 1;\n\t\tint VALOR_MAXIMO = 1524;\n\t\t\n\t\t//Lower camel case para variables, métodos u objetos\n\t\tint minValor = 1;\n\t\tboolean pruebaGit = true;\n\t\t\n\t\t//---------------------------------------------------------------\n\t\t\n\t\t// Cast automático\n\t\tbyte b = 24;\n\t\tshort s = b;\n\t\tb = (byte) s; // Cast explícito o manual\n\t\t\n\t\tint i = 24;\n\t\tdouble d = 12.24;\n\t\ti = (int) d; // Recorta el decimal, solo toma la parte entera del número\n\t\t\n\t\tint codigo = 97;\n\t\tchar codigoASCII = (char) codigo; // Cast explícito\t\t\n\t\t\n\t\t// Short a Byte\n\t\tshort numero = 2020;\n\t\tbyte numByte = (byte) numero; // Casting de un dato mas grande que el rango\n\t\t\t\t\t\t\t\t\t // del tipo de dato destino, genera números \"aleatorios\".\n\t\t\n\t\tSystem.out.println(\"\\n\" + numByte); // + variable (Concatenación)\n\t\tSystem.out.println(codigoASCII);\n\t\t\n\t\t//----------------------------------------------------\n\t\t\n\t\t// Arreglos\n\t\t\n\t\t// Formas de declarar un arreglo\n\t\tint[] arrayEntero;\n\t\tdouble arrayDouble[];\n\t\t\n\t\t// Iniciarlo\n\t\t// tipoDeDato[Dimensión] NombreDelArreglo = new tipoDeDato[N° de elementos]\n\t\tdouble[] arreglo1D = new double[3]; \n\t\tint[][] arreglo2D = new int[2][3]; // Arreglo 2D de 6 elementos\n\t\tchar[][][] arreglo3D = new char[3][3][2]; // Arreglo 3D de 18 elementos\n\t\t\n\t\t// Llenando el arreglo\n\t\tchar[][] days = { {'L','M','M'},\n\t\t\t\t\t\t {'J','V','S'} };\n\t\t\n\t\tchar[][][] days3D = { { {'a','b','c'}, {'d','e','f'} },\n\t\t\t\t\t\t\t { {'d','e','f'}, {'a','b','c'} } };\n\t\t\n\t\t// Agregar elementos al arreglo mediante los índices\n\t\tchar[] saludo = new char[4];\n\t\t\n\t\tsaludo[0] = 'H';\n\t\tsaludo[1] = 'o';\n\t\tsaludo[2] = 'l';\n\t\tsaludo[3] = 'a';\n\t\t\n\t\tSystem.out.println(\"\\n\" + saludo[0]);\n\t\tSystem.out.println(saludo[1]);\n\t\tSystem.out.println(saludo[2]);\n\t\tSystem.out.println(saludo[3]);\n\t\t\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Operadores aritméticos\n\t\tSystem.out.println(\"\\n\"+ 12+21);\n\t\tSystem.out.println(20-5);\n\t\tSystem.out.println(12*15);\n\t\tSystem.out.println(15/3);\n\t\tSystem.out.println(17%5);\n\t\t\n\t\t// Operadores de asignación\n\t\tint a = 10;\n\t\tSystem.out.println(\"\\n\" + (a += 2)); // Es equivalente: a = a + 2; + (Asignaciones de variables)\n\t\tSystem.out.println(a -= 3);\n\t\tSystem.out.println(a *= 4);\n\t\tSystem.out.println(a /= 5);\n\t\tSystem.out.println(a %= 6);\n\t\t\n\t\t\n\t\t// Operadores de incremento y decremento (Prefijo y Postfijo)\n\t\tint p = 5;\n\t\t\n\t\t/* ++p\n\t\t * 1. Incrementa el valor p + 1\n\t\t * 2. Asigna el valor a p */\n\t\tSystem.out.println(\"\\n\" + (++p));\n\t\t\n\t\t/* p++\n\t\t * Asigna el valor a p, p = p\n\t\t * Incrementa el valor p + 1 */\n\t\tSystem.out.println(p++); // Imprime el mismo valor 5\n\t\tSystem.out.println(p); // Imprime el valor aumentado en 1, 6\n\t\t\n\t\t// Operadores de equidad (Booleanos)\n\t\tint r = 24;\n\t\tint w = 12;\n\t\t\n\t\tSystem.out.println(\"\\n\" + (r == w));\n\t\tSystem.out.println(r != w);\n\t\t\n\t\t// Operadores relacionales\n\t\tSystem.out.println(\"\\nr > w -> \" + (r > w));\n\t\tSystem.out.println(r < w);\n\t\tSystem.out.println(r >= w);\n\t\tSystem.out.println(r <= w);\n\t\t\n\t\t// Operadores lógicos\n\t\tboolean n = false;\n\t\tboolean m = true;\n\t\t\n\t\tSystem.out.println(\"\\nn && m -> \" + (n && m));\n\t\tSystem.out.println(n || m);\n\t\tSystem.out.println(!n);\n\t}", "private ControladorVentanaConsola() {\r\n configure();\r\n\r\n if (window == null){\r\n window = new VentanaConsola(\"Console\", 200, 500);\r\n window.setLocation(50, 112);\r\n }\r\n }", "@Override\n\tpublic void acomodaVista() {\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tRubro rubro1= new Rubro (\"Cafeteria\");\n\t\t\n\t\t// inicializo el arreglo de importes\n\t\t\n\t\trubro1.inicializarGastos();\n\t\t\n\t\t\n\t\t// le cargo a enero y febrero gastos // pruebo método agregarGasto\n\t\t\n\t\trubro1.agregarGasto(MESDELANIO.ABRIL, 100);\n\t\trubro1.agregarGasto(MESDELANIO.ENERO, 200);\n\n\t\t\n\t\t// VEO QUE LO HAYA CARGADO BIEN\n\t\t\n\t\tSystem.out.println(rubro1);\n\t\t\n\t\n\t\t// pruebo método getNombre()\n\n\t\trubro1.getName();\n\t\tSystem.out.println(rubro1.getName());\n\t\t\n\t\t// pruebo método getTotalGastos - pido enero y pido abril \n\t\t// debería darme 200 y 100\n\t\t\n\t\trubro1.getTotalGastos(MESDELANIO.ENERO);\n\t\trubro1.getTotalGastos(MESDELANIO.ABRIL);\n\n\t\tSystem.out.println(rubro1.getTotalGastos(MESDELANIO.ENERO));\n\t\tSystem.out.println(rubro1.getTotalGastos(MESDELANIO.ABRIL));\n\t\t\n\t\t\n\t\t/// ---- MÉTODOS DE GASTOSTOTAL\n\t\t\n\t\t\n\t\t// Creo un objeto gasto anual\n\t\t\n\t\tGastoAnual gasto2020 = new GastoAnual ();\n\t\t\n\t\t// AGREGO rubros\n\t\tgasto2020.agregarRubro(rubro1);\n\t\t\n\t\t// pruebo el método AgregarGasto\n\t\t\n\t\tgasto2020.agregarGastoNuevo(MESDELANIO.ENERO, \"Cafeteria\", 200);\n\t\tgasto2020.agregarGastoNuevo(MESDELANIO.ENERO, \"Cafeteria\", 200);\n\t\n\t\t\n // esto debería agregar 200 pesos a cafeteria, lo cual daría un total de 400 \n\t\t\n\t\trubro1.getTotalGastos(MESDELANIO.ENERO);\n\t\tSystem.out.println(rubro1.getTotalGastos(MESDELANIO.ENERO));\n\t\t\n\t\t\n\t\t// ahora pruebo si agrega un rubro que no existe con AgregarGastoNuevo\n\t\t\n\tgasto2020.agregarGastoNuevo(MESDELANIO.MARZO, \"Tintoreria\", 200);\n\tSystem.out.println(gasto2020);\n\t\t \n\t\t\n\t\t// pruebo consolidadoDeGastos()\n\t\t\n\t\tgasto2020.consolidadoDeGastos();\n\t\t\n\t\t// pruebo gastoAcumulado(MESDELANIO mes) \n\t\t\n\t\tgasto2020.gastoAcumulado(MESDELANIO.ENERO);\n\t\tgasto2020.gastoAcumulado(MESDELANIO.FEBRERO);\n\t\tgasto2020.gastoAcumulado(MESDELANIO.MARZO);\n\t\t\n\t\t// deberia dar 400\n\t\t\n\t\tSystem.out.println(gasto2020.gastoAcumulado(MESDELANIO.ENERO));\n\t\t\n\t\t// deberia dar 0 \n\t\t\n\t\tSystem.out.println(gasto2020.gastoAcumulado(MESDELANIO.FEBRERO));\n\t\t\n\t\t// deberia dar 200\n\n\t\tSystem.out.println(gasto2020.gastoAcumulado(MESDELANIO.MARZO));\n\n\t\t\n\t\t\n\t\t// pruebo gastoAcumulado(String nombreRubro) por rubro\n\t\t\n\t\tgasto2020.gastoAcumulado(\"Cafeteria\");\n\t\t\n\t\t// debería dar 400\n\t\t\n\t\tSystem.out.println(gasto2020.gastoAcumulado(\"Cafeteria\"));\n\t\t\n\t\t// debería dar 200 \n\t\tSystem.out.println(gasto2020.gastoAcumulado(\"Tintoreria\"));\n\t\t\n\t\t\n\t\t// debería dar -1\n\t\tSystem.out.println(gasto2020.gastoAcumulado(\"Supermercado\"));\n\t\t\n\t\t\n\t\t// pruebo informarConsumoPorMes y por promedio \n\t\t\n\t\tgasto2020.informarConsumosPorMes();\n\t\t\n\t\t\n\t\t// pruebo public void informarMesMayorConsumo() - debe darme enero con 400 \n\t\t\n\t\t\n\t\tgasto2020.informarMesMayorConsumo();\n\t\t\n\n\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) { \n Cubo c=new Cubo();\n float arista;\n arista=c.PreguntaArista();\n c.SetLado(arista);\n c.SetÁrea();\n System.out.println(\"Área del cubo cuyas aristas son de \" +arista+ \": \" +c.GetÁrea());\n }", "public static void main(String[] args) {\n\t\t// apresentando informações em tela, salario e VR.\n\t\tSystem.out.println(\" SALARIO: R$ 1641,00\");\n\t\tSystem.out.println(\" VALE-REFEIÇÃO: R$ 409,00\");\n\t\t\n//fim\n\t}", "public VentanaPrincipal(Controlador main) {\n controlador = main;\n initComponents();\n }", "public static void main(String[] args)\n\t{\n\t\tVentana v = new Ventana();\n\t\t// Damos tamaño a la ventana\n\t\tv.setSize(400, 200);\n\t\t// Hacemos visible la ventana\n\t\tv.setVisible(true);\n\t\t// La hacemos no redimensionable\n\t\tv.setResizable(false);\n\t}", "public static void main(String[] args) {\n\t\tSaludo ventana = new Saludo();\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tLivro l = new Livro();\n\t\t\n\t\tl.criaLivro(\"Estruturas de Dados usando C\", \"Waldemar Celles\", \"Academico\", 450, false, 2015);\n\t\tl.mostraEstado();\n\t}", "private void iniciar() {\r\n\t\t/*Se instancian las clases*/\r\n\t\tmiVentanaPrincipal=new VentanaPrincipal();\r\n\t\tmiVentanaRegistro=new VentanaRegistro();\r\n\t\tmiVentanaBuscar= new VentanaBuscar();\r\n\t\tmiLogica=new Logica();\r\n\t\tmiCoordinador= new Coordinador();\r\n\t\t\r\n\t\t/*Se establecen las relaciones entre clases*/\r\n\t\tmiVentanaPrincipal.setCoordinador(miCoordinador);\r\n\t\tmiVentanaRegistro.setCoordinador(miCoordinador);\r\n\t\tmiVentanaBuscar.setCoordinador(miCoordinador);\r\n\t\tmiLogica.setCoordinador(miCoordinador);\r\n\t\t\r\n\t\t/*Se establecen relaciones con la clase coordinador*/\r\n\t\tmiCoordinador.setMiVentanaPrincipal(miVentanaPrincipal);\r\n\t\tmiCoordinador.setMiVentanaRegistro(miVentanaRegistro);\r\n\t\tmiCoordinador.setMiVentanaBuscar(miVentanaBuscar);\r\n\t\tmiCoordinador.setMiLogica(miLogica);\r\n\t\t\t\t\r\n\t\tmiVentanaPrincipal.setVisible(true);\r\n\t}", "public static void main(String[] args) {\n try{\r\n listaProducto = new ArrayList();\r\n\r\n altaProducto();\r\n listarProducto();\r\n\r\n new VentanaPrincipal().setVisible(true);\r\n }\r\n catch(Exception e){\r\n JOptionPane.showMessageDialog(null, e.getClass());\r\n }\r\n }", "public static void MenuPrincipal() {\n System.out.println(\"Ingrese Opcion deseada :.\\n\"\r\n + \"1. Ingresar un perro a la guardería.\\n\"\r\n + \"2. Contar cuántos Perros de la raza y el Genero deceado hay o pasaron por la guardería durante el verano.\\n\"\r\n + \"3. Listar todos los perros (con su respectiva información) que ingresaron en una determinada fecha.\\n\"\r\n + \"4. Listar todos los Perrros de la Raza que decea con estadía mayor a 20 días.\\n\"\r\n + \"5. Dado el código de un perro, informar los datos de su dueño.\\n\"\r\n + \"6. Terminar.\\n\"\r\n +\"______________________________________________________________________________________________________________\"\r\n \r\n );\r\n\r\n }", "public static void main(String[] args) {\n\t\tString rut;\r\n\t\tString nacionalidad;\r\n\t\tSystem.out.println(\"La clase hija esta caminando\");\r\n\t}", "public static void main(String[] args) {\n Ventana_Cliente VC = new Ventana_Cliente();\n adm.Iniciar_Juego(VC);\n \n }", "public static void main(String[] args) {\n\t\tPersoana p1=new Persoana(\"Andrei\", \"1990000000000\");\r\n\t\tBilet b1=new Bilet(\"Andrei\",\"1A\");\r\n\t\t\r\n\t\tif(p1.getNume().equals(b1.getNume())) {\r\n\t\t\tif(Politie.esteUrmarita(p1)) {\r\n\t\t\t\tif(BazaDeDateHuligani.esteInListaDeHuligani(p1)) {\r\n\t\t\t\t\tSystem.out.println(\"Intrati!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tPersoana p2=new Persoana(\"Maria\", \"1990000000000\");\r\n\t\tBilet b2=new Bilet(\"Maria\",\"2C\");\r\n\t\t\r\n\t\tif(Facade.sePermiteAccesulPeStadion(p2,b2)) {\r\n\t\t\tSystem.out.println(\"Poftiti!\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"Nu aveti voie!\");\r\n\t\t}\r\n\t}", "public void principal() {\r\n int opciones = 0;\r\n do {\r\n opciones = op.capInt(\"CLINICA LA EVALUACIÓN\\n\\n\"\r\n + \"1. Gestionar Pacientes.\\n\"\r\n + \"2. Gestionar Médicos.\\n\"\r\n + \"3. Gestionar Historial Clínico.\\n\"\r\n + \"4. Salir\");\r\n switch (opciones) {\r\n case 1:\r\n gesPaciente();\r\n break;\r\n case 2:\r\n gesMedico();\r\n break;\r\n case 3:\r\n gesHistoria();\r\n break;\r\n case 4:\r\n op.mensaje(\"Hasta la proxima\");\r\n break;\r\n default:\r\n op.mensajeError(\"La opcione Ingresada no es valida\");\r\n break;\r\n }\r\n } while (opciones != 4);\r\n }", "Petunia() {\r\n\t\t}", "public static void main (String [] args){\n\t\tlong idCliente = 2; \n\t\tClienteABM abmc = new ClienteABM();\n\t\tSystem.out.println(\"\\n\"+abmc.traerClienteYEventos(idCliente).toStringConEventos()+\"\\n\");\n\t\t\n\t\t//Probamos con Jaramillo\t\n\t\tidCliente = 1;\n\t\tSystem.out.println(\"\\n\"+abmc.traerClienteYEventos(idCliente).toStringConEventos());\n\t}", "public VentanaPrincipal() {\n initComponents();\n menuTelefono.setVisible(false);\n menuItemCerrarSesion.setVisible(false);\n controladorUsuario = new ControladorUsuario();\n\n ventanaRegistrarUsuario = new VentanaRegistrarUsuario(controladorUsuario);\n ventanaBuscarUsuarios = new VentanaBuscarUsuarios(controladorUsuario, controladorTelefono);\n \n }", "public static void main(String[] args) {\n persegi_panjang pp = new persegi_panjang();\r\n pp.lebar=30;\r\n pp.panjang=50;\r\n Segitiga s = new Segitiga();\r\n s.alas=20;\r\n s.tinggi=40;\r\n Persegi p = new Persegi();\r\n p.sisi=40;\r\n lingkaran l= new lingkaran();\r\n l.jari=20;\r\n \r\npp.luas();\r\npp.keliling();\r\np.luas();\r\np.keliling();\r\ns.luas();\r\ns.keliling();\r\nl.luas();\r\nl.keliling();\r\n}", "private void iniciarVentana()\n {\n this.setVisible(true);\n //Centramos la ventana\n this.setLocationRelativeTo(null);\n //Colocamos icono a la ventana\n this.setIconImage(Principal.getLogo());\n //Agregamos Hint al campo de texto\n txt_Nombre.setUI(new Hint(\"Nombre del Archivo\"));\n //ocultamos los componentes de la barra de progreso general\n lblGeneral.setVisible(false);\n barraGeneral.setVisible(false);\n //ocultamos la barra de progreso de archivo\n barra.setVisible(false);\n //deshabiltamos el boton de ElimianrArchivo\n btnEliminarArchivo.setEnabled(false);\n //deshabilitamos el boton de enviar\n btnaceptar.setEnabled(false);\n //Creamos el modelo para la tabla\n modelo=new DefaultTableModel(new Object[][]{},new Object[]{\"nombre\",\"tipo\",\"peso\"})\n {\n //sobreescribimos metodo para prohibir la edicion de celdas\n @Override\n public boolean isCellEditable(int i, int i1) {\n return false;\n }\n \n };\n //Agregamos el modelo a la tabla\n tablaArchivos.setModel(modelo);\n //Quitamos el reordenamiento en la cabecera de la tabla\n tablaArchivos.getTableHeader().setReorderingAllowed(false);\n }", "public VentanaPrincipal() {\n initComponents();\n\n idUsuariosControlador = Fabrica.getInstance().getControladorUsuarios(null).getId();\n idProductosControlador = Fabrica.getInstance().getControladorProductos(null).getId();\n idOrdenesControlador = Fabrica.getInstance().getControladorOrdenes(null).getId();\n controlarUsuario = Fabrica.getInstance().getControladorUsuarios(idUsuariosControlador);\n controlarProducto = Fabrica.getInstance().getControladorProductos(idProductosControlador);\n controlarOrden = Fabrica.getInstance().getControladorOrdenes(idOrdenesControlador);\n }", "public void Ordenamiento() {\n\n\t}", "private void CargaInicial() {\r\n this.setTitle(\"\" + gui.getTitle().concat(\"\").concat(\" - [Modulo: Precio por Producto/Servicio]\"));\r\n }", "static void menuPrincipal() {\n System.out.println(\n \"\\nPizzaria o Rato que Ri:\" + '\\n' +\n \"1 - Novo pedido\" + '\\n' +\n \"2 - Mostrar pedidos\" + '\\n' +\n \"3 - Alterar estado do pedido\" + '\\n' +\n \"9 - Sair\"\n );\n }", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "public static void main(String[] args) {\n\t\tLivro l = new Livro();\n\t\tl.criaLivro(\"Estrutura de Dados\", \"Waldmar celles\", \"Academico\", 450, \"Elisilver\");\n\t\tl.fechaLivro();\n\t\tl.mostraDados();\n\t}", "public static void main(String[] args) {\n\t\tCarro fusquinha = new Carro();\r\n\t\tfusquinha.ano = 1967;\r\n\t\tfusquinha.cor = \"azul\";// usar aspas para atribuir valor a variável do tipo String\r\n\t\tSystem.out.println(\"Carro: fusca\");\r\n\t\tSystem.out.println(\"Ano: \" + fusquinha.ano);\r\n\t\tSystem.out.println(\"Cor: \" + fusquinha.cor);\r\n\t\tfusquinha.acelerar();\r\n\t}", "public static void main(String[] args) {\n\t\tConta conta = new Conta(\"Brendo\", 111, 1000.00, 0.0);\n\t\tconta.depositar(100.00);\n\t\tconta.sacar(10.00);\n\t\tconta.sacar(10.00);\n\t\tSystem.out.println(conta.getSaldo());\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tBanco banco1;\n\t\t\n\t\tbanco1 = new BancoPatagonia();\n\t\tSystem.out.println(BancoPatagonia.CODIGOBANCARIO);\n\t System.out.println(banco1.tasaInteres());\n\t \n\t System.out.println(banco1.tasaInteresDolar());\n\t \n\t banco1 = new BancoNacion();\n\t\t\n\t System.out.println(banco1.tasaInteres());\n\t \n\t System.out.println(banco1.tasaInteresDolar());\n\n\t}", "public principal() {\n initComponents();\n \n // Verificando si se completó el nivel\n verificar_niveles();\n \n \n }", "public static void main(String[] args)\r\n\t{\r\n\t\t\r\n\t\tInformacion info = new Informacion(new Alumno(\"Javier Eduardo\",\"Barrocal\",87158),new Alumno(\"Pablo Isaias\",\"Chacar\",67704));\r\n\t\tSystem.out.println(info.getHolaMundo());\r\n\t\tSystem.out.println(\"Alumno 1: \" + info.getAlumno1().getApellidosNombres() + \" \" + info.getAlumno1().getLU());\r\n\t\tSystem.out.println(\"Alumno 2: \" + info.getAlumno2().getApellidosNombres() + \" \" + info.getAlumno2().getLU());\r\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tFarmacie farmacie1=Farmacie.getInstanta(\"Catena\", 8, 1000);\n\t\tFarmacie farmacie2=Farmacie.getInstanta(\"Dona\", 10, 1200);\n\t\tSystem.out.println(farmacie1.toString());\n\t\tSystem.out.println(farmacie2.toString());\n\t\tfarmacie1.setNumeFarmacie(\"Farmacie\");\n\t\tfarmacie2.setPret(3000);\n\t\tSystem.out.println(farmacie1.toString());\n\t\tSystem.out.println(farmacie2.toString());\n\t}", "public static void main(String[] args) {\n Pessoa p1 = new Pessoa();\n p1.nome = \"João\";\n p1.rg = \"12345678910\";\n \n // Criando uma primeira conta para associar com a primeira pessoa\n Conta c1 = new Conta();\n c1.agencia = \"0872-9\";\n c1.numero = 887878;\n c1.cliente = p1; // Associando a pessoa com a conta\n }", "public VentanaPrincipal() {\n initComponents();\n editar = false;\n }", "public static void main(String[] args) {\n Cachorro x = new Cachorro();\n //x.emitirSom();\n \n // Programa Principal\n Cachorro c = new Cachorro();\n \n c.reagir(\"Olá\"); // Abanar e Latir\n System.out.println(\"\");\n c.reagir(\"Vai apanhar\"); // Rosnar\n System.out.println(\"\");\n c.reagir(11, 45); // Abanar\n System.out.println(\"\");\n c.reagir(21, 00); // Ignorar\n System.out.println(\"\");\n c.reagir(true); // Abanar\n System.out.println(\"\");\n c.reagir(false); // Rosnar e Latir (// emitirSom();)\n System.out.println(\"\");\n c.reagir(2, 12.5f); // Latir\n System.out.println(\"\");\n c.reagir(17, 4.5f); // Rosnar\n \n }", "public static void main(String[] args) {\n Chancleta pc = new Chancleta();\n //pc.asiento = 'A';\n //pc.fila = 3;\n pc.chicle = 2;\n pc.imprimir();\n System.out.println(\"precio: \" + pc.getPrecio());\n }", "public static void main(String[] args) {\n\t\tAlarmaLibro a = new AlarmaLibro();\n\t\ta.attach(new Compras());\n\t\ta.attach(new Administracion());\n\t\ta.attach(new Stock());\n\t\t\n\t\tLibro libro = new Libro();\n\t\tlibro.setEstado(\"MALO\");\n\t\t\n\t\tBiblioteca b = new Biblioteca();\n\t\tb.devolverLibro(libro);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tMarcoServidor mimarco=new MarcoServidor();\r\n\t\t//esto hace que la ventana no se pueda cambiar de tama�o\r\n\t\tmimarco.setResizable(false);\r\n\t\t\r\n\t\tmimarco.setTitle(\"Ventana Servidor\");\r\n\t\t\r\n\t\tmimarco.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tConta conta = new Conta();\n\n\t\tconta.setAgencia(0211);\n\t\tOperacao operacao = new OperacaoContaFisica();\n\t\toperacao.depositar();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tContaCorrente cc = new ContaCorrente();\n\t\tContaPoupanca cp = new ContaPoupanca();\n\t\t\n\t\tcc.getTipo();\n\t\tSystem.out.println(\"saldo atual\");\n\t\tSystem.out.println(cc.getSaldo());\n\t\tSystem.out.println(\"deposito 100\");\n\t\tcc.depositar(100);\n\t\tSystem.out.println(cc.getSaldo());\n\t\tSystem.out.println(\"sacar 50\");\n\t\tcc.saque(50);\n\t\tSystem.out.println(cc.getSaldo());\n\t\t\n\t\tSystem.out.println(\"------------------\");\n\t\tcp.getTipo();\n\t\tSystem.out.println(\"saldo atual\");\n\t\tSystem.out.println(cp.getSaldo());\n\t\tSystem.out.println(\"deposito 100\");\n\t\tcp.depositar(100);\n\t\tSystem.out.println(cp.getSaldo());\n\t\tSystem.out.println(\"sacar 50\");\n\t\tcp.saque(50);\n\t\tSystem.out.println(cp.getSaldo());\t\t\n\t}", "public static void main(String[] args){\n var system = VacSys.getInstance();\n system.main();\n }", "public static void main(String[] args) {\n String matriz = \"ABCDEFGHIJLMNOPQRSTUVWXYZ\";\n Ejercicio1 c = new Ejercicio1();\n String retorno;\n String mensaje = JOptionPane.showInputDialog(\"Digite el mensaje\");\n// Convierte el mensaje a mayusculas\n mensaje = mensaje.toUpperCase();\n c.llenaMatriz(matriz);\n retorno = c.aTap(mensaje);\n JOptionPane.showMessageDialog(null, retorno);\n\n //Fin de la Primera parte del examen\n /*\n Inicio de la Segunda parte del examen\n */\n /*\n String[] lista = {\" auto \", \" pato \", \" palo \", \" poto \", \" amar \", \" amor \",\n \" loca \", \" loco \", \" polo \", \" poco \", \" poca \", \" rota \", \" roto \"};\n AdminPalabras admin = new AdminPalabras( lista );\n String[] letras = {\" escalopa \", \" automotor\", \" percatado\"};\n for(int i = 0; i < letras . length ; i ++) {\n int cont = admin .ContarPalabrasPosibles(letras [i ]);\n JOptionPane.showMessageDialog(null,letras [i] + \": \" + cont );\n }*/\n //Fin de la Segunda parte del Examen\n }", "public static void main(String[] args) throws MyException {\n\n PessoaView2 tela = new PessoaView2();\n tela.setVisible(true);\n tela.setLocationRelativeTo(null);\n \n// PessoaDAO pdao = new PessoaDAO();\n// pdao.Salvar(new PessoaVO(1,\"hueberto1\", 32122));\n \n \n }", "public static void main(String[] args) {\r\n\r\n\t\tMinhaCalculadora.operacao = \"somar\"; //Não precisa instanciar o objeto quando o método é STATIC.\r\n\t\t\r\n\t\tSystem.out.println(MinhaCalculadora.soma(1, 2)); //Não precisa instanciar a classe quando o método é STATIC.\r\n\t\t\r\n\t\t//Para ambos os casos só precisa inicializar com o nome da classe. logo será apresentado os atributos e métodos STATIC da classe.\r\n\r\n\t}", "public static void main( String[] args )\n {\n int contador = 0;\n Perro perro1 = new Perro(\"Pepe\",4,\"Pug\"); \n //perro1.setNombre(\"Axel\");\n //System.out.println(perro1.getNombre());\n Perro perro2 = new Perro(\"Sasha\",3,\"Siberiano\"); \n //System.out.println(perro2.getNombre()); */\n JOptionPane.showMessageDialog(null, \"Unidad 2\",\"Misiontic\",JOptionPane.ERROR_MESSAGE);\n Perro perro3 = new Perro(\"Manchis\",7,\"Chandoso\"); \n System.out.println(Perro.contadorPerros);\n Perro.ladrar();\n }", "public static void main(String[] args) {\n ALuno a1=new ALuno(500);\n a1.setNome(\"Claudio\");\n a1.setMatricula(1111);\n a1.setCurso(\"Informatica\");\n a1.setIdade(16);\n a1.setSexo(\"M\");\n a1.pagarMensalidade(400);\n //bolsista\n Bolsista b1 = new Bolsista(1000);\n b1.setMatricula(1112);\n b1.setNome(\"Jubileu\");\n b1.setSexo(\"M\");\n b1.pagarMensalidade();\n }", "public static void main(String[] args) {\n Cuadrado cuad1= new Cuadrado();\r\n cuad1.decirHola();\r\n }", "public static void main(String[] args) {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tVentanaPropietario inst = new VentanaPropietario();\n\t\t\t\tinst.setLocationRelativeTo(null);\n\t\t\t\tinst.setVisible(true);\n\t\t\t}\n\t\t});\n\t}", "public static void main(String[] args) {\n \n //Joueur zidane=new Joueur(\"zidane\",\"zinedine\",\"zizou\", \"12/07/1995\",\"marseille\",\"francais\",75.5f,1.82f, Sexe.HOMME,Pied.AMBIDEXTRE,Tenue.SHORT,34,Sponsor.FLY_EMIRATES);\n // Attaquant messi=new Attaquant(\"zidane\",\"zinedine\",\"zizou\", \"12/07/1995\",\"marseille\",\"francais\",75.5f,1.82f, Sexe.HOMME,Pied.AMBIDEXTRE,Tenue.SHORT,10,Sponsor.FLY_EMIRATES,PosteJoueur.DEFENSEUR);\n //Milieu xavi=new Milieu(\"xavi\",\"xava\",\"go\", \"12/07/1990\",\"barcelone\",\"espagnol\",78.5f,1.85f, Sexe.HOMME,Pied.DROIT,Tenue.JOGGING,15,Sponsor.FLY_EMIRATES,PosteJoueur.DEFENSEUR);\n //Defenseur ramos=new Defenseur(\"xavi\",\"ramos\",\"ifjiej\", \"18/07/1990\",\"madrid\",\"espagnol\",78.5f,1.88f, Sexe.HOMME,Pied.GAUCHE,Tenue.SHORT,15,Sponsor.FLY_EMIRATES,PosteJoueur.MILIEU);\n //ramos.celebrer();\n //ramos.defendre();\n //Gardien neuer=new Gardien(\"neuer\",\"manuel\",\"ifjiej\", \"18/07/1991\",\"Bayern\",\"bayern\",88.5f,1.95f, Sexe.HOMME,Pied.GAUCHE,Tenue.SHORT,15,Sponsor.FLY_EMIRATES);\n //neuer.sortir();\n //Spectateur paul=new Spectateur(\"bollart\",12,false,false);\n //Arbitre guillaume=new Arbitre(\"ovigneur\",\"guillaume\",\"guigou\",\"12/07/1676\",\"Lille\", \"France\", 1.98f,1.67f,Sexe.HOMME,Pied.DROIT,Tenue.SHORT,48,Sponsor.MORELLE);\n Equipe marseille= new Equipe (NomEquipe.OM);\n Equipe paris= new Equipe (NomEquipe.PSG);\n Match match=new Match(TypeTerrain.GAZON,marseille,paris);\n match.simulerMatch();\n System.out.println(match.equipeGagnante);\n System.out.println(marseille.attaquants[2].getStatTir());\n \n Tournoi tournoi = new Tournoi(); \n tournoi.qualificaionsTournoi();\n tournoi.huitiemes();\n tournoi.quarts();\n tournoi.demi();\n tournoi.finale();\n \n System.out.println(tournoi.getEquipeEnLis());\n System.out.println(tournoi.getEquipeQualifie());\n System.out.println(tournoi.getEquipePerdanteHuit());\n System.out.println(tournoi.getEquipeGagnanteHuit());\n System.out.println(tournoi.getEquipePerdanteQuarts());\n System.out.println(tournoi.getEquipeGagnanteQuarts());\n System.out.println(tournoi.getEquipePerdanteDemi());\n System.out.println(tournoi.getEquipeGagnanteDemi());\n System.out.println(tournoi.getEquipeFinale());\n\n \n \n //Mise en place de \"l'interface\"\n Scanner sc = new Scanner(System.in);\n \n //Choix du mode de jeu\n System.out.println(\"\\n *** Choix du mode de jeu *** \\n\\t| tournoi : taper 1|\\n\\t| mode solo : taper 2|\");\n int modeDeJeu = sc.nextInt();\n sc.nextLine(); //On vide la ligne\n \n //AJOUTER UNE EXCEPTION POUR LE MODE DE JEU\n \n \n \n //Choix de l'equipe a l'aide d'un scanner\n// System.out.println(\"Choisissez votre équipe :\");\n// NomEquipe equipe;\n// Equipe equipeChoisit = new Equipe(nomEquipe);\n \n\n\n /*Scanner sc = new Scanner(System.in);\n System.out.println(\"Voulez vous disputer un match ? Oui=1 ou NON=2 \");\n int i = sc.nextInt();\n System.out.println(\"Saisissez le numéro de l'equipe avec laquelle vous voulez Jouez \"\n + \"PSG :1\"\n + \"MARSEILLE:2 \");\n //On vide la ligne avant d'en lire une autre\n sc.nextLine();\n int equipe = sc.nextInt(); \n System.out.println(\"FIN ! \");\n \n switch(equipe) {\n case 1:\n Equipe paris= new Equipe (NomEquipe.PSG);\n System.out.println(paris.stade);\n break;\n case 2 :\n Equipe marseille= new Equipe (NomEquipe.OM);\n System.out.println(marseille.stade);\n \n }*/\n }", "public static void main(String[] args) {\n\t\tManagerComenzi managerComenzi=new ManagerComenzi();\n\t\tContBancar contBancar=new ContBancar(\"Ana\");\n\t\tmanagerComenzi.invocaComanda(new ComandaConstituire(contBancar, 100));\n\t\tmanagerComenzi.invocaComanda(new ComandaDepunere(contBancar, 80));\n\t\tmanagerComenzi.executaComanda();\n\t\tmanagerComenzi.invocaComanda(new ComandaRetragere(contBancar, 20));\n\t\tmanagerComenzi.executaComanda();\n\t\tmanagerComenzi.executaComanda();\n\t\tmanagerComenzi.invocaComanda(new ComandaRetragere(contBancar, 180));\n\t\tmanagerComenzi.executaComanda();\n\t}", "void courir();", "public guiProntuarioVirtual() {\n initComponents();\n \n }", "public static void main(String[] args) {\n\t\tHamburger cheeseBurger = new Hamburger(\"CheeseBurger\");\r\n\t\tHamburger maxiBurger = new Hamburger(\"MaxiBurger\");\r\n\t\tAccompagnement accompagnement = new Accompagnement(\"Frites\");\r\n\t\tBoisson boissonCoca = new Boisson(\"Coca\");\r\n\t\tBoisson boissonOrange = new Boisson(\"Orange\");\r\n\r\n\t\t// Mise en place de l'environnement\r\n\t\tControlCreerProfil controlCreerProfil = new ControlCreerProfil();\r\n\t\tcontrolCreerProfil.creerProfil(ProfilUtilisateur.PERSONNEL, \"Dupond\", \"Jacques\", \"jdu\");\r\n\r\n\t\t// Connexion du cuisinier\r\n\t\tControlSIdentifier controlSIdentifier = new ControlSIdentifier();\r\n\t\tint numCuisinier = controlSIdentifier.sIdentifier(ProfilUtilisateur.PERSONNEL, \"Jacques.Dupond\", \"jdu\");\r\n\r\n\t\t// Initialisation controleur du cas & cas Inclus/etendu\r\n\t\tControlVerifierIdentification controlVerifierIdentification = new ControlVerifierIdentification();\r\n\t\tcontrolVerifierIdentification.verifierIdentification(ProfilUtilisateur.PERSONNEL, numCuisinier);\r\n\r\n\t\t// cas visualiser commande du jour\r\n\t\tControlVisualiserCommandeJour controlVisualiserCommandeJour = new ControlVisualiserCommandeJour(\r\n\t\t\t\tcontrolVerifierIdentification);\r\n\t\tBoundaryVisualiserCommandeJour boundaryVisualiserCommandeJour = new BoundaryVisualiserCommandeJour(\r\n\t\t\t\tcontrolVisualiserCommandeJour);\r\n\t\tboundaryVisualiserCommandeJour.visualiserCommandeJour(numCuisinier);\r\n\r\n\t\ttry {\r\n\t\t\tThread.sleep(1500);\r\n\t\t\tSystem.out.println(\"Ecriture des commandes dans le fichier\");\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// extrait cas commander\r\n\t\tBDCommande bdCommande = BDCommande.getInstance();\r\n\t\tbdCommande.enregistrerCommande(1, cheeseBurger, accompagnement, boissonCoca);\r\n\t\tbdCommande.enregistrerCommande(1, maxiBurger, accompagnement, boissonOrange);\r\n\r\n\t\t// Ecriture des commandes dans le fichier\r\n\t\t// Commande n°1 : CheeseBurger, Frites, Coca\r\n\t\t// Commande n°2 : MaxiBurger, Frites, Orange\r\n\t}", "public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }", "public static void main(String[] args) throws Exception {\n\t\t\n\t\tSistemaInmobiliaria sistema= new SistemaInmobiliaria();\n\t\t\n\t\tLocalDate fechaInicio1= LocalDate.of(2019, 05, 28);\n\t\tLocalDate fechaInicio2= LocalDate.of(2019, 04, 19);\n\t\tLocalDate fechaInicio3= LocalDate.of(2019, 03, 27);\n\t\t\n\t\tLocatorio locatorio1= new Locatorio (4, 4444444, \"Pablo\", \"Perez\", \"1234567812\", true);\n\t\tLocatorio locatorio2= new Locatorio (5, 5555555, \"Homero\", \"Simpson\", \"1234567813\", true);\n\t\tLocatorio locatorio3= new Locatorio (6, 6666666, \"Lissa\", \"Simpson\", \"1234567814\", true);\n\t\t\n\t\tLocador locador1 = new Locador(1, 1111111, \"Nicolas\", \"Perez\", \"1234567890\",1,\"Frances\", 20,\"Animal\");\n\t\tLocador locador2= new Locador(2, 2222222, \"Romina\", \"Mansilla\", \"1234567810\",2,\"Santander Rio\",19,\"Pescado\");\n\t\tLocador locador3= new Locador(3, 3333333, \"Alejandra\", \"Vranic\", \"1234567811\",3,\"Patagonia\",18,\"Gato\");\n\t\t\n\t\tPropiedad propiedad1= new Propiedad (1, 1010, \"Uno\", 2340, 1, \"UF\", \"Lanús\", \"Buenos Aires\",locador1);\n\t\tPropiedad propiedad2= new Propiedad (2, 9090, \"Dos\", 2341, 2, \"UF1\", \"Lanús\", \"Buenos Aires\",locador2);\n\t\tPropiedad propiedad3= new Propiedad (3, 8080, \"Tres\", 2342, 3, \"UF2\", \"Lanús\", \"Buenos Aires\",locador3);\n\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Agregar Contrato con id\");\n\t\t\n\t\tsistema.agregarContrato(1, locatorio1, propiedad1, 789, fechaInicio1, 1, 6, 7500, 10);\n\t\tsistema.agregarContrato(2, locatorio2, propiedad2, 345, fechaInicio2, 2, 8, 8500, 11);\n\t\t\n\t\tfor(Contrato c: sistema.getLstContratos()){\n\t\t\tSystem.out.println(c.toString());\n\t\t}\n\t\t\n\t System.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t \n\t\tSystem.out.println(\"Agregar Contrato con comision\");\n\t\t\n\t\tsistema.agregarContrato(locatorio3, propiedad3, 327, fechaInicio3, 3, 10, 1000, 12);\n\n\t\tfor(Contrato c: sistema.getLstContratos()){\n\t\t\tSystem.out.println(c.toString());\n\t\t}\n\t\t\n\t System.out.println(\"-------------------------------------------------\");\n\t \n\t /*-----------------------------------------------------------------------*/\n\t \n\t\tSystem.out.println(\"Traer contrato por id\");\n\t\t \n\t\tSystem.out.println(sistema.traerContratoPorId(1));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Traer contrato por comision\");\n\t\t \n\t\tSystem.out.println(sistema.traerContratoPorComision(327));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Modificar contrato por id\");\n\t\t \n\t\tSystem.out.println(sistema.modificarContratoPorId(2, locatorio2, propiedad2, 345, fechaInicio2, 2, 8, 9050, 9));\n\t\t\n\t\tfor(Contrato c: sistema.getLstContratos()){\n\t\t\tSystem.out.println(c.toString());\n\t\t}\n\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Modificar Propiedad por comision\");\n\t\t \n\t\tSystem.out.println(sistema.modificarContratoPorComision(locatorio2, propiedad2, 345, fechaInicio2, 2, 10, 9050, 9));\n\t\t\n\t\tfor(Contrato c: sistema.getLstContratos()){\n\t\t\tSystem.out.println(c.toString());\n\t\t}\n\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Es contrato vigente?\");\n\n\t\tLocalDate probarFecha= LocalDate.of(2019, 05, 31);\n\t\t\n\t\tSystem.out.println(sistema.traerContratoPorId(1).esContratoVigente(probarFecha));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Calcular mora\");\n\t\t\n\t\tSystem.out.println(sistema.traerContratoPorId(1).calcularMora(20));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Calcular Monto Pago a Recibir\");\n\t\t\n\t\tSystem.out.println(sistema.traerContratoPorId(1).calcularMontoPagoARecibir());\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Calcular Monto Pago a Recibir por fecha\");\n\t\t\n\t\tLocalDate probarFecha1= LocalDate.of(2019, 5, 30);\n\t\t\n\t\tSystem.out.println(sistema.traerContratoPorId(1).calcularMontoPagoARecibir(probarFecha1));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Calcular comision\");\n\t\t\n\t\tSystem.out.println(sistema.traerContratoPorId(1).calcularComision());\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Calcular Monto Pago a Recibir que debe pagar la inmobiliaria a Locador\");\n\t\t\n\t\tSystem.out.println(sistema.traerContratoPorId(1).calcularMontoPagoARecibirInmobiliariaAlLocador());\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Traer contratos vigentes con fechas\");\n\t\t\n\t\tLocalDate probarFecha2= LocalDate.of(2019, 3, 30);\n\t\tLocalDate probarFecha3= LocalDate.of(2019, 4, 21);\n\t\t\n\t\tSystem.out.println(sistema.traerContratosVigentes(probarFecha2, probarFecha3));\n\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n Juego juego1 = (Juego) new JuegoAdivinaNumero();\n juego1.setNumVidas(5);\n juego1.muestraVidasRestantes();\n/* juego1.setNumVidas(juego1.getNumVidas() - 1);\n juego1.muestraVidasRestantes();\n// \n juego1.quitaVida();\n juego1.muestraVidasRestantes();\n juego1.reiniciaPartida();\n juego1.muestraVidasRestantes(); \n juego1.ActualizaRecord();\n \n \n \n\n \n Juego juego2 = (Juego) new JuegoAdivinaNumero();\n juego2.setNumVidas(5);\n juego2.muestraVidasRestantes();\n \n */\n\t\t\n \t JuegoAdivinaNumero adivina1 = new JuegoAdivinaNumero(); \n \t adivina1.Juega();\n\t}", "public static void main(String[] args) {\n Potencia p = new Potencia(2, 5);\n //2-Impriman los 3 atributos\n System.out.println(p.base+\"^\"+p.expo+\"=\"+p.pot);\n }", "public static void main(String[] args) {\n\t\t\n\t\tVeiculo trator = new Veiculo(\"cherokee\");\n//\t\ttrator.init(\"catterpillar\", \"KVM0311\", \"EST002390\",2011,\"não possui\");\n\t\n\t\t\n//\t\tcarro.imprimir();\n\t\tSystem.out.println(\"=============\");\n\t\ttrator.imprimir();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tProgramador programador = new Programador();\n\t\tprogramador.setNumeroDeMatricula(123465);\n\t\tprogramador.exibeDados();\n\t\t\n\t\tGerenteProjetos gerenteProjetos = new GerenteProjetos();\n\t\tgerenteProjetos.setNumeroDeMatricula(987);\n\t\tgerenteProjetos.exibeDados();\n\t\t\n\t\tFuncionario funcionario = new Funcionario();\n\t\tfuncionario.setNumeroDeMatricula(123);\n\t\tfuncionario.exibeDados();\n\n\t\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"iniciando sistema de autos\");\r\n\t\tPersona yo = new Persona(\"Jose\",\"Perez\" );\r\n\t\tyo.imprimir();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\n InterfaceMetodoComunes miSalida1,misalida2,misalida3,miEntrada1,miEntrada2;\n\n miSalida1= FactoriaDeSalidas.getProductoSalida(FactoriaDeSalidas.CONSOLA);\n miSalida1.visualizar(\"Hola que tal estas\");\n\n misalida2=FactoriaDeSalidas.getProductoSalida(FactoriaDeSalidas.VENTANA);\n misalida2.visualizar(\"Bien\");\n\n misalida3=FactoriaDeSalidas.getProductoSalida(FactoriaDeSalidas.IMPRESORA);\n misalida3.visualizar(\"Imprimiendo por la impresora\");\n\n miEntrada1= FactoriaDeEntradas.getProductoEntrada(FactoriaDeEntradas.CONSOLA);\n miEntrada1.introducirDatos();\n\n miEntrada2=FactoriaDeEntradas.getProductoEntrada(FactoriaDeEntradas.VENTANA);\n miEntrada2.introducirDatos();\n }", "public static void main(String[] args) {\n\t\tEtudiant E1 = new Etudiant(\"Toto\");\n\t\tEtudiant E2 = new Etudiant(\"Toto\");\n\t\t//System.out.println(E1.travailler());\n\t\t//System.out.println(E2.seReposer());\n\t\tE1.travailler();\n\t\tE2.seReposer();\n}", "public static void main(String[] args) {\n\n\t\tMethods.id=101;\n\t\tMethods.name=\"abuzer\";\n\t\tMethods.lastName=\"killica\";\n\t\tMethods.salary=55000;\n\t\tMethods.title=\"manager\";\n\t\tMethods.working();\n\t\tMethods.display();\n\t\t\n\t}", "public static void main(String args[]) {\n //seta o look and feel para o do SO\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (Exception e) {\n }\n\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n Caixa c = new Caixa();\n c.setVisible(true);\n c.executaProcedimentosConfiguracao();\n }\n });\n\n /* Exercicio: ativar o marketing\n Banner b = new Banner();\n new Thread(b).start();\n */\n /*try {\n Properties arquivoConexao = new Properties();\n arquivoConexao.load(new FileInputStream(new File(System.getProperty(\"user.dir\")\n + System.getProperty(\"file.separator\")\n + \"conexao.properties\")));\n pathCargaRemoto = arquivoConexao.getProperty(\"importa.RemoteApp\");\n } catch (Exception e) {\n }*/\n }", "public static void main(String[] args) {\n Pasien Dam = new Pasien(\"Puspaningsyas\");\r\n Dam.setTanggalLahir(1974, 1, 12);\r\n// String str = Dam.getNama();\r\n \r\n \r\n\r\n System.out.println(\"Umur = \" + Dam.getUsia());\r\n Dam.NomorRekamMedis();\r\n // System.out.println(str.substring(0, 3));\r\n\r\n// Pasien Dam2 = new Pasien(\"Dam\");\r\n// Dam2.setTanggalLahir(1999,3,13);\r\n// System.out.println(\"Umur = \" +Dam2.getUsia());\r\n }", "public static void main(String[] args) throws Exception {\n Formulario ventana = new Formulario();\n ventana.setBounds(200,40,400,400);\n ventana.setVisible(true);\n ventana.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \n }", "public static void main(String[] args) {\n\t\t\r\n\t\tVozac v1 = new Vozac(\"Petar Petrovic\", \"vozac\");\r\n\t\tVozac v2 = new Vozac(\"Marko Markovic\", \"visi vozac\");\r\n\t\t\r\n\t\tPutnik p1 = new Putnik(\"Mara Maric\", 1000);\r\n\t\tPutnik p2 = new Putnik(\"Zora Zoric\", 1520);\r\n\t\tPutnik p3 = new Putnik(\"Rade Radic\", 854);\r\n\t\tPutnik p4 = new Putnik(\"Mile Milic\", 3150);\r\n\t\tPutnik p5 = new Putnik(\"Joka Jokic\", 2100);\r\n\t\t\r\n\t\tAutobus a1 = new Autobus(\"Novi Sad - Beograd\", 700);\r\n\t\t\r\n\t\ta1.postaviVozaca(v1);\r\n\t\ta1.dodajPutnika(p1);\r\n\t\ta1.dodajPutnika(p2);\r\n\t\ta1.dodajPutnika(p3);\r\n\t\ta1.dodajPutnika(p4);\r\n\t\ta1.dodajPutnika(p5);\r\n\t\t\r\n\t\tSystem.out.println(\"Autobus na relaciji: \" + a1.getNaziv() + \" vozi \" + a1.getVozac().getImeIPrezime() + \", a cena karte je: \" + a1.getCenaKarte() + \" dinara\");\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"Lista putnika koju putuju autobusom: \");\r\n\t\tfor (int i = 0; i < a1.getListaPutnika().size(); i++) {\r\n\t\t\ta1.getListaPutnika().get(i).oduzmiNovac(a1.getCenaKarte());\r\n\t\t\tSystem.out.println(a1.getListaPutnika().get(i).getImeIPrezime() + \", a preostala svota novca je \" + a1.getListaPutnika().get(i).getSvotaNovca());\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) \r\n {\r\n Erreur = MenuPrincipal();\r\n if (Erreur != 0)\r\n { //Afficher l'erreur du programme\r\n }\r\n //Le programme ce termine proprement\r\n }", "public static void main(String[] args) throws Exception {\n\t\tPerro p1=new Perro();\r\n\t\tPerro p2 =new Perro(\"Chucho\", \"Pastor Aleman\", 3,true);\r\n\t\tPerroPresa pp1=new PerroPresa();\r\n\t\tPerroPresa pp2=new PerroPresa(\"Dientes\",\"pitbull\",5,true);\r\n\t\tpp1.setNombre(\"ŅamŅam\");\r\n\t\tp1.setEdad(-3);\r\n\t\tSystem.out.println(p1.toString());\r\n\t\tSystem.out.println(p2.toString());\r\n\t\tSystem.out.println(pp1.toString());\r\n\t\tpp1.atacar();\r\n\t\tSystem.out.println(pp2.toString());\r\n\t\tpp2.atacar();\r\n\t}", "public static void main(String[] args) {\n Peluqueria peluqueria = new Peluqueria(\"Manolo\");\n peluqueria.nuevoEmpleado(new Peluquero(\"peluca\", \"scissors\"));\n\n }", "public VentanaPrincipal() {\n \n initComponents();\n DefaultComboBoxModel dcm = new DefaultComboBoxModel();\n for (LookAndFeelInfo lfi : UIManager.getInstalledLookAndFeels()){\n dcm.addElement(lfi.getName());\n }\n jComboBoxTema.setModel(dcm); \n\n String tema=UIManager.getLookAndFeel().getName(); //selecciono en el jComboBox el tema que tiene aplicado\n jComboBoxTema.setSelectedItem(tema); \n jLabelAplicado.setText(\"Tema Aplicado: \" + UIManager.getInstalledLookAndFeels()[jComboBoxTema.getSelectedIndex()].getClassName());\n\n }", "public static void main (String[] args){\n \n \n Persona p1 = new Persona (\"Gener\",23);\n p1.mostrar();\n p1.correr();\n \n Persona p2 = new Persona(\"12345123\");\n p2.correr(100);\n }", "public Ventana_Central() {\n initComponents();\n setup();\n }", "public static void main(String[] args) {\n\t\tConta conta = new Conta();\n\t\tconta.setnumeroConta(87625);\n\t\tconta.setsaldo(3907.47);\n\t\tSystem.out.println(\"O saldo da conta nº \" + conta.getNumeroConta()\n\t\t\t\t+ \" é: \" + conta.getsaldo());\n\t\tconta.deposito(233.86);\n\t\tSystem.out.println(\"O saldo da conta nº \" + conta.getNumeroConta()\n\t\t\t\t+ \" é: \" + conta.getsaldo());\n\t\tconta.deposito(-87.0);\n\t\tconta.retirada(98.24);\n\t\tSystem.out.println(\"O saldo da conta nº \" + conta.getNumeroConta()\n\t\t\t\t+ \" é: \" + conta.getsaldo());\n\t\tconta.retirada(-222.02);\n\t\tSystem.out.println(conta.toString());\n\t\tconta.print();\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tPersona p = new Persona(\"mario\", \"rossi\", 22, 'f', StatoCivile.CELIBE);\n\t\tSystem.out.println(p.getSposato());\n\t\tp.setSposato(true);\n\t\tp.setSposato(true);\n\t\tSystem.out.println(p.getStatoCivile());\n\n\t}", "public static void main(String[] args){\n //uso correcto de git aaaaa por fin lo comprendi, bueno, por ahora :/...\n\n Perro dog = new Perro(\"Teddy\", \"Callejero\", \"Croquetas\", 2, \"Fuerte\");\n Gato cat = new Gato(\"Miau\", \"Hogareño\", \"Atún\", 1, 7);\n //Perico\n Perico parrot = new Perico(\"Pericles\", \"Loro gris\", \"Galletas\", 1, \"Saludos humanos\");\n //Hamster\n Hamster ham = new Hamster(\"Hamilton\", \"Hamster chino\", \"Apio\", 4, \"Morado\");\n //No recuerdo lol...\n\n //los metodos\n dog.mostrarPerro();\n System.out.println(\"-------\");\n cat.mostrarGato();\n System.out.println(\"-------\");\n parrot.mostrarPerico();\n System.out.println(\"-------\");\n ham.mostrarHamster();\n System.out.println(\"_______\");\n \n }", "public Gui_producto(Gui_VentanaPrincipalGerente principal) {\n initComponents();\n this.setLocationRelativeTo(null);\n this.gui_principal = principal;\n this.addObserver(this.gui_principal.gui_login.menu);\n deshabilitar();\n botones();\n }", "public static void main(String[] args) {\n\t\tProperties prop = PropertySingleton.getInstance();\n\t\tif(prop == null){\n\t\t\tlog.error(\"Arquivo não encontrado\");\n\t\t}else{\n\t\t\tlog.debug(\"Ok!\");\n\t\t}\n\t\tlog.debug(\"Exibindo o application name da aplicação\");\n\t\tSystem.out.println(\"Application_name : \" + prop.getProperty(\"application_name\"));\n\t\tlog.debug(\"Exibindo a versão da aplicação\");\n\t\tSystem.out.println(\"Versão : \" + prop.getProperty(\"versao\"));\n\t\t\n\t}", "public static void main(String[] args) {\n \n String [] nomePlanetas = {\"Terra\",\"Marte\",\"Plutão\",\"Venuz\"};\n \n //imprimi o valor do vetor na posição\n System.out.println(\"O nome do planeta é: \"+nomePlanetas[3]);\n \n \n }", "public static void main(String[] args) {\n\t\tnew CalculadoraDeGastos();\r\n\t\t\r\n\t}" ]
[ "0.6736245", "0.6590476", "0.65766656", "0.6511356", "0.648207", "0.6434992", "0.64248186", "0.6422554", "0.6420823", "0.6382601", "0.6379377", "0.6366216", "0.63618374", "0.6358319", "0.63327795", "0.6327144", "0.62942183", "0.6293852", "0.6269322", "0.6266299", "0.62625325", "0.62563103", "0.6239816", "0.6238969", "0.62345487", "0.62064844", "0.61965054", "0.61960346", "0.6185451", "0.6183127", "0.6179578", "0.6178725", "0.6166865", "0.61449355", "0.61362803", "0.6134617", "0.6134026", "0.6132414", "0.6131664", "0.6131593", "0.6115024", "0.61134964", "0.6095198", "0.6086531", "0.6084988", "0.6080501", "0.6071353", "0.6070578", "0.6065069", "0.60599804", "0.6055268", "0.6053418", "0.6048383", "0.60465354", "0.6045167", "0.60417646", "0.60413355", "0.60390127", "0.6030333", "0.6024412", "0.6023377", "0.60177106", "0.6015843", "0.6014678", "0.6013171", "0.60130566", "0.60073054", "0.60060084", "0.60010725", "0.6000451", "0.5999721", "0.5998514", "0.59979284", "0.5994789", "0.59928066", "0.5990397", "0.5986928", "0.5981764", "0.597918", "0.59730667", "0.5965018", "0.59646785", "0.5964248", "0.5964117", "0.5961307", "0.5961154", "0.5960658", "0.5960605", "0.5955604", "0.5954907", "0.59432703", "0.59424037", "0.59355724", "0.59272844", "0.5924083", "0.5921712", "0.5921145", "0.59189457", "0.59182906", "0.5917118", "0.5916893" ]
0.0
-1
searchTerms an HTMLencoded string
public String makeQuery(String searchTerms) { final StringBuffer query = new StringBuffer(); final Matcher m = Pattern.compile("\\{([^}]*)\\}").matcher(Template); while (m.find()) { String name = m.group(1); if (name == null || name.length() == 0 || name.contains(":")) { return null; } final boolean optional = name.endsWith("?"); if (optional) { name = name.substring(0, name.length() - 1); } name = name.intern(); if (name == "searchTerms") { m.appendReplacement(query, searchTerms); } else if (name == "count") { m.appendReplacement(query, String.valueOf(ItemsPerPage)); } else if (optional) { m.appendReplacement(query, ""); } else if (name == "startIndex") { if (IndexOffset > 0) { m.appendReplacement(query, String.valueOf(IndexOffset)); } else { return null; } } else if (name == "startPage") { if (PageOffset > 0) { m.appendReplacement(query, String.valueOf(PageOffset)); } else { return null; } } else if (name == "language") { m.appendReplacement(query, "*"); } else if (name == "inputEncoding" || name == "outputEncoding") { m.appendReplacement(query, "UTF-8"); } else { return null; } } m.appendTail(query); return query.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@XmlAttribute\r\n public String getSearchTerms() {\r\n return searchTerms;\r\n }", "public void setSearchTerms(String searchTerms) {\r\n this.searchTerms = searchTerms;\r\n }", "private void search() {\n String result = \"<body bgcolor=\\\"black\\\"> \" +\n \"<font color=\\\"#009933\\\"\";\n gs.setQueryString(txtQueury.getText());\n try {\n gsr = gs.doSearch();\n txtCountRes.setText(\"\" + gsr.getEstimatedTotalResultsCount());\n gsre = gsr.getResultElements();\n\n for (int i = 0; i < gsre.length; i++) {\n if (googleTitle.isSelected()) {\n result +=\n \"<font color=\\\"red\\\"><u><b>Title: </u></b><a href=\\\"\" +\n gsre[i].getURL() + \"\\\">\"\n + gsre[i].getTitle() + \"</a><br>\" +\n \"<br><b>URL: \" +\n gsre[i].getHostName() + gsre[i].getURL() +\n \"</b></font><br>\";\n }\n if (googleSummary.isSelected()) {\n result += \"<u><b>Summary: </u></b>\" +\n gsre[i].getSummary() +\n \"<br>\";\n }\n if (googleSnippet.isSelected()) {\n result += \"<u><b>Snippet: </u></b>\" +\n gsre[i].getSnippet() +\n \"<br>\";\n }\n if (googleHostName.isSelected()) {\n result += \"<u><b>Host: </u></b>\" + gsre[i].getHostName() +\n \"<br>\";\n }\n if (googleDirectoryTitle.isSelected()) {\n result += \"<u><b>Directory Title: </u></b>\" +\n gsre[i].getDirectoryTitle() + \"<br>\";\n }\n if (googleCachedSize.isSelected()) {\n result += \"<u><>Cached Size: </u></b>\" +\n gsre[i].getCachedSize() + \"<br>\";\n }\n result += \"<br>\";\n }\n } catch (GoogleSearchFault e) {\n msg(\"Erreur d'exécution \" + e.getMessage(), \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n\n //affichage de la recherche\n editor.setText(result);\n }", "public YahooSearch(List<String> terms) {\n \tquery = StringHelper.join(terms, \" \");\n }", "String legalTerms();", "private void buildQuerySubject(TermsList termsList) \n\t\t throws UnsupportedEncodingException {\n\t\tList<String> terms;\n\t\tString field = \"subject\";\n\n\t\tif ((this.subjectValue != null) && (!(this.subjectValue.equals(\"\")))) {\n\t\t\tif (subjectField.equals(\"ABSTRACT\")) {\n\t\t\t\tfield = \"abstract\";\n\t\t\t}\n\t\t\telse if (subjectField.equals(\"KEYWORDS\")) {\n\t\t\t\tfield = \"keyword\";\n\t\t\t}\n\t\t\telse if (subjectField.equals(\"TITLE\")) {\n\t\t\t\tfield = \"title\";\n\t\t\t}\n\n\t\t\tterms = parseTerms(this.subjectValue);\n\n\t\t\tTreeSet<String> derivedTerms = new TreeSet<String>();\n\t\t\t\n\t\t\tfor (String term : terms) {\n\t\t\t\tderivedTerms.add(term);\n\t\t\t\t\n\t\t\t\tTreeSet<String> webTerms = \n\t\t\t\t\t\tControlledVocabularyClient.webServiceSearchValues(\n\t\t\t\t\t\t\t\tterm, hasExact, hasNarrow, hasRelated, hasNarrowRelated, hasAll);\n\n\t\t\t\tfor (String webTerm : webTerms) {\n\t\t\t\t\tderivedTerms.add(webTerm);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tString subjectQuery = \"\";\n\t\t\tboolean firstTerm = true;\n\t\t\tfor (String derivedTerm : derivedTerms) {\n\t\t\t\ttermsList.addTerm(derivedTerm);\n\t\t\t\tif (!firstTerm) {\n\t\t\t\t\tsubjectQuery += \"%20OR%20\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfirstTerm = false;\n\t\t\t\t}\n\t\t\t\tString parenthesizedValue = parenthesizeQueryValue(derivedTerm);\n\t\t\t\tString escapedTerms = Search.escapeQueryChars(parenthesizedValue);\n\t\t\t\tString encodedTerms = URLEncoder.encode(escapedTerms, \"UTF-8\");\n\t\t\t\tsubjectQuery += String.format(\"%s:%s\", field, encodedTerms);\n\t\t\t}\n\n\t\t\tupdateQString(subjectQuery);\n\t\t}\n\t}", "public String getSearchString() {\r\n return super.getSearchString();\r\n \r\n// String searchStr = \"\";\r\n// //put exact phrase at the very beginning\r\n// if(exactphrase != null && exactphrase.length() > 0)\r\n// {\r\n// searchStr += \"\\\"\" + exactphrase + \"\\\"\";\r\n// }\r\n//\r\n// String allwordsSearchStr = \"\";\r\n// if(allwords != null && allwords.length() > 0)\r\n// {\r\n// String [] words = allwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// allwordsSearchStr += \"+\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// String withoutwordsSearchStr = \"\";\r\n// if(withoutwords != null && withoutwords.length() > 0)\r\n// {\r\n// String [] words = withoutwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// withoutwordsSearchStr += \"+-\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// searchStr += allwordsSearchStr + withoutwordsSearchStr; //need to add other string\r\n// \r\n// String oneofwordsSearchStr = \"\";\r\n// if(oneofwords != null && oneofwords.length() > 0)\r\n// {\r\n// String [] words = oneofwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// oneofwordsSearchStr = \"(\";\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// oneofwordsSearchStr += words[i] + \" \";\r\n// }\r\n// oneofwordsSearchStr = oneofwordsSearchStr.trim();\r\n// oneofwordsSearchStr += \")\";\r\n// }\r\n// }\r\n// if(oneofwordsSearchStr.length() > 0)\r\n// {\r\n// searchStr += \"+\" + oneofwordsSearchStr;\r\n// }\r\n//\r\n// return searchStr;\r\n }", "SearchResultCompany search(String keywords);", "public void setSearchTerms(org.apache.xmlbeans.XmlAnySimpleType searchTerms)\n {\n generatedSetterHelperImpl(searchTerms, SEARCHTERMS$6, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "private String getSearchUrl(String url ){\n String params = searchEditText.getText().toString();\n params = params.replace(\" \",\"+\");\n url += params + \"&filter=ebooks&prettyPrint=false\";\n return url;\n }", "String escapeReservedWords(String query);", "List<DataTerm> search(String searchTerm);", "public abstract Set<String> getTerms(Document doc);", "public org.apache.xmlbeans.XmlAnySimpleType getSearchTerms()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlAnySimpleType target = null;\n target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().find_attribute_user(SEARCHTERMS$6);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "private void buildQueryAuthor(TermsList termsList) \n throws UnsupportedEncodingException {\n\n if (this.creatorName != null && !this.creatorName.equals(\"\")) {\n termsList.addTerm(this.creatorName);\n String searchName = this.creatorName;\n String escapedSearchName = Search.escapeQueryChars(searchName);\n String authorQuery = \"author:(\\\"\" + escapedSearchName + \"\\\")\";\n String encodedValue = URLEncoder.encode(authorQuery, \"UTF-8\");\n updateQString(encodedValue);\n }\n\n if (this.creatorOrganization != null && !this.creatorOrganization.equals(\"\")) {\n termsList.addTerm(this.creatorOrganization);\n String searchName = this.creatorOrganization;\n String escapedSearchName = Search.escapeQueryChars(searchName);\n String organizationQuery = \"organization:(\\\"\" + escapedSearchName + \"\\\")\";\n String encodedValue = URLEncoder.encode(organizationQuery, \"UTF-8\");\n updateQString(encodedValue);\n }\n \n }", "@Test (dataProvider = \"searchTerms\")\n public void searchForKeyword (String searchTerms, String expectedContainedTerm) {\n SearchPage searchPage = homePage.clickForAdvansedSearchLink();\n searchPage.searchByKeywordAndSubmit(searchTerms);\n Assert.assertEquals(searchPage.getSearchResultsOnPageCount(), 10, \"Actual results on page number is wrong\");\n Assert.assertTrue(searchPage.Title(expectedContainedTerm), \"Expected search term is not found in result list\");\n }", "public void setTerms(Term[] terms) { this.terms = terms; }", "public static final String escapeHTMLTags(String input) { \r\n if (input == null || input.length() == 0) {\r\n return input;\r\n } \r\n StringBuffer buf = new StringBuffer(input.length());\r\n char ch = ' ';\r\n for (int i = 0; i < input.length(); i++) {\r\n ch = input.charAt(i);\r\n if (ch == '<') {\r\n buf.append(LT);\r\n } else if (ch == '>') {\r\n buf.append(GT);\r\n } else if (ch == '\\'') {\r\n buf.append(S_QUTO);\r\n } else if (ch == '\"') {\r\n buf.append(D_QUTO);\r\n } else {\r\n buf.append(ch);\r\n }\r\n }\r\n return buf.toString();\r\n }", "private void buildQueryTaxon(TermsList termsList) \n \t\tthrows UnsupportedEncodingException {\n final String value = this.taxon;\n \n if ((value != null) && (!(value.equals(\"\")))) {\n termsList.addTerm(value);\n String parenthesizedValue = parenthesizeQueryValue(value);\n String escapedValue = Search.escapeQueryChars(parenthesizedValue);\n String encodedValue = URLEncoder.encode(escapedValue, \"UTF-8\");\n String taxonQuery = String.format(\"taxonomic:%s\", encodedValue);\n updateQString(taxonQuery);\n }\n }", "private String getSearchStrip(String map)\n/* */ {\n/* 332 */ StringBuffer out = new StringBuffer();\n/* 333 */ out.append(\"<form action=\\\"/Search.do\\\" style=\\\"display:inline;\\\" >\");\n/* 334 */ out.append(\"<table width=\\\"100%\\\" border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" class=\\\"breadcrumbs\\\">\");\n/* 335 */ out.append(\"<tr class=\\\"breadcrumbs\\\"> \");\n/* 336 */ out.append(\" <td width=\\\"72%\\\" height=\\\"20\\\">&nbsp;&nbsp;&nbsp;&nbsp;\" + map + \"&nbsp; &nbsp;&nbsp;</td>\");\n/* 337 */ out.append(\" <td width=\\\"9%\\\"> <input name=\\\"query\\\" type=\\\"text\\\" class=\\\"formtextsearch\\\" size=\\\"15\\\"></td>\");\n/* 338 */ out.append(\" <td width=\\\"5%\\\"> &nbsp; <input name=\\\"Submit\\\" type=\\\"submit\\\" class=\\\"buttons\\\" value=\\\"Find\\\"></td>\");\n/* 339 */ out.append(\"</tr>\");\n/* 340 */ out.append(\"</form></table>\");\n/* 341 */ return out.toString();\n/* */ }", "private String[] computeSearchTerms(Control c) {\n \t\tComposite parent = c.getParent();\n \t\tList searchTerms = new ArrayList();\n \t\twhile (parent != null) {\n \t\t\tObject data = parent.getData();\n \t\t\tif (data instanceof IWizardContainer) {\n \t\t\t\tIWizardContainer wc = (IWizardContainer) data;\n \t\t\t\tsearchTerms.add(wc.getCurrentPage().getTitle());\n \t\t\t\tsearchTerms.add(wc.getCurrentPage().getWizard().getWindowTitle());\n \t\t\t\tbreak;\n \t\t\t} else if (data instanceof IWorkbenchWindow) {\n \t\t\t\tIWorkbenchWindow window = (IWorkbenchWindow) data;\n \t\t\t\tIWorkbenchPage page = window.getActivePage();\n \t\t\t\tif (page != null) {\n \t\t\t\t\tIWorkbenchPart part = lastPart;\n \t\t\t\t\tif (part != null) {\n\t\t\t\t\t\tif (part instanceof IViewPart)\n \t\t\t\t\t\t\tsearchTerms.add(NLS.bind(\n \t\t\t\t\t\t\t\t\tMessages.ContextHelpPart_query_view, part\n \t\t\t\t\t\t\t\t\t\t\t.getSite().getRegisteredName()));\n \t\t\t\t\t}\n \t\t\t\t\t/*\n // Searching by perspective seems counterproductive - CG\n \t\t\t\t\tIPerspectiveDescriptor persp = page.getPerspective();\n \t\t\t\t\tif (persp != null) {\n \t\t\t\t\t\tsearchTerms.add(NLS.bind(\n \t\t\t\t\t\t\t\tMessages.ContextHelpPart_query_perspective,\n \t\t\t\t\t\t\t\tpersp.getLabel()));\n \t\t\t\t\t}\n \t\t\t\t\t*/\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\t} else if (data instanceof Window) {\n \t\t\t\tWindow w = (Window) data;\n \t\t\t\tif (w instanceof IPageChangeProvider) {\n \t\t\t\t\tObject page = ((IPageChangeProvider) w).getSelectedPage();\n \t\t\t\t\tString pageName = getPageName(c, page);\n \t\t\t\t\tif (pageName != null) {\n \t\t\t\t\t\tsearchTerms.add(pageName);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tsearchTerms.add(w.getShell().getText());\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tparent = parent.getParent();\n \t\t}\n \t\treturn (String[]) searchTerms.toArray(new String[searchTerms.size()]);\n \t}", "public String showTagsOfWord(String searchTerm, HashSet<String> allTags) {\n StringBuilder stringBuilder = new StringBuilder(\"Your word \\\"\" + searchTerm + \"\\\" has \" + allTags.size()\n + (allTags.size() == 1 ? \" tag:\\n\" : \" tags:\\n\"));\n for (String tag : allTags) {\n stringBuilder.append(tag + \"\\n\");\n }\n return stringBuilder.toString();\n }", "public void onSearchResults(String term, List<WikiPage> results);", "public interface HtmlEscaper {\n String escape(String string);\n}", "TextBox getSearchContent();", "private String getSearchStrip(String map)\n/* */ {\n/* 326 */ StringBuffer out = new StringBuffer();\n/* 327 */ out.append(\"<form action=\\\"/Search.do\\\" style=\\\"display:inline;\\\" >\");\n/* 328 */ out.append(\"<table width=\\\"100%\\\" border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" class=\\\"breadcrumbs\\\">\");\n/* 329 */ out.append(\"<tr class=\\\"breadcrumbs\\\"> \");\n/* 330 */ out.append(\" <td width=\\\"72%\\\" height=\\\"20\\\">&nbsp;&nbsp;&nbsp;&nbsp;\" + map + \"&nbsp; &nbsp;&nbsp;</td>\");\n/* 331 */ out.append(\" <td width=\\\"9%\\\"> <input name=\\\"query\\\" type=\\\"text\\\" class=\\\"formtextsearch\\\" size=\\\"15\\\"></td>\");\n/* 332 */ out.append(\" <td width=\\\"5%\\\"> &nbsp; <input name=\\\"Submit\\\" type=\\\"submit\\\" class=\\\"buttons\\\" value=\\\"Find\\\"></td>\");\n/* 333 */ out.append(\"</tr>\");\n/* 334 */ out.append(\"</form></table>\");\n/* 335 */ return out.toString();\n/* */ }", "private void search(int i) throws UnsupportedEncodingException{\n //assemble the esearch URL\n String base = \"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/\";\n String url = base + \"esearch.fcgi?db=\" + db;\n \n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > URL :\" + url);\n } \n\n // send POST request\n RequestConfig globalConfig = RequestConfig.custom().setCookieSpec(CookieSpecs.IGNORE_COOKIES).build();\n CloseableHttpClient client = HttpClients.custom().setDefaultRequestConfig(globalConfig).build();\n \n HttpPost request = new HttpPost (url);\n List <NameValuePair> nvps = new ArrayList <>();\n nvps.add(new BasicNameValuePair(\"term\", queries.get(i)));\n nvps.add(new BasicNameValuePair(\"usehistory\", \"y\"));\n request.setEntity(new UrlEncodedFormEntity(nvps));\n\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > query : \" + queries.get(i));\n } \n \n CloseableHttpResponse response;\n try {\n response = client.execute(request);\n BufferedReader rd = new BufferedReader( new InputStreamReader(response.getEntity().getContent()));\n StringBuffer result = new StringBuffer();\n String line = \"\";\n\n Matcher matcher = null;\n while ((line = rd.readLine()) != null) {\n //parse WebEnv, QueryKey and Count (# records retrieved)\n if(line.startsWith(\"<eSearchResult>\")){\n// System.out.println(line);\n //Get webEnv\n matcher = webEnvPattern.matcher(line);\n if (matcher.find())\n {\n webEnvs.add(i,matcher.group(1));\n } else {\n System.out.println(\"No WebEnv found in \" + line);\n }\n // get QueryKey\n matcher = queryKeyPattern.matcher(line);\n if (matcher.find())\n {\n queryKeys.add(i,matcher.group(1));\n } else {\n System.out.println(\"No QueryKey found in \" + line);\n }\n // get Count\n matcher = countPattern.matcher(line);\n if (matcher.find())\n {\n counts.add(i,matcher.group(1));\n } else {\n System.out.println(\"No Count found in \" + line);\n }\n } else if (line.startsWith(\"<ERROR>\")){\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > ERROR :\" + line);\n System.out.println(line);\n }\n// just for testing\n// result.append(line);\n// if(debugMode) {\n// System.out.println(\" \\t\\t\" + line );\n// }\n }\n response.close();\n \n // Log printing\n if(debugMode) {\n if(counts.size() > 0 && queryKeys.size() > 0 && webEnvs.size() > 0 ){\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > Search data :\" \n + \"\\t count > \" + counts.get(i)\n + \",\\t queryKey > \" + queryKeys.get(i)\n + \",\\t WebEnv > \" + webEnvs.get(i));\n } else {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > Search data : No count and/or queryKey and/or WebEnv found \" );\n }\n } \n } catch (IOException ex) {\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > Exception :\" + ex.getMessage());\n } \n } \n }", "public static String escapeHTML(String str){\r\n\t\treturn FuzzyXMLUtil.escape(str, true);\r\n\t}", "private static String handleNonPhraseToken(String stringPart) {\r\n // Set of final terms to be used (no empty elements, right syntax of index fields)\r\n ArrayList <String> terms = new ArrayList <String> ();\r\n \r\n /** Case Index field **/\r\n if(stringPart.contains(\"[\") | stringPart.contains(\"[\")){ // at least an Index field contained here\r\n //separate brackets for term with one space (extra spaces dont matter, trim() is used later)\r\n stringPart = stringPart.replace(\"[\", \" [\");\r\n stringPart = stringPart.replace(\"]\", \"] \");\r\n }\r\n\r\n /** Case Bag of terms **/\r\n //replace space with AND (change default operator to match pubMed's)\r\n // No need for this if setDefaultOperator(QueryParser.Operator.AND) is used\r\n \r\n String[] tokens = stringPart.split(\"\\\\s\");\r\n if(tokens.length > 0){ \r\n for(int i = 1 ; i < tokens.length ; i++){\r\n tokens[i] = tokens[i].trim();\r\n /* Case index field [fieldName] */\r\n if(tokens[i].startsWith(\"[\") & tokens[i].endsWith(\"]\")){\r\n tokens[i] = tokens[i].replace(\"[\",\"\");// clean field name from brackets\r\n tokens[i] = tokens[i].replace(\"]\",\"\");// clean field name from brackets\r\n //Add index field as prefix to previus (not empty) term (as opening index fields handled separately, this index field should not be the first term of string part)\r\n int tmp = i-1;\r\n boolean perviusTermFound = false;\r\n while(!perviusTermFound & tmp >= 0){\r\n if(!tokens[tmp].equals(\"\")){\r\n perviusTermFound = true;\r\n //TO DO : handle wrong syntax (e.g. ... AND [ArticleTitle])\r\n String luceneField = supportedIndexFields.get(tokens[i]);\r\n if(luceneField != null){\r\n tokens[tmp] = luceneField + \":\" + tokens[tmp];\r\n } // else : Lucene counterpart not found, unsupported field - do nothing\r\n } else {\r\n tmp--;\r\n }\r\n }\r\n //Empty field to not be added as a search term in query\r\n tokens[i] = \"\";\r\n } \r\n \r\n /*\r\n \r\n else if(!tokens[i].equals(\"AND\") & !tokens[i].equals(\"\")) {\r\n terms.add(tokens[i]);\r\n }\r\n */\r\n }\r\n }\r\n \r\n String luceneQueryPart = \"\";\r\n boolean notWaiting = false;\r\n boolean orWaiting = false;\r\n for(int i = 0 ; i < tokens.length ; i++){\r\n\r\n if(!tokens[i].equals(\"AND\") & !tokens[i].equals(\"\")){\r\n //in case of AND nothing should happen, it is the default operator\r\n //empty elements are also ignored as useless\r\n \r\n if(!tokens[i].equals(\"NOT\") & !tokens[i].equals(\"OR\") ){ // it's not an operator, it's a term\r\n \r\n if(!luceneQueryPart.endsWith(\" OR \") & !luceneQueryPart.endsWith(\" -\") ) { \r\n luceneQueryPart += \" +\"; \r\n } \r\n luceneQueryPart += tokens[i];\r\n } else {\r\n if(tokens[i].equals(\"NOT\")) {\r\n luceneQueryPart += \" -\";\r\n }\r\n if(tokens[i].equals(\"OR\")){\r\n luceneQueryPart += \" OR \";\r\n }\r\n \r\n } \r\n } \r\n }\r\n \r\n return luceneQueryPart;\r\n }", "public void onSearchSubmit(String queryTerm);", "private String getSearchStrip(String map)\n/* */ {\n/* 323 */ StringBuffer out = new StringBuffer();\n/* 324 */ out.append(\"<form action=\\\"/Search.do\\\" style=\\\"display:inline;\\\" >\");\n/* 325 */ out.append(\"<table width=\\\"100%\\\" border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" class=\\\"breadcrumbs\\\">\");\n/* 326 */ out.append(\"<tr class=\\\"breadcrumbs\\\"> \");\n/* 327 */ out.append(\" <td width=\\\"72%\\\" height=\\\"20\\\">&nbsp;&nbsp;&nbsp;&nbsp;\" + map + \"&nbsp; &nbsp;&nbsp;</td>\");\n/* 328 */ out.append(\" <td width=\\\"9%\\\"> <input name=\\\"query\\\" type=\\\"text\\\" class=\\\"formtextsearch\\\" size=\\\"15\\\"></td>\");\n/* 329 */ out.append(\" <td width=\\\"5%\\\"> &nbsp; <input name=\\\"Submit\\\" type=\\\"submit\\\" class=\\\"buttons\\\" value=\\\"Find\\\"></td>\");\n/* 330 */ out.append(\"</tr>\");\n/* 331 */ out.append(\"</form></table>\");\n/* 332 */ return out.toString();\n/* */ }", "private String escapeHtml(String html) {\r\n\t\tif (html == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\").replaceAll(\">\", \"&gt;\");\r\n\t}", "@Test\r\n\t@Parameters(\"searchContent\")\r\n\tpublic void searchContentInSearcgBar(String searchContent){\r\n\t\tdriver.get(url+radioUrl);\r\n\t\tjse.executeScript(\r\n\t\t\t\t\"if(document.readyState === 'complete'){\"\r\n\t\t\t\t+ \"document.getElementById('search-simple-input-query').value=arguments[arguments.length-1];\"\r\n\t\t\t\t+ \"document.getElementById('search-simple-input-submit').click();}\",searchContent);\r\n\t\tObject response = jse.executeScript(\r\n\t\t\t\t \"if(document.readyState === 'complete'){\"\r\n\t\t\t\t+ \"var searchHeader = document.querySelector('.ct-search-header');\"\r\n\t\t\t\t+ \"function waitForEle(){ if(searchHeader == null) waitForEle();}\"\r\n\t\t\t\t+ \"waitForEle();\"\r\n\t\t\t\t+ \"var txt1 = searchHeader.children[0].innerText;\"\r\n\t\t\t\t+ \"var txt2 = searchHeader.children[1].innerText;\"\r\n\t\t\t\t+ \"return ((txt1.concat('_')).concat(txt2));\"\r\n\t\t\t\t+ \"}\", \"\");\r\n\t\tString[] resp = response.toString().split(\"_\");\r\n\t\tAssert.assertTrue(resp[0].contains(searchContent) && resp[1].toString().contains(searchContent), \"Search is not successful as expected\");\r\n\t}", "private static String handlePhrases(String PubmedQuery) {\r\n //Find phrases \"between double quotes\"\r\n String[] phrases = PubmedQuery.split(\"\\\"\");\r\n for(int i = 0 ; i < phrases.length ; i++){\r\n phrases[i] = phrases[i].trim();\r\n if(!phrases[i].equals(\"\")){ // String not Empty\r\n if(i%2 != 0){ // String surrounded by quotes, i.e. a phrase\r\n phrases[i] = \"\\\"\" + phrases[i] + \"\\\"\";\r\n } else { // not a phrase, i.e. a bag of terms, operator or [field of index] (inside brackets)\r\n if(phrases[i].startsWith(\"[\")){ //index field of previus component contained (i.e. case: \"...\"[...])\r\n boolean perviusPhraseFound = false; // True if index field was added to previus phrase element\r\n // Get index field of previus component and handle proprietly\r\n String [] tokens = phrases[i].split(\"]\");\r\n String indexField = tokens[0].replace(\"[\", \"\");\r\n String luceneField = supportedIndexFields.get(indexField);\r\n if(luceneField != null){ \r\n //add \"indexField:\" as a prefix in previus (not empty) phrase\r\n int tmp = i-1;\r\n while(!perviusPhraseFound & tmp >= 0){\r\n if(!phrases[tmp].equals(\"\")){\r\n perviusPhraseFound = true;\r\n //TO DO : handle wrong syntax (e.g. ... AND [ArticleTitle])\r\n phrases[tmp] = luceneField + \":\" + phrases[tmp] + \"\";\r\n } else {\r\n tmp--;\r\n }\r\n }\r\n } // else : Lucene counterpart not found, unsupported field - do nothing\r\n // Remove from current phrase this index field (prefix)\r\n phrases[i] = phrases[i].substring(indexField.length()+2 );\r\n } \r\n // Further handling...\r\n phrases[i] = handleNonPhraseToken(phrases[i]);\r\n }\r\n } //else { /* Empty token, do nothing with this */ System.out.println(\"\\t\\t\\t empty\"); }\r\n }\r\n \r\n String luceneQuery = \"\";\r\n boolean fisrtPhrase = true;\r\n for(int i = 0 ; i < phrases.length ; i ++){\r\n if(phrases[i].length() > 0){\r\n if(!phrases[i].startsWith(\" OR \") & !phrases[i].startsWith(\" -\") & !phrases[i].startsWith(\" +\") ){\r\n if(fisrtPhrase){\r\n luceneQuery += \" +\";\r\n fisrtPhrase = false;\r\n } else {\r\n if(!phrases[i-1].endsWith(\" OR \") & !phrases[i-1].endsWith(\" -\") & !phrases[i-1].endsWith(\" +\")){\r\n luceneQuery += \" +\";\r\n }\r\n } \r\n } // add default operator + when required (no OR or - is present for that term)\r\n luceneQuery += phrases[i];\r\n }// else empty phrase : skip\r\n }\r\n return luceneQuery;\r\n }", "private String escapeHtml(String html) {\n if (html == null) {\n return null;\n }\n return html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\").replaceAll(\n \">\", \"&gt;\");\n }", "private String escapeHtml(String html) {\n if (html == null) {\n return null;\n }\n return html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\").replaceAll(\n \">\", \"&gt;\");\n }", "String highlightTerm(String term);", "@Override\n\tpublic void searchProduct(HashMap<String, String> searchKeys) {\n\t\tQueryStringFormatter formatter=new QueryStringFormatter(\"http://shopper.cnet.com/1770-5_9-0.html\");\n\t\t\n\t\ttry\n\t\t{\n//\t\t\tformatter.addQuery(\"url\", \"search-alias\");\n\t\t\tif(searchKeys.get(ProductSearch.BRAND_NAME)!=null && searchKeys.get(ProductSearch.PRODUCT_NAME)!=null)\n\t\t\t{\n\t\t\t\tformatter.addQuery(\"query\",(String)searchKeys.get(ProductSearch.BRAND_NAME) +\" \"+ (String)searchKeys.get(ProductSearch.PRODUCT_NAME)+\" \" );\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tString color=(String)searchKeys.get(ProductSearch.COLOR);\n\t\t\tString min=(String)searchKeys.get(ProductSearch.MIN_PRICE);\n\t\t\tString max=(String)searchKeys.get(ProductSearch.MAX_PRICE);\n\t\t\tif(color!=null){\n\t\t\t\tformatter.addQuery(\"color\",color);\n\t\t\t}\n\t\t\tif(min.length()>0&&max.length()>0)\n\t\t\t{\n\t\t\t//formatter.addQuery(\"color\",(String)searchKeys.get(HeadPhonesSearch.COLOR_S)+\" Price between $\"+(String)searchKeys.get(HeadPhonesSearch.MIN_PRICE)+\" to $\"+(String)searchKeys.get(HeadPhonesSearch.MAX_PRICE));\n\t\t\t\t\n\t\t\t\tformatter.addQuery(\" Price between $\",min +\" to $\"+max);\n\t\t\t}\n\t\t\tformatter.addQuery(\"tag\",\"srch\");\n\t\t\t\n\t\t\tString finalQueryString=\"http://shopper.cnet.com/1770-5_9-0.html\"+formatter.getQueryString();\n\t\t\tSystem.out.println(\"query string :\"+formatter.getQueryString());\n\t\t\tSystem.out.println(\"Query:\"+finalQueryString);\n\t\t\tprocessMyNodes(finalQueryString);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\t\t\t\n\t\t\n\t}", "private String escapeHtml(String html) {\r\n\t\tif (html == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\")\r\n\t\t\t\t.replaceAll(\">\", \"&gt;\");\r\n\t}", "public void parseQueryStringAndSearch(String searchString) {\n char[] chars = searchString.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n Queue<Character> queue;\n int k;\n if (Character.isDigit(chars[i])) {\n k = Integer.parseInt(String.valueOf(chars[i]));\n i++;\n queue = new LinkedList<>();\n while (i < chars.length && chars[i] != ')') {\n queue.add(chars[i]);\n i++;\n }\n i++;\n String query = queryToString(queue);\n String[] terms = query.split(\" \");\n //System.out.println(query + \" and k: \" + k);\n positionIntersects(indexMap.get(analyzeTerm(terms[0])), indexMap.get(analyzeTerm(terms[1])), k);\n } else {\n queue = new LinkedList<>();\n while (i < chars.length && !Character.isDigit(chars[i])) {\n queue.add(chars[i]);\n i++;\n }\n i--;\n String query = queryToString(queue);\n String[] terms = query.trim().split(\" \");\n termQuerySearch(terms);\n }\n\n }\n\n }", "@Test\n public void term_tag() throws AtlasBaseException {\n SearchParameters params = new SearchParameters();\n params.setTermName(SALES_TERM+\"@\"+SALES_GLOSSARY);\n params.setClassification(METRIC_CLASSIFICATION);\n\n List<AtlasEntityHeader> entityHeaders = discoveryService.searchWithParameters(params).getEntities();\n\n Assert.assertTrue(CollectionUtils.isNotEmpty(entityHeaders));\n for(AtlasEntityHeader e : entityHeaders){\n System.out.println(e.toString());\n }\n assertEquals(entityHeaders.size(), 4);\n }", "public Query( String queryString ) {\r\n\tStringTokenizer tok = new StringTokenizer( queryString );\r\n\twhile ( tok.hasMoreTokens() ) {\r\n\t terms.add( tok.nextToken() );\r\n\t weights.add( new Double(1) );\r\n\t} \r\n }", "public String getTerm(){\n return this.term;\n }", "public AvailableSearchTerms getAvailableSearchTerms() {\n\t\treturn availableSearchTerms;\n\t}", "@In String search();", "public static String toOracleSearchText(String searchText,\r\n\t\t\tboolean isAutocomplete) {\r\n\t\tString[] splitString;\r\n\t\tStringBuilder text = new StringBuilder();\r\n\t\tString OpPat = \";&\"; // search operator pattern\r\n\t\tString SpPat = \",<>./!@#$%^*'\\\"-_():|[]~+{}?\\\\\\n\"; // special char\r\n\t\t// pattern\r\n\t\tchar[] searchTextArr;\r\n\t\tboolean preCheck = true;\r\n\r\n\t\t// [DungNTM commented on Jan 10 - 2011: remove all special characters\r\n\t\t// later]\r\n\t\t// searchText = clearAllHTMLTags(searchText);\r\n\t\t// [end]\r\n\r\n\t\tif (!StringUtil.isNullOrEmpty(searchText)) {\r\n\t\t\tsearchTextArr = searchText.toCharArray();\r\n\r\n\t\t\t// remove special char, keep operator char\r\n\t\t\tfor (int i = 0; i < searchTextArr.length; i++) {\r\n\t\t\t\tif (SpPat.indexOf(searchTextArr[i]) >= 0) {\r\n\t\t\t\t\tsearchTextArr[i] = ' ';\r\n\t\t\t\t} else if (OpPat.indexOf(searchTextArr[i]) >= 0) {\r\n\t\t\t\t\tif (preCheck) {\r\n\t\t\t\t\t\tsearchTextArr[i] = ' ';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpreCheck = true;\r\n\t\t\t\t} else\r\n\t\t\t\t\tpreCheck = false;\r\n\t\t\t}\r\n\r\n\t\t\tsearchText = String.valueOf(searchTextArr).trim();\r\n\t\t\tif (StringUtil.isNullOrEmpty(searchText)) {\r\n\t\t\t\treturn STRING_SEARCH_LIKE_ALL;\r\n\t\t\t}\r\n\r\n\t\t\tsplitString = searchText.split(\" \");\r\n\t\t\t// if (splitString.length > 1) {\r\n\t\t\tfor (int i = 0; i < splitString.length; i++) {\r\n\t\t\t\tif (!\"\".equals(splitString[i])) {\r\n\r\n\t\t\t\t\t// if (!isAutocomplete) {\r\n\t\t\t\t\tfor (int j = 0; j < oracleTextKeywords.length; j++) {\r\n\t\t\t\t\t\tif (oracleTextKeywords[j].equals(splitString[i]\r\n\t\t\t\t\t\t\t\t.toUpperCase())) {\r\n\t\t\t\t\t\t\tsplitString[i] = \"{\" + splitString[i] + \"}\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\ttext.append(splitString[i] + \" \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// } else if (splitString.length == 1) {\r\n\t\t\t// text.append(\"%\");\r\n\t\t\t// text.append(splitString[0].trim());\r\n\t\t\t// text.append(\"%\");\r\n\t\t\t// }\r\n\r\n\t\t\tif (isAutocomplete)\r\n\t\t\t\t// searchText = \"%\" + text.toString().trim() + \"%\";\r\n\t\t\t\tsearchText = text.toString().trim() + \"%\";\r\n\t\t\telse\r\n\t\t\t\tsearchText = text.toString().trim();\r\n\t\t\t// remove last operator if exist\r\n\t\t\tif (OpPat.indexOf(searchText.charAt(searchText.length() - 1)) >= 0) {\r\n\t\t\t\tsearchText = searchText.substring(0, searchText.length() - 1);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn STRING_SEARCH_LIKE_ALL;\r\n\r\n\t\t// System.out.println(\"searchString:\" + searchText);\r\n\t\treturn searchText;\r\n\t}", "String termQuery(String field, String val, int from, int size,\n\t\t\tboolean isSubdoc, DomeoPermissions permissions3) {\n\t\tString query = buildTermQuery(field, val, from, size, permissions3);\n\t\tString searchUrl = isSubdoc ? esSearchSubdocUrl : esSearchUrl;\n\t\t@SuppressWarnings(\"unused\")\n\t\tint resCode = doHttpOperation(searchUrl, HTTP_POST, query);\n\t\treturn decodeNS(lastResponse);\n\t}", "public static String[] toOracleSearchLike(String searchText) {\r\n\t\tString[] result = new String[2];\r\n\t\tString[] splitString;\r\n\t\tStringBuilder text = new StringBuilder(\"%\");\r\n\t\tsearchText = clearAllHTMLTags(searchText);\r\n\t\tString escapeChar = \"/\";\r\n\t\tboolean escape = false;\r\n\r\n\t\tif (!StringUtil.isNullOrEmpty(searchText)) {\r\n\r\n\t\t\tif (searchText.indexOf(\"%\") >= 0) {\r\n\t\t\t\tif (searchText.indexOf(escapeChar) >= 0)\r\n\t\t\t\t\tsearchText = searchText.replaceAll(escapeChar, escapeChar\r\n\t\t\t\t\t\t\t+ escapeChar);\r\n\r\n\t\t\t\tsearchText = searchText.replaceAll(\"%\", escapeChar + \"%\");\r\n\t\t\t\tescape = true;\r\n\t\t\t}\r\n\r\n\t\t\tsplitString = searchText.split(\" \");\r\n\r\n\t\t\tfor (int i = 0; i < splitString.length; i++) {\r\n\t\t\t\tif (!\"\".equals(splitString[i]))\r\n\t\t\t\t\ttext.append(splitString[i] + \" \");\r\n\t\t\t}\r\n\t\t\tresult[1] = text.toString().trim() + \"%\";\r\n\r\n\t\t\tif (escape)\r\n\t\t\t\tresult[0] = \" ESCAPE '\" + escapeChar + \"'\";\r\n\t\t\telse\r\n\t\t\t\tresult[0] = \"\";\r\n\r\n\t\t\tsearchText = text.toString();\r\n\t\t} else {\r\n\t\t\tresult[1] = \"%%\";\r\n\t\t\tresult[0] = \"\";\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "public String getSearchResultsText() {\n System.out.println(\"[step] getSearchResultsText\");\n return page.findElement(signSearch).getText();\n }", "private String escapeHtml(String html) {\n\t\tif (html == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\")\n\t\t\t\t.replaceAll(\">\", \"&gt;\");\n\t}", "private String escapeHtml(String html) {\n\t\tif (html == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\")\n\t\t\t\t.replaceAll(\">\", \"&gt;\");\n\t}", "public static String filter(String text)\n { StringBuffer buffer = new StringBuffer();\n for (int i=0; i<text.length(); i++)\n { char c = text.charAt(i);\n if (c == '<') buffer.append(\"&lt;\");\n else if (c == '>') buffer.append(\"&gt;\");\n else if (c == '\"') buffer.append(\"quot;\");\n else if (c == '&') buffer.append(\"amp;\");\n else buffer.append(c);\n }\n return buffer.toString();\n }", "Search getSearch();", "static String surround(String s, String search_term){\n return s.replaceAll(search_term,\"(\" +search_term +\")\");\n\n }", "@Override\n\tprotected void executeSearch(String term) {\n\t\t\n\t}", "public List<Recipe> search(String[] keywords, boolean searchLocally, boolean searchFromWeb) {\n \t\treturn model.searchRecipe(keywords);\r\n \t}", "String renderHTML();", "private String makeHTMLGlossary(String input)\n {\n Collection<String> dictionaryEntries = ((KillhopeApplication) getApplication()).getLinkableWords();\n\n for(String s : dictionaryEntries)\n {\n //Non-word character, then the word (case insensitive), optional s, then another non-word.\n //This is required so \"more\" will not match \"ore\".\n Pattern p = Pattern.compile(String.format(\"(\\\\W)((?i)%ss?)(\\\\W)\", s));\n Matcher m = p.matcher(input);\n //Note: The replacement replaces the loadGlossaryEntry js with %s, which is the dictionary entry.\n //Whereas $2 is the word matched. So \"ores\" will link to ore.\n String newLink = String.format(\"<a href=\\\"noJS.html\\\" onclick=\\\"loadGlossaryEntry(&quot;%s&quot;);return false;\\\">$2</a>\", s);\n //as we match non-word characters outside, we need to re-add these.\n String replaceWith = String.format(\"$1%s$3\", newLink);\n\n if (m.find())\n input = m.replaceAll(replaceWith);\n }\n return input;\n }", "public String searchBooks() {\r\n if (keywords.isEmpty()) {\r\n return \"advanced-search\";\r\n }\r\n\r\n keywords = keywords.trim();\r\n \r\n //Get list of all the queries\r\n List<List<Books>> listOfLists = new ArrayList<List<Books>>();\r\n listOfLists.add(findBooksByGenre(keywords));\r\n listOfLists.add(findBooksByIdentifier(keywords));\r\n listOfLists.add(findBooksByContributor(keywords));\r\n listOfLists.add(findBooksByFormat(keywords));\r\n listOfLists.add(findBooksByPublisher(keywords));\r\n listOfLists.add(findBooksByTitle(keywords));\r\n listOfLists.add(findBooksByYear(keywords));\r\n\r\n clearFields();\r\n\r\n List<Books> books = new ArrayList<Books>();\r\n\r\n //Filter out useless data\r\n List<Books> tempBookList;\r\n for (int cntr = 0; cntr < listOfLists.size(); cntr++) {\r\n tempBookList = listOfLists.get(cntr);\r\n\r\n if (tempBookList == null) {\r\n continue;\r\n }\r\n\r\n if (tempBookList.isEmpty()) {\r\n continue;\r\n }\r\n\r\n books.addAll(tempBookList);\r\n }\r\n\r\n //Remove duplicates\r\n Set<Books> bookSet = new HashSet<Books>();\r\n bookSet.addAll(books);\r\n books.clear();\r\n books.addAll(bookSet);\r\n\r\n return displayBooks(books);\r\n }", "@Override\n\tpublic List<Literature> searchKeywords() {\n\t\treturn null;\n\t}", "private static String escapeTags(final String input) {\n if ((input == null) || (input.length() == 0)\n || (input.indexOf(\"<\") == -1 && input.indexOf(\">\") == -1)) {\n return input;\n }\n\n StringBuffer buf = new StringBuffer(input);\n return escapeTags(buf);\n }", "public String htmlSpecialChar(String string){\n String res = string.replaceAll(\"&\",\"&amp;\");\n res = res.replace(\"'\",\"&#039;\");\n res = res.replace(\"\\\"\",\"&qout;\");\n res = res.replace(\"$\",\"&#036;\");\n res = res.replace(\"%\",\"&#037;\");\n res = res.replace(\"<\",\"&lt;\");\n res = res.replace(\">\",\"&gt;\");\n res = res.replace(\"\\n\",\"\\\\n\");\n return res;\n }", "public String showSearchTag(String searchTag, String[] words) {\n StringBuilder stringBuilder = new StringBuilder(\"Your tag \\\"\" + searchTag + \"\\\" has \" + words.length\n + (words.length == 1 ? \" word:\\n\" : \" words:\\n\"));\n for (int i = 0; i < words.length; i++) {\n stringBuilder.append(words[i] + \"\\n\");\n }\n return stringBuilder.toString();\n }", "public org.apache.xmlbeans.XmlAnySimpleType addNewSearchTerms()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlAnySimpleType target = null;\n target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().add_attribute_user(SEARCHTERMS$6);\n return target;\n }\n }", "public String searchResult(){\n return getText(first_product_title);\n }", "@Override\r\n\tprotected String doInBackground(String... searchTerms) {\n\t\ttry {\r\n\t\t\tif (searchTerms[0] == \"login\")\r\n\t\t\t\treturn search(searchTerms);\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn \"Unable to retrieve web page. URL may be invalid.\";\r\n\t\t} catch (SAXException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn \"done\";\r\n\t}", "@Override\r\n\t\t\tpublic String[] getTerms(Document doc) {\n\t\t\t\treturn null;\r\n\t\t\t}", "private String constructEscapedSolrQuery(String query, boolean literal_query) {\n StringBuilder highlightQuery = new StringBuilder();\n String highLightField;\n if (literal_query) {\n highLightField = LuceneQuery.HIGHLIGHT_FIELD_LITERAL;\n } else {\n highLightField = LuceneQuery.HIGHLIGHT_FIELD_REGEX;\n }\n highlightQuery.append(highLightField).append(\":\").append(\"\\\"\").append(KeywordSearchUtil.escapeLuceneQuery(query)).append(\"\\\"\");\n return highlightQuery.toString();\n }", "public List<Recipe> searchWithIngredients(String[] keywords, boolean searchLocally, \r\n \t\t\t\t\t\t\t\t\t boolean searchFromWeb) {\n \t\treturn model.searchRecipe(keywords);\r\n \t}", "public FindCommand(String searchTerms) {\n super(false);\n this.searchTerms = searchTerms;\n }", "private String getSearchText() {\n\t\treturn this.clientUI.getSearchField();\n\t}", "public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }", "public void verifySearchResultsContainsItem(String... terms) {\r\n\t\tString noOfPagesContainer = getDriver()\r\n\t\t\t\t.findElement(\r\n\t\t\t\t\t\tBy.cssSelector(\"div.page-links > span.aui-paginator-current-page-report.aui-paginator-total\"))\r\n\t\t\t\t.getText().trim();\r\n\t\tSystem.out.println(noOfPagesContainer);\r\n\t\tint noOfPages = tools.StringUtils.getAllIntegerNumbersFromString(\r\n\t\t\t\tnoOfPagesContainer).get(1);\r\n\t\tSystem.out.println(noOfPages);\r\n\t\tfor (int i = 0; i < noOfPages; i++) {\r\n\r\n\t\t\tList<WebElement> searchResults1 = getDriver().findElements(\r\n\t\t\t\t\tBy.cssSelector(\".portlet-section-body.results-row\"));\r\n\t\t\tList<WebElement> searchResults3 = getDriver()\r\n\t\t\t\t\t.findElements(\r\n\t\t\t\t\t\t\tBy.cssSelector(\".portlet-section-alternate.results-row.alt\"));\r\n\r\n\t\t\tList<WebElement> searchResults = new ArrayList<WebElement>();\r\n\r\n\t\t\tsearchResults.addAll(searchResults1);\r\n\t\t\tsearchResults.addAll(searchResults3);\r\n\t\t\tsearchResults.remove(0);\r\n\r\n\t\t\tSystem.out.println(\"size: \" + searchResults.size());\r\n\r\n\t\t\tfor (WebElement searchResult : searchResults) {\r\n\r\n\t\t\t\t// boolean found = false;\r\n\r\n\t\t\t\tSystem.out.println(\"element text: \" + searchResult.getText());\r\n\r\n\t\t\t\tfor (String term : terms) {\r\n\t\t\t\t\tSystem.out.println(term);\r\n\r\n\t\t\t\t\tif (term.contains(\"-\")) {\r\n\t\t\t\t\t\tString daysRange = term;\r\n\t\t\t\t\t\tSystem.out.println(daysRange);\r\n\t\t\t\t\t\tdaysRange.trim();\r\n\r\n\t\t\t\t\t\tint lowLimit = tools.StringUtils\r\n\t\t\t\t\t\t\t\t.getAllIntegerNumbersFromString(daysRange).get(\r\n\t\t\t\t\t\t\t\t\t\t0);\r\n\t\t\t\t\t\tSystem.out.println(\"lowLimit = \" + lowLimit);\r\n\t\t\t\t\t\tint highLimit = tools.StringUtils\r\n\t\t\t\t\t\t\t\t.getAllIntegerNumbersFromString(daysRange).get(\r\n\t\t\t\t\t\t\t\t\t\t1);\r\n\t\t\t\t\t\tSystem.out.println(\"highLimit = \" + highLimit);\r\n\t\t\t\t\t\tString days = searchResult.findElement(\r\n\t\t\t\t\t\t\t\tBy.cssSelector(\"td:nth-child(3)\")).getText();\r\n\t\t\t\t\t\tint dayNo = Integer.parseInt(days);\r\n\t\t\t\t\t\tSystem.out.println(dayNo);\r\n\t\t\t\t\t\tif (!(dayNo >= lowLimit && dayNo <= highLimit)) {\r\n\t\t\t\t\t\t\tAssert.fail(String\r\n\t\t\t\t\t\t\t\t\t.format(\"The list doesn't contain the correct data according to the applied filter\"));\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tif (!searchResult.getText().toLowerCase()\r\n\r\n\t\t\t\t\t\t.contains(term.toLowerCase())) {\r\n\t\t\t\t\t\t\tAssert.fail(String\r\n\t\t\t\t\t\t\t\t\t.format(\"The '%s' search result item does not contain '%s'!\",\r\n\t\t\t\t\t\t\t\t\t\t\tsearchResult.getText(), term));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (i < noOfPages - 1) {\r\n\t\t\t\t\tgetDriver()\r\n\t\t\t\t\t\t\t.findElement(\r\n\t\t\t\t\t\t\t\t\tBy.cssSelector(\"div.page-links > a.aui-paginator-link.aui-paginator-next-link\"))\r\n\t\t\t\t\t\t\t.click();\r\n\r\n\t\t\t\t\twaitABit(2000);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static String encodeHTML(String input) {\n int size = input.length();\n StringBuffer buffer = new StringBuffer(size);\n for (int i = 0; i < size; i++ ) {\n char c = input.charAt(i);\n switch (c) {\n case '<':\n buffer.append(\"&lt;\");\n break;\n case '>':\n buffer.append(\"&gt;\");\n break;\n case '\"':\n buffer.append(\"&quot;\");\n break;\n default:\n buffer.append(c);\n }\n }\n return buffer.toString();\n }", "@Override\n public void onClick(View v) {\n EditText searchBar = (EditText) findViewById(R.id.searchBar);\n String searchTerms = searchBar.getText().toString();\n\n //Perform the search\n new SearchStationsAsync(getBaseContext(), searchTerms).execute();\n }", "private void searchBook(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws ServletException, IOException {\n\t\t\n\t\tString keysWord = request.getParameter(\"searchBookForm\");\n\t\t//Call to search function from bookItem\n\t\t\n\t\tString[][] resultSearchArray = this.bookItem.searchBook(keysWord);\n\t\tString innerHTML = \"\";\n\t\tint numResult = this.bookItem.getNumResultsSearch();\n\t\t\n\t\tif(resultSearchArray == null) {\n\t\t\t//Make innnerHTML\n\t\t\t\n\t\t\tinnerHTML = \"<p style='color: blue; font-style: italic; font-weight: bold; font-size: 20px;'>Không tìm thấy kết quả</p>\";\n\t\t}\n\t\telse {\n\t\t\t//Make innerHTML string\n\t\t\t\n\t\t\tinnerHTML = \"<p style='color: blue; font-style: italic; font-weight: bold; font-size: 20px;'>Tìm thấy \" + Integer.toString(numResult) + \" kết quả</p>\";\n\t\t\t\n\t\t\tinnerHTML += \"<hr />\";\n\t\t\t\n\t\t\tfor(int i = 0; i < numResult; i ++) {\n\t\t\t\tinnerHTML += \"<div style='margin-bottom: 5px; border-bottom: rgb(156, 176, 130) solid 2px;'>\";\n\t\t\t\tinnerHTML += \"<table>\";\n\t\t\t\tinnerHTML += \"<tbody>\";\n\t\t\t\tinnerHTML += \"<tr>\";\n\t\t\t\tinnerHTML += \"<td>\";\n\t\t\t\tinnerHTML += \"<div style='margin: 0 5px; width: 285px; height: 370px; border-radius: 5px; border-right: rgb(156, 176, 130) solid 1px;'>\";\n\t\t\t\tinnerHTML += \"<a>\";\n\t\t\t\tinnerHTML += \"<img src='\" + resultSearchArray[i][BookItem.BOOK_ITEM_IMAGE] + \"' alt='\" + resultSearchArray[i][BookItem.BOOK_ITEM_TITLE] + \"' title='\" + resultSearchArray[i][BookItem.BOOK_ITEM_TITLE] + \"' width='285px' height='370px' />\";\n\t\t\t\tinnerHTML += \"</a>\";\n\t\t\t\tinnerHTML += \"</div>\";\n\t\t\t\tinnerHTML += \"</td>\";\n\t\t\t\tinnerHTML += \"<td>\";\n\t\t\t\tinnerHTML += \"<div>\";\n\t\t\t\tinnerHTML += \"<div style='margin-bottom: 10px;'>\";\n\t\t\t\tinnerHTML += \"<a>Mã sách: \" + resultSearchArray[i][BookItem.BOOK_ITEM_CODE] + \"</a>\";\n\t\t\t\tinnerHTML += \"</div>\";\n\t\t\t\tinnerHTML += \"<div style='margin-bottom: 10px;'>\";\n\t\t\t\tinnerHTML += \"<a>Tên sách: \" + resultSearchArray[i][BookItem.BOOK_ITEM_TITLE] + \"</a>\";\n\t\t\t\tinnerHTML += \"</div>\";\n\t\t\t\tinnerHTML += \"<div style='margin-bottom: 10px;'>\";\n\t\t\t\tinnerHTML += \"<a>Tác giả: \" + resultSearchArray[i][BookItem.BOOK_ITEM_AUTHOR] + \"</a>\";\n\t\t\t\tinnerHTML += \"</div>\";\n\t\t\t\tinnerHTML += \"<div style='margin-bottom: 10px;'>\";\n\t\t\t\tinnerHTML += \"<a>Nhà xuất bản: \" + resultSearchArray[i][BookItem.BOOK_ITEM_PUBLISHER] + \"</a>\";\n\t\t\t\tinnerHTML += \"</div>\";\n\t\t\t\tinnerHTML += \"<div style='margin-bottom: 10px;'>\";\n\t\t\t\tinnerHTML += \"<a>Ngày xuất bản: \" + resultSearchArray[i][BookItem.BOOK_ITEM_DAY_PUBPLICATION] + \"</a>\";\n\t\t\t\tinnerHTML += \"</div>\";\n\t\t\t\tinnerHTML += \"<div style='margin-bottom: 10px;'>\";\n\t\t\t\tinnerHTML += \"<a>Thể loại: \" + resultSearchArray[i][BookItem.BOOK_ITEM_TYPE_EXPLAIN] + \"</a>\";\n\t\t\t\tinnerHTML += \"</div>\";\n\t\t\t\tinnerHTML += \"</div>\";\n\t\t\t\tinnerHTML += \"</td>\";\n\t\t\t\tinnerHTML += \"</tr>\";\n\t\t\t\tinnerHTML += \"</tbody>\";\n\t\t\t\tinnerHTML += \"</table>\";\n\t\t\t\tinnerHTML += \"</div>\";\n\t\t\t}\n\t\t}\n\t\t//Set attributes in this function\n\t\t\n\t\tsession.setAttribute(\"resultFromSearchBook\", innerHTML);\n\t\t//Create dispatcher and forward to main.jsp\n\t\t\n\t\tdispatcher = getServletContext().getRequestDispatcher(\"/main.jsp\");\n\t\tdispatcher.forward(request, response);\n\t\t\n\t\treturn;\n\t}", "public List<BasicString> getTermsAlternative() {\n return termsAlternative;\n }", "public Term[] getTerms() { return terms; }", "public void searchFor(View view) {\n // Get a handle for the editable text view holding the user's search text\n EditText userInput = findViewById(R.id.user_input_edit_text);\n // Get the characters from the {@link EditText} view and convert it to string value\n String input = userInput.getText().toString();\n\n // Search filter for search text matching book titles\n RadioButton mTitleChecked = findViewById(R.id.title_radio);\n // Search filter for search text matching authors\n RadioButton mAuthorChecked = findViewById(R.id.author_radio);\n // Search filter for search text matching ISBN numbers\n RadioButton mIsbnChecked = findViewById(R.id.isbn_radio);\n\n if (!input.isEmpty()) {\n // On click display list of books matching search criteria\n // Build intent to go to the {@link QueryResultsActivity} activity\n Intent results = new Intent(MainActivity.this, QueryListOfBookActivity.class);\n\n // Get the user search text to {@link QueryResultsActivity}\n // to be used while creating the url\n results.putExtra(\"topic\", mUserSearch.getText().toString().toLowerCase());\n\n // Pass search filter, if any\n if (mTitleChecked.isChecked()) {\n // User is searching for book titles that match the search text\n results.putExtra(\"title\", \"intitle=\");\n } else if (mAuthorChecked.isChecked()) {\n // User is searching for authors that match the search text\n results.putExtra(\"author\", \"inauthor=\");\n } else if (mIsbnChecked.isChecked()) {\n // User is specifically looking for the book with the provided isbn number\n results.putExtra(\"isbn\", \"isbn=\");\n }\n\n // Pass on the control to the new activity and start the activity\n startActivity(results);\n\n } else {\n // User has not entered any search text\n // Notify user to enter text via toast\n\n Toast.makeText(\n MainActivity.this,\n getString(R.string.enter_text),\n Toast.LENGTH_SHORT)\n .show();\n }\n }", "@Override\n protected FilterResults performFiltering(CharSequence arg0) {\n String[] tmp = API.it().getKeywords(arg0.toString());\n FilterResults results = new FilterResults();\n results.values = tmp;\n results.count = tmp.length;\n return results;\n }", "public String termsValidation() {\n name.sendKeys(\"Karan Prinja\");\n email.sendKeys(\"k1234@hotmail.com\");\n password.sendKeys(\"termsnotmet\");\n this.scrollBy(submit);\n submit.click();\n helperMethods.waitForWebElement(termsError, 30);\n this.scrollBy(termsError);\n return termsError.getText();\n }", "public void performSearch() {\n History.newItem(MyWebApp.SEARCH_RESULTS);\n getMessagePanel().clear();\n if (keywordsTextBox.getValue().isEmpty()) {\n getMessagePanel().displayMessage(\"Search term is required.\");\n return;\n }\n mywebapp.getResultsPanel().resetSearchParameters();\n //keyword search does not restrict to spots\n mywebapp.addCurrentLocation();\n if (markFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());\n }\n if (contestFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());\n }\n if (geoFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());\n }\n if (plateFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());\n }\n if (spotFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());\n }\n String color = getValue(colorsListBox);\n mywebapp.getResultsPanel().getSearchParameters().setColor(color);\n String manufacturer = getValue(manufacturersListBox);\n if (manufacturer != null) {\n Long id = new Long(manufacturer);\n mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);\n }\n String vehicleType = getValue(vehicleTypeListBox);\n mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);\n// for (TagHolder tagHolder : tagHolders) {\n// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);\n// }\n mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());\n mywebapp.getMessagePanel().clear();\n mywebapp.getResultsPanel().performSearch();\n mywebapp.getTopMenuPanel().setTitleBar(\"Search\");\n //mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());\n }", "public static String[] getHashTags(String article) {\n\n String[] words = article.split(\" \");\n String[] longest = new String[3];\n longest[0] = \"\";\n longest[1] = \"\";\n longest[2] = \"\";\n for (String word : words) {\n word = word.replaceAll(\"\\\\W\", \"\");\n if (word.length() > longest[0].length()) {\n longest[2] = longest[1];\n longest[1] = longest[0];\n longest[0] = word;\n } else if (word.length() > longest[1].length()) {\n longest[2] = longest[1];\n longest[1] = word;\n } else if (word.length() > longest[2].length())\n longest[2] = word;\n }\n String[] hashtags = new String[words.length];\n for (int i = 0; i < hashtags.length; i++)\n hashtags[i] = \"#\" + longest[i].toLowerCase();\n return hashtags;\n }", "public static String getNormalizedDom(String html) {\n \t\n \tString s = Pattern.quote(html.toUpperCase());\n \t//String s = html;\n \t\n \ts = s.replaceAll(\"\\t\", \" \");\n \ts = s.replaceAll(\"\\n\", \" \");\n \ts = s.replaceAll(\" +\", \" \");\n \t//s = s.replaceAll(\"<SCRIPT.*>.*</SCRIPT>\", \"\");\n \ts = s.replaceAll(\"> *\", \">\");\n \ts = s.replaceAll(\" *<\", \"<\");\n \t\n \t/**s = s.replaceAll(\"(< *INPUT\" + wPat + \" \" + txtPat + wPat + \") \" + valPat +\"(\" + wPat + \">)\",\"$1 VALUE='' $2\");\n \ts = s.replaceAll(\"(< *INPUT\" + wPat + \") \" + valPat + \"( \" + wPat + txtPat + wPat + \">)\", \"$1 VALUE='' $2\");\n \t\n \ts = s.replaceAll(\"(< *INPUT\" + wPat + \" \" + pwdPat + wPat + \") \" + valPat +\"(\" + wPat + \">)\",\"$1 VALUE='' $2\");\n \ts = s.replaceAll(\"(< *INPUT\" + wPat + \") \" + valPat + \"( \" + wPat + pwdPat + wPat + \">)\", \"$1 VALUE='' $2\");**/\n \t\n \ts = s.replaceAll(\"(<\\\\w+)[^>]*(>)\",\"$1$2\");\n \t\n \treturn s;\n }", "public void doSearch(String searchText){\n }", "List<String> searchTweets(String keywords) throws TwitterException;", "private static Set<String> scrapeHTML(String html) {\n\t\tSet<String> set = new HashSet<String>();\n\t\tint skipLength = 0;\n\t\tint counter = 0;\n\t\t// the subtraction of 15 is because of the number of characters in \n\t\t// \"<a href=\\\"/wiki/\", to avoid a index out of bounds error\n\t\tfor(int i = 0; i < html.length()-15; i++) {\n\t\t\tif(html.substring(i, i+15).equals(\"<a href=\\\"/wiki/\")) {\n\t\t\t\t// if format matches starts to check the following characters\n\t\t\t\t// to check if it does not contain a : or a #\n\t\t\t\tchar ch = html.charAt(i+15);\n\t\t\t\tString str = \"\";\n\t\t\t\tint count = 0;\n\t\t\t\twhile(html.charAt(i+count+15) != '\"'){\n\t\t\t\t\tif(html.charAt(i+count+15) == ':' || html.charAt(i+count+15) == '#') {\n\t\t\t\t\t\tstr = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tch = html.charAt(count+i+15);\n\t\t\t\t\tstr += ch;\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\t// adds if the page name is not empty\n\t\t\t\tif(str != \"\")\n\t\t\t\tset.add(str);\n\t\t\t\tskipLength = str.length();\n\t\t\t\tcount = 0;\n\t\t}\n\t\t\ti += skipLength;\n\t\t\tskipLength = 0;\n\t\t\tcounter++;\n\t\n\t}\n\treturn set;\n}", "public static String checkString(String content)\n\t {\n\t \tString s=\"\";\n\t \tfor(int i=0;i<content.length();i++)\n\t \t{\n\t \t\tchar c=content.charAt(i);\t\n\t \t\tif(c =='\\\"')\n\t \t\t{\n\t \t\ts+=\"&quot;\";\n\t \t\t}\n\t \t\telse if(c=='<')\n\t \t\t{\n\t \t\t\ts+=\"&lt;\";\n\t \t\t}\n\t \t\telse if(c=='>')\n\t \t\t{\n\t \t\t\ts+=\"&amp;\";\n\t \t\t}\n\t \t\telse if(c=='\\n')\n\t \t\t{\n\t \t\t\ts+=\"<br>\";\n\t \t\t}\n\t \t\telse if(c=='\\'')\n\t \t\t{\n\t \t\t\ts+=\"&apos;\";\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\ts+=c;\n\t \t\t}\n\t \t}\n\t return s;\n\t }", "private void startSearch()\n {\n model.clear();\n ArrayList<String> result;\n if (orRadio.isSelected())\n {\n SearchEngine.search(highTerms.getText(), lowTerms.getText());\n result = SearchEngine.getShortForm();\n }\n else\n {\n SearchEngine.searchAnd(highTerms.getText(), lowTerms.getText());\n result = SearchEngine.getShortForm();\n }\n for (String s : result)\n {\n model.addElement(s);\n }\n int paragraphsRetrieved = result.size();\n reviewedField.setText(\" Retrieved \" + paragraphsRetrieved + \" paragraphs\");\n }", "@Override\n public HashMap<String, String> getFilterTerms() {\n HashMap<String, String> filterTerms = new HashMap<>();\n if (countryCheckBox.isSelected()) {\n filterTerms.put(\"Country\", countryField.getText());\n }\n if (cityCheckBox.isSelected()) {\n filterTerms.put(\"City\", cityField.getText());\n }\n return filterTerms;\n }", "private void buildQueryFilterSite(TermsList termsList) {\n\t\tString attributeValue = \"\";\n\t\tString siteQuery = \"scope:(\";\n\n\t\tif (this.siteValues != null) {\n\t\t\tfor (int i = 0; i < siteValues.length; i++) {\n\t\t\t\tString site = siteValues[i];\n\t\t\t\tLTERSite lterSite = new LTERSite(site);\n\t\t\t\tif (lterSite.isValidSite()) {\n\t\t\t\t\tattributeValue = lterSite.getPackageId();\n\t\t\t\t\tString siteName = lterSite.getSiteName();\n\t\t\t\t\tif ((siteName != null) && (!siteName.equals(\"\"))) {\n\t\t\t\t\t\ttermsList.addTerm(siteName);\n\t\t\t\t\t}\n\t\t\t\t String plusSign = (i > 0) ? \"+\" : \"\";\n\t\t\t\t\tsiteQuery = String.format(\"%s%s%s\", siteQuery, plusSign, attributeValue);\n\t\t\t\t\tif ((i + 1) == siteValues.length) { // tack on the closing parenthesis\n\t\t\t\t\t\tsiteQuery = String.format(\"%s)\", siteQuery); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tupdateFQString(siteQuery);\n\t\t}\n\t}", "public String getResearchKeywords() {\r\n return this.researchKeywords;\r\n }", "public interface DocumentRelatedTermsSearcher {\n List<ScoredTerm> getDocumentRelatedTerms(int docId, String term) throws SearchException;\n}", "public String getTermsAndConditions() {\n return this.termsAndConditions;\n }", "@GET(\"w/api.php?action=opensearch&format=json&suggest&redirects=resolve\")\n Call<JsonElement> getSuggestionsFromSearch(@Query(\"search\") String search);", "public UsAvailableSearchTerms getUsAvailableSearchTerms() {\n\t\treturn usAvailableSearchTerms;\n\t}", "com.google.ads.googleads.v6.resources.SearchTermView getSearchTermView();", "public String extractresult(String search) {\n\t\tfd.findElement(By.id(\"sb_form_q\")).sendKeys(search);\r\n\t\tfd.findElement(By.id(\"sb_form_go\")).click();\r\n\t\t\r\n\t\treturn fd.findElement(By.className(\"sb_count\")).getText();\t\r\n\t}", "public WebElement searchResultsLinks(String linkContaingText) {\r\n\t\treturn driver.findElement(By.xpath(\"//h2[contains(text(),'\"+linkContaingText+\"')]\"));\r\n\t}", "private String encodeXSS(String s) { \n if (s == null || \"\".equals(s)) { \n return s; \n } \n StringBuilder sb = new StringBuilder(s.length() + 16); \n for (int i = 0; i < s.length(); i++) { \n char c = s.charAt(i); \n switch (c) { \n \n //handle the '<' and '>' which can be used for constructing <script> and </script> \n case '>': \n sb.append('>'); \n break; \n case '<': \n sb.append('<'); \n break; \n \n //since the html can support the characters using $#number format \n //so here also need to escape '#','&' and quote symbol \n case '\\'': \n sb.append('‘'); \n break; \n case '\\\"': \n sb.append('“'); \n break; \n case '&': \n sb.append('&'); \n break; \n case '\\\\': \n sb.append('\'); \n break; \n case '#': \n sb.append('#'); \n break; \n //if not the special characters ,then output it directly \n default: \n sb.append(c); \n break; \n } \n } \n return sb.toString(); \n }" ]
[ "0.6169752", "0.6083769", "0.5807161", "0.5592626", "0.5576567", "0.5458514", "0.5377188", "0.5311412", "0.5209556", "0.5178265", "0.51460266", "0.5131609", "0.511072", "0.50150454", "0.50016814", "0.49759966", "0.49444577", "0.49403858", "0.49382994", "0.48978782", "0.4877635", "0.48744005", "0.48714763", "0.48616657", "0.48607546", "0.48538712", "0.4838546", "0.48306304", "0.48278922", "0.48178548", "0.4816592", "0.48104295", "0.48104072", "0.4764936", "0.47620285", "0.47620285", "0.47516832", "0.47515038", "0.4745262", "0.47238287", "0.4717864", "0.47142443", "0.47123694", "0.47120303", "0.47118303", "0.46998805", "0.46943012", "0.4692279", "0.46885675", "0.46872392", "0.46872392", "0.4672099", "0.4670843", "0.4667021", "0.4652436", "0.46401063", "0.4639949", "0.463872", "0.46212596", "0.4605512", "0.4598745", "0.45844457", "0.45820868", "0.45764598", "0.4575804", "0.45725074", "0.456217", "0.455673", "0.4554143", "0.45529833", "0.45505574", "0.45448565", "0.45318472", "0.45286262", "0.4516516", "0.45153424", "0.45103785", "0.4509466", "0.45023", "0.44994906", "0.44914255", "0.4488028", "0.44788325", "0.44754404", "0.44661397", "0.44626623", "0.44617438", "0.44523257", "0.44512865", "0.44373477", "0.44346806", "0.44226405", "0.44223478", "0.4421819", "0.44216153", "0.44170296", "0.44138944", "0.44042245", "0.44001636", "0.4393274" ]
0.5017402
13
byte [] b =null;
public byte[] readRawFile(int fileID)throws Exception{ Resources rs = context.getResources(); InputStream inputStream = rs.openRawResource(fileID); ByteArrayOutputStream mArrayOutputStream = new ByteArrayOutputStream(); byte [] b = new byte[1024]; int length =0; while((length=inputStream.read(b, 0, b.length))!=-1){ mArrayOutputStream.write(b, 0, length); } if(inputStream!=null){ inputStream.close(); } return mArrayOutputStream.toByteArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte[] getBytes() {\n\treturn null;\n }", "public byte[] toByteArray() {\n return null;\n }", "@Override\n\tpublic byte[] getBytes() {\n\t\treturn null;\n\t}", "@Override\n\tpublic byte[] toBytes() {\n\t\treturn null;\n\t}", "@Override\n public byte[] toByteArray() {\n return null;\n }", "ByteArray(byte []a) {\n\tdata = a;\n }", "public ByteArray()\n\t{\n\t\t// initialize the byte array\n\t\tbytes = new byte[0];\n\t}", "@Override\r\n\tpublic Buffer setBytes(int pos, byte[] b, int offset, int len) {\n\t\treturn null;\r\n\t}", "@Override\n public byte[] getBytes() {\n return new byte[0];\n }", "public byte[] getData() {\n\treturn null;\n }", "@Override\r\n\tpublic Buffer setBytes(int pos, byte[] b) {\n\t\treturn null;\r\n\t}", "void mo12206a(byte[] bArr);", "@Override\r\n\t@JsonIgnore\r\n\tpublic byte[] asBytes() {\n\t\treturn null;\r\n\t}", "void mo4520a(byte[] bArr);", "void mo1751a(byte[] bArr);", "@Override\n\tprotected IoBuffer packBody(IoBuffer buffer) {\n\t\treturn null;\n\t}", "void setNullArray()\n/* */ {\n/* 1051 */ this.length = -1;\n/* 1052 */ this.elements = null;\n/* 1053 */ this.datums = null;\n/* 1054 */ this.pickled = null;\n/* 1055 */ this.pickledCorrect = false;\n/* */ }", "void setBuffer(byte[] b)\n {\n buffer = b;\n }", "@Override public Type make_nil(byte nil) { return make(nil,_any); }", "private byte[] normalize(byte [] bytes)\n {\n if (bytes == null)\n return new byte[0];\n else\n return bytes;\n }", "byte [] getBuffer ();", "public ArrayGetByte()\n {\n super(\"ArrayGetByte\");\n }", "public void resetData(@Nullable byte[] data) {\n this.data = data;\n if (data != null) {\n this.dataLength = data.length;\n } else {\n this.dataLength = -1;\n }\n }", "protected static byte[] m5339a(byte[] bArr, int i) {\n if (bArr == null || bArr.length == 0) {\n return null;\n }\n int indexOf = new String(bArr).indexOf(0);\n if (indexOf <= 0) {\n i = 1;\n } else if (indexOf + 1 <= i) {\n i = indexOf + 1;\n }\n byte[] bArr2 = new byte[i];\n System.arraycopy(bArr, 0, bArr2, 0, i);\n bArr2[i - 1] = (byte) 0;\n return bArr2;\n }", "public static byte[] initBytes(byte[] b, int value) {\n\t\tfor (int i=0; i<b.length; i++) b[i]=(byte)value;\n\t\treturn b;\n\t}", "@Test\n public void canCreateWithEmptyArray() {\n // Arrange\n byte[] byteArray = new byte[0];\n\n // Act\n final EventData eventData = new EventData(byteArray);\n\n // Assert\n final byte[] actual = eventData.getBody();\n Assertions.assertNotNull(actual);\n Assertions.assertEquals(0, actual.length);\n }", "public void l()\r\n/* 190: */ {\r\n/* 191:221 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 192:222 */ this.a[i] = null;\r\n/* 193: */ }\r\n/* 194: */ }", "@Override\r\n\tpublic Buffer setBytes(int pos, ByteBuffer b) {\n\t\treturn null;\r\n\t}", "byte[] getBytes();", "byte[] getBytes();", "public void test() {\n String b = new String(\"111\");\n b = null;\n String c = b;\n }", "public void a(@NonNull byte[] bArr) {\n this.a = bArr;\n }", "final public static int len(byte[] b) {\n return b == null ? 0 : b.length;\n }", "@Override\n public byte[] recDirect() {\n return null;\n }", "public byte[] doEncoding(byte[] bArr) {\r\n return bArr == null ? null : Base64.encodeBase64(bArr);\r\n }", "C4932q5 mo19394a(byte[] bArr) throws zzfn;", "private void setArray(byte[] initialArray)\r\n/* 60: */ {\r\n/* 61: 95 */ this.array = initialArray;\r\n/* 62: 96 */ this.tmpNioBuf = null;\r\n/* 63: */ }", "public static byte[] b(int... array) {\n if (array == null) {\n return null;\n }\n byte[] ret = new byte[array.length];\n for (int i = 0; i < ret.length; i++) {\n ret[i] = (byte) array[i];\n }\n return ret;\n }", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default byte[] asByteArray() {\n //TODO this is actually sbyte[], but @Unsigned doesn't work on arrays right now\n return notSupportedCast(\"byte[]\");\n }", "public C1508h mo13966a(C1512k c1512k, byte[] bArr) {\n return null;\n }", "public byte[] getObjectdata()\n {\n return null;\n }", "@Override\n public void setNull() {\n\n }", "public abstract byte[] toByteArray();", "public abstract byte[] toByteArray();", "byte[] byteValue() {\n\treturn data;\n }", "@Override\n\tpublic byte[] reqByteFormat() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Buffer setByte(int pos, byte b) {\n\t\treturn null;\r\n\t}", "public byte[] doDecoding(byte[] bArr) {\r\n return bArr == null ? null : Base64.decodeBase64(bArr);\r\n }", "static public byte[] getDefaultBytes() {\n return defaultByteArray;\n }", "byte[] getEByteArray();", "void freeArray(byte[] array) {}", "private void serializeNull(final StringBuffer buffer)\n {\n buffer.append(\"N;\");\n }", "byte[] mo38566a();", "public interface ByteAdaptable {\n\n byte[] SetToByte();\n}", "@Override // c.d.a.m.w.n\n public /* bridge */ /* synthetic */ boolean b(byte[] bArr) {\n return true;\n }", "@Test\n public void TestBytes() {\n ConnectionEvent connectionEvent = new ConnectionEvent(ConnectionEvent.ConnectionEventType.Close, new byte[0][0]); // Initialize connection event\n\n assertTrue(\"connection event bytes must not be null\", connectionEvent.Bytes() != null); // Ensure event is not null\n }", "@Test(expected = NullPointerException.class)\n public void testInvalidValueOfNullArrayIPv4() {\n Ip4Address ipAddress;\n byte[] value;\n\n value = null;\n ipAddress = Ip4Address.valueOf(value);\n }", "public void mo27009a(byte[] bArr) {\n this.f18796a = bArr;\n }", "public abstract void write(byte[] b);", "private VerbBridge() {\r\n\t\tvB = null;\r\n\t}", "byte[] decodeBytes();", "public void testAppendBytesNullPointerException() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n try {\r\n filePersistence.appendBytes(null, new byte[0]);\r\n fail(\"if fileCreationId is null, throw NullPointerException\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n try {\r\n filePersistence.appendBytes(\"valid\", null);\r\n fail(\"if bytes is null, throw NullPointerException\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n }", "@Override\r\n public byte[] encodeToBytes(Object object) throws Exception {\n return null;\r\n }", "public static byte [] toBytes(final boolean b) {\n return new byte[] { b ? (byte) -1 : (byte) 0 };\n }", "public byte[] getByteArray(){\r\n\r\n byte[] b = new byte[0x54];\r\n\r\n System.arraycopy(PID_pointer, 0, b, 0, 4);\r\n System.arraycopy(MPID_pointer, 0, b, 4, 4);\r\n System.arraycopy(Null_pointer, 0, b, 8, 4);\r\n System.arraycopy(Portrait_pointer, 0, b, 12, 4);\r\n System.arraycopy(Class_pointer, 0, b, 16, 4);\r\n System.arraycopy(Affiliation_pointer, 0, b, 20, 4);\r\n System.arraycopy(Weaponlevel_pointer, 0, b, 24, 4);\r\n System.arraycopy(Skill1_pointer, 0, b, 28, 4);\r\n System.arraycopy(Skill2_pointer, 0, b, 32, 4);\r\n System.arraycopy(Skill3_pointer, 0, b, 36, 4);\r\n System.arraycopy(Animation1_pointer, 0, b, 40, 4);\r\n System.arraycopy(Animation2_pointer, 0, b, 44, 4);\r\n b[48] = unknownbyte1;\r\n b[49] = unknownbyte2;\r\n b[50] = unknownbyte3;\r\n b[51] = unknownbyte4;\r\n b[52] = unknownbyte5;\r\n b[53] = unknownbyte6;\r\n b[54] = level;\r\n b[55] = build;\r\n b[56] = weight;\r\n System.arraycopy(bases, 0, b, 57, 8);\r\n System.arraycopy(growths, 0, b, 65, 8);\r\n System.arraycopy(supportgrowth, 0, b, 73, 8);\r\n b[81] = unknownbyte9;\r\n b[82] = unknownbyte10;\r\n b[83] = unknownbyte11;\r\n\r\n return b;\r\n }", "public ByteArray(final int length)\n\t{\n\t\t// initialize the byte array\n\t\tbytes = new byte[length];\n\t\t\n\t\t// fill the array with byte 0\n\t\tArrays.fill(bytes, (byte) 0);\n\t}", "private byte[] decode(ByteBuffer bytes) {\n \treturn bytes.array();\r\n }", "public byte[] getData() {\n/* 91 */ return (this.pbData == null) ? null : this.pbData.getByteArray(0L, this.cbData);\n/* */ }", "byte[] getData();", "byte[] getData();", "byte[] getData();", "byte[] getData();", "@Test(expected = NullPointerException.class)\n public void formatBytesNullInputsTest() {\n Long longObject = null;\n Format.formatBytes(longObject);\n }", "@Override\r\n\tpublic String b() {\n\t\treturn null;\r\n\t}", "public void setOptionalValues(byte[] optionalValues) {\n\t\tthis.optionalValues = optionalValues!=null?optionalValues:null;\n\t}", "@Override\n\tpublic void flagNull() {\n\t\t\n\t}", "public static int OpaqueToType(byte[] b) { \n int type = b[8];\n return type; \n }", "protected NullMidiMessage(byte[] data) {\n super(data);\n }", "public byte[] GetBytes() {\n return data;\n }", "public abstract e a(byte[] bArr, int i, boolean z) throws g;", "@Override\n\t\tpublic <T> T[] toArray(T[] a) {\n\t\t\treturn null;\n\t\t}", "public abstract byte[] toBytes() throws Exception;", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "public abstract void mo13593a(byte[] bArr, int i, int i2);", "public void nullstill();", "public byte[] getByteArray() {\n try {\n byte[] ret = (byte[]) byteBuffers.dequeue();\n num++;\n //Thread.dumpStack();\n if(ZenBuildProperties.dbgDataStructures){\n System.out.write('b');\n System.out.write('a');\n System.out.write('_');\n System.out.write('c');\n System.out.write('a');\n System.out.write('c');\n System.out.write('h');\n System.out.write('e');\n edu.uci.ece.zen.utils.Logger.writeln(num);\n }\n\n if (ret == null) {\n return (byte[]) imm.newArray(byte.class, 1024);\n } else {\n return ret;\n }\n } catch (Exception e) {\n ZenProperties.logger.log(Logger.FATAL, getClass(), \"getByteArray\", e);\n System.exit(-1);\n }\n return null;\n }", "public synchronized void mo12187a(C3075c1 c1Var, byte[] bArr) {\n mo12185a(c1Var, ByteBuffer.wrap(bArr));\n }", "public void setData(byte[] var1_1) {\n if (var1_1 == null) ** GOTO lbl4\n try {\n block7 : {\n if (var1_1.length != 0) break block7;\nlbl4: // 2 sources:\n this.len.set(0L);\n return;\n }\n if (var1_1.length > this.buf.length) {\n Log.w(\"Blob\", \"setData: Input size is greater than the maximum allocated ... returning! b.len = \" + var1_1.length);\n this.len.set(0L);\n throw new IllegalArgumentException(\"Blob:setData - Input size greater than max allowed\");\n }\n this.len.set(var1_1.length);\n this.buf.set(var1_1);\n return;\n }\n catch (Exception var2_2) {\n Log.e(\"Blob\", \"setData exception!\");\n var2_2.printStackTrace();\n return;\n }\n }", "@Override\n\tpublic <T> T[] toArray(T[] a) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Task fromBytes(byte[] byteArray) {\n\t\treturn null;\n\t}", "@Override\n public void setDefault() {\n value = new byte[] {0x40};\n }", "ByteArray(String s) {\n\tdata = StringConverter.hexToByte(s);\n }", "public ArrayValue( Object array )\n\t{\n\t\tthis( array, (byte) 0, null, 0 );\n\t}", "void write(byte b[]) throws IOException;", "void setData(byte[] data);", "@Override\r\n\tpublic Buffer setBuffer(int pos, Buffer b, int offset, int len) {\n\t\treturn null;\r\n\t}", "public byte[] getByteData() { return bytedata; }", "public void l()\r\n/* 606: */ {\r\n/* 607:650 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 608:651 */ this.a[i] = null;\r\n/* 609: */ }\r\n/* 610:653 */ for (i = 0; i < this.b.length; i++) {\r\n/* 611:654 */ this.b[i] = null;\r\n/* 612: */ }\r\n/* 613: */ }", "@Override\n\tpublic void readFully(byte[] b) {\n\t\tsuper.readFully(b);\n\t}", "public void mo9453l() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n this.f401c = 0;\n } else {\n this.f401c = Arrays.hashCode(bArr);\n }\n }", "public BinaryRefAddr(String paramString, byte[] paramArrayOfbyte) {\n/* 81 */ this(paramString, paramArrayOfbyte, 0, paramArrayOfbyte.length);\n/* */ }" ]
[ "0.66812885", "0.65989155", "0.6526684", "0.6499239", "0.64535075", "0.6321046", "0.62912965", "0.62176794", "0.61668235", "0.61553335", "0.6132987", "0.6118225", "0.61059284", "0.5947092", "0.5929072", "0.59282696", "0.58522666", "0.58446455", "0.5757013", "0.5751616", "0.57439005", "0.5713953", "0.56899935", "0.56800276", "0.5664101", "0.5661166", "0.5655426", "0.5653698", "0.56494963", "0.56494963", "0.563931", "0.5635894", "0.56169564", "0.5604177", "0.5578506", "0.5565846", "0.55206156", "0.5516511", "0.54915446", "0.5476464", "0.5468001", "0.54605687", "0.54492724", "0.54492724", "0.5441005", "0.54346347", "0.54319483", "0.5427794", "0.54274607", "0.5424763", "0.54201645", "0.5408462", "0.53763705", "0.5370191", "0.53634965", "0.53461826", "0.5340872", "0.53329664", "0.5310395", "0.5295477", "0.52853566", "0.5273565", "0.5271657", "0.5268794", "0.52380925", "0.52342045", "0.52332973", "0.52318466", "0.52088594", "0.52088594", "0.52088594", "0.52088594", "0.51989114", "0.5189892", "0.5180286", "0.51799285", "0.5158945", "0.5157996", "0.51547956", "0.51464134", "0.51404554", "0.5137242", "0.5134321", "0.5128033", "0.5127841", "0.5127103", "0.5119925", "0.5119544", "0.5109022", "0.51086444", "0.5105524", "0.5102211", "0.5101968", "0.5100663", "0.5100591", "0.50934774", "0.5086722", "0.5084991", "0.5081729", "0.5080118", "0.50794077" ]
0.0
-1
Returns the set of all valid words in the given Boggle board, as an Iterable.
public Iterable<String> getAllValidWords(BoggleBoard board) { boolean[][] visited = new boolean[board.rows()][board.cols()]; Set<String> results = new HashSet<>(); TST.BacktrackTraverser<Integer> bt = tst.getTraverser(); for (int y = 0; y < board.rows(); y++) { for (int x = 0; x < board.cols(); x++) { if (!bt.hasDown(board.getLetter(y, x))) { continue; } visited[y][x] = true; bt.down(board.getLetter(y, x)); dfs(y, x, visited, results, board, bt); bt.up(); visited[y][x] = false; } } return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Iterable<String> getAllValidWords(final BoggleBoard board) {\n HashSet<String> validwords = new HashSet<>();\n for (int i = 0; i < board.rows(); i++) {\n for (int j = 0; j < board.cols(); j++) {\n boolean[][] marked = new boolean[board.rows()][board.cols()];\n String word = \"\";\n dfs(board, marked, i, j, word, validwords);\n }\n }\n return validwords;\n }", "public Iterable<String> getAllValidWords(BoggleBoard board) {\n boardRows = board.rows();\n boardCols = board.cols();\n boolean[][] visited = new boolean[boardRows][boardCols];\n HashSet<String> foundWords = new HashSet<>();\n for (int row = 0; row < boardRows; row++) {\n for (int col = 0; col < boardCols; col++) {\n doSearch(row, col, root, board, visited, foundWords);\n }\n }\n return foundWords;\n }", "public Iterable<String> getAllValidWords(BoggleBoard board) {\n m = board.rows();\n n = board.cols();\n graph = new char[m][n];\n marked = new boolean[m][n];\n for (int i = 0; i < m; ++i) {\n for (int j = 0; j < n; ++j) {\n graph[i][j] = board.getLetter(i, j);\n }\n }\n\n words = new HashSet<String>();\n for (int i = 0; i < m; ++i) {\n for (int j = 0; j < n; ++j) {\n dfs(i, j, \"\");\n }\n }\n return words;\n }", "public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }", "public Iterable<String> getAllValidWords(BoggleBoard board) {\n // precompute board\n int rows = board.rows(), cols = board.cols();\n Dice[][] diceBoard = new Dice[rows][cols];\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n diceBoard[i][j] = new Dice(board.getLetter(i, j), i, j);\n }\n }\n boggleGraph = new Dice[rows][cols][];\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n List<Dice> list = new ArrayList<Dice>();\n if (i > 0) {\n if (j > 0) {\n list.add(diceBoard[i-1][j-1]);\n }\n list.add(diceBoard[i-1][j]);\n if (j < cols - 1) {\n list.add(diceBoard[i-1][j+1]);\n }\n }\n if (j > 0) {\n list.add(diceBoard[i][j-1]);\n }\n if (j < cols - 1) {\n list.add(diceBoard[i][j+1]);\n }\n if (i < rows - 1) {\n if (j > 0) {\n list.add(diceBoard[i+1][j-1]);\n }\n list.add(diceBoard[i+1][j]);\n if (j < cols - 1) {\n list.add(diceBoard[i+1][j+1]);\n }\n }\n boggleGraph[i][j] = list.toArray(new Dice[list.size()]);\n }\n }\n\n // run\n result = new HashSet<String>();\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n Stack<Dice> stack = new Stack<Dice>();\n stack.push(diceBoard[i][j]);\n find(buildWord(diceBoard[i][j].letter), stack, i, j);\n }\n }\n\n return result;\n }", "private void findValidWordsOnBoard(){\n\n //mark each visited cell to ensure it gets used only once while forming a word\n boolean[][] visited = new boolean[boardLength][boardLength];\n String word = \"\";\n\n for(int i = 0; i < boardLength; i++) {\n for(int j = 0; j < boardLength; j++)\n findWordsOnBoard(word, visited, board, i, j);\n }\n }", "public Set<String> getWordsNotFoundByUser(){\n\n Set<String> validWordsOnBoardCopy = new HashSet<String>();\n validWordsOnBoardCopy.addAll(validWordsOnBoard);\n validWordsOnBoardCopy.removeAll(validWordsFoundByUser);\n\n return validWordsOnBoardCopy;\n }", "public static String[] validateAllWords(char[][] boggleBoardChars, int lang) throws FileNotFoundException { \r\n\t\t// load dictionary\r\n\t\tFile wordList = null;\r\n\t\tif(lang == 0) {\r\n\t\t\twordList = new File(dictionaryEng);\r\n\t\t} else if(lang==1) {\r\n\t\t\twordList = new File(dictionarySpan);\r\n\t\t}\r\n\t\tScanner scan = new Scanner(wordList);\r\n\t\t// create trie to store dictionary words for later lookup and insert words\r\n\t\tTrie trie = new Trie(); \r\n\r\n\t\twhile(scan.hasNextLine()) {\r\n\t\t\ttrie.insert(scan.nextLine()); \r\n\t\t}\r\n\t\t//\r\n\t\tfindWords(boggleBoardChars, trie ,allValidWords);\r\n\t\t\r\n\t\t//close scanner and return\r\n\t\tscan.close();\r\n\t\treturn allValidWords;\r\n\t}", "public static ArrayList<String> boggle(char[][] board, Trie dict) {\n ArrayList<String> result = new ArrayList<String>();\n boolean[][] history = new boolean[board.length][board[0].length];\n for (int i = 0; i < board.length; i++) {\n for (int j = 0; j < board[0].length; j++) {\n boggle(history, board, result, i, j, \"\", dict);\n }\n }\n\n return result;\n }", "private static void findWords(char boggleBoardChars[][], Trie trie, String[] valids) { \r\n\t\tboolean[][] visitedTiles = new boolean[4][4]; \r\n\r\n\t\tString str = \"\"; \r\n\t\t//searches for valid word starting at each die on board\r\n\t\tfor (int row = 0 ; row < 4; row++) { \r\n\t\t\tfor (int col = 0 ; col < 4 ; col++) { \r\n\t\t\t\tif (trie.isInTrie( (boggleBoardChars[row][col] + \"\").toUpperCase())) { \r\n\t\t\t\t\tstr = str+boggleBoardChars[row][col]; \r\n\t\t\t\t\tboggleBoardSearch(trie, boggleBoardChars, row, col, visitedTiles, str, valids); \r\n\t\t\t\t\tstr = \"\"; \r\n\t\t\t\t} \r\n\t\t\t} \r\n\t\t} \r\n\t}", "public Set<String> getWords() {\n return wordMap.keySet();\n }", "public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }", "static ArrayList<String> findWords(char boggle[][], WordNode root)\n {\n // Mark all characters as not visited\n boolean[][] visited = new boolean[boggle.length][boggle[0].length];\n WordNode pChild = root ;\n\n String str = \"\";\n ArrayList<String> list=new ArrayList<String>();\n\n // traverse all matrix elements\n for (int i = 0 ; i < boggle.length; i++)\n {\n for (int j = 0 ; j < boggle[0].length ; j++)\n {\n // we start searching for word in dictionary\n // if we found a character which is child\n // of Trie root\n if (pChild.child[(Character.toLowerCase(boggle[i][j])) - 'a'] != null)\n {\n str = str+Character.toLowerCase(boggle[i][j]);\n\n //String word=str;\n\n searchWord(pChild.child[(Character.toLowerCase(boggle[i][j])) - 'a'],\n boggle, i, j, visited, str, list);\n\n\n str = \"\";\n }\n }\n }\n return list;\n }", "public Iterator<String> words();", "public Set<String> getWords() {\n\t\treturn Collections.unmodifiableSet(this.invertedIndex.keySet());\n\t}", "private static void boggleBoardSearch(Trie trie, char boggleBoardChars[][], int row, \r\n\t\t\tint col, boolean visitedTiles[][], String str, String[] valids) { \r\n\r\n\t\tif(trie.isInTrie(str.toUpperCase()) && str.length() > 2) {\r\n\t\t\tvalids[totalBoardWords] = str.toUpperCase();\r\n\t\t\ttotalBoardWords++;\r\n\t\t}\r\n\r\n\t\tif (validBoardTile(row, col, visitedTiles)) { \r\n\t\t\t// set the visited tile to TRUE in the array\r\n\t\t\tvisitedTiles[row][col] = true; \r\n\r\n\t\t\t//Goes through all the possible combinations of words based on that tile and previously\r\n\t\t\t// visited tiles\r\n\t\t\tfor (int i =0; i < 26; i++) { \r\n\r\n\t\t\t\tif (trie.getRoot().getChildren() != null) { \r\n\t\t\t\t\tchar ch = (char) (i + 'A') ; \r\n\r\n\t\t\t\t\t// checks all the possible tiles next to it for words,\r\n\t\t\t\t\t// up, upLeft, upRight, left, right, down, downLeft, downRight\r\n\t\t\t\t\tif (validBoardTile(row+1,col, visitedTiles) && boggleBoardChars[row+1][col] == ch) {\r\n\t\t\t\t\t\tboggleBoardSearch(trie,boggleBoardChars,row+1, col, visitedTiles,str+ch, valids); \r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (validBoardTile(row+1,col-1,visitedTiles) && boggleBoardChars[row+1][col-1] == ch) {\r\n\t\t\t\t\t\tboggleBoardSearch(trie,boggleBoardChars,row+1, col-1, visitedTiles,str+ch, valids); \r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (validBoardTile(row+1,col+1,visitedTiles) && boggleBoardChars[row+1][col+1] == ch) {\r\n\t\t\t\t\t\tboggleBoardSearch(trie,boggleBoardChars,row+1,col+1, visitedTiles,str+ch, valids); \r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (validBoardTile(row, col-1,visitedTiles)&& boggleBoardChars[row][col-1] == ch) {\r\n\t\t\t\t\t\tboggleBoardSearch(trie,boggleBoardChars,row,col-1, \tvisitedTiles,str+ch, valids); \r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (validBoardTile(row, col+1,visitedTiles) && boggleBoardChars[row][col+1] == ch) {\r\n\t\t\t\t\t\tboggleBoardSearch(trie,boggleBoardChars,row, col+1, visitedTiles,str+ch, valids); \r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (validBoardTile(row-1, col,visitedTiles) && boggleBoardChars[row-1][col] == ch) {\r\n\t\t\t\t\t\tboggleBoardSearch(trie,boggleBoardChars,row-1, col, visitedTiles,str+ch, valids);\r\n\t\t\t\t\t} \r\n\t\t\t\t\tif (validBoardTile(row-1,col-1,visitedTiles) && boggleBoardChars[row-1][col-1] == ch) {\r\n\t\t\t\t\t\tboggleBoardSearch(trie,boggleBoardChars,row-1, col-1, visitedTiles,str+ch, valids); \r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (validBoardTile(row-1,col+1,visitedTiles) && boggleBoardChars[row-1][col+1] == ch) {\r\n\t\t\t\t\t\tboggleBoardSearch(trie,boggleBoardChars,row-1, col+1, visitedTiles,str+ch, valids);\r\n\t\t\t\t\t} \r\n\t\t\t\t} \r\n\t\t\t} \r\n\t\t\t//since we are done testing this tile we set it back to being nonvisited for this test case\r\n\t\t\tvisitedTiles[row][col] = false; \r\n\t\t} \r\n\t}", "private List<String> getFilteredWords() {\r\n\t\tArrayList<String> filteredWords = new ArrayList<String>(16);\r\n\t\t\r\n\t\tfor (String word : allWords) {\r\n\t\t\tif (matchesFilter(word) == true) {\r\n\t\t\t\tfilteredWords.add(word);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn filteredWords;\r\n\t}", "public Set<String> getWords() {\n return wordsOccurrences.keySet();\n }", "public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "@Override\n\tpublic Set<String> getWordSet() {\n\t\tlock.lockReadOnly();\n\t\ttry {\n\t\t\treturn super.getWordSet();\n\t\t} finally {\n\t\t\tlock.unlockReadOnly();\n\t\t}\n\t}", "private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }", "public Set getBoardSet(String s){\n return board.getSet(s);\n }", "public Iterator words() {\n return index.keySet().iterator();\n }", "private static List<String> getCandidates(String w, Set<String> words) {\n List<String> result = new LinkedList<>();\n for (int i = 0; i < w.length(); i++) {\n char[] chars = w.toCharArray();\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n chars[i] = ch;\n String candidate = new String(chars);\n if (words.contains(candidate)) {\n result.add(candidate);\n }\n }\n }\n return result;\n }", "public Set<Square> validDestinations(Board b);", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static Collection<Character> getWhitelist(){\n\t\treturn new HashSet<Character>(kanjiWhitelist);\n\t}", "public ArrayList<String> getWords() {\n return words;\n }", "public ArrayList<String> FindAllCombinationWord(String str) {\r\n\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n int n = str.length();\r\n ArrayList<String> combinationWord = permute(str, 0, n - 1);\r\n\r\n for (String item : combinationWord) {\r\n int j = 0;\r\n for (int i = n; i >= 2; i--) {\r\n String finalString = item.substring(j);\r\n\r\n if (!wordList.contains(finalString)) {\r\n wordList.add(finalString);\r\n }\r\n j++;\r\n }\r\n }\r\n return wordList;\r\n }", "public List<String> legalMoves() {\n List<String> result = new ArrayList<>();\n for (int col = 1; col < _board.length + 1; col += 1) {\n for (int row = 1; row < _board.length + 1; row += 1) {\n String move = row + \",\" + col;\n if (isLegal(move)) {\n result.add(move);\n }\n }\n }\n return result;\n }", "public ArrayList <String> getWordList () {\r\n return words;\r\n }", "public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }", "public boolean isStringMadeofAllUniqueChars(String word) {\n if (word.length() > 128) {\n return false;\n }\n boolean[] char_set = new boolean[128];\n for (int i = 0; i < word.length(); i++) {\n int val = word.charAt(i);\n System.out.println(val);\n if (char_set[val]) {\n return false;\n }\n char_set[val] = true;\n }\n return true;\n }", "public Iterable<Board> solution() {\n\t\treturn result;\n\t}", "public int allWordsHorizontal(Board board, Dictionary dictionary, Scrabble game, int moves){\n // Initializes variables\n testBoard = board;\n String topHWord = \"\";\n int topHScore = 0;\n int topHRow=0;\n int topHCol=0;\n boolean theWay = true;\n boolean found = false;\n ArrayList<Piece> piecesOfTopWord = new ArrayList<Piece>();\n\n // Goes through ever point on the board\n for (int row = 0; row < 15; row++){\n for (int col = 0; col < 15; col++) {\n if (game.numOfMoves()==0){\n row = 7;\n col = 7;\n }\n \n // The word to make at that point\n mustUse=new ArrayList<Character>();\n mustUseVert=new ArrayList<Character>(); \n int retHorz = anagramAtSquare(row,col,col,0,false, moves);\n int retVert = anagramAtSquareVert(row,col,row,0,false, moves);\n \n // Puts the word on the board and checks to make sure valid word, and if it is top word it stores information about the word for horizontal words\n ArrayList<String> allAnagrams = null;\n if (retHorz!=-1){\n allAnagrams = allWords(retHorz, mustUse);\n for (int inde = 0; inde < allAnagrams.size(); inde++){\n ArrayList<String> test = dictionary.anagram(allAnagrams.get(inde).toLowerCase());\n if(test != null){\n for (int all = 0; all < test.size(); all++) {\n if (addToBoardHor(col, row, all, test, board)) {\n if (game.isValidMove()||moves==0) {\n ArrayList<ArrayList<Piece>> words = new ArrayList<ArrayList<Piece>>();\n words.addAll(board.words());\n if (game.isValidWord(words)){\n int trackScore=0;\n trackScore=board.scoreAI(words);\n if (board.numNonPinned() == 7)\n trackScore+=50;\n if (trackScore>topHScore && game.getStrength()){\n wordsToDisplay = new ArrayList<String>();\n for (int index = 0; index < words.size(); index++)\n {\n ArrayList<Piece> word = new ArrayList<Piece>();\n word = words.get(index);\n String wordToCheck = \"\";\n for (int indexInner = 0; indexInner < word.size(); indexInner++)\n wordToCheck += word.get(indexInner).theLetter();\n\n if (wordToCheck.length() > 1)\n wordsToDisplay.add(wordToCheck);\n }\n\n topHWord = test.get(all);\n topHScore = trackScore;\n topHRow=row;\n topHCol=col;\n theWay= true;\n found = true;\n piecesOfTopWord = words.get(0);\n } else if (trackScore>topHScore && trackScore<15){\n wordsToDisplay = new ArrayList<String>();\n for (int index = 0; index < words.size(); index++)\n {\n ArrayList<Piece> word = new ArrayList<Piece>();\n word = words.get(index);\n String wordToCheck = \"\";\n for (int indexInner = 0; indexInner < word.size(); indexInner++)\n wordToCheck += word.get(indexInner).theLetter();\n\n if (wordToCheck.length() > 1)\n wordsToDisplay.add(wordToCheck);\n }\n\n topHWord = test.get(all);\n topHScore = trackScore;\n topHRow=row;\n topHCol=col;\n theWay= true;\n found = true;\n piecesOfTopWord = words.get(0);\n }\n }\n \n board.clearNonPinned();\n } else {\n board.clearNonPinned();\n }\n }\n }\n }\n }\n }\n \n // Puts the word on the board and checks to make sure valid word, and if it is top word it stores information about the word for Vertical words\n allAnagrams = null;\n if (retVert!=-1){\n allAnagrams = allWords(retVert, mustUse);\n for (int inde = 0; inde < allAnagrams.size(); inde++){\n ArrayList<String> test = dictionary.anagram(allAnagrams.get(inde).toLowerCase());\n if(test != null){\n for (int all = 0; all < test.size(); all++) {\n if (addToBoardVer(col, row, all, test, board)) {\n if (game.isValidMove()||moves==0) {\n ArrayList<ArrayList<Piece>> words = new ArrayList<ArrayList<Piece>>();\n words.addAll(board.words());\n if (game.isValidWord(words)){\n int trackScore=0;\n trackScore=board.scoreAI(words);\n if (board.numNonPinned() == 7)\n trackScore+=50;\n if (trackScore>topHScore && game.getStrength()){\n wordsToDisplay = new ArrayList<String>();\n for (int index = 0; index < words.size(); index++)\n {\n ArrayList<Piece> word = new ArrayList<Piece>();\n word = words.get(index);\n String wordToCheck = \"\";\n for (int indexInner = 0; indexInner < word.size(); indexInner++)\n wordToCheck += word.get(indexInner).theLetter();\n\n if (wordToCheck.length() > 1)\n wordsToDisplay.add(wordToCheck);\n }\n \n topHWord = test.get(all);\n topHScore = trackScore;\n topHRow=row;\n topHCol=col;\n theWay=false;\n found = true;\n piecesOfTopWord = words.get(0);\n } else if (trackScore>topHScore && trackScore<15){\n wordsToDisplay = new ArrayList<String>();\n for (int index = 0; index < words.size(); index++)\n {\n ArrayList<Piece> word = new ArrayList<Piece>();\n word = words.get(index);\n String wordToCheck = \"\";\n for (int indexInner = 0; indexInner < word.size(); indexInner++)\n wordToCheck += word.get(indexInner).theLetter();\n\n if (wordToCheck.length() > 1)\n wordsToDisplay.add(wordToCheck);\n }\n \n topHWord = test.get(all);\n topHScore = trackScore;\n topHRow=row;\n topHCol=col;\n theWay=false;\n found = true;\n piecesOfTopWord = words.get(0);\n }\n }\n \n board.clearNonPinned();\n } else {\n board.clearNonPinned();\n }\n }\n }\n }\n }\n }\n \n if (game.numOfMoves()==0){\n row = 15;\n col = 15;\n }\n \n }\n }\n \n System.out.println(\"Top Word: \" + topHWord + \" Score: \" + topHScore + \" Row: \" + topHRow + \" Col: \" + topHCol+ \" HorOrVert: \" + theWay);\n for (int i = 0; i < piecesOfTopWord.size(); i++) {\n System.out.print(piecesOfTopWord.get(i).theLetter());\n }\n System.out.println();\n \n for (int i = 0; i < playersPieces.size(); i++) {\n System.out.print(playersPieces.get(i).theLetter());\n }\n System.out.println();\n \n // Returns what move to make\n if (found){\n putOnBoard(topHRow, topHCol, theWay,topHWord, piecesOfTopWord, board);\n return 1;\n }\n else if (!game.isBagEmpty()){\n return 2;\n }else\n return 3;\n }", "private ISet<String> getKeySet(IList<String> words) {\n\t\tISet<String> keySet = new ChainedHashSet<String>();\n\t\tfor (String word: words) {\n\t\t\tkeySet.add(word);\n\t\t}\n\t\treturn keySet;\n }", "Collection<CrosswordEntry> getCrosswordEntries();", "public static List<String> search(char[][] board, Set<String> set) {\n List<String> ret = new LinkedList<String>();\n if (set == null || set.size() == 0) return ret;\n boolean[][] visited = new boolean[board.length][board[0].length];\n for (int i = 0; i < board.length; i++) {\n for (int j = 0; j < board[0].length; j++) {\n search(board, i, j, \"\", set, visited, ret);\n }\n }\n return ret;\n }", "public ArrayList<Square> enemyValidSquares() {\r\n\t\tArrayList<Square> result = new ArrayList<Square>();\r\n\t\tArrayList<Square> enemyList = (myBoard.activeColour == Colour.WHITE) ? myBoard.myGame.blackList : myBoard.myGame.whiteList;\r\n\t\t//for every square in my enemy list\r\n\t\tArrayList<Move> tempList;\r\n\t\tfor (Square sq : enemyList) {\r\n\t\t\ttempList = sq.mySB.getValidMoves();\r\n\t\t\tfor (Move m: tempList) {\r\n\t\t\t\tresult.add(m.end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public Cursor getRejectedWords()\n\t{\n\t\treturn getWordsByType(DBConstants.WORDTYPE_REJECTED);\n\t}", "public WordSearchBoard(String[] wordBoardIn) {\r\n setBound(wordBoardIn);\r\n markBoard = new boolean[squareDimension][squareDimension];\r\n wordBoard = new String[squareDimension][squareDimension];\r\n int pos = 0;\r\n for (String s: wordBoardIn) {\r\n wordBoard[this.rowPos(pos)][this.colPos(pos)] = s.toUpperCase();\r\n pos++;\r\n }\r\n }", "private void findWordsOnBoard(String word, boolean[][] visited, char[][] board, int i, int j) {\n\n //mark visited word cell as true so we don't use it again in the formation of a word\n visited[i][j] = true;\n //add the word of cell just visited to the end of the word\n word += board[i][j];\n\n //if word is valid / in dictionary, add it to validWordsOnBoard, else ignore\n if(word.length() >= 3 && dictionary.search(word.toLowerCase()))\n {\n validWordsOnBoard.add(word);\n }\n\n\n for(int row = i - 1; row <= i + 1 && row < board.length; row++) {\n\n for(int column = j - 1; column <= j+ 1 && column < board[0].length; column++) {\n\n if(row >= 0 && column >= 0 && !visited[row][column]){\n\n if(dictionary.hasPrefix(word.toLowerCase())){\n findWordsOnBoard(word, visited, board, row, column);\n }\n }\n }\n }\n\n //take out the last letter (of just visited cell) from word\n String temp = word.substring(0,word.length()-1);\n word = temp;\n visited[i][j] = false;\n }", "public List<List<String>> wordSquares(String[] words) {\n if (words == null || words.length == 0) {\n return new ArrayList<>();\n }\n\n Trie trie = new Trie();\n for (String word : words) {\n trie.add(word);\n }\n\n Stack<String> stack = new Stack<>();\n List<List<String>> list = new ArrayList<>();\n int target = words[0].length();\n\n dfs(stack, list, trie, 0, target, \"\");\n\n return list;\n }", "private Set<Integer> getSynsetKeys(String word) {\n HashSet<Integer> kset = new HashSet<Integer>();\n\n for (ArrayList<String> o : synsetRev.keySet()) {\n for (String p : o) {\n if (p.equals(word)) {\n kset.add(synsetRev.get(o));\n }\n }\n }\n return kset;\n }", "public Set<Line> getPossibleMoves(Square[][] board) {\n Set<Line> empty = new HashSet<Line>();\n return getPossibleMoves(board, empty, 0);\n }", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "List<T> getWord();", "public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }", "public boolean allUnique(String word) {\n if(word == null || word.length() <= 1) {\n return false;\n }\n char[] array = word.toCharArray();\n int[] alphabet = new int[8];\n for (char c : array) {\n int bitindex = c;\n int row = bitindex / 32;\n int col = bitindex % 32;\n if ((alphabet[row] & (1 << col)) != 0) {\n return false;\n } else {\n alphabet[row] = alphabet[row] | (1 << col);\n }\n }\n return true;\n }", "public static List<String> validWords(List<String> words)\n\t{\n\t\tStemmer stemmer = new Stemmer();\n\t\tList<String> goodWords = new ArrayList<String>();\n\t\tfor (String word : words)\n\t\t{\n\t\t\tString stem = stemmer.stem(word);\n\t\t\tif (dictUtils.dict.containsKey(stem))\n\t\t\t{\n\t\t\t\tgoodWords.add(dictUtils.dict.get(stem));\n\t\t\t}\n\t\t}\n\t\treturn goodWords;\n\t}", "public static Set getAllEnzymes()\n {\n return Collections.unmodifiableSet(enzymeToPattern.keySet());\n }", "public static Set<String> createSet() {\n Set<String> set = new HashSet<>();\n set.add(\"lesson\");\n set.add(\"large\");\n set.add(\"link\");\n set.add(\"locale\");\n set.add(\"love\");\n set.add(\"light\");\n set.add(\"limitless\");\n set.add(\"lion\");\n set.add(\"line\");\n set.add(\"lunch\");\n set.add(\"level\");\n set.add(\"lamp\");\n set.add(\"luxurious\");\n set.add(\"loop\");\n set.add(\"last\");\n set.add(\"lie\");\n set.add(\"lose\");\n set.add(\"lecture\");\n set.add(\"little\");\n set.add(\"luck\");\n\n return set;\n }", "Set<String> getUniqueCharacterStrings();", "public List<Word> getWordsWithGivenLetter(Text text, char ch) {\n\n List<Word> allWords = getTextWords(text.getBookText());\n\n List<Word> words = new ArrayList<Word>();\n\n for (int i = 0; i < allWords.size(); i++) {\n Word tempWord = new Word(allWords.get(i).getCharsSequence());\n if (logic.isWordContainChar(tempWord, ch)) {\n if (!words.contains(tempWord)) {\n words.add(tempWord);\n }\n }\n }\n\n Collections.sort(words, new WordGivenCharComparator(ch));\n\n return words;\n }", "@Test\n public void boggle(){\n BoggleBoard board = new BoggleBoard(\"datasets/board5x5.txt\");\n\n BogglePlayer player = new BogglePlayer(Permeate.textToStringAr(\"datasets/dictionary-yawl.txt\"));\n\n for (String word : player.getAllValidWords(board)) {\n System.out.println(word);\n }\n assertEquals(2911,player.getMaximumScore(board));\n }", "public List<Map.Entry<String, Integer>> getWordList(){\n\t\treturn new ArrayList<>(GeneralWordCounter.entrySet());\n\t}", "boolean allWordsGuessed()\n\t{\n\t\tfor( int i = 0; i < entry.getLinkedWords().size(); i++ )\n\t\t\tif( ! wordGuessed[i] )\n\t\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "private Set<BoardObject> populateBoard(){\r\n\t\tSet<BoardObject> ob = new HashSet<BoardObject>();\r\n\t\tob.addAll(createCharacters());\r\n\t\tob.addAll(createWeapons());\r\n\t\treturn ob;\r\n\t}", "public synchronized List<String> getCompletedWords() {\n\t\treturn this.humanPlayerGrid.getCompletedWordList();\n\t}", "@Override\r\n\t@CacheCable(key=\"'wfx:SensitiveWord'\" ,value=\"value\",expiration=24*60*60)\r\n\tpublic List<String> getAllSensitiveWord() {\n\t\treturn shopMapper.getAllSensitiveWord();\r\n\r\n\t}", "public Cursor getAcceptedWords()\n\t{\n\t\treturn getWordsByType(DBConstants.WORDTYPE_ACCEPTED);\n\t}", "private ArrayList<String> matchingWords(String word){\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tfor(int i=0; i<words.size();i++){\n\t\t\tif(oneCharOff(word,words.get(i))){\n\t\t\t\tlist.add(words.get(i));\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}", "public Set<Character> characters(){\r\n\t\tSet<Character> characters = new HashSet<Character>();\r\n\t\tfor(BoardObject object: boardObjects){\r\n\t\t\tif(object instanceof Character)\r\n\t\t\t\tcharacters.add((Character) object);\r\n\t\t}\r\n\t\treturn characters;\r\n\t}", "public Set<String> getAllKnownWords() throws IOException {\n log.info(\"Reading all data to build known words set.\");\n Set<String> words = new HashSet<>();\n if (this.hasTrain()) {\n for (AnnoSentence sent : getTrainInput()) {\n words.addAll(sent.getWords());\n }\n }\n if (this.hasDev()) {\n for (AnnoSentence sent : getDevInput()) {\n words.addAll(sent.getWords());\n }\n }\n if (this.hasTest()) {\n for (AnnoSentence sent : getTestInput()) {\n words.addAll(sent.getWords());\n }\n }\n return words;\n }", "public static Set<String> getEnglishWords()\n{\n return english_words;\n}", "public boolean[][] validateWord(String s, Set<String> set) {\n boolean[][] isWord = new boolean[s.length()][s.length()];\n for (int i = 0; i < s.length(); i++) {\n for (int j = i; j < s.length(); j++) {\n isWord[i][j] = set.contains(s.substring(i, j + 1));\n }\n }\n return isWord;\n }", "public static void main(String args[])\n {\n // Let the given dictionary be following\n String dictionary[] = {\"hit\", \"hits\", \"kilts\", \"pEg\",\"peN\",\"pentAgon\",\"slit\",\"slits\",\"sTilts\"};\n\n\n\n char boggle[][] = {{'P','W','Y','R'},\n {'E','N','T','H'},\n {'G','S','I','Q'},\n {'O','L','S','A'}\n };\n\n String[] val=findWords(boggle,dictionary);\n\n System.out.println(Arrays.toString(val));\n\n\n }", "private StopWords() {\r\n\t\tPath source = Paths.get(\"./dat/zaustavne_rijeci.txt\");\r\n\t\ttry {\r\n\t\t\tbody = new String(Files.readAllBytes(source),\r\n\t\t\t\t\tStandardCharsets.UTF_8);\r\n\t\t} catch (IOException ignorable) {\r\n\t\t}\r\n\t\twords = new LinkedHashSet<>();\r\n\t\tfillSet();\r\n\t}", "public Set<String> getLocations(String word) {\n\t\tif (this.invertedIndex.get(word) == null) {\n\t\t\treturn Collections.emptySet();\n\t\t} else {\n\t\t\treturn Collections.unmodifiableSet(this.invertedIndex.get(word).keySet());\n\t\t}\n\t}", "public boolean accepts(String word) {\n List<Character> chars = word.chars().mapToObj(it -> (char) it).collect(Collectors.toList());\n return this.initialState.traverse(chars);\n }", "public String[] getLettersOfAllGames(){\n String[] letters = new String[9];\n int z = 0;\n for (SmallGameBoard game: getAllGames()) {\n String letter = game.getLetterOfWinner();\n letters[z] = letter;\n z++;\n }\n return letters;\n }", "public List<Integer> getLegalMoves()\n\t{\n\t\tArrayList<Integer> moves = new ArrayList<Integer>();\n\t\tfor (int col = 0; col < cols; col++)\n\t\t{\n\t\t\tif (isEmpty(0,col))\n\t\t\t\tmoves.add(col);\n\t\t}\n\t\treturn moves;\n\t}", "@Override\r\n\tpublic Set<Wall> getWalls(Board board) throws UnsupportedOperationException\r\n\t{\r\n\t\treturn board.getElements(Wall.class);\r\n\t}", "public List<Word> getCleanWordList(String moduleName) {\n return moduleList.stream()\n .skip(moduleList.size() - 1)\n .map(item -> new Word(item, moduleName))\n .collect(Collectors.toList());\n }", "@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }", "public Vector<Word> allKeyValue(){\n\n\tVector<Word> words = new Vector<Word>();\n\tfor(int w = 0; w < theTable.length; w++){\n\t // System.out.println(\"w: \" + w);\n\t // System.out.println(\"theTable[w]: \" + theTable[w]);\n\t if(theTable[w] != null){\n\t\twords.addElement(theTable[w]);\n\t }\n\t}\n\treturn words;\n }", "public List<Preference<CharacterSet>> getAcceptedCharacterSets() {\n // Lazy initialization with double-check.\n List<Preference<CharacterSet>> a = this.acceptedCharacterSets;\n if (a == null) {\n synchronized (this) {\n a = this.acceptedCharacterSets;\n if (a == null) {\n this.acceptedCharacterSets = a = new ArrayList<Preference<CharacterSet>>();\n }\n }\n }\n return a;\n }", "public String [] get_word_array(){\n\t\treturn word_array;\n\t}", "public BoardSquare[] findSet() {\n ArrayList<BoardSquare> allCards = new ArrayList<>(12);\n\n // flatten BoardSquares into one-dimensional array\n for (int row = 0; row < board.numRows(); row++)\n for (int col = 0; col < board.numCols(); col++)\n allCards.add(board.getBoardSquare(row, col));\n\n // loop through every single unique card combination\n for (int i1 = 0; i1 < allCards.size(); i1++) {\n for (int i2 = 1; i2 < allCards.size(); i2++) {\n for (int i3 = 2; i3 < allCards.size(); i3++) {\n if (i1 != i2 && i2 != i3 && i1 != i3) {\n BoardSquare bs1 = allCards.get(i1);\n BoardSquare bs2 = allCards.get(i2);\n BoardSquare bs3 = allCards.get(i3);\n\n boolean set = Card.isSet(\n bs1.getCard(),\n bs2.getCard(),\n bs3.getCard()\n );\n\n if (set)\n return new BoardSquare[] {bs1, bs2, bs3};\n }\n }\n }\n }\n\n // if no set found, return empty Array\n return new BoardSquare[] {};\n }", "public static Set<String> getUniqueWords(String input) {\r\n HashSet<String> hSet = new HashSet<String>();\r\n ArrayList<String> words = getWords(input);\r\n for(String word: words) {\r\n if(!hSet.contains(word)) {\r\n hSet.add(word);\r\n }\r\n }\r\n return hSet;\r\n }", "@Override\r\n\tpublic Set<Robot> getRobots(Board board)\r\n\t{\r\n\t\treturn board.getElements(Robot.class);\r\n\t}", "public ArrayList<String> wordList(){\n\t\treturn list;\n\t}", "private boolean checkWord() {\n \tboolean bl = false;\n \tfor (int i = 0; i < word.length(); i++) {\n \t\tif (letter == word.charAt(i) && list[i] != true) {\n \t\t\tlist[i] = true;\n \t\t\tnumberOfSymbols++;\n \t\t\tbl = true;\n \t\t}\n \t}\n \treturn bl;\n }", "public Iterable<Board> solution() {\n return solution;\n }", "public List<Move> getAvailableSpaces() {\n List<Move> availableMoves = new ArrayList<>();\n for (int i = 0; i < LENGTH; i++) {\n for (int j = 0; j < LENGTH; j++) {\n Move move = new Move(i, j);\n if (isValidMove(move)) {\n availableMoves.add(move);\n }\n }\n }\n return availableMoves;\n }", "public Set<String> getStopWords() throws Exception{\n\tFile file = new File(\"stopWords/stopwords.txt\");\n\tHashSet<String> stopwords = new HashSet<>();\n\tBufferedReader br = new BufferedReader(new FileReader(file));\n\tString line;\n\twhile((line=br.readLine())!=null){\n\t\tString[] tokens = line.split(\" \");\n\t\tfor(String token : tokens){\n\t\t\tif(!stopwords.contains(token)){\n\t\t\t\tstopwords.add(token);\n\t\t\t}\n\t\t}\n\t}\n\tbr.close();\n\treturn stopwords;\n\t}", "public static List<String> getValidSuits() {\n return Arrays.asList(\"Spades\", \"Clubs\", \"Hearts\", \"Diamonds\");\n }", "public BoggleSolver(String[] dictionary) {\n wordsSoFar = new ArrayList<String>();\n // 1. build the trie tree of the dictionary\n dict = new NewTrieSet();\n for (String s : dictionary) {\n if (s.length() >= MIN_WORD_LENGTH)\n dict.add(s);\n }\n }", "public ArrayList<Move> getPossibilities(Move letters, ArrayList<Tile> rack) {\n\t\t// check for an empty letter list (invalid input)\n\t\tif (letters == null || letters.size() == 0)\n\t\t\treturn new ArrayList<Move>();\n\t\t// check if the move is the first move of the game\n\t\tif (isEmpty())\n\t\t\treturn getFirstMoves(letters, rack);\n\t\t// create list of possible moves\n\t\tArrayList<Move> moves = new ArrayList<Move>();\n\t\tint r = 0;\n\t\tint c = 0;\n\t\t// create a list of empty squares adjacent to letters on the board\n\t\tArrayList<Coord> adj = new ArrayList<Coord>();\n\t\t// for each letter on the board, check if the word can be added in the\n\t\t// vertical or horizontal direction using the letter already on the\n\t\t// board, which is compared with every letter in the word\n\t\tfor (int i = 0; i < lettersInPlay.size(); i++) {\n\t\t\tfor (int j = 0; j < letters.size(); j++) {\n\t\t\t\tif (lettersInPlay.get(i).getChar() == letters.get(j).getChar()) {\n\t\t\t\t\t// move is a singular possible move for a list of letters\n\t\t\t\t\tMove move;\n\t\t\t\t\tif (letters.size() > 1) {\n\t\t\t\t\t\tmove = findVerticalIntersections(letters, j, i, rack);\n\t\t\t\t\t\tif (move != null && !moves.contains(move))\n\t\t\t\t\t\t\tmoves.add(move);\n\t\t\t\t\t\tmove = findHorizontalIntersections(letters, j, i, rack);\n\t\t\t\t\t\tif (move != null && !moves.contains(move))\n\t\t\t\t\t\t\tmoves.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// if there are enough blanks to cover for the letters that aren't in\n\t\t// the rack of the player, initialize the list of empty tiles adjacent\n\t\t// to tiles already on the board\n\t\tfor (int i = 0; i < lettersInPlay.size(); i++) {\n\t\t\tr = lettersInPlay.get(i).getLoc().getRow();\n\t\t\tc = lettersInPlay.get(i).getLoc().getCol();\n\t\t\tif (r - 1 >= 0 && board[r - 1][c].getLetter() == null\n\t\t\t\t\t&& !adj.contains(new Coord(r - 1, c)))\n\t\t\t\tadj.add(new Coord(r - 1, c));\n\t\t\tif (c - 1 >= 0 && board[r][c - 1].getLetter() == null\n\t\t\t\t\t&& !adj.contains(new Coord(r, c - 1)))\n\t\t\t\tadj.add(new Coord(r, c - 1));\n\t\t\tif (r + 1 < len && board[r + 1][c].getLetter() == null\n\t\t\t\t\t&& !adj.contains(new Coord(r + 1, c)))\n\t\t\t\tadj.add(new Coord(r + 1, c));\n\t\t\tif (c + 1 < len && board[r][c + 1].getLetter() == null\n\t\t\t\t\t&& !adj.contains(new Coord(r, c + 1)))\n\t\t\t\tadj.add(new Coord(r, c + 1));\n\t\t}\n\t\t// move is a singular possible move for a list of letters\n\t\tMove move;\n\t\t// for every coordinate in the list of adjacent sqaures, check if\n\t\t// the word can be added in the vertical or horizontal direction,\n\t\t// using the coordinate as the starting point for each letter in the\n\t\t// word being checked\n\t\tfor (int i = 0; i < adj.size(); i++) {\n\t\t\tfor (int j = 0; j < letters.size(); j++) {\n\t\t\t\tmove = findVerticalAdj(letters, j, adj.get(i), rack);\n\t\t\t\tif (move != null && !moves.contains(move))\n\t\t\t\t\tmoves.add(move);\n\t\t\t\tmove = findHorizontalAdj(letters, j, adj.get(i), rack);\n\t\t\t\tif (move != null && !moves.contains(move))\n\t\t\t\t\tmoves.add(move);\n\t\t\t}\n\t\t}\n\t\tif (moves.size() == 0)\n\t\t\treturn new ArrayList<Move>();\n\t\treturn moves;\n\t}", "private ArrayList<String> getPossibleMoves(String boardString) {\n ArrayList<String> reachableBoards = new ArrayList<>();\n for (int i = 0; i < 9; i++) {\n if ((new AIBoard(boardString, 0)).isValidMove(i)) {\n Board board = new Board(boardString);\n board.makeAMove(i);\n reachableBoards.add(board.toString());\n }\n }\n\n return reachableBoards;\n }", "public BoardInterface[] getBoards();", "String[][] getBoard();", "private Set<String> replacementHelper(String word) {\n\t\tSet<String> replacementWords = new HashSet<String>();\n\t\tfor (char letter : LETTERS) {\n\t\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\t\treplacementWords.add(word.substring(0, i) + letter + word.substring(i + 1));\n\t\t\t}\n\t\t}\n\t\treturn replacementWords;\n\t}", "public static boolean areWords(Set<String> toBeChecked)\n\t{\n\t\tfor (String word : toBeChecked)\n\t\t{\n\t\t\tif (! dictionary.contains(word))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "List<ValidMove> getValidMoves();", "private static Stream<String> createBadWordsDetectingStream(String text, \n List<String> badWords) {\n\t \treturn Arrays.stream(text.split(\" \")).filter(el -> !badWords.contains(el)).distinct().sorted().collect(Collectors.toList()).stream();\n\t }", "public boolean[] validatePossibility(String s, Set<String> set, boolean[][] isWord) {\n \t/*\n \tboolean[] valid = new boolean[s.length() + 1];\n \tvalid[s.length()] = true;\n\n \tint maxLeng = getMaxLength(set);\n \tfor (int i = s.length() - 1; i >= 0; i--) {\n \t\tfor (int j = i; j < s.length() && (j - i) <= maxLeng; j++) {\n \t\t\tif (isWord[i][j] && valid[j + 1]) {\n \t\t\t\tvalid[i] = true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}*/\n// boolean[] valid = new boolean[s.length() + 1];\n// valid[0] = true;\n// int maxLength = getMaxLength(set);\n// for (int i = 0; i < s.length(); i++) {\n// for (int j = 0; j < i && j < maxLength; j++) {//iterate [0 ~ i]\n// if (isWord[i - j][i] && isValid[i - j + 1])) {\n// valid[i + 1] = true;\n// break;\n// }\n// }\n// }\n//\n// return valid;\n\n boolean[] rst = new boolean[s.length() + 1];\n rst[0] = true;\n if (s == null || set.contains(s)) {\n return rst;\n }\n for (int i = 0; i < s.length(); i++) {\n for (int j = 0; j <= i; j++) {\n if (rst[j] && set.contains(s.substring(j, i + 1))) {\n rst[i + 1] = true;\n break;\n }\n }\n }\n return rst;\n }", "@Override\r\n\tpublic Set<RepairKit> getRepairKits(Board board)\r\n\t{\r\n\t\treturn board.getElements(RepairKit.class);\r\n\t}" ]
[ "0.84632343", "0.8348497", "0.8255916", "0.7879105", "0.7841079", "0.6512109", "0.6417504", "0.63576347", "0.6354491", "0.6348851", "0.58696514", "0.58644927", "0.58348095", "0.5585982", "0.5537117", "0.55251676", "0.55154365", "0.54860914", "0.54842347", "0.54621726", "0.54558164", "0.540907", "0.5399138", "0.5330006", "0.5311806", "0.5310201", "0.52907914", "0.5243809", "0.52394664", "0.5234132", "0.5228428", "0.52275085", "0.5200993", "0.5192931", "0.51825196", "0.517799", "0.515189", "0.5135409", "0.51242083", "0.5120322", "0.5115328", "0.5109493", "0.5103906", "0.5102902", "0.5092457", "0.50450224", "0.50436056", "0.50348043", "0.5027284", "0.5018522", "0.5017877", "0.5015909", "0.49903876", "0.4984237", "0.4982796", "0.49787036", "0.49758315", "0.49408922", "0.49350935", "0.49268344", "0.49195284", "0.4906449", "0.49043536", "0.49040344", "0.49024868", "0.4893311", "0.48885402", "0.48829257", "0.48711246", "0.4853969", "0.4850716", "0.48443192", "0.4840724", "0.48395655", "0.48384824", "0.48381123", "0.48361072", "0.48353815", "0.48205128", "0.4819127", "0.48173022", "0.48066616", "0.48061535", "0.48026112", "0.47985974", "0.4792302", "0.47887793", "0.47706857", "0.4766659", "0.47659898", "0.47493535", "0.47465676", "0.4740876", "0.47402468", "0.47384942", "0.4722282", "0.47191292", "0.47096702", "0.47037405", "0.46980724" ]
0.8339207
2
If a word is found on this TST node, append it to results.
private void dfs(int y, int x, boolean[][] visited, Set<String> results, BoggleBoard board, TST.BacktrackTraverser<Integer> bt) { if (bt.hasValue()) { String word = appendU(bt.getWord()); if (bt.getValue() > 0) { results.add(word); } } // Check every unused nearby grid. // Only continue on grid if there's some word down the TST. for (int[] dir : directions) { int[] moved = move(y, x, dir); if (!inBound(moved, board)) { continue; } if (visited[moved[0]][moved[1]]) { continue; } char singleLetter = board.getLetter(moved[0], moved[1]); if (!bt.hasDown(singleLetter)) { continue; } visited[moved[0]][moved[1]] = true; bt.down(singleLetter); dfs(moved[0], moved[1], visited, results, board, bt); bt.up(); visited[moved[0]][moved[1]] = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void wordSearch(String word, HashMap<String, SearchResult> resultMap, ArrayList<SearchResult> words) {\n\t\tfor (String path : index.get(word).keySet()) {\n\t\t\tint frequency = index.get(word).get(path).size();\n\t\t\tint initialPosition = index.get(word).get(path).first();\n\t\t\t\n\t\t\tif (!resultMap.containsKey(path)) {\n\t\t\t\tresultMap.put(path, new SearchResult(frequency, initialPosition, path));\n\t\t\t\twords.add(resultMap.get(path));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSearchResult searchResult = resultMap.get(path);\n\t\t\t\tsearchResult.addToFrequency(frequency);\n\t\t\t\tsearchResult.updateInitialPosition(initialPosition);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public String search(String word) {\n return search(word, root);\n }", "private String search_words(String word, int index){\n\t\tString found_words = \"\";\n\t\tint local_index = index +1;\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\tif(local_index > word.length()-1 || word.toLowerCase().charAt(local_index) == Character.toLowerCase(child.getRepresentative_letter()))\n\t\t\t\tfound_words += child.search_words(word, local_index);\n\t\t}\n\t\tif(current_word != null && word.length() > current_word.length())\n\t\t\treturn found_words;\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word.toLowerCase().equals(word.toLowerCase()) ? current_word +\" & \" + definition + \"#\" + found_words +\"#\" : current_word + \"#\" + found_words;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word.toLowerCase().equals(word.toLowerCase()) ? current_word +\" & \" + definition + \"#\": current_word+ \"#\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}", "public String search_words(String word){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs)\n\t\t\tif(word.toLowerCase().charAt(0) == Character.toLowerCase(child.getRepresentative_letter()))\n\t\t\t\tfound_words += child.search_words(word, 0);\n\t\t\n\t\treturn found_words;\n\t}", "public void addWord(String word) {\n // Write your code here\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n now.children.put(c, new TrieNode());\n }\n now = now.children.get(c);\n }\n now.hasWord = true;\n }", "public void addWord(String word) {\n TrieNode cur = root;\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n TrieNode node = cur.children.get(c);\n if(node == null) {\n node = new TrieNode();\n cur.children.put(c, node);\n }\n cur = node;\n }\n cur.isEnd = true;\n }", "public void addWord(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n curr = curr.chars.computeIfAbsent(c, (k) -> new TrieNode());\n\n }\n curr.isWord = true;\n }", "public void addWord(String word) {\n if (word != null){\n Map<Character, TrieNode> children=root.children;\n for (int i=0;i<word.length();i++){\n char c=word.charAt(i);\n TrieNode t;\n if (children.containsKey(c)){\n t=children.get(c);\n }else {\n t=new TrieNode(c);\n children.put(c, t);\n }\n children=t.children;\n if (i==word.length()-1){\n t.isLeaf=true;\n }\n }\n }\n }", "private void searchWord()\n {\n String inputWord = searchField.getText();\n \n if(inputWord.isEmpty())\n queryResult = null;\n \n else\n {\n char firstLetter = inputWord.toUpperCase().charAt(0);\n \n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n if(lexiNodeTrees.get(i).getCurrentCharacter() == firstLetter)\n {\n queryResult = lexiNodeTrees.get(i).searchWord(inputWord, false);\n i = lexiNodeTrees.size(); // escape the loop\n }\n }\n }\n \n // update the list on the GUI\n if(queryResult != null)\n {\n ArrayList<String> words = new ArrayList<>();\n for(WordDefinition word : queryResult)\n {\n words.add(word.getWord());\n }\n \n // sort the list of words alphabetically \n Collections.sort(words);\n \n // display the list of wordsin the UI\n DefaultListModel model = new DefaultListModel();\n for(String word : words)\n {\n model.addElement(word);\n }\n\n this.getSearchSuggestionList().setModel(model);\n }\n \n else\n this.getSearchSuggestionList().setModel( new DefaultListModel() );\n }", "public void addWord(String word) {\n if (word !=null && word.length() > 0) {\n TrieNode t = this.root;\n for (int i = 0; i < word.length(); i++) {\n int offset = word.charAt(i) - 'a';\n if (t.children[offset] == null) {\n t.children[offset] = new TrieNode();\n }\n t = t.children[offset];\n if (i == word.length() - 1) {\n t.endWithWord = true;\n }\n }\n }\n }", "public void addWord(String word) {\n // Write your code here\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (now.children[c - 'a'] == null) {\n now.children[c - 'a'] = new TrieNode();\n }\n now = now.children[c - 'a'];\n }\n now.hasWord = true;\n }", "public void addWord(String word) {\n // Write your code here\n TrieNode cur=root;\n for(int i=0;i<word.length();++i){\n char c=word.charAt(i);\n TrieNode nextNode=cur.children.get(c);\n if(nextNode==null){\n nextNode=new TrieNode();\n cur.children.put(c,nextNode);\n }\n cur=nextNode;\n }\n cur.hasWord=true;\n }", "public void addWord(String word) {\n TrieNode node = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (!node.children.containsKey(c)) {\n node.children.put(c, new TrieNode());\n }\n node = node.children.get(c);\n }\n node.isEnd = true;\n }", "public void addWord(String word) {\n TrieNode curr = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (curr.children[c - 'a'] == null )\n curr.children[c - 'a'] = new TrieNode();\n curr = curr.children[c - 'a'];\n }\n curr.end = true;\n }", "public void addWord(String word) {\r\n Trie node = root;\r\n for(char ch: word.toCharArray()){\r\n if(node.child[ch - 'a'] == null)\r\n node.child[ch - 'a'] = new Trie(ch);\r\n node = node.child[ch - 'a'];\r\n }\r\n node.end = true;\r\n }", "public void addWord(String word) {\n char[] wordChars = word.toCharArray();\n TrieNode curr = root;\n for (char c : wordChars) {\n if(curr.map.containsKey(c)) {\n curr = curr.map.get(c);\n } else {\n TrieNode newNode = new TrieNode();\n curr.map.put(c, newNode);\n curr = newNode;\n }\n }\n curr.isLeaf = true;\n }", "public void addWord(String word) {\n HashMap<Character, TrieNode> children = root.children;\n TrieNode Tnode;\n char[] charArray = word.toCharArray();\n for (int i = 0; i < word.length(); i++) {\n if (children.containsKey(charArray[i])) {\n Tnode = children.get(charArray[i]);\n }\n else\n {\n Tnode = new TrieNode(charArray[i]);\n children.put(charArray[i], Tnode);\n }\n children = Tnode.children;\n\n if (i == word.length() - 1) {\n Tnode.isLeaf = true;\n }\n }\n }", "public void addWord(String word) {\n TrieNode cur = root;\n for (int i=0; i<word.length(); i++) {\n int pos = word.charAt(i) - 'a';\n if (cur.next[pos] == null) {\n cur.next[pos] = new TrieNode();\n }\n cur = cur.next[pos];\n }\n cur.isWord = true;\n }", "public void addWord(String word) {\n char[] chs = word.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n cur.map[ind] = new TreeNode();\n }\n cur = cur.map[ind];\n }\n cur.end = true;\n }", "public void addWord(String word) {\n TrieNode cur = root;\n for(char c : word.toCharArray()) {\n if(cur.next[c-'a'] == null) {\n cur.next[c-'a'] = new TrieNode(c);\n }\n cur = cur.next[c-'a'];\n }\n cur.isWord = true;\n }", "public static ArrayList<Word> search(String inputString){\n Node current = root;\n \n // remove doubles and make aphameticals\n Word tempWord = new Word(inputString);\n \n String s = tempWord.getTrieWord();\n \n ArrayList<Word> results = new ArrayList<Word>();\n ArrayList<Word> fuzzyResults = new ArrayList<Word>();\n\n while(current != null){\n \n for(int i=0;i<s.length();i++){ \n if(current.subNode(s.charAt(i)) == null){\n System.out.println(\"WE Have an extra letter ------ !!!!\");\n Collections.sort(results, new CustomComparator()); \n return results;\n }\n else\n current = current.subNode(s.charAt(i));\n \n if(i==inputString.length()-2){\n fuzzyResults.addAll(current.possibleWords);\n }\n \n }\n \n if (current.marker == true)\n results.addAll(current.possibleWords);\n \n // return results; // place here for no problems\n \n }\n \n \n \n //remove fuzzyResults from normal results\n for(int r=0; r<results.size(); r++){\n \n if(results.get(r).isFuzzy){\n results.remove(r);\n r--;\n }\n }\n \n \n // Go through fuzzy results and only accept ones that are less than 1 char of search string\n for(int r=0; r<fuzzyResults.size(); r++){\n \n if(((fuzzyResults.get(r).getWord().length()-1)==inputString.length()) && fuzzyResults.get(r).isFuzzy ){\n results.add(fuzzyResults.get(r)); \n }\n }\n \n Collections.sort(results, new CustomComparator()); \n\n return results;\n \n }", "public AddAndSearchWord() {\n root = new TrieNode();\n }", "@Override\n public boolean search(final String word) {\n final TrieNode p = searchNode(word);\n if (p == null) {\n return false;\n } else {\n return p.isEnd;\n }\n\n }", "public void addWord(String word)\n {\n TrieNode1 node = root;\n for (char c:word.toCharArray())\n {\n if (node.childerens[c-'a']==null)\n {\n node.childerens[c-'a'] = new TrieNode1();\n }\n node = node.childerens[c-'a'];\n }\n node.isEnd = true;\n\n }", "public void addWord(String word) {\n \tTrieNode curr=root;\n for(int i=0;i<word.length();i++){\n \tchar ch=word.charAt(i);\n \tif(curr.children[ch-'a']==null)\n \t\tcurr.children[ch-'a']=new TrieNode();\n \tif(i==word.length()-1)\n \t\tcurr.children[ch-'a'].isCompleteword=true;\n \t\n \tcurr=curr.children[ch-'a'];\n }\n }", "public void add(String word, String url) {\n \n // don't need to add this word if it's a stop word\n for (String stopWord : Settings.getStopWords()) {\n if (word.equalsIgnoreCase(stopWord)) return;\n }\n \n // don't need to add this word if it's already in here\n StringNode check = locate(word);\n if (check != null) {\n check.getPagesContainingWord().add(url);\n return;\n }\n \n // not a stop word, not present--need to add it\n StringNode newNode = new StringNode(word, new URLLinkedList());\n newNode.getPagesContainingWord().add(url);\n if (first == null) { // if first is null, there's nothing in the list\n first = newNode; // set first to this new node\n newNode.getPagesContainingWord().add(url);\n }\n else { // first isn't null, so we want to find the correct place to put this new node\n StringNode current = first;\n // this barebones linked list is very inconvenient, so we have to make a special \n // check for the first item in the list.\n if (word.compareTo(current.getWord()) < 0) { // the word in the new node goes before the word in the first node\n first = newNode; // now the new node is the first one\n newNode.setNext(current); // and its next is the old first one\n }\n else if (!current.hasNext()) { // no next node, so this word goes after current\n current.setNext(newNode);\n }\n else { // new node doesn't go before first, so check the rest of the list\n boolean newNodePlaced = false;\n StringNode previous;\n while (current.hasNext() && !newNodePlaced) { \n previous = current;\n current = current.getNext(); // grab next node\n if (word.compareTo(current.getWord()) < 0) { // new word goes before this one\n// StringNode oldNext = current.getNext();\n// current.setNext(newNode);\n// newNode.setNext(oldNext);\n// newNodePlaced = true;\n previous.setNext(newNode);\n newNode.setNext(current);\n newNodePlaced = true;\n }\n }\n if (!newNodePlaced) { // if we're here and haven't yet placed the node, it goes at the end\n current.setNext(newNode);\n }\n }\n }\n size++;\n }", "public void addWord(String word) {\n root = put(root, word, 0);\n }", "public void insert(String word) {\n TrieNode cur = root;\n HashMap<Character, TrieNode> curChildren = root.children;\n char[] wordArray = word.toCharArray();\n for(int i = 0; i < wordArray.length; i++){\n char wc = wordArray[i];\n if(curChildren.containsKey(wc)){\n cur = curChildren.get(wc);\n } else {\n TrieNode newNode = new TrieNode(wc);\n curChildren.put(wc, newNode);\n cur = newNode;\n }\n curChildren = cur.children;\n if(i == wordArray.length - 1){\n cur.hasWord= true;\n }\n }\n }", "public void addWord(String word) {\n maxLength = Math.max(maxLength, word.length());\n\n TrieNode temp = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (temp.children[c - 'a'] == null) {\n temp.children[c - 'a'] = new TrieNode(c);\n }\n temp = temp.children[c - 'a'];\n }\n temp.isWord = true;\n }", "public boolean addWord(String word) {\n // TODO: Implement this method.\n char[] c = word.toLowerCase().toCharArray();\n\n TrieNode predptr = root;\n boolean isWord = false;\n\n for (int i = 0, n = c.length; i < n; i++) {\n TrieNode next = predptr.insert(c[i]);\n\n if (next != null) {\n predptr = next;\n } else {\n predptr = predptr.getChild(c[i]);\n }\n\n if (i == n - 1) {\n if (!predptr.endsWord()) {\n size++;\n isWord = true;\n predptr.setEndsWord(true);\n }\n }\n\n }\n return isWord;\n }", "public boolean search(String word) {\n if (all.contains(word)){\n return true;\n }\n TrieNode head = root;\n return search(word,head,0);\n \n }", "public void addWord(String word) {\n all.add(word);\n TrieNode head = root;\n \n for (char i :word.toCharArray()){\n\n int k = i-'a';\n if (head.child[k]==null)\n {\n head.child[k] = new TrieNode();\n }\n head = head.child[k];\n \n }\n head.end = true;\n }", "public void addWord(String word) {\n TrieNode node = root;\n char[] words = word.toCharArray();\n for (char c: words){\n if (node.children[c-'a'] == null){\n node.children[c-'a']=new TrieNode();\n }\n node = node.children[c-'a'];\n }\n node.item = word;\n }", "public void addWord(String word) {\n root.addWord(word);\n }", "public void addWord(String word) {\n CharNode target = root ;\n for(int i=0; i<word.length(); i++) {\n target = target.insertCharInChildren(word.charAt(i)) ;\n }\n target.end = true ;\n }", "public boolean search(String word) {\n return searchNode(word, root);\n }", "private void addWord(String word, int articleId, int times) {\n // if input is \"\" means here is the end of the woed then we can add the articleId to this node\n if(word.equals(\"\")) {\n addAricles(articleId, times);\n } else {\n Result res = findChild(word);\n // if the node is not exist, then we need to create an new one with next char of the word, and add word to next node \n if(res == null) {\n Node nextNode = new Node(word.substring(0, 1));\n this.addChildren(nextNode);\n nextNode.addWord(word.substring(1), articleId, times);\n } \n //if the node exist, add substring to next node\n else {\n Node nextNode = res.getN();\n String nextString = res.getS();\n nextNode.addWord(nextString, articleId, times);\n }\n }\n }", "public void insert(String word) {\n\t\t\tTrieNode curr = root;\n\t\t\tfor (char c : word.toCharArray()) {\n\t\t\t\tif (!curr.children.containsKey(c))\n\t\t\t\t\tcurr.children.put(c, new TrieNode());\n\t\t\t\tcurr = curr.children.get(c);\n\t\t\t}\n\t\t\tcurr.isWord = true;\n\t\t}", "public void insert(String word) {\n\t\tTrie curr = this;\n\t\tfor(Character ch : word.toCharArray()) {\n\t\t\tTrie n = curr.nodes[ch - 'a'];\n\t\t\t\n\t\t\tif (n == null) {\n\t\t\t\tn = new Trie();\n\t\t\t\tn.isWord = false;\n\t\t\t\tcurr.nodes[ch - 'a'] = n;\n\t\t\t}\n\t\t\t\n\t\t\tcurr = n;\n\t\t}\n\t\tcurr.isWord = true;\n\t}", "public void addWord(String word) {\n\t\taddWord(word, root);\n\t}", "public void insert(String word) {\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n now.children.put(c, new TrieNode());\n }\n now = now.children.get(c);\n }\n now.hasWord = true;\n}", "@Override\n public void insert(final String word) {\n TrieNode p = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n if (p.arr[index] == null) {\n final TrieNode temp = new TrieNode();\n p.arr[index] = temp;\n p = temp;\n } else {\n p = p.arr[index];\n }\n }\n p.isEnd = true;\n }", "public void insert(String word) {\n Entry tempRoot = root;\n for(int i=0; i<word.length(); i++){\n char ch = word.charAt(i);\n Entry childNode = tempRoot.getChildNode(ch);\n if(childNode == null){\n tempRoot.setChildNode(new Entry(), ch);\n }\n tempRoot = tempRoot.getChildNode(ch);\n }\n\n tempRoot.setIsWord(true);\n }", "@Override\r\n\tpublic List<Post> searchInfResult(String word) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\treturn postDao.selectPosts(word);\r\n\t}", "public void insert(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n int idx = c - 'a';\n if (curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }", "public void insert(String word) {\n TrieNode p = root;\n for (char c : word.toCharArray()) {\n int childIndex = (int)(c - 'a');\n if (p.children[childIndex] == null) {\n p.children[childIndex] = new TrieNode();\n }\n p = p.children[childIndex];\n }\n p.isWord = true;\n }", "public boolean search(String word) {\n TrieNode curr=root;\n for(int i=0;i<word.length();i++){\n char c = word.charAt(i);\n TrieNode node = curr.hmap.get(c);\n if(node==null){\n return false;\n }\n else{\n curr=node;\n }\n }\n \n return curr.endOfWord;\n }", "public boolean search(String word) {\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n return false;\n }\n now = now.children.get(c);\n }\n return now.hasWord;\n}", "public String get_all_words(){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\t\tfound_words += child.get_all_words();\n\t\t}\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word + \"#\" + found_words;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word+ \"#\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}", "public void insert(String word) {\n TrieNode curr = root;\n for(char c : word.toCharArray()) {\n int idx = c - 'a';\n if(curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }", "public void insert(String word) {\n\t\tcur = root;\n\t\tfor (char c : word.toCharArray()) {\n\t\t\tif (cur.children[c - 'a'] == null) {\n\t\t\t\tcur.children[c - 'a'] = new TrieNode(c);\n\t\t\t}\n\t\t\tcur = cur.children[c - 'a'];\n\t\t}\n\t\tcur.isWord = true;\n\t}", "public boolean search(String word) {\n\n return helper(word, 0, root);\n\n }", "public boolean search(String word) {\n return wordInTree(word, root) ;\n }", "public void insert(String word) {\n TrieNode node = root;\n\n // for each char in the word, add to the TrieNode\n for (char c: word.toCharArray()) {\n // if there are no such child, then we add it\n if (node.children[c - 'a'] == null) {\n node.children[c - 'a'] = new TrieNode(c);\n }\n // move the node to next layer\n node = node.children[c - 'a'];\n\n }\n // mark the isWord\n node.isWord = true;\n }", "public boolean search(String word) {\n return root.search(word);\n }", "public void addWord(String word) {\r\n Node node = root;\r\n for(char c : word.toCharArray()){\r\n node.nodes[c-'a'] = new Node();\r\n node = node.nodes[c-'a'];\r\n }\r\n node.isLeaf = true;\r\n }", "public boolean search(String word) {\n TrieNode n = root;\n for(char c : word.toCharArray()) {\n if(n.children[c]==null)\n return false;\n n = n.children[c];\n }\n if(n.isWord)\n return true;\n return false;\n }", "public boolean search(String word) {\n if(searchWordNodePos(word) == null){\n return false;\n } else if(searchWordNodePos(word).hasWord) \n return true;\n else return false;\n }", "public void insert(String word) {\n TrieNode cur = root;\n for (int i = 0 ; i < word.length(); i ++) {\n char ch = word.charAt(i);\n if (! cur.children.containsKey(ch)) {\n TrieNode child = new TrieNode(ch);\n cur.children.put(ch, child);\n }\n cur = cur.children.get(ch);\n }\n cur.isEnd = true;\n }", "public boolean search(String word )\n {\n return searchHelper(root, word, 0);\n }", "public boolean search(String word) {\n return dfs(word, root);\n }", "public boolean search(String word) {\r\n Trie node = root;\r\n return search(node, word, 0);\r\n }", "public void insert(String word) {\n TrieNode n = root;\n for(char c : word.toCharArray()) {\n if(n.children[c]==null) {\n n.children[c] = new TrieNode();\n }\n n = n.children[c];\n }\n n.isWord = true;\n n.word = word;\n }", "public boolean search(String word) {\n TrieNode node = search(root, word, 0);\n\t\treturn node != null && node.value != null;\n }", "private LexiNode search_specific_word(String word, int index){\n\t\tif(current_word != null && !current_word.isEmpty()){\n\t\tint local_index = index + 1;\n\t\t//if we found the word, we make the change\n\t\tif(current_word != null && \n\t\t !current_word.isEmpty() && \n\t\t\tword.toLowerCase().equals(current_word.toLowerCase()))\n\t\t\treturn this;\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs)\n\t\t\tif(word.toLowerCase().charAt(local_index) == Character.toLowerCase(child.getRepresentative_letter()))\n\t\t\t\treturn child.search_specific_word(word, local_index);\n\t\t}\n\t\treturn null;\n\t}", "public void addWord(String word) {\n //Corner Case\n if(word == null || word.length() == 0){\n return;\n }\n TrieNode node = root;\n int d = 0;\n \n while(d<word.length()){\n char c = word.charAt(d);\n if(node.next[c-'a']==null){\n node.next[c-'a'] = new TrieNode();\n }\n node = node.next[c-'a'];\n d++;\n }\n \n node.isWord = true;\n }", "public void insert(String word) {\n TrieNode p = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n if (p.arr[index] == null) {\n TrieNode temp = new TrieNode();\n p.arr[index] = temp;\n p = temp;\n } else {\n p = p.arr[index];\n }\n }\n p.isEnd = true;\n }", "public boolean search(String word) {\r\n return search(word, root);\r\n }", "public void add(LLNodeHash word){\n if (!checkWord(word)){\n put(word);\n }\n }", "public void insert(String word) {\n TrieNode curr=root;\n for(int i=0;i<word.length();i++){\n char c = word.charAt(i);\n TrieNode node=curr.hmap.get(c);\n if(node==null){\n node=new TrieNode();\n curr.hmap.put(c, node);\n }\n curr=node;\n }\n curr.endOfWord=true;\n }", "public boolean search(String word) {\n TrieNode current = root;\n for(char c : word.toCharArray()){\n int index = c - 'a';\n if(current.childrens[index] == null)\n return false;\n current = current.childrens[index];\n }\n return current.eow;\n }", "public boolean search(String word) {\n TrieNode p = searchNode(word);\n if (p == null) {\n return false;\n } else {\n if (p.isEnd)\n return true;\n }\n return false;\n }", "public boolean search(String word) {\n return search(root, word, 0);\n }", "public boolean search(String word) {\r\n return tree.search(word);\r\n }", "public boolean find(T word);", "public boolean search(String word) {\n TrieNode tn = root;\n int len = word.length();\n for(int i=0; i<len; i++){\n char c = word.charAt(i);\n TrieNode temp = tn.hm.get(c);\n if(temp == null) return false;\n tn = temp;\n }\n return tn.flag;\n }", "public boolean search(String word) {\n \t\n return dfs(0, root, word);\n }", "public boolean search(String word) {\n return helper(word,root,0);\n }", "private void find(char[] m, String message, Trie cur, Trie root, int index, List<String> results) {\n // Base case 1. No match with any dictionary word. if cur == null -> no match ; return\n if (cur == null) {\n return;\n }\n // Base case 2. if out of bounds, check previously collected word and return\n if (index == message.length()) {\n // result only in case matches word\n if (cur.word != null) {\n results.add(new String(m));\n }\n return;\n }\n char c = message.charAt(index);\n if (c == SPACE) {\n // matches word or character 'e'\n // check if matches word from dictionary\n if (cur.word != null) {\n m[index] = SPACE;\n // if space - start collecting new word from beginning of Trie\n find(m, message, root, root, index + 1, results);\n }\n // otherwise ' ' -> 'e'\n c = 'e';\n }\n // considered non-space character (backtracking)\n m[index] = c;\n // get next element from try\n Trie next = cur.get(c);\n find(m, message, next, root, index + 1, results);\n }", "public void search(final String word){\n\t\tif (listener != null){\n\t\t\thandler.post(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlistener.lookup(word.trim());\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public void add_word(String word, String definition){\n\t\tif(word.length() > 1){\n\t\t\tfor(LexiNode child: childs){\n\t\t\t\tif(word.toLowerCase().charAt(0) == Character.toLowerCase(child.getRepresentative_letter())){\n\t\t\t\t\tchild.add_word(word, definition, word);\n\t\t\t\t\t//if we found a matching child, we don't wanna create another one\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tLexiNode child = new LexiNode();\n\t\t\tchilds.add(child);\n\t\t\tchild.add_word(word, definition, word);\n\t\t}\n\t}", "public void insert(String word) {\n TrieNode tn = root;\n int len = word.length();\n for(int i=0; i<len; i++){\n char c = word.charAt(i);\n TrieNode temp = tn.hm.get(c);\n if(!tn.hm.containsKey(c)){\n tn = new TrieNode();\n tn.hm.put(c, temp);\n }\n tn = temp;\n }\n tn.flag = true;\n }", "private void add(Node node, String word, int iter) {\n if (iter < word.length()) {\n if (!node.children.containsKey(word.charAt(iter)))\n node.children.put(word.charAt(iter), new Node(false));\n add(node.children.get(word.charAt(iter)), word, iter + 1);\n } else\n // we're done traversing, the current node is a leaf node\n node.leaf = true;\n }", "private void addWord(String s) {\n TrieNode node = root;\n for(int i = 0; i < s.length(); i++) {\n int index = s.charAt(i) - 'a';\n if (node.trieNodes[index] == null) {\n node.trieNodes[index] = new TrieNode();\n }\n node = node.trieNodes[index];\n }\n node.isLeave = true;\n }", "public static void search(String word){\n if(index.containsKey(word)){\n System.out.println(\"word \" + word + \" displays in :\");\n HashSet<String> list = index.get(word);\n for(String str:list){\n System.out.println(str);\n }\n }\n else{\n System.out.println(\"word \" + word + \" doesn't found!\");\n }\n }", "public void insert(String word) {\n\t\t\n\t\tTrieNode current = root;\n\t\t\t\t\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\t\n\t\t\tCharacter ch = word.charAt(i);\n\t\t\t\n\t\t\tif (!current.getChild().containsKey(ch)) {\n\t\t\t\tTrieNode newNode = new TrieNode();\n\t\t\t\tcurrent.getChild().put(ch, newNode);\n\t\t\t}\n\t\t\t\n\t\t\tcurrent = current.getChild().get(ch);\t\n\t\t}\n\t\t\n\t\tcurrent.isLeaf = true;\t \n\t}", "public void addNode(String word) {\n total++;\n\n boolean mainFound = false;\n\n if (mainList == null) {\n mainList = new MainNode(word, null, null);\n mainFound = true;\n }\n\n for (MainNode n = mainList; !mainFound && n != null; n = n.mainNext) {\n if (word.equals(n.input)) {\n n.wordCount++; \n mainFound = true;\n\n boolean nextFound = false;\n\n for (NextNode m = n.next; !nextFound && m != null; m = m.next) {\n if (word.equals(m.input)) {\n m.wordCount++;\n nextFound = true;\n }\n if (!nextFound) {\n m.next = new NextNode(word, null, null);\n }\n }\n }\n }\n if (!mainFound) {\n MainNode current = mainList;\n while (current.mainNext != null) {\n current = current.mainNext;\n }\n current.mainNext = new MainNode(word, null, null);\n }\n }", "private void findWords(Node root, String prefix,List<String> words ){\n\n if(root == null) return;\n //if this current node represent an endOfWord (or word)\n if(root.isEndOfWord)\n words.add(prefix); // ex 'car' as prefix\n\n //visit the children of this current/root node\n for(var child: root.getChildren())\n findWords(child,prefix + child.value,words); // 'card' and 'careful'\n\n }", "public void addWord(Word word);", "public void insert(String word) {\n TrieNode node = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (node.ch[c - 'a'] == null) {\n node.ch[c - 'a'] = new TrieNode();\n }\n node = node.ch[c - 'a'];\n }\n node.word = word;\n }", "public ArrayList<Task> find(String word) {\n ArrayList<Task> newlist = new ArrayList<Task>();\n for (Task t : list) {\n if (t.contain(word)) {\n newlist.add(t);\n }\n }\n return newlist;\n }", "@Override\n public void insert(String word) {\n root = insertIterative(word, root);\n }", "public void insert(String word) {\n\n\t\tTrieNode temp = root;\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tint c = word.charAt(i) - 'a';\n\t\t\tif (temp.childrens[c] == null) {\n\t\t\t\ttemp.childrens[c] = new TrieNode();\n\t\t\t}\n\n\t\t\ttemp = temp.childrens[c];\n\t\t}\n\n\t\ttemp.isLeafNode = true;\n\t}", "public boolean search(String word) {\n return dfs(0, root, word);\n }", "public void insert(String word) {\n\n int length = word.length();\n TrieNode node = root;\n for(int i=0; i<length; i++) {\n char curr = word.charAt(i);\n if(!node.containsKey(curr)){\n node.put(curr, new TrieNode());\n }\n node = node.get(curr);\n }\n node.setEnd();\n }", "public boolean search(String word) {\n // return searchPrefix(word, root);\n TrieNode node = root;\n return search(node, word, 0);\n }", "public boolean search(String word) {\n TrieNode cur = root;\n for (int i = 0 ; i < word.length(); i ++) {\n char ch = word.charAt(i);\n if (! cur.children.containsKey(ch)) {\n // does not match\n return false;\n }\n else {\n cur = cur.children.get(ch);\n }\n }\n return cur.isEnd;\n }", "public boolean search(String word) {\n return searchFromNode(word, trie.root);\n }", "public void insert(String word) {\n \tHashMap<Character, TrieNode> children=root.children;\n \tfor(int i=0;i<word.length();i++)\n \t{\n \t\tchar c=word.charAt(i);\n \t\tTrieNode t;\n \t\tif(children.get(c)!=null)\n \t\t{\n \t\t\tt=children.get(c);\n \t\t}\n \t\telse\n \t\t{\n \t\t\tt=new TrieNode(c);\n \t\t\tchildren.put(c, t);\n \t\t}\n \t\tchildren=t.children;\n \t\tif(i==word.length()-1)\n \t\t\tt.leaf=true;\n \t}\n }", "public void add(T word);", "public void insert(String word) {\n\t\tTrieNode node = root;\n\t\tfor (char c: word.toCharArray()) {\n\t\t\tif (!node.containsKey(c)) {\n\t\t\t\tnode.put(c);\n\t\t\t}\n\t\t\tnode = node.get(c);\n\t\t}\n\t\tnode.setEnd();\n\t}" ]
[ "0.7057391", "0.67803025", "0.6477793", "0.64221936", "0.64194477", "0.6398415", "0.6394128", "0.6363663", "0.63622576", "0.63572276", "0.63561773", "0.6341189", "0.6292097", "0.6288253", "0.6284299", "0.6270736", "0.62364054", "0.6230594", "0.6229176", "0.6211319", "0.6156067", "0.61521107", "0.61328816", "0.61256635", "0.61172557", "0.6116791", "0.60945797", "0.60891443", "0.6082533", "0.6061269", "0.6060529", "0.60534745", "0.6049785", "0.6046282", "0.60413504", "0.6034455", "0.6022093", "0.6004642", "0.59827834", "0.5980126", "0.59781265", "0.59525377", "0.59506655", "0.59407604", "0.5929733", "0.5920695", "0.59196776", "0.59115964", "0.5908784", "0.59062797", "0.59049344", "0.5903918", "0.58986485", "0.5894374", "0.58941746", "0.5893046", "0.5888517", "0.5887968", "0.5877819", "0.58760345", "0.5858393", "0.58513635", "0.58509934", "0.5843103", "0.5838531", "0.5837768", "0.58333397", "0.5831154", "0.58143836", "0.58122736", "0.58112586", "0.5809421", "0.5802846", "0.5801683", "0.57912743", "0.57898927", "0.5782311", "0.5781083", "0.5780984", "0.57805717", "0.5778823", "0.5773169", "0.5772961", "0.5770935", "0.57663935", "0.5762961", "0.57581496", "0.574317", "0.5740952", "0.5738442", "0.5735912", "0.5733012", "0.5730955", "0.5730941", "0.57195336", "0.57165474", "0.5713613", "0.5712061", "0.57113934", "0.57111", "0.5702483" ]
0.0
-1
Returns the score of the given word if it is in the dictionary, zero otherwise. (You can assume the word contains only the uppercase letters A through Z.)
public int scoreOf(String word) { String noU = stripU(word); return tst.contains(noU) ? tst.get(noU) : 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int scoreOf(String word) {\n // 1. check if the word is in dictionary. dict.contains(word) is true or not\n\n // 2. calculate the score of the word\n int score = calScore(word);\n return score;\n }", "public int scoreOf(String word) {\n if (dictionary.contains(word)) {\n switch (word.length()) {\n case 0:\n case 1:\n case 2:\n return 0;\n case 3:\n case 4:\n return 1;\n case 5:\n return 2;\n case 6:\n return 3;\n case 7:\n return 5;\n default:\n return 11;\n }\n } else {\n return 0;\n }\n }", "public int scoreOf(String word) {\n int length = word.length();\n\n // Validate word\n Node node = root;\n for (int i = 0; i < length; i++) {\n int c = word.charAt(i) - A_ENCODE;\n\n // Handle Q\n if (c == Q_LETTER) {\n // Skip 'U'\n if (i + 1 < length && word.charAt(i + 1) == U_ENCODE) {\n i++;\n // Dictionary do not consider words that have 'Q' that isn't 'QU'\n } else {\n return 0;\n }\n }\n\n node = node.edges[c];\n if (node == null) {\n return 0;\n }\n }\n\n if (node.word == null) {\n return 0;\n }\n\n // Get points\n if (length < 5) {\n return 1;\n }\n switch (length) {\n case 5: return 2;\n case 6: return 3;\n case 7: return 5;\n default: return 11;\n }\n }", "public int scoreOf(String word) {\n int len = word.length();\n if (!contains(word) || len <= 2) return 0;\n else if (len == 3 || len == 4) return 1;\n else if (len == 5) return 2;\n else if (len == 6) return 3;\n else if (len == 7) return 5;\n return 11;\n }", "private static int searchStandardDictionary(String word) {\n if (word.length() < 4) {\n return Arrays.binarySearch(STANDARD_DICTIONARY, 0, FOUR_LETTER_WORDS_OFFSET, word.toUpperCase(Locale.ENGLISH));\n } else {\n return Arrays.binarySearch(STANDARD_DICTIONARY, FOUR_LETTER_WORDS_OFFSET, STANDARD_DICTIONARY.length, word.toUpperCase(Locale.ENGLISH));\n }\n }", "public static int getScore (String word, int [] scoretable)\r\n {\r\n int wordScore = 0;\r\n char [] letters = word.toCharArray();\r\n String[] wordValues = word.split(\" \");\r\n for(int i = 0; i < letters.length; i++ )\r\n {\r\n int score = letters[i];\r\n wordScore = wordScore + scoretable[score - 97]; \r\n }\r\n //Gives word double score if consecutive double letters \r\n for (int j = 0; j < wordValues.length; j++)\r\n {\r\n for (int n = 0; n < (wordValues[j].length()-1); n++)\r\n {\r\n if(wordValues[j].charAt(n) == wordValues[j].charAt(n+1))\r\n {\r\n wordScore = wordScore * 2;\r\n }\r\n }\r\n }\r\n return wordScore;\r\n }", "private static int calculateScore( String word )\n\t{\n\t\tif (word.equals(\"rc\")) {\n\t\t\treturn -1;\n\t\t} else if (word.equals(\"b\")) {\n\t\t\treturn -2;\n\t\t} else if (word.equals(\"beta\")) {\n\t\t\treturn -3;\n\t\t} else if (word.equals(\"a\")) {\n\t\t\treturn -4;\n\t\t} else if (word.equals(\"alpha\")) {\n\t\t\treturn -5;\n\t\t} else if (word.equals(\"snapshot\")) {\n\t\t\treturn -10;\n\t\t} else if (word.equals(\"push0ver\")) {\n\t\t\treturn -11;\n\t\t} else if (word.equals(\"cvs\")) {\n\t\t\treturn -21;\n\t\t} else if (word.equals(\"svn\")) {\n\t\t\treturn -21;\n\t\t} else if (word.equals(\"bzr\")) {\n\t\t\treturn -21;\n\t\t} else if (word.equals(\"hg\")) {\n\t\t\treturn -21;\n\t\t} else if (word.equals(\"git\")) {\n\t\t\treturn -21;\n\t\t} else if (word.equals(\"rev\")) {\n\t\t\treturn -100;\n\t\t} else if (word.equals(\"r\")) {\n\t\t\treturn -101;\n\t\t} else if (word.equals(\"release\")) {\n\t\t\treturn 12;\n\t\t} else if (word.equals(\"update\")) {\n\t\t\treturn 11;\n\t\t} else if (word.equals(\"u\")) {\n\t\t\treturn 10;\n\t\t} else if (word.equals(\"patch\")) {\n\t\t\treturn 9;\n\t\t} else if (word.equals(\"p\")) {\n\t\t\treturn 8;\n\t\t} else if (word.equals(\"hotfix\")) {\n\t\t\treturn 7;\n\t\t} else if (word.equals(\"fix\")) {\n\t\t\treturn 6;\n\t\t}\n\t\tLong l = toLong( word );\n\t\treturn l != null ? 100 : 0; // a pure number (with no alpha) wins against all of those.\n\t}", "public void scoreWord() {\n\t\t// check if valid word\n\t\tif (word.isWord(dictionary)) {\n\t\t\tscore += word.getScore();\n\t\t\tword.start = null;\n\t\t\tword.wordSize = 0;\n\t\t\t// check if word still possible\n\t\t} else if (!word.isPossibleWord(dictionary)) {\n\t\t\tword.start = null;\n\t\t\tword.wordSize = 0;\n\t\t}\n\n\t}", "private int getUseOfLetter(String word) {\n int result = 0;\n for (int i = 0; i < word.length(); i++) {\n result |= tables[word.charAt(i)];\n }\n return result;\n }", "public String spellcheck(String word) {\n // Check if the world is already in lcDictionary.\n String lcdictionaryLookup = lcDictionary.get(word.toLowerCase());\n if(lcdictionaryLookup != null) {\n return lcdictionaryLookup;\n }\n String reducedWord = reducedWord(word);\n String rwdictionaryLookup = rwDictionary.get(reducedWord);\n if(rwdictionaryLookup != null) {\n return rwdictionaryLookup;\n }\n return \"NO SUGGESTION\";\n }", "public DictionaryData lookup(String word) {\r\n\r\n return dictionaryMap.get(word.toUpperCase());\r\n }", "public double getDictionaryLookupScoreOfString(String tweet) {\n double score = 0;\n List<TaggedToken> tokens = tokenizeAndTag(tweet);\n for (TaggedToken token : tokens) {\n score += sentiWordNet.extract(token.token, getWordNetTag(token.tag));\n }\n return score;\n }", "public int count( String hotWord ){\r\n String x = hotWord.toLowerCase();\r\n //If the word is a hotword then get the count and return it\r\n if(words.containsKey(x)){\r\n return words.get(x);\r\n }\r\n //If not, then return -1\r\n else{\r\n return -1;\r\n }\r\n\t}", "public static double calculateSentenceScore(Map<String, Double> wordScores, String sentence) {\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSystem.out.println(\"Sentence: \" + sentence + wordScores);\n\t\tif(wordScores == null || wordScores.isEmpty() || sentence == null || sentence.length() < 1 ) return 0;\n\t\tsentence.toLowerCase();//converts all words to lower case\n\t\tString[] words = sentence.split(\"\\\\s+\");//split on empty spaces\n\t\tint howManyWords = words.length;\n\t\tdouble sc = 0.0;\n\t\tfor(String word : words) {\n\t\t\tif(!word.trim().equals(\"\") && word.trim().matches(\"^[a-zA-Z]*$\")) {//regex ensures that word starts with letter only\n\t\t\t\tif(wordScores.containsKey(word.trim())) {\n//\t\t\t\t\tSystem.out.println(\"for key: \" + word.trim() + wordScores.get(word.trim()));\n\t\t\t\t\tsc += wordScores.get(word.trim());\n\t\t\t\t}else {\n//\t\t\t\t\tSystem.out.println(\"no such key\");\n\t\t\t\t\tsc += 0.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sc/howManyWords; // this line is here only so this code will compile if you don't modify it\n\n\t}", "public boolean contains(String word) {\r\n\r\n return dictionaryMap.containsKey(word.toUpperCase());\r\n\r\n }", "public int getWordOccurrence(String word) {\n MutableInt i = wordsOccurrences.get(word);\n if (i == null) {\n return 0;\n }\n return i.getValue();\n }", "public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }", "public int count(String word);", "public int checkWordAndUpdateScore(String word) {\n\n //if word is valid and is on board\n if(validWordsOnBoard.contains(word.toUpperCase())){\n\n //if word has never been submitted by user before, add word to validWordsFoundByUser and update score\n if(!validWordsFoundByUser.contains(word.toUpperCase())){\n\n int wordLength = word.length();\n if(wordLength < 3)\n score +=0;\n else if(wordLength == 3 || wordLength == 4)\n score += 1;\n else if(wordLength == 5)\n score += 2;\n else if(wordLength == 6)\n score += 3;\n else if(wordLength == 7)\n score += 5;\n else\n score += 10;\n\n validWordsFoundByUser.add(word);\n return 1;\n } else{\n\n return 2;\n }\n }\n return 0;\n }", "public int getScrabbleScore(String string) {\n\t\t// TODO Write an implementation for this method declaration\n\t\tHashtable<Character, Integer> letterBank = new Hashtable<Character, Integer>();\n\t\tletterBank.put('A', 1);\n\t\tletterBank.put('B', 3);\n\t\tletterBank.put('C', 3);\n\t\tletterBank.put('D', 2);\n\t\tletterBank.put('E', 1);\n\t\tletterBank.put('F', 4);\n\t\tletterBank.put('G', 2);\n\t\tletterBank.put('H', 4);\n\t\tletterBank.put('I', 1);\n\t\tletterBank.put('J', 8);\n\t\tletterBank.put('K', 5);\n\t\tletterBank.put('L', 1);\n\t\tletterBank.put('M', 3);\n\t\tletterBank.put('N', 1);\n\t\tletterBank.put('O', 1);\n\t\tletterBank.put('P', 3);\n\t\tletterBank.put('Q', 10);\n\t\tletterBank.put('R', 1);\n\t\tletterBank.put('S', 1);\n\t\tletterBank.put('T', 1);\n\t\tletterBank.put('U', 1);\n\t\tletterBank.put('V', 4);\n\t\tletterBank.put('W', 4);\n\t\tletterBank.put('X', 8);\n\t\tletterBank.put('Y', 4);\n\t\tletterBank.put('Z', 10);\n\t\tint score = 0;\n\t\tchar upperCase;\n\t\tfor(int i =0; i < string.length(); i++) {\n\t\t\tif(Character.isLowerCase(string.charAt(i))){\n\t\t\t\tupperCase = Character.toUpperCase(string.charAt(i));\n\t\t\t\tscore += letterBank.get(upperCase);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tscore += letterBank.get(string.charAt(i));\n\t\t\t}\n\t\t}\n\t\t//System.out.println(score);\n\t\treturn score;\n\t}", "private HashMap<Character, Integer> countAllLetters(String word) {\n WordToolbox otherWord = new WordToolbox(word.toLowerCase());\r\n HashMap<Character, Integer> mapOfWord = new HashMap<>();\r\n for (int i = 0; i < word.length(); i++) {\r\n mapOfWord.put(word.toLowerCase().charAt(i), otherWord.countHowMany(word.toLowerCase().charAt(i)));\r\n }\r\n return mapOfWord;\r\n }", "public int size(String word) {\n\t\treturn contains(word) ? invertedIndex.get(word).size() : 0;\n\t}", "public int getCount(String word) {\n // TODO: pattern this after the count() function.\n // Make sure to return 0 for words you haven't seen before.\n if(word.equals(\"\")){\n return(0);\n }\n\n for (int i=0; i < counters.length; i++) {\n if (counters[i] != null) {\n if (counters[i].wordMatches(word)) {\n return (counters[i].getCount());\n }\n }\n }\n return(0);\n }", "@Override\n\tprotected int keywordWeighting(String word) {\n\t\tif (this.keywordWeight.containsKey(word)) {\n\t\t\treturn this.keywordWeight.get(word);\n\t\t}\n\t\treturn 1;\n\t}", "public boolean wordExists(String word)\n\t{\n\t\t//checks to make sure the word is a word that starts with a lowercase letter, otherwise return false\n\t\tif(word.charAt(0) >= 'a' && word.charAt(0) <= 'z')\n\t\t{\n\t\t\tchar letter = word.charAt(0);\n\t\t\t\n\t\t\treturn (myDictionaryArray[(int)letter - (int)'a'].wordExists(word));\n\t\t}\n\t\t\n\t\treturn false;\t\t\n\t}", "public int calWord() {\n for(int i = 0; i < newWord.length(); i++) {\n for (String c : keySetPoint) {\n if(String.valueOf(newWord.charAt(i)).equals(c)) {\n point += mapPoint.get(c);\n }\n }\n }\n\n return point;\n }", "public void count(String word) {\n if(word.equals(\"\")){\n return;\n }\n\n for (int i=0; i < counters.length; i++) {\n //TODO: If you find the word increment the count and return\n if (counters[i] != null){\n if (counters[i].wordMatches(word)){\n counters[i].incrementCount();\n break;\n }\n } else {\n counters[i] = new SingleWordCounter(word);\n counters[i].incrementCount();\n break;\n }\n }\n\n //TODO: You didn't find the word. Add a new word counter to the array.\n // Don't forget to increment the word's count to get it to 1!\n\n\t}", "public int count(String word) {\n return this.wordToCount.get(word);\n }", "private int scoreFor(String keyword) {\n return keyword.length();\n }", "public int score(String name) {\n return name.indexOf(this.name + \"_\");\n }", "public int countOccurrences(String word) {\n\t\tint i = 0;\n\t\tfor (int j = 0; j < wordList.size(); j++) {\n\t\t\tif (wordList.get(j).equals(word)) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\treturn i;\n\t\t// TODO Add your code here\n\t}", "private boolean checkDict(String word, String[] dict){\n int a = 0;\n int b = dict.length-1;\n while (a<=b) {\n int m = (a+b)/2;\n if (word.compareTo(dict[m]) == 0) return true;\n else if (word.compareTo(dict[m])>0) a = m+1;\n else b = m-1;\n }\n return false;\n }", "public boolean contains(String word) {\r\n\t\treturn dict.contains(word);\r\n\t}", "int count(String s) {\r\n\t\tif (m_words.containsKey(s)) {\r\n\t\t\treturn m_words.get(s);\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public boolean checkWord(LLNodeHash word){\n //finds index of the word in the array\n int h = hash(word.getKey());\n LLNodeHash ptr = hashTable[h];\n //looks through linked list at that index and changes frequency of word if found\n while (ptr != null){\n if (ptr.getKey().equals(word.getKey())){\n ptr.setFreq(ptr.getFreq() + word.getFreq());\n return true;\n }\n ptr = ptr.getNext();\n }\n return false;\n }", "public boolean isInDictionary(String word) {\n return isInDictionary(word, Language.ENGLISH);\n }", "public float computePhraseScore(int dl, int tf, GlobalStats stats);", "public boolean search(String word) {\n // 1. 遍历 每个 字母 去掉 从list 里去出来结果 比较list 每个结果\n for (int i = 0; i < word.length(); i++) {\n String key = word.substring(0, i) + word.substring(i+1);\n List<int[]> indexAndCharList = dictonary.getOrDefault(key, new ArrayList<>());\n for (int[] indexAndChar : indexAndCharList) {\n if (indexAndChar[0] == i && indexAndChar[1] != (word.charAt(i) - 'a')) {\n return true;\n }\n }\n }\n return false;\n }", "public int getScrabbleScore(String string) {\n\t\t\n\t\t//Create a hashmap of each letter and its corresponding score value\n\t\t\n\t\tHashMap<Character, Integer> lettersAndScores = new HashMap<Character, Integer>(26);\n\t\tlettersAndScores.put('A', 1);\n\t\tlettersAndScores.put('E', 1);\n\t\tlettersAndScores.put('I', 1);\n\t\tlettersAndScores.put('O', 1);\n\t\tlettersAndScores.put('U', 1);\n\t\tlettersAndScores.put('L', 1);\n\t\tlettersAndScores.put('N', 1);\n\t\tlettersAndScores.put('R', 1);\n\t\tlettersAndScores.put('S', 1);\n\t\tlettersAndScores.put('T', 1);\n\t\tlettersAndScores.put('D', 2);\n\t\tlettersAndScores.put('G', 2);\n\t\tlettersAndScores.put('B', 3);\n\t\tlettersAndScores.put('C', 3);\n\t\tlettersAndScores.put('M', 3);\n\t\tlettersAndScores.put('P', 3);\n\t\tlettersAndScores.put('F', 4);\n\t\tlettersAndScores.put('H', 4);\n\t\tlettersAndScores.put('V', 4);\n\t\tlettersAndScores.put('W', 4);\n\t\tlettersAndScores.put('Y', 4);\n\t\tlettersAndScores.put('K', 5);\n\t\tlettersAndScores.put('J', 8);\n\t\tlettersAndScores.put('X', 8);\n\t\tlettersAndScores.put('Q', 10);\n\t\tlettersAndScores.put('Z', 10);\n\t\t\n\t\t//Insert the characters of the string into the hashmap to get the corresponding values\n\t\t//Add the values to a score variable to then return\n\t\t\n\t\tint score = 0;\n\t\tfor(int i=0; i<string.length(); i++) {\n\t\t\tscore += lettersAndScores.get(Character.toUpperCase(string.charAt(i)));\n\t\t}\n\t\treturn score;\n\t}", "private void wordAdd(String word){\n if (!fileWords.containsKey(word)){\n fileWords.put(word,1);\n if (probabilities.containsKey(word)) {\n double oldCount = probabilities.get(word);\n probabilities.put(word, oldCount+1);\n } else {\n probabilities.put(word, 1.0);\n }\n }\n }", "private void updateCount(String word) {\n\t\t\tthis.count += invertedIndex.get(word).get(this.location).size();\n\t\t\tthis.score = (double) this.count / counts.get(this.location);\n\t\t}", "public boolean hasWord(String word) {\n return cache.indexOf(word) >= 0;\n }", "public int getWordScore(Coord coord, String dirPlaced, String dirCheck) {\n\t\tif (coord.getRow() < 0 || coord.getCol() < 0 || coord.getRow() >= len\n\t\t\t\t&& coord.getCol() >= len)\n\t\t\treturn 0;\n\n\t\tint score = 0;\n\t\t// the factor by which the final score of the word is multipled by\n\t\tint wordScoreModifier = 1;\n\t\t// variables that change the column or row depending on the orientation\n\t\t// of the added word\n\t\tint rowChange = 0;\n\t\tint colChange = 0;\n\t\tint r = coord.getRow();\n\t\tint c = coord.getCol();\n\n\t\t// set the direction of the coordinate change variables\n\t\tif (dirCheck.equals(\"vertical\"))\n\t\t\trowChange++;\n\t\telse if (dirCheck.equals(\"horizontal\"))\n\t\t\tcolChange++;\n\n\t\t// for each letter left of or above (depending on direction)\n\t\t// the given coordinate, add the score value and trigger any unused\n\t\t// scoreModifiers on the newly placed tiles' squares\n\t\twhile (r >= 0 && c >= 0 && board[r][c].getLetter() != null) {\n\t\t\t// update the score for any letter-based score modifiers\n\t\t\tscore += board[r][c].updateScore(\n\t\t\t\t\tboard[r][c].getLetter().getValue(), \"letter\");\n\t\t\t// update the word score factor for any word score modifiers\n\t\t\twordScoreModifier = board[r][c].updateScore(wordScoreModifier,\n\t\t\t\t\t\"word\");\n\t\t\tr -= rowChange;\n\t\t\tc -= colChange;\n\t\t}\n\n\t\tr = coord.getRow() + rowChange;\n\t\tc = coord.getCol() + colChange;\n\n\t\t// for each letter right of or below (depending on direction)\n\t\t// the given coordinate, add the score value and trigger any unused\n\t\t// scoreModifiers on the newly placed tiles' squares\n\t\twhile (r < len && c < len && board[r][c].getLetter() != null) {\n\t\t\tscore += board[r][c].updateScore(\n\t\t\t\t\tboard[r][c].getLetter().getValue(), \"letter\");\n\t\t\twordScoreModifier = board[r][c].updateScore(wordScoreModifier,\n\t\t\t\t\t\"word\");\n\t\t\tr += rowChange;\n\t\t\tc += colChange;\n\t\t}\n\t\tif (!dirCheck.equals(dirPlaced) && !makesNewWord(coord, dirCheck))\n\t\t\treturn 0;\n\t\t// return the word score multiplied by any word score modifiers\n\t\treturn score * wordScoreModifier;\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner info = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the phrase:\");\r\n\t\tString sentence = info.nextLine();\r\n\t\t\r\n\t\tsentence = sentence.trim().toUpperCase();\r\n\t\t\r\n\t\tfor (int i = 0; i < sentence.length(); i++) {\r\n\t\t\tif (sentence.charAt(i) <'A' || sentence.charAt(i) > 'Z' ) {\r\n\t\t\t\tsentence = sentence.replace(\"\"+sentence.charAt(i), \"/\");\r\n//\t\t\t\tSystem.out.println(sentence);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString[] word = sentence.split(\"/\") ;\r\n\t\t\r\n\t\tint total = 0;\r\n\t\tif (word.length < 1) {\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\tHashMap hMap = new HashMap();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (word[0].length() > 0) {\r\n\t\t\t\thMap.put(word[0].length(), 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (int i = 1; i < word.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < i; j++) {\r\n\t\t\t\t\tif (word[i].length() == word[j].length()) {\r\n\t\t\t\t\t\tint cnt = (int) hMap.get(word[i].length());\r\n\t//\t\t\t\t\tSystem.out.println(\"cnt==>\"+cnt);\r\n\t\t\t\t\t\thMap.put(word[i].length(),++cnt);\r\n\t\t\t\t\t\t\t\r\n\t//\t\t\t\t\tSystem.out.println(word[i].length()+\"==>\"+hMap.get(word[i].length()));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (j == (i-1)){\r\n\t\t\t\t\t\t\thMap.put(word[i].length(), 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSet<Integer> keys1 = hMap.keySet();\r\n\t\r\n\t\t\tfor(int key:keys1) {\r\n\t\t\t\tif (key !=0) {\r\n\t\t\t\t\tSystem.out.println(hMap.get(key)+\" \"+key +\" letter words\");\r\n\t\t\t\t\ttotal += (int)hMap.get(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(total+\" total words\");\r\n\t\t\r\n\t}", "int countByExample(WdWordDictExample example);", "private static void wordCountWithMap() throws FileNotFoundException {\n Map<String, Integer> wordCounts = new HashMap<String, Integer>();\n\n Scanner input = new Scanner(new File(fileLocation));\n while (input.hasNext()) {\n String word = input.next();\n if (!wordCounts.containsKey(word)) {\n wordCounts.put(word, 1);\n } else {\n int oldValue = wordCounts.get(word);\n wordCounts.put(word, oldValue + 1);\n }\n }\n\n String term = \"test\";\n System.out.println(term + \" occurs \" + wordCounts.get(term));\n\n // loop over the map\n for (String word : wordCounts.keySet()) {\n int count = wordCounts.get(word);\n if (count >= 500) {\n System.out.println(word + \", \" + count + \" times\");\n }\n }\n\n }", "public int GetIndex(String word) {\n\t\tString s = word.toLowerCase();\n\t\t\n\t\tif(this.wordIndex == null) {\n\t\t\tLoadWordIndexFromFile();\n\t\t}\n \treturn this.wordIndex.get(s);\n\t}", "boolean hasWord();", "public static boolean hasMatch(String s, int dict) {\n if (s.length()==0) {return false;}\n if (isInteger(s)) {return true;}\n //else if (s.length()==1) {return true;}\n else {\n int len = s.length();\n boolean has = false;\n\n try {\n String file = \"../dicts/total/try\"+dict+\"/total.txt\";\n BufferedReader br = new BufferedReader(new FileReader(file));\n String line = br.readLine();\n int count = 0;\n boolean done = false;\n while (line != null && !done) {\n //process lines\n String[] split = line.split(\"\\t\");\n if (s.length()>Integer.parseInt(split[0])) {\n done = true;\n has = false;\n } else if (s.toLowerCase().equals(split[1].toLowerCase())) {\n done = true;\n has = true;\n }\n line = br.readLine();\n count++;\n }\n } catch (FileNotFoundException ex) {\n has = false;\n } catch (IOException ex) {\n has = false;\n }\n\t\n return has;\n }\n }", "public int rank(String word) {\n if (!cached) {\n int ctr = this.wordNumber;\n for (String wordTemp : this.words()) {\n wordToRank.put(wordTemp, ctr);\n ctr -= 1;\n }\n this.cached = true;\n }\n return wordToRank.get(word);\n }", "public boolean containsWord(String word) {\n\t\treturn index.containsKey(word);\n\t}", "private int getHash(String word){\n\t\tif (word == null){\n\t\t\treturn INVALID;\n\t\t}\n\n\t\tint hash = 52;\n\t\tif ((word.charAt(0) >= 'a') && (word.charAt(0) <= 'z')){\n\t\t\thash = word.charAt(0) - 'a';\n\t\t}\n\t\telse if ((word.charAt(0) >= 'A') && (word.charAt(0) <= 'Z')){\n\t\t\thash = word.charAt(0) - 'A' + 26;\n\t\t}\n\t\treturn hash;\n\t}", "private double countWordLocationScore(Page page, String[] queryWords) {\n double score = 0;\n boolean wasFound = false;\n\n for (String word : queryWords) {\n int queryWordId = this.pb.getIdForWord(word);\n for (int i = 0; i < page.getWords().size(); i++) {\n if (page.getWords().get(i) == queryWordId) {\n score += i;\n wasFound = true;\n break;\n }\n }\n\n if (!wasFound) {\n score += 100000;\n } else {\n wasFound = false;\n }\n }\n return score;\n }", "public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}", "@Test \r\n public void shouldNotFindWordIntoTheDictionary() {\r\n String inputWord = \"xxxxx\";\r\n String[] dictionary =\r\n new String[] {\"able\", \"ale\", \"apple\", \"bale\", \"kangaroo\"};\r\n\r\n assertNull(wordSeeker.lookFor(inputWord, dictionary));\r\n }", "public static int lookup (String name)\n {\n\tInteger result = MAP.get (name.toLowerCase ());\n\n\treturn (result == null) ? -1 : result;\n }", "protected int lookup(String s) {\r\n\t\tint i;\r\n\r\n\t\tfor (i = 0; i < kwlist.length; i++) {\r\n\t\t\tif (kwlist[i].equalsIgnoreCase(s))\r\n\t\t\t\treturn i;\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}", "public void checkWord(int largeTile) {\r\n String guess = \"\";\r\n int length = 0;\r\n// int score = 0;\r\n boolean correct = false; // flag for whether the word is valid\r\n\r\n // get word string based on which button was pressed\r\n switch(largeTile) {\r\n case 1:\r\n guess = tile1.toString();\r\n break;\r\n case 2:\r\n guess = tile2.toString();\r\n break;\r\n case 3:\r\n guess = tile3.toString();\r\n break;\r\n case 4:\r\n guess = tile4.toString();\r\n break;\r\n case 5:\r\n guess = tile5.toString();\r\n break;\r\n case 6:\r\n guess = tile6.toString();\r\n break;\r\n case 7:\r\n guess = tile7.toString();\r\n break;\r\n case 8:\r\n guess = tile8.toString();\r\n break;\r\n case 9:\r\n guess = tile9.toString();\r\n break;\r\n default:\r\n guess = \"\";\r\n }\r\n length = guess.length();\r\n\r\n // check if valid word\r\n if (length >= 3) { // check if the length of the word is >= 3\r\n if (dictionary.contains(guess.toLowerCase())) { // check if the dictionary contains the word\r\n correct = true; // true if found\r\n\r\n stringSubmitted[largeTile-1] = 1; // word has been submitted for this tile\r\n\r\n // set amount of points\r\n int bonus = 0;\r\n for (char c : guess.toCharArray()) {\r\n if (c == 'E' || c == 'A' || c == 'I' || c == 'O' || c == 'N' || c == 'R' || c == 'T' || c == 'L' || c == 'S') {\r\n bonus += 1;\r\n } else if (c == 'D' || c == 'G') {\r\n bonus += 2;\r\n } else if (c == 'B' || c == 'C' || c == 'M' || c == 'P') {\r\n bonus += 3;\r\n } else if (c == 'F' || c == 'H' || c == 'V' || c == 'W' || c == 'Y') {\r\n bonus += 4;\r\n } else if (c == 'K') {\r\n bonus += 5;\r\n } else if (c == 'J' || c == 'X') {\r\n bonus += 8;\r\n } else {\r\n bonus += 10;\r\n }\r\n }\r\n if (length == 9 && phase == 1) bonus += length; // bonus for 9 letter word during phase 1\r\n pointsScore += bonus; // calculate total score\r\n scoreBoard.setText(\"\"+pointsScore); // set scoreboard to total\r\n\r\n // save longest word information\r\n if (length > longestLength) {\r\n longestLength = length;\r\n longestWord = guess;\r\n longestWordScore = bonus;\r\n }\r\n\r\n // mark as submitted in tile tacker array\r\n submittedTracker[largeTile-1] = true;\r\n int done = 0;\r\n for (boolean b : submittedTracker) {\r\n if (b == true) done++;\r\n }\r\n// if (done == 9) {\r\n// timer.cancel();\r\n// gameOver();\r\n// }\r\n }\r\n } else {\r\n correct = false; // false if not found\r\n pointsScore -= 3; // penalize for submitting an incorrect word\r\n scoreBoard.setText(\"\"+pointsScore); // set scoreboard to total\r\n }\r\n\r\n // if word is in the dictionary\r\n if (correct) {\r\n mSoundPool.play(mSoundCorrect, mVolume, mVolume, 1, 0, 1f); // chime when correct\r\n adapter.add(guess); // add to list\r\n// Log.e(\"word\", String.valueOf(tile1));\r\n\r\n // set unused tiles to be blank\r\n for (int small = 0; small < 9; small++) { // go through entire list\r\n// Log.e(\"tile # \", Integer.toString(small));\r\n// Log.e(\"selected? \", allTilesInt[largeTile-1][small] == 0 ? \"no\" : \"yes\");\r\n if (allTilesInt[largeTile-1][small] == 0) { // if the tile was not selected\r\n buttonList[largeTile-1][small].setText(\"\"); // remove the letter from the button\r\n buttonList[largeTile-1][small].setClickable(false);\r\n }\r\n }\r\n\r\n // if word was not in the dictionary\r\n } else {\r\n mSoundPool.play(mSoundIncorrect, mVolume, mVolume, 1, 0, 1f); // quack when incorrect\r\n }\r\n }", "public static void search(String word){\n if(index.containsKey(word)){\n System.out.println(\"word \" + word + \" displays in :\");\n HashSet<String> list = index.get(word);\n for(String str:list){\n System.out.println(str);\n }\n }\n else{\n System.out.println(\"word \" + word + \" doesn't found!\");\n }\n }", "private boolean isWord(String word) {\n\t\treturn dict.isWord(word);\n\t}", "public boolean inCache(String word){\n\t//\tSystem.out.println(\"checking word is: \"+\"-\"+word+\"-\");\n\t//\tSystem.out.println(source.containsValue(word));\n\t\tif(source.get(word) != null){\n\t//\t\tSystem.out.println(\"This word is in the cache dictionary \");\n\t\t\treturn true;\n\t\t}\n\t//\tSystem.out.println(\"this word is not in the cache dictionary \");\n\t\treturn false;\n\t}", "public double[] score(String word, short tag, int loc, boolean noSmoothing,\n\t\t\tboolean isSignature, double priorProb);", "private static int num_vokal(String word) {\n int i;\n int jumlah_vokal = 0;\n\n for (i = 0; i < word.length(); i++) {\n if (word.charAt(i) == 'a' ||\n word.charAt(i) == 'i' ||\n word.charAt(i) == 'u' ||\n word.charAt(i) == 'e' ||\n word.charAt(i) == 'o') {\n jumlah_vokal++;\n }\n }\n return jumlah_vokal;\n }", "public double tf(String wordToLookFor, HashMap<String, ArrayList<Integer>> tokensHM, Document doc) {\n if (tokensHM.containsKey(wordToLookFor)) {\n double count = 0;\n String[] words = doc.generateWordList(doc.getDocument());\n if(tokensHM.get(wordToLookFor).contains(doc.getIndex())) {\n for (String word : words) {\n if (word.equals(wordToLookFor)) {\n count++;\n }\n }\n }\n return count/words.length;\n }\n else {\n return 0;\n }\n }", "public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }", "public int getFrequencyOf(String word) {\r\n\t\tint frequency = 0;\r\n\t\tif (readDocument != null) {\r\n\t\t\tfrequency = readDocument.getFrequencyOf(word);\r\n\t\t\tSystem.out.println(\"Frequency: \" + frequency);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t\treturn frequency;\r\n\t}", "@Test \r\n public void shouldFindOneWordAtTheEnd() {\r\n \r\n String inputWord = \"bxxxxxxxe\";\r\n String[] dictionary =\r\n new String[] {\"able\", \"be\", \"ale\", \"apple\", \"bale\", \"kangaroo\"};\r\n \r\n assertEquals(\"be\", wordSeeker.lookFor(inputWord, dictionary));\r\n }", "public void add(String word) {\n if (hashTable.contains(word)) {\n hashTable.put(word, hashTable.get(word) + 1);\n }\n else {\n hashTable.put(word,1);\n }\n }", "public static int countWord(String string, String word) {\n int count = 0;\n while (string.indexOf(word) > -1) {\n count++;\n string = string.substring(string.indexOf(word) + 1);\n }\n return count;\n\n }", "static int countOccurrences(String str, String word) \r\n\t\t{\n\t\t String a[] = str.split(\" \");\r\n\t\t \r\n\t\t // search for pattern in a\r\n\t\t int count = 0;\r\n\t\t for (int i = 0; i < a.length; i++) \r\n\t\t {\r\n\t\t // if match found increase count\r\n\t\t if (word.equals(a[i]))\r\n\t\t count++;\r\n\t\t }\r\n\t\t \r\n\t\t return count;\r\n\t\t}", "private boolean isValidWord(String word){\n if (trie.searchWord(word)){\n return true;\n } else {\n return false;\n }\n }", "private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}", "public boolean contains(String word) {\n\t\treturn invertedIndex.containsKey(word);\n\t}", "@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }", "public static void main(String[] args) \n\t{\n\t\tBoggleBoard.generateBoard();\n\t\tArrayList<String> usedWords = new ArrayList<String>();\n\t\tmyDictionary = new Dictionary(\"words.txt\"); //load the dictionary\n\t\tmyBoard = new BoggleBoard(\"board.txt\"); //load the board: board.txt for standard board, board2.txt for random board\n\t\tmyBoard.display(); //display the board\n\t\tint score = 0;\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"\\nEnter a word (or enter nothing at any point to end the game): \");\n\t\tString input = scan.nextLine();\n\t\tinput = input.toLowerCase();\n\t\t\n\t\twhile(!input.equals(\"\")) //user inputs a word\n\t\t{\n\t\t\tif(input.length() < 3) //words less than 3 letters don't count\n\t\t\t\tSystem.out.println(\"That word is too short.\");\n\t\t\telse if(Dictionary.search(input, 0, myDictionary.size-1) < 0) //user made up a word\n\t\t\t\tSystem.out.println(\"That word is not in the dictionary.\");\n\t\t\telse if(!myBoard.findWord(input.toUpperCase())) //word not on the board\n\t\t\t\tSystem.out.println(\"That word is a valid word, but is not on the board.\");\n\t\t\telse // myDictionary.search() && myBoard.findWord(input)\n\t\t\t{\n\t\t\t\tif(!usedWords.contains(input))\n\t\t\t\t{\n\t\t\t\t\t//account for grammar\n\t\t\t\t\tif(myBoard.score(input) == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"That is a good word! You score \" + myBoard.score(input) + \" point!\");\n\t\t\t\t\t\tscore += myBoard.score(input);\n\t\t\t\t\t\tusedWords.add(input); //add searched words to usedWords to make sure they cant be used again\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"That is a good word! You score \" + myBoard.score(input) + \" points!\");\n\t\t\t\t\t\tscore += myBoard.score(input);\n\t\t\t\t\t\tusedWords.add(input);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"That word was already used.\");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t\tmyBoard.display();\n\t\t\t\n\t\t\tSystem.out.print(\"Used words: \");\n\t\t\tfor(String d : usedWords)\n\t\t\t\tSystem.out.print(d + \", \");\n\t\t\t\n\t\t\tSystem.out.print(\"\\nEnter a word: \");\n\t\t\tinput = scan.nextLine();\n\t\t\tinput = input.toLowerCase();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"Total score: \" + score); //end of the game.\n\t\tSystem.out.println(\"Thanks for playing!\");\n\t}", "@Test\r\n public void shouldFindTheLongestWordInDictionary() {\r\n\r\n String inputWord = \"abppplee\";\r\n String[] dictionary =\r\n new String[] {\"able\", \"ale\", \"apple\", \"bale\", \"kangaroo\", \r\n \"axxxxxxxxxxxxxx\", \"bddddddddddddddd\", \"cccccccccccccccccc\", \r\n \"hxxxxxxxxxxxxxx\", \"gbddddddddddddddd\", \"xccccccccccccccccc\"};\r\n\r\n assertEquals(\"apple\", wordSeeker.lookFor(inputWord, dictionary));\r\n }", "public static Map<String, Double> calculateScores(Set<Word> words) {\n//\t\tSystem.out.println(words);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tMap<String, Double> myMap = new HashMap<>();\n\t\tif(words == null || words.isEmpty()) return myMap;\n\t\tfor(Word w : words) {\n//\t\t\tSystem.out.println(w);\n\t\t\tmyMap.put(w.getText(), w.calculateScore());\n\t\t}\n\t\treturn myMap; // this line is here only so this code will compile if you don't modify it\n\t}", "@Override\n\tpublic Integer getScore(Jogador jogador) {\n\t\treturn scoreMap.get(jogador.getNome().toUpperCase());\n\t}", "public static String bestWord (String [] word, int [] scoretable)\r\n { \r\n int score = 0;\r\n int maxScore = 0;\r\n String maxScoreString = \"\";\r\n for(String each : word)\r\n { \r\n score = getScore(each, scoretable); \r\n if(score > maxScore)\r\n {\r\n maxScore = score;\r\n maxScoreString = each;\r\n }\r\n } \r\n return maxScoreString;\r\n }", "@Test\n public void givenASentencewhenWordIsRemovedShouldReturnDeletedWordFrequency() {\n String sentence = \"Paranoids are not paranoid because they are paranoid but because \"\n + \"they keep putting themselves deliberately into paranoid avoidable situations\";\n MyLinkedHashMap<String, Integer> myLinkedHashMap = new MyLinkedHashMap<>();\n String[] words = sentence.toLowerCase().split(\" \");\n for (String word : words) {\n Integer value = myLinkedHashMap.get(word);\n if (value == null)\n value = 1;\n else\n value += 1;\n myLinkedHashMap.add(word, value);\n }\n int frequency = myLinkedHashMap.remove(\"avoidable\");\n Assert.assertEquals(1, frequency);\n }", "private WordRecord lookUp(String word)\n {\n int contains = 0;\n boolean check = false;\n //loops through concordance\n for(int i = 0; i < this.concordance.size();i++)\n {\n //checks to see if the words are equal\n if(word.equalsIgnoreCase(this.concordance.get(i).getWord()))\n {\n //gets location of what position the word is true\n contains = i;\n check = true;\n }\n \n }\n //checks to see if it was found in concordance\n if(check)\n return this.concordance.get(contains);\n \n return null;\n }", "public String getLexEntry(String word)\n {\n boolean found = false;\n String buff = \"\";\n String rtn = \"\";\n\n lastCount = 0.0;\n if(word.length() > 0)\n {\n buff = compactNumbers(word);\n rtn = searchLexDb(buff, true);\n if(rtn.length() > 0)\n found = true;\n\n else // try the lowercase version\n {\n buff = buff.toLowerCase();\n rtn = searchLexDb(buff, true);\n if(rtn.length() > 0)\n found = true;\n } // else\n } // fi\n\n // If not found, get the search string corresponding to the word.\n\n if(!found)\n {\n buff = searchString(word);\n\n while(!found && (buff.length() > 0))\n {\n rtn = searchLexDb(buff, false);\n if(rtn.length() > 0)\n found = true;\n else\n buff = buff.substring(1);\n } // while\n } // fi\n\n if(!found)\n System.out.println(\"word: #\" + word + \"# lex entry not found\");\n\n return(rtn.toString());\n }", "private double countWordFrequencyScore(Page page, String[] queryWords) {\n double score = 0;\n for (String word : queryWords) {\n int wordId = this.pb.getIdForWord(word);\n for (double pageWordId : page.getWords()) {\n if (wordId == pageWordId) score++;\n }\n }\n\n return score;\n }", "public Boolean lookupAWord(String target) {\n ArrayList<Word> fullDictionary = dictionaryManagement.getDictionary().getWords();\n int result = dictionaryManagement.lookupWord(target);\n if (result == -1) {\n System.out.println(\"This word is dose not exsit!\");\n return false;\n } else {\n System.out.println(\"Result: \");\n System.out.println(\"\\tTarget: \" + target);\n System.out.println(\"\\tExplain: \" + fullDictionary.get(result).getWordExplain());\n return true;\n }\n }", "public boolean search(String word) {\n Trie cur = this;\n int i = 0;\n while(i < word.length()) {\n int c = word.charAt(i) - 'a';\n if(cur.tries[c] == null) {\n return false;\n }\n cur = cur.tries[c];\n i++;\n }\n return cur.hasWord;\n }", "public Map<String, Integer> findUnicalWord(ArrayList<Word> text)\n {\n String[] words=new String[text.size()];\n for(int i=0; i<text.size(); i++){\n words[i]=text.get(i).toString();\n }\n HashMap<String, Integer> myWordsCount = new HashMap<>();\n for (String s : words){\n if (myWordsCount.containsKey(s)) myWordsCount.replace(s, myWordsCount.get(s) + 1);\n else myWordsCount.put(s, 1);\n }\n\n Map<String, Integer> newWordsCount = myWordsCount\n .entrySet()\n .stream()\n .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))\n .collect(\n toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2,\n LinkedHashMap::new));\n\n return newWordsCount;\n\n }", "public boolean search(String word){\n\t\tint hash = getHash(word);\n\t\tif (hash != INVALID){\n\t\t\treturn m_arraylists[hash].search(word);\n\t\t}\n\t\treturn false;\n\t}", "public double getScoreOfString(String tweet) {\n return classifier.classify(tweet);\n }", "public Map<String, Integer> countWordsComputeIfPresent(String passage, String... strings) {\n\n Map<String, Integer> wordCounts = new HashMap<>();\n Arrays.stream(strings).forEach(s -> wordCounts.put(s, 0));\n Arrays.stream(passage.split(\" \")).forEach(word ->\n wordCounts.computeIfPresent(word, (key, val) -> val + 1));//word,\n return wordCounts;\n\n }", "@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");*/\r\n }", "public boolean add(String word) {\r\n\t\treturn dict.add(word);\r\n\t}", "public int findKeyword(String phrase, String goal){\n\t\tif (phrase != null){\n\t\t\tint psn = phrase.indexOf(goal, 0);\n\t\t\twhile (psn >= 0){\n\t\t\t\tString before = \" \", after = \" \";\n\t\t\t\tif (psn > 0){\n\t\t\t\t\tbefore = phrase.substring(psn - 1, psn);\n\t\t\t\t}if (psn + goal.length() < phrase.length()){\n\t\t\t\t\tafter = phrase.substring(\n\t\t\t\t\t\t\tpsn + goal.length(),\n\t\t\t\t\t\t\tpsn + goal.length() + 1);\n\t\t\t\t}if (((before.compareTo(\"a\") < 0) || (before.compareTo(\"z\") > 0)) && ((after.compareTo(\"a\") < 0) || (after.compareTo(\"z\") > 0))){\n\t\t\t\t\treturn psn;\n\t\t\t\t}\n\t\t\t\tpsn = phrase.indexOf(goal, psn + 1);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "private static String mostCommonWord(String paragraph, String[] banned) {\n\t String [] words =paragraph.replaceAll(\"[^a-zA-Z\\\\s+]\", \" \").toLowerCase().split(\"\\\\s+\");\r\n\t \r\n\t Set<String> bannedSet = new HashSet<String>();\r\n\t HashMap<String,Integer> map = new HashMap<String,Integer>();\r\n\t \r\n\t for (String string : banned) {\r\n\t \tbannedSet.add(string);\r\n\t }\r\n\t \r\n\t \r\n\t for (String string : words) {\r\n\t\t\t\r\n\t \tif(!bannedSet.contains(string)) {\r\n\t \t\tmap.put(string, map.getOrDefault(string, 0)+1);\r\n\t \t}\r\n\t \t \r\n\t\t}\r\n\t\t \r\n\t List list = new LinkedList(map.entrySet());\r\n\t\t// Defined Custom Comparator here\r\n\t\tCollections.sort(list, new Comparator() {\r\n\t\t\tpublic int compare(Object o1, Object o2) {\r\n\t\t\t\treturn ((Comparable) ((Map.Entry) (o2)).getValue()).compareTo(((Map.Entry) (o1)).getValue());\r\n\t\t\t}\r\n\t\t});\r\n\t \r\n\t\t//System.out.println(map);\r\n\t\t//System.out.println(list);\r\n\t\t\r\n\t\t return (String) ((Map.Entry) list.get(0)).getKey();\t\t\r\n\t}", "public static int getHealthScore(String hstr) {\n try {\n int score = HEALTH_SYMPTOM_NUM;\n for (int i = 0; i < HEALTH_SYMPTOM_NUM; i++)\n if (0 == ONE.compareTo(String.valueOf(hstr.charAt(i))))\n score--;\n return score;\n } catch (Exception e) {\n return 0;\n }\n }", "boolean isWord(String potentialWord);", "public long getCount(String word) throws FileNotFoundException,IOException{\n\t\tlong count=0;\n\t\tLong cacheCount=counts.get(word);\n\t\tif(cacheCount==null){\n\t\t\tsynchronized(this){\n\t\t\t\ttry(BufferedReader inputFile=new BufferedReader(new FileReader(GlobalResources.FILE_PATH))){\n\t\t\t\t\tString line=inputFile.readLine();\n\t\t\t\t\tStringTokenizer tokenizer=null;\n\t\t\t\t\twhile(line!=null){\n\t\t\t\t\t\ttokenizer=new StringTokenizer(line);\n\t\t\t\t\t\tString token=null;\n\t\t\t\t\t\twhile(tokenizer.hasMoreElements()){\n\t\t\t\t\t\t\ttoken=(String)tokenizer.nextElement();\n\t\t\t\t\t\t\tif(token.equalsIgnoreCase(word))count++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tline=inputFile.readLine();\n\t\t\t\t\t}\n\t\t\t\t}catch(FileNotFoundException fileNotFoundException){\n\t\t\t\t\tSystem.out.println(\"FileNotFoundException in class FileDAO : method : getCount(String) \"+fileNotFoundException.getMessage());\n\t\t\t\t\tthrow fileNotFoundException;\n\t\t\t\t}catch(IOException ioException){\n\t\t\t\t\tSystem.out.println(\"IOException in class FileDAO : method : getCount(String) \"+ioException.getMessage());\n\t\t\t\t\tthrow ioException;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounts.put(word, count);\n\t\t}else{\n\t\t\tcount=cacheCount.longValue();\n\t\t}\n\t\treturn count;\n\t}", "public Map<String, Integer> wordCount(String string) {\n\t\t// TODO Write an implementation for this method declaration\n\t\tString foundword = \"\";\n\t\tstring = string.replaceAll(\"\\n\",\"\");\n\t\tMap<String, Integer> WordCountMap = new HashMap<>();\n\t\tList<String> stringList = new ArrayList<String>();\n\t\tfor(int i = 0; i < string.length(); i++) {\n\t\t\t//System.out.println(string.charAt(i));\n\t\t\t\n\t\t\tif(string.charAt(i) == ' ') {\n\t\t\t\tstringList.add(foundword);\n\t\t\t\tfoundword = \"\";\n\t\t\t}\n\t\t\telse if(string.charAt(i) == ',') {\n\t\t\t\tstringList.add(foundword);\n\t\t\t\tfoundword = \"\";\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tfoundword = foundword + string.charAt(i);\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tstringList.add(foundword);\n\t\t\n\t\tfor(String name: stringList) {\n\t\t\tif(WordCountMap.containsKey(name)) {\n\t\t\t\t//The frequencyMap already contains the count for this name;\n\t\t\t\t//So we want to increase that count by 1\n\t\t\t\tint currentCount = WordCountMap.get(name);\n\t\t\t\tWordCountMap.put(name, currentCount+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tWordCountMap.put(name, 1); //Track the name with a count of 1 if we haven't seen it before\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn WordCountMap;\n\t}", "@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}", "public boolean findWord ( String word ) {\n\t\tif(this.contains(word))\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t\t\n\t\t/**old code written by Professor below\n\t\t * \n\t\t */\n\t\t//return isWordInDictionaryRecursive( word, 0, words.size()-1);\n\n\t}", "public void match( String word )\n { \n for( int i=0; i<numAssocs; i++ )\n if( word.equalsIgnoreCase( associations[i] ) )\n {\n incrActivation();\n// System.out.println( this.toString() + \" from processing \" + word );\n }\n }" ]
[ "0.8387435", "0.8014986", "0.7524082", "0.7205271", "0.71016705", "0.705186", "0.67594045", "0.6648599", "0.6572875", "0.6557154", "0.65285933", "0.65043366", "0.64832723", "0.6461632", "0.63644344", "0.6311931", "0.62998223", "0.62501115", "0.61952776", "0.6192339", "0.6133516", "0.60630214", "0.6040965", "0.60407394", "0.60069907", "0.5982182", "0.59607023", "0.5891326", "0.58793926", "0.5879365", "0.5857634", "0.58441246", "0.5828101", "0.5822883", "0.5809533", "0.5805702", "0.5794059", "0.57938224", "0.57801425", "0.57587355", "0.57578725", "0.57433736", "0.5719464", "0.571009", "0.5684426", "0.5672161", "0.56687236", "0.5656659", "0.56426084", "0.5596943", "0.5596902", "0.5596856", "0.558762", "0.55829465", "0.55692893", "0.5564193", "0.5546559", "0.55387414", "0.5525582", "0.5520054", "0.55185735", "0.55111986", "0.551054", "0.55102444", "0.5506281", "0.5502478", "0.55018944", "0.5492868", "0.5490075", "0.54882604", "0.5472953", "0.5468219", "0.54438746", "0.5437351", "0.5434521", "0.54263395", "0.5417381", "0.5416823", "0.5415284", "0.5412023", "0.5408135", "0.5404518", "0.54034334", "0.53988665", "0.53960586", "0.53906035", "0.5378057", "0.5374028", "0.5371465", "0.5367931", "0.5361041", "0.5358392", "0.53564924", "0.5353041", "0.53395766", "0.5338825", "0.5338436", "0.5338239", "0.53373015", "0.53349465" ]
0.8067689
1
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "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
Returns the created listCellRenderer based on the given data model
public static ListCellRenderer<User> createListRenderer(final Model model) { return new ListCellRenderer<User>() { @Override public Component getListCellRendererComponent( JList<? extends User> list, User value, int index, boolean isSelected, boolean cellHasFocus) { // Creating the label JLabel label = new JLabel(); label.setText(" "+value.getUserName()); // Set basic style label.setBorder(BorderFactory.createCompoundBorder(ViewConstraints.USER_BORDER,ViewConstraints.PADDING_BORDER)); label.setFont(ViewConstraints.USER_NAME_LABLE_FONT); label.setOpaque(true); if (model.getOnlineUsers().contains(value)||value.getUserName().equals(ViewConstraints.PUBIC_USER_NAME)) { // THE User is ONLINE label.setText(" "+value.getUserName()+ " [online]"); label.setBackground(ViewConstraints.USER_ONLINE_COLOR); }else{ //THE User is OFFLINE label.setText(" "+value.getUserName()+ " [offline]"); label.setBackground(ViewConstraints.USER_OFFLINE_COLOR); } if (model.getAuthUser().getUserName()!= null && model.getAuthUser().getUserName().equals(value.getUserName())){ //THE PUBLIC CHAT is always ONLINE label.setText(" "+value.getUserName()+ " [You are online]"); label.setBackground(ViewConstraints.USER_AUTH_COLOR); } if (isSelected) { //THE User is SELECTED label.setText(" "+value.getUserName()+ " [selected]"); label.setBackground(ViewConstraints.USER_SELECTED_COLOR); } return label; } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static ListCellRenderer<? super Appointment> createListRenderer() {\n return new DefaultListCellRenderer() {\n private Color background = new Color(0, 100, 255, 15);\n private Color defaultBackground = (Color) UIManager.get(\"List.background\");\n \n public Component getListCellRendererComponent(JList<?> list, Object value, int index,\n boolean isSelected, boolean cellHasFocus) {\n Component c = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n if (c instanceof JLabel) {\n JLabel label = (JLabel) c;\n Appointment app = (Appointment) value;\n if(app != null){\n label.setText(String.format(\"%s\",app.getAppointmentDate().toString()));\n }\n \n if (!isSelected) {\n label.setBackground(index % 2 == 0 ? background : defaultBackground);\n }\n }\n return c;\n }\n };\n }", "protected ListCellRenderer createRenderer()\n {\n return new BEComboBoxRenderer.UIResource(this);\n }", "public Component getListCellRendererComponent(JList jlist, \n Object value, \n int cellIndex, \n boolean isSelected, \n boolean cellHasFocus)\n {\n if (value instanceof JPanel)\n {\n Component component = (Component) value;\n component.setForeground (Color.white);\n component.setBackground (isSelected ? UIManager.getColor(\"Table.focusCellForeground\") : Color.white);\n return component;\n }\n else\n {\n // TODO - I get one String here when the JList is first rendered; proper way to deal with this?\n //System.out.println(\"Got something besides a JPanel: \" + value.getClass().getCanonicalName());\n return new JLabel(\"???\");\n }\n }", "@Override\n public Component getListCellRendererComponent(JList<?> list, Object value, // value to display\n int index, // cell index\n boolean iss, // is the cell selected\n boolean chf) // the list and the cell have the focus\n {\n /* The DefaultListCellRenderer class will take care of\n * the JLabels text property, it's foreground and background\n * colors, and so on.\n */\n super.getListCellRendererComponent(list, value, index, iss, chf);\n\n /* We additionally set the JLabels icon property here.\n */\n String s = value.toString();\n if (entry.hasField(s)) {\n this.setForeground(Color.gray);\n this.setFont(usedFont);\n this.setIcon(okIcon);\n this.setToolTipText(Localization.lang(\"Filled\"));\n } else {\n this.setIcon(needIcon);\n this.setToolTipText(Localization.lang(\"Field is missing\"));\n }\n if (requiredFields.contains(s)) {\n this.setBackground(requiredColor);\n } else if (optionalFields.contains(s)) {\n this.setBackground(optionalColor);\n }\n return this;\n }", "DefaultListModel<E> getListModel();", "public Component getListCellRendererComponent(\n JList list,\n Object value,\n int index,\n boolean isSelected,\n boolean cellHasFocus) {\n //Get the selected index. (The index param isn't\n //always valid, so just use the value.)\n// int selectedIndex = ((Int\n// icon = createImageIcon(\"\");eger)value).intValue();\n\n if (isSelected) {\n setBackground(list.getSelectionBackground());\n setForeground(list.getSelectionForeground());\n } else {\n setBackground(list.getBackground());\n setForeground(list.getForeground());\n }\n\n //Set the icon and text. If icon was null, say so.\n if(saveType.equals(\"Folder\"))\n {\n\n }\n setIcon(icon);\n if (icon != null) {\n setFont(list.getFont());\n }\n\n return this;\n }", "public Component getListCellRendererComponent(JList list,Object value,int index,boolean isSelected,boolean cellHasFocus) {\n\t\t\n\t\tif (isSelected) {\n\t\t\tsetBackground(list.getSelectionBackground());\n\t\t} else {\n\t\t\tsetBackground(list.getBackground());\n\t\t}\n\t\tScript script =hacktendoCreator.getScript(index);\n\t\tif(script!=null){\n\t\t\tif(script.getType()==Script.MAP)\n\t\t\t\tsetForeground(Color.red);\n\t\t\telse\n\t\t\t\tsetForeground(Color.blue);\n\t\t\tString name = script.getName();\n\t\t\t\n\t\t\tsetText(index+\": \"+name);\n\t\t}\n\t\telse{\n\t\t\tsetText(index+\": \");\n\t\t}\n\t\t\n\t\treturn this;\n\t}", "public Component getListCellRendererComponent(JList list, \n Object value, \n int index, \n boolean isSelected, \n boolean cellHasFocus) {\n JLabel lbl = (JLabel)super.getListCellRendererComponent(\n list, value, index, isSelected, cellHasFocus);\n lbl.setHorizontalAlignment(align);\n return lbl;\n }", "@Override public Component getListCellRendererComponent(JList<? extends F> list, F value, int index, boolean isSelected, boolean cellHasFocus) {\n JTableHeader header = table.getTableHeader();\n renderer.setFont(header.getFont());\n if (index == pressedRowIndex) {\n renderer.setBackground(Color.GRAY);\n } else if (index == rollOverRowIndex) {\n renderer.setBackground(Color.WHITE);\n } else if (isSelected) {\n renderer.setBackground(Color.GRAY.brighter());\n } else {\n renderer.setForeground(header.getForeground());\n renderer.setBackground(header.getBackground());\n }\n renderer.setText(Objects.toString(value, \"\"));\n return renderer;\n }", "public Component getListCellRendererComponent(JList list,\n Object value, \n int index, \n boolean isSelected,\n boolean cellHasFocus) {\n \n setBackground(isSelected ? list.getSelectionBackground() : \n list.getBackground());\n setForeground(isSelected ? list.getSelectionForeground() : \n list.getForeground());\n \n if (value != null) {\n LabelValueBean<L,V> bean = (LabelValueBean)value;\n setText(bean.getLabel()+\"\");\n }\n \n setBorder(border);\n \n return this;\n }", "@Override\n\tpublic Component getListCellRendererComponent(JList list, Object value,\n\t\t\tint index, boolean isSelected, boolean cellHasFocus) {\n\t\tString key=(String)value;\n\t\tif(isSelected){\n\t\t\tthis.setBackground(list.getSelectionBackground());\n\t\t\tthis.setForeground(list.getSelectionForeground());\n\t\t\t\n\t\t}else{\n\t\t\tthis.setBackground(list.getBackground());\n\t\t\tthis.setForeground(list.getForeground());\n\t\t}\n\t\tsetText(key);\n\t\tsetIcon(content.get(key));\n\t\tsetFont(list.getFont());\n\t\t\n\t\treturn this;\n\t}", "@Override\n\tpublic Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n\t\tJLabel lbl = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected,\n\t\t\t\tcellHasFocus);\n\t\tFuncao funcao = (Funcao)value;\n\t\tlbl.setText(funcao.getCompId().getCodFuncaoFunc() + \" - \" + funcao.getNomeFunc());\n\t\treturn lbl;\n\t}", "public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n if ((value != null) && (value instanceof String) && (msg != null)) {\n String sValue = (String)value;\n String key = msg.getUserDefinedParameter(sValue);\n setText(sValue + \" = \" + key);\n }\n setBackground(isSelected ? Color.blue : Color.white);\n setForeground(isSelected ? Color.white : Color.black);\n return this;\n }", "public Component getListCellRendererComponent(\r\n JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\r\n this.memInt = (MemoryInt) value;\r\n\r\n if (isSelected) {\r\n setBackground(list.getSelectionBackground());\r\n setForeground(list.getSelectionForeground());\r\n } else {\r\n setBackground(list.getBackground());\r\n setForeground(list.getForeground());\r\n }\r\n\r\n return this;\r\n }", "public Component getListCellRendererComponent(JList list, Object value,\n\t\t\tint index, boolean isSelected, boolean cellHasFocus) {\n\t\tif (isSelected) {\n\t\t\tsetBackground(list.getSelectionBackground());\n\t\t\tsetForeground(list.getSelectionForeground());\n\t\t} else {\n\t\t\tsetBackground(list.getBackground());\n\t\t\tsetForeground(list.getForeground());\n\t\t}\n\n\t\t// set the text (fulldomain name of the domain) to display\n\t\tsetText(((Domain) value).getFullDomain());\n\n\t\treturn this;\n\t}", "@Override\n public Component getListCellRendererComponent(\n JList list,\n Object value,\n int index,\n boolean isSelected,\n boolean cellHasFocus) {\n setName(\"ComboBox.listRenderer\"); // NOI18N\n \n if ( value != null && ((ProjectScope)value).getLabel() != null ) {\n setText(((ProjectScope)value).getLabel().getText());\n setIcon(((ProjectScope)value).getLabel().getIcon());\n }\n \n if ( isSelected ) {\n setBackground(list.getSelectionBackground());\n setForeground(list.getSelectionForeground());\n } else {\n setBackground(list.getBackground());\n setForeground(list.getForeground());\n }\n \n return this;\n }", "public Component getListCellRendererComponent(\n JList<? extends BehaviorPackager> list,\n BehaviorPackager value,\n int index,\n boolean isSelected,\n boolean cellHasFocus) {\n\n String sVal = String.valueOf(value);\n\n this.setText(sVal);\n if (isSelected) {\n\n setBackground(list.getSelectionBackground());\n setForeground(list.getSelectionForeground());\n }\n else {\n if (index % 2 == 1) {\n setBackground(new java.awt.Color(225, 225, 225));\n }\n else {\n setBackground(list.getBackground());\n }\n setForeground(list.getForeground());\n }\n\n //Make the label display enough rows to show all the text\n JLabel jNotUsedField = new JLabel(sVal);\n jNotUsedField.setFont(new SortieFont());\n //float fWidth = (float) jNotUsedField.getPreferredSize().getWidth() - 15;\n //Sometimes the line above did not allow the ends of names to display. \n //The line below seems to allow all endings to be visible without \n //introducing extraneous line wrappings \n float fWidth = (float) jNotUsedField.getPreferredSize().getWidth()+15;\n int iNumRows = (int) java.lang.Math.ceil(fWidth / m_fComponentWidth);\n setRows(iNumRows);\n\n return this;\n }", "@Override\n\tpublic Component getListCellRendererComponent(JList<? extends Object> list, Object value, int index,\n\t\t\tboolean isSelected, boolean cellHasFocus) {\n\t\tJPanel contentPane = new JPanel();\n\t\tif (list == room_list) {\n\t\t\tRoomHandler room = (RoomHandler) value;\n\t\t\tcontentPane.setName(Integer.toString(room.getRoomNum()));\n\t\t\tcontentPane.setLayout(new BorderLayout());\n\t\t\tcontentPane.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\n\t\t\tJLabel roomNum = new JLabel(String.format(\"%5d\", room.getRoomNum()));\n\t\t\troomNum.setOpaque(false);\n\t\t\troomNum.setFont((new Font(\"굴림\", Font.BOLD, 16)));\n\t\t\troomNum.setHorizontalAlignment(roomNum.RIGHT);\n\n\t\t\tJLabel roomName = new JLabel(\"방제 : \" + room.getRoomName());\n\t\t\troomName.setOpaque(false);\n\t\t\troomName.setFont(new Font(\"굴림\", Font.BOLD, 18));\n\t\t\troomName.setHorizontalAlignment(roomName.CENTER);\n\n\t\t\tJLabel school = new JLabel(\"학교 : \" + room.getSchool());\n\t\t\tschool.setOpaque(false);\n\t\t\tschool.setFont((new Font(\"굴림\", Font.BOLD, 16)));\n\t\t\tschool.setHorizontalAlignment(school.RIGHT);\n\n\t\t\tJLabel inUser = new JLabel(String.format(\"인원 : %3d / %3d\", room.getInUser(), room.getMax()));\n\t\t\tinUser.setOpaque(false);\n\t\t\tinUser.setHorizontalAlignment(inUser.RIGHT);\n\t\t\tinUser.setFont((new Font(\"굴림\", Font.BOLD, 16)));\n\n\t\t\tcontentPane.add(roomNum, BorderLayout.WEST);\n\t\t\tcontentPane.add(roomName, BorderLayout.NORTH);\n\t\t\tcontentPane.add(school, BorderLayout.CENTER);\n\t\t\tcontentPane.add(inUser, BorderLayout.SOUTH);\n\n\t\t\tif (isSelected) {\n\t\t\t\tcontentPane.setBackground(room_list.getSelectionBackground());\n\t\t\t\t/*\n\t\t\t\t * int roomNo = room.getRoomNum(); if (!room.isFull(roomNo)) {\n\t\t\t\t * chatGui.myEnterRoom(roomNo); mySocket.sendMessage(\"enterRoom/.\" +\n\t\t\t\t * room.getRoomNum()); room_list.setListData(room.getAllRoom());\n\t\t\t\t * setVisible(false); } else { JOptionPane jp = new JOptionPane();\n\t\t\t\t * jp.showMessageDialog(mainContentPane, roomNo + \"번 방 입장에 실패했습니다.\");\n\t\t\t\t * room_list.setListData(room.getAllRoom()); }\n\t\t\t\t */\n\t\t\t} else {\n\t\t\t\tcontentPane.setOpaque(true);\n\t\t\t}\n\n\t\t}\n\t\treturn contentPane;\n\t}", "public final Callback<ListView<T>, ListCell<T>> getCellFactory() {\n\n return this.getWrappedControl().getCellFactory();\n }", "public Component getListCellRendererComponent(JList jList, Object val,\n int index, boolean selected, boolean cellGotFocus) {\n String stringRepresentation = val.toString();\n if (val instanceof Ontology) {\n\n Ontology o = (Ontology) val;\n\n // ols versions are now like Jun 2010 rather than their previous version format 1.26\n stringRepresentation = o.getOntologyAbbreviation() + \" - \" + o.getOntologyDisplayLabel();\n }\n\n text.setText(stringRepresentation);\n text.setFont(selected ? UIHelper.VER_10_BOLD : UIHelper.VER_10_PLAIN);\n return this;\n }", "@Override\n public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n\n JLabel label = (JLabel) super.getListCellRendererComponent(list, ((Pair) value).getValue(), index, isSelected, cellHasFocus);\n label.setIcon(imageMap.get(((Pair) value).getKey()));\n label.setHorizontalTextPosition(JLabel.RIGHT);\n return label;\n }", "@Override\n public Component getListCellRendererComponent(JList<? extends Produto> list,\n Produto produto, int index, boolean isSelected, boolean cellHasFocus) {\n BufferedImage imagemBuffer = null;\n imagemBuffer = null;\n\n try {\n // Pegando a imagem na lista de produtos\n imagemBuffer = ImageIO.read(new ByteArrayInputStream(produto.getImagem()));\n } catch (IOException ex) {\n new TelaAlerta(\"Ocorreu um erro ao carregar as imagens! Por favor, tentar novamente.\", 2).setVisible(true);\n }\n Image diminuirImagem = imagemBuffer.getScaledInstance(70, 70, 0); // Redimencionando a imagem para o tamanho do jLabel\n \n lbImage.setIcon(new ImageIcon(diminuirImagem));\n lbDescricao.setText(produto.getTitulo());\n lbPreco.setText(\"R$ \" + String.valueOf(produto.getPreco()));\n lbPreco.setForeground(new Color(0, 0, 238));\n\n // set Opaque to change background color of JLabel\n lbDescricao.setOpaque(true);\n lbPreco.setOpaque(true);\n lbImage.setOpaque(true);\n lbPreco.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n lbPreco.setBorder(new EmptyBorder(0, 0, 0, 0));\n\n // when select item\n if (isSelected) {\n lbDescricao.setBackground(list.getSelectionBackground());\n lbPreco.setBackground(list.getSelectionBackground());\n lbImage.setBackground(list.getSelectionBackground());\n setBackground(list.getSelectionBackground());\n panelIcon.setBackground(list.getSelectionBackground());\n } else { // when don't select\n lbDescricao.setBackground(list.getBackground());\n lbPreco.setBackground(list.getBackground());\n lbImage.setBackground(list.getBackground());\n setBackground(list.getBackground());\n panelIcon.setBackground(list.getBackground());\n }\n return this;\n }", "@Override\n public Component getListCellRendererComponent(JList<? extends Kunde> list, Kunde value, int index, boolean isSelected, boolean cellHasFocus) {\n setText(String.format(\"%s %s\", value.getVorname(), value.getNachname()));\n setBorder(new EmptyBorder(8, 8, 8, 8));\n\n Color background;\n Color foreground;\n\n // check if this cell represents the current DnD drop location\n JList.DropLocation dropLocation = list.getDropLocation();\n if (dropLocation != null && !dropLocation.isInsert() && dropLocation.getIndex() == index) {\n background = new Color(0, 30, 40);\n foreground = Color.WHITE;\n } else if (isSelected) {\n // if this cell is selected\n background = new Color(0, 129, 0);\n foreground = Color.WHITE;\n } else {\n // else cell is unselected, and not the DnD drop location\n background = Color.WHITE;\n foreground = new Color(0, 30, 40);;\n }\n\n setBackground(background);\n setForeground(foreground);\n\n return this;\n }", "public Component getListCellRendererComponent(\r\n\t\t JList list,\r\n Object value, // value to display\r\n int index, // cell index\r\n boolean iss, // is selected\r\n boolean chf) // cell has focus?\r\n {\r\n\t \r\n\t // Set the text and \r\n //background color for rendering\r\n setText(((ListItem)value).getValue());\r\n setBackground(((ListItem)value).getColor());\r\n setIcon(((ListItem)value).getIcon());\r\n // Set a border if the \r\n //list item is selected\r\n if (iss) {\r\n setBorder(BorderFactory.createLineBorder(\r\n Color.blue, 2));\r\n } else {\r\n setBorder(BorderFactory.createLineBorder(\r\n list.getBackground(), 2));\r\n }\r\n\r\n return this;\r\n }", "Component getTableCellRendererComponent(JTable table, Object value,\n\t\t\t\t\t boolean isSelected, boolean hasFocus, \n\t\t\t\t\t int row, int column);", "public Component getListCellRendererComponent(final JList list,\n final Object value, final int index, final boolean isSelected,\n final boolean cellHasFocus) {\n if (isSelected) {\n setBackground(list.getSelectionBackground());\n setForeground(list.getSelectionForeground());\n } else {\n setBackground(list.getBackground());\n setForeground(list.getForeground());\n }\n\n ImageIcon icon = (ImageIcon) value;\n setText(icon.getDescription());\n setIcon(icon);\n\n return this;\n }", "public WidgetRenderer() {\r\n super(\"\");\r\n setUIID(\"ListRenderer\");\r\n }", "public interface TableCellRenderer {\n\n /**\n * Returns the component used for drawing the cell. This method is\n * used to configure the renderer appropriately before drawing.\n *\n * @param\ttable\t\tthe <code>JTable</code> that is asking the \n *\t\t\t\trenderer to draw; can be <code>null</code>\n * @param\tvalue\t\tthe value of the cell to be rendered. It is\n *\t\t\t\tup to the specific renderer to interpret\n *\t\t\t\tand draw the value. For example, if\n *\t\t\t\t<code>value</code>\n *\t\t\t\tis the string \"true\", it could be rendered as a\n *\t\t\t\tstring or it could be rendered as a check\n *\t\t\t\tbox that is checked. <code>null</code> is a\n *\t\t\t\tvalid value\n * @param\tisSelected\ttrue if the cell is to be rendered with the\n *\t\t\t\tselection highlighted; otherwise false\n * @param\thasFocus\tif true, render cell appropriately. For\n *\t\t\t\texample, put a special border on the cell, if\n *\t\t\t\tthe cell can be edited, render in the color used\n *\t\t\t\tto indicate editing\n * @param\trow\t the row index of the cell being drawn. When\n *\t\t\t\tdrawing the header, the value of\n *\t\t\t\t<code>row</code> is -1\n * @param\tcolumn\t the column index of the cell being drawn\n */\n Component getTableCellRendererComponent(JTable table, Object value,\n\t\t\t\t\t boolean isSelected, boolean hasFocus, \n\t\t\t\t\t int row, int column);\n}", "public static DefaultListModel<String> getDrawListModel() {\n return drawListModel;\n }", "public final ObjectProperty<Callback<ListView<T>, ListCell<T>>> cellFactoryProperty() {\n\n return this.getWrappedControl().cellFactoryProperty();\n }", "public Component getListCellRendererComponent(\n\t\t JList<? extends Description> list,\n\t\t Description value, // value to display\n\t\t int index, // cell index\n\t\t boolean isSelected, // is the cell selected\n\t\t boolean cellHasFocus) {\n\t\t\n\t\tif (isSelected) {\n\t\t\tthis.setIcon(this.selectedIconMap.get(value));\n\t\t\tsetBackground(list.getSelectionBackground());\n\t\t\tsetForeground(list.getSelectionForeground());\n\t\t} else {\n\t\t\tthis.setIcon(this.unselectedIconMap.get(value));\n\t\t\tsetBackground(list.getBackground());\n\t\t\tsetForeground(list.getForeground());\n\t\t}\n\t\tsetEnabled(list.isEnabled());\n\t\tsetOpaque(false);\n\t\treturn this;\n\t}", "public DefaultListItemRenderer() {\n\n\t}", "@Override\n public ListCell<User> call(ListView<User> param) {\n return new ListCellFactory();\n }", "@Override\n public TreeCellRenderer getCellRenderer() {\n final TreeCellRenderer ren = super.getCellRenderer();\n if (ren == null) {\n return null;\n }\n if (wrapper == null) {\n wrapper = new RendererEditorWrapper();\n }\n wrapper.ren = ren;\n return wrapper;\n }", "public void setData(ListModelTable model, List< ? extends String> columnNames)\n\t{\n\t\tWListItemRenderer rowRenderer = null;\n\t\tif (columnNames != null && columnNames.size() > 0)\n\t\t{\n\t \t//\t instantiate our custom row renderer\n\t\t rowRenderer = new WListItemRenderer(columnNames);\n\n\t \t// add listener for listening to component changes\n\t \trowRenderer.addTableValueChangeListener(this);\n\t\t}\n\t // assign the model and renderer\n\t this.setModel(model);\n\t if (rowRenderer != null)\n\t {\n\t \tgetModel().setNoColumns(columnNames.size());\n\t \tthis.setItemRenderer(rowRenderer);\n\n\t \t//recreate listhead if needed\n\t\t ListHead head = super.getListHead();\n\t\t if (head != null)\n\t\t {\n\t\t \thead.getChildren().clear();\n\t\t \trowRenderer.renderListHead(head);\n\t \t}\n\t }\n\n\t // re-render\n\t this.repaint();\n\n\t return;\n\t}", "public DefaultListModel getListModel() {\n\t\treturn this.listModel;\r\n\t}", "public interface SwingCellRenderer extends CellRenderer<SwingView> {\r\n /**\r\n * Called whenever a cell is clicked\r\n * @param source The board to edit\r\n * @param cellX The X-Coordinate of the cell\r\n * @param cellY Y-Coordinate of the cell\r\n * @return\r\n */\r\n public int cellClicked(Board source, int cellX, int cellY);\r\n\r\n }", "public JLabel getRendering(String column, Object value);", "public ListModel createBoundListModel(String formProperty) {\n ValueModel valueModel = formModel.getValueModel(formProperty);\n if (valueModel == null) {\n AspectAdapter adapter = new AspectAdapter(formModel\n .getAspectAccessStrategy(), formProperty);\n valueModel = new BufferedListValueModel(adapter);\n formModel.add(formProperty, valueModel);\n }\n return (ListModel)valueModel.get();\n }", "public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n\t\tsuper.getListCellRendererComponent(list,value,index,isSelected,cellHasFocus);\n \n File file = (File)value;\n setText(fsv.getSystemDisplayName(file));\n setIcon(fsv.getSystemIcon(file));\n \n return this;\n\t}", "public abstract TableCellRenderer getInstance(Map parameterMap);", "private TableCellRenderer getNumericCellRenderer() {\n return new DefaultTableCellRenderer() {\n /** serialization identifier */\n private static final long serialVersionUID = 1L;\n \n public java.awt.Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {\n JLabel label = (JLabel)super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);\n label.setHorizontalAlignment(RIGHT);\n\t\t\t\tlabel.setForeground(java.awt.Color.blue);\n return label;\n }\n };\n }", "public Component getTreeCellRendererComponent(\n JTree tree, //stablo koje se prikazuje\n Object value, //stavka koja se iscrtava \n boolean sel, //da li je stavka selektovana\n boolean expanded,\n boolean leaf, //da li je list\n int row,\n boolean hasFocus) {\n super.getTreeCellRendererComponent(tree, value, sel,expanded, leaf, row,hasFocus);\n \n \n if (value instanceof Entity ) {\n URL imageURL = getClass().getResource(\"gui_icons/table1.png\");\n Icon icon = null;\n if (imageURL != null) \n icon = new ImageIcon(imageURL);\n setIcon(icon);\n \n } else if (value instanceof InformationResource ) {\n \t URL imageURL=getClass().getResource(\"gui_icons/file.jpg\");\n Icon icon = null;\n if (imageURL != null) \n icon = new ImageIcon(imageURL);\n setIcon(icon);\n \n } else if (value instanceof Attribute ) {\n \t URL imageURL=getClass().getResource(\"gui_icons/attribute.png\");\n Icon icon = null;\n if (imageURL != null) \n icon = new ImageIcon(imageURL);\n setIcon(icon);\n \n } else if (value instanceof AttributeConstraint) {\n \tAttributeConstraint ac = (AttributeConstraint) value;\n \t URL imageURL=null;\n \t if (ac.getConstraintType() == ConstraintType.PRIMARY_KEY) imageURL=getClass().getResource(\"gui_icons/primary.png\");\n \t else if(ac.getConstraintType() == ConstraintType.FOREIGN_KEY) imageURL=getClass().getResource(\"gui_icons/imported.jpg\");\n \t else if(ac.getConstraintType() == ConstraintType.NOT_NULL) imageURL=getClass().getResource(\"gui_icons/notnull.png\");\n Icon icon = null;\n if (imageURL != null) \n icon = new ImageIcon(imageURL);\n setIcon(icon);\n \n } \n return this;\n}", "private IModel<String> createLabelModel(Item<ICellPopulator<SelectableBean<O>>> cellItem, IModel<SelectableBean<O>> rowModel) {\n return new IModel<>() {\n private static final long serialVersionUID = 1L;\n\n @Override\n public String getObject() {\n SelectableBean<O> selectableBean = rowModel.getObject();\n O value = selectableBean.getValue();\n if (value == null) {\n return getResultAsString(cellItem, selectableBean);\n }\n\n if (expression != null) {\n return evaluateExpression(cellItem, itemPath, value);\n }\n\n if (itemPath == null || itemPath.equals(\"name\")) {\n return getName(value, selectableBean);\n }\n\n com.evolveum.midpoint.prism.Item item = value.asPrismObject().findItem(itemPath);\n return item != null ? cellItem.getDefaultModelObjectAsString(item.getRealValue()) : \"\";\n\n }\n };\n }", "@Override\r\n public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) {\n JLabel l = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);\r\n\r\n //Get the status for the current row.\r\n DayPanelTableModel tableModel = (DayPanelTableModel) table.getModel();\r\n Color getColor = tableModel.rowColor(row);\r\n if (getColor != null) {\r\n l.setBackground(getColor);\r\n if (getColor.equals(Color.CYAN)) {\r\n l.setForeground(Color.BLACK);\r\n } else if (getColor.equals(Color.ORANGE)) {\r\n l.setForeground(Color.BLACK);\r\n } else if (getColor.equals(Color.GREEN)) {\r\n l.setForeground(Color.BLACK);\r\n } else {\r\n l.setForeground(Color.WHITE);\r\n }\r\n } else {\r\n l.setBackground(Color.WHITE);\r\n l.setForeground(Color.BLACK);\r\n }\r\n\r\n //Return the JLabel which renders the cell.\r\n return l;\r\n\r\n }", "public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,\n\t\t\tboolean hasFocus, int row, int column) {\n\t\tJTextField editor = new JTextField();\n\t\teditor.setFont(new Font(\"Segoe UI Semibold\", Font.BOLD, 12));\n\t\tif (value != null){\n\t\t\teditor.setText(value.toString());\n\t\t}\n\t\t\n\t\tif (value == null){\n\t\t\teditor.setBackground(Color.WHITE);\n\t\t} else {\n\t\t\tif (correctList.contains(row)){\n\t\t\t\teditor.setBackground(Color.green);\n\t\t\t\teditor.setForeground(Color.black);\n\t\t\t} else {\n\t\t\t\teditor.setBackground(Color.red);\n\t\t\t\teditor.setForeground(Color.white);\n\t\t\t}\n\t\t\t//editor.setBackground(correctList.contains(row) ? Color.green : lightRed);\n\t\t}\n\t\treturn editor;\n\t}", "public ComponentRenderer<? extends Component, T> getItemRenderer() {\n return itemRenderer;\n }", "@Override\r\n\tpublic Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {\n\t\ttry {\r\n\t\t\tsetBackground((Color)value);\r\n\t\t}\r\n\t\tcatch(ClassCastException e) {\r\n\t\t}\r\n\t\t\r\n\t\t// draw selection state of necessary\r\n\t\tif(isSelected) {\r\n\t\t\tif(selectedBorder == null)\r\n\t\t\t\tselectedBorder = BorderFactory.createMatteBorder(2, 5, 2, 5, table.getSelectionBackground());\r\n\t\t\tsetBorder(selectedBorder);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif(unselectedBorder == null)\r\n\t\t\t\tunselectedBorder = BorderFactory.createMatteBorder(2, 5, 2, 5, table.getBackground());\r\n\t\t\tsetBorder(unselectedBorder);\r\n\t\t}\r\n\t\t\r\n\t\t// display the rgb value in the center of the cell if necessary\r\n\t\tif(displayRGB) {\r\n\t\t\tsetHorizontalAlignment(JLabel.CENTER);\r\n\t\t\tsetHorizontalTextPosition(JLabel.CENTER);\r\n\t\t\tsetForeground(new Color(255 - getBackground().getRed(), 255 - getBackground().getGreen(), 255 - getBackground().getBlue()));\r\n\t\t\tsetFont(table.getFont());\r\n\t\t\tsetText(getBackground().getRed() + \", \" + getBackground().getGreen() + \", \" + getBackground().getBlue());\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}", "public void drawListRow(ListField list, Graphics g, int index, int y, int w) {\nPerson personToDraw = (Person) this.get(list, index);\nint drawColor = Color.BLACK;\nif ( list == _lfBoys ) {\n// We have a boy!\ndrawColor = Color.BLUE;\n} else {\ndrawColor = Color.RED;\n}\ng.setColor(drawColor);\ng.drawText(personToDraw._firstName + \" \" + personToDraw._lastName, 0, y, 0, w);\n}", "@Override\n\tprotected String getView() {\n\t\treturn ORSView.COLLEGE_LIST_VIEW;\n\t}", "public interface ListModel {\n\n /** \n * Returns the length of the list.\n * @return the length of the list\n */\n int getSize();\n\n /**\n * Returns the value at the specified index. \n * @param index the requested index\n * @return the value at <code>index</code>\n */\n Object getElementAt(int index);\n\n /**\n * Adds a listener to the list that's notified each time a change\n * to the data model occurs.\n * @param listener the <code>ListDataListener</code> to be added\n */ \n void addListDataListener(ListDataListener listener);\n\n /**\n * Removes a listener from the list that's notified each time a \n * change to the data model occurs.\n * @param listener the <code>ListDataListener</code> to be removed\n */ \n void removeListDataListener(ListDataListener listener);\n}", "@Override\n public TableCellRenderer getCellRenderer(int row, int column) {\n DefaultTableCellRenderer renderer;\n switch (columnTypes[column]) {\n case TEXT_COL:\n renderer = new DefaultTableCellRenderer();\n renderer.setHorizontalAlignment(LEFT);\n break;\n\n case CURR0_COL:\n case CURR2_COL:\n Vector<CurrencyType> rowCurrencies = getDataModel().getRowCurrencies();\n CurrencyType curr;\n if (0 <= row && row < rowCurrencies.size()) {\n curr = rowCurrencies.get(row); // Security\n } else {\n curr = book.getCurrencies().getBaseType(); // Footer reports base currency\n }\n renderer = new CurrencyRenderer(mdGUI, curr, columnTypes[column].equals(CURR0_COL));\n renderer.setHorizontalAlignment(RIGHT);\n break;\n\n case PERCENT_COL:\n renderer = new PercentRenderer(mdGUI);\n renderer.setHorizontalAlignment(RIGHT);\n break;\n\n default:\n renderer = new DefaultTableCellRenderer();\n }\n return renderer;\n }", "public List<LabelModel> getCustomLabels();", "@Override\n public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {\n DefaultTableCellRenderer baseRenderer = (DefaultTableCellRenderer) table.getDefaultRenderer(String.class);\n JLabel baseComp = (JLabel) baseRenderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);\n String skillCode = baseComp.getText();\n\n // apply settings to render panel from parent\n renderPanel.setOpaque(baseComp.isOpaque());\n renderPanel.setForeground(CardRendererUtils.copyColor(baseComp.getForeground()));\n renderPanel.setBackground(CardRendererUtils.copyColor(baseComp.getBackground()));\n renderPanel.setBorder(baseComp.getBorder());\n\n // create each skill symbol as child label\n renderPanel.removeAll();\n renderPanel.setLayout(new BoxLayout(renderPanel, BoxLayout.X_AXIS));\n for (char skillSymbol : skillCode.toCharArray()) {\n JLabel symbolLabel = new JLabel();\n symbolLabel.setBorder(new EmptyBorder(0, 3, 0, 0));\n symbolLabel.setIcon(skillIcon);\n renderPanel.add(symbolLabel);\n }\n\n return renderPanel;\n }", "@Override\n\tpublic CellStyle getCellStyle(int index, T entity, Object value, AttributeModel attributeModel) {\n\t\tif (value instanceof Integer || value instanceof Long) {\n\t\t\treturn thousandsGrouping ? numberStyle : numberSimpleStyle;\n\t\t} else if (value instanceof Date || value instanceof LocalDate || value instanceof LocalDateTime) {\n\t\t\tif (attributeModel == null || !attributeModel.isWeek()) {\n\t\t\t\treturn getDateStyle(attributeModel);\n\t\t\t}\n\t\t} else if (value instanceof BigDecimal || NumberUtils.isDouble(value)) {\n\t\t\treturn getDecimalStyle(attributeModel);\n\t\t}\n\t\treturn normal;\n\t}", "@Override\n\tpublic IItemView createCell(Context context, ViewGroup root) {\n\t\treturn this.newCellFromXml(context, R.layout.dynamic_list_item, root);\n\t}", "public ACLPropertyListCellRenderer() {\n setOpaque(true);\n setFont(new java.awt.Font(\"Dialog\", 0, 11));\n }", "public interface UseAsRenderer\r\n {\r\n \tpublic TableCellEditor useAsRenderer();\r\n }", "public Editor createEditor(String instanceId, Object model) {\n\t\tCompanyListEditor e = editorProvider.get();\r\n\t\te.setInstanceId(instanceId);\r\n\t\te.setTitle(\"企业注册\");\r\n\t\te.setModel(model);\r\n\t\treturn e;\r\n\t}", "@Override\n\tpublic void createHtml(ModelItemList list) {\n\t\t\n\t}", "public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,\n\t\t\t\t\t\t\t\t\t\t\t\t int row, int column) {\n\t\t//the first element of table is empty\n\t\tif (row == 0 && column == 0) {\n\t\t\treturn new JLabel();\n\t\t}\n\t\t//all elements in first row, excluding first column, must be a letters from array of letters\n\t\tif (row == 0 && column > 0) {\n\t\t\treturn new JLabel(columns[column - 1]);\n\t\t}\n\t\t//all elements in first column, excluding first row, must be a numbers equals to row number\n\t\tif (column == 0 && row > 0) {\n\t\t\treturn new JLabel(Integer.toString(row));\n\t\t}\n\t\t//other cells of table must contain Cell objects, we set them before\n\t\t//and we handle them in that method:\n\t\treturn buildCellButton((char) value);\n\t}", "public Component getTableCellRendererComponent(JTable table,\r\n Object value, boolean isSelected, boolean hasFocus, int row,\r\n int column) {\r\n return (Component) value;\r\n }", "@Override\n\tpublic CellStyle getCellStyle(int index, T entity, Object value, AttributeModel attributeModel) {\n\t\tif (value instanceof Integer || value instanceof Long) {\n\t\t\treturn thousandsGrouping ? numberStyle : numberSimpleStyle;\n\t\t} else if (value instanceof Date) {\n\t\t\tif (attributeModel == null || !attributeModel.isWeek()) {\n\t\t\t\tif (attributeModel == null || AttributeDateType.DATE.equals(attributeModel.getDateType())) {\n\t\t\t\t\t// date style is the default\n\t\t\t\t\treturn dateStyle;\n\t\t\t\t} else if (AttributeDateType.TIMESTAMP.equals(attributeModel.getDateType())) {\n\t\t\t\t\treturn dateTimeStyle;\n\t\t\t\t} else if (AttributeDateType.TIME.equals(attributeModel.getDateType())) {\n\t\t\t\t\treturn timeStyle;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (value instanceof BigDecimal) {\n\t\t\tif (attributeModel != null && attributeModel.isPercentage()) {\n\t\t\t\treturn bigDecimalPercentageStyle;\n\t\t\t} else if (attributeModel != null && attributeModel.isCurrency()) {\n\t\t\t\treturn currencyStyle;\n\t\t\t}\n\t\t\treturn bigDecimalStyle;\n\t\t}\n\t\treturn normal;\n\t}", "public Component getTableCellRendererComponent(\r\n JTable table,\r\n Object value,\r\n boolean isSelected,\r\n boolean hasFocus,\r\n int row,\r\n int col)\r\n {\r\n\r\n setBorder(noFocusBorder); // No FOCUS Borders on any cell\r\n // Get the renderer\r\n Component comp = null;\r\n // If the renderer is not null, we have a recognized component\r\n comp = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);\r\n\r\n // If the Row is Even, set to Color 0\r\n comp.setBackground(colorScheme.getBackgroundColor(row));\r\n // Set the foreground color\r\n comp.setForeground(colorScheme.getForegroundColor(row));\r\n\r\n if (value instanceof ColoredData)\r\n {\r\n ColoredData colorData = (ColoredData) value;\r\n if (colorData.getBGColor() != null)\r\n {\r\n comp.setBackground(colorData.getBGColor());\r\n }\r\n if (colorData.getFGColor() != null)\r\n {\r\n comp.setForeground(colorData.getFGColor());\r\n }\r\n\r\n }\r\n if (isSelected)\r\n { // if the component is selected change to a THEME selected color\r\n comp.setBackground(table.getSelectionBackground());\r\n comp.setForeground(table.getSelectionForeground());\r\n }\r\n\r\n setAlignmentX(JComponent.CENTER_ALIGNMENT);\r\n // setFont(table.getFont()); // Set the Font to the desired Font\r\n comp.repaint();\r\n // Else return unknown component, color is set above\r\n return (comp);\r\n\r\n }", "public JList<String> makeList(int rowCount, int x, int y, int width, int height) {\r\n DefaultListModel<String> dlm = new DefaultListModel<>();\r\n list = new JList<>(dlm);\r\n list.setVisibleRowCount(rowCount);\r\n list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n list.setVisibleRowCount(-1);\r\n JScrollPane listScroll = new JScrollPane(list);\r\n listScroll.setPreferredSize(new Dimension(500, 600));\r\n list.setBounds(x, y, width, height);\r\n list.setCellRenderer(new CheckBoxListCellRenderer());\r\n\r\n list.setVisible(true);\r\n return list;\r\n }", "@Override\n\tpublic Component getTableCellRendererComponent(JTable table, Object value, boolean selected, boolean focused, int row, int column) {\n\t\tColor colorFondo = null;\n\t\tColor colorFondoDefault = new Color(192,192,192);\n\t\tColor colorFondoSelected = new Color(140, 140, 140);\n\t\tif (selected) {\n\t\t\tthis.setBackground(colorFondoDefault);\n\t\t}\n\t\telse {\n\t\t\tthis.setBackground(Color.white);\n\t\t}\n\t\tif(tipo.equals(\"texto\")) {\n\t\t\tif (focused)\n\t\t\t\tcolorFondo = colorFondoSelected;\n\t\t\telse\n\t\t\t\tcolorFondo = colorFondoDefault;\n\t\t\t\n\t\t\tthis.setHorizontalAlignment(JLabel.LEFT);\n\t\t\tthis.setText((String) value);\n\t\t\tthis.setBackground((selected)? colorFondo:Color.WHITE);\n\t\t\tthis.setFont(normal);\n\t\t\treturn this;\n\t\t}\n\t\tif(tipo.equals(\"numero\")) {\n\t\t\tif(focused) \n\t\t\t\tcolorFondo = colorFondoSelected;\n\t\t\telse\n\t\t\t\tcolorFondo=colorFondoDefault;\n\t\t\tthis.setHorizontalAlignment(JLabel.CENTER);\n\t\t\tthis.setText(value.toString());\n\t\t\tthis.setForeground((selected)? new Color(255,255,255) : new Color(32,117,32));\n\t\t\tthis.setBackground((selected)? colorFondo : Color.WHITE);\n\t\t\tthis.setFont(bold);\n\t\t\treturn this;\n\t\t}\n\t\tif(tipo.equals(\"boton\")) {\n\t\t\tif(String.valueOf(value).equals(\"MODIFICAR\")) {\n\t\t\t\tlabel.setText(\"Modificar\");\n\t\t\t} else if(String.valueOf(value).equals(\"ELIMINAR\")) {\n\t\t\t\tlabel.setText(\"Eliminar\");\n\t\t\t}\n\t\t\tlabel.setFont(subrayada);\n\t\t\tlabel.setForeground(Color.BLUE);\n\t\t\tlabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t\tlabel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n\t\t\treturn label;\n\t\t}\n\t\t\n\t\treturn this;\n\t}", "public Component getTableCellRendererComponent(JTable table,\n Object value,\n boolean isSelected,\n boolean hasFocus,\n int row, int column)\n {\n if (value instanceof Component)\n {\n return (Component) value;\n }\n return defaultRenderer.getTableCellRendererComponent(\n table, value, isSelected, hasFocus, row, column);\n }", "public TableCellRenderer getDelegateRenderer() {\n return treeTableCellRenderer.getDelegate();\n }", "@Override\r\n\tpublic void render(Listitem item, Object data) throws Exception {\n final Tirspasca detilMatakuliah = (Tirspasca) data;\r\n\t\tListcell lc = new Listcell(detilMatakuliah.getMtbmtkl().getCkdmtk());\r\n\t\tlc.setParent(item);\r\n lc = new Listcell(detilMatakuliah.getMtbmtkl().getCnamamk());\r\n\t\tlc.setParent(item);\r\n lc = new Listcell(detilMatakuliah.getCkelompok());\r\n\t\tlc.setParent(item);\r\n //lc = new Listcell(\"\");\r\n\t\t//lc.setParent(item);\r\n String sks = \"\";\r\n if(detilMatakuliah.getNsks() != null) {\r\n sks = detilMatakuliah.getNsks().toString();\r\n } /*else {\r\n if(detilMatakuliah.getMtbmtkl().getNsks() != null) {\r\n sks = detilMatakuliah.getMtbmtkl().getNsks().toString();\r\n }\r\n } */\r\n lc = new Listcell(sks);\r\n\t\tlc.setParent(item);\r\n\r\n item.setAttribute(\"data\", data);\r\n\t\tComponentsCtrl.applyForward(item, \"onDoubleClick=onDetilMatakuliahItem\");\r\n\t}", "public void testSelectItemCustomRenderer() {\n \n box.setRenderer(new ListCellRenderer() {\n\n @Override\n public Component getListCellRendererComponent(JList list, final Object value, int index, boolean isSelected,\n boolean cellHasFocus) {\n \n JPanel p = new JPanel()\n {\n public String getText() {\n return value!=null ? value.toString() : \"[Null]\";\n }\n };\n p.setBackground(index % 2 == 0 ? Color.RED : Color.BLUE);\n return p;\n }\n });\n \n showFrame(box);\n for (int i=0;i < MAX_ENTRIES;i += MAX_ENTRIES / 10) {\n selectedItem = null;\n String item = \"item \" + i;\n tester.actionSelectItem(box, item);\n assertEquals(\"Wrong item selected\", item, selectedItem);\n }\n }", "protected abstract ReadCell<DataType> createItemCell(LayoutInflater inflater, View convertView, ViewGroup parent);", "private JList<ProductoAlmacen> crearListaProductos() {\n\n JList<ProductoAlmacen> lista = new JList<>(new Vector<>(almacen.getProductos()));\n\n lista.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);\n\n lista.setCellRenderer(new DefaultListCellRenderer() {\n @Override\n public Component getListCellRendererComponent(JList<? extends Object> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n Component resultado = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\n ProductoAlmacen productoAlmacen = (ProductoAlmacen) value;\n\n String texto = String.format(\"%s (%d uds.)\", productoAlmacen.getProducto().getNombre(), productoAlmacen.getStock());\n this.setText(texto);\n\n return resultado;\n }\n });\n\n return lista;\n }", "private ListCell<String> inventoryListViewCellFactory(ListView<String> param){\n\t return new ListCell<String>() {\n\t\t\t@Override\n\t\t\tpublic void updateItem(String name, boolean empty) {\n\t\t\t\tsuper.updateItem(name, empty);\n\t\t\t\tif (empty) {\n\t\t\t\t\tsetText(null);\n\t\t\t\t\tsetGraphic(null);\n\t\t\t\t} else {\n\t\t\t\t\tImageView imageView = resources.createImageViewByClassName(name);\n\t\t\t\t\timageView.setPreserveRatio(true);\n\t\t\t\t\timageView.setFitWidth(25);\n\t\t\t\t\tint count = engine.getInventoryCounts(name);\n\t\t\t\t\tsetGraphic(imageView);\n\t\t\t\t\tsetText(Integer.toString(count));\n\t\t\t\t\tif(count == 0){\n\t\t\t\t\t imageView.setImage(null);\n\t\t\t\t\t setText(null);\n }\n\t\t\t\t}\n\t\t\t}\n\t\t};\n }", "public static DefaultListModel<String> getCanvasListModel() {\n return canvasListModel;\n }", "@Override\r\n public void buildAppliedQDMCellTable(QDSAppliedListModel appliedListModel, boolean isEditable) {\r\n isEditable = false;\r\n cellTablePanel.clear();\r\n cellTablePanel.setStyleName(\"cellTablePanel\");\r\n if ((appliedListModel.getAppliedQDMs() != null)\r\n && (appliedListModel.getAppliedQDMs().size() > 0)) {\r\n table = new CellTable<QualityDataSetDTO>();\r\n setEditable(isEditable);\r\n table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);\r\n listDataProvider = new ListDataProvider<QualityDataSetDTO>();\r\n qdmSelectedList = new ArrayList<QualityDataSetDTO>();\r\n table.setPageSize(TABLE_ROW_COUNT);\r\n table.redraw();\r\n listDataProvider.refresh();\r\n listDataProvider.getList().addAll(appliedListModel.getAppliedQDMs());\r\n ListHandler<QualityDataSetDTO> sortHandler = new ListHandler<QualityDataSetDTO>(\r\n listDataProvider.getList());\r\n table.addColumnSortHandler(sortHandler);\r\n table = addColumnToTable(table, sortHandler, isEditable);\r\n listDataProvider.addDataDisplay(table);\r\n CustomPager.Resources pagerResources = GWT\r\n .create(CustomPager.Resources.class);\r\n spager = new MatSimplePager(CustomPager.TextLocation.CENTER,\r\n pagerResources, false, 0, true, \"AppliedQDM\");\r\n spager.setDisplay(table);\r\n spager.setPageStart(0);\r\n Label invisibleLabel;\r\n if (isEditable) {\r\n invisibleLabel = (Label) LabelBuilder\r\n .buildInvisibleLabel(\r\n \"appliedQDMTableSummary\",\r\n \"In the Following Applied QDM Elements table Name in First Column\"\r\n + \"OID in Second Column, DataType in Third Column, Expansion Identifier in Fourth Column,\"\r\n + \"Version in Fifth Column and Modify in Sixth Column where the user can Edit and Delete \"\r\n + \"the existing QDM. The Applied QDM elements are listed alphabetically in a table.\");\r\n } else {\r\n invisibleLabel = (Label) LabelBuilder\r\n .buildInvisibleLabel(\r\n \"appliedQDMTableSummary\",\r\n \"In the Following Applied QDM Elements table Name in First Column\"\r\n + \"OID in Second Column, DataType in Third Column, Expansion Identifier in Fourth Column,\"\r\n + \"Version in Fifth Column and Select in Sixth Column. The Applied QDM elements are listed alphabetically in a table.\");\r\n }\r\n table.getElement().setAttribute(\"id\", \"AppliedQDMTable\");\r\n table.getElement().setAttribute(\"aria-describedby\",\r\n \"appliedQDMTableSummary\");\r\n cellTablePanel.add(invisibleLabel);\r\n cellTablePanel.add(table);\r\n cellTablePanel.add(new SpacerWidget());\r\n cellTablePanel.add(spager);\r\n\r\n } else {\r\n Label searchHeader = new Label(\"Applied QDM Elements\");\r\n searchHeader.getElement().setId(\"searchHeader_Label\");\r\n searchHeader.setStyleName(\"recentSearchHeader\");\r\n searchHeader.getElement().setAttribute(\"tabIndex\", \"-1\");\r\n HTML desc = new HTML(\"<p> No Applied QDM Elements.</p>\");\r\n cellTablePanel.add(searchHeader);\r\n cellTablePanel.add(new SpacerWidget());\r\n cellTablePanel.add(desc);\r\n }\r\n }", "private JPanel getJPanelColorModel() {\r\n\t\tjPanelColorModel = new JPanel();\r\n\t\t//jPanelColorModel.setLayout(new BoxLayout(jPanelColorModel, BoxLayout.X_AXIS));\r\n\t\tjPanelColorModel.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));\r\n\t\tjPanelColorModel.setBorder(new TitledBorder(null, \"Color model\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\t\t\r\n\r\n\t\tjPanelColorModel.add(getJRadioButtonGrey());\r\n\t\tjPanelColorModel.add(getJRadioButtonColor());\r\n\t\tthis.setButtonGroupColorModel(); // Grouping of JRadioButtons\r\n\t\treturn jPanelColorModel;\r\n\t}", "@Override\n public abstract String getRendererType();", "@Override\n\tpublic void render(Row row, Object data, int arg2) throws Exception {\n\t\trow.setValue(data);\n\t\trow.addEventListener(Events.ON_CLICK, new RowEventListener(this.br));\n\t\trow.addEventListener(Events.ON_DOUBLE_CLICK, new RowEventListener(\n\t\t\t\tthis.br));\n\n\t\t// en las columnas esta la info de configuración\n\t\tList<ColumnaBrowser> columnas = this.br.getColumnasBrowser();\n\n\t\tObject[] datosCel = (Object[]) data;\n\n\t\t// radiobutton\n\t\tRadio ra = new Radio();\n\t\tra.setRadiogroup(this.rg);\n\t\tra.setChecked(false);\n\t\tra.setParent(row);\n\n\t\tObject va = datosCel[0]; // el ID\n\t\tLabel lbId = new Label(va + \"\");\n\t\tlbId.setParent(row);\n\n\t\tfor (int i = 1; i < datosCel.length; i++) {\n\t\t\tva = datosCel[i];\n\t\t\tColumnaBrowser col = columnas.get(i - 1);\n\n\t\t\tCell cel = new Cell();\n\t\t\tcel.setStyle(col.getEstilo());\n\t\t\tcel.setParent(row);\n\n\t\t\tHtmlBasedComponent comp = null;\n\n\t\t\ttry {\n\n\t\t\t\t// invoca a la operación\n\t\t\t\tMethod m = this.br.getClass().getMethod(col.getComponente(),\n\t\t\t\t\t\tObject.class, Object[].class);\n\n\t\t\t\tcomp = (HtmlBasedComponent) m.invoke(this.br, va, datosCel);\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Error metodo componente [\"\n\t\t\t\t\t\t+ col.getComponente() + \"]:\"\n\t\t\t\t\t\t+ e.getCause().getMessage());\n\t\t\t\tcomp = this.br.getLabel(va, datosCel);\n\t\t\t}\n\t\t\tString auxSt = comp.getStyle();\n\t\t\tcomp.setStyle(auxSt + \";\" + col.getEstilo());\n\t\t\tcomp.setWidth(col.getWidthComponente());\n\t\t\tcel.setWidth(col.getWidthComponente());\n\t\t\tcomp.setParent(cel);\n\n\t\t}\n\n\t}", "@Override\r\n\tpublic java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree, Object color, boolean isSelected, boolean expanded, boolean leaf, int row, boolean hasFocus) {\n\t\treturn getComponent(color, isSelected, tree.getBackground(), tree.getBackground(), tree.getRowHeight(), tree.getFont());\r\n\t}", "ModelRenderer getHead();", "public PriceCellRenderer() \n\t{\n\t\tsuper();\n\t}", "private DefaultTableModel createModel( JList<String> list) {\n\t\t\n\t\tSystem.out.println(\"PlaylistPanel -> SearchMenuPanel\");\n\t\tString[] transferSong = SearchMenuPanel.search(list.getSelectedValue().toString(), panel.aSocket, panel.serverPort); \n\t\tSystem.out.println(\"SearchMenuPanel -> PlaylistPanel\");\n\t\t\n\t\tDefaultTableModel model = new DefaultTableModel(null, new String[]{\"Song Title\", \"Artist\", \"Album\"});\t\t\n\t\tmodel.setRowCount(0);\n\t\tfor (int i = 0; i < transferSong.length; i++)\n\t\t\tmodel.addRow(transferSong[i].split(\"_\"));\n\t\t\n\t\treturn model;\n\t}", "@Override\n\t\t\tprotected void populateItem(final ListItem<ComponentData> listItem)\n\t\t\t{\n\t\t\t\tfinal ComponentData componentData = listItem.getModelObject();\n\n\t\t\t\tlistItem.add(new Label(\"row\", Long.toString(listItem.getIndex() + 1)));\n\t\t\t\tlistItem.add(new Label(\"path\", componentData.path));\n\t\t\t\tlistItem.add(new Label(\"size\", Bytes.bytes(componentData.size).toString()));\n\t\t\t\tlistItem.add(new Label(\"type\", componentData.type));\n\t\t\t\tlistItem.add(new Label(\"model\", componentData.value));\n\t\t\t\tlistItem.add(new Label(\"renderDuration\", componentData.renderDuration != null\n\t\t\t\t\t? componentData.renderDuration.toString() : \"n/a\"));\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n bindingGroup = new org.jdesktop.beansbinding.BindingGroup();\n\n SistotalPUEntityManager = ConnectionFactory.getEntityManager();\n ordemServicoQuery = java.beans.Beans.isDesignTime() ? null : SistotalPUEntityManager.createQuery(\"SELECT o FROM OrdemServico o\");\n ordemServicoList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(ordemServicoQuery.getResultList());\n situacaoOsListCellRenderer1 = new br.com.renderizadores.SituacaoOsListCellRenderer();\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jButtonVisualizar = new javax.swing.JButton();\n jComboBoxOS = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jButtonSair = new javax.swing.JButton();\n jButtonNovo = new javax.swing.JButton();\n jCheckBoxAbertas = new javax.swing.JCheckBox();\n jCheckBoxAndamento = new javax.swing.JCheckBox();\n jCheckBoxFechadas = new javax.swing.JCheckBox();\n jCheckBoxTodas = new javax.swing.JCheckBox();\n\n situacaoOsListCellRenderer1.setText(\"situacaoOsListCellRenderer1\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jTable1.setAutoCreateRowSorter(true);\n jTable1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n\n org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, ordemServicoList, jTable1);\n org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${idordemServico}\"));\n columnBinding.setColumnName(\"Código\");\n columnBinding.setColumnClass(Integer.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${idcliente.nome}\"));\n columnBinding.setColumnName(\"Nome\");\n columnBinding.setColumnClass(String.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${dataAbertura}\"));\n columnBinding.setColumnName(\"Data Abertura\");\n columnBinding.setColumnClass(java.util.Date.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${idequipamento.descricao}\"));\n columnBinding.setColumnName(\"Equipamento\");\n columnBinding.setColumnClass(String.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${idsituacaoOs.descricao}\"));\n columnBinding.setColumnName(\"Situação\");\n columnBinding.setColumnClass(String.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${totalServicos}\"));\n columnBinding.setColumnName(\"Total Servicos\");\n columnBinding.setColumnClass(java.math.BigDecimal.class);\n columnBinding.setEditable(false);\n bindingGroup.addBinding(jTableBinding);\n jTableBinding.bind();\n jScrollPane1.setViewportView(jTable1);\n if (jTable1.getColumnModel().getColumnCount() > 0) {\n jTable1.getColumnModel().getColumn(0).setMinWidth(50);\n jTable1.getColumnModel().getColumn(0).setPreferredWidth(50);\n jTable1.getColumnModel().getColumn(0).setMaxWidth(50);\n jTable1.getColumnModel().getColumn(4).setMinWidth(100);\n jTable1.getColumnModel().getColumn(4).setPreferredWidth(100);\n jTable1.getColumnModel().getColumn(4).setMaxWidth(100);\n }\n\n jButtonVisualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/com/icones/visualizar_ordem_servico.png\"))); // NOI18N\n jButtonVisualizar.setText(\"Visualizar\");\n jButtonVisualizar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonVisualizar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n\n org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jTable1, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement!=null}\"), jButtonVisualizar, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\n bindingGroup.addBinding(binding);\n\n jButtonVisualizar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonVisualizarActionPerformed(evt);\n }\n });\n\n org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, ordemServicoList, jComboBoxOS);\n bindingGroup.addBinding(jComboBoxBinding);\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jTable1, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement}\"), jComboBoxOS, org.jdesktop.beansbinding.BeanProperty.create(\"selectedItem\"));\n bindingGroup.addBinding(binding);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"Lista de Ordens de Serviço\");\n\n jButtonSair.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/com/icones/exit_64.png\"))); // NOI18N\n jButtonSair.setText(\"Sair\");\n jButtonSair.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonSair.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonSair.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSairActionPerformed(evt);\n }\n });\n\n jButtonNovo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/com/icones/add_servico_64.png\"))); // NOI18N\n jButtonNovo.setText(\"Nova\");\n jButtonNovo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonNovo.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonNovo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonNovoActionPerformed(evt);\n }\n });\n\n jCheckBoxAbertas.setText(\"Abertas\");\n jCheckBoxAbertas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxAbertasActionPerformed(evt);\n }\n });\n\n jCheckBoxAndamento.setText(\"Andamento\");\n jCheckBoxAndamento.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxAndamentoActionPerformed(evt);\n }\n });\n\n jCheckBoxFechadas.setText(\"Fechadas\");\n jCheckBoxFechadas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxFechadasActionPerformed(evt);\n }\n });\n\n jCheckBoxTodas.setText(\"Todas\");\n jCheckBoxTodas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxTodasActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addComponent(jComboBoxOS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButtonNovo, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(40, 40, 40)\n .addComponent(jButtonVisualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(61, 61, 61)\n .addComponent(jButtonSair, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(74, 74, 74))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 719, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jCheckBoxTodas)\n .addGap(67, 67, 67)\n .addComponent(jCheckBoxAbertas)\n .addGap(51, 51, 51)\n .addComponent(jCheckBoxAndamento)\n .addGap(41, 41, 41)\n .addComponent(jCheckBoxFechadas)\n .addGap(9, 9, 9))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(297, 297, 297)\n .addComponent(jLabel1)))\n .addContainerGap(62, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBoxAbertas)\n .addComponent(jCheckBoxAndamento)\n .addComponent(jCheckBoxFechadas)\n .addComponent(jCheckBoxTodas))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(52, 52, 52)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButtonSair, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButtonNovo, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButtonVisualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jComboBoxOS, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(87, 87, 87))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n bindingGroup.bind();\n\n setSize(new java.awt.Dimension(847, 638));\n setLocationRelativeTo(null);\n }", "public void styleIngredientListCell(ListView<Ingredient> lv){\n Callback<ListView<Ingredient>, ListCell<Ingredient>> ingredientsBasicFormat =\n new Callback<ListView<Ingredient>, ListCell<Ingredient>>() {\n @Override\n public ListCell<Ingredient> call(ListView<Ingredient> ingredientListView) {\n ListCell<Ingredient> cell = new ListCell<>(){\n @Override\n protected void updateItem(Ingredient ingredient, boolean empty) {\n super.updateItem(ingredient, empty);\n if (empty){\n setText(null);\n } else {\n setText(ingredient.getName());\n }\n setFont(InterfaceStyling.textFieldFont);\n }\n };\n return cell;\n }\n };\n lv.setCellFactory(ingredientsBasicFormat);\n }", "protected JPanel makeLegendPanel() throws ModelException {\n\n\n TreePopulation p_oPop = m_oDisturbanceBehaviors.getGUIManager().\n getTreePopulation();\n int i;\n \n JPanel jLegendPanel = new JPanel(new GridLayout(0, 1));\n if (p_oPop.getTrees().size() == 0) {\n JLabel jTitle = new JLabel(\"No trees to display.\");\n jTitle.setFont(new SortieFont());\n jLegendPanel.add(jTitle);\n }\n DefaultDrawingSupplier oDrawer = new DefaultDrawingSupplier();\n for (i = 0; i < m_iNumSpecies; i++) {\n JPanel jTemp = new JPanel(new FlowLayout(FlowLayout.LEFT));\n Color jSpeciesColor = (Color) oDrawer.getNextPaint();\n JButton jColorButton = new JButton(new ModelIcon(15, 15,\n ModelIcon.RECTANGLE, jSpeciesColor));\n jColorButton.setContentAreaFilled(false);\n jColorButton.setPreferredSize(new Dimension(15, 15));\n m_oTreeRenderer.setSeriesPaint(i, jSpeciesColor);\n MultilineLabel jTempMultiLine = new MultilineLabel(p_oPop.getSpeciesNameFromCode(i).\n replace('_', '\\n'));\n jTempMultiLine.setFont(new SortieFont());\n jTemp.add(jColorButton);\n jTemp.add(jTempMultiLine);\n jLegendPanel.add(jTemp);\n }\n return jLegendPanel; \n }", "public static ObservableList<CellView> getCellViewList()\n {\n return cellViewList;\n }", "java.lang.String getRenderer();", "public ObjectTableCellRenderer() {\r\n\t\tsuper();\r\n\t}", "public Component getTableCellRendererComponent(JTable table,\r\n Object value, boolean isSelected, boolean hasFocus, int row,\r\n int column) {\r\n// JPanel pnl = new JPanel(new BorderLayout());\r\n Box box = new Box(BoxLayout.Y_AXIS);\r\n ncsa.gui.RotatedLabel rot = new ncsa.gui.RotatedLabel( (String) value);\r\n box.add(box.createVerticalGlue());\r\n box.add(rot);\r\n box.add(box.createVerticalGlue());\r\n rot.setBackground(Color.white);\r\n// pnl.add(rot, BorderLayout.CENTER);\r\n// return pnl;\r\n return box;\r\n }", "@Override\n public ColorModel getColorModel() {\n return this.colorModel;\n }", "public void styleIngredientAddedListCell(ListView<Ingredient> lv){\n Callback<ListView<Ingredient>, ListCell<Ingredient>> ingredientsQuantityFormat = new Callback<ListView<Ingredient>, ListCell<Ingredient>>() {\n @Override\n public ListCell<Ingredient> call(ListView<Ingredient> ingredientListView) {\n ListCell<Ingredient> cell = new ListCell<>(){\n @Override\n protected void updateItem(Ingredient ingredient, boolean empty) {\n super.updateItem(ingredient, empty);\n if (empty){\n setText(null);\n } else {\n String quantityName = ingredient.getQuantityName();\n double quantityInGrams = ingredient.getQuantityInGrams();\n double quantityRatio = (quantityInGrams / ingredient.getSingleQuantityInGrams());\n\n //for formating. quantity in grams is to have no decimal places and the quantity\n //ratio is to have a maximum of one decimal place\n DecimalFormat df = new DecimalFormat(\"#.#\");\n DecimalFormat df2 = new DecimalFormat(\"#\");\n\n //eg if more than one egg, it should read eggs\n if (quantityRatio > 1){\n quantityName = quantityName + \"s\";\n }\n\n setText( ingredient.getName() + \" ( \" + df2.format(quantityInGrams) + \" grams / \" +\n df.format(quantityRatio) + \" \" + quantityName + \")\");\n }\n setFont(InterfaceStyling.textFieldFont);\n }\n };\n return cell;\n }\n };\n lv.setCellFactory(ingredientsQuantityFormat);\n }", "private JComponent buildUserList() {\n list = new JList<>();\n list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);\n list.setCellRenderer(new CellRenderer(list.getCellRenderer()));\n list.setTransferHandler(new ProcessTransferHandler());\n list.setDragEnabled(true);\n list.setDropMode(DropMode.ON_OR_INSERT);\n return ScrollFactory.pane(list).create();\n }", "@SuppressWarnings(\"unchecked\")\r\n\t\t\t@Override\r\n\t\t\tpublic Component getTreeCellRendererComponent(\r\n\t\t\t\t\tJTree tree, Object value, boolean sel, boolean expanded,\r\n boolean leaf, int row, boolean hasFocus\r\n\t\t\t) {\n\t\t\t\tsuper.getTreeCellRendererComponent(\r\n\t\t\t\t\ttree, value, sel, expanded, leaf, row, hasFocus);\r\n\r\n\t\t\t\tthis.setFont(LIST_FONT);\r\n\t\t\t\t\r\n\t\t\t\tObject nodeObj = ((DefaultMutableTreeNode) value).getUserObject();\r\n\t\t\t\tif (nodeObj == null) {\r\n\t\t\t\t\tsetText(\"\"); // Root node\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tMap<String, Object> map = (Map<String, Object>) nodeObj;\r\n\r\n\t\t\t\tObject item = map.get(\"obj\");\r\n\t\t\t\tif (item instanceof Task) {\r\n\t\t\t\t\tFormatter<Task> formatter = (Formatter<Task>) map.get(\"formatter\");\r\n\t\t\t\t\tsetText(formatter.apply((Task) item));\r\n\r\n\t\t\t\t} else if (item instanceof TaskExecution) {\r\n\t\t\t\t\tFormatter<TaskExecution> formatter = (Formatter<TaskExecution>) map.get(\"formatter\");\r\n\t\t\t\t\tsetText(formatter.apply((TaskExecution) item));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new TaskManagerExceptions.InvalidTaskTypeException();\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t}", "@Override\r\n public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) {\n JLabel l = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);\r\n\r\n //Get the status for the current row.\r\n TimeTable tableModel = (TimeTable) table.getModel();\r\n \r\n if ((int)tableModel.getValueAt(row, col)!=0) {\r\n l.setBackground(Color.GREEN);\r\n } else {\r\n l.setBackground(Color.RED);\r\n }\r\n\r\n //Return the JLabel which renders the cell.\r\n return l;\r\n }", "@Override\n public ColorModel getColorModel() {\n return getGraphicsConfiguration().getColorModel();\n }", "@Override\n public void modelChange(ModelChangeEvent anEvent) {\n super.modelChange(anEvent);\n if (RoleDataSource.ITEM_LIST_PROPERTY.equals(anEvent.getPropertyName())) {\n createWidgetsForItemsAndDisplay();\n } else if (SimpleFilterEditor.FILTER_UPDATED_PROPERTY.equals(anEvent.getPropertyName())) {\n final String theSearchPattern = ((SimpleFilter) anEvent.getNewValue()).getSearchPattern();\n myBonitaDataSource.getItemFilter().setSearchPattern(theSearchPattern);\n myBonitaDataSource.reload();\n } else if(RoleDataSource.ITEM_UPDATED_PROPERTY.equals(anEvent.getPropertyName())) {\n BonitaUUID theItemUUID = (BonitaUUID)anEvent.getSource();\n if(myItemSelectionWidgets.containsKey(theItemUUID)) {\n Role theItem = (Role)anEvent.getNewValue();\n updateWidgetsForItem(theItem);\n }\n }\n }", "public XYMultipleSeriesRenderer getRenderer(Context context) {\n\t XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();\n\t renderer.setAxisTitleTextSize(30);\n\t renderer.setChartTitleTextSize(40);\n\t renderer.setLabelsTextSize(20);\n\t renderer.setBarSpacing(1);\n\t renderer.setXLabels(0);\n\t renderer.addXTextLabel(1, context.getString(R.string.vigorous));\n\t renderer.addXTextLabel(2, context.getString(R.string.nature)); \n\t renderer.addXTextLabel(3, context.getString(R.string.ocean)); \n\t renderer.addXTextLabel(4, context.getString(R.string.flower));\n\t //top, left, bottom, right\n\t renderer.setMargins(new int[] {70, 50, 15, 20});\n\t SimpleSeriesRenderer r = new SimpleSeriesRenderer();\n\t r.setColor(Color.MAGENTA);\n\t renderer.addSeriesRenderer(r);\n\t renderer.setChartTitle(context.getString(R.string.moodVersusHue));\n\t renderer.setXTitle(context.getString(R.string.hueCategory));\n\t renderer.setYTitle(context.getString(R.string.mood));\n\t renderer.setXAxisMin(0);\n\t renderer.setXAxisMax(5);\n\t renderer.setYAxisMin(0);\n\t renderer.setYAxisMax(10);\n\t renderer.setYLabelsAlign(Align.RIGHT);\n\t renderer.setBackgroundColor(Color.BLACK);\n\t renderer.setShowGridY(true);\n\t renderer.setShowLegend(false);\n\t return renderer;\n\t}", "public Component getTableCellRendererComponent(JTable table, Object color, boolean isSelected, boolean hasFocus, int row, int column) \r\n {\n \tBotonesIconos botonModificar = new BotonesIconos(\"MODIFICAR.png\");\r\n \t\r\n \treturn botonModificar; //new JButton();\r\n }", "public static ViewFactory getFactory() {\r\n return new ViewFactory() {\r\n @Override\r\n public boolean canDisplay(CellRenderer renderer) {\r\n return renderer instanceof SwingCellRenderer;\r\n }\r\n\r\n @Override\r\n public View getView(CellRenderer renderer) {\r\n return new SwingView((SwingCellRenderer)renderer);\r\n }\r\n };\r\n }" ]
[ "0.6816876", "0.6616857", "0.6383082", "0.6243329", "0.61355096", "0.61348754", "0.6099535", "0.6069818", "0.60590446", "0.6058271", "0.5991985", "0.5904221", "0.58899516", "0.58800876", "0.5819007", "0.580917", "0.5808419", "0.5803848", "0.57881224", "0.5785059", "0.57595783", "0.5757776", "0.57448983", "0.5696935", "0.56352854", "0.5616747", "0.55826294", "0.55512094", "0.55480653", "0.5547859", "0.5461284", "0.54314244", "0.5402368", "0.53788596", "0.53526497", "0.5319762", "0.5291353", "0.52850515", "0.52702874", "0.5239775", "0.52296585", "0.5222682", "0.5182776", "0.5176814", "0.51258904", "0.51087004", "0.51053673", "0.50774425", "0.50663507", "0.5060762", "0.50591713", "0.5056986", "0.50249404", "0.5021261", "0.5017688", "0.5011421", "0.49943864", "0.49880585", "0.4964603", "0.49636456", "0.4945341", "0.4944099", "0.4935512", "0.49288657", "0.49202707", "0.48836952", "0.48655388", "0.4856279", "0.4855252", "0.48509696", "0.48324335", "0.48271096", "0.48167259", "0.4774616", "0.47737828", "0.47550815", "0.4733922", "0.47325814", "0.47316617", "0.47293073", "0.471886", "0.471581", "0.4708132", "0.47048292", "0.46895286", "0.4676977", "0.46734482", "0.46709585", "0.4669432", "0.46680912", "0.4660401", "0.466006", "0.46431404", "0.46312523", "0.46154252", "0.46130362", "0.46088824", "0.46077377", "0.46045235", "0.46006483" ]
0.72444755
0
supply path and name of active data
public static void main(String[] args) { String dataFileName = DATA_PATH + "data1.csv"; //supply path and name of file where created data is going to be saved String newFileName = DATA_PATH + "data1_subsetTest.csv"; ArrayList<String> subsetConditions= new ArrayList<String>(); subsetConditions.add("Gen:==:7,8:Numeric"); subsetConditions.add("Site:!=:Env1:Factor"); subsetConditions.add("Blk:!=:4:Numeric"); RJavaManager rJavaManager= new RJavaManager(); rJavaManager.initStar(); rJavaManager.getRJavaDataManipulationManager().subSet(dataFileName, newFileName, subsetConditions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDataPath() {\n\t\treturn \"data\";\r\n\t}", "private String getDataPath()\n {\n Location location = Platform.getInstanceLocation();\n if (location == null) {\n return \"@none\";\n } else {\n return location.getURL().getPath();\n }\n }", "public String getDataFilePath() {\r\n \t\treturn dataFile;\r\n \t}", "public String getPFDataPath() {\n\t\t// TODO Auto-generated method stub\n\t\tString path = pfDir.getPath()+\"/data/\";\n\t\treturn path;\n\t}", "public Path getDataDirectory();", "public String getDataFileName() {\treturn dataFileName;\t}", "public String getDataFileName() {\n return dataFileName;\n }", "@Override\n protected File getDataFile(String relFilePath) {\n return new File(getDataDir(), relFilePath);\n }", "public String getDataBaseName() {\r\n\t\treturn dataBaseName + \".db\";\r\n\t}", "private String db4oDBFullPath(Context ctx) {\t\n\t\treturn ctx.getDir(\"data\", 0) + \"/\" + LOCAL_SERVER;\n\t\n\t}", "String getUserDatabaseFilePath();", "public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}", "public String getDataDirectory() {\n return dataDirectory;\n }", "private String getPath() {\r\n\t\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\r\n\t\t}", "public Dataset openTDB(String directory){\n Dataset dataset = TDBFactory.createDataset(directory);\n return dataset;\n}", "public String getPath() { return db.getPath(); }", "@Override\r\n protected String getDiskLocation()\r\n {\r\n return dataFile.getFilePath();\r\n }", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getDataDirectory() {\n Session session = getSession();\n String dataDirectory;\n try {\n dataDirectory = (String) session.createSQLQuery(DATA_DIRECTORY_QUERY).list().get(0);\n } finally {\n releaseSession(session);\n }\n return dataDirectory;\n }", "public void setDataFileName(String dataFileName) {\n this.dataFileName = dataFileName;\n }", "public String getUserDictPath(String dataname, String username){\n String userdictpath = String.format(\"dicts/%s-%s.txt\", dictname, username);\n return userdictpath;\n }", "Object getCurrentData();", "public String getDataDir() {\n\t\treturn dataDir;\n\t}", "public String getWorkingDataFile()\n\t{\n\t return workingDataFileName;\n\t}", "public String getDataOwner();", "public File getDataFolder() {\n return dataFolder;\n }", "public void getData(String dataName){\r\n this.mData.get(dataName);\r\n }", "abstract public String getDataResourcesDir();", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "public String getDataParent () {\n if (dataParent == null) {\n return System.getProperty (GlobalConstants.USER_DIR);\n } else {\n return dataParent;\n }\n }", "public void setTextDataPathName(String txtPath){\n\t\ttxtDataPath.setText(txtPath);\n\t}", "private void setData() {\n\t\t\n\t\tString str = readInternalStorage();\n\t\tString[] arr = str.split(\"--\");\n\t\tLog.v(\"CONSOLE\", arr.length+\" \"+arr);\n\t\t\n\t\tLog.v(\"CONSOLE\", \"path\"+arr[0]+\n\t\t\t\t\" name \"+arr[1]+\n\t\t\t\t\" date \"+arr[2]+\n\t\t\t\t\" desc \"+arr[3]); \n\t\t\n\t\tString desc =str;\n\t\t\n\t\ttxtName.setText(entity.getName());\n\t\ttxtDate.setText(entity.getDate());\n\t\ttxtDesc.setText(desc);\n\t}", "phaseI.Hdfs.DataNodeLocation getLocation();", "@Override\n public String getPath() {\n return \"data/userGroup\";\n }", "public DatabeneFormatsTestDataProvider() {\n this.basePath = SystemInfo.getCurrentDir();\n }", "public abstract String getDataFileUrl ();", "@Override\n\t\t\tpublic void handleDataChange(String dataPath, Object data) throws Exception {\n\t\t\t\tString cmd = (String)data;\n\t\t\t\tSystem.out.println(\"执行的命令:\"+cmd);\n\t\t\t\texecCmd(cmd);\n\t\t\t}", "void massiveModeLoading( File dataPath );", "Ops(String filePath){\r\n\t\t\r\n\t\t//If the user doesnt give any specific location for storing of data\r\n\tif(filePath==null)\r\n\t\tthis.filePath=\"E:\\\\assignment.json\";\r\n\t\r\n\t\telse this.filePath=filePath;\t//If the file path is mentioned\r\n\t}", "public void chooseDataDirectory() {\n File file;\n JFileChooser fileChooser = new JFileChooser(\n new java.io.File(defaultDirectory));\n fileChooser.setDialogTitle(NbBundle.getMessage(\n SessionTopComponent.class, \"ChooseDataDirectory\"));\n fileChooser.setFileSelectionMode(\n JFileChooser.DIRECTORIES_ONLY);\n int returnVal = fileChooser.showOpenDialog(this);\n\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n file = fileChooser.getSelectedFile();\n\n dataDirectoryTextField.setText(file.getAbsolutePath());\n defaultDirectory = file.getPath();\n }\n enableStartButton();\n }", "public File getDataFile();", "@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}", "public ReadData(String pathname, String userInput)\n\t{\n\t\tUser = userInput;\n\t\tfilename = pathname; //Records the path filename.\n\t}", "public static String getPathDB() {\n return pathDB;\n }", "public DataInput( String filepath)\r\n {\r\n this.filepath = filepath;\r\n }", "protected String path() {\n return path(getName());\n }", "public abstract boolean serializeExternalData(String name, String path);", "public static File getDataDirectory() {\n\t\treturn DATA_DIRECTORY;\n\t}", "Path getDoctorRecordsFilePath();", "public void setDataPath(String path){\n\t\t_dataPath = path;\n\t\ttry {\n\t\t\tFileInputStream file = new FileInputStream(path + \"properties.txt\");\n\t\t\tprops.load(file);\n\t\t\tfile.close();\n\t\t} catch (IOException exp) {\n\t\t\tDebug.getInstance().errorMessage(this.getClass(),\n\t\t\t\t\t\"No Property File found: \" + exp.getMessage());\n\t\t\t;\n\t\t}\n\t}", "protected void loadData()\n {\n }", "@Override\r\n\tpublic String getDataBaseName(String[] sql) {\n\t\treturn UsedDataBase.getUsedDataBase();\r\n\t}", "ApplicationData getActualAppData();", "public DataStorage getDataStorage();", "public DataManager() {\n\t\tthis(PUnit == null ? \"eElectionsDB\" : PUnit);\n\t}", "public NameSurferDataBase(String filename) {\t\n\t\tnameData(filename);\n\t}", "public String getFriendsDatabasePath();", "DatasetFile getDatasetFile();", "public void setFriendsDatabasePath(String path);", "public String getUrlDataFile() {\n\t\treturn urlDataFile;\n\t}", "public abstract void loadData();", "public abstract void loadData();", "public void setDataDirectory(String dataDirectory) {\n this.dataDirectory = dataDirectory;\n }", "public void setCallLogsDatabaseFile(String path);", "public static String getPath() { return Objects.requireNonNull(Bukkit.getServer().getPluginManager().getPlugin(\"Catacombs\"))\n .getDataFolder().getAbsolutePath(); }", "public void setCallLogsDatabasePath(String path);", "protected Path createDataPath(Path metaPath) {\n UUID uuid = UUID.randomUUID();\n long mostSigBits = uuid.getMostSignificantBits();\n long leastSigBits = uuid.getLeastSignificantBits();\n String path = digits(mostSigBits >> 32, 8) + \"-\" + digits(mostSigBits >> 16, 4) + \"-\" + digits(mostSigBits, 4) + \"-\"\n + digits(leastSigBits >> 48, 4) + \"-\" + digits(leastSigBits, 12);\n return new Path(_dataPath, path);\n }", "DataModelOracle getDataModelOracle( Path project );", "public TiDeployData()\n\t{\n\t\tTiApplication app = TiApplication.getInstance();\n\t\tFile extStorage = Environment.getExternalStorageDirectory();\n\t\tFile deployJson = new File(new File(extStorage, app.getPackageName()), \"deploy.json\");\n\t\tif (deployJson.exists()) {\n\t\t\treadDeployData(deployJson);\n\t\t}\n\t}", "DataStore getDataStore ();", "public Storage(String s){\n this.path=s;\n }", "public boolean setDataFolder() {\n UserPrefs prefs = UserPrefs.getUserPrefs();\n String warningMsg = LanguageManager.getString(\"4_3\");\n\n // Get the data path in the Text Field\n String dataRoot = tfDataPath.getText().trim();\n\n // Nothing there, so add default based on username - this is OK\n if(dataRoot.length() == 0) {\n dataRoot = DataFiler.getDefaultDataFolder(prefs.getUserName());\n prefs.putProperty(UserPrefs.DATA_ROOT, dataRoot);\n return true;\n }\n\n // Compare current datapath with previous one\n // If different check for existing data and warn user\n if(!existingDataPath.equalsIgnoreCase(dataRoot)) {\n String dataFile1 = DataFiler.addFileSepChar(dataRoot) + DataFiler.treeFolder + DataFiler.fileSepChar + DataFiler.dataFileName;\n // legacy of 1.1\n String dataFile2 = DataFiler.addFileSepChar(dataRoot) + \"ll_data\" + DataFiler.fileSepChar + DataFiler.dataFileName;\n if(DataFiler.fileExists(dataFile1) || DataFiler.fileExists(dataFile2)) {\n int result = JOptionPane.showConfirmDialog(this, warningMsg, LanguageManager.getString(\"4_4\"), JOptionPane.YES_NO_OPTION);\n if(result != JOptionPane.YES_OPTION) {\n // Put back to original path\n tfDataPath.setText(existingDataPath);\n return false;\n }\n else {\n // Set and reload\n prefs.putProperty(UserPrefs.DATA_ROOT, dataRoot);\n if(MainFrame.getInstance() != null) {\n DataFiler.reloadData();\n }\n return true;\n }\n }\n }\n\n // Changed\n prefs.putProperty(UserPrefs.DATA_ROOT, dataRoot);\n return true;\n }", "public String getCallLogsDatabasePath();", "public interface DataVar {\n String APP_ROOT_FILE = Environment.getExternalStorageDirectory().getPath()\n + File.separator + \"NoteMyLife\";\n String APP_IMG_FILE = APP_ROOT_FILE + File.separator + \"img\";\n\n //把当前用户的登陆信息保存到本地时的键\n String SP_FILE = \"USER_DATA\";\n String SP_USER_ID = \"userId\";\n String SP_EMAIL = \"userAccount\";\n String SP_PASSWORD = \"userPassword\";\n String SP_HEAD = \"head\";\n String INIT_HEAD_IMAGE_FILE_NAME = \"0.png\";\n}", "public static String sActivePath() \r\n\t{\r\n\t\tString activePath = null;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tactivePath = new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn activePath;\r\n\t}", "public final void setDataName(String dataName) {\n this.dataName = dataName;\n }", "public File getDataFile(String filename) {\n throw new UnsupportedOperationException();\n }", "public DataFolder(String relativeFolderPath, String dataType) {\r\n this.relativeFolderPath = relativeFolderPath;\r\n this.dataType = dataType;\r\n }", "@Override\n public String readData(String path) {\n Connection connection;\n ResultSet resultSet;\n String data = null;\n\n try {\n connection = getConnection();\n connection.setAutoCommit(false);\n\n PreparedStatement pstmt = connection.prepareStatement(\"SELECT DATA FROM DATA WHERE ID = ?\");\n pstmt.setString(1, path);\n\n resultSet = pstmt.executeQuery();\n\n while (resultSet.next()) {\n data = new String (resultSet.getBytes(1));\n }\n\n pstmt.close();\n resultSet.close();\n connection.close();\n\n } catch (SQLException e) {\n logger.log(Level.SEVERE, e.getMessage(), e);\n }\n return data;\n }", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "SystemData systemData();", "SystemData systemData();", "SystemData systemData();", "SystemData systemData();", "SystemData systemData();", "void setDoctorRecordsFilePath(Path doctorRecordsFilePath);", "private Optional<Path> dataSetDir() {\n Optional<String> dataSetDirProperty = demoProperties.dataSetDir();\n if (!dataSetDirProperty.isPresent()) {\n logger.info(\"Data set directory (app.demo.data-set-dir) is not set.\");\n return Optional.empty();\n }\n Path dataSetDirPath = Paths.get(dataSetDirProperty.get());\n if (!isReadableDir(dataSetDirPath)) {\n logger.warn(\n \"Data set directory '{}' doesn't exist or cannot be read. No external data sets will be loaded.\",\n dataSetDirPath.toAbsolutePath());\n return Optional.empty();\n }\n return Optional.of(dataSetDirPath);\n }", "public void setDatasource( String ds )\n {\n datasource = ds;\n }", "private String getStoreName() {\n if (storeName == null) {\n storeName = System.getProperty(\"user.dir\")\n + File.separator\n + QVCSConstants.QVCS_META_DATA_DIRECTORY\n + File.separator\n + QVCSConstants.QVCS_FILEID_DICT_STORE_NAME\n + \"dat\";\n }\n return storeName;\n }", "public String getDatabaseName()\n {\n return \"assetdr\";\n }", "public FileStorage(File path) {\n dataFolder = path;\n }", "protected abstract void loadData();", "public void setDataSource(StarObjectClass self,String path){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn;\r\n \t\ttry{\r\n \t\t\tmediaplayer.setDataSource(path);\r\n \t\t}catch(IOException e){\r\n \t\t\tSrvGroup._Print(e.toString());\r\n \t\t}\r\n \t}", "static Path getFlightTestDataRoot() {\n return getTestDataRoot().resolve(\"flight\");\n }", "protected String getFileNamePath()\n {\n String sep = System.getProperty(\"file.separator\", \"/\");\n// String path = System.getProperty(\"user.dir\", \".\");\n\n String filename = getPath() + sep + \"sec.dat\";\n\n return filename;\n }", "void loadData();", "void loadData();", "@Override\n public String getName() {\n return _data.getName();\n }" ]
[ "0.711942", "0.6262682", "0.6197764", "0.6121611", "0.59383166", "0.5766159", "0.5706803", "0.56269157", "0.5579193", "0.55786073", "0.55227476", "0.5497931", "0.54658926", "0.5425459", "0.5415824", "0.5415752", "0.54078466", "0.5358625", "0.5358625", "0.5358625", "0.5358625", "0.53468525", "0.53191286", "0.5318663", "0.53155535", "0.52912736", "0.52838266", "0.52712387", "0.5267758", "0.52582294", "0.52195525", "0.5210113", "0.52018017", "0.5194678", "0.5193731", "0.5187307", "0.51799434", "0.51739514", "0.5170063", "0.5160034", "0.51372683", "0.5130697", "0.5125827", "0.51256377", "0.51240444", "0.51138616", "0.51130325", "0.5096185", "0.50872153", "0.5069991", "0.50594217", "0.5044792", "0.50399154", "0.50215924", "0.50122863", "0.500733", "0.50071836", "0.49934003", "0.49816462", "0.49797907", "0.49622387", "0.49593258", "0.4953646", "0.49522683", "0.49522683", "0.4943235", "0.49251956", "0.49230748", "0.49229702", "0.49214908", "0.4910042", "0.4903322", "0.48970053", "0.48962113", "0.48934412", "0.48876777", "0.48773667", "0.48756522", "0.48667902", "0.48598382", "0.485909", "0.48521978", "0.48515877", "0.4846978", "0.4846978", "0.4846978", "0.4846978", "0.4846978", "0.48446572", "0.48437807", "0.4843597", "0.48398367", "0.48379877", "0.48295614", "0.48207843", "0.48190573", "0.481764", "0.48128274", "0.48112318", "0.48112318", "0.48068476" ]
0.0
-1
onSubscribe > request(backpressure) > onNext ... > onComplete
@Test public void fluxSubscriber(){ Flux<String> fluxString = Flux.just("Thalia", "Vilela", "Ferreira").log(); StepVerifier.create(fluxString) .expectNext("Thalia", "Vilela", "Ferreira") .verifyComplete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void test1() {\n Observable observable = Observable.create(new ObservableOnSubscribe<QuoteBean>() {\n @Override\n public void subscribe(ObservableEmitter<QuoteBean> e) throws Exception {\n e.onNext(Request.stringRequest(url, com.android.volley.Request.Method.GET, HomeActivity.class.getSimpleName()));\n }\n }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());\n\n Observer<QuoteBean> observer = new Observer<QuoteBean>() {\n @Override\n public void onSubscribe(Disposable d) {\n Log.d(TAG, \"test1 onSubscribe\");\n }\n\n @Override\n public void onNext(QuoteBean s) {\n Log.d(TAG, \"onNext:\" + s.toString());\n }\n\n @Override\n public void onError(Throwable e) {\n Log.d(TAG, \"onError\");\n }\n\n @Override\n public void onComplete() {\n Log.d(TAG, \"onComplete\");\n }\n };\n observable.subscribe(observer);\n }", "@Override\n public void onSubscribe(Subscription s) {\n s.request(10);\n\n // Should not produce anymore data\n s.request(10);\n }", "@Override\n\t\t\tpublic void onSubscribe(Disposable arg0) {\n\t\t\t\t\n\t\t\t}", "Observable<SubscribeRequest> getSubscribeRequestStream();", "public void onSubscribe() {\n\n }", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable p1) {\n\t\t\t\t\t}", "@Override\n public void onSubscribe(Disposable d) {\n }", "void subscribe();", "@Override\n public void subscribe(ObservableEmitter<Integer> e) throws Exception {\n\n e.onNext(1);\n SystemClock.sleep(1000);\n e.onNext(2);\n SystemClock.sleep(1000);\n e.onNext(3);\n SystemClock.sleep(1000);\n e.onNext(4);\n\n //Once the Observable has emitted all items in the sequence, call onComplete//\n e.onComplete();\n //e.onError(new Throwable(\"Some Error!!\"));\n }", "private static void backPressureChallenge() {\n\t\tObservable.range(1, 1000000)\n\t\t//below map will run in sequential\n\t\t//since sequential it has to complete whole task then only it can allow consumer to start\n\t\t\t.map(item -> {\n\t\t\t\tSystem.out.println(\"Produced item \"+item +\" using thread \"+Thread.currentThread().getName());\n\t\t\t\treturn item;\n\t\t\t})\n\t\t\t.observeOn(Schedulers.io())\n\t\t\t//.subscribeOn(Schedulers.io())//with this whole pipelein runs in seprate thread paralleley\n\t\t\t//below will run in concurrent\n\t\t\t.subscribe(item ->{\n\t\t\t\t//mimcing slowness\n\t\t\t\tThreadUtil.sleep(300);\n\t\t\t\tSystem.out.println(\"Consumed item \"+item +\" using thread \"+Thread.currentThread().getName());\n\t\t\t})\n\t\t\t\n\t\t\t;\n\t\t\n\t\t//since running in async we need to sleep\n\t\tThreadUtil.sleep(10000000);\n\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "Flow.Subscriber<T> subscriber();", "public interface SubscriberOnNextListener<T> {\n void onNext(T t);\n}", "private void test() {\n Observable<String> observable = Observable.create(new ObservableOnSubscribe<String>() {\n\n @Override\n public void subscribe(ObservableEmitter<String> e) throws Exception {\n e.onNext(\"hello\");\n e.onNext(\"RXJAVA\");\n e.onComplete();\n }\n }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());\n\n Observer<String> observer = new Observer<String>() {\n @Override\n public void onSubscribe(Disposable d) {\n Log.d(TAG, \"onSubscribe\");\n }\n\n @Override\n public void onNext(String s) {\n Log.d(TAG, \"onNext:\" + s);\n }\n\n @Override\n public void onError(Throwable e) {\n Log.d(TAG, \"onError\");\n }\n\n @Override\n public void onComplete() {\n Log.d(TAG, \"onComplete\");\n }\n };\n observable.subscribe(observer);\n }", "@Override\n\tpublic void onSubscribe(String arg0, int arg1) {\n\t\t\n\t}", "public interface Subscription {\n /**\n * Calling this will send the event to the subscribed service\n * @param event the event to transmit to the subscribed service\n */\n boolean onEvent(Event event);\n\n /**\n * Returns a stream of all subscribeRequests that are transmitted by the subbed service\n * @return a stream of subscribeRequests transmitted by subbed service\n */\n Observable<SubscribeRequest> getSubscribeRequestStream();\n\n /**\n * This completable will complete when the subscription is terminated for some reason (most likely a connection termination)\n * @return a completable that will complete when the subscription is terminated\n */\n Completable getCompletable();\n}", "@Override\n\tpublic void onSubscribe(Subscription subscription) {\n\t\tSystem.out.println(\"onSubscribe invoked\");\n\t\tsubscription.request(Long.MAX_VALUE);\n\t}", "@BackpressureSupport(BackpressureKind.SPECIAL)\n @SchedulerSupport(SchedulerKind.NONE)\n @Override\n public final void subscribe(Subscriber<? super T> s) {\n Objects.requireNonNull(s, \"s is null\");\n subscribeActual(s);\n }", "public interface SubscriberOnNextListener<T> {\n void onNext(T t);\n void onError(String Code);\n}", "public interface Subscriber<T> {\n\n void onSubscribe(Subscription s);\n\n /**\n * Data notification sent by the {@link Publisher}\n * in response to requests to {@link Subscription#request(long)}.\n *\n * @param t the element signaled\n */\n void onNext(T t);\n\n /**\n * Failed terminal state.\n *\n * @param t the throwable signaled\n */\n void onError(Throwable t);\n\n /**\n * Successful terminal state.\n *\n */\n void onComplete();\n}", "public void subscribe( Observer< S, Info > obs );", "public void subscribeActual(Subscriber<? super T> subscriber) {\r\n PublishConnection publishConnection;\r\n while (true) {\r\n publishConnection = (PublishConnection) this.current.get();\r\n if (publishConnection != null) {\r\n break;\r\n }\r\n PublishConnection publishConnection2 = new PublishConnection(this.current, this.bufferSize);\r\n if (this.current.compareAndSet(publishConnection, publishConnection2)) {\r\n publishConnection = publishConnection2;\r\n break;\r\n }\r\n }\r\n InnerSubscription innerSubscription = new InnerSubscription(subscriber, publishConnection);\r\n subscriber.onSubscribe(innerSubscription);\r\n if (publishConnection.add(innerSubscription)) {\r\n if (innerSubscription.isCancelled()) {\r\n publishConnection.remove(innerSubscription);\r\n } else {\r\n publishConnection.drain();\r\n }\r\n return;\r\n }\r\n Throwable th = publishConnection.error;\r\n if (th != null) {\r\n subscriber.onError(th);\r\n } else {\r\n subscriber.onComplete();\r\n }\r\n }", "public void drain() {\r\n if (getAndIncrement() == 0) {\r\n SimpleQueue<T> simpleQueue = this.queue;\r\n int i = this.consumed;\r\n int i2 = this.bufferSize;\r\n int i3 = i2 - (i2 >> 2);\r\n boolean z = this.sourceMode != 1;\r\n int i4 = 1;\r\n int i5 = i;\r\n SimpleQueue<T> simpleQueue2 = simpleQueue;\r\n int i6 = i5;\r\n while (true) {\r\n if (simpleQueue2 != null) {\r\n long j = LongCompanionObject.MAX_VALUE;\r\n InnerSubscription[] innerSubscriptionArr = (InnerSubscription[]) this.subscribers.get();\r\n boolean z2 = false;\r\n for (InnerSubscription innerSubscription : innerSubscriptionArr) {\r\n long j2 = innerSubscription.get();\r\n if (j2 != Long.MIN_VALUE) {\r\n j = Math.min(j2 - innerSubscription.emitted, j);\r\n z2 = true;\r\n }\r\n }\r\n long j3 = 0;\r\n if (!z2) {\r\n j = 0;\r\n }\r\n while (true) {\r\n if (j == j3) {\r\n break;\r\n }\r\n boolean z3 = this.done;\r\n try {\r\n Object poll = simpleQueue2.poll();\r\n boolean z4 = poll == null;\r\n if (!checkTerminated(z3, z4)) {\r\n if (z4) {\r\n break;\r\n }\r\n int length = innerSubscriptionArr.length;\r\n for (int i7 = 0; i7 < length; i7++) {\r\n InnerSubscription innerSubscription2 = innerSubscriptionArr[i7];\r\n if (!innerSubscription2.isCancelled()) {\r\n innerSubscription2.downstream.onNext(poll);\r\n innerSubscription2.emitted++;\r\n }\r\n }\r\n if (z) {\r\n i6++;\r\n if (i6 == i3) {\r\n ((Subscription) this.upstream.get()).request((long) i3);\r\n i6 = 0;\r\n }\r\n }\r\n j--;\r\n if (innerSubscriptionArr != this.subscribers.get()) {\r\n break;\r\n }\r\n j3 = 0;\r\n } else {\r\n return;\r\n }\r\n } catch (Throwable th) {\r\n Throwable th2 = th;\r\n Exceptions.throwIfFatal(th2);\r\n ((Subscription) this.upstream.get()).cancel();\r\n simpleQueue2.clear();\r\n this.done = true;\r\n signalError(th2);\r\n return;\r\n }\r\n }\r\n if (checkTerminated(this.done, simpleQueue2.isEmpty())) {\r\n return;\r\n }\r\n }\r\n this.consumed = i6;\r\n i4 = addAndGet(-i4);\r\n if (i4 != 0) {\r\n if (simpleQueue2 == null) {\r\n simpleQueue2 = this.queue;\r\n }\r\n } else {\r\n return;\r\n }\r\n }\r\n }\r\n }", "public void a() {\n if (getAndIncrement() == 0) {\n Subscriber<? super Flowable<T>> subscriber = this.a;\n MpscLinkedQueue<Object> mpscLinkedQueue = this.f;\n AtomicThrowable atomicThrowable = this.g;\n long j2 = this.l;\n int i2 = 1;\n while (this.e.get() != 0) {\n UnicastProcessor<T> unicastProcessor = this.k;\n boolean z = this.j;\n if (!z || atomicThrowable.get() == null) {\n Object poll = mpscLinkedQueue.poll();\n boolean z2 = poll == null;\n if (z && z2) {\n Throwable terminate = atomicThrowable.terminate();\n if (terminate == null) {\n if (unicastProcessor != 0) {\n this.k = null;\n unicastProcessor.onComplete();\n }\n subscriber.onComplete();\n return;\n }\n if (unicastProcessor != 0) {\n this.k = null;\n unicastProcessor.onError(terminate);\n }\n subscriber.onError(terminate);\n return;\n } else if (z2) {\n this.l = j2;\n i2 = addAndGet(-i2);\n if (i2 == 0) {\n return;\n }\n } else if (poll != m) {\n unicastProcessor.onNext(poll);\n } else {\n if (unicastProcessor != 0) {\n this.k = null;\n unicastProcessor.onComplete();\n }\n if (!this.h.get()) {\n UnicastProcessor<T> create = UnicastProcessor.create(this.b, this);\n this.k = create;\n this.e.getAndIncrement();\n if (j2 != this.i.get()) {\n j2++;\n s6.a.e.d.c.a.b bVar = new s6.a.e.d.c.a.b(create);\n subscriber.onNext(bVar);\n if (bVar.f()) {\n create.onComplete();\n }\n } else {\n SubscriptionHelper.cancel(this.d);\n this.c.dispose();\n atomicThrowable.tryAddThrowableOrReport(new MissingBackpressureException(\"Could not deliver a window due to lack of requests\"));\n this.j = true;\n }\n }\n }\n } else {\n mpscLinkedQueue.clear();\n Throwable terminate2 = atomicThrowable.terminate();\n if (unicastProcessor != 0) {\n this.k = null;\n unicastProcessor.onError(terminate2);\n }\n subscriber.onError(terminate2);\n return;\n }\n }\n mpscLinkedQueue.clear();\n this.k = null;\n }\n }", "@Override\n public boolean subscribe(Task data) {\n return true;\n }", "@Test\n void receivesWithSmallPrefetch() {\n // Arrange\n final String secondPartitionId = \"2\";\n final AtomicBoolean isActive = new AtomicBoolean(true);\n final EventHubProducerAsyncClient producer = toClose(builder.buildAsyncProducerClient());\n\n final Disposable producerEvents = toClose(getEvents(isActive)\n .flatMap(event -> producer.send(event, new SendOptions().setPartitionId(secondPartitionId)))\n .subscribe(\n sent -> {\n },\n error -> logger.error(\"Error sending event\", error),\n () -> logger.info(\"Event sent.\")));\n\n final int prefetch = 5;\n final int backpressure = 3;\n final int batchSize = 10;\n final EventHubConsumerAsyncClient consumer = toClose(builder\n .prefetchCount(prefetch)\n .buildAsyncConsumerClient());\n\n // Act & Assert\n try {\n StepVerifier.create(consumer.receiveFromPartition(secondPartitionId, EventPosition.latest()), prefetch)\n .expectNextCount(prefetch)\n .thenRequest(backpressure)\n .expectNextCount(backpressure)\n .thenRequest(batchSize)\n .expectNextCount(batchSize)\n .thenRequest(batchSize)\n .expectNextCount(batchSize)\n .thenAwait(Duration.ofSeconds(1))\n .thenCancel()\n .verify(TIMEOUT);\n } finally {\n isActive.set(false);\n }\n }", "private static void backPressureFix() {\n\t\tFlowable.range(1, 1000000)\n\t\t//below map will run in sequential\n\t\t//since sequential it has to complete whole task then only it can allow consumer to start\n\t\t\t.map(item -> {\n\t\t\t\tSystem.out.println(\"Produced item \"+item +\" using thread \"+Thread.currentThread().getName());\n\t\t\t\treturn item;\n\t\t\t})\n\t\t\t.observeOn(Schedulers.io())\n\t\t\t//.subscribeOn(Schedulers.io())//with this whole pipelein runs in seprate thread paralleley\n\t\t\t//below will run in concurrent\n\t\t\t.subscribe(item ->{\n\t\t\t\t//mimcing slowness\n\t\t\t\tThreadUtil.sleep(300);\n\t\t\t\tSystem.out.println(\"Consumed item \"+item +\" using thread \"+Thread.currentThread().getName());\n\t\t\t})\n\t\t\t\n\t\t\t;\n\t\t\n\t\t//since running in async we need to sleep\n\t\tThreadUtil.sleep(10000000);\n\t\t\t\n\t}", "default void subscribe(Subscriber<? super Void> s) {\n\t\tOperators.complete(s);\n\t}", "private void threads()\n {\n {\n Observable myObservable = Observable.create\n (\n new Observable.OnSubscribe<GetArtistQuery>() \n {\n public void call(Subscriber<? super GetArtistQuery> sub) \n { \n //System.out.println(Thread.currentThread().getName());\n sub.onNext(getArtistQuery);\n sub.onCompleted();\n }\n } \n );\n \n Subscriber mySubscriber = new Subscriber<GetArtistQuery>() \n {\n public void onNext(GetArtistQuery s) \n { \n try { \n s.execute();\n } catch (SQLException ex) { System.out.println(ex); }\n }\n public void onCompleted() { \n }\n public void onError(Throwable e) {System.out.println(e); } \n };\n //myObservable.subscribe(mySubscriber); \n try {\n myObservable.\n subscribeOn(Schedulers.io()).\n //observeOn(Schedulers.from(executorService)).\n observeOn(Schedulers.trampoline()).\n subscribe(mySubscriber);\n Thread.sleep(2); \n //executorService.shutdown();\n } catch(InterruptedException ex) {Thread.currentThread().interrupt();}\n }\n \n }", "@Override\n\t\tpublic void onSubscribe(Disposable d) {\n\t\t\tSystem.out.println(\"subscribe\");\n\t\t}", "public abstract void onNext();", "void subscribe(Player player);", "public void onDrainComplete();", "@Override\n protected void onSubscribe() {\n Subscription s = subscription;\n Disposable d = Disposable.from(s);\n \n if (!TerminalAtomics.set(this, DISCONNECT, d)) {\n done = true;\n return;\n }\n \n connected = true;\n s.request(Flow.defaultBufferSize());\n }", "@Override\n //called when something subscribes to this observable\n public void subscribe(ObservableEmitter<Task> emitter) throws Throwable {\n if(!emitter.isDisposed()){\n emitter.onNext(task);\n emitter.onComplete();\n }\n }", "@Override\r\n public Subscription onSubscribe(final Observer<? super String> observer) {\n final Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n for (int i = 0; i < 75; i++) {\r\n observer.onNext(\"anotherValue_\" + i);\r\n }\r\n // After sending all values we complete the sequence\r\n observer.onCompleted();\r\n }\r\n });\r\n t.start();\r\n \r\n return new Subscription() {\r\n @Override\r\n public void unsubscribe() {\r\n // Ask the thread to stop doing work.\r\n // For this simple example it just interrupts.\r\n t.interrupt();\r\n }\r\n };\r\n }", "@Override\n public void subscribe(FlowableEmitter<Integer> e) throws Exception {\n for (int i = 0; i < 128; i++) {\n Log.e(TAG, \"emit \" + i);\n e.onNext(i);\n }\n }", "public interface FcmReceiverData {\n /**\n * @return return the new instance observable after applying doOnNext operator.\n */\n Observable<Message> onNotification(Observable<Message> oMessage);\n}", "public void subscribe() {\n mEventBus.subscribe(NetResponseProcessingCompletedEvent.CLASS_NAME, this);\n mEventBus.subscribe(FailureResponseDTO.CLASS_NAME, this);\n }", "public void subscribeActual(Observer<? super Response<T>> observer) {\r\n Call clone = this.originalCall.clone();\r\n CallCallback callCallback = new CallCallback(clone, observer);\r\n observer.onSubscribe(callCallback);\r\n clone.enqueue(callCallback);\r\n }", "public interface Subscription {\n void cancel();\n\n void request(long j);\n}", "@Override\n\tpublic void onPSubscribe(String arg0, int arg1) {\n\t\t\n\t}", "public static void main(String[] args){\n Observable myObservable = Observable.create(new Observable.OnSubscribe(){\n\n @Override\n public void call(Object subscriber) {\n Subscriber mySubscriber = (Subscriber)subscriber;\n\n for(int i = 0 ; i < 10; i++){\n //if my subscriber was subscribed\n if(!mySubscriber.isUnsubscribed()){\n mySubscriber.onNext(\"Pushed value \" + i);\n }\n }\n\n if(!mySubscriber.isUnsubscribed()){\n mySubscriber.onCompleted();\n }\n\n }\n });\n\n //subscribe to your Observable\n myObservable.subscribe(new Action1<String>() {\n @Override\n public void call(String s) {\n System.out.println(s);\n }\n },\n new Action1<Throwable>() {\n @Override\n public void call(Throwable throwable) {\n System.out.println(\"Something went wrong the observable\");\n }\n },\n new Action0() {\n @Override\n public void call() {\n System.out.println(\"No more values will be pushed.\");\n }\n });\n\n }", "public interface ObservableOnSubcribe<T> {\n\n void subscribe(@NonNull ObservableEmitter<T> emitter) throws Exception;\n\n}", "@Test\n public void testDefer() throws InterruptedException {\n Observable<LocalTime> localTimeObservable =\n Observable.defer(\n () -> Observable\n .just(LocalTime.now()))\n .repeat(3);\n localTimeObservable.subscribe(System.out::println);\n Thread.sleep(3000);\n System.out.println(\"Next Subscriber\");\n localTimeObservable.subscribe(System.out::println);\n }", "void drainFused() {\n int n;\n int n2 = 1;\n Subscriber<T> subscriber = this.actual;\n SimpleQueueWithConsumerIndex<Object> simpleQueueWithConsumerIndex = this.queue;\n do {\n if (this.cancelled) {\n simpleQueueWithConsumerIndex.clear();\n return;\n }\n Throwable throwable = (Throwable)this.error.get();\n if (throwable != null) {\n simpleQueueWithConsumerIndex.clear();\n subscriber.onError(throwable);\n return;\n }\n n = simpleQueueWithConsumerIndex.producerIndex() == this.sourceCount ? 1 : 0;\n if (!simpleQueueWithConsumerIndex.isEmpty()) {\n subscriber.onNext(null);\n }\n if (n != 0) {\n subscriber.onComplete();\n return;\n }\n n2 = n = this.addAndGet(-n2);\n } while (n != 0);\n }", "@Test\n void canReceiveWithBackpressure() {\n // Arrange\n final int backpressure = 15;\n final String secondPartitionId = \"2\";\n final AtomicBoolean isActive = new AtomicBoolean(true);\n final EventHubProducerAsyncClient producer = toClose(builder.buildAsyncProducerClient());\n\n final Disposable producerEvents = toClose(getEvents(isActive)\n .flatMap(event -> producer.send(event, new SendOptions().setPartitionId(secondPartitionId)))\n .subscribe(\n sent -> {\n },\n error -> logger.error(\"Error sending event\", error),\n () -> logger.info(\"Event sent.\")));\n\n final ReceiveOptions options = new ReceiveOptions()\n .setTrackLastEnqueuedEventProperties(true);\n final EventHubConsumerAsyncClient consumer = toClose(builder\n .prefetchCount(2)\n .buildAsyncConsumerClient());\n\n // Act & Assert\n try {\n StepVerifier.create(consumer.receiveFromPartition(secondPartitionId, EventPosition.latest(), options), backpressure)\n .expectNextCount(backpressure)\n .thenAwait(Duration.ofSeconds(5))\n .thenCancel()\n .verify();\n } finally {\n isActive.set(false);\n }\n }", "public void streamSubscriberStart(ISubscriberStream stream);", "interface Step {\n void onStepResult(boolean isSuccess);\n\n\n @Subscribe(threadMode = ThreadMode.MAIN)\n void onStepTryEvent(TryToCompleteStep step);\n\n}", "public void subscribe(p019io.reactivex.Observer<? super T> r6) {\n /*\n r5 = this;\n L_0x0000:\n java.util.concurrent.atomic.AtomicReference<io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver<T>> r0 = r5.curr\n java.lang.Object r0 = r0.get()\n io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver r0 = (p019io.reactivex.internal.operators.observable.ObservableReplay.ReplayObserver) r0\n if (r0 != 0) goto L_0x0020\n io.reactivex.internal.operators.observable.ObservableReplay$BufferSupplier<T> r1 = r5.bufferFactory\n io.reactivex.internal.operators.observable.ObservableReplay$ReplayBuffer r1 = r1.call()\n io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver r2 = new io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver\n r2.<init>(r1)\n java.util.concurrent.atomic.AtomicReference<io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver<T>> r3 = r5.curr\n r4 = 0\n boolean r3 = r3.compareAndSet(r4, r2)\n if (r3 != 0) goto L_0x001f\n goto L_0x0000\n L_0x001f:\n r0 = r2\n L_0x0020:\n io.reactivex.internal.operators.observable.ObservableReplay$InnerDisposable r1 = new io.reactivex.internal.operators.observable.ObservableReplay$InnerDisposable\n r1.<init>(r0, r6)\n r6.onSubscribe(r1)\n r0.add(r1)\n boolean r2 = r1.isDisposed()\n if (r2 == 0) goto L_0x0035\n r0.remove(r1)\n return\n L_0x0035:\n io.reactivex.internal.operators.observable.ObservableReplay$ReplayBuffer<T> r2 = r0.buffer\n r2.replay(r1)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p019io.reactivex.internal.operators.observable.ObservableReplay.ReplaySource.subscribe(io.reactivex.Observer):void\");\n }", "public interface EagerReactive {\n\t/**\n\t * Add a value to an simple-react Async.Adapter (Queue / Topic /Signal) if present\n\t * Returns the Adapter wrapped in an Optional\n\t * \n\t * @see Pipes#register(Object, com.aol.simple.react.async.Adapter)\n\t * \n\t * @param key : identifier for registered Queue\n\t * @param value : value to add to Queue\n\t */\n\tdefault <K,V> Optional<Adapter<V>> enqueue(K key,V value){\n\t\tOptional<Adapter<V>> queue = Pipes.get(key);\n\t\tqueue.map(adapter -> adapter.offer(value));\n\t\n\t\treturn queue;\n\t\t\n\t\t\n\t}\n\t\n\t\n\t/**\n\t * \n\t * Generate a sequentially executing single-threaded a EagerFutureStream that executes all tasks directly without involving\n\t * a task executor between each stage (unless async operator invoked). A preconfigured EagerReact builder that will be supplied as\n\t * input to the function supplied. The user Function should create a EagerFutureStream with any\n\t * business logic stages predefined. This method will handle elastic scaling and pooling of Executor\n\t * services. User code should call a terminal op on the returned EagerFutureStream\n\t * \n\t * \n\t * @param react Function that generates a EagerFutureStream from a EagerReact builder\n\t * @return Generated EagerFutureStream\n\t */\n\tdefault <T> EagerFutureStream<T> sync(Function<EagerReact,EagerFutureStream<T>> react){\n\t\t EagerReact r =SequentialElasticPools.eagerReact.nextReactor().withAsync(false);\n\t\t return react.apply( r)\n\t\t\t\t \t.onFail(e->{ SequentialElasticPools.eagerReact.populate(r); throw e;})\n\t\t\t\t \t.peek(i->SequentialElasticPools.eagerReact.populate(r));\n\t\t \t\t\t\t \t\n\t}\n\t\n\t/**\n\t * Switch EagerFutureStream into execution mode suitable for IO (reuse ioReactors task executor)\n\t * \n\t * @param stream to convert to IO mode\n\t * @return EagerFutureStream in IO mode\n\t */\n\tdefault <T> EagerFutureStream<T> switchToIO(EagerFutureStream<T> stream){\n\t\tEagerReact react = EagerReactors.ioReact;\n\t\treturn stream.withTaskExecutor(react.getExecutor()).withRetrier(react.getRetrier());\n\t}\n\t/**\n\t * Switch EagerFutureStream into execution mode suitable for CPU bound execution (reuse cpuReactors task executor)\n\t * \n\t * @param stream to convert to CPU bound mode\n\t * @return EagerFutureStream in CPU bound mode\n\t */\n\tdefault <T> EagerFutureStream<T> switchToCPU(EagerFutureStream<T> stream){\n\t\tEagerReact react = EagerReactors.cpuReact;\n\t\treturn stream.withTaskExecutor(react.getExecutor()).withRetrier(react.getRetrier());\n\t}\n\t/**\n\t * @return Stream builder for IO Bound Streams\n\t */\n\tdefault OptimizedEagerReact ioStream(){\n\t\treturn new OptimizedEagerReact(EagerReactors.ioReact);\n\t}\n\t/**\n\t * @return Stream builder for CPU Bound Streams\n\t */\n\tdefault OptimizedEagerReact cpuStream(){\n\t\treturn new OptimizedEagerReact(EagerReactors.cpuReact);\n\t}\n\t/**\n\t * Generate a multi-threaded EagerFutureStream that executes all tasks via \n\t * a task executor between each stage (unless sync operator invoked). \n\t * A preconfigured EagerReact builder that will be supplied as\n\t * input to the function supplied. The user Function should create a EagerFutureStream with any\n\t * business logic stages predefined. This method will handle elastic scaling and pooling of Executor\n\t * services. User code should call a terminal op on the returned EagerFutureStream\n\t * \n\t * \n\t * @param react Function that generates a EagerFutureStream from a EagerReact builder\n\t * @return Generated EagerFutureStream\n\t */\n\tdefault <T> EagerFutureStream<T> async(Function<EagerReact,EagerFutureStream<T>> react){\n\t\t EagerReact r =ParallelElasticPools.eagerReact.nextReactor().withAsync(true);\n\t\treturn react.apply( r)\n\t\t\t\t\t.onFail(e->{ SequentialElasticPools.eagerReact.populate(r); throw e;})\n\t\t\t\t\t.peek(i->SequentialElasticPools.eagerReact.populate(r));\n\t\t \t\n\t}\n\t\n\t\n\t\n}", "@Override\n public void onSubscribe(String s, int i) {\n }", "@Override\n public StreamObserver<LongGreetRequest> longGreet(StreamObserver<LongGreetResponse> responseObserver) {\n\n //This will tell how i am going to handle the stream of client request\n StreamObserver<LongGreetRequest> requestStreamObserver = new StreamObserver<LongGreetRequest>() {\n\n String result = \"\";\n\n //This is to handle each stream of request msg\n @Override\n public void onNext(LongGreetRequest value) {\n //Going to concatenate each request value\n System.out.println(\"Received message from client as \"+value.getGreeting().getFirstName());\n result += \"Hello \" + value.getGreeting().getFirstName() + \"! \";\n }\n\n //This is to handle if client sends error\n @Override\n public void onError(Throwable t) {\n\n }\n\n //This is to handle when client is done, what should i do\n @Override\n public void onCompleted() {\n System.out.println(\"Sending final response as client is done\");\n //as client done, setting the result to response observer object\n responseObserver.onNext(LongGreetResponse.newBuilder().setResult(result).build());\n //complete the response\n responseObserver.onCompleted();\n }\n };\n\n return requestStreamObserver;\n }", "public interface Subscriber<T> {\n void onStateChange(T state);\n}", "public interface RequestCallback<T> {\n\n void onNext(T t);\n void onError(Throwable t, String str);\n void onComplete(String str);\n}", "public void onResultConsumed() {\n }", "private static void createColdObservable() {\n var observable = Observable.just(1, 2, 3, 4, 5);\n\n observable.subscribe(item -> LOG.info(\"Observer 1: {}\", item));\n\n pause(1000);\n\n observable.subscribe(item -> LOG.info(\"Observer 2: {}\", item));\n }", "@Override\n public void onDrainComplete()\n {\n }", "protected void doSomeWork() {\n\n //PublishSubject就像鼠标事件,不管有没有订阅者,他都按照他的设定发事件,什么时候有订阅者,那么订阅者就从那个时候获取事件。\n //与之相反的是ReplaySubject,不管订阅者什么时候订阅,都能获取完整事件。\n PublishSubject<Integer> source = PublishSubject.create();\n source.onNext(-1);\n source.onNext(0);\n\n source.subscribe(this.<Integer>getObserver(\"First\")); // it will get 1, 2, 3, 4 and onComplete\n\n source.onNext(1);\n source.onNext(2);\n source.onNext(3);\n //source.onComplete();//如果在这里onComplete了,那么后面的订阅者只能收到onComplete事件\n\n /*\n * it will emit 4 and onComplete for second observer also.\n */\n source.subscribe(this.<Integer>getObserver(\"Second\"));\n\n source.onNext(4);\n source.onComplete();\n\n }", "@Override\n public void onCompleted() {\n builder.setMessage(\"All request data received completely!\");\n responseObserver.onNext(builder.build());\n responseObserver.onCompleted();\n }", "public interface ObserverListener<T> {\n\n void onSubscribe(Disposable disposable);\n\n void onNext(T result);\n\n void onError(String msg);\n}", "public static void test016()\r\n {\r\n System.out.println(\"RxJavaTest04::test016\");\r\n ExecutorService poolA = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-A-%d\"));\r\n Scheduler schedulerA = Schedulers.from(poolA);\r\n RxGroceries rxGroceries = new RxGroceries();\r\n\r\n Maybe<BigDecimal> totalPrice = Observable\r\n .fromIterable(Arrays.asList(\"bread\", \"butter\", \"milk\", \"tomato\", \"cheese\"))\r\n .subscribeOn(schedulerA)\r\n .flatMap(prod -> rxGroceries\r\n .purchase(prod, 1)\r\n .subscribeOn(schedulerA)\r\n )\r\n .reduce(BigDecimal::add);\r\n totalPrice\r\n .subscribe(\r\n x -> log(\"Got \" + x),\r\n Throwable::printStackTrace,\r\n () -> log(\"Completed\")\r\n );\r\n myWait(2000); // We have to wait before shutting down the pool,\r\n // otherwise it will throw exception \r\n // [java] io.reactivex.exceptions.UndeliverableException:\r\n // java.util.concurrent.RejectedExecutionException:\r\n // Task java.util.concurrent.FutureTask@38d8f9d0 rejected\r\n // from java.util.concurrent.ThreadPoolExecutor@6a724a6c\r\n // [Shutting down, pool size = 1, active threads = 1, queued\r\n // tasks = 0, completed tasks = 0]\r\n poolA.shutdown();\r\n }", "public interface Stream<T> extends Lifecycle {\n\n PendingRequest<T> next(int requestId, T request);\n\n int getPendingRequestCount();\n\n ClientResponseObserver<T, RpcResult> newObserver();\n\n\n final class PendingRequest<T> {\n\n private final T request;\n\n private final int requestId;\n\n private final SettableFuture<com.baichen.jraft.transport.RpcResult> future;\n\n private RepeatableTimer.TimerTask timeout;\n\n private long startTime;\n\n public PendingRequest(T request, int requestId, SettableFuture<com.baichen.jraft.transport.RpcResult> future) {\n this.request = request;\n this.requestId = requestId;\n this.future = future;\n }\n\n public long getStartTime() {\n return startTime;\n }\n\n public void setStartTime(long startTime) {\n this.startTime = startTime;\n }\n\n public void setTimeout(RepeatableTimer.TimerTask timeout) {\n this.timeout = timeout;\n }\n\n public RepeatableTimer.TimerTask getTimeout() {\n return timeout;\n }\n\n public T getRequest() {\n return request;\n }\n\n public int getRequestId() {\n return requestId;\n }\n\n public SettableFuture<com.baichen.jraft.transport.RpcResult> getFuture() {\n return future;\n }\n }\n}", "private static void exSwitchMapTwo() {\n\n Observable.interval(5,TimeUnit.SECONDS)\n .switchMap(call -> Observable.just(getResponse()).doOnDispose(() -> System.out.println(\"Disposed\")))\n .subscribe(System.out::println);\n\n //An Observable which performs network call.\n sleep(40000);\n\n\n /* OUTPUT :\n 6\n 10\n 13\n 17\n 26\n 32\n 35\n 42\n\n */\n }", "public interface HttpDataListner<T> {\n\n void onNext(T t);\n\n void onError(Throwable t);\n\n void onCompleted();\n}", "@Override\n public void subscribe(ObservableEmitter<String> subscriber) throws Exception {\n if (subscriber.isDisposed()) {\n return;\n }\n processInput(subscriber);\n\n if (!subscriber.isDisposed()) {\n subscriber.onComplete();\n }\n }", "Spliterator<Event> subscribe(String origin, String type, Instant since, Consumer<Event> callback);", "public static void main(String[] args) {\n System.out.println(\"Example of Observable.just()****\");\n Observable<String> justObs = Observable.just(\"one\", \"two\", \"three\", \"four\");\n justObs.subscribe(v -> System.out.println(\"Received:\" + v), e -> System.out.println(e), () -> System.out.println(\"Completed\"));\n\n System.out.println(\"\\nExample of Observable.create()****\");\n Observable<String> createdObs = Observable.create(o -> {\n o.onNext(\"Hello\");\n o.onCompleted();\n });\n createdObs.subscribe(System.out::println, e -> System.out.println(e), () -> System.out.println(\"Completed\"));\n\n System.out.println(\"\\nConverting FutureTask into Observable****\");\n FutureTask<Integer> task = new FutureTask<>(() -> {\n Thread.sleep(3000);\n return 28;\n });\n new Thread(task).start();\n\n Observable<Integer> futureObs = Observable.from(task);\n Subscription subscription = futureObs.subscribe(v -> System.out.println(\"Received :\" + v), e -> System.out.println(\"Error :\" + e),\n () -> System.out.println(\"Completed\"));\n\n System.out.println(\"\\nConverting Integer array into Observable****\");\n Integer[] in = new Integer[] { 1, 2, 3 };\n\n Observable<Integer> integerObs = Observable.from(in);\n Subscription arraySub = integerObs.subscribe(v -> System.out.println(\"Received :\" + v), e -> System.out.println(\"Error :\" + e),\n () -> System.out.println(\"Completed\"));\n }", "@Override\n public void onNext(Void aVoid) {\n }", "@Test\n public void simplifiedFlowableDemo() {\n StringBuilder sb = new StringBuilder();\n\n Flowable<String> flowable = Flowable.create(new FlowableOnSubscribe<String>() {\n @Override\n public void subscribe(FlowableEmitter<String> flowableEmitter) throws Exception {\n flowableEmitter.onNext(\"a\");\n flowableEmitter.onNext(\"b\");\n flowableEmitter.onComplete();\n log.info(\"Result string is: {}\", sb.toString());\n }\n }, BackpressureStrategy.BUFFER);\n\n flowable.subscribe(new Consumer<String>() {\n @Override\n public void accept(String s) throws Exception {\n sb.append(s);\n log.info(\"append {}, new the sb is {}\", s, sb.toString());\n }\n });\n }", "protected final void consumePubSubMessage(Object listener, Pipe<MessageSubscription> p) {\n\t\t\t\t\n\t\t//TODO: Pipe.markHead(p); change all calls to low level API then add support for mark.\t\t\n\t\t\n\t\t\n\t\twhile (Pipe.hasContentToRead(p)) {\n\t\t\t\n\t\t\tPipe.markTail(p);\n\t\t\t\n int msgIdx = Pipe.takeMsgIdx(p); \t\t \n \n switch (msgIdx) {\n case MessageSubscription.MSG_PUBLISH_103:\n if (listener instanceof PubSubListener) {\n \t \t\n \tint meta = Pipe.takeRingByteLen(p);\n \tint len = Pipe.takeRingByteMetaData(p);\n \t \t\n \t\n \tCharSequence topic = workspace.setToField(p, meta, len);\n\t \n\t assert(null!=topic) : \"Callers must be free to write topic.equals(x) with no fear that topic is null.\";\n\t \n\t PayloadReader reader = (PayloadReader)Pipe.inputStream(p);\n\t DataInputBlobReader.openLowLevelAPIField(reader);\n\t \n\t \n\t boolean isDone = ((PubSubListener)listener).message(topic,reader);\n\t\t \tif (!isDone) {\n\t\t \t\t Pipe.resetTail(p);\n\t\t \t\t return;//continue later and repeat this same value.\n\t\t \t}\n\t \n }\n break;\n case MessageSubscription.MSG_STATECHANGED_71:\n \tif (listener instanceof StateChangeListener) {\n \t\t\n \t\tint oldOrdinal = Pipe.takeInt(p);\n \t\tint newOrdinal = Pipe.takeInt(p); \n \t\t\n \t\tassert(oldOrdinal != newOrdinal) : \"Stage change must actualt change the state!\";\n \t\t\n \t\tif (isIncluded(newOrdinal, includedToStates) && isIncluded(oldOrdinal, includedFromStates) &&\n \t\t\tisNotExcluded(newOrdinal, excludedToStates) && isNotExcluded(oldOrdinal, excludedFromStates) ) {\t\t\t \t\t\t\n \t\t\t\n \t\t\tboolean isDone = ((StateChangeListener)listener).stateChange(states[oldOrdinal], states[newOrdinal]);\n\t \t\t \tif (!isDone) {\n\t\t\t \t\t Pipe.resetTail(p);\n\t\t\t \t\t return;//continue later and repeat this same value.\n\t\t\t \t}\n \t\t\t\n \t\t}\n\t\t\t\t\t\t\n \t} else {\n \t\t//Reactive listener can store the state here\n \t\t\n \t\t//TODO: important feature, in the future we can keep the state and add new filters like\n \t\t// only accept digital reads when we are in state X\n \t\t\n \t}\n break;\n case -1:\n \n requestShutdown();\n Pipe.confirmLowLevelRead(p, Pipe.EOF_SIZE);\n Pipe.releaseReadLock(p);\n return;\n \n default:\n throw new UnsupportedOperationException(\"Unknown id: \"+msgIdx);\n \n }\n Pipe.confirmLowLevelRead(p, Pipe.sizeOf(p,msgIdx));\n Pipe.releaseReadLock(p);\n }\n }", "@Override\n protected void subscribeActual(Subscriber<? super T> object) {\n MaybeSource<? extends T>[] arrmaybeSource = this.sources;\n int n = arrmaybeSource.length;\n SimpleQueue simpleQueue = n <= MaybeMergeArray.bufferSize() ? new MpscFillOnceSimpleQueue(n) : new ClqSimpleQueue();\n simpleQueue = new MergeMaybeObserver(object, n, (SimpleQueueWithConsumerIndex<Object>)simpleQueue);\n object.onSubscribe((Subscription)((Object)simpleQueue));\n object = ((MergeMaybeObserver)simpleQueue).error;\n int n2 = arrmaybeSource.length;\n n = 0;\n do {\n MaybeSource maybeSource;\n block4: {\n block3: {\n if (n >= n2) break block3;\n maybeSource = arrmaybeSource[n];\n if (!((MergeMaybeObserver)simpleQueue).isCancelled() && ((AtomicReference)object).get() == null) break block4;\n }\n return;\n }\n maybeSource.subscribe(simpleQueue);\n ++n;\n } while (true);\n }", "@Subscribe\n public void onEvent(Object event) {\n }", "@Subscribe\n public void onEvent(Object event) {\n }", "private void subscribeHandler(MqttSubscribeMessage subscribe) {\n\n final int messageId = subscribe.messageId();\n LOG.info(\"SUBSCRIBE [{}] from MQTT client {}\", messageId, this.mqttEndpoint.clientIdentifier());\n\n // sending AMQP_SUBSCRIBE\n\n List<AmqpTopicSubscription> topicSubscriptions =\n subscribe.topicSubscriptions().stream().map(topicSubscription -> {\n return new AmqpTopicSubscription(topicSubscription.topicName(), topicSubscription.qualityOfService());\n }).collect(Collectors.toList());\n\n AmqpSubscribeMessage amqpSubscribeMessage =\n new AmqpSubscribeMessage(this.mqttEndpoint.clientIdentifier(),\n topicSubscriptions);\n\n this.ssEndpoint.sendSubscribe(amqpSubscribeMessage, done -> {\n\n if (done.succeeded()) {\n\n ProtonDelivery delivery = done.result();\n\n List<MqttQoS> grantedQoSLevels = null;\n if (delivery.getRemoteState() == Accepted.getInstance()) {\n\n // QoS levels requested are granted\n grantedQoSLevels = amqpSubscribeMessage.topicSubscriptions().stream().map(topicSubscription -> {\n return topicSubscription.qos();\n }).collect(Collectors.toList());\n\n // add accepted topic subscriptions to the local collection\n amqpSubscribeMessage.topicSubscriptions().stream().forEach(amqpTopicSubscription -> {\n this.grantedQoSLevels.put(amqpTopicSubscription.topic(), amqpTopicSubscription.qos());\n });\n\n } else {\n\n // failure for all QoS levels requested\n grantedQoSLevels = new ArrayList<>(Collections.nCopies(amqpSubscribeMessage.topicSubscriptions().size(), MqttQoS.FAILURE));\n }\n\n this.mqttEndpoint.subscribeAcknowledge(messageId, grantedQoSLevels);\n\n LOG.info(\"SUBACK [{}] to MQTT client {}\", messageId, this.mqttEndpoint.clientIdentifier());\n }\n });\n }", "public interface Subscribe<R> {\n\n\tvoid result(R result);\n}", "@Override\n public void onNext(T t) {\n if (t == null) {\n this.onError(new NullPointerException(\"onNext called with null. Null values are generally not allowed in 2.x operators and sources.\"));\n return;\n } else {\n if (this.isDisposed()) return;\n {\n this.observer.onNext(t);\n return;\n }\n }\n }", "public void emitAndComplete(rx.Subscriber<T> r5, rx.Subscriber<?> r6) {\n /*\n r4 = this;\n monitor-enter(r4);\n r3 = r4.emitting;\t Catch:{ all -> 0x0021 }\n if (r3 == 0) goto L_0x000a;\n L_0x0005:\n r3 = 1;\n r4.terminate = r3;\t Catch:{ all -> 0x0021 }\n monitor-exit(r4);\t Catch:{ all -> 0x0021 }\n L_0x0009:\n return;\n L_0x000a:\n r2 = r4.value;\t Catch:{ all -> 0x0021 }\n r1 = r4.hasValue;\t Catch:{ all -> 0x0021 }\n r3 = 0;\n r4.value = r3;\t Catch:{ all -> 0x0021 }\n r3 = 0;\n r4.hasValue = r3;\t Catch:{ all -> 0x0021 }\n r3 = 1;\n r4.emitting = r3;\t Catch:{ all -> 0x0021 }\n monitor-exit(r4);\t Catch:{ all -> 0x0021 }\n if (r1 == 0) goto L_0x001d;\n L_0x001a:\n r5.onNext(r2);\t Catch:{ Throwable -> 0x0024 }\n L_0x001d:\n r5.onCompleted();\n goto L_0x0009;\n L_0x0021:\n r3 = move-exception;\n monitor-exit(r4);\t Catch:{ all -> 0x0021 }\n throw r3;\n L_0x0024:\n r0 = move-exception;\n rx.exceptions.Exceptions.throwOrReport(r0, r6, r2);\n goto L_0x0009;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rx.internal.operators.OperatorDebounceWithTime.DebounceState.emitAndComplete(rx.Subscriber, rx.Subscriber):void\");\n }", "public static void buffer() {\n\n List<String> data = Utils.getData();\n\n int numberOfBuffers = 11;\n\n CountDownLatch latch = new CountDownLatch(numberOfBuffers);\n\n\n Observable.fromIterable(data).buffer(3).subscribe(new MyObserver<>(latch));\n\n Observable.fromIterable(data).buffer(2, 3).subscribe(new MyObserver<>(latch));\n\n Observable.fromIterable(data).buffer(2, 3, ArrayList::new).subscribe(new MyObserver<>(latch));\n\n Observable.fromIterable(data).buffer(2, HashSet::new).subscribe(new MyObserver<>(latch));\n\n /*\n Opening and closing windows defined\n */\n Observable.fromIterable(data).buffer((observer) -> {\n System.out.println(\"opening\");\n // Starts buffer collection window\n // For every onNext a buffer window is created.\n observer.onNext(\"opening-1\");\n observer.onNext(\"opening-2\");\n }, (value) -> {\n System.out.println(\"closing, value = \" + value);\n // Closes buffer collection window\n // Gets invoked for each onNext in opening indicator\n return Observable.just(value).delay(100L, TimeUnit.MICROSECONDS);\n }, HashSet::new).subscribe(new MyObserver<>(latch));\n\n /*\n Buffer with boundary observable\n */\n Observable.fromIterable(data).buffer((Observer<? super Integer> observer) -> {\n System.out.println(\"onNext - 1\");\n observer.onNext(1);\n observer.onNext(2);\n }).subscribe(new MyObserver<>(latch));\n\n /*\n 1. Buffer with boundary observable by providing some other in built observable\n 2. Create a buffer of 100 Microseconds\n */\n Observable.fromIterable(data)\n .buffer(Observable.interval(100L, TimeUnit.MICROSECONDS))\n .subscribe(new MyObserver<>(latch));\n\n Observable.fromIterable(data)\n .buffer(Observable.interval(100L, TimeUnit.MICROSECONDS), 4)\n .subscribe(new MyObserver<>(latch));\n\n Observable.fromIterable(data)\n .buffer(Observable.interval(100L, TimeUnit.MICROSECONDS), () -> new HashSet<>())\n .subscribe(new MyObserver<>(latch));\n\n\n /*\n Boundary supplier is being passed from callable.\n */\n Observable.fromIterable(data)\n .buffer(() -> Observable.interval(100L, TimeUnit.MICROSECONDS))\n .subscribe(new MyObserver<>(latch));\n\n\n Observable.fromIterable(data)\n .buffer(() -> Observable.interval(100L, TimeUnit.MICROSECONDS), HashSet::new)\n .subscribe(new MyObserver<>(latch));\n\n try {\n latch.await();\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n }", "public interface ReactiveRateLimiter {\n\n Observable<Boolean> overLimitReactive(String key);\n\n Observable<Boolean> overLimitReactive(String key, int weight);\n\n Observable<Boolean> resetLimitReactive(String key);\n}", "@Test\n public void testEventSourcingFromAsynchronousSubscribable() throws Exception {\n FunctionalReactives<Void> fr =\n FunctionalReactives.createAsync( //assume source happens in a different thread\n aSubscribableWillAsyncFireIntegerOneToFive() //a subscribable implementation\n )\n .filter(new Predicate<Integer>() {\n @Override\n public boolean apply(Integer input) {\n return input % 2 == 0; //filter out odd integers\n }\n })\n .forEach(println()); //print out reaction results each in a line\n\n fr.start(); //will trigger Subscribable.doSubscribe()\n fr.shutdown(); //will trigger Subscribable.unsubscribe() which in above case will await for all the integers scheduled\n\n //Reaction walk through:\n // Original source: 1 -> 2 -> 3 -> 4 -> 5 -> |\n // Filter events: ---> 2 ------> 4 ------> |\n // Print out results: -> \"2\\n\" ---> \"4\\n\" ---> |\n\n }", "void onNext(T item);", "private static void createHotAndConnectableObservable() {\n var observable = Observable.just(1, 2, 3, 4, 5).publish();\n\n observable.subscribe(item -> LOG.info(\"Connectable Observer 1: {}\", item));\n observable.subscribe(item -> LOG.info(\"Connectable Observer 2: {}\", item));\n\n pause(1000);\n // calling connect starts emitting immediately - any order\n observable.connect();\n\n // if we subscribe now it'll now be emitted - hot observable\n observable.subscribe(item -> LOG.info(\"Connectable Observer 3: {}\", item));\n }", "private Subscribable<Integer> aSubscribableWillAsyncFireIntegerOneToFive() {\n return new Subscribable<Integer>() {\n private final ExecutorService executor = Executors.newSingleThreadExecutor();\n private Future<?> future;\n\n @Override\n public void doSubscribe(final Schedulable<? super Integer> source) {\n future = executor.submit(new Runnable() {\n @Override\n public void run() { //produce integers in a different thread\n for (int i = 1; i < 6; i++) {\n source.schedule(i); //schedule integer 1 to 5 to the callback source\n }\n }\n });\n }\n\n @Override\n public void unsubscribe() { //unsubscribe from the source\n try {\n assert future != null;\n future.get(5, TimeUnit.SECONDS); //wait for all the scheduled values fired\n } catch (Exception e) {\n Throwables.propagate(e); //just hide the checked exception\n }\n }\n };\n }", "@Override\n public void onResponse(Call call, Response response) throws IOException {\n emitter.onNext(response.body().string());\n }", "public interface RxCallback<T, E> {\n T onSubThreadExecute(E justParam);\n\n void onMainThreadExecute(T t);\n}", "public static void test019()\r\n {\r\n System.out.println(\"RxJavaTest04::test019\");\r\n\r\n ExecutorService poolA = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-A-%d\"));\r\n Scheduler schedulerA = Schedulers.from(poolA);\r\n ExecutorService poolB = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-B-%d\"));\r\n Scheduler schedulerB = Schedulers.from(poolB);\r\n ExecutorService poolC = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-C-%d\"));\r\n Scheduler schedulerC = Schedulers.from(poolC);\r\n\r\n log(\"Starting\");\r\n Observable<String> obs = Observable.create(subscriber -> {\r\n log(\"Subscribed\");\r\n subscriber.onNext(\"A\");\r\n subscriber.onNext(\"B\");\r\n subscriber.onNext(\"C\");\r\n subscriber.onNext(\"D\");\r\n subscriber.onComplete();\r\n });\r\n log(\"Created\");\r\n obs\r\n .subscribeOn(schedulerA)\r\n .flatMap(record -> myStore(record).subscribeOn(schedulerB))\r\n .observeOn(schedulerC)\r\n .subscribe(\r\n x -> log(\"Got: \" + x),\r\n Throwable::printStackTrace,\r\n () -> log(\"Completed\")\r\n );\r\n log(\"Exiting\");\r\n \r\n myWait(5000);\r\n poolA.shutdown();\r\n poolB.shutdown();\r\n poolC.shutdown();\r\n }", "@Override protected void subscribeActual(Subscriber s) {\n source.subscribe(MaybeFuseable.get().wrap(s, contextScoper, assembled));\n }", "@Override\n public void onNext(ExecutionResult executionResult) {\n // as each deferred result arrives, send it to where it needs to go\n //\n try {\n TimeUnit.SECONDS.sleep(3);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n sendResult(session, executionResult);\n subscription.request(1);\n }", "public static void test015()\r\n {\r\n System.out.println(\"RxJavaTest04::test015\");\r\n ExecutorService poolA = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-A-%d\"));\r\n Scheduler schedulerA = Schedulers.from(poolA);\r\n RxGroceries rxGroceries = new RxGroceries();\r\n\r\n Maybe<BigDecimal> totalPrice = Observable\r\n .fromIterable(Arrays.asList(\"bread\", \"butter\", \"milk\", \"tomato\", \"cheese\"))\r\n .subscribeOn(schedulerA)\r\n .flatMap(prod -> rxGroceries.purchase(prod, 1))\r\n .reduce(BigDecimal::add);\r\n totalPrice\r\n .subscribe(System.out::println);\r\n poolA.shutdown();\r\n }", "public interface ObserverOnNextListener<T> {\n void onNext(T t, Throwable throwable);\n}", "@Override\n protected synchronized void subscribeActual(Observer<? super Response<T>> observer) {\n Call<T> call = originalCall.clone();\n\n try {\n for (Annotation annotation : annotations) {\n if (annotation instanceof Cache) {\n time = ((Cache) annotation).time();\n bindParams = ((Cache) annotation).bindParams();\n break;\n }\n }\n MethodFactoryAdapter adapter = new MethodFactoryAdapter(call.request(), bindParams);\n MethodFactory factory = adapter.get();\n HashMap<String, String> parseParameters = factory.parseParameters();\n String url = call.request().url().toString();\n boolean isFirst = true;\n StringBuffer buffer = new StringBuffer();\n for (HashMap.Entry<String, String> entry : parseParameters.entrySet()) {\n String key = entry.getKey();\n String value = entry.getValue();\n if (isFirst) {\n buffer.append(\"?\").append(key).append(\"=\").append(value);\n isFirst = false;\n } else {\n buffer.append(\"&\").append(key).append(\"=\").append(value);\n }\n }\n String cacheUrl = url + buffer.toString();\n long nowTime = System.currentTimeMillis();\n fileName = cacheUrl + \"&\" + nowTime;\n\n cache = DiskLruCacheHelper.createCache(APP.app, URL_CACHE);\n String responseCacheData = DiskLruCacheHelper.readCacheToString(cache, cacheUrl);\n int indexOfTime = responseCacheData.indexOf(\"\\n\");\n String[] times = responseCacheData.substring(0, indexOfTime).split(\":\");\n responseCacheData = responseCacheData.substring(indexOfTime + 1);\n long diskCacheTime = Long.parseLong(times[1]);\n if (!TextUtils.isEmpty(responseCacheData) && diskCacheTime != -1 && nowTime - time <= diskCacheTime) {\n E e = new Gson().fromJson(responseCacheData, E.class);\n Response<T> cacheResponse = (Response<T>) Response.success(e);\n observer.onNext(cacheResponse);\n } else {\n cache.delete();\n cache = null;\n\n }\n } catch (Exception e) {\n if (cache != null && !cache.isClosed()) {\n try {\n cache.delete();\n } catch (IOException e1) {\n\n }\n call = null;\n }\n }\n\n\n CallDisposable disposable = new CallDisposable(call);\n observer.onSubscribe(disposable);\n\n boolean terminated = false;\n try {\n Response<T> response = call.execute();\n E e = (E) response.body();\n String responseData = new Gson().toJson(e);\n if (cache == null) {\n cache = DiskLruCacheHelper.createCache(APP.app, URL_CACHE);\n }\n DiskLruCacheHelper.writeStringToCache(cache, responseData, fileName);\n if (!disposable.isDisposed()) {\n observer.onNext(response);\n }\n if (!disposable.isDisposed()) {\n terminated = true;\n observer.onComplete();\n }\n } catch (Throwable t) {\n Exceptions.throwIfFatal(t);\n if (terminated) {\n RxJavaPlugins.onError(t);\n } else if (!disposable.isDisposed()) {\n try {\n observer.onError(t);\n } catch (Throwable inner) {\n Exceptions.throwIfFatal(inner);\n RxJavaPlugins.onError(new CompositeException(t, inner));\n }\n }\n }\n }", "@Override\n public void onNext(final SubscribeRequest value) {\n\n Map<FieldDescriptor, Object> notification = value.getAllFields();\n try {\n Thread.sleep(1000L);\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n Update contents = FileResponse.from(\"subscribeResponse.gnmi\");\n Notification serverNotification = Notification.newBuilder().addUpdate(contents).build();\n final SubscribeResponse.Builder builder = SubscribeResponse.newBuilder()\n .mergeUpdate(serverNotification);\n responseObserver.onNext(builder.build());\n }", "public interface FilterResultsCallback {\n void onPublish(int filterResults);\n}", "private void subscribe() {\r\n\r\n OnUpdatePlayerSubscription subscription = OnUpdatePlayerSubscription.builder().build();\r\n subscriptionWatcher = awsAppSyncClient.subscribe(subscription);\r\n subscriptionWatcher.execute(subCallback);\r\n }", "@Test\n public void async_2() throws InterruptedException {\n Func1<Integer, Observable<String>> wsKald = param -> Observable.<String>create(s -> {\n s.onStart();\n s.onNext(\"called with \" + param);\n s.onCompleted();\n }).subscribeOn(Schedulers.io());\n\n Func1<Long, Observable<Integer>> multi = param -> Observable.<Integer>create(s -> {\n s.onStart();\n IntStream.range(1, param.intValue()).forEach(s::onNext);\n s.onCompleted();\n }).subscribeOn(Schedulers.io());\n\n // asynkron tæller, hvert ½ sekund\n Observable<Long> ticker = Observable.interval(500, TimeUnit.MILLISECONDS);\n\n ticker.take(10)\n .flatMap(multi)\n .flatMap(wsKald)\n .toBlocking()\n .subscribe(log::info);\n }" ]
[ "0.67832583", "0.6767003", "0.6640576", "0.6555414", "0.6538211", "0.65023994", "0.6502034", "0.64253294", "0.6285758", "0.62608165", "0.6251904", "0.6251904", "0.6251904", "0.6251904", "0.6251904", "0.6251904", "0.624007", "0.62125474", "0.6195713", "0.6148753", "0.6092942", "0.5957406", "0.5954557", "0.5947476", "0.59398586", "0.59196424", "0.5884201", "0.58783877", "0.5868158", "0.5862202", "0.5825549", "0.58224815", "0.580691", "0.5777715", "0.57253176", "0.57071805", "0.57020354", "0.56806797", "0.5676614", "0.5667896", "0.56654644", "0.56640977", "0.56401205", "0.5624036", "0.56218475", "0.55557716", "0.5554067", "0.5553973", "0.5545606", "0.5528724", "0.55241466", "0.5500186", "0.54913986", "0.549073", "0.5479659", "0.545844", "0.54268634", "0.54165137", "0.5416457", "0.54037493", "0.53935045", "0.5387517", "0.53858817", "0.5378588", "0.5373812", "0.53737515", "0.5359503", "0.5343822", "0.53299093", "0.530259", "0.52950776", "0.5281528", "0.5280557", "0.5266846", "0.5263674", "0.52610195", "0.52406055", "0.52244765", "0.52244765", "0.52004665", "0.51982033", "0.5194183", "0.5193437", "0.519167", "0.5184516", "0.51839405", "0.5172239", "0.51601714", "0.5153596", "0.5147962", "0.5125238", "0.5124268", "0.5123429", "0.51112753", "0.5103793", "0.509377", "0.50896806", "0.50858545", "0.5085804", "0.5083708", "0.50819415" ]
0.0
-1
OnSubscribe > request(backpressure) > onNext(1), onNext(2), onNext(3), OnNext(4) > cancel() > stackTraceException
@Test public void fluxSubscriberNumbersError(){ Flux<Integer> listaDeNumeros = Flux.range(1, 5) //pubisher publicando, quando for 4 lança exception .log() .map(integer -> { if(integer == 4){ throw new IndexOutOfBoundsException("Index Error"); } return integer; }); listaDeNumeros.subscribe(integer -> log.info("Numero {}", integer), Throwable::printStackTrace, () -> log.info("Done"), subscription -> subscription.request(3)); // backpressure 3, antes da exception ser lançada //Runnable - void run() Consumer - void accept(T t) log.info("-------------------------------------------------"); StepVerifier.create(listaDeNumeros) .expectNext(1, 2, 3) .expectError(IndexOutOfBoundsException.class) .verify(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable p1) {\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void onSubscribe(Disposable arg0) {\n\t\t\t\t\n\t\t\t}", "private static void backPressureChallenge() {\n\t\tObservable.range(1, 1000000)\n\t\t//below map will run in sequential\n\t\t//since sequential it has to complete whole task then only it can allow consumer to start\n\t\t\t.map(item -> {\n\t\t\t\tSystem.out.println(\"Produced item \"+item +\" using thread \"+Thread.currentThread().getName());\n\t\t\t\treturn item;\n\t\t\t})\n\t\t\t.observeOn(Schedulers.io())\n\t\t\t//.subscribeOn(Schedulers.io())//with this whole pipelein runs in seprate thread paralleley\n\t\t\t//below will run in concurrent\n\t\t\t.subscribe(item ->{\n\t\t\t\t//mimcing slowness\n\t\t\t\tThreadUtil.sleep(300);\n\t\t\t\tSystem.out.println(\"Consumed item \"+item +\" using thread \"+Thread.currentThread().getName());\n\t\t\t})\n\t\t\t\n\t\t\t;\n\t\t\n\t\t//since running in async we need to sleep\n\t\tThreadUtil.sleep(10000000);\n\t}", "@Override\n public void subscribe(ObservableEmitter<Integer> e) throws Exception {\n\n e.onNext(1);\n SystemClock.sleep(1000);\n e.onNext(2);\n SystemClock.sleep(1000);\n e.onNext(3);\n SystemClock.sleep(1000);\n e.onNext(4);\n\n //Once the Observable has emitted all items in the sequence, call onComplete//\n e.onComplete();\n //e.onError(new Throwable(\"Some Error!!\"));\n }", "@Override\n public void onSubscribe(Disposable d) {\n }", "private void test1() {\n Observable observable = Observable.create(new ObservableOnSubscribe<QuoteBean>() {\n @Override\n public void subscribe(ObservableEmitter<QuoteBean> e) throws Exception {\n e.onNext(Request.stringRequest(url, com.android.volley.Request.Method.GET, HomeActivity.class.getSimpleName()));\n }\n }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());\n\n Observer<QuoteBean> observer = new Observer<QuoteBean>() {\n @Override\n public void onSubscribe(Disposable d) {\n Log.d(TAG, \"test1 onSubscribe\");\n }\n\n @Override\n public void onNext(QuoteBean s) {\n Log.d(TAG, \"onNext:\" + s.toString());\n }\n\n @Override\n public void onError(Throwable e) {\n Log.d(TAG, \"onError\");\n }\n\n @Override\n public void onComplete() {\n Log.d(TAG, \"onComplete\");\n }\n };\n observable.subscribe(observer);\n }", "private static void backPressureFix() {\n\t\tFlowable.range(1, 1000000)\n\t\t//below map will run in sequential\n\t\t//since sequential it has to complete whole task then only it can allow consumer to start\n\t\t\t.map(item -> {\n\t\t\t\tSystem.out.println(\"Produced item \"+item +\" using thread \"+Thread.currentThread().getName());\n\t\t\t\treturn item;\n\t\t\t})\n\t\t\t.observeOn(Schedulers.io())\n\t\t\t//.subscribeOn(Schedulers.io())//with this whole pipelein runs in seprate thread paralleley\n\t\t\t//below will run in concurrent\n\t\t\t.subscribe(item ->{\n\t\t\t\t//mimcing slowness\n\t\t\t\tThreadUtil.sleep(300);\n\t\t\t\tSystem.out.println(\"Consumed item \"+item +\" using thread \"+Thread.currentThread().getName());\n\t\t\t})\n\t\t\t\n\t\t\t;\n\t\t\n\t\t//since running in async we need to sleep\n\t\tThreadUtil.sleep(10000000);\n\t\t\t\n\t}", "@Override\n public void onSubscribe(Subscription s) {\n s.request(10);\n\n // Should not produce anymore data\n s.request(10);\n }", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "void invokeOnSubscribe0() {\n try {\n subscriber.onSubscribe(this);\n } catch (Throwable t) {\n processor.unsubscribe(this, t);\n throwIfFatal(t);\n logger.warn(\"Subscriber.onSubscribe() should not raise an exception. subscriber: {}\",\n subscriber, t);\n }\n }", "public void a() {\n if (getAndIncrement() == 0) {\n Subscriber<? super Flowable<T>> subscriber = this.a;\n MpscLinkedQueue<Object> mpscLinkedQueue = this.f;\n AtomicThrowable atomicThrowable = this.g;\n long j2 = this.l;\n int i2 = 1;\n while (this.e.get() != 0) {\n UnicastProcessor<T> unicastProcessor = this.k;\n boolean z = this.j;\n if (!z || atomicThrowable.get() == null) {\n Object poll = mpscLinkedQueue.poll();\n boolean z2 = poll == null;\n if (z && z2) {\n Throwable terminate = atomicThrowable.terminate();\n if (terminate == null) {\n if (unicastProcessor != 0) {\n this.k = null;\n unicastProcessor.onComplete();\n }\n subscriber.onComplete();\n return;\n }\n if (unicastProcessor != 0) {\n this.k = null;\n unicastProcessor.onError(terminate);\n }\n subscriber.onError(terminate);\n return;\n } else if (z2) {\n this.l = j2;\n i2 = addAndGet(-i2);\n if (i2 == 0) {\n return;\n }\n } else if (poll != m) {\n unicastProcessor.onNext(poll);\n } else {\n if (unicastProcessor != 0) {\n this.k = null;\n unicastProcessor.onComplete();\n }\n if (!this.h.get()) {\n UnicastProcessor<T> create = UnicastProcessor.create(this.b, this);\n this.k = create;\n this.e.getAndIncrement();\n if (j2 != this.i.get()) {\n j2++;\n s6.a.e.d.c.a.b bVar = new s6.a.e.d.c.a.b(create);\n subscriber.onNext(bVar);\n if (bVar.f()) {\n create.onComplete();\n }\n } else {\n SubscriptionHelper.cancel(this.d);\n this.c.dispose();\n atomicThrowable.tryAddThrowableOrReport(new MissingBackpressureException(\"Could not deliver a window due to lack of requests\"));\n this.j = true;\n }\n }\n }\n } else {\n mpscLinkedQueue.clear();\n Throwable terminate2 = atomicThrowable.terminate();\n if (unicastProcessor != 0) {\n this.k = null;\n unicastProcessor.onError(terminate2);\n }\n subscriber.onError(terminate2);\n return;\n }\n }\n mpscLinkedQueue.clear();\n this.k = null;\n }\n }", "public void drain() {\r\n if (getAndIncrement() == 0) {\r\n SimpleQueue<T> simpleQueue = this.queue;\r\n int i = this.consumed;\r\n int i2 = this.bufferSize;\r\n int i3 = i2 - (i2 >> 2);\r\n boolean z = this.sourceMode != 1;\r\n int i4 = 1;\r\n int i5 = i;\r\n SimpleQueue<T> simpleQueue2 = simpleQueue;\r\n int i6 = i5;\r\n while (true) {\r\n if (simpleQueue2 != null) {\r\n long j = LongCompanionObject.MAX_VALUE;\r\n InnerSubscription[] innerSubscriptionArr = (InnerSubscription[]) this.subscribers.get();\r\n boolean z2 = false;\r\n for (InnerSubscription innerSubscription : innerSubscriptionArr) {\r\n long j2 = innerSubscription.get();\r\n if (j2 != Long.MIN_VALUE) {\r\n j = Math.min(j2 - innerSubscription.emitted, j);\r\n z2 = true;\r\n }\r\n }\r\n long j3 = 0;\r\n if (!z2) {\r\n j = 0;\r\n }\r\n while (true) {\r\n if (j == j3) {\r\n break;\r\n }\r\n boolean z3 = this.done;\r\n try {\r\n Object poll = simpleQueue2.poll();\r\n boolean z4 = poll == null;\r\n if (!checkTerminated(z3, z4)) {\r\n if (z4) {\r\n break;\r\n }\r\n int length = innerSubscriptionArr.length;\r\n for (int i7 = 0; i7 < length; i7++) {\r\n InnerSubscription innerSubscription2 = innerSubscriptionArr[i7];\r\n if (!innerSubscription2.isCancelled()) {\r\n innerSubscription2.downstream.onNext(poll);\r\n innerSubscription2.emitted++;\r\n }\r\n }\r\n if (z) {\r\n i6++;\r\n if (i6 == i3) {\r\n ((Subscription) this.upstream.get()).request((long) i3);\r\n i6 = 0;\r\n }\r\n }\r\n j--;\r\n if (innerSubscriptionArr != this.subscribers.get()) {\r\n break;\r\n }\r\n j3 = 0;\r\n } else {\r\n return;\r\n }\r\n } catch (Throwable th) {\r\n Throwable th2 = th;\r\n Exceptions.throwIfFatal(th2);\r\n ((Subscription) this.upstream.get()).cancel();\r\n simpleQueue2.clear();\r\n this.done = true;\r\n signalError(th2);\r\n return;\r\n }\r\n }\r\n if (checkTerminated(this.done, simpleQueue2.isEmpty())) {\r\n return;\r\n }\r\n }\r\n this.consumed = i6;\r\n i4 = addAndGet(-i4);\r\n if (i4 != 0) {\r\n if (simpleQueue2 == null) {\r\n simpleQueue2 = this.queue;\r\n }\r\n } else {\r\n return;\r\n }\r\n }\r\n }\r\n }", "@BackpressureSupport(BackpressureKind.SPECIAL)\n @SchedulerSupport(SchedulerKind.NONE)\n @Override\n public final void subscribe(Subscriber<? super T> s) {\n Objects.requireNonNull(s, \"s is null\");\n subscribeActual(s);\n }", "private void test() {\n Observable<String> observable = Observable.create(new ObservableOnSubscribe<String>() {\n\n @Override\n public void subscribe(ObservableEmitter<String> e) throws Exception {\n e.onNext(\"hello\");\n e.onNext(\"RXJAVA\");\n e.onComplete();\n }\n }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());\n\n Observer<String> observer = new Observer<String>() {\n @Override\n public void onSubscribe(Disposable d) {\n Log.d(TAG, \"onSubscribe\");\n }\n\n @Override\n public void onNext(String s) {\n Log.d(TAG, \"onNext:\" + s);\n }\n\n @Override\n public void onError(Throwable e) {\n Log.d(TAG, \"onError\");\n }\n\n @Override\n public void onComplete() {\n Log.d(TAG, \"onComplete\");\n }\n };\n observable.subscribe(observer);\n }", "@Override\n //called when something subscribes to this observable\n public void subscribe(ObservableEmitter<Task> emitter) throws Throwable {\n if(!emitter.isDisposed()){\n emitter.onNext(task);\n emitter.onComplete();\n }\n }", "public static void test016()\r\n {\r\n System.out.println(\"RxJavaTest04::test016\");\r\n ExecutorService poolA = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-A-%d\"));\r\n Scheduler schedulerA = Schedulers.from(poolA);\r\n RxGroceries rxGroceries = new RxGroceries();\r\n\r\n Maybe<BigDecimal> totalPrice = Observable\r\n .fromIterable(Arrays.asList(\"bread\", \"butter\", \"milk\", \"tomato\", \"cheese\"))\r\n .subscribeOn(schedulerA)\r\n .flatMap(prod -> rxGroceries\r\n .purchase(prod, 1)\r\n .subscribeOn(schedulerA)\r\n )\r\n .reduce(BigDecimal::add);\r\n totalPrice\r\n .subscribe(\r\n x -> log(\"Got \" + x),\r\n Throwable::printStackTrace,\r\n () -> log(\"Completed\")\r\n );\r\n myWait(2000); // We have to wait before shutting down the pool,\r\n // otherwise it will throw exception \r\n // [java] io.reactivex.exceptions.UndeliverableException:\r\n // java.util.concurrent.RejectedExecutionException:\r\n // Task java.util.concurrent.FutureTask@38d8f9d0 rejected\r\n // from java.util.concurrent.ThreadPoolExecutor@6a724a6c\r\n // [Shutting down, pool size = 1, active threads = 1, queued\r\n // tasks = 0, completed tasks = 0]\r\n poolA.shutdown();\r\n }", "@Test\n void receivesWithSmallPrefetch() {\n // Arrange\n final String secondPartitionId = \"2\";\n final AtomicBoolean isActive = new AtomicBoolean(true);\n final EventHubProducerAsyncClient producer = toClose(builder.buildAsyncProducerClient());\n\n final Disposable producerEvents = toClose(getEvents(isActive)\n .flatMap(event -> producer.send(event, new SendOptions().setPartitionId(secondPartitionId)))\n .subscribe(\n sent -> {\n },\n error -> logger.error(\"Error sending event\", error),\n () -> logger.info(\"Event sent.\")));\n\n final int prefetch = 5;\n final int backpressure = 3;\n final int batchSize = 10;\n final EventHubConsumerAsyncClient consumer = toClose(builder\n .prefetchCount(prefetch)\n .buildAsyncConsumerClient());\n\n // Act & Assert\n try {\n StepVerifier.create(consumer.receiveFromPartition(secondPartitionId, EventPosition.latest()), prefetch)\n .expectNextCount(prefetch)\n .thenRequest(backpressure)\n .expectNextCount(backpressure)\n .thenRequest(batchSize)\n .expectNextCount(batchSize)\n .thenRequest(batchSize)\n .expectNextCount(batchSize)\n .thenAwait(Duration.ofSeconds(1))\n .thenCancel()\n .verify(TIMEOUT);\n } finally {\n isActive.set(false);\n }\n }", "@Override\n public void subscribe(FlowableEmitter<Integer> e) throws Exception {\n for (int i = 0; i < 128; i++) {\n Log.e(TAG, \"emit \" + i);\n e.onNext(i);\n }\n }", "protected void m67582a(Subscriber<? super T> subscriber) {\n this.a.a(new BackpressureErrorSubscriber(subscriber));\n }", "public void onSubscribe() {\n\n }", "@Override\n\tpublic void onSubscribe(Subscription subscription) {\n\t\tSystem.out.println(\"onSubscribe invoked\");\n\t\tsubscription.request(Long.MAX_VALUE);\n\t}", "private static void createColdObservable() {\n var observable = Observable.just(1, 2, 3, 4, 5);\n\n observable.subscribe(item -> LOG.info(\"Observer 1: {}\", item));\n\n pause(1000);\n\n observable.subscribe(item -> LOG.info(\"Observer 2: {}\", item));\n }", "void drainFused() {\n int n;\n int n2 = 1;\n Subscriber<T> subscriber = this.actual;\n SimpleQueueWithConsumerIndex<Object> simpleQueueWithConsumerIndex = this.queue;\n do {\n if (this.cancelled) {\n simpleQueueWithConsumerIndex.clear();\n return;\n }\n Throwable throwable = (Throwable)this.error.get();\n if (throwable != null) {\n simpleQueueWithConsumerIndex.clear();\n subscriber.onError(throwable);\n return;\n }\n n = simpleQueueWithConsumerIndex.producerIndex() == this.sourceCount ? 1 : 0;\n if (!simpleQueueWithConsumerIndex.isEmpty()) {\n subscriber.onNext(null);\n }\n if (n != 0) {\n subscriber.onComplete();\n return;\n }\n n2 = n = this.addAndGet(-n2);\n } while (n != 0);\n }", "@Override\n\tpublic void onSubscribe(String arg0, int arg1) {\n\t\t\n\t}", "void error(Throwable t) {\n t = Conformance.onNextThrew(t);\n try {\n try {\n subscriber.onError(t);\n } catch (Throwable e) {\n Exceptions.handleUncaught(t);\n Exceptions.handleUncaught(Conformance.onErrorThrew(e));\n }\n } finally {\n try {\n cancel();\n } catch (Throwable t3) {\n Exceptions.handleUncaught(Conformance.cancelThrew(t3));\n }\n }\n }", "@Override\n\t\tpublic void onSubscribe(Disposable d) {\n\t\t\tSystem.out.println(\"subscribe\");\n\t\t}", "public void subscribe(p019io.reactivex.Observer<? super T> r6) {\n /*\n r5 = this;\n L_0x0000:\n java.util.concurrent.atomic.AtomicReference<io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver<T>> r0 = r5.curr\n java.lang.Object r0 = r0.get()\n io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver r0 = (p019io.reactivex.internal.operators.observable.ObservableReplay.ReplayObserver) r0\n if (r0 != 0) goto L_0x0020\n io.reactivex.internal.operators.observable.ObservableReplay$BufferSupplier<T> r1 = r5.bufferFactory\n io.reactivex.internal.operators.observable.ObservableReplay$ReplayBuffer r1 = r1.call()\n io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver r2 = new io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver\n r2.<init>(r1)\n java.util.concurrent.atomic.AtomicReference<io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver<T>> r3 = r5.curr\n r4 = 0\n boolean r3 = r3.compareAndSet(r4, r2)\n if (r3 != 0) goto L_0x001f\n goto L_0x0000\n L_0x001f:\n r0 = r2\n L_0x0020:\n io.reactivex.internal.operators.observable.ObservableReplay$InnerDisposable r1 = new io.reactivex.internal.operators.observable.ObservableReplay$InnerDisposable\n r1.<init>(r0, r6)\n r6.onSubscribe(r1)\n r0.add(r1)\n boolean r2 = r1.isDisposed()\n if (r2 == 0) goto L_0x0035\n r0.remove(r1)\n return\n L_0x0035:\n io.reactivex.internal.operators.observable.ObservableReplay$ReplayBuffer<T> r2 = r0.buffer\n r2.replay(r1)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p019io.reactivex.internal.operators.observable.ObservableReplay.ReplaySource.subscribe(io.reactivex.Observer):void\");\n }", "@Override\n protected void onSubscribe() {\n Subscription s = subscription;\n Disposable d = Disposable.from(s);\n \n if (!TerminalAtomics.set(this, DISCONNECT, d)) {\n done = true;\n return;\n }\n \n connected = true;\n s.request(Flow.defaultBufferSize());\n }", "Observable<SubscribeRequest> getSubscribeRequestStream();", "private static void exSwitchMapTwo() {\n\n Observable.interval(5,TimeUnit.SECONDS)\n .switchMap(call -> Observable.just(getResponse()).doOnDispose(() -> System.out.println(\"Disposed\")))\n .subscribe(System.out::println);\n\n //An Observable which performs network call.\n sleep(40000);\n\n\n /* OUTPUT :\n 6\n 10\n 13\n 17\n 26\n 32\n 35\n 42\n\n */\n }", "public static void test019()\r\n {\r\n System.out.println(\"RxJavaTest04::test019\");\r\n\r\n ExecutorService poolA = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-A-%d\"));\r\n Scheduler schedulerA = Schedulers.from(poolA);\r\n ExecutorService poolB = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-B-%d\"));\r\n Scheduler schedulerB = Schedulers.from(poolB);\r\n ExecutorService poolC = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-C-%d\"));\r\n Scheduler schedulerC = Schedulers.from(poolC);\r\n\r\n log(\"Starting\");\r\n Observable<String> obs = Observable.create(subscriber -> {\r\n log(\"Subscribed\");\r\n subscriber.onNext(\"A\");\r\n subscriber.onNext(\"B\");\r\n subscriber.onNext(\"C\");\r\n subscriber.onNext(\"D\");\r\n subscriber.onComplete();\r\n });\r\n log(\"Created\");\r\n obs\r\n .subscribeOn(schedulerA)\r\n .flatMap(record -> myStore(record).subscribeOn(schedulerB))\r\n .observeOn(schedulerC)\r\n .subscribe(\r\n x -> log(\"Got: \" + x),\r\n Throwable::printStackTrace,\r\n () -> log(\"Completed\")\r\n );\r\n log(\"Exiting\");\r\n \r\n myWait(5000);\r\n poolA.shutdown();\r\n poolB.shutdown();\r\n poolC.shutdown();\r\n }", "void subscribe();", "public void subscribeActual(Subscriber<? super T> subscriber) {\r\n PublishConnection publishConnection;\r\n while (true) {\r\n publishConnection = (PublishConnection) this.current.get();\r\n if (publishConnection != null) {\r\n break;\r\n }\r\n PublishConnection publishConnection2 = new PublishConnection(this.current, this.bufferSize);\r\n if (this.current.compareAndSet(publishConnection, publishConnection2)) {\r\n publishConnection = publishConnection2;\r\n break;\r\n }\r\n }\r\n InnerSubscription innerSubscription = new InnerSubscription(subscriber, publishConnection);\r\n subscriber.onSubscribe(innerSubscription);\r\n if (publishConnection.add(innerSubscription)) {\r\n if (innerSubscription.isCancelled()) {\r\n publishConnection.remove(innerSubscription);\r\n } else {\r\n publishConnection.drain();\r\n }\r\n return;\r\n }\r\n Throwable th = publishConnection.error;\r\n if (th != null) {\r\n subscriber.onError(th);\r\n } else {\r\n subscriber.onComplete();\r\n }\r\n }", "Flow.Subscriber<T> subscriber();", "@Override\n public void onFailure(Call call, IOException e) {\n emitter.onNext(e+\"\");\n }", "@Test\n public void testDefer() throws InterruptedException {\n Observable<LocalTime> localTimeObservable =\n Observable.defer(\n () -> Observable\n .just(LocalTime.now()))\n .repeat(3);\n localTimeObservable.subscribe(System.out::println);\n Thread.sleep(3000);\n System.out.println(\"Next Subscriber\");\n localTimeObservable.subscribe(System.out::println);\n }", "@Test\n void canReceiveWithBackpressure() {\n // Arrange\n final int backpressure = 15;\n final String secondPartitionId = \"2\";\n final AtomicBoolean isActive = new AtomicBoolean(true);\n final EventHubProducerAsyncClient producer = toClose(builder.buildAsyncProducerClient());\n\n final Disposable producerEvents = toClose(getEvents(isActive)\n .flatMap(event -> producer.send(event, new SendOptions().setPartitionId(secondPartitionId)))\n .subscribe(\n sent -> {\n },\n error -> logger.error(\"Error sending event\", error),\n () -> logger.info(\"Event sent.\")));\n\n final ReceiveOptions options = new ReceiveOptions()\n .setTrackLastEnqueuedEventProperties(true);\n final EventHubConsumerAsyncClient consumer = toClose(builder\n .prefetchCount(2)\n .buildAsyncConsumerClient());\n\n // Act & Assert\n try {\n StepVerifier.create(consumer.receiveFromPartition(secondPartitionId, EventPosition.latest(), options), backpressure)\n .expectNextCount(backpressure)\n .thenAwait(Duration.ofSeconds(5))\n .thenCancel()\n .verify();\n } finally {\n isActive.set(false);\n }\n }", "@Override\n protected void subscribeActual(Subscriber<? super T> object) {\n MaybeSource<? extends T>[] arrmaybeSource = this.sources;\n int n = arrmaybeSource.length;\n SimpleQueue simpleQueue = n <= MaybeMergeArray.bufferSize() ? new MpscFillOnceSimpleQueue(n) : new ClqSimpleQueue();\n simpleQueue = new MergeMaybeObserver(object, n, (SimpleQueueWithConsumerIndex<Object>)simpleQueue);\n object.onSubscribe((Subscription)((Object)simpleQueue));\n object = ((MergeMaybeObserver)simpleQueue).error;\n int n2 = arrmaybeSource.length;\n n = 0;\n do {\n MaybeSource maybeSource;\n block4: {\n block3: {\n if (n >= n2) break block3;\n maybeSource = arrmaybeSource[n];\n if (!((MergeMaybeObserver)simpleQueue).isCancelled() && ((AtomicReference)object).get() == null) break block4;\n }\n return;\n }\n maybeSource.subscribe(simpleQueue);\n ++n;\n } while (true);\n }", "public interface Subscription {\n /**\n * Calling this will send the event to the subscribed service\n * @param event the event to transmit to the subscribed service\n */\n boolean onEvent(Event event);\n\n /**\n * Returns a stream of all subscribeRequests that are transmitted by the subbed service\n * @return a stream of subscribeRequests transmitted by subbed service\n */\n Observable<SubscribeRequest> getSubscribeRequestStream();\n\n /**\n * This completable will complete when the subscription is terminated for some reason (most likely a connection termination)\n * @return a completable that will complete when the subscription is terminated\n */\n Completable getCompletable();\n}", "@Override\n public void onNext(T t) {\n if (t == null) {\n this.onError(new NullPointerException(\"onNext called with null. Null values are generally not allowed in 2.x operators and sources.\"));\n return;\n } else {\n if (this.isDisposed()) return;\n {\n this.observer.onNext(t);\n return;\n }\n }\n }", "@Override\n public void subscribe(ObservableEmitter<String> subscriber) throws Exception {\n if (subscriber.isDisposed()) {\n return;\n }\n processInput(subscriber);\n\n if (!subscriber.isDisposed()) {\n subscriber.onComplete();\n }\n }", "public static void main(String[] args){\n Observable myObservable = Observable.create(new Observable.OnSubscribe(){\n\n @Override\n public void call(Object subscriber) {\n Subscriber mySubscriber = (Subscriber)subscriber;\n\n for(int i = 0 ; i < 10; i++){\n //if my subscriber was subscribed\n if(!mySubscriber.isUnsubscribed()){\n mySubscriber.onNext(\"Pushed value \" + i);\n }\n }\n\n if(!mySubscriber.isUnsubscribed()){\n mySubscriber.onCompleted();\n }\n\n }\n });\n\n //subscribe to your Observable\n myObservable.subscribe(new Action1<String>() {\n @Override\n public void call(String s) {\n System.out.println(s);\n }\n },\n new Action1<Throwable>() {\n @Override\n public void call(Throwable throwable) {\n System.out.println(\"Something went wrong the observable\");\n }\n },\n new Action0() {\n @Override\n public void call() {\n System.out.println(\"No more values will be pushed.\");\n }\n });\n\n }", "@Test\r\n\tpublic void exerciseInterruptible() {\n\t\t\r\n\t\tList<String> articlesTopicA = Arrays.asList(\"Article A-1\",\"Article A-2\",\"Article A-3\");\r\n\t\tList<String> articlesTopicB = Arrays.asList(\"Article B-1\",\"Article B-2\",\"Article B-3\");\r\n\t\tList<String> articlesTopicC = Arrays.asList(\"Article C-1\",\"Article C-2\",\"Article C-3\");\r\n\t\t\r\n\t\tList<Observable<String>> topicObservables = Arrays.asList(\r\n\t\t\t\tObservable.interval(0, 80L, TimeUnit.MILLISECONDS, testScheduler)\r\n\t\t\t\t.take(3)\r\n\t\t\t\t.map(i -> articlesTopicA.get(i.intValue())),\r\n\t\t\t\tObservable.interval(50, 60L, TimeUnit.MILLISECONDS, testScheduler)\r\n\t\t\t\t.take(3)\r\n\t\t\t\t.map(i -> articlesTopicB.get(i.intValue())),\r\n\t\t\t\tObservable.interval(0, 40L, TimeUnit.MILLISECONDS, testScheduler)\r\n\t\t\t\t.take(3)\r\n\t\t\t\t.map(i -> articlesTopicC.get(i.intValue())));\r\n\t\t\r\n\t\tObservable<Observable<String>> topics = Observable.interval(0, 100L, TimeUnit.MILLISECONDS, testScheduler)\r\n\t\t\t\t.take(3)\r\n\t\t\t\t.map(i -> topicObservables.get(i.intValue()));\r\n\t\t\r\n\t\t//\t\t t[ms]: 0 100 200 300\r\n\t\t//\t\ttopics: A---------B---------C---------| \r\n\t\t//\t\t A: 1-------2-|-----3---|---------|\r\n\t\t//\t\t B: |---------|----1----|2-----3--|\r\n\t\t//\t\t C: |---------|---------1---2---3-|\r\n\t\t//\t\tResult: A-1 A-2 B-1 C-1 C-2 C-3\r\n\t\t\t\t\r\n\t\t// TODO: always switch to the latest topic\r\n\t\t// HINT: http://reactivex.io/documentation/operators/switch.html\r\n\t\tObservable<String> latestInteresting = Observable.empty();\r\n\r\n\t\t// verify\r\n\t\tTestSubscriber<String> testSubscriber = new TestSubscriber<>();\r\n\t\tlatestInteresting\r\n\t\t\t.doOnNext(article -> log(String.format(\" doOnNext(): %s Time: %d\", article, testScheduler.now())))\r\n\t\t\t.subscribe(testSubscriber);\r\n\t\t\r\n\t\t// let the time elapse until completion\r\n\t\ttestScheduler.advanceTimeBy(300, TimeUnit.MILLISECONDS);\r\n\t\t\r\n\t\ttestSubscriber.assertCompleted();\r\n\t\ttestSubscriber.assertNoErrors();\r\n\t\tList<String> expectedArticles = Arrays.asList(\r\n\t\t\t\t\"Article A-1\",\"Article A-2\", \r\n\t\t\t\t\"Article B-1\", \r\n\t\t\t\t\"Article C-1\", \"Article C-2\", \"Article C-3\");\r\n\t\ttestSubscriber.assertReceivedOnNext(expectedArticles);\r\n\t\t\r\n\t}", "@Override\n public boolean subscribe(Task data) {\n return true;\n }", "private void threads()\n {\n {\n Observable myObservable = Observable.create\n (\n new Observable.OnSubscribe<GetArtistQuery>() \n {\n public void call(Subscriber<? super GetArtistQuery> sub) \n { \n //System.out.println(Thread.currentThread().getName());\n sub.onNext(getArtistQuery);\n sub.onCompleted();\n }\n } \n );\n \n Subscriber mySubscriber = new Subscriber<GetArtistQuery>() \n {\n public void onNext(GetArtistQuery s) \n { \n try { \n s.execute();\n } catch (SQLException ex) { System.out.println(ex); }\n }\n public void onCompleted() { \n }\n public void onError(Throwable e) {System.out.println(e); } \n };\n //myObservable.subscribe(mySubscriber); \n try {\n myObservable.\n subscribeOn(Schedulers.io()).\n //observeOn(Schedulers.from(executorService)).\n observeOn(Schedulers.trampoline()).\n subscribe(mySubscriber);\n Thread.sleep(2); \n //executorService.shutdown();\n } catch(InterruptedException ex) {Thread.currentThread().interrupt();}\n }\n \n }", "private Completable m147567a(AbstractC31735g<? super Disposable> gVar, AbstractC31735g<? super Throwable> gVar2, AbstractC31733a aVar, AbstractC31733a aVar2, AbstractC31733a aVar3, AbstractC31733a aVar4) {\n ObjectHelper.m147684a((Object) gVar, \"onSubscribe is null\");\n ObjectHelper.m147684a((Object) gVar2, \"onError is null\");\n ObjectHelper.m147684a((Object) aVar, \"onComplete is null\");\n ObjectHelper.m147684a((Object) aVar2, \"onTerminate is null\");\n ObjectHelper.m147684a((Object) aVar3, \"onAfterTerminate is null\");\n ObjectHelper.m147684a((Object) aVar4, \"onDispose is null\");\n return RxJavaPlugins.m148466a(new CompletablePeek(this, gVar, gVar2, aVar, aVar2, aVar3, aVar4));\n }", "public static void test012()\r\n {\r\n System.out.println(\"RxJavaTest04::test012\");\r\n ExecutorService poolA = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-A-%d\"));\r\n Scheduler schedulerA = Schedulers.from(poolA);\r\n log(\"Starting\");\r\n Observable<String> obs = mySimple();\r\n log(\"Created\");\r\n obs\r\n .subscribeOn(schedulerA)\r\n .subscribe(\r\n x -> log(\"Got \" + x),\r\n Throwable::printStackTrace,\r\n () -> log(\"Completed\")\r\n );\r\n log(\"After subscribe\");\r\n myWait(2000);\r\n log(\"Shutting down\");\r\n poolA.shutdown();\r\n }", "public interface Subscription {\n void cancel();\n\n void request(long j);\n}", "public final void m55608a(@org.jetbrains.annotations.NotNull com.tinder.pushnotifications.usecase.NotifyPushServer.NotifyReason r3) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = \"request\";\n kotlin.jvm.internal.C2668g.b(r3, r0);\n r0 = com.tinder.pushnotifications.usecase.NotifyPushServer.NotifyReason.APP_OPENED;\n if (r3 != r0) goto L_0x000e;\n L_0x0009:\n r3 = r2.f46002b;\t Catch:{ SecurityException -> 0x000e }\n r3.cancelAll();\t Catch:{ SecurityException -> 0x000e }\n L_0x000e:\n r3 = r2.f46003c;\n r3 = r3.d();\n if (r3 == 0) goto L_0x005f;\n L_0x0016:\n r3 = r2.f46005e;\n r3 = r3.a();\n r3 = r3.getLanguage();\n r3 = rx.Single.a(r3);\n r0 = new com.tinder.pushnotifications.usecase.NotifyPushServer$a;\n r0.<init>(r2);\n r0 = (rx.functions.Func1) r0;\n r3 = r3.d(r0);\n r0 = new com.tinder.pushnotifications.usecase.NotifyPushServer$b;\n r0.<init>(r2);\n r0 = (rx.functions.Func1) r0;\n r3 = r3.c(r0);\n r0 = com.tinder.pushnotifications.usecase.NotifyPushServer.C17888c.f55780a;\n r0 = (rx.functions.Func1) r0;\n r3 = r3.a(r0);\n r0 = r2.f46001a;\n r0 = r0.notifyPushServerAppOpen();\n r3 = r3.b(r0);\n r0 = rx.schedulers.Schedulers.io();\n r3 = r3.b(r0);\n r0 = com.tinder.pushnotifications.usecase.NotifyPushServer.C18651d.f58120a;\n r0 = (rx.functions.Action0) r0;\n r1 = com.tinder.pushnotifications.usecase.NotifyPushServer.C18652e.f58121a;\n r1 = (rx.functions.Action1) r1;\n r3.a(r0, r1);\n L_0x005f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tinder.pushnotifications.usecase.NotifyPushServer.a(com.tinder.pushnotifications.usecase.NotifyPushServer$NotifyReason):void\");\n }", "private static void createHotAndConnectableObservable() {\n var observable = Observable.just(1, 2, 3, 4, 5).publish();\n\n observable.subscribe(item -> LOG.info(\"Connectable Observer 1: {}\", item));\n observable.subscribe(item -> LOG.info(\"Connectable Observer 2: {}\", item));\n\n pause(1000);\n // calling connect starts emitting immediately - any order\n observable.connect();\n\n // if we subscribe now it'll now be emitted - hot observable\n observable.subscribe(item -> LOG.info(\"Connectable Observer 3: {}\", item));\n }", "@Override\n\tpublic void onPSubscribe(String arg0, int arg1) {\n\t\t\n\t}", "default void subscribe(Subscriber<? super Void> s) {\n\t\tOperators.complete(s);\n\t}", "@Test\n public void testBatchesAgeOut() {\n HystrixCollapserKey key = HystrixCollapserKey.Factory.asKey(\"Collapser-Batch-Size-B\");\n stream = RollingCollapserBatchSizeDistributionStream.getInstance(key, 10, 100);\n stream.startCachingStreamValuesIfUnstarted();\n\n final CountDownLatch latch = new CountDownLatch(1);\n stream.observe().take(30).subscribe(new Subscriber<CachedValuesHistogram>() {\n @Override\n public void onCompleted() {\n latch.countDown();\n }\n\n @Override\n public void onError(Throwable e) {\n fail(e.getMessage());\n }\n\n @Override\n public void onNext(CachedValuesHistogram distribution) {\n System.out.println(\"OnNext @ \" + System.currentTimeMillis());\n }\n });\n\n Collapser.from(key, 1).observe();\n Collapser.from(key, 2).observe();\n Collapser.from(key, 3).observe();\n\n try {\n Thread.sleep(200);\n } catch (InterruptedException ex) {\n fail(\"Interrupted ex\");\n }\n\n Collapser.from(key, 4).observe();\n\n try {\n Thread.sleep(200);\n } catch (InterruptedException ex) {\n fail(\"Interrupted ex\");\n }\n\n Collapser.from(key, 5).observe();\n Collapser.from(key, 6).observe();\n Collapser.from(key, 7).observe();\n Collapser.from(key, 8).observe();\n Collapser.from(key, 9).observe();\n\n try {\n Thread.sleep(200);\n } catch (InterruptedException ex) {\n fail(\"Interrupted ex\");\n }\n\n Collapser.from(key, 10).observe();\n Collapser.from(key, 11).observe();\n Collapser.from(key, 12).observe();\n\n try {\n assertTrue(latch.await(10000, TimeUnit.MILLISECONDS));\n } catch (InterruptedException ex) {\n fail(\"Interrupted ex\");\n }\n\n assertEquals(0, stream.getLatest().getTotalCount());\n assertEquals(0, stream.getLatestMean());\n }", "public interface EagerReactive {\n\t/**\n\t * Add a value to an simple-react Async.Adapter (Queue / Topic /Signal) if present\n\t * Returns the Adapter wrapped in an Optional\n\t * \n\t * @see Pipes#register(Object, com.aol.simple.react.async.Adapter)\n\t * \n\t * @param key : identifier for registered Queue\n\t * @param value : value to add to Queue\n\t */\n\tdefault <K,V> Optional<Adapter<V>> enqueue(K key,V value){\n\t\tOptional<Adapter<V>> queue = Pipes.get(key);\n\t\tqueue.map(adapter -> adapter.offer(value));\n\t\n\t\treturn queue;\n\t\t\n\t\t\n\t}\n\t\n\t\n\t/**\n\t * \n\t * Generate a sequentially executing single-threaded a EagerFutureStream that executes all tasks directly without involving\n\t * a task executor between each stage (unless async operator invoked). A preconfigured EagerReact builder that will be supplied as\n\t * input to the function supplied. The user Function should create a EagerFutureStream with any\n\t * business logic stages predefined. This method will handle elastic scaling and pooling of Executor\n\t * services. User code should call a terminal op on the returned EagerFutureStream\n\t * \n\t * \n\t * @param react Function that generates a EagerFutureStream from a EagerReact builder\n\t * @return Generated EagerFutureStream\n\t */\n\tdefault <T> EagerFutureStream<T> sync(Function<EagerReact,EagerFutureStream<T>> react){\n\t\t EagerReact r =SequentialElasticPools.eagerReact.nextReactor().withAsync(false);\n\t\t return react.apply( r)\n\t\t\t\t \t.onFail(e->{ SequentialElasticPools.eagerReact.populate(r); throw e;})\n\t\t\t\t \t.peek(i->SequentialElasticPools.eagerReact.populate(r));\n\t\t \t\t\t\t \t\n\t}\n\t\n\t/**\n\t * Switch EagerFutureStream into execution mode suitable for IO (reuse ioReactors task executor)\n\t * \n\t * @param stream to convert to IO mode\n\t * @return EagerFutureStream in IO mode\n\t */\n\tdefault <T> EagerFutureStream<T> switchToIO(EagerFutureStream<T> stream){\n\t\tEagerReact react = EagerReactors.ioReact;\n\t\treturn stream.withTaskExecutor(react.getExecutor()).withRetrier(react.getRetrier());\n\t}\n\t/**\n\t * Switch EagerFutureStream into execution mode suitable for CPU bound execution (reuse cpuReactors task executor)\n\t * \n\t * @param stream to convert to CPU bound mode\n\t * @return EagerFutureStream in CPU bound mode\n\t */\n\tdefault <T> EagerFutureStream<T> switchToCPU(EagerFutureStream<T> stream){\n\t\tEagerReact react = EagerReactors.cpuReact;\n\t\treturn stream.withTaskExecutor(react.getExecutor()).withRetrier(react.getRetrier());\n\t}\n\t/**\n\t * @return Stream builder for IO Bound Streams\n\t */\n\tdefault OptimizedEagerReact ioStream(){\n\t\treturn new OptimizedEagerReact(EagerReactors.ioReact);\n\t}\n\t/**\n\t * @return Stream builder for CPU Bound Streams\n\t */\n\tdefault OptimizedEagerReact cpuStream(){\n\t\treturn new OptimizedEagerReact(EagerReactors.cpuReact);\n\t}\n\t/**\n\t * Generate a multi-threaded EagerFutureStream that executes all tasks via \n\t * a task executor between each stage (unless sync operator invoked). \n\t * A preconfigured EagerReact builder that will be supplied as\n\t * input to the function supplied. The user Function should create a EagerFutureStream with any\n\t * business logic stages predefined. This method will handle elastic scaling and pooling of Executor\n\t * services. User code should call a terminal op on the returned EagerFutureStream\n\t * \n\t * \n\t * @param react Function that generates a EagerFutureStream from a EagerReact builder\n\t * @return Generated EagerFutureStream\n\t */\n\tdefault <T> EagerFutureStream<T> async(Function<EagerReact,EagerFutureStream<T>> react){\n\t\t EagerReact r =ParallelElasticPools.eagerReact.nextReactor().withAsync(true);\n\t\treturn react.apply( r)\n\t\t\t\t\t.onFail(e->{ SequentialElasticPools.eagerReact.populate(r); throw e;})\n\t\t\t\t\t.peek(i->SequentialElasticPools.eagerReact.populate(r));\n\t\t \t\n\t}\n\t\n\t\n\t\n}", "public void mo42335f() {\n Object andSet = getAndSet(null);\n if (andSet == null) {\n return;\n }\n if (this.f36202N.get() != 0) {\n this.f36205a.mo41789a(andSet);\n C13747d.m58699c(this.f36202N, 1);\n return;\n }\n cancel();\n this.f36205a.onError(new MissingBackpressureException(\"Couldn't emit value due to lack of requests!\"));\n }", "@BackpressureSupport(BackpressureKind.PASS_THROUGH)\n @SchedulerSupport(SchedulerKind.NONE)\n public final void safeSubscribe(Subscriber<? super T> s) {\n Objects.requireNonNull(s, \"s is null\");\n if (s instanceof SafeSubscriber) {\n subscribeActual(s);\n } else {\n subscribeActual(new SafeSubscriber<T>(s));\n }\n }", "public void emitAndComplete(rx.Subscriber<T> r5, rx.Subscriber<?> r6) {\n /*\n r4 = this;\n monitor-enter(r4);\n r3 = r4.emitting;\t Catch:{ all -> 0x0021 }\n if (r3 == 0) goto L_0x000a;\n L_0x0005:\n r3 = 1;\n r4.terminate = r3;\t Catch:{ all -> 0x0021 }\n monitor-exit(r4);\t Catch:{ all -> 0x0021 }\n L_0x0009:\n return;\n L_0x000a:\n r2 = r4.value;\t Catch:{ all -> 0x0021 }\n r1 = r4.hasValue;\t Catch:{ all -> 0x0021 }\n r3 = 0;\n r4.value = r3;\t Catch:{ all -> 0x0021 }\n r3 = 0;\n r4.hasValue = r3;\t Catch:{ all -> 0x0021 }\n r3 = 1;\n r4.emitting = r3;\t Catch:{ all -> 0x0021 }\n monitor-exit(r4);\t Catch:{ all -> 0x0021 }\n if (r1 == 0) goto L_0x001d;\n L_0x001a:\n r5.onNext(r2);\t Catch:{ Throwable -> 0x0024 }\n L_0x001d:\n r5.onCompleted();\n goto L_0x0009;\n L_0x0021:\n r3 = move-exception;\n monitor-exit(r4);\t Catch:{ all -> 0x0021 }\n throw r3;\n L_0x0024:\n r0 = move-exception;\n rx.exceptions.Exceptions.throwOrReport(r0, r6, r2);\n goto L_0x0009;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rx.internal.operators.OperatorDebounceWithTime.DebounceState.emitAndComplete(rx.Subscriber, rx.Subscriber):void\");\n }", "@Override\r\n public Subscription onSubscribe(final Observer<? super String> observer) {\n final Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n for (int i = 0; i < 75; i++) {\r\n observer.onNext(\"anotherValue_\" + i);\r\n }\r\n // After sending all values we complete the sequence\r\n observer.onCompleted();\r\n }\r\n });\r\n t.start();\r\n \r\n return new Subscription() {\r\n @Override\r\n public void unsubscribe() {\r\n // Ask the thread to stop doing work.\r\n // For this simple example it just interrupts.\r\n t.interrupt();\r\n }\r\n };\r\n }", "public static void test018()\r\n {\r\n System.out.println(\"RxJavaTest04::test018\");\r\n log(\"Starting\");\r\n final Observable<String> obs = mySimple();\r\n log(\"Created\");\r\n\r\n ExecutorService poolA = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-A-%d\"));\r\n Scheduler schedulerA = Schedulers.from(poolA);\r\n ExecutorService poolB = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-B-%d\"));\r\n Scheduler schedulerB = Schedulers.from(poolB);\r\n\r\n obs\r\n .doOnNext(RxJavaTest04::log)\r\n .map(x -> x + '1')\r\n .observeOn(schedulerB)\r\n .doOnNext(RxJavaTest04::log)\r\n .map(x -> x + '2')\r\n .doOnNext(RxJavaTest04::log)\r\n .subscribeOn(schedulerA)\r\n .subscribe(\r\n x -> log(\"Got \" + x),\r\n Throwable::printStackTrace,\r\n () -> log(\"Completed\")\r\n );\r\n myWait(2000);\r\n poolA.shutdown();\r\n poolB.shutdown();\r\n }", "public interface SubscriberOnNextListener<T> {\n void onNext(T t);\n}", "public static void test013()\r\n {\r\n System.out.println(\"RxJavaTest04::test013\");\r\n log(\"Starting\");\r\n final Observable<String> obs = mySimple();\r\n log(\"Created\");\r\n\r\n ExecutorService poolA = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-A-%d\"));\r\n Scheduler schedulerA = Schedulers.from(poolA);\r\n\r\n obs\r\n .doOnNext(RxJavaTest04::log)\r\n .map(x -> x + '1')\r\n .doOnNext(RxJavaTest04::log)\r\n .map(x -> x + '2')\r\n .subscribeOn(schedulerA)\r\n .doOnNext(RxJavaTest04::log)\r\n .subscribe(\r\n x -> log(\"Got \" + x),\r\n Throwable::printStackTrace,\r\n () -> log(\"Completed\")\r\n );\r\n poolA.shutdown();\r\n }", "@Override\n\tpublic void brokenSubscription() {\n\t\t\n\t}", "@Override protected void subscribeActual(Subscriber s) {\n source.subscribe(MaybeFuseable.get().wrap(s, contextScoper, assembled));\n }", "public interface SubscriberOnNextListener<T> {\n void onNext(T t);\n void onError(String Code);\n}", "public interface ObservableOnSubcribe<T> {\n\n void subscribe(@NonNull ObservableEmitter<T> emitter) throws Exception;\n\n}", "@Test\r\n\tpublic void aTestValidSubscribe() {\r\n\t\tbroker.subscribe(intSub);\r\n\t\tbroker.subscribe(unreadSub);\r\n\t\tbroker.subscribe(pIntSub);\r\n\t}", "@CallByThread(\"Netty EventLoop\")\n void runCancel() {\n if (referenced > 0) { // is blocking\n incomingPublishService.drain();\n }\n }", "public static void test015()\r\n {\r\n System.out.println(\"RxJavaTest04::test015\");\r\n ExecutorService poolA = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-A-%d\"));\r\n Scheduler schedulerA = Schedulers.from(poolA);\r\n RxGroceries rxGroceries = new RxGroceries();\r\n\r\n Maybe<BigDecimal> totalPrice = Observable\r\n .fromIterable(Arrays.asList(\"bread\", \"butter\", \"milk\", \"tomato\", \"cheese\"))\r\n .subscribeOn(schedulerA)\r\n .flatMap(prod -> rxGroceries.purchase(prod, 1))\r\n .reduce(BigDecimal::add);\r\n totalPrice\r\n .subscribe(System.out::println);\r\n poolA.shutdown();\r\n }", "@Test(timeout = 5000)\n public void concurrentFunctions() {\n final String input = \"input\";\n\n final int size = 100;\n //since we start at index 0\n final int expected = size - 1;\n\n\n // QUESTION Using this thread blocks indefinitely. The execution of the Hystrix command\n // happens on the computation Thread if this is used\n\n // final Scheduler scheduler = Schedulers.threadPoolForComputation();\n\n //use the I/O scheduler to allow enough thread, otherwise our pool will be the same size as the # of cores\n\n\n //set our size equal\n// ConfigurationManager.getConfigInstance().setProperty( THREAD_POOL_SIZE, size );\n // ConfigurationManager.getConfigInstance().setProperty( THREAD_POOL_SIZE, 10 );\n\n //reject requests we have to queue\n// ConfigurationManager.getConfigInstance().setProperty( THREAD_POOL_QUEUE, -1 );\n\n //latch used to make each thread block to prove correctness\n final CountDownLatch latch = new CountDownLatch( size );\n\n\n //create our observable and execute it in the I/O pool since we'll be doing I/O operations\n\n /**\n * QUESTION: Should this use the computation scheduler since all operations (except the hystrix command) are\n * non blocking?\n */\n\n final Observable<String> observable = Observable.just( input ).observeOn( Schedulers.io() );\n\n\n Observable<Integer> thing = observable.flatMap( new Func1<String, Observable<Integer>>() {\n\n @Override\n public Observable<Integer> call( final String s ) {\n List<Observable<Integer>> functions = new ArrayList<Observable<Integer>>();\n\n logger.info( \"Creating new set of observables in thread {}\",\n Thread.currentThread().getName() );\n\n for ( int i = 0; i < size; i++ ) {\n\n\n final int index = i;\n\n // create a new observable and execute the function on it.\n // These should happen in parallel when a subscription occurs\n\n /**\n * QUESTION: Should this again be the process thread, not the I/O\n */\n Observable<String> newObservable = Observable.just( input ).subscribeOn( Schedulers.io() );\n\n Observable<Integer> transformed = newObservable.map( new Func1<String, Integer>() {\n\n @Override\n public Integer call( final String s ) {\n\n final String threadName = Thread.currentThread().getName();\n\n logger.info( \"Invoking parallel task in thread {}\", threadName );\n\n// /**\n// * Simulate a Hystrix command making a call to an external resource. Invokes\n// * the Hystrix command immediately as the function is invoked. This is currently\n// * how we have to call Cassandra.\n// *\n// * TODO This needs to be re-written and evaluated once this PR is released https://github.com/Netflix/Hystrix/pull/209\n// */\n// return new HystrixCommand<Integer>( GROUP_KEY ) {\n// @Override\n// protected Integer run() throws Exception {\n//\n// final String threadName = Thread.currentThread().getName();\n//\n// logger.info( \"Invoking hystrix task in thread {}\", threadName );\n\n\n\n\n latch.countDown();\n\n try {\n latch.await();\n }\n catch ( InterruptedException e ) {\n throw new RuntimeException( \"Interrupted\", e );\n }\n\n// assertTrue( isExecutedInThread() );\n//\n// return index;\n// }\n// }.execute();\n\n return index;\n }\n } );\n\n functions.add( transformed );\n }\n\n /**\n * Execute the functions above and zip the results together\n */\n Observable<Integer> zipped = Observable.zip( functions, new FuncN<Integer>() {\n\n @Override\n public Integer call( final Object... args ) {\n\n logger.info( \"Invoking zip in thread {}\", Thread.currentThread().getName() );\n\n assertEquals( size, args.length );\n\n for ( int i = 0; i < args.length; i++ ) {\n assertEquals( \"Indexes are returned in order\", i, args[i] );\n }\n\n //just return our string\n return ( Integer ) args[args.length - 1];\n }\n } );\n\n return zipped;\n }\n } );\n\n\n final Integer last = thing.toBlocking().last();\n\n\n assertEquals( expected, last.intValue() );\n\n\n }", "public void f() {\n if (getAndIncrement() == 0) {\n SpscLinkedArrayQueue<Object> spscLinkedArrayQueue = this.c;\n Subscriber<?> subscriber = this.a;\n boolean z = true;\n int i2 = 1;\n while (!this.n) {\n if (this.g.get() != null) {\n spscLinkedArrayQueue.clear();\n this.d.dispose();\n h(subscriber);\n return;\n }\n boolean z2 = this.k.get() == 0;\n Integer num = (Integer) spscLinkedArrayQueue.poll();\n boolean z3 = num == null;\n if (z2 && z3) {\n this.e.clear();\n this.f.clear();\n this.d.dispose();\n subscriber.onComplete();\n return;\n } else if (z3) {\n i2 = addAndGet(-i2);\n if (i2 == 0) {\n return;\n }\n } else {\n Object poll = spscLinkedArrayQueue.poll();\n if (num == o) {\n int i3 = this.l;\n this.l = i3 + 1;\n this.e.put(Integer.valueOf(i3), poll);\n try {\n Object apply = this.h.apply(poll);\n Objects.requireNonNull(apply, \"The leftEnd returned a null Publisher\");\n Publisher publisher = (Publisher) apply;\n FlowableGroupJoin.c cVar = new FlowableGroupJoin.c(this, z, i3);\n this.d.add(cVar);\n publisher.subscribe(cVar);\n if (this.g.get() != null) {\n spscLinkedArrayQueue.clear();\n this.d.dispose();\n h(subscriber);\n return;\n }\n long j2 = this.b.get();\n long j3 = 0;\n for (TRight tright : this.f.values()) {\n try {\n Object obj = (Object) this.j.apply(poll, tright);\n Objects.requireNonNull(obj, \"The resultSelector returned a null value\");\n if (j3 != j2) {\n subscriber.onNext(obj);\n j3++;\n } else {\n ExceptionHelper.addThrowable(this.g, new MissingBackpressureException(\"Could not emit value due to lack of requests\"));\n spscLinkedArrayQueue.clear();\n this.d.dispose();\n h(subscriber);\n return;\n }\n } catch (Throwable th) {\n i(th, subscriber, spscLinkedArrayQueue);\n return;\n }\n }\n if (j3 != 0) {\n BackpressureHelper.produced(this.b, j3);\n }\n } catch (Throwable th2) {\n i(th2, subscriber, spscLinkedArrayQueue);\n return;\n }\n } else if (num == p) {\n int i4 = this.m;\n this.m = i4 + 1;\n this.f.put(Integer.valueOf(i4), poll);\n try {\n Object apply2 = this.i.apply(poll);\n Objects.requireNonNull(apply2, \"The rightEnd returned a null Publisher\");\n Publisher publisher2 = (Publisher) apply2;\n FlowableGroupJoin.c cVar2 = new FlowableGroupJoin.c(this, false, i4);\n this.d.add(cVar2);\n publisher2.subscribe(cVar2);\n if (this.g.get() != null) {\n spscLinkedArrayQueue.clear();\n this.d.dispose();\n h(subscriber);\n return;\n }\n long j4 = this.b.get();\n long j5 = 0;\n for (TLeft tleft : this.e.values()) {\n try {\n Object obj2 = (Object) this.j.apply(tleft, poll);\n Objects.requireNonNull(obj2, \"The resultSelector returned a null value\");\n if (j5 != j4) {\n subscriber.onNext(obj2);\n j5++;\n } else {\n ExceptionHelper.addThrowable(this.g, new MissingBackpressureException(\"Could not emit value due to lack of requests\"));\n spscLinkedArrayQueue.clear();\n this.d.dispose();\n h(subscriber);\n return;\n }\n } catch (Throwable th3) {\n i(th3, subscriber, spscLinkedArrayQueue);\n return;\n }\n }\n if (j5 != 0) {\n BackpressureHelper.produced(this.b, j5);\n }\n } catch (Throwable th4) {\n i(th4, subscriber, spscLinkedArrayQueue);\n return;\n }\n } else if (num == q) {\n FlowableGroupJoin.c cVar3 = (FlowableGroupJoin.c) poll;\n this.e.remove(Integer.valueOf(cVar3.c));\n this.d.remove(cVar3);\n } else {\n FlowableGroupJoin.c cVar4 = (FlowableGroupJoin.c) poll;\n this.f.remove(Integer.valueOf(cVar4.c));\n this.d.remove(cVar4);\n }\n z = true;\n }\n }\n spscLinkedArrayQueue.clear();\n }\n }", "private void handleEarlySubscribeReceived()\n {\n for(Jid from : earlySubscriptions.keySet())\n {\n handleSubscribeReceived(from, earlySubscriptions.get(from));\n }\n\n earlySubscriptions.clear();\n }", "@Override\n public void onSubscribe(String s, int i) {\n }", "@Override\r\n public void unsubscribe() {\n t.interrupt();\r\n }", "@Test\n public void testSPLPublishNoFilterWithSubscribe() throws Exception {\n final Topology t = new Topology();\n \n SPLStream source = SPLStreamsTest.testTupleStream(t);\n \n source = addStartupDelay(source);\n \n source.publish(\"testSPLPublishNoFilterSFilteredSubscribe\", false);\n \n SPLStream sub = SPLStreams.subscribe(t, \"testSPLPublishNoFilterSFilteredSubscribe\", source.getSchema());\n \n TStream<String> subscribe = sub.transform(new GetTupleId());\n\n completeAndValidate(subscribe, 20, \"SPL:0\", \"SPL:1\", \"SPL:2\", \"SPL:3\");\n }", "public void onNext(T r10) {\n /*\n r9 = this;\n r1 = 0;\n r8 = 1;\n r0 = r9.terminated;\n if (r0 == 0) goto L_0x0007;\n L_0x0006:\n return;\n L_0x0007:\n monitor-enter(r9);\n r0 = r9.terminated;\t Catch:{ all -> 0x000e }\n if (r0 == 0) goto L_0x0011;\n L_0x000c:\n monitor-exit(r9);\t Catch:{ all -> 0x000e }\n goto L_0x0006;\n L_0x000e:\n r0 = move-exception;\n monitor-exit(r9);\t Catch:{ all -> 0x000e }\n throw r0;\n L_0x0011:\n r0 = r9.emitting;\t Catch:{ all -> 0x000e }\n if (r0 == 0) goto L_0x002b;\n L_0x0015:\n r0 = r9.queue;\t Catch:{ all -> 0x000e }\n if (r0 != 0) goto L_0x0020;\n L_0x0019:\n r0 = new rx.observers.SerializedObserver$FastList;\t Catch:{ all -> 0x000e }\n r0.<init>();\t Catch:{ all -> 0x000e }\n r9.queue = r0;\t Catch:{ all -> 0x000e }\n L_0x0020:\n r1 = r9.nl;\t Catch:{ all -> 0x000e }\n r1 = r1.next(r10);\t Catch:{ all -> 0x000e }\n r0.add(r1);\t Catch:{ all -> 0x000e }\n monitor-exit(r9);\t Catch:{ all -> 0x000e }\n goto L_0x0006;\n L_0x002b:\n r0 = 1;\n r9.emitting = r0;\t Catch:{ all -> 0x000e }\n monitor-exit(r9);\t Catch:{ all -> 0x000e }\n r0 = r9.actual;\t Catch:{ Throwable -> 0x0046 }\n r0.onNext(r10);\t Catch:{ Throwable -> 0x0046 }\n L_0x0034:\n r2 = r1;\n L_0x0035:\n r0 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;\n if (r2 >= r0) goto L_0x0034;\n L_0x0039:\n monitor-enter(r9);\n r0 = r9.queue;\t Catch:{ all -> 0x0043 }\n if (r0 != 0) goto L_0x004f;\n L_0x003e:\n r0 = 0;\n r9.emitting = r0;\t Catch:{ all -> 0x0043 }\n monitor-exit(r9);\t Catch:{ all -> 0x0043 }\n goto L_0x0006;\n L_0x0043:\n r0 = move-exception;\n monitor-exit(r9);\t Catch:{ all -> 0x0043 }\n throw r0;\n L_0x0046:\n r0 = move-exception;\n r9.terminated = r8;\n r1 = r9.actual;\n rx.exceptions.Exceptions.throwOrReport(r0, r1, r10);\n goto L_0x0006;\n L_0x004f:\n r3 = 0;\n r9.queue = r3;\t Catch:{ all -> 0x0043 }\n monitor-exit(r9);\t Catch:{ all -> 0x0043 }\n r3 = r0.array;\n r4 = r3.length;\n r0 = r1;\n L_0x0057:\n if (r0 >= r4) goto L_0x007e;\n L_0x0059:\n r5 = r3[r0];\n if (r5 == 0) goto L_0x007e;\n L_0x005d:\n r6 = r9.nl;\t Catch:{ Throwable -> 0x006b }\n r7 = r9.actual;\t Catch:{ Throwable -> 0x006b }\n r5 = r6.accept(r7, r5);\t Catch:{ Throwable -> 0x006b }\n if (r5 == 0) goto L_0x007b;\n L_0x0067:\n r0 = 1;\n r9.terminated = r0;\t Catch:{ Throwable -> 0x006b }\n goto L_0x0006;\n L_0x006b:\n r0 = move-exception;\n r9.terminated = r8;\n rx.exceptions.Exceptions.throwIfFatal(r0);\n r1 = r9.actual;\n r0 = rx.exceptions.OnErrorThrowable.addValueAsLastCause(r0, r10);\n r1.onError(r0);\n goto L_0x0006;\n L_0x007b:\n r0 = r0 + 1;\n goto L_0x0057;\n L_0x007e:\n r0 = r2 + 1;\n r2 = r0;\n goto L_0x0035;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rx.observers.SerializedObserver.onNext(java.lang.Object):void\");\n }", "Spliterator<Event> subscribe(String origin, String type, Instant since, Consumer<Event> callback);", "@Test\n public void simplifiedFlowableDemo() {\n StringBuilder sb = new StringBuilder();\n\n Flowable<String> flowable = Flowable.create(new FlowableOnSubscribe<String>() {\n @Override\n public void subscribe(FlowableEmitter<String> flowableEmitter) throws Exception {\n flowableEmitter.onNext(\"a\");\n flowableEmitter.onNext(\"b\");\n flowableEmitter.onComplete();\n log.info(\"Result string is: {}\", sb.toString());\n }\n }, BackpressureStrategy.BUFFER);\n\n flowable.subscribe(new Consumer<String>() {\n @Override\n public void accept(String s) throws Exception {\n sb.append(s);\n log.info(\"append {}, new the sb is {}\", s, sb.toString());\n }\n });\n }", "public void tryTerminate() {\n if (wip.decrementAndGet() != 0) {\n return;\n }\n if (queue.isEmpty()) {\n completableSubscriber.onCompleted();\n } else {\n completableSubscriber.onError(CompletableOnSubscribeMerge.collectErrors(queue));\n }\n }", "interface Step {\n void onStepResult(boolean isSuccess);\n\n\n @Subscribe(threadMode = ThreadMode.MAIN)\n void onStepTryEvent(TryToCompleteStep step);\n\n}", "public static void main(String[] args) {\n System.out.println(\"Example of Observable.just()****\");\n Observable<String> justObs = Observable.just(\"one\", \"two\", \"three\", \"four\");\n justObs.subscribe(v -> System.out.println(\"Received:\" + v), e -> System.out.println(e), () -> System.out.println(\"Completed\"));\n\n System.out.println(\"\\nExample of Observable.create()****\");\n Observable<String> createdObs = Observable.create(o -> {\n o.onNext(\"Hello\");\n o.onCompleted();\n });\n createdObs.subscribe(System.out::println, e -> System.out.println(e), () -> System.out.println(\"Completed\"));\n\n System.out.println(\"\\nConverting FutureTask into Observable****\");\n FutureTask<Integer> task = new FutureTask<>(() -> {\n Thread.sleep(3000);\n return 28;\n });\n new Thread(task).start();\n\n Observable<Integer> futureObs = Observable.from(task);\n Subscription subscription = futureObs.subscribe(v -> System.out.println(\"Received :\" + v), e -> System.out.println(\"Error :\" + e),\n () -> System.out.println(\"Completed\"));\n\n System.out.println(\"\\nConverting Integer array into Observable****\");\n Integer[] in = new Integer[] { 1, 2, 3 };\n\n Observable<Integer> integerObs = Observable.from(in);\n Subscription arraySub = integerObs.subscribe(v -> System.out.println(\"Received :\" + v), e -> System.out.println(\"Error :\" + e),\n () -> System.out.println(\"Completed\"));\n }", "public static void buffer() {\n\n List<String> data = Utils.getData();\n\n int numberOfBuffers = 11;\n\n CountDownLatch latch = new CountDownLatch(numberOfBuffers);\n\n\n Observable.fromIterable(data).buffer(3).subscribe(new MyObserver<>(latch));\n\n Observable.fromIterable(data).buffer(2, 3).subscribe(new MyObserver<>(latch));\n\n Observable.fromIterable(data).buffer(2, 3, ArrayList::new).subscribe(new MyObserver<>(latch));\n\n Observable.fromIterable(data).buffer(2, HashSet::new).subscribe(new MyObserver<>(latch));\n\n /*\n Opening and closing windows defined\n */\n Observable.fromIterable(data).buffer((observer) -> {\n System.out.println(\"opening\");\n // Starts buffer collection window\n // For every onNext a buffer window is created.\n observer.onNext(\"opening-1\");\n observer.onNext(\"opening-2\");\n }, (value) -> {\n System.out.println(\"closing, value = \" + value);\n // Closes buffer collection window\n // Gets invoked for each onNext in opening indicator\n return Observable.just(value).delay(100L, TimeUnit.MICROSECONDS);\n }, HashSet::new).subscribe(new MyObserver<>(latch));\n\n /*\n Buffer with boundary observable\n */\n Observable.fromIterable(data).buffer((Observer<? super Integer> observer) -> {\n System.out.println(\"onNext - 1\");\n observer.onNext(1);\n observer.onNext(2);\n }).subscribe(new MyObserver<>(latch));\n\n /*\n 1. Buffer with boundary observable by providing some other in built observable\n 2. Create a buffer of 100 Microseconds\n */\n Observable.fromIterable(data)\n .buffer(Observable.interval(100L, TimeUnit.MICROSECONDS))\n .subscribe(new MyObserver<>(latch));\n\n Observable.fromIterable(data)\n .buffer(Observable.interval(100L, TimeUnit.MICROSECONDS), 4)\n .subscribe(new MyObserver<>(latch));\n\n Observable.fromIterable(data)\n .buffer(Observable.interval(100L, TimeUnit.MICROSECONDS), () -> new HashSet<>())\n .subscribe(new MyObserver<>(latch));\n\n\n /*\n Boundary supplier is being passed from callable.\n */\n Observable.fromIterable(data)\n .buffer(() -> Observable.interval(100L, TimeUnit.MICROSECONDS))\n .subscribe(new MyObserver<>(latch));\n\n\n Observable.fromIterable(data)\n .buffer(() -> Observable.interval(100L, TimeUnit.MICROSECONDS), HashSet::new)\n .subscribe(new MyObserver<>(latch));\n\n try {\n latch.await();\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n }", "public static void main(String[] args) throws InterruptedException {\n Flux<Long> hotPublisher = Flux.interval(Duration.ofMillis(200));\n //making it a hotflux and adding element delay time\n ConnectableFlux<Long> connectableFlux = hotPublisher.publish();\n //connecting to first sub\n connectableFlux.subscribe(x -> System.out.println(\"hotFlux1: \" + x));\n connectableFlux.connect();\n //waiting for 500ms to skip some stream\n Thread.sleep(500);\n // subscribing to next subscriber\n connectableFlux.subscribe(x -> System.out.println(\"\\thotFlux2: \" + x));\n // blocking main thread\n Thread.sleep(600);\n\n\n }", "@Test\n public void testSPLPublishAllowFilterWithSubscribe() throws Exception {\n final Topology t = new Topology();\n \n SPLStream source = SPLStreamsTest.testTupleStream(t);\n \n source = addStartupDelay(source);\n \n source.publish(\"testSPLPublishAllowFilterWithSubscribe\", true);\n \n SPLStream sub = SPLStreams.subscribe(t, \"testSPLPublishAllowFilterWithSubscribe\", source.getSchema());\n \n TStream<String> subscribe = sub.transform(new GetTupleId());\n\n completeAndValidate(subscribe, 20, \"SPL:0\", \"SPL:1\", \"SPL:2\", \"SPL:3\");\n }", "@Override\n public void onNext(final T value) {\n innerHandler.onNext(value);\n idlenessSource.check();\n }", "public void subscribe( Observer< S, Info > obs );", "void disposeObservable();", "@Override\n public void subscribe(ObservableEmitter<String> emitter) throws Exception {\n Log.e(TAG, \"emitter===\" + emitter);\n Log.e(TAG, Thread.currentThread().getName());\n emitter.onNext(\"AAAAAAAAA\");\n\n }", "@Override\n public void onDrainComplete()\n {\n }", "private void m125715i() {\n RxBus.m86979a().mo84365a(TopicReviewClickEvent.class, this).compose(bindUntilEvent(FragmentEvent.DESTROY_VIEW)).observeOn(AndroidSchedulers.m147557a()).subscribe(new AbstractC31735g() {\n /* class com.zhihu.android.topic.platfrom.$$Lambda$TopicFragment$ilStsapfhY6AmqXsirZvIVpDyM */\n\n @Override // p2189io.reactivex.p2209c.AbstractC31735g\n public final void accept(Object obj) {\n TopicFragment.this.m125688a((TopicFragment) ((TopicReviewClickEvent) obj));\n }\n }, $$Lambda$9kS41GgiqU3yr14QLLPITIizPGM.INSTANCE);\n RxBus.m86979a().mo84365a(TopicActiveAnswererShareEvent.class, this).compose(bindUntilEvent(FragmentEvent.DESTROY_VIEW)).observeOn(AndroidSchedulers.m147557a()).subscribe(new AbstractC31735g() {\n /* class com.zhihu.android.topic.platfrom.$$Lambda$TopicFragment$BjK9qQqNBfZ6wBlmaowQpTV4GyQ */\n\n @Override // p2189io.reactivex.p2209c.AbstractC31735g\n public final void accept(Object obj) {\n TopicFragment.this.m125687a((TopicFragment) ((TopicActiveAnswererShareEvent) obj));\n }\n }, $$Lambda$9kS41GgiqU3yr14QLLPITIizPGM.INSTANCE);\n RxBus.m86979a().mo84365a(TopicActiveAnswererJumpEvent.class, this).compose(bindUntilEvent(FragmentEvent.DESTROY_VIEW)).observeOn(AndroidSchedulers.m147557a()).subscribe(new AbstractC31735g() {\n /* class com.zhihu.android.topic.platfrom.$$Lambda$TopicFragment$_g34FcL5FmfymiORzp8CR0wVoH8 */\n\n @Override // p2189io.reactivex.p2209c.AbstractC31735g\n public final void accept(Object obj) {\n TopicFragment.this.m125686a((TopicFragment) ((TopicActiveAnswererJumpEvent) obj));\n }\n }, $$Lambda$9kS41GgiqU3yr14QLLPITIizPGM.INSTANCE);\n }", "public void mo130020b() {\n if (getAndIncrement() == 0) {\n AbstractC32175x<? super R> xVar = this.f109109a;\n ErrorMode iVar = this.f109114f;\n SimplePlainQueue<T> iVar2 = this.f109113e;\n AtomicThrowable cVar = this.f109111c;\n int i = 1;\n while (true) {\n if (this.f109117i) {\n iVar2.clear();\n this.f109118j = null;\n } else {\n int i2 = this.f109119k;\n if (cVar.get() == null || !(iVar == ErrorMode.IMMEDIATE || (iVar == ErrorMode.BOUNDARY && i2 == 0))) {\n boolean z = false;\n if (i2 == 0) {\n boolean z2 = this.f109116h;\n T poll = iVar2.poll();\n if (poll == null) {\n z = true;\n }\n if (z2 && z) {\n Throwable a = cVar.mo130469a();\n if (a == null) {\n xVar.onComplete();\n return;\n } else {\n xVar.onError(a);\n return;\n }\n } else if (!z) {\n try {\n MaybeSource oVar = (MaybeSource) ObjectHelper.m147684a(this.f109110b.apply(poll), \"The mapper returned a null MaybeSource\");\n this.f109119k = 1;\n oVar.mo130568a(this.f109112d);\n } catch (Throwable th) {\n C31732b.m147608b(th);\n this.f109115g.dispose();\n iVar2.clear();\n cVar.mo130470a(th);\n xVar.onError(cVar.mo130469a());\n return;\n }\n }\n } else if (i2 == 2) {\n R r = this.f109118j;\n this.f109118j = null;\n xVar.onNext(r);\n this.f109119k = 0;\n }\n }\n }\n i = addAndGet(-i);\n if (i == 0) {\n return;\n }\n }\n iVar2.clear();\n this.f109118j = null;\n xVar.onError(cVar.mo130469a());\n }\n }", "public static void error() {\n Observable<String> myObservable = Observable.error(\n () -> new Exception(\"Exception from error observable\"));\n myObservable.subscribe(genericObserver1);\n }", "private void subscribeHandler(MqttSubscribeMessage subscribe) {\n\n final int messageId = subscribe.messageId();\n LOG.info(\"SUBSCRIBE [{}] from MQTT client {}\", messageId, this.mqttEndpoint.clientIdentifier());\n\n // sending AMQP_SUBSCRIBE\n\n List<AmqpTopicSubscription> topicSubscriptions =\n subscribe.topicSubscriptions().stream().map(topicSubscription -> {\n return new AmqpTopicSubscription(topicSubscription.topicName(), topicSubscription.qualityOfService());\n }).collect(Collectors.toList());\n\n AmqpSubscribeMessage amqpSubscribeMessage =\n new AmqpSubscribeMessage(this.mqttEndpoint.clientIdentifier(),\n topicSubscriptions);\n\n this.ssEndpoint.sendSubscribe(amqpSubscribeMessage, done -> {\n\n if (done.succeeded()) {\n\n ProtonDelivery delivery = done.result();\n\n List<MqttQoS> grantedQoSLevels = null;\n if (delivery.getRemoteState() == Accepted.getInstance()) {\n\n // QoS levels requested are granted\n grantedQoSLevels = amqpSubscribeMessage.topicSubscriptions().stream().map(topicSubscription -> {\n return topicSubscription.qos();\n }).collect(Collectors.toList());\n\n // add accepted topic subscriptions to the local collection\n amqpSubscribeMessage.topicSubscriptions().stream().forEach(amqpTopicSubscription -> {\n this.grantedQoSLevels.put(amqpTopicSubscription.topic(), amqpTopicSubscription.qos());\n });\n\n } else {\n\n // failure for all QoS levels requested\n grantedQoSLevels = new ArrayList<>(Collections.nCopies(amqpSubscribeMessage.topicSubscriptions().size(), MqttQoS.FAILURE));\n }\n\n this.mqttEndpoint.subscribeAcknowledge(messageId, grantedQoSLevels);\n\n LOG.info(\"SUBACK [{}] to MQTT client {}\", messageId, this.mqttEndpoint.clientIdentifier());\n }\n });\n }", "public abstract void onNext();", "@Override\n public void onPSubscribe(String s, int i) {\n }", "public interface ReactiveRateLimiter {\n\n Observable<Boolean> overLimitReactive(String key);\n\n Observable<Boolean> overLimitReactive(String key, int weight);\n\n Observable<Boolean> resetLimitReactive(String key);\n}" ]
[ "0.65969926", "0.6592323", "0.6512352", "0.64627105", "0.6421476", "0.6415927", "0.63939923", "0.63859975", "0.6285857", "0.6285857", "0.6285857", "0.6285857", "0.6285857", "0.6285857", "0.6248471", "0.62342143", "0.60566074", "0.6052173", "0.60135204", "0.60032225", "0.5993417", "0.58996576", "0.5898748", "0.58856726", "0.5881665", "0.5852323", "0.5847571", "0.5846757", "0.5840905", "0.58031267", "0.58015925", "0.5801311", "0.57765186", "0.57317156", "0.5718323", "0.56948394", "0.56526965", "0.56239486", "0.560477", "0.56018764", "0.55833906", "0.55755216", "0.5559447", "0.5534848", "0.5529847", "0.5529721", "0.55207896", "0.55203474", "0.55155087", "0.55120814", "0.5511602", "0.5503091", "0.5488581", "0.54697347", "0.54686165", "0.5460548", "0.5459192", "0.5456677", "0.5456154", "0.5455675", "0.5453335", "0.5424759", "0.5422334", "0.541312", "0.54072934", "0.540326", "0.5401144", "0.5384444", "0.5379897", "0.5378093", "0.5374907", "0.53609943", "0.53416103", "0.53286356", "0.52909565", "0.529091", "0.5273731", "0.5270155", "0.52578497", "0.52493984", "0.5229808", "0.5215876", "0.52153695", "0.5212147", "0.5205271", "0.51466495", "0.513514", "0.5125686", "0.51252973", "0.5124825", "0.51216835", "0.5120335", "0.51192343", "0.51119167", "0.51068276", "0.5106473", "0.5087104", "0.5086583", "0.5081075", "0.5080003" ]
0.52707535
77
scio:descriptionSource doi: 10.1038/sc.2014.91 rdfs:label distractor devices rdfs:description Distractor Device is a device used for distraction models of spinal cord injury which involve controlled stretching of the cord aiming to simulate the tension forces experienced by the cord in spinal cord injury.
@AssignableSubInterfaces(get={}) @ImplementationClass(get=DistractorDevices.class) public interface IDistractorDevices extends IInjuryDevice{ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void readTechSentence(FileProcessor fp) {\n\t\tHelper.getSentence(fp, \"src/troubleShootSearch/dSeaGate/productC.txt\", techSentence);\n\t}", "@Beta\npublic interface OdtnDeviceDescriptionDiscovery\n extends DeviceDescriptionDiscovery {\n\n /**\n * Annotations key intended for an OpenConfig generic component, which stores component name.\n * Typically used for Ports\n */\n String OC_NAME = \"oc-name\";\n\n /**\n * Annotations key intended for an OpenConfig generic component, which stores component type.\n */\n String OC_TYPE = \"oc-type\";\n\n /**\n * Annotations key intended for a Port, which stores OpenConfig optical channel component associated to the port.\n */\n String OC_OPTICAL_CHANNEL_NAME = \"oc-optical-channel-name\";\n\n /**\n * Annotations key intended for a Port, which stores OpenConfig transceiver associated to the port.\n */\n String OC_TRANSCEIVER_NAME = \"oc-transceiver-name\";\n\n\n /**\n * Annotations key intended for a Port, which stores OpenConfig logical channel associated to the port.\n */\n String OC_LOGICAL_CHANNEL = \"oc-logical-channel\";\n\n /**\n * Annotations key intended for a Port,\n * which stores string identifier used to\n * logically group Ports corresponding to a transponder, etc.\n */\n String CONNECTION_ID = \"odtn-connection-id\";\n\n /**\n * Annotations key for a Port,\n * which describes role of the port annotated.\n * Value must be one of “client” or “line”.\n *\n * @see OdtnPortType\n */\n String PORT_TYPE = \"odtn-port-type\";\n\n enum OdtnPortType {\n CLIENT(\"client\"),\n LINE(\"line\");\n\n private final String value;\n\n OdtnPortType(String value) {\n this.value = value;\n }\n\n /**\n * Returns the value to be used as Annotations value.\n * @return value\n */\n public String value() {\n return value;\n }\n\n /**\n * Returns the corresponding enum value from a string value.\n * @param value to look up\n * @return OdtnPortType\n *\n * @throws NullPointerException if {@code value} was null\n * @throws IllegalArgumentException if non-OdtnPortValue was given\n */\n public static OdtnPortType fromValue(String value) {\n checkNotNull(value);\n if (value.equalsIgnoreCase(CLIENT.value())) {\n return CLIENT;\n } else if (value.equalsIgnoreCase(LINE.value())) {\n return LINE;\n } else {\n throw new IllegalArgumentException(\"Invalid value: \" + value);\n }\n }\n }\n\n /**\n * OpenConfig component property name to store,\n * decimal integer index to be used when creating PortNumber.\n * <p>\n * Optional if providing original implementation other than\n * odtn-driver supplied driver.\n */\n String ONOS_PORT_INDEX = \"onos-index\";\n\n // overriding just to make checkstyle happy\n @Override\n List<PortDescription> discoverPortDetails();\n\n}", "public interface InformationSource {\n\n /**\n * Returns a string suitable for citing this source.\n *\n * @return a string suitable for citing this source.\n */\n String getCitationString();\n\n /**\n *\n * @return the CycL term representing this source.\n */\n DenotationalTerm getCycL();\n\n /**\n * Returns a graphical representation of this source.\n *\n * @return a graphical representation of this source.\n */\n /*\n public Image getIcon() {\n return icon;\n }\n */\n URL getIconURL();\n \n public interface CitationGenerator {\n /**\n * Ask Cyc for an image for the citation string to use for the specified source.\n *\n * @param source\n * @param cycAccess\n * @return the citation string\n */\n public String getCitationStringForSource(DenotationalTerm source,\n CycAccess cycAccess) throws CycConnectionException;\n }\n \n}", "public String getDeviceDescription() {\r\n return deviceDesc;\r\n }", "@Override\n\tpublic String getDesription() {\n\t\treturn \"Implemented by Dong Zihe and Huang Haowei based on \\\"Dong Z, Wen L, Huang H, et al. \"\n\t\t\t\t+ \"CFS: A Behavioral Similarity Algorithm for Process Models Based on \"\n\t\t\t\t+ \"Complete Firing Sequences[C]//On the Move to Meaningful Internet Systems: \"\n\t\t\t\t+ \"OTM 2014 Conferences. Springer Berlin Heidelberg, 2014: 202-219.\\\"\";\n\t}", "public String getSrcDistributionNotes() {\r\n return (String) getAttributeInternal(SRCDISTRIBUTIONNOTES);\r\n }", "@Override\r\n public void onDeviceDescription(GenericDevice dev, PDeviceHolder devh,\r\n String desc) {\n\r\n }", "public void setDESCRIPTION(java.lang.CharSequence value) {\n this.DESCRIPTION = value;\n }", "private Disc() {\n super(\"\");\n barcode = \"\";\n director = \"\";\n fsk = 0;\n }", "private Descriptor parseDescriptorLine(String line) {\n\t\tDescriptor result = new Descriptor();\n\t\t// set descriptor name\n\t\tString descName = parseDescrName(line);\n\t\tresult.setName(descName);\n\t\tString dom = descName.substring(0, 6);\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\t// 226-253;184-204\n\t\tString[] tokensA = tokens[1].split(\";\");\n\t\tInteger start1 = Integer.valueOf(tokensA[0].replaceFirst(\"-\\\\d+\", \"\")); // 226\n\t\tInteger start2 = Integer.valueOf(tokensA[1].replaceFirst(\"-\\\\d+\", \"\")); // 184\n\t\t// 0_0:-5_-8\n\t\ttokens[4] = tokens[4].replaceAll(\"0_0:\", \"\");\n\t\tString[] shifts = tokens[4].split(\"_\");\n\t\tint shift1 = Integer.valueOf(shifts[0]);\n\t\tint shift2 = Integer.valueOf(shifts[1]);\n\t\tstart1 = start1 - shift1;\n\t\tstart2 = start2 - shift2;\n\n\t\tint end1 = start1 + tokens[2].length() - 1;\n\t\tint end2 = start2 + tokens[3].length() - 1;\n\n\t\tString seq1;\n\t\tString seq2;\n\t\ttry {\n\t\t\tseq1 = fastaSeqs.get(dom).substring(start1, end1 + 1);\n\t\t\tseq2 = fastaSeqs.get(dom).substring(start2, end2 + 1);\n\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\treturn null;\n\t\t}\n\t\tString SSeq1;\n\t\tString SSeq2;\n\t\ttry {\n\t\t\tSSeq1 = SS_Seqs.get(dom).substring(start1, end1 + 1);\n\t\t\tSSeq2 = SS_Seqs.get(dom).substring(start2, end2 + 1);\n\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString startAddr1 = hashResMapInt2Str.get(dom).get(start1);\n\t\tString endAddr1 = hashResMapInt2Str.get(dom).get(end1);\n\n\t\tString startAddr2 = hashResMapInt2Str.get(dom).get(start2);\n\t\tString endAddr2 = hashResMapInt2Str.get(dom).get(end2);\n\n\t\tSegment segm1 = new Segment();\n\t\tsegm1.setStart(startAddr1);\n\t\tsegm1.setStartFastaNo(start1);\n\t\tsegm1.setEnd(endAddr1);\n\t\tsegm1.setEndFastaNo(end1);\n\t\tsegm1.setSeq(seq1);\n\t\tsegm1.setSSSeq(SSeq1);\n\n\t\tSegment segm2 = new Segment();\n\t\tsegm2.setStart(startAddr2);\n\t\tsegm2.setStartFastaNo(start2);\n\t\tsegm2.setEnd(endAddr2);\n\t\tsegm2.setEndFastaNo(end2);\n\t\tsegm2.setSeq(seq2);\n\t\tsegm2.setSSSeq(SSeq2);\n\n\t\tList<Segment> segments = new ArrayList<Segment>();\n\t\t// switch the order of segments\n\t\tsegments.add(segm2);\n\t\tsegments.add(segm1);\n\t\tresult.setSegments(segments);\n\t\ttry{\n\t\t\tresult.setFoldAstral(hashFold.get(dom));\n\t\t} catch(NullPointerException e){\n\t\t\t// do nothing i this case\n\t\t}\n\t\treturn result;\n\t}", "io.dstore.values.StringValue getCharacteristicDescription();", "public void setSrcDistributionNotes(String value) {\r\n setAttributeInternal(SRCDISTRIBUTIONNOTES, value);\r\n }", "public static String getProvenanceRDF(Configuration c){\n String provURI = c.getThisVersion();\n if(provURI==null || provURI.equals(\"\")){\n provURI = \"..\\\\index.html\";\n }\n String provrdf = \"@prefix prov: <http://www.w3.org/ns/prov#> .\\n\"\n + \"@prefix dc: <http://purl.org/dc/terms/> .\\n\"\n + \"@prefix foaf: <http://xmlns.com/foaf/0.1/> .\\n\";\n provrdf+=\"<\"+provURI+\"> a prov:Entity;\\n\";\n if(c.getTitle()!=null &&!\"\".equals(c.getTitle())){\n provrdf+= \"\\t dc:title \\\"\"+c.getTitle()+\"\\\";\\n\";\n }\n if(!c.getCreators().isEmpty()){\n Iterator<Agent> creators = c.getCreators().iterator();\n while(creators.hasNext()){\n //me quedo aqui. Hay que cambiar todo. Quizas la responsabilidad puedo pasar, o asumir que todos los agentes itenen uris. Si no es un rollo\n Agent currCreator = creators.next();\n if(currCreator.getURL()!=null && !\"\".equals(currCreator.getURL())){\n provrdf+= \"\\t prov:wasAttributedTo <\"+currCreator.getURL()+\">;\\n\";\n provrdf+= \"\\t dc:creator <\"+currCreator.getURL()+\">;\\n\";\n }else{\n provrdf+= \"\\t prov:wasAttributedTo [ a prov:Agent; foaf:name \\\"\"+currCreator.getName()+\"\\\".];\\n\";\n }\n }\n }\n if(!c.getContributors().isEmpty()){\n Iterator<Agent> contrib = c.getContributors().iterator();\n while(contrib.hasNext()){\n Agent currContrib = contrib.next();\n if(currContrib.getURL()!=null && !\"\".equals(currContrib.getURL())){\n provrdf+= \"\\t prov:wasAttributedTo <\"+currContrib.getURL()+\">;\\n\";\n provrdf+= \"\\t dc:contributor <\"+currContrib.getURL()+\">;\\n\";\n }else{\n provrdf+= \"\\t prov:wasAttributedTo [ a prov:Agent; foaf:name \\\"\"+currContrib.getName()+\"\\\".];\\n\";\n }\n }\n }\n provrdf+= \"\\t prov:wasAttributedTo <https://github.com/dgarijo/Widoco/>,<http://www.essepuntato.it/lode/>;\\n\";\n if(c.getLatestVersion()!=null &&!\"\".equals(c.getLatestVersion())){\n provrdf+=\"\\t prov:specializationOf <\"+c.getLatestVersion()+\">;\\n\";\n }\n if(c.getPreviousVersion()!=null &&!\"\".equals(c.getPreviousVersion())){\n provrdf+=\"\\t prov:wasRevisionOf <\"+c.getPreviousVersion()+\">;\\n\";\n } \n if(c.getReleaseDate()!=null &&!\"\".equals(c.getReleaseDate())){\n provrdf+=\"\\t prov:wasGeneratedAt \\\"\"+c.getReleaseDate()+\"\\\".\\n\";\n }\n return provrdf;\n }", "public String getDescr() {\r\n return descr;\r\n }", "public void readDescription() throws IOException {\n while (!shouldStop()) {\n String word = next();\n if (word != \"\") {\n // System.out.println(word);\n temps.add(word);\n }\n }\n c = r.read();\n }", "public void setDescr(String descr) {\r\n this.descr = descr;\r\n }", "@Override \n\t public String getDescription() {\n\t \t return \"(*.MXD)\"; \n\t }", "public String description() {\r\n\t\treturn \"This is the Vancarrier_1st_P_Model description,\" + \"which means it is the first VanCarrier model in a \"\r\n\t\t\t\t+ \"process oriented version.\" + \" \" + \"This model is a service station model located at a \"\r\n\t\t\t\t+ \"container harbour. Conatinertrucks will arrive and \"\r\n\t\t\t\t+ \"require the loading of a container. A Vancarrier (VC) is \"\r\n\t\t\t\t+ \"on duty and will head off to find the required container \"\r\n\t\t\t\t+ \"in the storage. He will then deliver the container to the \"\r\n\t\t\t\t+ \"truck. The truck then leaves the area.\" + \"In case the VC is busy, the truck waits \"\r\n\t\t\t\t+ \"for his turn on the parking-lot.\" + \"If the VC is idle, it waits on his own parking spot for the \"\r\n\t\t\t\t+ \"truck to come.\";\r\n\t}", "public String getDescr() {\n\t\treturn _descr;\n\t}", "public String getDescr() {\n\t\treturn _descr;\n\t}", "SensorDescription(){\n\n }", "java.lang.String getDesc();", "private String parseDescrName(String line) {\n\t\t// d1f74a_ 201-209;3-11 DGAIGSTFN LKGIFSALL #7\n\t\t// d1nvra_ 226-253;184-204 IDSAPLALL GIVLTAMLA 0_0:-5_-8 0.477587\n\t\t// GroupName is created as name of domain (remove proceeding 'd') + pdb\n\t\t// number of the first residue\n\t\t// in the second segment (3-11 in the example) increased by 10000 + '_'\n\t\t// + number of cluster (7 in the case)\n\t\t// the residue with fasta number 3 is translated into address A4_ - so\n\t\t// the pdb number is 4\n\t\t// finally the group name will be 1f74a_#10004_7\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tString dom = tokens[0].substring(1);\n\t\tString noClust = \"\";\n\t\t@SuppressWarnings(\"unused\")\n\t\tint shift1 = 0; // segment1 shift\n\t\tint shift2 = 0; // segment2 shift\n\t\ttry {\n\t\t\tif (tokens[4].startsWith(\"#\")) {\n\t\t\t\tnoClust = \"_\" + tokens[4].substring(1);\n\t\t\t} else {\n\t\t\t\tnoClust = \"\";\n\t\t\t}\n\t\t\tif (tokens[4].startsWith(\"0_0\")) {\n\t\t\t\ttokens[4] = tokens[4].replaceFirst(\"0_0:\", \"\");\n\t\t\t\tString[] shifts = tokens[4].split(\"_\");\n\t\t\t\tshift1 = Integer.valueOf(shifts[0]);\n\t\t\t\tshift2 = Integer.valueOf(shifts[1]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// do nothing keep default values\n\t\t}\n\t\t// get the first number of second segment : e.g. 3 from 201-209;3-11\n\t\tString[] tokensA = tokens[1].split(\";\");\n\t\tString[] tokensB = tokensA[1].split(\"-\");\n\t\tInteger fastaNo = (Integer.valueOf(tokensB[0]) - shift2 >= 0 ? Integer\n\t\t\t\t.valueOf(tokensB[0]) - shift2 : Integer.valueOf(tokensB[0]));\n\n\t\t// get pdb address\n\t\tString pdbResAddr = hashResMapInt2Str.get(dom).get(fastaNo);\n\t\tpdbResAddr = pdbResAddr.substring(1, pdbResAddr.length() - 1);\n\t\tint pdbResNo = Integer.valueOf(pdbResAddr);\n\n\t\treturn (dom + \"#\" + (10000 + pdbResNo) + noClust);\n\t}", "public String readDeviceSN(){\r\n return mFactoryBurnUtil.readDeviceSN();\r\n }", "public String getDescription() {\n return sdesc;\n }", "@Override\n\tprotected void setup() {\n\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\tdfd.setName(getAID());\n\t\tServiceDescription sd = new ServiceDescription();\n\t\tsd.setType(\"supplier\");\n\t\tsd.setName(getLocalName() + \"-supplier-agent\");\n\t\tdfd.addServices(sd);\n\t\ttry{\n\t\t\tDFService.register(this, dfd);\n\t\t}\n\t\tcatch(FIPAException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tgetContentManager().registerLanguage(codec);\n\t\tgetContentManager().registerOntology(ontology);\n\t\targs = (String[])this.getArguments();\n\n\t\tbuyerAID = new AID(\"manufacturer\",AID.ISLOCALNAME);\n\n\t\tif(args[0] == \"zero\") {\n\t\t\tScreen screen = new Screen();\n\t\t\tscreen.setInch(\"5inch\");\n\t\t\tscreen.setSerialNumber(101);\n\t\t\tcomponents.add(screen.getSerialNumber());\n\t\t\tBattery battery = new Battery();\n\t\t\tbattery.setSerialNumber(201);\n\t\t\tbattery.setCapacity(\"2000mAh\");\n\n\t\t\tcomponents.add(battery.getSerialNumber());\n\n\t\t\tRAM ram = new RAM();\n\t\t\tram.setSerialNumber(301);\n\t\t\tram.setAmmount(\"4Gb\");\n\t\t\tcomponents.add(ram.getSerialNumber());\n\n\t\t\tStorage storage = new Storage();\n\t\t\tstorage.setSpace(\"64GB\");\n\t\t\tstorage.setSerialNumber(401);\n\t\t\tcomponents.add(storage.getSerialNumber());\n\n\t\t\tScreen screen2 = new Screen();\n\t\t\tscreen2.setInch(\"7inch\");\n\t\t\tscreen2.setSerialNumber(102);\n\t\t\tcomponents.add(screen2.getSerialNumber());\n\n\t\t\tBattery battery2 = new Battery();\n\t\t\tbattery2.setCapacity(\"3000mAh\");\n\t\t\tbattery2.setSerialNumber(202);\n\t\t\tcomponents.add(battery2.getSerialNumber());\n\n\t\t\tRAM ram2 = new RAM();\n\t\t\tram2.setAmmount(\"8Gb\");\n\t\t\tram2.setSerialNumber(302);\n\t\t\tcomponents.add(ram2.getSerialNumber());\n\n\t\t\tStorage storage2 = new Storage();\n\t\t\tstorage2.setSpace(\"256GB\");\n\t\t\tstorage2.setSerialNumber(402);\n\t\t\tcomponents.add(storage2.getSerialNumber());\n\t\t}else {\n\n\t\t\tRAM ram = new RAM();\n\t\t\tram.setAmmount(\"4Gb\");\n\t\t\tram.setSerialNumber(301);\n\t\t\tcomponents.add(ram.getSerialNumber());\n\n\t\t\tStorage storage = new Storage();\n\t\t\tstorage.setSpace(\"64GB\");\n\t\t\tstorage.setSerialNumber(401);\n\t\t\tcomponents.add(storage.getSerialNumber());\n\n\t\t\tRAM ram2 = new RAM();\n\t\t\tram2.setAmmount(\"8Gb\");\n\t\t\tram2.setSerialNumber(302);\n\t\t\tcomponents.add(ram2.getSerialNumber());\n\n\t\t\tStorage storage2 = new Storage();\n\t\t\tstorage2.setSpace(\"256GB\");\n\t\t\tstorage2.setSerialNumber(402);\n\t\t\tcomponents.add(storage2.getSerialNumber());\n\n\t\t}\n\n\t\t/*\n\t\tif(args[0] == \"1\") {\n\t\t\tScreen screen = new Screen();\n\t\t\tscreen.setInch(\"5inch\");\n\t\t\tcomponents.put(screen.getSerialNumber(),screen);\n\n\t\t\tBattery battery = new Battery();\n\t\t\tbattery.setCapacity(\"2000mAh\");\n\t\t\tcomponents.put(battery.getSerialNumber(),battery);\n\n\t\t\tRAM ram = new RAM();\n\t\t\tram.setAmmount(\"4Gb\");\n\t\t\tcomponents.put(ram.getSerialNumber(),ram);\n\n\t\t\tStorage storage = new Storage();\n\t\t\tstorage.setSpace(\"64GB\");\n\t\t\tcomponents.put(storage.getSerialNumber(),storage);\n\n\t\t\tScreen screen2 = new Screen();\n\t\t\tscreen2.setInch(\"7inch\");\n\t\t\tcomponents.put(screen2.getSerialNumber(),screen2);\n\n\t\t\tBattery battery2 = new Battery();\n\t\t\tbattery2.setCapacity(\"3000mAh\");\n\t\t\tcomponents.put(battery2.getSerialNumber(),battery2);\n\n\t\t\tRAM ram2 = new RAM();\n\t\t\tram2.setAmmount(\"8Gb\");\n\t\t\tcomponents.put(ram2.getSerialNumber(),ram2);\n\n\t\t\tStorage storage2 = new Storage();\n\t\t\tstorage2.setSpace(\"256GB\");\n\t\t\tcomponents.put(storage2.getSerialNumber(),storage2);\n\t\t}else {\n\n\t\t\tRAM ram = new RAM();\n\t\t\tram.setAmmount(\"4Gb\");\n\t\t\tcomponents.put(ram.getSerialNumber(),ram);\n\n\t\t\tStorage storage = new Storage();\n\t\t\tstorage.setSpace(\"64GB\");\n\t\t\tcomponents.put(storage.getSerialNumber(),storage);\n\n\t\t\tRAM ram2 = new RAM();\n\t\t\tram2.setAmmount(\"8Gb\");\n\t\t\tcomponents.put(ram2.getSerialNumber(),ram2);\n\n\t\t\tStorage storage2 = new Storage();\n\t\t\tstorage2.setSpace(\"256GB\");\n\t\t\tcomponents.put(storage2.getSerialNumber(),storage2);\n\n\t\t}\n\n\t\t */\n\n\n\t\taddBehaviour(new TickerWaiter(this));\n\t}", "public void \n setSourceDescription( SourceDescription[] sourceDesc);", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "public abstract void sessionDescription(String sd) throws ParseException;", "@Override\n\tpublic String getShortDescription() {\n\t\t\n\t\tif (this.getSymbol() == \"R2\") {\n\t\t\treturn name + \" the Repair Droid\";\n\t\t}\n\t\t\n\t\telse if (this.getSymbol() == \"C3\") {\n\t\t\treturn name + \" the etiquette minded Droid\";\n\t\t}\n\t\t\n\t\telse {\n\t\t\treturn name + \" the Droid\";\n\t\t}\t\n\t}", "public void setSRCSCHEMANM(java.lang.CharSequence value) {\n this.SRC_SCHEMA_NM = value;\n }", "public void setSRCSCHEMANM(java.lang.CharSequence value) {\n this.SRC_SCHEMA_NM = value;\n }", "public void setSRCSCHEMANM(java.lang.CharSequence value) {\n this.SRC_SCHEMA_NM = value;\n }", "public void obtainDisObsr() {\n\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"Observations\");\n\t\t\tdoc.appendChild(rootElement);\n\n\t\t\treader = new BufferedReader(new FileReader(this.dSPath));\n\n\t\t\tString line;\n\t\t\tString id = null;\n\t\t\tString nextID;\n\t\t\tString siteID;\n\t\t\tString siteID_Old = null;\n\t\t\tStringBuilder obsr = null;\n\n\t\t\t/**\n\t\t\t * Data must be sorted by the user ID Data set Arrana=ged as the\n\t\t\t * following ID Time Site ID\n\t\t\t */\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString lineSplit[] = line.split(\",\");\n\n\t\t\t\tnextID = lineSplit[0].trim();\n\n\t\t\t\tif (id == null) {\n\t\t\t\t\tid = nextID;\n\t\t\t\t}\n\t\t\t\tsiteID = lineSplit[2].trim();\n\n\t\t\t\tif (siteID_Old == null) {\n\t\t\t\t\tsiteID_Old = siteID;\n\t\t\t\t} else if (siteID.equals(siteID_Old) && id.equals(nextID)) {\n\t\t\t\t\t// System.out.println(\"same id\");\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (!siteID.equals(siteID_Old)) {\n\t\t\t\t\tsiteID_Old = siteID;\n\t\t\t\t}\n\n\t\t\t\tif (obsr == null) {\n\t\t\t\t\tobsr = new StringBuilder(siteID);\n\t\t\t\t} else if (id.equals(nextID)) {\n\t\t\t\t\tobsr.append(\",\");\n\t\t\t\t\tobsr.append(siteID);\n\t\t\t\t} else {\n\t\t\t\t\t/**\n\t\t\t\t\t * User changed write the XL file Data Change the user ID ,\n\t\t\t\t\t * and record site with the new user\n\t\t\t\t\t */\n\n\t\t\t\t\tElement userElement = doc.createElement(\"user\");\n\t\t\t\t\trootElement.appendChild(userElement);\n\n\t\t\t\t\t// set attribute to staff element\n\t\t\t\t\tAttr attr = doc.createAttribute(\"id\");\n\t\t\t\t\tattr.setValue(id);\n\t\t\t\t\tuserElement.setAttributeNode(attr);\n\n\t\t\t\t\tattr = doc.createAttribute(\"sitesSequanace\");\n\t\t\t\t\tattr.setValue(obsr.toString());\n\t\t\t\t\tuserElement.setAttributeNode(attr);\n\n\t\t\t\t\tid = nextID;\n\t\t\t\t\tobsr = new StringBuilder(siteID);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\tStreamResult result = new StreamResult(new File(this.xmlPath));\n\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\n\t\t\ttransformer.transform(source, result);\n\n\t\t\tSystem.out.println(\"File saved!\");\n\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch (ParserConfigurationException | TransformerException pce) {\n\t\t}\n\t}", "public String getDescriptor() {\n/* 218 */ return this.desc;\n/* */ }", "public void setDescr(String descr) {\n\t\tthis._descr = descr;\n\t}", "public void setDescr(String descr) {\n\t\tthis._descr = descr;\n\t}", "private void handleCoverageDescription(CoverageInfo ci) {\n GridCoverage2D gc2d=null;\n try{\n gc2d=readSampleGridCoverage(ci);\n if(gc2d==null){\n throw new WCS20Exception(\"Unable to read sample coverage for \"+ci.getName());\n }\n // get the crs and look for an EPSG code\n final CoordinateReferenceSystem crs = gc2d.getCoordinateReferenceSystem2D();\n List<String> axesNames = envelopeDimensionsMapper.getAxesNames(gc2d.getEnvelope2D(),true);\n \n // lookup EPSG code\n Integer EPSGCode=null;\n try {\n EPSGCode = CRS.lookupEpsgCode(crs, false);\n } catch (FactoryException e) {\n throw new IllegalStateException(\"Unable to lookup epsg code for this CRS:\"+crs,e);\n }\n if(EPSGCode==null){\n throw new IllegalStateException(\"Unable to lookup epsg code for this CRS:\"+crs);\n } \n final String srsName = GMLCoverageResponseDelegate.SRS_STARTER+EPSGCode; \n // handle axes swap for geographic crs\n final boolean axisSwap = CRS.getAxisOrder(crs).equals(AxisOrder.EAST_NORTH); \n \n \n //encoding ID of the coverage\n final AttributesImpl coverageAttributes = new AttributesImpl();\n String encodedId = NCNameResourceCodec.encode(ci);\n coverageAttributes.addAttribute(\"\", \"gml:id\", \"gml:id\", \"\", encodedId);\n\n // starting encoding\n start(\"wcs:CoverageDescription\", coverageAttributes);\n\n \n // handle domain\n final StringBuilder builder= new StringBuilder();\n for(String axisName:axesNames){\n builder.append(axisName).append(\" \");\n } \n String axesLabel=builder.substring(0, builder.length()-1);\n handleBoundedBy(gc2d, axisSwap,srsName,axesLabel);\n \n //coverage id\n element(\"wcs:CoverageId\", encodedId);\n\n // handle coverage function\n handleCoverageFunction(gc2d,axisSwap);\n\n // metadata \n handleMetadata(gc2d);\n \n // handle domain\n builder.setLength(0);\n axesNames = envelopeDimensionsMapper.getAxesNames(gc2d.getEnvelope2D(),false); \n for(String axisName:axesNames){\n builder.append(axisName).append(\" \");\n } \n axesLabel=builder.substring(0, builder.length()-1); \n handleDomainSet(gc2d,encodedId,srsName,axisSwap);\n\n \n // handle rangetype\n handleRangeType(gc2d);\n \n //service parameters\n handleServiceParameters(ci);\n\n end(\"wcs:CoverageDescription\");\n }catch (Exception e) {\n throw new WcsException(e);\n } finally{\n if(gc2d!=null ){\n CoverageCleanerCallback.addCoverages(gc2d);\n }\n }\n }", "String getSlingDescription();", "@Override\n public Optional<Text> getShortDescription(CommandSource source) {\n return desc;\n }", "public DeviceDescription() {\n //Initialize lists\n this.capabilities = new ArrayList<>();\n this.attachments = new ArrayList<>();\n }", "@ApiModelProperty(value = \"族谱来源\")\n public String getSource() {\n return source;\n }", "private Device buildDevice() {\n Device device = Device.builder()\n .text(Narrative.builder().div(Xhtml.of(\"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\">Generated</div>\")).status(NarrativeStatus.GENERATED).build())\n .meta(Meta.builder()\n .profile(Canonical.of(\"http://ibm.com/fhir/StructureDefinition/test-device|0.1.0\"))\n .build())\n .statusReason(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(\"http://terminology.hl7.org/CodeSystem/device-status-reason\")).code(Code.of(\"online\")).build()).build())\n .specialization(Specialization.builder()\n .systemType(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(ENGLISH_US)).build()).build()).build())\n .extension(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-primary-extension\")\n .value(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(ENGLISH_US)).build()).build()).build(),\n Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-secondary-extension\")\n .value(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(ENGLISH_US)).build()).build(),\n Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-tertiary-extension\")\n .value(Code.of(ENGLISH_US)).build())\n .build();\n return device;\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "@DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:12.110 -0500\", hash_original_method = \"8E1778B505008D9459C329AADF141931\", hash_generated_method = \"01C0C67BB9AF9328133D03E5E8E174ED\")\n \npublic String getReason() {\n return getMessage();\n }", "String getDisplay_description();", "@Override\n public String getDescription() {\n return \"Digital goods delivery\";\n }", "@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:08.680 -0500\", hash_original_method = \"4B0B8276597CEA521E1E338B4AADD471\", hash_generated_method = \"9283ED1C2044F4178961436920D7FF12\")\n \nstatic ImageDescriptor parse(byte[] rawData, int valueIndex) {\n ImageDescriptor d = new ImageDescriptor();\n try {\n d.width = rawData[valueIndex++] & 0xff;\n d.height = rawData[valueIndex++] & 0xff;\n d.codingScheme = rawData[valueIndex++] & 0xff;\n\n // parse image id\n d.imageId = (rawData[valueIndex++] & 0xff) << 8;\n d.imageId |= rawData[valueIndex++] & 0xff;\n // parse offset\n d.highOffset = (rawData[valueIndex++] & 0xff); // high byte offset\n d.lowOffset = rawData[valueIndex++] & 0xff; // low byte offset\n\n d.length = ((rawData[valueIndex++] & 0xff) << 8 | (rawData[valueIndex++] & 0xff));\n } catch (IndexOutOfBoundsException e) {\n CatLog.d(\"ImageDescripter\", \"parse; failed parsing image descriptor\");\n d = null;\n }\n return d;\n }", "public static Card transform(CoverageRequirementRule crr) {\n Card card = baseCard();\n if (crr.getNoAuthNeeded()) {\n String summary = String\n .format(\"No documentation is required for a device or service with code: %s\",\n crr.getEquipmentCode());\n card.setSummary(summary);\n } else {\n card.setSummary(\"Documentation is required for the desired device or service\");\n Link link = new Link();\n link.setUrl(crr.getInfoLink());\n link.setType(\"absolute\");\n link.setLabel(\"Documentation Requirements\");\n List<Link> links = new ArrayList<>();\n links.add(link);\n card.setLinks(links);\n String detail = \"There are documentation requirements for the following criteria:\"\n + \"\\n Patient is of gender: '%s' and between the ages of: %d and %d and lives in state: '%s'\"\n + \"\\n Device or service has code of '%s'\"\n + \"\\n Service is requested in state: '%s'.\";\n String genderRule = \"Any\";\n if (crr.getGenderCode() != null) {\n genderRule = crr.getGenderCode().toString();\n }\n String patientStateRule = Optional.ofNullable(crr.getPatientAddressState()).orElse(\"Any\");\n String providerStateRule = Optional.ofNullable(crr.getProviderAddressState()).orElse(\"Any\");\n card.setDetail(String.format(detail, genderRule, crr.getAgeRangeLow(),\n crr.getAgeRangeHigh(), patientStateRule, crr.getEquipmentCode(),\n providerStateRule));\n }\n return card;\n }", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi getMedlineSi();", "public RichText getDescr();", "public String getDescription(){ return description; }", "public String getcDescription() {\n return cDescription;\n }", "ElementCircuit getSource();", "@Override\n public String getDescription() {\n return \"Digital goods feedback\";\n }", "public void setEddInfoToScsbRequest(String line, ItemRequestInformation itemRequestInformation) {\n String[] splitData = line.split(\":\");\n if (ArrayUtils.isNotEmpty(splitData) && splitData.length > 1) {\n itemRequestInformation.setRequestNotes(validateAndSet(\"User\", splitData));\n itemRequestInformation.setStartPage(validateAndSet(\"Start Page\", splitData));\n itemRequestInformation.setEndPage(validateAndSet(\"End Page\", splitData));\n itemRequestInformation.setVolume(validateAndSet(\"Volume Number\", splitData));\n itemRequestInformation.setIssue(validateAndSet(\"Issue\", splitData));\n itemRequestInformation.setAuthor(validateAndSet(\"Article Author\", splitData));\n itemRequestInformation.setChapterTitle(validateAndSet(\"Article/Chapter Title\", splitData));\n }\n }", "public String getDescription() { return description; }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public String getDescription()\n/* */ {\n/* 74 */ return this.description;\n/* */ }", "x0401.oecdStandardAuditFileTaxPT1.SAFPTProductDescription xgetProductDescription();", "public static String sourceHelp() {\n\treturn\n\" sf@HOSTNAME:PORTNUMBER - a serial forwarder\\n\" +\n\" serial@SERIALPORT:BAUDRATE - a mote connected to a serial port\\n\" +\n\" (using TOSBase protocol)\\n\" +\n\" network@HOSTNAME:PORTNUMBER - a mote whose serial port is accessed over\\n\" +\n\" the network (using TOSBase protocol)\\n\" +\n\" old-serial@SERIALPORT[:BAUDRATE][,PACKET-SIZE]\\n\" +\n\" - a mote connected to a serial port\\n\" +\n\" (old, broken protocol - avoid if possible)\\n\" +\n\" old-network@HOSTNAME:PORTNUMBER[,PACKET-SIZE]\\n\" +\n\" - a mote whose serial port is accessed over\\n\" +\n\" the network (old, broken protocol)\\n\" +\n\" dummy - a packet sink and dummy-packet source\\n\" +\n\" tossim-serial[@HOSTNAME] - the serial port of tossim node 0\\n\"+\n\" tossim-radio[@HOSTNAME] - the radios of tossim nodes\\n\"+\n\"where BAUDRATE can be a specific baud rate or a mote model name\\n\"+\n\"(e.g., mica2 or mica2dot). Specifying a mote model name picks the standard\\n\"+\n\"baud-rate for that mote. PACKET-SIZE is the packet-size (default 36) for\\n\"+\n\"old, broken protocols.\\n\" +\n\"Examples: serial@COM1:mica2, serial@COM2:19200, sf@localhost:9000\";\n }", "public void writeToDicom(DicomObject dcDo)\n {\n\t\tif (codeValue != null)\n\t\t\twriteString(dcDo, Tag.CodeValue, VR.SH, \"1C\", codeValue);\n\t\t\n\t\tif (longCodeValue != null)\n\t\t\twriteString(dcDo, TagLongCodeValue, VR.SH, \"1C\", codeValue);\n\t\t\n\t\tif (urnCodeValue != null)\n\t\t\twriteString(dcDo, TagUrnCodeValue, VR.SH, \"1C\", urnCodeValue);\n\t\t\n if (codingSchemeDesignator != null)\n\t\t\twriteString(dcDo, Tag.CodingSchemeDesignator, VR.SH, \"1C\", codingSchemeDesignator);\n \n\t\tif (codingSchemeVersion != null)\n\t\t\twriteString(dcDo, Tag.CodingSchemeVersion, VR.SH, \"1C\", codingSchemeVersion);\n\t\t\n writeString(dcDo, Tag.CodeMeaning, VR.LO, 1, codeMeaning);\n writeString(dcDo, Tag.ContextIdentifier, VR.CS, 3, contextIdentifier);\n writeString(dcDo, Tag.ContextUID, VR.UI, 3, contextUid);\n \n\t\tif (contextIdentifier != null)\n\t\t{\n\t\t\twriteString(dcDo, Tag.MappingResource, VR.CS, \"1C\", mappingResource);\n\t\t\twriteString(dcDo, Tag.ContextGroupVersion, VR.DT, \"1C\", contextGroupVersion);\n\t\t}\n\t\t\n\t\twriteString(dcDo, Tag.ContextGroupExtensionFlag, VR.CS, 3, contextGroupExtensionFlag);\n\t\t\n if (contextGroupExtensionFlag != null)\n\t\t{\n\t\t\tif (contextGroupExtensionFlag.equals(\"Y\"))\n\t\t\t{\n\t\t\t\twriteString(dcDo, Tag.ContextGroupLocalVersion, VR.DT, \"1C\", contextGroupLocalVersion);\n\t\t\t\twriteString(dcDo, Tag.ContextGroupExtensionCreatorUID, VR.UI, \"1C\", contextGroupExtensionCreatorUid);\n\t\t\t}\n\t\t}\t\t \n }", "public SourceDescription getMainSourceDescription() {\n return mainSourceDescription;\n }", "public String getID() {\n\t\treturn \"org.osgi.test.cases.metatype.ocd\";\n\t}", "public void addSDESInfo(RTCPSDES chunk) {\n int ci = 0;\n while (ci < chunk.items.length && chunk.items[ci].type != 1) {\n ci++;\n }\n String s = new String(chunk.items[ci].data);\n String sourceinfocname = null;\n if (this.sourceInfo != null) {\n sourceinfocname = this.sourceInfo.getCNAME();\n }\n if (!(this.sourceInfo == null || s.equals(sourceinfocname))) {\n this.sourceInfo.removeSSRC(this);\n this.sourceInfo = null;\n }\n if (this.sourceInfo == null) {\n this.sourceInfo = this.cache.sourceInfoCache.get(s, this.ours);\n this.sourceInfo.addSSRC(this);\n }\n if (chunk.items.length > 1) {\n for (int i = 0; i < chunk.items.length; i++) {\n s = new String(chunk.items[i].data);\n switch (chunk.items[i].type) {\n case 2:\n if (this.name != null) {\n this.name.setDescription(s);\n break;\n } else {\n this.name = new SourceDescription(2, s, 0, false);\n break;\n }\n case 3:\n if (this.email != null) {\n this.email.setDescription(s);\n break;\n } else {\n this.email = new SourceDescription(3, s, 0, false);\n break;\n }\n case 4:\n if (this.phone != null) {\n this.phone.setDescription(s);\n break;\n } else {\n this.phone = new SourceDescription(4, s, 0, false);\n break;\n }\n case 5:\n if (this.loc != null) {\n this.loc.setDescription(s);\n break;\n } else {\n this.loc = new SourceDescription(5, s, 0, false);\n break;\n }\n case 6:\n if (this.tool != null) {\n this.tool.setDescription(s);\n break;\n } else {\n this.tool = new SourceDescription(6, s, 0, false);\n break;\n }\n case 7:\n if (this.note != null) {\n this.note.setDescription(s);\n break;\n } else {\n this.note = new SourceDescription(7, s, 0, false);\n break;\n }\n case 8:\n if (this.priv != null) {\n this.priv.setDescription(s);\n break;\n } else {\n this.priv = new SourceDescription(8, s, 0, false);\n break;\n }\n default:\n break;\n }\n }\n }\n }", "public void setSourceDescription(SourceDescription[] userdesclist) {\n if (userdesclist != null) {\n SourceDescription currdesc;\n String cname = null;\n for (int i = 0; i < userdesclist.length; i++) {\n currdesc = userdesclist[i];\n if (currdesc != null && currdesc.getType() == 1) {\n cname = userdesclist[i].getDescription();\n break;\n }\n }\n String sourceinfocname = null;\n if (this.sourceInfo != null) {\n sourceinfocname = this.sourceInfo.getCNAME();\n }\n if (!(this.sourceInfo == null || cname == null || cname.equals(sourceinfocname))) {\n this.sourceInfo.removeSSRC(this);\n this.sourceInfo = null;\n }\n if (this.sourceInfo == null) {\n this.sourceInfo = this.cache.sourceInfoCache.get(cname, true);\n this.sourceInfo.addSSRC(this);\n }\n for (SourceDescription currdesc2 : userdesclist) {\n if (currdesc2 != null) {\n switch (currdesc2.getType()) {\n case 2:\n if (this.name != null) {\n this.name.setDescription(currdesc2.getDescription());\n break;\n } else {\n this.name = new SourceDescription(2, currdesc2.getDescription(), 0, false);\n break;\n }\n case 3:\n if (this.email != null) {\n this.email.setDescription(currdesc2.getDescription());\n break;\n } else {\n this.email = new SourceDescription(3, currdesc2.getDescription(), 0, false);\n break;\n }\n case 4:\n if (this.phone != null) {\n this.phone.setDescription(currdesc2.getDescription());\n break;\n } else {\n this.phone = new SourceDescription(4, currdesc2.getDescription(), 0, false);\n break;\n }\n case 5:\n if (this.loc != null) {\n this.loc.setDescription(currdesc2.getDescription());\n break;\n } else {\n this.loc = new SourceDescription(5, currdesc2.getDescription(), 0, false);\n break;\n }\n case 6:\n if (this.tool != null) {\n this.tool.setDescription(currdesc2.getDescription());\n break;\n } else {\n this.tool = new SourceDescription(6, currdesc2.getDescription(), 0, false);\n break;\n }\n case 7:\n if (this.note != null) {\n this.note.setDescription(currdesc2.getDescription());\n break;\n } else {\n this.note = new SourceDescription(7, currdesc2.getDescription(), 0, false);\n break;\n }\n case 8:\n if (this.priv != null) {\n this.priv.setDescription(currdesc2.getDescription());\n break;\n } else {\n this.priv = new SourceDescription(8, currdesc2.getDescription(), 0, false);\n break;\n }\n default:\n break;\n }\n }\n }\n }\n }", "public void setNotiDescription(String value) {\r\n setAttributeInternal(NOTIDESCRIPTION, value);\r\n }", "public String getDescription(Locale locale)\n {\n return \"DICOM image writer\";\n }", "String getFpDescription();", "public String getSampleComment();", "private Records_type createNSD(String diag_code, String additional)\n {\n Records_type retval = new Records_type();\n retval.which = Records_type.nonsurrogatediagnostic_CID;\n DefaultDiagFormat_type default_diag = new DefaultDiagFormat_type();\n retval.o = default_diag;\n \n default_diag.diagnosticSetId = reg.oidByName(\"diag-1\");\n \n if ( diag_code != null )\n default_diag.condition = BigInteger.valueOf( Long.parseLong(diag_code) );\n else\n default_diag.condition = BigInteger.valueOf(0);\n \n default_diag.addinfo = new addinfo_inline14_type();\n default_diag.addinfo.which = addinfo_inline14_type.v2addinfo_CID;\n default_diag.addinfo.o = (Object)(additional);\n \n return retval;\n }", "private boolean readFile() {\n\t\ttry {\n\n\t\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n\t\t\tDocument doc = docBuilder.parse(cnfFile);\n\n\t\t\t// normalize text representation\n\t\t\tdoc.getDocumentElement().normalize();\n\t\t\tSystem.out.println(\"Root element of the doc is \" + doc.getDocumentElement().getNodeName());\n\t\t\tdoc.getDocumentElement().getAttributeNode(\"version\");\n\n\t\t\tNodeList rootNode = doc.getElementsByTagName(\"SCMS_DATA\");\n\t\t\tif (rootNode.getLength() < 1) {\n\t\t\t\tSystem.out.println(\"ERROR in config data file: there is no SCMS_DATA element\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tString version = rootNode.item(0).getAttributes().getNamedItem(\"version\").getNodeValue();\n\t\t\tfinal String dataVersion = \"0.1\";\n\t\t\tif (!version.equals(dataVersion)) {\n\t\t\t\tSystem.out.println(\"ERROR in config data file: required version is \" + dataVersion);\n\t\t\t\tSystem.out.println(\"Version \" + version + \" is not supported.\");\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tNodeList listOfDevices = doc.getElementsByTagName(\"DEVICE\");\n\t\t\tint totalDevices = listOfDevices.getLength();\n\t\t\tSystem.out.println(\"Total no of devices : \" + totalDevices);\n\n\t\t\tHashMap<String, CnfDevice> devices = new HashMap<>();\n\t\t\tfor (int s = 0; s < listOfDevices.getLength(); s++) {\n\n\t\t\t\tNode node = listOfDevices.item(s);\n\t\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n\n\t\t\t\t\tString id = node.getAttributes().getNamedItem(\"id\").getNodeValue();\n\t\t\t\t\tString name = node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\t\tString description = node.getAttributes().getNamedItem(\"description\").getNodeValue();\n\t\t\t\t\tString pi_name = node.getAttributes().getNamedItem(\"PI_Name\").getNodeValue();\n\t\t\t\t\tString pixHor = node.getAttributes().getNamedItem(\"pixHor\").getNodeValue();\n\t\t\t\t\tString pixVer = node.getAttributes().getNamedItem(\"pixVer\").getNodeValue();\n\t\t\t\t\tString location = node.getAttributes().getNamedItem(\"location\").getNodeValue();\n\n\t\t\t\t\tdevices.put(id, new CnfDevice(id, name, description, pi_name,\n\t\t\t\t\t\t\tInteger.valueOf(pixHor), Integer.valueOf(pixVer),location));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcnfData.setDevices(devices);\n\n\t\t\tNodeList listOfViews = doc.getElementsByTagName(\"VIEW\");\n\t\t\tint totalViews = listOfViews.getLength();\n\t\t\tSystem.out.println(\"Total no of views : \" + totalViews);\n\n\t\t\tHashMap<String, CnfView> views = new HashMap<>();\n\t\t\tfor (int s = 0; s < listOfViews.getLength(); s++) {\n\n\t\t\t\tNode node = listOfViews.item(s);\n\n\t\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tString id = node.getAttributes().getNamedItem(\"id\").getNodeValue();\n\t\t\t\t\tString name = node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\t\tString description = node.getAttributes().getNamedItem(\"description\").getNodeValue();\n\t\t\t\t\tString pixHor = node.getAttributes().getNamedItem(\"pixHor\").getNodeValue();\n\t\t\t\t\tString pixVer = node.getAttributes().getNamedItem(\"pixVer\").getNodeValue();\n\t\t\t\t\tString asso_device = node.getAttributes().getNamedItem(\"associatedDevice\").getNodeValue();\n\n\t\t\t\t\tElement element = (Element) node;\n\t\t\t\t\tNodeList listOfImages = ((Element) node).getElementsByTagName(\"IMAGE\");\n\t\t\t\t\tElement iElement = (Element) listOfImages.item(0);\n\t\t\t\t\tString[] images = new String[listOfImages.getLength()];\n\t\t\t\t\tfor (int i = 0; i < listOfImages.getLength(); i++) {\n\n\t\t\t\t\t\tNode iNode = listOfImages.item(i);\n\t\t\t\t\t\timages[i] = iNode.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\t\t}\n\n\t\t\t\t\tviews.put(id, new CnfView(id, name, description,\n\t\t\t\t\t\t\tInteger.valueOf(pixHor), Integer.valueOf(pixVer), asso_device, images));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcnfData.setViews(views);\n\n\t\t\tNodeList listOfSections = doc.getElementsByTagName(\"SECTION\");\n\t\t\tint totalSections = listOfSections.getLength();\n\t\t\tSystem.out.println(\"Total no of sections : \" + totalSections);\n\n\t\t\tHashMap<String, CnfSection> sections = new HashMap<>();\n\t\t\tfor (int s = 0; s < totalSections; s++) {\n\t\t\t\tNode node = listOfSections.item(s);\n\n\t\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tString sectionId = node.getAttributes().getNamedItem(\"sectionId\").getNodeValue();\n\t\t\t\t\tString deviceId = node.getAttributes().getNamedItem(\"deviceId\").getNodeValue();\n\t\t\t\t\tString positionId = node.getAttributes().getNamedItem(\"positionId\").getNodeValue();\n\t\t\t\t\tString vOffset = node.getAttributes().getNamedItem(\"vOffset\").getNodeValue();\n\n\t\t\t\t\t// A section is invalid if the deviceId doesn't exist\n\t\t\t\t\tif (null == cnfData.getDeviceById(deviceId)) {\n\t\t\t\t\t\tSystem.out.println(\"ERROR in SECTION config data: deviceId \" + deviceId + \" sectionId \" + sectionId);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsections.put(deviceId, new CnfSection(sectionId, deviceId, positionId, vOffset));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcnfData.setSections(sections);\n\t\t\treturn true;\n\n\t\t} catch (SAXParseException err) {\n\t\t\tSystem.out.println(\"** Parsing error\" + \", line \" + err.getLineNumber() + \", uri \" + err.getSystemId());\n\t\t\tSystem.out.println(\" \" + err.getMessage());\n\n\t\t} catch (SAXException e) {\n\t\t\tException x = e.getException();\n\t\t\t((x == null) ? e : x).printStackTrace();\n\n\t\t} catch (Throwable t) {\n\t\t\tt.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "public void initiateResourceTypeIC(){\r\n\t\ttry {\r\n\t\t\tOutputStream out = new FileOutputStream(\"D:/Workspace_J2EE/SECoG/Data/ResourceType/ResourceTypeInformationContents.txt\");\r\n\t\t\tPrintStream printStream = new PrintStream(out);\r\n\t\t\t\r\n\t\t\tprintStream.println(\"sensor\");\r\n\t\t\tprintStream.println(\"0\");\r\n\t\t\tprintStream.println(-Math.log(1));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"temphumidity\");\r\n\t\t\tprintStream.println(\"00\");\r\n\t\t\tprintStream.println(-Math.log(0.3));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"temperature\");\r\n\t\t\tprintStream.println(\"000\");\r\n\t\t\tprintStream.println(-Math.log(0.1));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"humidity\");\r\n\t\t\tprintStream.println(\"001\");\r\n\t\t\tprintStream.println(-Math.log(0.1));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"sound\");\r\n\t\t\tprintStream.println(\"01\");\r\n\t\t\tprintStream.println(-Math.log(0.1));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"light\");\r\n\t\t\tprintStream.println(\"02\");\r\n\t\t\tprintStream.println(-Math.log(0.1));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"dust\");\r\n\t\t\tprintStream.println(\"03\");\r\n\t\t\tprintStream.println(-Math.log(0.1));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"motion\");\r\n\t\t\tprintStream.println(\"04\");\r\n\t\t\tprintStream.println(-Math.log(0.1));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"distance\");\r\n\t\t\tprintStream.println(\"05\");\r\n\t\t\tprintStream.println(-Math.log(0.1));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"wind\");\r\n\t\t\tprintStream.println(\"06\");\r\n\t\t\tprintStream.println(-Math.log(0.1));\r\n\t\t\t\r\n\t\t\tprintStream.close();\r\n\t\t\tout.close();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Initiate resource type information contents done!\");\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\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}", "@Override\r\n\tpublic String getShortDescr() {\n\t\treturn null;\r\n\t}", "@Override\n public String getDescription() {\n return description;\n }", "public interface ISourceSinkCategory {\n\n\t/**\n\t * Gets a human-readable description of the current category. This can be\n\t * different from toString(), which is allowed to yield a more technical\n\t * description.\n\t * \n\t * @return A human readable description for this category\n\t */\n\tpublic String getHumanReadableDescription();\n\n\t/**\n\t * Gets a machine-readable description of the current category.\n\t * \n\t * @return An id for this category\n\t */\n\tpublic String getID();\n\n}", "public SourceDescription getSourceDescription(URI uri) {\n return uri == null ? null : getSourceDescription(uri.toString());\n }", "String getDescription();", "String getDescription();", "String getDescription();" ]
[ "0.5519218", "0.54929924", "0.536637", "0.5289935", "0.5235319", "0.5226068", "0.51935977", "0.5153388", "0.51520586", "0.5092997", "0.5083695", "0.50549924", "0.5053372", "0.50300246", "0.5017241", "0.5012323", "0.49993932", "0.49931818", "0.4987598", "0.4987598", "0.49856973", "0.49373385", "0.49227914", "0.49225554", "0.4919852", "0.49189427", "0.49187005", "0.49152476", "0.49152476", "0.49152476", "0.49152476", "0.49152476", "0.49152476", "0.49152476", "0.49152476", "0.49152476", "0.4905227", "0.4886928", "0.4841307", "0.4841307", "0.4841307", "0.4839928", "0.4825066", "0.48239943", "0.48239943", "0.48234543", "0.4823169", "0.48208088", "0.48166925", "0.48166052", "0.48153245", "0.48058784", "0.48058784", "0.47967625", "0.4795447", "0.4786347", "0.47850764", "0.47843722", "0.4777906", "0.4777906", "0.4777906", "0.4777906", "0.4777906", "0.4777906", "0.4777906", "0.4777906", "0.4777906", "0.4777906", "0.4777906", "0.4777906", "0.4767999", "0.47645265", "0.47554073", "0.47551143", "0.47503164", "0.47449005", "0.47338283", "0.47320068", "0.47217572", "0.472175", "0.47211733", "0.4718988", "0.47136658", "0.47107705", "0.47098792", "0.47083688", "0.47075948", "0.4705999", "0.4704963", "0.46997386", "0.4698747", "0.46926266", "0.46860033", "0.46705723", "0.46662563", "0.4663979", "0.4662435", "0.46606463", "0.46582654", "0.46582654", "0.46582654" ]
0.0
-1
/ Constructor to construct an instance of the class MapFrame.
public MapButtons(Map map1, Character player1, Scores score1, MapFrame mapFrame) { this.map = map1; this.player = player1; this.score = score1; this.mapFrame = mapFrame; this.createAndShowButtons(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MapContainer() {\n this(new OpenStreetMapProvider());\n }", "public Map() {\n\n\t\t}", "public MapTile() {}", "public MapPanel() {\r\n\t\tthis(EarthFlat.class);\r\n\t}", "public MapPanel() {\n painter = NONE_PAINTER;\n setBackground(BACKGROUND_COLOR);\n mapBounds = new Rectangle2D.Double(0, 0, MIN_WIDTH, MIN_HEIGHT);\n mouseClick = SwingObservable.mouse(this, SwingObservable.MOUSE_CLICK)\n .toFlowable(BackpressureStrategy.LATEST)\n .filter(ev -> ev.getID() == MouseEvent.MOUSE_CLICKED)\n .map(this::mapMouseEvent);\n logger.atDebug().log(\"Created\");\n }", "public MKMapView() {}", "public Map(int x, int y) {\n\n height_ = y;\n width_ = x;\n\n map_grid_ = new MapTile[height_][width_];\n for (int i = 0; i < height_; ++i) {\n for (int j = 0; j < width_; ++j) {\n map_grid_[i][j] = new MapTile(j, i); //switch rows and columns\n }\n }\n entity_list_ = new LinkedHashMap<String, Entity>();\n items_list_ = new LinkedList<Item>();\n time_measured_in_turns = 0;\n try {\n my_internet_ = new MapInternet(this);\n } catch (Exception e) {\n // No clue what causes this\n e.printStackTrace();\n System.exit(-6);\n return;\n }\n }", "public MapFragment() {\n // Required empty public constructor\n }", "public Map() {\n\t\t//intially empty\n\t}", "public MapScreen() {\n\t\tthis(DEFAULT_WIDTH, DEFAULT_HEIGHT); // default size for map screen.\n\t}", "public MapBuilder() {\r\n map = new Map();\r\n json = new Gson();\r\n }", "public MapOther() {\n }", "public RadarMap() {\n initComponents();\n }", "public ConnectedMap() {\n }", "protected MapImpl() {\n }", "public MapController() {\r\n\t}", "public MAPVIEW() {\n initComponents();\n }", "public MapNode()\n\t{\n\t\t// Call alternative constructor\n\t\tthis((AbstractNode)null);\n\t}", "public Graphical(Map map, Player player)\n {\n Swing.init();\n \n // Store paramaters\n this.player = player; \n\n /* TODO: Finish editor frame */\n this.editorFrame = new EditorFrame (this);\n this.miniMapFrame = new MiniMapFrame (this, map, player);\n this.mapFrame = new MapFrame (this, map, player);\n }", "private MapContainer(MapProvider provider, String htmlApiKey) {\n super(new BorderLayout());\n internalNative = (InternalNativeMaps)NativeLookup.create(InternalNativeMaps.class);\n if(internalNative != null) {\n if(internalNative.isSupported()) {\n currentMapId++;\n mapId = currentMapId;\n PeerComponent p = internalNative.createNativeMap(mapId);\n \n // can happen if Google play services failed or aren't installed on an Android device\n if(p != null) {\n addComponent(BorderLayout.CENTER, p);\n return;\n }\n } \n internalNative = null;\n }\n if(provider != null) {\n internalLightweightCmp = new MapComponent(provider) {\n private boolean drg = false;\n\n @Override\n public void pointerDragged(int x, int y) {\n super.pointerDragged(x, y); \n drg = true;\n }\n\n @Override\n public void pointerDragged(int[] x, int[] y) {\n super.pointerDragged(x, y); \n drg = true;\n }\n\n @Override\n public void pointerReleased(int x, int y) {\n super.pointerReleased(x, y); \n if(!drg) {\n fireTapEvent(x, y);\n }\n drg = false;\n }\n\n };\n addComponent(BorderLayout.CENTER, internalLightweightCmp);\n } else {\n internalBrowser = new BrowserComponent();\n\n internalBrowser.putClientProperty(\"BrowserComponent.fireBug\", Boolean.TRUE);\n\n Location loc = LocationManager.getLocationManager().getLastKnownLocation();\n internalBrowser.setPage(\n \"<!DOCTYPE html>\\n\" +\n \"<html>\\n\" +\n \" <head>\\n\" +\n \" <title>Simple Map</title>\\n\" +\n \" <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0\\\">\\n\" +\n \" <meta charset=\\\"utf-8\\\">\\n\" +\n \" <style>\\n\" +\n \" /* Always set the map height explicitly to define the size of the div\\n\" +\n \" * element that contains the map. */\\n\" +\n \" #map {\\n\" +\n \" height: 100%;\\n\" +\n \" }\\n\" +\n \" /* Optional: Makes the sample page fill the window. */\\n\" +\n \" html, body {\\n\" +\n \" height: 100%;\\n\" +\n \" margin: 0;\\n\" +\n \" padding: 0;\\n\" +\n \" }\\n\" +\n \" </style>\\n\" +\n \" </head>\\n\" +\n \" <body>\\n\" +\n \" <div id=\\\"map\\\"></div>\\n\" +\n \" <script>\\n\" + \n \" var map;\\n\" +\n \" function initMap() {\\n\" +\n \" var origin = {lat: \"+ loc.getLatitude() + \", lng: \" + loc.getLongitude() + \"};\\n\" +\n \" map = new google.maps.Map(document.getElementById('map'), {\\n\" +\n \" center: origin,\\n\" +\n \" zoom: 8\\n\" +\n \" });\\n\" +\n \" var clickHandler = new ClickEventHandler(map, origin);\\n\" +\n \" }\\n\" +\n \" var ClickEventHandler = function(map, origin) {\\n\" +\n \" var self = this;\\n\" +\n \" this.origin = origin;\\n\" +\n \" this.map = map;\\n\" +\n \" //this.directionsService = new google.maps.DirectionsService;\\n\" +\n \" //this.directionsDisplay = new google.maps.DirectionsRenderer;\\n\" +\n \" //this.directionsDisplay.setMap(map);\\n\" +\n \" //this.placesService = new google.maps.places.PlacesService(map);\\n\" +\n \" //this.infowindow = new google.maps.InfoWindow;\\n\" +\n \" //this.infowindowContent = document.getElementById('infowindow-content');\\n\" +\n \" //this.infowindow.setContent(this.infowindowContent);\\n\" +\n \"\\n\" +\n// \" google.maps.event.addListener(this.map, 'click', function(evt) {\\n\" +\n// \" self.handleClick(evt);\\n\" +\n// \" });\" +\n \"this.map.addListener('click', this.handleClick.bind(this));\\n\" +\n \" };\\n\" +\n \" ClickEventHandler.prototype.handleClick = function(event) {\\n\" + \n \" //document.getElementById('map').innerHTML = 'foobar';\\n\" +\n \" cn1OnClickCallback(event);\" +\n \" };\\n\" +\n \" </script>\\n\" +\n \" <script src=\\\"https://maps.googleapis.com/maps/api/js?key=\" + \n htmlApiKey +\n \"&callback=initMap\\\"\\n\" +\n \" async defer></script>\\n\" +\n \" </body>\\n\" +\n \"</html>\", \"/\");\n browserContext = new JavascriptContext(internalBrowser);\n internalBrowser.addWebEventListener(\"onLoad\", new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n JSObject window = (JSObject)browserContext.get(\"window\");\n window.set(\"cn1OnClickCallback\", new JSFunction() {\n public void apply(JSObject self, Object[] args) {\n Log.p(\"Click\");\n }\n });\n }\n });\n addComponent(BorderLayout.CENTER, internalBrowser);\n }\n setRotateGestureEnabled(true);\n }", "public AttributeMap()\r\n\t{\r\n\t\tsuper();\r\n\t}", "public Map(){\n this.matrix = new int[10][10];\n }", "public Map(PApplet p, String id) {\n \t\tthis(p, id, 0, 0, p.width, p.height, false, false, null);\n \t}", "public MapPanel(String map, Object[] toLoad) {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setPreferredSize(new Dimension(WIDTH, HEIGHT));\n\t\tthis.setSize(this.getPreferredSize());\n\t\tthis.setVisible(true);\n\t\tthis.setFocusable(true);\n\t\tthis.requestFocus();\n\t\ttheMap = new Map(map, 50);\n\t\ttheTrainer = new Trainer(theMap, toLoad);\n\n\t\tinBattle = false;\n\t}", "public Map(Frame frame){\n\t\tframe.addMouseListener(new KeyHandel());\n\t\tframe.addMouseMotionListener(new KeyHandel());\n\t\t\n\t\tthread.start();\n\t}", "public MapGraphExtra()\n\t{\n\t\t// TODO: Implement in this constructor in WEEK 3\n\t\tmap = new HashMap<GeographicPoint, MapNode> ();\n\t}", "public static MapObject createMapObject(){\n\t\treturn new MapObject();\n\t}", "public MapView(android.content.Context param0, android.util.AttributeSet param1) {\n super(param0, param1);\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n this.setHInstance(new HImpl(param0, param1));\n } else {\n this.setGInstance(new GImpl(param0, param1));\n }\n wrapper = false;\n }", "public MapNode(\n\t\tAbstractNode\tparent)\n\t{\n\t\t// Call superclass constructor\n\t\tsuper(parent);\n\n\t\t// Initialise instance variables\n\t\tpairs = new LinkedHashMap<>();\n\t}", "public GridMapPanel() {\n super();\n initialize();\n }", "public MapEntity() {\n\t}", "public Model() {\n\t\tthis.map = new Map(37, 23);\n\t}", "public GameFrame(String title, int difficulty, String mapFileName) {\n super(title);\n setResizable(false);\n setSize(GAME_WIDTH, GAME_HEIGHT);\n this.difficulty = difficulty;\n mapObject = new Map(mapFileName, this);\n lastRender = -1;\n fpsHistory = new ArrayList<>(100);\n\n try {\n plantImage = ImageIO.read(new File(\"src/pictures/plant.png\"));\n gameOverImage = ImageIO.read(new File(\"src/pictures/gameOver.png\"));\n gameWonImage = ImageIO.read(new File(\"src/pictures/youWin.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public FMap(String rute) {\n super(rute);\n init(rute);\n }", "public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}", "@SuppressWarnings(\"all\")\r\n\tpublic Map(String map, Location mapLocation){\r\n\t\tMapPreset preset = MapPreset.presets.get(map);\r\n\t\tif (preset != null){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tfinal World world = mapLocation.getWorld();\r\n\t\t\t\tfinal double x = mapLocation.getX();\r\n\t\t\t\tfinal double y = mapLocation.getY();\r\n\t\t\t\tfinal double z = mapLocation.getZ();\r\n\t\t\t\tfinal float pitch = mapLocation.getPitch();\r\n\t\t\t\tfinal float yaw = mapLocation.getYaw();\r\n\t\t\t\t\t\t\r\n\t\t\t\tfinal Float[] alliesBase = preset.getSpawnAllies();\r\n\t\t\t\tfinal Float[] axisBase = preset.getSpawnAxis();\r\n\t\t\t\t\r\n\t\t\t\tfinal Float[] bombA = preset.getBombA();\r\n\t\t\t\tfinal Float[] bombB = preset.getBombB();\r\n\t\t\t\t\r\n\t\t\t\tfinal Float[] domA = preset.getDomA();\r\n\t\t\t\tfinal Float[] domB = preset.getDomB();\r\n\t\t\t\tfinal Float[] domC = preset.getDomC();\r\n\t\t\t\t\r\n\t\t\t\tmainSpawn = mapLocation;\r\n\t\t\t\talliesSpawn = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + alliesBase[0], \r\n\t\t\t\t\t\ty + alliesBase[1], \r\n\t\t\t\t\t\tz + alliesBase[2],\r\n\t\t\t\t\t\talliesBase[3], \r\n\t\t\t\t\t\talliesBase[4]);\r\n\t\t\t\t\r\n\t\t\t\taxisSpawn = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + axisBase[0], \r\n\t\t\t\t\t\ty + axisBase[1], \r\n\t\t\t\t\t\tz + axisBase[2],\r\n\t\t\t\t\t\taxisBase[3], \r\n\t\t\t\t\t\taxisBase[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.bombA = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + bombA[0], \r\n\t\t\t\t\t\ty + bombA[1], \r\n\t\t\t\t\t\tz + bombA[2],\r\n\t\t\t\t\t\tbombA[3], \r\n\t\t\t\t\t\tbombA[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.bombB = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + bombB[0], \r\n\t\t\t\t\t\ty + bombB[1], \r\n\t\t\t\t\t\tz + bombB[2],\r\n\t\t\t\t\t\tbombB[3], \r\n\t\t\t\t\t\tbombB[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domA = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domA[0], \r\n\t\t\t\t\t\ty + domA[1], \r\n\t\t\t\t\t\tz + domA[2],\r\n\t\t\t\t\t\tdomA[3], \r\n\t\t\t\t\t\tdomA[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domB = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domB[0], \r\n\t\t\t\t\t\ty + domB[1], \r\n\t\t\t\t\t\tz + domB[2],\r\n\t\t\t\t\t\tdomB[3], \r\n\t\t\t\t\t\tdomB[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domC = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domC[0], \r\n\t\t\t\t\t\ty + domC[1], \r\n\t\t\t\t\t\tz + domC[2],\r\n\t\t\t\t\t\tdomC[3], \r\n\t\t\t\t\t\tdomC[4]);\r\n\t\t\t\t\r\n\t\t\t\tfor (Float[] spawnpoint : preset.getSpawnpoints()){\r\n\t\t\t\t\tspawnsList.add(new Location(\r\n\t\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\t\tx + spawnpoint[0], \r\n\t\t\t\t\t\t\ty + spawnpoint[1], \r\n\t\t\t\t\t\t\tz + spawnpoint[2], \r\n\t\t\t\t\t\t\tspawnpoint[3], \r\n\t\t\t\t\t\t\tspawnpoint[4]));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tmapID = maps.size()+1;\r\n\t\t\t\tmapName = map;\r\n\t\t\t\tmapAvailable.add(mapID);\r\n\t\t\t\tmaps.put(maps.size()+1, this);\r\n\t\t\t} catch (Exception e){\r\n\t\t\t\tFPSCaste.log(\"Something went wrong! disabling map: \" + map, Level.WARNING);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tFPSCaste.log(\"Could not initialise the Map \" + map, Level.WARNING);\r\n\t\t}\r\n\t}", "public MapView(android.content.Context param0) {\n super(param0);\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n this.setHInstance(new HImpl(param0));\n } else {\n this.setGInstance(new GImpl(param0));\n }\n wrapper = false;\n }", "public Map(){\r\n map = new Square[0][0];\r\n }", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "public BreukFrame() {\n super();\n initialize();\n }", "public WMS100MapRequest() {\n\n }", "public Zombie(int x, int y, Map map) {\r\n\t\tsuper(x, y, imagePath, map);\r\n\t\t\r\n\t}", "public MmapFactoryImpl() {\n\t\tsuper();\n\t}", "public TurtleMapDescriptor() {}", "public TimeMap() {\n\n }", "public WindowShiftMap() {\n initComponents();\n }", "public FactoryMapImpl()\n {\n super();\n }", "public MapView(android.content.Context param0, android.util.AttributeSet param1, int param2) {\n super(param0, param1, param2);\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n this.setHInstance(new HImpl(param0, param1, param2));\n } else {\n this.setGInstance(new GImpl(param0, param1, param2));\n }\n wrapper = false;\n }", "public Map(int levelWidth, int levelHeight, ArrayList<Planet> planets, ArrayList<Entity> enemies, Player player, Camera camera)\n {\n this.levelWidth = levelWidth;\n this.levelHeight = levelHeight;\n\n double levelSizeRatio = (double)(levelWidth) / levelHeight;\n\n this.mapHeight = defaultMapHeight;\n this.mapWidth = (int)(mapHeight * levelSizeRatio);\n\n this.scale = ((double)(mapHeight)) / levelHeight;\n\n this.topLeftX = defaultTopLeftX;\n this.topLeftY = defaultTopLeftY;\n\n this.planets = planets;\n this.enemies = enemies;\n this.player = player;\n this.camera = camera;\n }", "public Map(final int aWorldId, final int aLevelId, final GameContainer aGC, final Player aPlayer)\r\n\t{\r\n\t\tmWorldId = (byte) aWorldId;\r\n\t\tmLevelId = (byte) aLevelId;\r\n\t\tmScreen = new Screen(aGC.getWidth(), aGC.getHeight());\r\n\t\tmScreen.init(this);\r\n\t\tmPlayer = aPlayer;\r\n\t\treload();\r\n\t\taddPlayer(mPlayer);\r\n\t\tmPlayer.respawn();\r\n\t\tmWidth = mBlocks.length;\r\n\t\tif (mWidth > 0) mHeight = mBlocks[0].length;\r\n\t\telse mHeight = 0;\r\n\t\tDataManager.instance().playMusic(MusicName.get(mWorldId % 6));\r\n\t}", "public MapGenerator(GameMap map) {\n\n gameMap = map;\n setGuiHashMap();\n firstCountryFlag=true;\n validator = new MapValidator(gameMap);\n }", "public Mapping() { this(null); }", "MAP createMAP();", "public static MapFragment newInstance() {\n return new MapFragment();\n }", "public Map(SpriteLoader sprites) {\n\n this.sprites = sprites;\n\n }", "protected WumpusMap() {\n\t\t\n\t}", "public FractalMapImpl() {\n this.shift = 0;\n }", "public QuadGramMap()\n\t{\n\t\tsuper();\n\t}", "public MapResult() {\n }", "public MUXMapFrame(Thump mapper, File file, int mapSize, MPrefs prefs, int hexHeight, ToolManager tools)\n {\n super(\"Untitled\");\n \n setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n \n this.mapper = mapper;\n this.tools = tools;\n this.file = file;\n \n if (file == null)\n {\n map = new MUXMap(mapSize, mapSize);\n map.clearMap();\n \n setTitle(\"Untitled \" + documentsOpened + sizeString());\n this.file = new File(\"Untitled \" + documentsOpened);\n documentsOpened++;\n newFile = true;\n }\n else\n {\n readMap();\n setTitle(file.getName() + sizeString());\n newFile = false;\n }\n \n // Set a bunch of 'able's\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n setClosable(true);\n \n // Let the InternalFrameListener handle this\n setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);\n \n this.prefs = prefs;\n this.h = hexHeight;\n \n // Setup the map component\n mapComponent = new MUXMapComponent(map, prefs, h);\n mapComponent.setPreferredSize(new Dimension(mapComponent.getTotalWidth(), mapComponent.getTotalHeight()));\n \n mapComponent.addMouseListener(this);\n mapComponent.addMouseMotionListener(this);\n mapComponent.addMouseWheelListener(this);\n \n resetCursor();\n \n // Setup the rulers (hex indicators on the side/top)\n Rule \txRule = new Rule(Rule.HORIZONTAL, h, map.getSizeX(), prefs.hexNumberFontSize);\n Rule\tyRule = new Rule(Rule.VERTICAL, h, map.getSizeY(), prefs.hexNumberFontSize);\n xRule.setPreferredWidth(mapComponent.getTotalWidth());\n yRule.setPreferredHeight(mapComponent.getTotalHeight());\n \n // .. and the scroll pane we put them in\n \n // Create the scroll pane & the view\n scrollPane = new JScrollPane();\n \n // Create our own viewport, instead of the default one\n scrollPane.setViewport(new JViewport() {\n public void setViewPosition(Point p) {\n // Make sure another thread will not gain control\n // while scrolling the view !!!\n synchronized (scrollPane.getTreeLock()) {\n // Scroll the view now...\n super.setViewPosition(p);\n }\n } \n });\n \n // Setup our view in the scroll pane's viewport\n scrollPane.getViewport().add(mapComponent, null);\n \n \n //scrollPane = new JScrollPane(mapComponent);\n scrollPane.setColumnHeaderView(xRule);\n scrollPane.setRowHeaderView(yRule);\n scrollPane.setCorner(JScrollPane.UPPER_LEFT_CORNER, new Corner());\n scrollPane.setWheelScrollingEnabled(false);\n scrollPane.doLayout();\n \n setContentPane(scrollPane);\n \n // Our size, loc\n setSize(prefs.mapFrameSize);\n setLocation((int) prefs.mapFrameLoc.getX() + ((documentsOpened-1)*10 % (int) prefs.desktopSize.getWidth()),\n (int) prefs.mapFrameLoc.getY() + ((documentsOpened-1)*10 % (int) prefs.desktopSize.getHeight()));\n \n // Setup undo\n undoableChanges = new LinkedList();\n \n // Show the window now\n this.show();\n \n // We're done\n setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n }", "public Map(int canvasWidth, int canvasHeight, GraphicsContext canvas, boolean grid) {\n this.canvasWidth = canvasWidth;\n this.canvasHeight = canvasHeight;\n this.correction = null;\n this.drawGrid = grid;\n this.claimedArea = new ArrayList();\n this.canvas = canvas;\n\n instance = this;\n\n // Do a first calculation of the map size\n calculateMapSize(false);\n\n playerTracking = new ArrayList();\n listeners = new ArrayList();\n }", "public MapGameRequest(String map){\n super(map);\n this.content=\"MapRequest\";\n }", "public InstanceLabelMapTable() {\n\t\tthis(\"instance_label_map\", null);\n\t}", "public OBOMapper() {\n this(true);\n }", "public Map(PApplet p, String id, float x, float y, float width, float height, boolean useMask,\n \t\t\tboolean useDistortion, AbstractMapProvider provider) {\n \t\tthis.p = p;\n \n \t\tthis.id = id;\n \t\tthis.x = x;\n \t\tthis.y = y;\n \t\tthis.width = width;\n \t\tthis.height = height;\n \n \t\tthis.mapDisplay = MapDisplayFactory.getMapDisplay(p, id, x, y, width, height, useMask,\n \t\t\t\tuseDistortion, provider);\n \t\t\n \t\tpanCenterZoomTo(PRIME_MERIDIAN_EQUATOR_LOCATION, DEFAULT_ZOOM_LEVEL);\n \t}", "public Lat2() {\n initComponents();\n }", "public void showmap() {\n MapForm frame = new MapForm(this.mapLayout);\n frame.setSize(750, 540);\n frame.setLocationRelativeTo(null);\n frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n frame.setVisible(true);\n }", "public MapContainer(MapProvider provider) {\n this(provider, null);\n }", "public EncodingMap() {}", "private MapTransformer(Map map) {\n super();\n iMap = map;\n }", "public OutputBufferMap () {\n }", "public Street (SimpleMap roadMap) {\n if (roadMap != null) roadMap.addToMap(this);\n }", "public static MyMapFragment newInstance() {\n MyMapFragment fragment = new MyMapFragment();\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }", "public Map(Dimension dim){\r\n\t\tthis.dim = dim;\r\n\t\tinitiateMap();\r\n\t\tcreateWorldMap();\r\n\t}", "public TimeMap2() {\n map = new HashMap<>();\n }", "public Map(Tile[][] tiles) {\n terrains = new String[]{\"r\", \"p\", \"m1\", \"m2\", \"m3\"};\n this.tiles = tiles;\n }", "public Map(Config config) {\n this.mapCells = new Cell[100][100];\n this.cellGrid= new Cell[20][20][20];\n this.config = config;\n this.origin = config.getOrigin();\n generateMap();\n }", "public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }", "public MapView(android.content.Context param0, org.xms.g.maps.ExtensionMapOptions param1) {\n super(param0);\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n this.setHInstance(new HImpl(param0, ((com.huawei.hms.maps.HuaweiMapOptions) ((param1) == null ? null : (param1.getHInstance())))));\n } else {\n this.setGInstance(new GImpl(param0, ((com.google.android.gms.maps.GoogleMapOptions) ((param1) == null ? null : (param1.getGInstance())))));\n }\n wrapper = false;\n }", "public IntMap()\r\n {\r\n this(16);\r\n }", "public TestFrames() {\n\t\tclasslogger.info(\"Called constructor for TestFrames...\");\n\t}", "public Map(int size_pixels, double size_meters) {\n this.init(size_pixels, size_meters);\n\n // for public accessor\n this.size_meters = size_meters;\n }", "public MapPanel(MapObject[][] map, int pixels_per_grid) {\n \tthis.map = map.clone();\n \tif (pixels_per_grid == 0)\n \t\tthis.pixels_per_grid = GRID_SIZE;\n \telse\n \t\tthis.pixels_per_grid = pixels_per_grid;\n }", "public MassMsgFrame() {\n\t}", "public MapTest(String name) {\n\t\tsuper(name);\n\t}", "public OwnMap() {\n super();\n keySet = new OwnSet();\n }", "@Override\n\tpublic void init() {\n\t\tworld = new World(gsm);\n\t\tworld.init();\n\t\t\n\t\tif(worldName == null){\n\t\t\tworldName = \"null\";\n\t\t\tmap_name = \"map\";\n\t\t} \n\t\tworld.generate(map_name);\n\t}", "public SiscobanFrame() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "@SuppressWarnings(\"unused\")\n private Map() {\n height_ = 0;\n width_ = 0;\n System.exit(-777);\n }", "ABcontroller(int mapSize){\n\t\tsuper(mapSize);\n\t\ttimer = new Timer();\n\t}", "public Map initMap(){\n\t\tif (map == null){\n\t\t\tmap = createMap();\n\t\t}\n\t\treturn map;\n\t}", "public MyHashMap() {\n map = new HashMap();\n }", "public Player(int aMapPort,String aCompName, String aMapName)\r\n\t{\r\n\t\tmapPort = aMapPort;\r\n\t\tcompName = aCompName;\r\n\t\tmapName = aMapName;\r\n\t\t\r\n\t\tJFrame frameBoard = new JFrame();\r\n\t\tframeBoard.setTitle(\"MapFrame \"+mapName);\r\n\t\tframeBoard.setSize(800, 480);\r\n\t\tframeBoard.setLocation(450, 100);\r\n\t\tframeBoard.setResizable(false);\r\n\t\t\r\n\t\tSystem.out.println(\"We got so far\");\t\r\n\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tgetInfo();\r\n\t\t\t board = new Hub_Board(sizeX, sizeY, frameBoard.getContentPane(),value,mapName);\r\n\t\t\t setPlayerPosition();\r\n\t\t\tframeBoard.setVisible(true);\r\n\t\t\t\r\n\t\t\tfieldArray = board.getArray();\r\n\t\t\t\r\n\t\t} catch (UnknownHostException e) {\r\n\t\t\tSystem.out.println(\"Exception occured\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Exception occured\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\nSystem.out.println(\"We are victorious with matthiew\");\r\n\t\t \r\n\t}", "public MyHashMap() {\n\n }", "public Location() {\n\t}", "public FrameAnimator(String location)\n\t{\n\t\tthis(location, \"basic\");\n\t}", "public MapFactoryObject(Vector2 position) {\n this.position = position;\n }", "public MapContainer(String javaScriptMapsAPIKey) {\n this(null, javaScriptMapsAPIKey);\n }", "public bc m21444a(Map<String, bb> map) {\n this.f18795a = map;\n return this;\n }", "public MapManager() {\n myList = null;\n scrabbleList = null;\n }" ]
[ "0.72899395", "0.72124636", "0.7163716", "0.6841907", "0.68262696", "0.66578513", "0.6628184", "0.6606433", "0.65487957", "0.6544969", "0.653546", "0.65059066", "0.64977545", "0.6495594", "0.6493097", "0.6471983", "0.6455707", "0.6358159", "0.635338", "0.63357", "0.62905246", "0.6289465", "0.6275374", "0.6267793", "0.6243339", "0.62188506", "0.6217784", "0.6209457", "0.61932033", "0.61912334", "0.6169408", "0.6164092", "0.6162842", "0.61543006", "0.6138508", "0.61273307", "0.61256105", "0.61108506", "0.6091016", "0.60706717", "0.60607255", "0.60529226", "0.60467726", "0.6040695", "0.6007548", "0.59929425", "0.5992307", "0.59921813", "0.5981963", "0.5969828", "0.59625596", "0.595431", "0.5941954", "0.5941128", "0.593517", "0.5930876", "0.591179", "0.5907447", "0.59052813", "0.59018284", "0.5893573", "0.5880427", "0.5869104", "0.5864634", "0.58475775", "0.583759", "0.5829876", "0.58236295", "0.5819442", "0.5819292", "0.5801231", "0.57924354", "0.5791934", "0.57868767", "0.57867694", "0.5781024", "0.5779304", "0.577611", "0.57690763", "0.57609224", "0.5760705", "0.5752288", "0.57483155", "0.5743214", "0.5738134", "0.57251585", "0.57221633", "0.5719698", "0.5717433", "0.5709219", "0.57079756", "0.569012", "0.5689796", "0.5686526", "0.56834584", "0.5672245", "0.56715655", "0.5643601", "0.56335926", "0.5632737" ]
0.5685546
94
/ This method creates the buttons (Highscore and Quit) and the labels which are added to the buttom of the MapFrame frame. The name, difficulty, energy, skill, score, found keys, made moves and amount of won prices is displayed.
public void createAndShowButtons() { // repainting images to update after player was moved @SuppressWarnings("unused") Graphics g = getGraphics(); removeAll(); revalidate(); repaint(); setLayout(new GridLayout(1, 6, 100, 0)); JButton highscoreButton = new JButton("Highscore"); add(highscoreButton); /* * Inner class listening to the highscore button being pressed. */ highscoreButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { JOptionPane.showMessageDialog(null, Scores.showHighscore()); mapFrame.createAndShowGui(); } }); JLabel name = new JLabel( "<html><div>Name: " + player.getName() + "<br> Difficulty: " + map.getDifficulty() + "</div></html>"); add(name); JLabel skill = new JLabel( "<html><div> Energy: " + player.getEnergy() + " <br> Skill: " + player.getSkill() + "</div></html>"); add(skill); JLabel currentScore = new JLabel("<html><div> Score: " + score.getScore() + "<br> Key(s): " + player.getNumberOfKeys() + "/" + map.getNUMBER_OF_REQUIRED_KEYS() + "</div></html>"); add(currentScore); JLabel numberOfMoves = new JLabel("<html><div> Moves: " + player.getNumberOfMoves() + "<br> Prices: " + player.getWonPrices() + "</div></html>"); add(numberOfMoves); JButton quitButton = new JButton("Quit"); add(quitButton); /* * Inner class listening to the Quit button being pressed. */ quitButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { JOptionPane.showMessageDialog(null, "Bye, come back soon!"); System.exit(1); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MapButtons(Map map1, Character player1, Scores score1, MapFrame mapFrame) {\n\t\tthis.map = map1;\n\t\tthis.player = player1;\n\t\tthis.score = score1;\n\t\tthis.mapFrame = mapFrame;\n\t\tthis.createAndShowButtons();\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(new Color(224, 255, 255));\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblNewLabel_4 = new JLabel(\"Name?\");\n\t\tlblNewLabel_4.setBounds(73, 69, 70, 15);\n\t\tframe.getContentPane().add(lblNewLabel_4);\n\t\t\n\t\ttxtName = new JTextField();\n\t\ttxtName.setText(\"name?\");\n\t\ttxtName.setBounds(194, 67, 114, 19);\n\t\tframe.getContentPane().add(txtName);\n\t\ttxtName.setColumns(10);\n\t\t\n\t\tJButton btnPet = new JButton(\"Dog\");\n\t\tbtnPet.setBounds(38, 125, 117, 25);\n\t\tframe.getContentPane().add(btnPet);\n\t\t\n\t\tbtnNewButton = new JButton(\"Pig\");\n\t\tbtnNewButton.setBounds(38, 162, 117, 25);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tbtnNewButton_1 = new JButton(\"Cat\");\n\t\tbtnNewButton_1.setBounds(38, 199, 117, 25);\n\t\tframe.getContentPane().add(btnNewButton_1);\n\t\t\n\t\tbtnNewButton_2 = new JButton(\"bird\");\n\t\tbtnNewButton_2.setBounds(249, 125, 117, 25);\n\t\tframe.getContentPane().add(btnNewButton_2);\n\t\t\n\t\tbtnNewButton_3 = new JButton(\"fish\");\n\t\tbtnNewButton_3.setBounds(249, 162, 117, 25);\n\t\tframe.getContentPane().add(btnNewButton_3);\n\t\t\n\t\tbtnNewButton_4 = new JButton(\"giraffe\");\n\t\tbtnNewButton_4.setBounds(249, 199, 117, 25);\n\t\tframe.getContentPane().add(btnNewButton_4);\n\t\t\n\t\tbtnNewButton_5 = new JButton(\"NEXT\");\n\t\tbtnNewButton_5.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tgameGUI.setNext();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_5.setBounds(307, 236, 117, 25);\n\t\tframe.getContentPane().add(btnNewButton_5);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "private void initComponents(MinesweeperView frame, int[] gridef, Checkerboard panGrid, Score panScore) {\r\n frame.add(new JButton());\r\n String[] table = {\"Retour et sauvegarder\", \"Quitter et sauvegarder\", \"Rejouer\"};\r\n for (int i = 0 ; i < 3 ; i++) {\r\n JButton btn = new JButton(table[i]);\r\n btn.setSize(200, 50);\r\n btn.setLocation(953, 470+60*i);\r\n btn.addActionListener(new ListenerGame(frame, panGrid, panScore, table, gridef));\r\n frame.add(btn);\r\n }\r\n }", "public void drawButtons(){\r\n\t\tGuiBooleanButton showDirection = new GuiBooleanButton(1, 10, 20, 150, 20, \"Show Direction\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowdir(), \"showdir\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showdir\").split(\";\"));\r\n\t\tGuiChooseStringButton dirpos = new GuiChooseStringButton(2, width/2+50, 20, 150, 20, \"Dir-Position\", GuiPositions.getPosList(), \"posdir\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosDir()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showFPS= new GuiBooleanButton(3, 10, 45, 150, 20, \"Show FPS\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowfps(), \"showfps\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfps\").split(\";\"));\r\n\t\tGuiChooseStringButton fpspos = new GuiChooseStringButton(4, width/2+50, 45, 150, 20, \"FPS-Position\", GuiPositions.getPosList(), \"posfps\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosFPS()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showCoor = new GuiBooleanButton(5, 10, 70, 150, 20, \"Show Coor\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowcoor(), \"showcoor\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showcoor\").split(\";\"));\r\n\t\tGuiChooseStringButton coorpos = new GuiChooseStringButton(6, width/2+50, 70, 150, 20, \"Coor-Position\", GuiPositions.getPosList(), \"poscoor\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosCoor()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showworldage = new GuiBooleanButton(7, 10, 95, 150, 20, \"Show WorldAge\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowWorldAge(), \"showworldage\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showworldage\").split(\";\"));\r\n\t\tGuiChooseStringButton worldagepos = new GuiChooseStringButton(8, width/2+50, 95, 150, 20, \"WorldAge-Position\", GuiPositions.getPosList(), \"posworldage\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosWorldAge()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\tGuiBooleanButton showFriendly = new GuiBooleanButton(7, 10, 120, 150, 20, \"Mark friendly spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingFriendlySpawns(), \"showfmobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfriendlymobspawn\").split(\";\"));\r\n\t\tGuiBooleanButton showAggressiv = new GuiBooleanButton(7, 10, 145, 150, 20, \"Mark aggressiv spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingAggressivSpawns(), \"showamobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showaggressivmobspawn\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton dynamic = new GuiBooleanButton(7, width/2+50, 120, 150, 20, \"dynamic selection\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isDynamic(), \"dynamichsel\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.dynamicselection\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tGuiButton back = new GuiButton(9, width/2-100,height-50 , \"back to game\");\r\n\t\t\r\n\t\tbuttonList.add(showworldage);\r\n\t\tbuttonList.add(worldagepos);\r\n\t\tbuttonList.add(dirpos);\r\n\t\tbuttonList.add(fpspos);\r\n\t\tbuttonList.add(coorpos);\r\n\t\tbuttonList.add(showCoor);\r\n\t\tbuttonList.add(showFPS);\r\n\t\tbuttonList.add(showDirection);\r\n\t\t\r\n\t\tbuttonList.add(showFriendly);\r\n\t\tbuttonList.add(showAggressiv);\r\n\t\tbuttonList.add(dynamic);\r\n\t\t\r\n\t\tbuttonList.add(back);\r\n\t}", "private void initButtons() {\n\t\taddGoalkeeper = new JButton(\"+\");\n\t\taddGoalkeeper.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(0, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddDefence1 = new JButton(\"+\");\n\t\taddDefence1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(1, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddDefence2 = new JButton(\"+\");\n\t\taddDefence2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(2, e);\n\t\t\t}\n\t\t});\n\t\t\t\t\n\t\taddDefence3 = new JButton(\"+\");\n\t\taddDefence3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(3, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddDefence4 = new JButton(\"+\");\n\t\taddDefence4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(4, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddMiddle1 = new JButton(\"+\");\n\t\taddMiddle1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(5, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddMiddle2 = new JButton(\"+\");\n\t\taddMiddle2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(6, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddMiddle3 = new JButton(\"+\");\n\t\taddMiddle3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(7, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddMiddle4 = new JButton(\"+\");\n\t\taddMiddle4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(8, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddForward1 = new JButton(\"+\");\n\t\taddForward1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(9, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddForward2 = new JButton(\"+\");\n\t\taddForward2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(10, e);\n\t\t\t}\n\t\t});\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(new Color(204, 153, 153));\n\t\tframe.setBounds(100, 100, 648, 455);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"+\");\n\t\tbtnNewButton.setBackground(new Color(102, 102, 153));\n\t\tbtnNewButton.addActionListener(new plusListener());\n\t\t\n\t\tbtnNewButton.setBounds(47, 21, 85, 21);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJButton btnNewButton_1 = new JButton(\"Cal\");\n\t\tbtnNewButton_1.setBackground(new Color(102, 102, 153));\n\t\tbtnNewButton_1.addActionListener(new escapeListener());\n\t\tbtnNewButton_1.setBounds(216, 21, 205, 21);\n\t\tframe.getContentPane().add(btnNewButton_1);\n\t\t\n\t\tJButton btnNewButton_2 = new JButton(\"-\");\n\t\tbtnNewButton_2.setBackground(new Color(102, 102, 153));\n\t\tbtnNewButton_2.setBounds(47, 52, 85, 21);\n\t\tbtnNewButton_2.addActionListener(new minusListener());\n\t\tframe.getContentPane().add(btnNewButton_2);\n\t\t\n\t\tJButton btnNewButton_3 = new JButton(\"Play\");\n\t\tbtnNewButton_3.setBackground(new Color(102, 102, 153));\n\t\tbtnNewButton_3.setBounds(494, 21, 85, 52);\n\t\tbtnNewButton_3.addActionListener(new playListener());\n\t\tframe.getContentPane().add(btnNewButton_3);\n\t\t\n\t\tJButton btnNewButton_4 = new JButton(\"Next\");\n\t\tbtnNewButton_4.setBackground(new Color(102, 102, 153));\n\t\tbtnNewButton_4.setBounds(216, 52, 205, 21);\n\t\tbtnNewButton_4.addActionListener(new nextListener());\n\t\tframe.getContentPane().add(btnNewButton_4);\n\t\t\n\t\tJButton btnNewButton_5 = new JButton(\"\");\n\t\tbtnNewButton_5.setBackground(new Color(255, 255, 255));\n\t\tbtnNewButton_5.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmov.playOneNode(0);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_5.setBounds(47, 176, 39, 221);\n\t\tframe.getContentPane().add(btnNewButton_5);\n\t\t\n\t\tJButton btnNewButton_6 = new JButton(\"\");\n\t\tbtnNewButton_6.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmov.playOneNode(4);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_6.setBackground(Color.WHITE);\n\t\tbtnNewButton_6.setBounds(327, 176, 39, 175);\n\t\tframe.getContentPane().add(btnNewButton_6);\n\t\t\n\t\tJButton btnNewButton_7 = new JButton(\"\");\n\t\tbtnNewButton_7.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmov.playOneNode(1);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_7.setBackground(Color.WHITE);\n\t\tbtnNewButton_7.setBounds(116, 176, 39, 211);\n\t\tframe.getContentPane().add(btnNewButton_7);\n\t\t\n\t\tJButton btnNewButton_8 = new JButton(\"\");\n\t\tbtnNewButton_8.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmov.playOneNode(5);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_8.setBackground(Color.WHITE);\n\t\tbtnNewButton_8.setBounds(395, 176, 39, 164);\n\t\tframe.getContentPane().add(btnNewButton_8);\n\t\t\n\t\tJButton btnNewButton_9 = new JButton(\"\");\n\t\tbtnNewButton_9.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmov.playOneNode(2);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_9.setBackground(Color.WHITE);\n\t\tbtnNewButton_9.setBounds(185, 176, 39, 199);\n\t\tframe.getContentPane().add(btnNewButton_9);\n\t\t\n\t\tJButton btnNewButton_10 = new JButton(\"\");\n\t\tbtnNewButton_10.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmov.playOneNode(6);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_10.setBackground(Color.WHITE);\n\t\tbtnNewButton_10.setBounds(465, 176, 39, 150);\n\t\tframe.getContentPane().add(btnNewButton_10);\n\t\t\n\t\tJButton btnNewButton_11 = new JButton(\"\");\n\t\tbtnNewButton_11.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmov.playOneNode(3);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_11.setBackground(Color.WHITE);\n\t\tbtnNewButton_11.setBounds(259, 176, 39, 186);\n\t\tframe.getContentPane().add(btnNewButton_11);\n\t\t\n\t\tJButton btnNewButton_12 = new JButton(\"\");\n\t\tbtnNewButton_12.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmov.playOneNode(7);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_12.setBackground(Color.WHITE);\n\t\tbtnNewButton_12.setFont(new Font(\"Tahoma\", Font.PLAIN, 6));\n\t\tbtnNewButton_12.setBounds(540, 176, 39, 137);\n\t\tframe.getContentPane().add(btnNewButton_12);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(new Color(0, 0, 0));\n\t\tpanel.setBounds(45, 190, 534, 16);\n\t\tframe.getContentPane().add(panel);\n\t\t\n\t\tJPanel panel_1 = new JPanel();\n\t\tpanel_1.setBackground(Color.BLACK);\n\t\tpanel_1.setBounds(47, 282, 534, 16);\n\t\tframe.getContentPane().add(panel_1);\n\t}", "private void initialize() {\n frame = new JFrame();\n frame.getContentPane().setBackground(Color.BLACK);\n frame.setBackground(Color.BLACK);\n frame.setResizable(false);\n frame.setBounds(100, 100, 350, 300);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setTitle(\"Final Score\");\n frame.getContentPane().setLayout(null);\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\n JLabel lblFinalScoreText = new JLabel(\"Final score:\");\n lblFinalScoreText.setHorizontalAlignment(SwingConstants.LEFT);\n lblFinalScoreText.setForeground(Color.WHITE);\n lblFinalScoreText.setFont(new Font(\"Quantico\", Font.BOLD, 18));\n lblFinalScoreText.setBounds(24, 24, 130, 54);\n frame.getContentPane().add(lblFinalScoreText);\n\n JLabel lblFinalScoreCount = new JLabel(\"\");\n lblFinalScoreCount.setFont(new Font(\"Bitstream Vera Sans Mono\", Font.BOLD, 30));\n lblFinalScoreCount.setForeground(Color.WHITE);\n lblFinalScoreCount.setHorizontalAlignment(SwingConstants.LEFT);\n lblFinalScoreCount.setBounds(197, 12, 187, 80);\n frame.getContentPane().add(lblFinalScoreCount);\n lblFinalScoreCount.setText(String.valueOf(engine.getFinalScore()));\n \n JLabel lblShipName = new JLabel(\"Ship's Name:\");\n lblShipName.setFont(new Font(\"Ubuntu Light\", Font.BOLD, 13));\n lblShipName.setForeground(Color.WHITE);\n lblShipName.setBounds(24, 163, 158, 25);\n frame.getContentPane().add(lblShipName);\n \n JLabel lblNumDays = new JLabel(\"Number of days:\");\n lblNumDays.setFont(new Font(\"Ubuntu Light\", Font.BOLD, 13));\n lblNumDays.setForeground(Color.WHITE);\n lblNumDays.setBounds(24, 212, 146, 15);\n frame.getContentPane().add(lblNumDays);\n \n JLabel lblWonGame = new JLabel(\"\");\n lblWonGame.setHorizontalAlignment(SwingConstants.LEFT);\n lblWonGame.setForeground(Color.WHITE);\n lblWonGame.setBounds(24, 88, 314, 43);\n String template = \"<html>\";\n if (engine.hasFoundEnoughPieces()) {\n lblWonGame.setForeground(Color.GREEN);\n \ttemplate += \"You have collected all the ship pieces<br>\";\n \ttemplate += \"Congratulations, you won the game!\";\n }\n else {\n lblWonGame.setForeground(Color.RED);\n \ttemplate += \"You did not collect all the ship pieces<br>\";\n \ttemplate += \"better luck next time!\";\n }\n template += \"</html>\";\n lblWonGame.setText(template);\n frame.getContentPane().add(lblWonGame);\n \n JLabel shipNameDetail = new JLabel(\"\");\n shipNameDetail.setForeground(Color.WHITE);\n shipNameDetail.setBounds(197, 168, 141, 15);\n shipNameDetail.setText(engine.getSpaceshipName());\n frame.getContentPane().add(shipNameDetail);\n \n JLabel days = new JLabel(\"\");\n days.setForeground(Color.WHITE);\n days.setBounds(197, 212, 66, 15);\n days.setText(String.valueOf(engine.getCurrDay() - 1));\n frame.getContentPane().add(days);\n }", "private void initialize() {\r\n\t\tfrmTempleOfAtzoatl = new JFrame();\r\n\t\tfrmTempleOfAtzoatl.setResizable(false);\r\n\t\tfrmTempleOfAtzoatl.setTitle(\"Temple of Atzoatl\");\r\n\t\tfrmTempleOfAtzoatl.setBounds(100, 100, 313, 556);\r\n\t\tfrmTempleOfAtzoatl.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\tJLabel lblMapTiersOf = new JLabel(\"Map tiers of your incursions:\");\r\n\t\tlblMapTiersOf.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\tlblMapTiersOf.setBounds(10, 130, 172, 17);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(lblMapTiersOf);\r\n\t\t\r\n\t\tbutton1 = new JButton(\"1\");\r\n\t\tbutton1.setBounds(20, 160, 60, 60);\r\n\t\tbutton1.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button1);\r\n\t\t\r\n\t\tbutton2 = new JButton(\"2\");\r\n\t\tbutton2.setBounds(90, 160, 60, 60);\r\n\t\tbutton2.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button2);\r\n\t\t\r\n\t\tbutton3 = new JButton(\"3\");\r\n\t\tbutton3.setBounds(160, 160, 60, 60);\r\n\t\tbutton3.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button3);\r\n\t\t\r\n\t\tbutton4 = new JButton(\"4\");\r\n\t\tbutton4.setBounds(230, 160, 60, 60);\r\n\t\tbutton4.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button4);\r\n\t\t\r\n\t\tbutton5 = new JButton(\"5\");\r\n\t\tbutton5.setBounds(20, 230, 60, 60);\r\n\t\tbutton5.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button5);\r\n\t\t\r\n\t\tbutton6 = new JButton(\"6\");\r\n\t\tbutton6.setBounds(90, 230, 60, 60);\r\n\t\tbutton6.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button6);\r\n\t\t\r\n\t\tbutton7 = new JButton(\"7\");\r\n\t\tbutton7.setBounds(160, 230, 60, 60);\r\n\t\tbutton7.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button7);\r\n\t\t\r\n\t\tbutton8 = new JButton(\"8\");\r\n\t\tbutton8.setBounds(230, 230, 60, 60);\r\n\t\tbutton8.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button8);\r\n\t\t\r\n\t\tbutton9 = new JButton(\"9\");\r\n\t\tbutton9.setBounds(20, 300, 60, 60);\r\n\t\tbutton9.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button9);\r\n\t\t\r\n\t\tbutton10 = new JButton(\"10\");\r\n\t\tbutton10.setBounds(90, 300, 60, 60);\r\n\t\tbutton10.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button10);\r\n\t\t\r\n\t\tbutton11 = new JButton(\"11\");\r\n\t\tbutton11.setBounds(160, 300, 60, 60);\r\n\t\tbutton11.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button11);\r\n\t\t\r\n\t\tbutton12 = new JButton(\"12\");\r\n\t\tbutton12.setBounds(230, 300, 60, 60);\r\n\t\tbutton12.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button12);\r\n\t\t\r\n\t\tbutton13 = new JButton(\"13\");\r\n\t\tbutton13.setBounds(20, 370, 60, 60);\r\n\t\tbutton13.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button13);\r\n\t\t\r\n\t\tbutton14 = new JButton(\"14\");\r\n\t\tbutton14.setBounds(90, 370, 60, 60);\r\n\t\tbutton14.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button14);\r\n\t\t\r\n\t\tbutton15 = new JButton(\"15\");\r\n\t\tbutton15.setBounds(160, 370, 60, 60);\r\n\t\tbutton15.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button15);\r\n\t\t\r\n\t\tbutton16 = new JButton(\"16\");\r\n\t\tbutton16.setBounds(230, 370, 60, 60);\r\n\t\tbutton16.addActionListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(button16);\r\n\t\t\r\n\t\ttextField_recommendation = new JTextField();\r\n\t\ttextField_recommendation.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\ttextField_recommendation.setEditable(false);\r\n\t\ttextField_recommendation.setBounds(10, 500, 287, 20);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(textField_recommendation);\r\n\t\ttextField_recommendation.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblRemaining = new JLabel(\"Remaining: \");\r\n\t\tlblRemaining.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\tlblRemaining.setBounds(10, 470, 72, 17);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(lblRemaining);\r\n\t\t\r\n\t\ttextField_remaining = new JTextField();\r\n\t\ttextField_remaining.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\ttextField_remaining.setEditable(false);\r\n\t\ttextField_remaining.setBounds(85, 470, 46, 20);\r\n\t\ttextField_remaining.setText(\"N/A\");\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(textField_remaining);\r\n\t\ttextField_remaining.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblTierCap = new JLabel(\"Tier Cap:\");\r\n\t\tlblTierCap.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\tlblTierCap.setBounds(160, 470, 55, 17);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(lblTierCap);\r\n\t\t\r\n\t\ttextField_tierCap = new JTextField();\r\n\t\ttextField_tierCap.setText(\"N/A\");\r\n\t\ttextField_tierCap.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\ttextField_tierCap.setEditable(false);\r\n\t\ttextField_tierCap.setBounds(230, 470, 60, 20);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(textField_tierCap);\r\n\t\ttextField_tierCap.setColumns(10);\r\n\t\t\r\n\t\ttextField_log = new JTextField();\r\n\t\ttextField_log.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\ttextField_log.setBounds(10, 439, 287, 20);\r\n\t\ttextField_log.setText(\"N/A\");\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(textField_log);\r\n\t\ttextField_log.setColumns(10);\r\n\t\t\r\n\t\tlblDesiredTierOf = new JLabel(\"Desired tier of temple:\");\r\n\t\tlblDesiredTierOf.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\tlblDesiredTierOf.setBounds(10, 14, 134, 17);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(lblDesiredTierOf);\r\n\t\t\r\n\t\tspinner_desiredTier = new JSpinner();\r\n\t\tspinner_desiredTier.setModel(new SpinnerNumberModel(16, 1, 16, 1));\r\n\t\tspinner_desiredTier.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\tspinner_desiredTier.setBounds(160, 11, 46, 24);\r\n\t\tspinner_desiredTier.addChangeListener(this);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(spinner_desiredTier);\r\n\t\t\r\n\t\tchckbxAutobump = new JCheckBox(\"Auto-bump\");\r\n\t\tchckbxAutobump.setFont(new Font(\"Tahoma\", Font.PLAIN, 11));\r\n\t\tchckbxAutobump.setSelected(true);\r\n\t\tchckbxAutobump.setBounds(212, 13, 79, 23);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(chckbxAutobump);\r\n\t\t\r\n\t\tbtnNewTemple = new JButton(\"New Temple\");\r\n\t\tbtnNewTemple.addActionListener(this);\r\n\t\tbtnNewTemple.setBounds(10, 52, 287, 67);\r\n\t\tfrmTempleOfAtzoatl.getContentPane().add(btnNewTemple);\r\n\t\t\r\n\t\tthis.temple = new TempleOfAtzoatl(this, 16);\r\n\t\tthis.tierCap = 0;\r\n\t\tthis.desiredTier = 16;\r\n\t}", "public void addKeys() {\n\t\tbtnDot = new JButton(\".\");\n\t\tbtnDot.setBounds(42, 120, 40, 40);\n\t\tthis.add(btnDot); //Handle case\n\t\t\n\t\tbtn0 = new JButton(\"0\");\n\t\tbtn0.setBounds(81, 120, 40, 40);\n\t\tthis.add(btn0);\n\t\tnumberButtonList = new ArrayList<JButton>(10);\n\t\tnumberButtonList.add(btn0);\n\t\t\n\t\tbtnC = new JButton(\"C\");\n\t\tbtnC.setBounds(120, 120, 40, 40);\n\t\tthis.add(btnC);\n\t\t\n\t\tbtnStar = new JButton(\"*\");\n\t\tbtnStar.setBounds(159, 120, 40, 40);\n\t\tthis.add(btnStar);\n\t\toperationButtonList = new ArrayList<JButton>(10);\n\t\toperationButtonList.add(btnStar);\n\t\t\n\t\tbtnPi = new JButton(\"π\");\n\t\tbtnPi.setBounds(198, 120, 40, 40);\n\t\tthis.add(btnPi);\n\t\t//numberButtonList.add(btnPi); //Special case\n\t\tvalueButtons.add(btnPi);\n\t\t\n\t\tbtnLn = new JButton(\"ln\");\n\t\tbtnLn.setBounds(237, 120, 40, 40);\n\t\tthis.add(btnLn);\n\t\tresultOperations.add(btnLn);\n\t\t\n\t\t//Row 2\n\t\t\n\t\tbtn3 = new JButton(\"3\");\n\t\tbtn3.setBounds(42, 80, 40, 40);\n\t\tthis.add(btn3);\n\t\tnumberButtonList.add(btn3);\n\t\t\n\t\tbtn2 = new JButton(\"2\");\n\t\tbtn2.setBounds(81, 80, 40, 40);\n\t\tthis.add(btn2);\n\t\tnumberButtonList.add(btn2);\n\t\t\n\t\tbtn1 = new JButton(\"1\");\n\t\tbtn1.setBounds(120, 80, 40, 40);\n\t\tthis.add(btn1);\n\t\tnumberButtonList.add(btn1);\n\t\t\n\t\tbtnDivide = new JButton(\"/\");\n\t\tbtnDivide.setBounds(159, 80, 40, 40);\n\t\tthis.add(btnDivide);\n\t\toperationButtonList.add(btnDivide);\n\t\t\n\t\tbtnE = new JButton(\"e\");\n\t\tbtnE.setBounds(198, 80, 40, 40);\n\t\tthis.add(btnE);\n\t\tvalueButtons.add(btnE);\n\t\t//numberButtonList.add(btnE); //Special case\n\t\t\n\t\tbtnTan = new JButton(\"tan\");\n\t\tbtnTan.setBounds(237, 80, 40, 40);\n\t\tthis.add(btnTan);\n\t\tresultOperations.add(btnTan);\n\t\t\n\t\t//Row 3\n\t\t\n\t\tbtn6 = new JButton(\"6\");\n\t\tbtn6.setBounds(42, 40, 40, 40);\n\t\tthis.add(btn6);\n\t\tnumberButtonList.add(btn6);\n\t\t\n\t\tbtn5 = new JButton(\"5\");\n\t\tbtn5.setBounds(81, 40, 40, 40);\n\t\tthis.add(btn5);\n\t\tnumberButtonList.add(btn5);\n\t\t\n\t\tbtn4 = new JButton(\"4\");\n\t\tbtn4.setBounds(120, 40, 40, 40);\n\t\tthis.add(btn4);\n\t\tnumberButtonList.add(btn4);\n\t\t\n\t\tbtnMinus = new JButton(\"-\");\n\t\tbtnMinus.setBounds(159, 40, 40, 40);\n\t\tthis.add(btnMinus);\n\t\toperationButtonList.add(btnMinus);\n\t\t\n\t\tbtnSqRt = new JButton(\"√\");\n\t\tbtnSqRt.setBounds(198, 40, 40, 40);\n\t\tthis.add(btnSqRt);\n\t\tresultOperations.add(btnSqRt);\n\t\t\n\t\tbtnCos = new JButton(\"cos\");\n\t\tbtnCos.setBounds(237, 40, 40, 40);\n\t\tthis.add(btnCos);\n\t\tresultOperations.add(btnCos);\n\t\t\n\t\t//Row 4\n\t\t\n\t\tbtn9 = new JButton(\"9\");\n\t\tbtn9.setBounds(42, 0, 40, 40);\n\t\tthis.add(btn9);\n\t\tnumberButtonList.add(btn9);\n\t\t\n\t\tbtn8 = new JButton(\"8\");\n\t\tbtn8.setBounds(81, 0, 40, 40);\n\t\tthis.add(btn8);\n\t\tnumberButtonList.add(btn8);\n\t\t\n\t\tbtn7 = new JButton(\"7\");\n\t\tbtn7.setBounds(120, 0, 40, 40);\n\t\tthis.add(btn7);\n\t\tnumberButtonList.add(btn7);\n\t\t\n\t\tbtnPlus = new JButton(\"+\");\n\t\tbtnPlus.setBounds(159, 0, 40, 40);\n\t\tthis.add(btnPlus);\n\t\toperationButtonList.add(btnPlus);\n\t\t\n\t\tbtnPower = new JButton(\"^\");\n\t\tbtnPower.setBounds(198, 0, 40, 40);\n\t\tthis.add(btnPower);\n\t\toperationButtonList.add(btnPower);\n\t\t\n\t\tbtnSin = new JButton(\"sin\");\n\t\tbtnSin.setBounds(237, 0, 40, 40);\n\t\tthis.add(btnSin);\n\t\tresultOperations.add(btnSin);\n\t}", "public static void main(String yes) throws Exception {\n int WINDOW_WIDTH = 700;\n int WINDOW_HEIGHT = 700;\n //Array with each units \n String[] Chapter = {\"Cells\",\"Genetics\",\"Circulation & Digestion & Respiration\",\"Plants\",\"Diversity of living things\", \"Evolution\" };\n String show;\n //if user presses unit button, then unit board game appears \n //look at mode option java \n if (yes == \"yes\"){\n show =\"Unit Jeopardy!\"; \n }\n //if user presses the random button, then the random board game appears \n else{\n show=\"Random Jeopardy!\";\n }\n \n //creates a jframe \n JFrame frame = new JFrame(show);\n frame.setSize(WINDOW_WIDTH, WINDOW_HEIGHT);\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n //set width and height \n int width = 6;\n int height = 6;\n //value for \n int l,m,n;\n \n String Qestio,Answe,Section;\n //initiate array for question and answers to the question \n String[][] Question=new String[height][width];\n String[][] Answer=new String[height][width];\n //2 dimensional array, populated by jbuttons \n JButton[][] BLK = new JButton[height][width];\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n BLK[i][j] = new JButton(new Integer(i*6+j+1).toString());\n JBox.setSize(BLK[i][j], WINDOW_WIDTH / width - 0,\n WINDOW_HEIGHT / height - 36);\n //set desired colour for the buttons \n BLK[i][j].setBackground(Color.WHITE);\n BLK[i][j].setForeground(Color.BLACK);\n BLK[i][j].setBorder(BorderFactory.createRaisedBevelBorder());\n BLK[i][j].setFont(new Font(\"DejaVu Serif\", Font.BOLD, 25));\n \n }\n }\n \n //create button \n JButton[] BLK1 = new JButton[4];\n BLK1[0] = new JButton(\"Go Back\");\n BLK1[1] = new JButton(\"Correct:\"+ score1);\n BLK1[2] = new JButton(\"Wrong:\"+ score2);\n //label textfield \n JTextField text=new JTextField(\"Correct:\");\n JTextField text1=new JTextField(\"Wrong:\");\n JTextField text2=new JTextField(\"Total:\");\n //set desired font, colours for the textfield \n text.setFont(new Font(\"DejaVu Serif\", Font.BOLD, 20)); \n text.setForeground(Color.GREEN);\n text.setBackground(Color.WHITE);\n text1.setFont(new Font(\"DejaVu Serif\", Font.BOLD, 20)); \n text1.setForeground(Color.red);\n text1.setBackground(Color.WHITE);\n text2.setFont(new Font(\"DejaVu Serif\", Font.BOLD, 20)); \n text2.setForeground(Color.BLUE);\n text2.setBackground(Color.WHITE);\n JLabel Res1 = new JLabel(\"Correct:\"+ score1+score2+score3);\n \n //loactions of the jbox in 2 diemensional array \n JBox board =\n JBox.vbox(\n JBox.hbox(BLK1[0]),\n JBox.hbox(BLK[0][0], BLK[0][1], BLK[0][2], BLK[0][3],BLK[0][4], BLK[0][5]),\n JBox.hbox(BLK[1][0], BLK[1][1], BLK[1][2], BLK[1][3],BLK[1][4], BLK[1][5]),\n JBox.hbox(BLK[2][0], BLK[2][1], BLK[2][2], BLK[2][3],BLK[2][4], BLK[2][5]),\n JBox.hbox(BLK[3][0], BLK[3][1], BLK[3][2], BLK[3][3],BLK[3][4], BLK[3][5]),\n JBox.hbox(BLK[4][0], BLK[4][1], BLK[4][2], BLK[4][3],BLK[4][4], BLK[4][5]),\n JBox.hbox(BLK[5][0], BLK[5][1], BLK[5][2], BLK[5][3],BLK[5][4], BLK[5][5]),\n JBox.hbox(text,text1,text2));\n \n //open the frame. Makes it visible \n board.setSize(WINDOW_WIDTH - 20, WINDOW_HEIGHT);\n frame.add(board);\n frame.setVisible(true);\n //read file \n String f1=\"QuestionAnswer.txt\";\n\n try{\n BufferedReader reader = new BufferedReader(new FileReader(f1));\n ArrayList<String> lines = new ArrayList<String>();\n //s is every single line of the file\n String s; \n //S is total file\n String S;\n S=\"\";\n while ((s = reader.readLine()) != null) {\n S=S+s;\n }\n reader.close();\n \n for ( int i = 0; i < height; i++) {\n // one dimensional array created for each unit at the beginning of code\n l = S.indexOf(Chapter[i]);\n if(i<5){\n m = S.indexOf(Chapter[i+1]);\n //begining index is the first unit (l) and the first unit ends before the second unit (m)\n //for loop repeats \n Section=S.substring(l,m);\n }\n else {\n Section=S.substring(l,S.length());\n }\n //Choose questions and answers\n for (int j = 0; j < width; j++) {\n l=Section.indexOf(String.valueOf(j+1)+\". \");\n m=Section.indexOf(\"a. \",1);\n Qestio=Section.substring(l+3, m);\n Question[i][j]=Qestio;\n Section=Section.substring(m,Section.length());\n \n n=Section.indexOf(\"()\",1);\n Answe=Section.substring(2,n);\n Answer[i][j]=Answe;\n }\n }\n \n //back button\n BLK1[0].addActionListener(new ActionListener() {\n \n /**\n *\n * @author Gloria Song\n */ \n public void actionPerformed(ActionEvent e) { \n //if press back, go back to mode option frame. Makes it visible\n new ModeOption().setVisible(true);\n //destroys jfram for the board game \n frame.dispose();\n frame.setVisible(false); \n }});\n \n for ( int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n //Question\n String Que;\n //RightAnswer\n String Right_Answer; \n if (yes == \"yes\"){\n Que = Question[j][i];\n Right_Answer = Answer[j][i]; \n //reset points to 0\n score1 = 0;\n score2 = 0;\n score3 = 0;\n }\n //open board game that is randomized \n else{\n Random rand = new Random();\n int i1 = rand.nextInt(6);\n int j1 = rand.nextInt(6);\n Que = Question[i1][j1];\n Right_Answer = Answer[i1][j1]; \n //reset points to 0\n score1 = 0;\n score2 = 0;\n score3 = 0;\n }\n \n BLK[i][j].addActionListener(new ActionListener() {\n \n public void actionPerformed(ActionEvent e) {\n //compares the users answer to the correct answer \n String your_answer = JOptionPane.showInputDialog(Que);\n JOptionPane.showMessageDialog(null, \"Reference and yours: \"+ Right_Answer +\" Vs \" + your_answer);\n JButton source = (JButton) e.getSource();\n source.setEnabled(false);\n System.out.println(Right_Answer.length());\n System.out.println(your_answer.length());\n\n //adds point if your right\n if (your_answer.equalsIgnoreCase(Right_Answer.trim())) {\n source.setBackground(Color.GREEN);\n score1++;\n text.setText(\"Correct:\"+score1);\n }\n //add point if your wrong \n else {\n source.setBackground(Color.red);\n score2++;\n text1.setText(\"Wrong:\"+score2);\n }\n //adds all points \n total=score1+score2;\n text2.setText(\"Total:\"+total);\n }\n });\n }\n }\n } catch(Exception e){\n\n }\n\n \n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.GRAY);\n\t\tframe.setBounds(100, 100, 270, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tbuttons = new ArrayList<>();\n\t\t\n\t\tJButton btnNewButton = new JButton(\"7\");\n\t\tbtnNewButton.setBackground(Color.LIGHT_GRAY);\n\t\tbtnNewButton.setBounds(10, 81, 47, 23);\n\t\tbuttons.add(btnNewButton);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJButton btnNewButton_1 = new JButton(\"8\");\n\t\tbtnNewButton_1.setBackground(Color.LIGHT_GRAY);\n\t\tbtnNewButton_1.setBounds(67, 81, 47, 23);\n\t\tbuttons.add(btnNewButton_1);\n\t\tframe.getContentPane().add(btnNewButton_1);\n\t\t\n\t\tJButton btnNewButton_2 = new JButton(\"9\");\n\t\tbtnNewButton_2.setBackground(Color.LIGHT_GRAY);\n\t\tbtnNewButton_2.setBounds(124, 81, 47, 23);\n\t\tbuttons.add(btnNewButton_2);\n\t\tframe.getContentPane().add(btnNewButton_2);\n\t\t\n\t\tJButton button = new JButton(\"4\");\n\t\tbutton.setBackground(Color.LIGHT_GRAY);\n\t\tbutton.setBounds(10, 115, 47, 23);\n\t\tbuttons.add(button);\n\t\tframe.getContentPane().add(button);\n\t\t\n\t\tJButton button_1 = new JButton(\"5\");\n\t\tbutton_1.setBackground(Color.LIGHT_GRAY);\n\t\tbutton_1.setBounds(67, 115, 47, 23);\n\t\tbuttons.add(button_1);\n\t\tframe.getContentPane().add(button_1);\n\t\t\n\t\tJButton button_2 = new JButton(\"6\");\n\t\tbutton_2.setBackground(Color.LIGHT_GRAY);\n\t\tbutton_2.setBounds(124, 115, 47, 23);\n\t\tbuttons.add(button_2);\n\t\tframe.getContentPane().add(button_2);\n\t\t\n\t\tJButton button_3 = new JButton(\"1\");\n\t\tbutton_3.setBackground(Color.LIGHT_GRAY);\n\t\tbutton_3.setBounds(10, 149, 47, 23);\n\t\tbuttons.add(button_3);\n\t\tframe.getContentPane().add(button_3);\n\t\t\n\t\tJButton button_4 = new JButton(\"2\");\n\t\tbutton_4.setBackground(Color.LIGHT_GRAY);\n\t\tbutton_4.setBounds(67, 149, 47, 23);\n\t\tbuttons.add(button_4);\n\t\tframe.getContentPane().add(button_4);\n\t\t\n\t\tJButton button_5 = new JButton(\"3\");\n\t\tbutton_5.setBackground(Color.LIGHT_GRAY);\n\t\tbutton_5.setBounds(124, 149, 47, 23);\n\t\tbuttons.add(button_5);\n\t\tframe.getContentPane().add(button_5);\n\t\t\n\t\tJButton button_6 = new JButton(\"0\");\n\t\tbutton_6.setBackground(Color.LIGHT_GRAY);\n\t\tbutton_6.setBounds(67, 183, 47, 23);\n\t\tbuttons.add(button_6);\n\t\tframe.getContentPane().add(button_6);\n\t\t\n\t\tJButton button_7 = new JButton(\"+\");\n\t\tbutton_7.setBackground(Color.LIGHT_GRAY);\n\t\tbutton_7.setBounds(197, 215, 47, 36);\n\t\tbuttons.add(button_7);\n\t\tframe.getContentPane().add(button_7);\n\t\t\n\t\tJButton button_8 = new JButton(\"-\");\n\t\tbutton_8.setBackground(Color.LIGHT_GRAY);\n\t\tbutton_8.setBounds(197, 170, 47, 36);\n\t\tbuttons.add(button_8);\n\t\tframe.getContentPane().add(button_8);\n\t\t\n\t\tJButton button_9 = new JButton(\"*\");\n\t\tbutton_9.setBackground(Color.LIGHT_GRAY);\n\t\tbutton_9.setBounds(197, 123, 47, 36);\n\t\tbuttons.add(button_9);\n\t\tframe.getContentPane().add(button_9);\n\t\t\n\t\tJButton button_10 = new JButton(\"/\");\n\t\tbutton_10.setBackground(Color.LIGHT_GRAY);\n\t\tbutton_10.setBounds(197, 70, 47, 36);\n\t\tbuttons.add(button_10);\n\t\tframe.getContentPane().add(button_10);\t\t\n\t\t\n\t\tbtnSqrt = new JButton(\"\\u221a\");\n\t\tbtnSqrt.setBackground(Color.LIGHT_GRAY);\n\t\tbtnSqrt.setBounds(197, 21, 47, 36);\n\t\tframe.getContentPane().add(btnSqrt);\n\t\t\n\t\tJButton button_12 = new JButton(\".\");\n\t\tbutton_12.setBackground(Color.LIGHT_GRAY);\n\t\tbutton_12.setBounds(124, 183, 47, 23);\n\t\tbuttons.add(button_12);\n\t\tframe.getContentPane().add(button_12);\n\t\t\n\t\tJButton button_13 = new JButton(\"=\");\n\t\tbutton_13.setBackground(Color.LIGHT_GRAY);\n\t\tbutton_13.setBounds(104, 217, 67, 36);\n\t\tbuttons.add(button_13);\n\t\tframe.getContentPane().add(button_13);\n\t\t\n\t\tlabel = new JLabel(text1);\n\t\tlabel.setBackground(Color.WHITE);\n\t\tlabel.setOpaque(true);\n\t\tlabel.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlabel.setVerticalAlignment(SwingConstants.NORTH);\n\t\tlabel.setBounds(10, 24, 161, 23);\n\t\tframe.getContentPane().add(label);\n\t\t\n\t\tlabel_1 = new JLabel(\"0\");\n\t\tlabel_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tlabel_1.setBackground(Color.WHITE);\n\t\tlabel_1.setOpaque(true);\n\t\tlabel_1.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlabel_1.setBounds(10, 43, 161, 29);\n\t\tframe.getContentPane().add(label_1);\n\t}", "public void initializeButtons(){\n\t\t\tplay.setBounds(40,90,280,30);\n\t\t\tadd(play);\n\t\t\tplay.addActionListener(new PlayGame());\n\t\t\tplay.setVisible(true);\n\t\t\t\n\t\t\tenterquestion.setBounds(40,140,280,30);\n\t\t\tadd(enterquestion);\n\t\t\tenterquestion.addActionListener(new EnterQuestion());\n\t\t\tenterquestion.setVisible(true);\n\t\t\t\n\t\t\tdirections.setBounds(40,190,280,30);\n\t\t\tadd(directions);\n\t\t\tdirections.addActionListener(new Instructor());\n\t\t\tdirections.setVisible(true);\n\t\t\t\n\t\t\t\n\t\t}", "public void createButtons() {\n\t\tescapeBackground = new GRect(200, 150, 300, 400);\n\t\tescapeBackground.setFilled(true);\n\t\tescapeBackground.setColor(Color.gray);\n\n\t\tbutton1 = new GButton(\"Return to Game\", 250, 175, 200, 50, Color.cyan);\n\t\tbutton3 = new GButton(\"Exit Level\", 250, 330, 200, 50, Color.cyan);\n\t\tbutton4 = new GButton(\"Return to Menu\", 250, 475, 200, 50, Color.cyan);\n\n\t\tescapeButtons.add(button1);\n\t\tescapeButtons.add(button3);\n\t\tescapeButtons.add(button4);\n\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblLostHeader = new javax.swing.JLabel();\n lblScoreText = new javax.swing.JLabel();\n lblScore = new javax.swing.JLabel();\n panelButtons = new javax.swing.JPanel();\n btnPlayAgain = new javax.swing.JButton();\n btnHighscore = new javax.swing.JButton();\n btnSignOut = new javax.swing.JButton();\n\n lblLostHeader.setFont(new java.awt.Font(\"Segoe UI\", 1, 48)); // NOI18N\n lblLostHeader.setText(\"You lost!\");\n\n lblScoreText.setFont(new java.awt.Font(\"Segoe UI\", 0, 14)); // NOI18N\n lblScoreText.setText(\"You finished the game with a score of: \");\n\n lblScore.setFont(new java.awt.Font(\"Segoe UI\", 0, 14)); // NOI18N\n lblScore.setText(\"0\");\n\n panelButtons.setLayout(new java.awt.BorderLayout());\n\n btnPlayAgain.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/app/button.png\"))); // NOI18N\n btnPlayAgain.setText(\"Play again\");\n btnPlayAgain.setContentAreaFilled(false);\n btnPlayAgain.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnPlayAgain.setMargin(new java.awt.Insets(0, 14, 2, 14));\n btnPlayAgain.setPreferredSize(new java.awt.Dimension(333, 70));\n btnPlayAgain.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnPlayAgainActionPerformed(evt);\n }\n });\n panelButtons.add(btnPlayAgain, java.awt.BorderLayout.PAGE_END);\n\n btnHighscore.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/app/button.png\"))); // NOI18N\n btnHighscore.setText(\"Highscore\");\n btnHighscore.setContentAreaFilled(false);\n btnHighscore.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnHighscore.setPreferredSize(new java.awt.Dimension(333, 70));\n btnHighscore.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnHighscoreActionPerformed(evt);\n }\n });\n panelButtons.add(btnHighscore, java.awt.BorderLayout.CENTER);\n\n btnSignOut.setText(\"Sign out\");\n btnSignOut.setContentAreaFilled(false);\n btnSignOut.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSignOutActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelButtons, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblLostHeader)\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblScoreText)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblScore)))\n .addGap(0, 20, Short.MAX_VALUE)))\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(102, 102, 102)\n .addComponent(btnSignOut)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblLostHeader)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblScoreText)\n .addComponent(lblScore))\n .addGap(72, 72, 72)\n .addComponent(panelButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 104, Short.MAX_VALUE)\n .addComponent(btnSignOut)\n .addContainerGap())\n );\n }", "private void setLocations(){\n\t\tbuttonArea.setSize(FRAME_WIDTH, 50);\n\t\tbuttonArea.setLocation(0, 0);\n\t\tboardOne.setSize(600,600);\n\t\tboardOne.setLocation(0,buttonArea.getHeight());\n\t\tboardTwo.setSize(600,600);\n\t\tboardTwo.setLocation(boardOne.getWidth() + 10,buttonArea.getHeight());\n\t\tboardOne.setIcon(background);\n\t\tboardTwo.setIcon(background);\n\t\tnewGame.setSize(100,20);\n\t\tnewGame.setLocation(5,5);\n\t\tcp1shipLabel.setSize(200,15);\n\t\tcp1shipLabel.setLocation((boardOne.getWidth() / 2) - (cp1shipLabel.getWidth() / 2),buttonArea.getHeight() - cp1shipLabel.getHeight() - 5);\n\t\tcp1shipLabel.setVisible(false);\n\t\tcp2shipLabel.setSize(200,15);\n\t\tcp2shipLabel.setLocation(boardTwo.getX() + (boardTwo.getWidth() / 2) - (cp2shipLabel.getWidth() / 2),buttonArea.getHeight() - cp2shipLabel.getHeight() - 5);\n\t\tcp2shipLabel.setVisible(false);\n\t}", "public void define(){\n\n noOfCredits = Game.level.getCredits();\n unitsToWin = Game.level.getUnitsToWin();\n\n for (int i = 0; i <buttons.length ; i++) {\n buttons[i] = new ShopButton((Game.width/2) -\n ((noOfButtons*buttonsize)/2) -((smallSpace*\n (buttons.length-1)) /2) + ((buttonsize + smallSpace)*i),\n ((GameContainer.rowCount * GameContainer.squareSize )\n + largeSpace), buttonsize , buttonsize, i);\n }\n\n for (int i = 0; i < statsElements.length ; i++) {\n //define where the statselement should be placed.\n statsElements[i] = new ShopButton(((Game.width/2)\n - (GameContainer.columnCount*\n GameContainer.squareSize )/2 + (((GameContainer.columnCount\n *GameContainer.squareSize)/7)*3)*i ),\n (GameContainer.rowCount * GameContainer.squareSize\n ), buttonsize , buttonsize, i);\n }\n }", "public TicTacToeFrame() \r\n { \r\n //Contruct the tic tac toe menu and set the size the length 300, width 100.\r\n startFrame = new JFrame(\"Tic Tac Toe Game Menu\");\r\n startFrame.setSize(300,100);\r\n startFrame.setLocationRelativeTo(null); \r\n \r\n //Create the buttons to let user to choose to have a new game or quit the game\r\n newGame = new JButton(\"New (or Alt-N)\");\r\n quit = new JButton(\"Quit (or Alt-Q)\");\r\n \r\n //Set both botton to size 50,70\r\n newGame.setSize(50,70);\r\n quit.setSize(50,70);\r\n \r\n //Add action listener and set Mnemonic to each botton\r\n newGame.addActionListener(new NewGameListener());\r\n newGame.setMnemonic(KeyEvent.VK_N);\r\n quit.addActionListener(new quitListener());\r\n quit.setMnemonic(KeyEvent.VK_Q);\r\n \r\n //Create the starting pane and set the layout \r\n startPane = new JPanel();\r\n startPane.setLayout(new GridLayout(1, 2, 0, 1));\r\n startPane.add(newGame, BorderLayout.CENTER);\r\n startPane.add(quit, BorderLayout.CENTER);\r\n \r\n //Add the pane into the frame\r\n startFrame.add(startPane);\r\n startFrame.setVisible(true);\r\n \r\n //Contruct the Tic Tac Toe game frame with a size 500,500\r\n frame = new JFrame(\"TicTacToe\"); \r\n frame.setSize(500, 500); \r\n frame.setLocationRelativeTo(null); \r\n \r\n //Define the panel and set GridLayout to 3 by 3 \r\n allPanel = new JPanel();\r\n buttonPane = new JPanel();\r\n textPane = new JPanel();\r\n buttonPane.setLayout(new GridLayout(3, 3)); \r\n \r\n \r\n //create a border line \r\n lineBorder = new LineBorder(Color.black, 2); \r\n \r\n //create an array of labels which will display X or O \r\n buttons = new JButton[3][3];\r\n \r\n //Assign the buttons with action listener\r\n for(int i=0; i<3; i++)\r\n {\r\n for(int j=0; j<3; j++)\r\n {\r\n buttons[i][j] = new JButton(\" \");\r\n buttonListener bL = new buttonListener();\r\n buttons[i][j].addActionListener(bL);\r\n buttons[i][j].setBorder(lineBorder);\r\n buttonPane.add(buttons[i][j]);\r\n }\r\n } \r\n \r\n // Starting with X's turn\r\n status = new JTextArea(\"X's Turn\");\r\n status.setSize(50,70);\r\n JScrollPane scroll = new JScrollPane(status);\r\n textPane.add(scroll);\r\n \r\n //Add contents to the panel and add panel to the frame \r\n allPanel.setLayout(new BorderLayout()); \r\n allPanel.add(buttonPane, BorderLayout.CENTER);\r\n allPanel.add(textPane, BorderLayout.SOUTH); \r\n frame.add(allPanel); \r\n frame.setVisible(false);\r\n frame.toFront();\r\n }", "public void initUI() {\n\t\t\n\t\tsetPreferredSize(new Dimension((int)((2*Board.NUMBER_OF_FREE_COLUMNS)+1)*Board.TILE_SIZE + 2*Board.GAP_WIDTH, (int)((2*Board.NUMBER_OF_FREE_ROWS)+1)*Board.TILE_SIZE));\n\t\tsetLayout(new GridLayout(10,1));\n\t\taddKeyListener(this);\n\t\tsetBackground(Color.WHITE);\n\t\tJLabel label1 = new JLabel();\n\t\t\n\t\tlabel1.setFont(new Font(\"Verdana\", Font.BOLD, 55));\n\t\t\n\t\tlabel1.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\n\t\tlabel1.setText(\"Player \"+winner+\" has won!\");\n\t \n\t add(label1);\n\t}", "private void prepare()\n {\n\n MapButton mapButton = new MapButton(which);\n addObject(mapButton,58,57);\n Note note = new Note();\n addObject(note,1200,400);\n\n DropDownSuspects dropDownSuspects = new DropDownSuspects();\n addObject(dropDownSuspects,150,150);\n\n DropDownClues dropDownClues = new DropDownClues();\n addObject(dropDownClues,330,150);\n\n TestimonyFrame testimonyFrame = new TestimonyFrame();\n addObject(testimonyFrame,506,548);\n }", "public static void createGui4(JFrame frame2, JFrame frame3,int numPlayers) {\n\t\tframe2.dispose();\n frame3.setLayout(new GridLayout(0, 10));\n //JButton tile[] = new JButton[100];\n JButton tile[][] = new JButton[10][10]; //tile is now a matrix\n turnSeed = genTurnSeed(numPlayers);\n\t\tSystem.out.println(\"Player \" + turnSeed + \" will be going first\");\n \n\t\t class healGamePiece implements ActionListener{\n\t \tJButton currentButton=null;\n\t \tPiece tempPiece;\n\t \tpublic void actionPerformed (ActionEvent e) {\n\t \t\t JButton currentButton= (JButton)e.getSource();\n\t \t\t if(lastButtonPressed!=null){//if two tiles were clicked\n\t \t\t\tif(lastButtonPressed ==currentButton) {//if the same tiles clicked\n\t \t\t\t\tif(lastButtonPressed.getIcon()!=null && currentButton.getIcon()!=null) {// if both tiles have an icon\n\t \t\t\t\t setCoordinates(lastButtonPressed, numPlayers, tile); //set coords had to be moved\n\t \t\t\t\t\t for (int i=0; i<tile.length; i++) {\n\t \t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t \t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t \t\t\t \t\t\t\tdestinationYCoord = i;\n\t \t\t\t \t\t\t\tdestinationXCoord = 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\t\t\t Icon tempImg = lastButtonPressed.getIcon(); //holds the image of the last button pressed\n\t \t\t\t\t\t\t tempPiece = findPiece(tempImg);//find the piece that has been clicked\n\t \t\t\tif (whosTurn(numPlayers) == 1) {//if it is player 1's turn\n\t \t\t\tif(tempImg==Player1.PieceImages[3] && Player1.playersTeam.teamPieces[3].name ==\"Healer\"){ //check only locations 3 &4 bc teams sets healers to those locations & check to make sure piece is healer\n\t \t\t\t\tif (noOtherActions(Player1.playersTeam.teamPieces[3], Player1) && Player1.playersTeam.teamPieces[3].tookAction<1) {\n\t \t\t\t\tSystem.out.println(\"Player 1's \" + Player1.playersTeam.teamPieces[3].name + \" is healing itself\");//message to user\n\t \t\t\t\tPiece targetPiece;//alias for piece being healed\n\t \t\t\t\ttargetPiece = Player1.playersTeam.teamPieces[3];//set target piece to the healer\n\t \t\t\t\tint tempHp = targetPiece.getCurrHp();//save hp it currently has\n\t \t\t\t\t\t\n\t \t\t\t\tif(tempHp != targetPiece.getMaxHp()){\n\t \t\t\t\tPlayer1.playersTeam.teamPieces[3].heal(targetPiece);//heal piece\n\t \t\t\t\tPlayer1.playersTeam.teamPieces[3].tookAction++;\n\t \t\t\t\t\tif(targetPiece.currHp> targetPiece.getMaxHp()) {//can't have hp over the maximum hp\n\t \t\t\t\t\t\ttargetPiece.currHp=targetPiece.getMaxHp();\n\t \t\t\t\t\t\tSystem.out.println(\"Player 1's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\t\n\t \t\t\t\t\t\tif(Player1.playersTeam.teamPieces[3].moved==1) {\n\t \t\t\t\t\t\tendTurn(numPlayers); //prints out turn ended & next player\n\t \t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t\t\t\t\t\t\t endTurn(numPlayers);\n\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\telse {\n\t \t\t\t\t\t\tSystem.out.println(\"Player 1's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");//print remaining hp\n\t \t\t\t\t\t\tif(Player1.playersTeam.teamPieces[3].moved==1) {\n\t \t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t\t\t\t\t\t\t endTurn(numPlayers);\n\t\t\t\t\t\t }\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\telse {\n\t \t\t\t\t\tSystem.out.println(\"Player 1's \" + targetPiece.name + \" is already at full health\");\n\t \t\t\t\t\t}\n\t \t\t\t}//end of action check\n\t \t\t\telse{\n\t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n\t \t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif(tempImg==Player1.PieceImages[4] && Player1.playersTeam.teamPieces[4].name == \"Healer\"){\n\t \t\t\t\tif (noOtherActions(Player1.playersTeam.teamPieces[4], Player1) && Player1.playersTeam.teamPieces[4].tookAction<1) {\n\t \t\t\t\tSystem.out.println(\"Player 1's \" + Player1.playersTeam.teamPieces[4].name + \" is healing itself\");\n\t \t\t\t\t\tPiece targetPiece;\n\t \t\t\t\t\ttargetPiece = Player1.playersTeam.teamPieces[4];\n\t \t\t\t\t\tint tempHp = targetPiece.getCurrHp();\n\t \t\t\t\t\t\n\t \t\t\t\t\tif(tempHp != targetPiece.getMaxHp()) {\n\t \t\t\t\t\t\tPlayer1.playersTeam.teamPieces[4].heal(targetPiece);\n\t \t\t\t\t\t\tPlayer1.playersTeam.teamPieces[4].tookAction++;\n\t \t\t\t\t\t\tif(targetPiece.currHp> targetPiece.getMaxHp()) {\n\t \t\t\t\t\t\t\ttargetPiece.currHp=targetPiece.getMaxHp();\n\t \t\t\t\t\t\t\tSystem.out.println(\"Player 1's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\t\n\t \t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[4].moved==1) {\n\t \t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\n\t \t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tSystem.out.println(\"Player 1's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\n\t \t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[4].moved==1) {\n\t \t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t\t\t\t\t\t\t\t endTurn(numPlayers);\n\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}\n\t \t\t\t\telse {\n\t \t\t\t\t\tSystem.out.println(\"Player 1's \" + targetPiece.name + \" is already at full health\");\n\t \t\t\t\t\t}\n\t \t\t\t}//end of action check\n\t \t\t\telse{\n\t \t \t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n\t \t \t\t}\n\t \t\t\t}\t\n\t \t\t\t}//end of if it is player 1's turn\n\t \t\t\telse if(tempPiece.team == 1){//if player 1's piece has been clicked and it is not their turn\n\t \t\t\t\tSystem.out.println(\"It is not Player 1's turn\");//send error message\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\telse if(tempPiece.team == 2){\n\t \t\t\t\tSystem.out.println(\"It is not Player 2's turn\");\n\t \t\t\t}\n\t \t\t}\n\t \t}//end of self healing\n\t \t\t\t if(lastButtonPressed !=currentButton){ //if different tiles clicked\n\t \t\t\t\t if(lastButtonPressed.getIcon()!=null&&currentButton.getIcon()!=null){//if both tiles have an icon \n\t \t\t\t\t\t setCoordinates(lastButtonPressed, numPlayers, tile); //set coords had to be moved\n\t \t\t\t\t\t for (int i=0; i<tile.length; i++) {\n\t \t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t \t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t \t\t\t \t\t\t\tdestinationYCoord = i;\n\t \t\t\t \t\t\t\tdestinationXCoord = 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\t\t\t Icon tempImg = lastButtonPressed.getIcon(); //holds the image of the last button pressed\n\t \t\t\t\t\t\t tempPiece = findPiece(tempImg);\n\t \t\t\t\n\t \t\t\tif (whosTurn(numPlayers) == 1) {\n\t \t\t\tif(tempImg==Player1.PieceImages[3] && Player1.playersTeam.teamPieces[3].name ==\"Healer\"){//checks 3& 4 bc teams only set those as healers & make sure it is a healer\n\t \t\t\t\tif (destinationYCoord <= pieceYCoord+Player1.playersTeam.teamPieces[3].range && destinationYCoord >= pieceYCoord-Player1.playersTeam.teamPieces[3].range && destinationXCoord <= pieceXCoord+Player1.playersTeam.teamPieces[3].range && destinationXCoord >= pieceXCoord-Player1.playersTeam.teamPieces[3].range) {\n\t \t\t\t\t\t//This checks for the range of the healing piece^\n\t \t\t\t\tif (noOtherActions(Player1.playersTeam.teamPieces[3], Player1) && Player1.playersTeam.teamPieces[3].tookAction<1) {\n\t \t\t\t\tif (currentButton.getIcon()==Player1.PieceImages[0] || currentButton.getIcon()==Player1.PieceImages[1] || currentButton.getIcon()==Player1.PieceImages[2] || currentButton.getIcon()==Player1.PieceImages[4]){\n\t \t\t\t\t\tSystem.out.println(\"Player 1's \" + Player1.playersTeam.teamPieces[3].name + \" is healing\");//message to user\n\t \t\t\t\t\tPiece targetPiece;//alias for piece being healed\n\t \t\t\t\t\tfor(int i=0; i<5; i++) {//find piece being healed, searches current team for a match\n\t \t\t\t\t\t\tif(currentButton.getIcon()==Player1.PieceImages[i]) {//if found here\n\t \t\t\t\t\t\t\ttargetPiece = Player1.playersTeam.teamPieces[i];//set target piece to alias the found piece\n\t \t\t\t\t\t\t\tint tempHp = targetPiece.getCurrHp();//save hp it currently has\n\t \t\t\t\t\t\t\tif(tempHp != targetPiece.getMaxHp()){\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[3].heal(targetPiece);//heal\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[3].tookAction++;\n\t \t\t\t\t\t\t\tif(targetPiece.currHp> targetPiece.getMaxHp()) {//can't have hp over the mamximum hp of a piece \n\t \t\t\t\t\t\t\t\ttargetPiece.currHp=targetPiece.getMaxHp();\n\t \t\t\t\t\t\t\t\tSystem.out.println(\"Player 1's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\t\n\t \t\t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[3].moved==1) {\n\t \t\t\t\t\t\t\t\tendTurn(numPlayers); //prints out turn ended & next player\n\t \t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t \t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tSystem.out.println(\"Player 1's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");//print remaining hp\n\t \t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[3].moved==1) {\n\t \t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t\t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t\t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t\t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t\t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t\t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\t\tSystem.out.println(\"Player 1's \" + targetPiece.name + \" is already at full health\");\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\telse {\n\t \t\t\t\t\tSystem.out.println(\"That is an invalid heal, cannot heal other team's game pieces\");\n\t \t\t\t\t}\n\t \t\t\t}//end of action check\n\t \t\t\t\telse{\n\t \t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n\t \t \t\t\t}\n\t \t\t\t}//end of range check\n\t \t\t\telse {\n\t \t\t\t\tSystem.out.println(\"That is an invalid heal, cannot a piece further than you healer's range\");\n\t \t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif(tempImg==Player1.PieceImages[4] && Player1.playersTeam.teamPieces[4].name == \"Healer\"){\n\t \t\t\t\tif (destinationYCoord <= pieceYCoord+Player1.playersTeam.teamPieces[4].range && destinationYCoord >= pieceYCoord-Player1.playersTeam.teamPieces[4].range && destinationXCoord <= pieceXCoord+Player1.playersTeam.teamPieces[4].range && destinationXCoord >= pieceXCoord-Player1.playersTeam.teamPieces[4].range) {\n\t \t\t\t\tif (noOtherActions(Player1.playersTeam.teamPieces[4], Player1) && Player1.playersTeam.teamPieces[4].tookAction<1) {\n\t \t\t\t\tif(currentButton.getIcon()==Player1.PieceImages[0] || currentButton.getIcon()==Player1.PieceImages[1] || currentButton.getIcon()==Player1.PieceImages[2] || currentButton.getIcon()==Player1.PieceImages[3]){\n\t \t\t\t\t\tSystem.out.println(\"Player 1's \" + Player1.playersTeam.teamPieces[2].name + \" is healing\");\n\t \t\t\t\t\tPiece targetPiece;\n\t \t\t\t\t\tfor(int i=0; i<5; i++) {\n\t \t\t\t\t\t\tif(currentButton.getIcon()==Player1.PieceImages[i]) {\n\t \t\t\t\t\t\t\ttargetPiece = Player1.playersTeam.teamPieces[i];\n\t \t\t\t\t\t\t\tint tempHp = targetPiece.getCurrHp();\n\t \t\t\t\t\t\t\t\n\t \t\t\t\t\t\t\tif(tempHp != targetPiece.getMaxHp()) {\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[4].heal(targetPiece);\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[4].tookAction++;\n\t \t\t\t\t\t\t\tif(targetPiece.currHp> targetPiece.getMaxHp()) {\n\t \t\t\t\t\t\t\t\ttargetPiece.currHp=targetPiece.getMaxHp();\n\t \t\t\t\t\t\t\t\tSystem.out.println(\"Player 1's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\t\n\t \t\t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[4].moved==1) {\n\t \t\t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t \t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tSystem.out.println(\"Player 1's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\n\t \t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[4].moved==1) {\n\t \t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t\t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t\t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t\t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t\t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t\t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\t\tSystem.out.println(\"Player 1's \" + targetPiece.name + \" is already at full health\");\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\t\n\t \t\t\t\telse{\n\t \t\t\t\t\tSystem.out.println(\"That is an invalid heal, cannot heal other team's game pieces\");\n\t \t\t\t\t}\n\t \t\t\t\t}//end of action check\n\t \t\t\t\telse{\n\t \t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n\t \t \t\t\t}\n\t \t\t\t\t}//end of range check\n\t \t\t\t\telse {\n\t \t\t\t\t\tSystem.out.println(\"That is an invalid heal, cannot heal piece further than healer's range\");\n\t \t\t\t\t}\n\t \t\t\t}\t\t\t \n\t \t\t\t}//end of if it is player 1's turn\n\t \t\t\telse if(tempPiece.team == 1){\n\t \t\t\t\tSystem.out.println(\"It is not Player 1's turn\");\n\t \t\t\t}\n\t \t\t\telse if(tempPiece.team == 2){\n\t \t\t\t\tSystem.out.println(\"It is not Player 2's turn\");\n\t \t\t\t}\n\t \t\t\t\t\tcurrentButton=null; //resets the ActionListener\n\t \t\t\t\t\t}\n\t \t\t\t }\n\t \t\t }\n\t \t\t\t\tlastButtonPressed=currentButton;\n\t \t}\n\t }\n\t\t \n\t\t class attackGamePiece implements ActionListener{\n\t \tJButton currentButton=null;\n\t \tPiece tempPiece;\n\t \tpublic void actionPerformed (ActionEvent e) {\n\t \t\t JButton currentButton= (JButton)e.getSource();\n\t \t\t //When a player clicks their first button, if it has a piece on it, it will save the coords of that piece and output what it is\n\t \t\t //setCoordinates(currentButton, numPlayers, tile);\n\t \t\t //System.out.println(pieceXCoord);\n\t \t\t if(lastButtonPressed!=null){//if two tiles were clicked\n\t \t\t\t if(lastButtonPressed !=currentButton){ //if different tiles clicked\n\t \t\t\t\t if(lastButtonPressed.getIcon()!=null&&currentButton.getIcon()!=null){//if both tiles have an icon \n\t \t\t\t\t\t setCoordinates(lastButtonPressed, numPlayers, tile); //set coords had to be moved\n\t \t\t\t\t\t for (int i=0; i<tile.length; i++) {\n\t \t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t \t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t \t\t\t \t\t\t\tdestinationYCoord = i;\n\t \t\t\t \t\t\t\tdestinationXCoord = 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\t\t\t Icon tempImg = lastButtonPressed.getIcon(); //holds the image of the last button pressed\n\t \t\t\t\t\t\t Icon tempImg2= currentButton.getIcon();\n\t \t\t\t\t\t\t tempPiece = findPiece(tempImg);\n\t \t\t\tif (whosTurn(numPlayers) == 1) {\n\t \t\t\tif(tempImg==Player1.PieceImages[0])\t{\n\t \t\t\t//check to make sure piece to be attacked isn't the player's pieces \n\t \t\t\t\tif (destinationYCoord <= pieceYCoord+Player1.playersTeam.teamPieces[0].range && destinationYCoord >= pieceYCoord-Player1.playersTeam.teamPieces[0].range && destinationXCoord <= pieceXCoord+Player1.playersTeam.teamPieces[0].range && destinationXCoord >= pieceXCoord-Player1.playersTeam.teamPieces[0].range) {\n\t \t\t\t\t\t//This checks for the range of the attacking piece^\n\t \t\t\t\tif (noOtherActions(Player1.playersTeam.teamPieces[0], Player1) && Player1.playersTeam.teamPieces[0].tookAction<1) {\n\t \t\t\t\tif (currentButton.getIcon()!=Player1.PieceImages[1] && currentButton.getIcon()!=Player1.PieceImages[2] && currentButton.getIcon()!=Player1.PieceImages[3] && currentButton.getIcon()!=Player1.PieceImages[4]){\n\t \t\t\t\t\tSystem.out.println(\"Player 1's \" + Player1.playersTeam.teamPieces[0].name + \" attacks!\");//message to user\n\t \t\t\t\t\tPiece targetPiece;//alias for piece being attacked\n\t \t\t\t\t\tfor(int i=0; i<5; i++) {//find piece being attacked, searches all 3 opposing teams for a match\n\t \t\t\t\t\t\tif(currentButton.getIcon()==Player2.PieceImages[i]) {//if found here\n\t \t\t\t\t\t\t\ttargetPiece = Player2.playersTeam.teamPieces[i];//set target piece to alias the found piece\n\t \t\t\t\t\t\t\tint tempHp = targetPiece.getCurrHp();//save hp it currently has\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[0].attack(targetPiece);//make attack\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[0].tookAction++;\n\t \t\t\t\t\t\t\tif(targetPiece.currHp<1) {//don't want negative numbers for hp\n\t \t\t\t\t\t\t\t\ttargetPiece.currHp=0;\n\t \t\t\t\t\t\t\t\tSystem.out.println(\"Player 2's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\t\n\t \t\t\t\t\t\t\t\tremoveImage(currentButton, frame3);//remove image now needs the frame passed to it as well\n\t \t\t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[0].moved==1) {\n\t \t\t\t\t\t\t\t\t\tendTurn(numPlayers); //prints out turn ended & next player\n\t \t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t \t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tSystem.out.println(\"Player 2's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");//print remaining hp\n\t \t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[0].moved==1) {\n\t \t\t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t \t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\t else {\n\t \t\t\t\t\tSystem.out.println(\"That is an invalid attack, cannot attack your own game pieces\");\n\t \t\t\t\t}\n\t \t\t\t\t}//end of action check\n\t \t\t\t\telse{\n\t \t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n\t \t \t\t\t}\n\t \t\t\t}//end of range check\n\t \t\t\telse {\n\t \t\t\t\tSystem.out.println(\"That is an invalid attack, cannot a piece further than your piece's range\");\n\t \t\t\t}\n\t \t\t\t}\n\t \t\t\tif(tempImg==Player1.PieceImages[1]){\n\t \t\t\t\tif (destinationYCoord <= pieceYCoord+Player1.playersTeam.teamPieces[1].range && destinationYCoord >= pieceYCoord-Player1.playersTeam.teamPieces[1].range && destinationXCoord <= pieceXCoord+Player1.playersTeam.teamPieces[1].range && destinationXCoord >= pieceXCoord-Player1.playersTeam.teamPieces[1].range) {\n\t \t\t\t\tif (noOtherActions(Player1.playersTeam.teamPieces[1], Player1) && Player1.playersTeam.teamPieces[1].tookAction<1) {\n\t \t\t\t\tif (currentButton.getIcon()!=Player1.PieceImages[0] && currentButton.getIcon()!=Player1.PieceImages[2] && currentButton.getIcon()!=Player1.PieceImages[3] && currentButton.getIcon()!=Player1.PieceImages[4]){\n\t \t\t\t\t\tSystem.out.println(\"Player 1's \" + Player1.playersTeam.teamPieces[1].name + \" attacks!\");\n\t \t\t\t\t\tPiece targetPiece;\n\t \t\t\t\t\tfor(int i=0; i<5; i++) {\n\t \t\t\t\t\t\tif(currentButton.getIcon()==Player2.PieceImages[i]) {\n\t \t\t\t\t\t\t\ttargetPiece = Player2.playersTeam.teamPieces[i];\n\t \t\t\t\t\t\t\tint tempHp = targetPiece.getCurrHp();\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[1].attack(targetPiece);\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[1].tookAction++;\n\t \t\t\t\t\t\t\tif(targetPiece.currHp<1) {//don't want negative numbers for hp\n\t \t\t\t\t\t\t\t\ttargetPiece.currHp=0;\n\t \t\t\t\t\t\t\t\tSystem.out.println(\"Player 2's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\t\n\t \t\t\t\t\t\t\t\tremoveImage(currentButton, frame3);\n\t \t\t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[1].moved==1) {\n\t \t\t\t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tSystem.out.println(\"Player 2's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\n\t \t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[1].moved==1) {\n\t \t\t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t \t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\telse {\n\t \t\t\t\t\tSystem.out.println(\"That is an invalid attack, cannot attack your own game pieces\");\n\t \t\t\t\t}\n\t \t\t\t\t}//end of action check\n\t \t\t\t\telse{\n\t \t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n\t \t \t\t\t}\n\t \t\t\t\t}//end of range check\n\t \t\t\t\telse {\n\t \t\t\t\t\tSystem.out.println(\"that is an invalid attack, cannot attack piece further than your piece's range\");\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif(tempImg==Player1.PieceImages[2]){\n\t \t\t\t\tif (destinationYCoord <= pieceYCoord+Player1.playersTeam.teamPieces[2].range && destinationYCoord >= pieceYCoord-Player1.playersTeam.teamPieces[2].range && destinationXCoord <= pieceXCoord+Player1.playersTeam.teamPieces[2].range && destinationXCoord >= pieceXCoord-Player1.playersTeam.teamPieces[2].range) {\n\t \t\t\t\tif (noOtherActions(Player1.playersTeam.teamPieces[2], Player1) && Player1.playersTeam.teamPieces[2].tookAction<1) {\n\t \t\t\t\tif(currentButton.getIcon()!=Player1.PieceImages[1] && currentButton.getIcon()!=Player1.PieceImages[0] && currentButton.getIcon()!=Player1.PieceImages[3] && currentButton.getIcon()!=Player1.PieceImages[4]){\n\t \t\t\t\t\tSystem.out.println(\"Player 1's \" + Player1.playersTeam.teamPieces[2].name + \" attacks!\");\n\t \t\t\t\t\tPiece targetPiece;\n\t \t\t\t\t\tfor(int i=0; i<5; i++) {\n\t \t\t\t\t\t\tif(currentButton.getIcon()==Player2.PieceImages[i]) {\n\t \t\t\t\t\t\t\ttargetPiece = Player2.playersTeam.teamPieces[i];\n\t \t\t\t\t\t\t\tint tempHp = targetPiece.getCurrHp();\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[2].attack(targetPiece);\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[2].tookAction++;\n\t \t\t\t\t\t\t\tif(targetPiece.currHp<1) {//don't want negative numbers for hp\n\t \t\t\t\t\t\t\t\ttargetPiece.currHp=0;\n\t \t\t\t\t\t\t\t\tSystem.out.println(\"Player 2's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\t\n\t \t\t\t\t\t\t\t\tremoveImage(currentButton, frame3);\n\t \t\t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[2].moved==1) {\n\t \t\t\t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tSystem.out.println(\"Player 2's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\n\t \t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[2].moved==1) {\n\t \t\t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t \t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\telse{\n\t \t\t\t\t\tSystem.out.println(\"That is an invalid attack, cannot attack your own game pieces\");\n\t \t\t\t\t}\n\t \t\t\t\t}//end of action check\n\t \t\t\t\telse{\n\t \t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n\t \t \t\t\t}\n\t \t\t\t\t}//end of range check\n\t \t\t\t\telse {\n\t \t\t\t\t\tSystem.out.println(\"That is an invalid attack, cannot attack piece further than your piece's range\");\n\t \t\t\t\t}\n\t \t\t\t}\t\t\t \n\t \t\t\tif(tempImg==Player1.PieceImages[3]) {\n\t \t\t\t\tif (destinationYCoord <= pieceYCoord+Player1.playersTeam.teamPieces[3].range && destinationYCoord >= pieceYCoord-Player1.playersTeam.teamPieces[3].range && destinationXCoord <= pieceXCoord+Player1.playersTeam.teamPieces[3].range && destinationXCoord >= pieceXCoord-Player1.playersTeam.teamPieces[3].range) {\n\t \t\t\t\tif (noOtherActions(Player1.playersTeam.teamPieces[3], Player1) && Player1.playersTeam.teamPieces[3].tookAction<1) {\n\t \t\t\t\tif(currentButton.getIcon()!=Player1.PieceImages[1] && currentButton.getIcon()!=Player1.PieceImages[2] && currentButton.getIcon()!=Player1.PieceImages[0] && currentButton.getIcon()!=Player1.PieceImages[4]) {\n\t \t\t\t\t\tSystem.out.println(\"Player 1's \" + Player1.playersTeam.teamPieces[3].name + \" attacks!\");\n\t \t\t\t\t\tPiece targetPiece;\n\t \t\t\t\t\tfor(int i=0; i<5; i++) {\n\t \t\t\t\t\t\tif(currentButton.getIcon()==Player2.PieceImages[i]) {\n\t \t\t\t\t\t\t\tif(gameModeSelected==2) {\n\t \t\t\t\t\t\t\t\tattack2v2(tempImg, numPlayers, currentButton, frame3, i);\n\t \t\t\t\t\t\t\t}//end of if 2v2\n\t \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\ttargetPiece = Player2.playersTeam.teamPieces[i];\n\t \t\t\t\t\t\t\tint tempHp = targetPiece.getCurrHp();\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[3].attack(targetPiece);\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[3].tookAction++;\n\t \t\t\t\t\t\t\tif(targetPiece.currHp<1) {//don't want negative numbers for hp\n\t \t\t\t\t\t\t\t\ttargetPiece.currHp=0;\n\t \t\t\t\t\t\t\t\tSystem.out.println(\"Player 2's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\t\n\t \t\t\t\t\t\t\t\tremoveImage(currentButton, frame3);\n\t \t\t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[3].moved==1) {\n\t \t\t\t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tSystem.out.println(\"Player 2's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\n\t \t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[3].moved==1) {\n\t \t\t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t \t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t}\n\t \t\t\t\telse{\n\t \t\t\t\t\tSystem.out.println(\"That is an invalid attack, cannot attack your own game pieces\");\n\t \t\t\t\t}\n\t \t\t\t\t}//end of action check\n\t \t\t\t\telse{\n\t \t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n\t \t \t\t\t}\n\t \t\t\t\t}//end of range check\n\t \t\t\t\telse {\n\t \t\t\t\t\tSystem.out.println(\"That is an invalid attack, cannot attack piece further than your piece's range\");\n\t \t\t\t\t}\n\t \t\t\t}\t\n\t \t\t\t\n\t \t\t\tif(tempImg==Player1.PieceImages[4]) {\n\t \t\t\t\tif (destinationYCoord <= pieceYCoord+Player1.playersTeam.teamPieces[4].range && destinationYCoord >= pieceYCoord-Player1.playersTeam.teamPieces[4].range && destinationXCoord <= pieceXCoord+Player1.playersTeam.teamPieces[4].range && destinationXCoord >= pieceXCoord-Player1.playersTeam.teamPieces[4].range) {\n\t \t\t\t\tif (noOtherActions(Player1.playersTeam.teamPieces[4], Player1) && Player1.playersTeam.teamPieces[4].tookAction<1) {\n\t \t\t\t\tif (currentButton.getIcon()!=Player1.PieceImages[1] && currentButton.getIcon()!=Player1.PieceImages[2] && currentButton.getIcon()!=Player1.PieceImages[3] && currentButton.getIcon()!=Player1.PieceImages[0]) {\n\t \t\t\t\t\tSystem.out.println(\"Player 1's \" + Player1.playersTeam.teamPieces[4].name + \" attacks!\");\n\t \t\t\t\t\tPiece targetPiece;\n\t \t\t\t\t\tfor(int i=0; i<5; i++) {\n\t \t\t\t\t\t\tif(currentButton.getIcon()==Player2.PieceImages[i]) {\n\t \t\t\t\t\t\t\ttargetPiece = Player2.playersTeam.teamPieces[i];\n\t \t\t\t\t\t\t\tint tempHp = targetPiece.getCurrHp();\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[4].attack(targetPiece);\n\t \t\t\t\t\t\t\tPlayer1.playersTeam.teamPieces[4].tookAction++;\n\t \t\t\t\t\t\t\tif(targetPiece.currHp<1) {//don't want negative numbers for hp\n\t \t\t\t\t\t\t\t\ttargetPiece.currHp=0;\n\t \t\t\t\t\t\t\t\tSystem.out.println(\"Player 2's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\t\n\t \t\t\t\t\t\t\t\tremoveImage(currentButton, frame3);\n\t \t\t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[4].moved==1) {\n\t \t\t\t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tSystem.out.println(\"Player 2's \" + targetPiece.name + \" went from \" + tempHp + \" hit points to \" +targetPiece.getCurrHp() + \" hit points!\");\n\t \t\t\t\t\t\t\tif(Player1.playersTeam.teamPieces[4].moved==1) {\n\t \t\t\t\t\t\t\t\tendTurn(numPlayers);\n\t \t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t \t\t\t\t\t\t\t }\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\telse {\n\t \t\t\t\t\tSystem.out.println(\"That is an invalid attack, cannot attack your own game pieces\");\n\t \t\t\t\t}\n\t \t\t\t\t}//end of action check\n\t \t\t\t\telse{\n\t \t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n\t \t \t\t\t}\n\t \t\t\t\t}//end of range check\n\t \t\t\t\telse {\n\t \t\t\t\t\tSystem.out.println(\"That is an invalid attack, cannot attack piece further than your piece's range\");\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t}//end of if it is player 1's turn\n\t \t\t\telse if(tempPiece.team == 1){\n\t \t\t\t\tSystem.out.println(\"It is not Player 1's turn\");\n\t \t\t\t}\n\t \t\t\telse if(tempPiece.team == 2){\n\t \t\t\t\tSystem.out.println(\"It is not Player 2's turn\");\n\t \t\t\t}\n\t \t\t\t \n\t \t\t\t\t\tcurrentButton=null; //resets the ActionListener\n\t \t\t\t\t\t}\n\t \t\t\t }\n\t \t\t }\n\t \t\t\t\tlastButtonPressed=currentButton;\n\t \t}\n\t } \n\t\t \n\t\t class tileClicked implements ActionListener{\n \t JButton currentButton=null;\n \t Piece tempPiece;\n \t \n \t public void actionPerformed (ActionEvent e){\n \t\t JButton currentButton= (JButton)e.getSource(); //save which button pressed in variable\n \t\t \n \t\t //When a player clicks their first button, if it has a piece on it, it will save the coords of that piece and output what it is\n \t\t setCoordinates(currentButton, numPlayers, tile);\n \t\t if(lastButtonPressed!=null){//if two tiles were clicked\n \t\t\t if(lastButtonPressed !=currentButton){ //if different tiles clicked\n \t\t\t\t if(lastButtonPressed.getIcon()!=null&&currentButton.getIcon()==null){//if first tile had icon and second was empty\n \t\t\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n \t\t\t \t\t\tif (currentButton == tile[i][j]) {\n \t\t\t \t\t\t\tdestinationYCoord = i;\n \t\t\t \t\t\t\tdestinationXCoord = j;\n \t\t\t \t\t\t}\n \t\t\t \t\t}\n \t\t\t \t}\n \t\t\t\t\t\t Icon tempImg = lastButtonPressed.getIcon(); //holds the image of the last button pressed\n \t\t\t\t\t\t tempPiece = findPiece(tempImg);\n \t\t\t\t\t\t//Image img = ImageIO.read(Game.class.getResource(\"/images/BlueCircle.png\")); //will have to change image src to variable so it can work with any token\n \n \t\t\t//When a second tile is clicked, it makes sure it is a valid move for the piece selected\n \t\t\tif (whosTurn(numPlayers) == 1) {\n \t\t\tif(tempImg==Player1.PieceImages[0])\t{//pieces can move 3, 4, 5, or 6 tiles\n \t\t\t\tif (destinationYCoord <= pieceYCoord+Player1.playersTeam.teamPieces[0].move && destinationYCoord >= pieceYCoord-Player1.playersTeam.teamPieces[0].move && destinationXCoord <= pieceXCoord+Player1.playersTeam.teamPieces[0].move && destinationXCoord >= pieceXCoord-Player1.playersTeam.teamPieces[0].move) {\n \t\t\t\t\tif (noOtherActions(tempPiece, Player1) && tempPiece.moved<1) {\n \t\t\t\t\t\tswapImage(currentButton, tempImg);\n \t\t\t\t\t\ttempPiece.moved++;\n \t\t\t\t\t\tif(tempPiece.tookAction==1) {\n \t\t\t\t\t\t\tendTurn(numPlayers); //prints out turn ended & next player\n \t\t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n \t\t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n \t\t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n \t\t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n \t\t\t\t\t\t\t\t\t endTurn(numPlayers);\n \t\t\t\t\t\t\t\t }\n \t\t\t\t\t\t}\n \t\t\t\t\t}//end of action check\n \t\t\t\t\telse{\n \t\t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n \t\t \t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tSystem.out.println(\"That is an invalid move, it exceeds that piece's movement range\");\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t}\n \t\t\t}\n \t\t\tif(tempImg==Player1.PieceImages[1]) {\n \t\t\t\tif (destinationYCoord <= pieceYCoord+Player1.playersTeam.teamPieces[1].move && destinationYCoord >= pieceYCoord-Player1.playersTeam.teamPieces[1].move && destinationXCoord <= pieceXCoord+Player1.playersTeam.teamPieces[1].move && destinationXCoord >= pieceXCoord-Player1.playersTeam.teamPieces[1].move) {\n \t\t\t\t\tif (noOtherActions(tempPiece, Player1) && tempPiece.moved<1) {\n \t\t\t\t\tswapImage(currentButton, tempImg);\n \t\t\t\t\ttempPiece.moved++;\n \t\t\t\t\tif(tempPiece.tookAction==1) {\n \t\t\t\t\t\tendTurn(numPlayers);\n\t\t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t\t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t\t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t\t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t\t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t\t\t\t\t\t\t\t }\n \t\t\t\t\t}\n \t\t\t\t\t}//end of action check\n \t\t\t\t\telse{\n \t\t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n \t\t \t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tSystem.out.println(\"That is an invalid move, it exceeds that piece's movement range\");\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t}\n \t\t\t}\n \t\t\tif(tempImg==Player1.PieceImages[2]) {\n \t\t\t\tif (destinationYCoord <= pieceYCoord+Player1.playersTeam.teamPieces[2].move && destinationYCoord >= pieceYCoord-Player1.playersTeam.teamPieces[2].move && destinationXCoord <= pieceXCoord+Player1.playersTeam.teamPieces[2].move && destinationXCoord >= pieceXCoord-Player1.playersTeam.teamPieces[2].move) {\n \t\t\t\t\tif (noOtherActions(tempPiece, Player1) && tempPiece.moved<1) {\n \t\t\t\t\tswapImage(currentButton, tempImg);\n \t\t\t\t\ttempPiece.moved++;\n \t\t\t\t\tif(tempPiece.tookAction==1) {\n \t\t\t\t\t\tendTurn(numPlayers);\n \t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n \t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n \t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n \t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n \t\t\t\t\t\t\t\t endTurn(numPlayers);\n \t\t\t\t\t\t\t }\n \t\t\t\t\t}\n \t\t\t\t}//end of action check\n \t\t\t\t\telse{\n \t\t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n \t\t \t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tSystem.out.println(\"That is an invalid move, it exceeds that piece's movement range\");\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t}\n \t\t\t}\t\t\t \n \t\t\tif(tempImg==Player1.PieceImages[3]) {\n \t\t\t\tif (destinationYCoord <= pieceYCoord+Player1.playersTeam.teamPieces[3].move && destinationYCoord >= pieceYCoord-Player1.playersTeam.teamPieces[3].move && destinationXCoord <= pieceXCoord+Player1.playersTeam.teamPieces[3].move && destinationXCoord >= pieceXCoord-Player1.playersTeam.teamPieces[3].move) {\n \t\t\t\t\tif (noOtherActions(tempPiece, Player1) && tempPiece.moved<1) {\n \t\t\t\t\tswapImage(currentButton, tempImg);\n \t\t\t\t\ttempPiece.moved++;\n \t\t\t\t\tif(tempPiece.tookAction==1) {\n \t\t\t\t\t\tendTurn(numPlayers);\n \t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n \t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n \t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n \t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n \t\t\t\t\t\t\t\t endTurn(numPlayers);\n \t\t\t\t\t\t\t }\n \t\t\t\t\t}\n \t\t\t\t\t}//end of action check\n \t\t\t\t\telse{\n \t\t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n \t\t \t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tSystem.out.println(\"That is an invalid move, it exceeds that piece's movement range\");\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t}\n \t\t\t}\t\t\n \t\t\tif(tempImg==Player1.PieceImages[4]) {\n \t\t\t\tif (destinationYCoord <= pieceYCoord+Player1.playersTeam.teamPieces[4].move && destinationYCoord >= pieceYCoord-Player1.playersTeam.teamPieces[4].move && destinationXCoord <= pieceXCoord+Player1.playersTeam.teamPieces[4].move && destinationXCoord >= pieceXCoord-Player1.playersTeam.teamPieces[4].move) {\n \t\t\t\t\tif (noOtherActions(tempPiece, Player1) && tempPiece.moved<1) {\n \t\t\t\t\tswapImage(currentButton, tempImg);\n \t\t\t\t\ttempPiece.moved++;\n \t\t\t\t\tif(tempPiece.tookAction==1) {\n \t\t\t\t\tendTurn(numPlayers);\n\t\t\t\t\t\t\t if(whosTurn(numPlayers)==2) {\n\t\t\t\t\t\t\t\t Player2.findPieceLocs(tile);\n\t\t\t\t\t\t\t\t Player2.findMove(tile, Player1);\n\t\t\t\t\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t\t\t\t\t\t\t\t endTurn(numPlayers);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \n \t\t\t\t\t}\n \t\t\t\t\t}//end of action check\n \t\t\t\t\telse{\n \t\t \t\t\t\tSystem.out.println(\"Only one piece may move and act once each turn\");\n \t\t \t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tSystem.out.println(\"That is an invalid move, it exceeds that piece's movement range\");\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t}\n \t\t\t}\n \t\t\t}//end of if it is player 1's turn\n \t\t\telse if(tempPiece.team == 1){\n \t\t\t\tSystem.out.println(\"It is not Player 1's turn\");\n \t\t\t}\n \n \t\t\telse if(tempPiece.team==2){\n \t\t\t\tSystem.out.println(\"It is not Player 2's turn\");\n \t\t\t}\t\n \t\t\t\t\tcurrentButton=null; //resets the ActionListener\n \t\t\t\t\t}\n \t\t\t\t}\t\n \t\t\t}// end of if LBR != null\t\n \t\t\tlastButtonPressed=currentButton; //sets initial value for LBP\n \t\t} //end of actionPerformed\n \t } //end of TileClicked\n\t\t \n\t\t \n\t class attackPiece implements ActionListener{//sets the action listener of the gameboard to attack pieces\n\t \tpublic void actionPerformed (ActionEvent e) {\n\t \t\t\tfor(int i=0; i<10; i++) {//add the buttons to the frame\n\t \t \tfor (int j=0; j<10; j++) {\n\t \t \t\ttile[i][j].addActionListener(new attackGamePiece());\n\t \t \t}\n\t \t }\n\t \t\t\tSystem.out.println(\"Attack Mode Selected\");\n\t \t\t}\n\t \t}\n\t \n\t \tclass movePiece implements ActionListener{//sets the action listener of the gameboard to move pieces\n\t \t\tpublic void actionPerformed (ActionEvent e) {\n\t \t\t\tfor(int i=0; i<10; i++) {//add the buttons to the frame\n\t \t \tfor (int j=0; j<10; j++) {\n\t \t \t\ttile[i][j].addActionListener(new tileClicked());\n\t \t \t}\n\t \t }\n\t \t\t\tSystem.out.println(\"Move Mode Selected\");\n\t \t\t}\n\t \t}\n\t \n\t class healPiece implements ActionListener{\n\t \t public void actionPerformed (ActionEvent e){\n\t \t\t\tfor(int i=0; i<10; i++) {//add the buttons to the frame\n\t \t \tfor (int j=0; j<10; j++) {\n\t \t \t\ttile[i][j].addActionListener(new healGamePiece()); //need to implement healGamePiece\n\t \t \t}\n\t \t }\n\t \t\t\tSystem.out.println(\"Heal Mode Selected\");\n\t \t }\n\t }\n\t \n\t class cancelAction implements ActionListener{\n\t \t public void actionPerformed (ActionEvent e){\n\t \t\t \n\t \t\tfor(int i=0; i<10; i++) {//add the buttons to the frame\n\t \t \tfor (int j=0; j<10; j++) {\n\t \t \t\t//remove the action listener, might need to keep track of action listener in a variable\n\t \t \t}\n\t \t }\n\t \t\tSystem.out.println(\"Action Mode Canceled. Please select an Action Mode\");\n\t \t\t\n\t \t } \n\t }\n\t \n\t for(int i=0; i<10; i++) {//add the buttons to the frame\n\t \tfor (int j=0; j<10; j++) {\n\t \t\ttile[i][j]=new JButton();\n\t \t\tframe3.add(tile[i][j]);\n\t \t\ttile[i][j].setBackground(Color.white);\n\t \t\t//tile[i][j].addActionListener(new tileClicked());\n\t \t}\n\t }\n\t \n\t move.addActionListener(new movePiece());\n\t attack.addActionListener(new attackPiece());\n\t heal.addActionListener(new healPiece());\n\t cancel.addActionListener(new cancelAction());\n\t \n\t frame3.add(move);\n\t frame3.add(attack);\n\t frame3.add(heal);\n\t frame3.add(cancel);\n\t \n\t frame3.setSize(700,600);\n\t JMenuBar gameMenuBar = new JMenuBar(); //create menu bar\n\t frame3.setJMenuBar(gameMenuBar); //mount it onto frame\n\t JMenu options = new JMenu(\"Options\"); //create \"options\" option\n\t gameMenuBar.add(options); //mount it onto menu bar\n\t JMenuItem key = new JMenuItem(\"Key\"); //create and name options within \"options\"\n\t JMenuItem endturn = new JMenuItem(\"End Turn\");\n\t JMenuItem concede = new JMenuItem(\"Concede\");\n\t options.add(key); //put them into \"options\" within menu bar\n\t options.add(endturn);\n\t options.add(concede);\n\t \n\t class concedeAction implements ActionListener{ //allow \"exit\" to close program on click\n\t \t\tpublic void actionPerformed (ActionEvent e) {\n\t \t\t\tint currTurn=whosTurn(numPlayers);\n\t \t\t\tremoveAllImages(numPlayers, tile, frame3); \n\t \t\t\tendTurn(numPlayers); //prints out turn ended & next player\n\t \t\t\tif(currTurn==1){ //have to update variable so next player can go\n\t \t\t\t\tturnSeed=2;\n\t \t\t\t}\n\t \t\t\telse {\n\t \t\t\t\tturnSeed=1;\n\t \t\t\t}\n\t \t\t}\n\t }\n\t \t\t\t\n\t class keyAction implements ActionListener{ //placeholder for key window \n\t \tpublic void actionPerformed (ActionEvent e) {\n\t \t\tJOptionPane.showMessageDialog(frame3,\n\t \t\t\t \"Player 1 is blue \\n\"\n\t \t\t\t \t\t+ \"Player 2 is red \\n\"\n\t \t\t\t \t\t+ \"Player 3 is green \\n\"\n\t \t\t\t \t\t+ \"Player 4 is yellow \\n\"\n\t \t\t\t \t\t+ \"A Warrior's token is a circle. Range:1, Move:3\\n\"\n\t \t\t\t \t\t+ \"A Ranger's token is a square. Range:4, Move:5\\n\"\n\t \t\t\t \t\t+ \"A Rogue's token is a triangle. Range:1, Move:6\\n\"\n\t \t\t\t \t\t+ \"A healer's token is a star. Range:3, Move:4\\n\"\n\t \t\t\t \t\t+ \"A Damage Mage's token is a pentagon. Range:3, Move:4\\n\", \n\t \t\t\t \"Key\",\n\t \t\t\t JOptionPane.PLAIN_MESSAGE);\n\t \t}\n\t }\n\t class endturnAction implements ActionListener{ //placeholder for endturn\n\t \tpublic void actionPerformed (ActionEvent e) {\n\t \t\tendTurn(numPlayers); //prints out turn ended & next player\n\t \t\t if(whosTurn(numPlayers)==2) {\n\t \t\t\t Player2.findPieceLocs(tile);\n\t \t\t\t Player2.findMove(tile, Player1);\n\t \t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t \t\t\t endTurn(numPlayers);\n\t \t\t }\n\t \t}\n\t }\n\t \n\t concede.addActionListener(new concedeAction()); //add action listeners to menu bar\n\t key.addActionListener(new keyAction());\n\t endturn.addActionListener(new endturnAction());\n\t \n\t frame3.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t frame3.setVisible(true);\n\t \n\t //have to finally create the game pieces based off of previous GUI selections\n\t Player1.createGamePieces(tile, \"Blue\", 10, 20, 0, 1, 2);\n\t Player2.createGamePieces(tile, \"Red\", 97, 98, 99, 89, 79); //Player 2's location has been changed so they are opposite player 1 rather than next to them\n\t\t \n\t if(whosTurn(numPlayers)==2) {\n\t\t\t\t Player2.findPieceLocs(tile);\n\t\t\t\t Player2.findMove(tile, Player1);\n\t\t\t\t Player2.makeMove(tile, turnSeed, frame3);\n\t\t\t\t endTurn(numPlayers);\n\t\t\t }\n\t \n\t \n\t}", "public void createGameButtons() {\n \tcreateGameButton(myResources.getString(\"startcommand\"), 1, GAME_BUTTON_XLOCATION, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"stopcommand\"), 0, GAME_BUTTON_XLOCATION * 3, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"speedup\"), SPEED_INCREASE, GAME_BUTTON_XLOCATION*5, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"slowdown\"), 1/SPEED_INCREASE, GAME_BUTTON_XLOCATION*7, GAME_BUTTON_YLOCATION);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n startButton = new javax.swing.JButton();\n highscoresButton = new javax.swing.JButton();\n quitButton = new javax.swing.JButton();\n\n setMaximumSize(new java.awt.Dimension(600, 420));\n setMinimumSize(new java.awt.Dimension(105, 103));\n setPreferredSize(new java.awt.Dimension(600, 420));\n\n startButton.setText(\"Start\");\n startButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n startButtonActionPerformed(evt);\n }\n });\n\n highscoresButton.setText(\"Highscores\");\n highscoresButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n highscoresButtonActionPerformed(evt);\n }\n });\n\n quitButton.setText(\"Quit\");\n quitButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n quitButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(244, 244, 244)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(startButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(highscoresButton, javax.swing.GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE)\n .addComponent(quitButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(259, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(146, 146, 146)\n .addComponent(startButton)\n .addGap(6, 6, 6)\n .addComponent(highscoresButton)\n .addGap(6, 6, 6)\n .addComponent(quitButton)\n .addContainerGap(193, Short.MAX_VALUE))\n );\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"\\u5E78\\u8FD0\\u8F6C\\u76D8\");\n\t\tlblNewLabel.setBounds(131, 13, 208, 35);\n\t\tlblNewLabel.setIcon(new ImageIcon(RandomCall.class.getResource(\"/images/\\u968F\\u673A\\u7528\\u6237.png\")));\n\t\tlblNewLabel.setFont(new Font(\"宋体\", Font.BOLD, 30));\n\t\t\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\t/*\n\t\t *名字显示区域\n\t\t */\n\t\tlblNewLabel_1 = new JLabel(\"name\");\n\t\tlblNewLabel_1.setFont(new Font(\"宋体\", Font.ITALIC, 30));\n\t\tlblNewLabel_1.setBounds(178, 91, 113, 52);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t\t\n\t\t/*\n\t\t * 开始按钮\n\t\t */\n\t\tstart = new JButton(\"\\u5F00\\u59CB\");\n\t\tstart.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstartAction(e); \n\t\t\t}\n\t\t});\n\t\tstart.setBounds(14, 198, 113, 27);\n\t\tframe.getContentPane().add(start);\n\t\t\n\t\t/*\n\t\t * 停止按钮\n\t\t */\n\t\tJButton stop = new JButton(\"\\u6682\\u505C\");\n\t\tstop.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstopAction(e); \n\t\t\t}\n\n\t\t\t\n\t\t});\n\t\tstop.setBounds(165, 198, 113, 27);\n\t\tframe.getContentPane().add(stop);\n\t\t\n\t\tJButton back = new JButton(\"\\u8FD4\\u56DE\\u4E3B\\u754C\\u9762\");\n\t\tback.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tIndex index = new Index(); \n\t\t\t\tindex.getFrame().setVisible(true);\n\t\t\t\tframe.setVisible(false);\n\t\t\t}\n\t\t});\n\t\tback.setBounds(305, 198, 113, 27);\n\t\tframe.getContentPane().add(back);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "private void initComponents() {\n\n\t\tjButton1 = new javax.swing.JButton();\n\t\tjButton2 = new javax.swing.JButton();\n\t\tjButton3 = new javax.swing.JButton();\n\t\tjButton4 = new javax.swing.JButton();\n\t\tplayerPokemonIcon = new javax.swing.JLabel();\n\t\tplayerNameLabel = new javax.swing.JLabel();\n\t\tplayerHPBar = new javax.swing.JProgressBar();\n\t\tenemyNameLabel = new javax.swing.JLabel();\n\t\tenemyPokemonIcon = new javax.swing.JLabel();\n\t\tEnemyHPBar = new javax.swing.JProgressBar();\n\t\tjSeparator2 = new javax.swing.JSeparator();\n\t\tPlayerStatusIcon = new javax.swing.JLabel();\n\t\tEnemyStatusIcon = new javax.swing.JLabel();\n\n\t\tsetMinimumSize(new java.awt.Dimension(1080, 680));\n\t\tsetPreferredSize(new java.awt.Dimension(1080, 680));\n\t\t//Determines how to display each of the pokemon.\n\t\tjButton1.setVisible(false);\n\t\tjButton2.setVisible(false);\n\t\tjButton3.setVisible(false);\n\t\tif (myModel.getPlayer().getPokedex().size() >= 1) {\n\t\t\tjButton1.setText(myModel.getPlayer().getPokemon(0).getClass().getSimpleName());\n\t\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\t\tSwapToPokemon0(evt);\n\t\t\t\t}\n\t\t\t});\n\t\t\tjButton1.setVisible(true);\n\t\t\tif (myModel.getPlayer().getPokedex().size() >= 2) {\n\t\t\t\tjButton2.setText(myModel.getPlayer().getPokemon(1).getClass().getSimpleName());\n\t\t\t\tjButton2.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\t\t\tSwapToPokemon1(evt);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tjButton2.setVisible(true);\n\t\t\t\tif (myModel.getPlayer().getPokedex().size() >= 3) {\n\t\t\t\t\tjButton3.setText(myModel.getPlayer().getPokemon(2).getClass().getSimpleName());\n\t\t\t\t\tjButton3.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\t\t\t\tSwapToPokemon2(evt);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tjButton3.setVisible(true);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tjButton4.setText(\"Swap\");\n\t\tjButton4.setVisible(false);\n\n\t\t/**\n\t\t * Player Section. Assembles player info.\n\t\t */\n\t\t// Determines the icon that needs to be used.\n\t\tString str = \"resources/\" + myModel.getPlayer().getSelectedPokemon().getClass().getName().substring(8)\n\t\t\t\t+ \"200.png\";\n\t\tImageIcon img = new ImageIcon(getClass().getResource(str));\n\t\tplayerPokemonIcon.setIcon(img);\n\t\tplayerPokemonIcon.setPreferredSize(new java.awt.Dimension(200, 200));\n\t\tplayerNameLabel.setText(myModel.getPlayer().getSelectedPokemon().getClass().getName().substring(8));\n\t\t// player HP bar section\n\t\tdouble hp = myModel.getPlayer().getSelectedPokemon().getCurrentHealth();\n\t\tdouble max = myModel.getPlayer().getSelectedPokemon().getMaxHealth();\n\t\tdouble hpPercent = (hp / max) * 100;\n\t\tplayerHPBar.setValue((int) hpPercent);\n\n\t\t/*\n\t\t * Test line to make sure the status icon code works. try {\n\t\t * Environment.getEnvironment().getPlayer().getSelectedPokemon().\n\t\t * setStatus(new\n\t\t * Poison(Environment.getEnvironment().getPlayer().getSelectedPokemon())\n\t\t * ); } catch (StatusEffectException e) { // TODO Auto-generated catch\n\t\t * block e.printStackTrace(); }\n\t\t */\n\t\t/**\n\t\t * Player Status icon section.\n\t\t */\n\t\tif (myModel.getPlayer().getSelectedPokemon().getStatus() instanceof Burn) {\n\t\t\tPlayerStatusIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"resources/FireIC_Big.png\")));\n\t\t\tPlayerStatusIcon.setVisible(true);\n\t\t} else if (myModel.getPlayer().getSelectedPokemon().getStatus() instanceof Poison) {\n\t\t\tPlayerStatusIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"resources/PoisonIC_Big.png\")));\n\t\t\tPlayerStatusIcon.setVisible(true);\n\t\t} else if (myModel.getPlayer().getSelectedPokemon().getStatus() instanceof Frozen) {\n\t\t\tPlayerStatusIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"resources/IceIC_Big.png\")));\n\t\t\tPlayerStatusIcon.setVisible(true);\n\t\t} else {\n\t\t\tPlayerStatusIcon.setVisible(false);\n\t\t}\n\n\t\t/**\n\t\t * Enemy Section Does the calculations for enemy health and icons.\n\t\t */\n\t\tenemyNameLabel.setText(myModel.getComputer().getSelectedPokemon().getClass().getName().substring(8));\n\t\tstr = \"resources/\" + myModel.getComputer().getSelectedPokemon().getClass().getName().substring(8) + \"200.png\";\n\t\timg = new ImageIcon(getClass().getResource(str));\n\t\tenemyPokemonIcon.setIcon(img);\n\t\tenemyPokemonIcon.setMaximumSize(new java.awt.Dimension(200, 200));\n\t\tenemyPokemonIcon.setMinimumSize(new java.awt.Dimension(200, 200));\n\t\tenemyPokemonIcon.setPreferredSize(new java.awt.Dimension(200, 200));\n\t\t// Enemy HP bar\n\t\tEnemyHPBar.setValue((int) (((double) myModel.getComputer().getSelectedPokemon().getCurrentHealth()\n\t\t\t\t/ (double) myModel.getComputer().getSelectedPokemon().getMaxHealth()) * 100));\n\t\t// Enemy Status bar\n\t\tif (myModel.getComputer().getSelectedPokemon().getStatus() instanceof Burn){\n\t\t\tEnemyStatusIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"resources/FireIC_Big.png\")));\n\t\t\tEnemyStatusIcon.setVisible(true);\n\t\t}else if (myModel.getComputer().getSelectedPokemon().getStatus() instanceof Poison){\n\t\t\tEnemyStatusIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"resources/PoisonIC_Big.png\")));\n\t\t\tEnemyStatusIcon.setVisible(true);\t\t\t\n\t\t}else if (myModel.getComputer().getSelectedPokemon().getStatus() instanceof Frozen){\n\t\t\tEnemyStatusIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"resources/IceIC_Big.png\")));\n\t\t\tEnemyStatusIcon.setVisible(true);\n\t\t}else{\n\t\t\tEnemyStatusIcon.setVisible(false);\n\t\t}\n\n\t\t/**\n\t\t * Netbeans generated layout code.\n\t\t */\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tthis.setLayout(layout);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addComponent(jSeparator2)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addComponent(PlayerStatusIcon)\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t.addComponent(playerHPBar, javax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(playerPokemonIcon, javax.swing.GroupLayout.PREFERRED_SIZE, 200,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE).addComponent(playerNameLabel,\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 638, Short.MAX_VALUE)\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addComponent(EnemyStatusIcon)\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(jButton4))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(6, 6, 6)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfalse)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(jButton1)))\n\t\t\t\t\t\t\t\t\t\t.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(enemyPokemonIcon, javax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(EnemyHPBar, javax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(enemyNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n\t\t\t\t\t\t.addContainerGap()));\n\t\tlayout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout\n\t\t\t\t.createSequentialGroup().addContainerGap()\n\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(EnemyHPBar, javax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t.addComponent(enemyPokemonIcon, javax.swing.GroupLayout.PREFERRED_SIZE, 200,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(enemyNameLabel).addComponent(PlayerStatusIcon))\n\t\t\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(playerHPBar, javax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(EnemyStatusIcon)))\n\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t.addComponent(playerPokemonIcon, javax.swing.GroupLayout.PREFERRED_SIZE, 200,\n\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(playerNameLabel)\n\t\t\t\t.addGap(1, 1, 1)\n\t\t\t\t.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10,\n\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(jButton3))\n\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jButton2)\n\t\t\t\t\t\t.addComponent(jButton4))\n\t\t\t\t.addGap(21, 21, 21)));\n\t}", "private void initialize() {\n frame = new JFrame();\n frame.setBounds(100, 100, 526, 758);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.getContentPane().setLayout(null);\n\n JPanel panel = new JPanel();\n panel.setBackground(new Color(176, 224, 230));\n panel.setBounds(12, 10, 493, 704);\n frame.getContentPane().add(panel);\n panel.setLayout(null);\n\n textField = new JTextField();\n textField.setText(\"0\");\n textField.setFont(new Font(\"굴림\", Font.BOLD, 21));\n textField.setHorizontalAlignment(SwingConstants.RIGHT);\n textField.setBounds(12, 91, 467, 65);\n textField.setColumns(10);\n panel.add(textField);\n\n lblNewLabel = new JLabel(\"\");\n lblNewLabel.setForeground(Color.WHITE);\n lblNewLabel.setBackground(Color.WHITE);\n lblNewLabel.setHorizontalAlignment(SwingConstants.RIGHT);\n lblNewLabel.setBounds(13, 16, 466, 53);\n panel.add(lblNewLabel);\n\n JButton btn_7 = new JButton(\"7\");\n btn_7.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n }\n });\n btn_7.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_7.setBackground(Color.WHITE);\n btn_7.setBounds(13, 182, 106, 99);\n panel.add(btn_7);\n\n JButton btn_8 = new JButton(\"8\");\n btn_8.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_8.setBackground(Color.WHITE);\n btn_8.setBounds(133, 182, 106, 99);\n panel.add(btn_8);\n\n JButton btn_9 = new JButton(\"9\");\n btn_9.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_9.setBackground(Color.WHITE);\n btn_9.setBounds(253, 182, 106, 99);\n panel.add(btn_9);\n\n JButton btn_multiply = new JButton(\"*\");\n btn_multiply.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_multiply.setBackground(Color.WHITE);\n btn_multiply.setBounds(373, 182, 106, 99);\n panel.add(btn_multiply);\n\n JButton btn_4 = new JButton(\"4\");\n btn_4.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_4.setBackground(Color.WHITE);\n btn_4.setBounds(13, 313, 106, 99);\n panel.add(btn_4);\n\n JButton btn_5 = new JButton(\"5\");\n btn_5.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_5.setBackground(Color.WHITE);\n btn_5.setBounds(133, 313, 106, 99);\n panel.add(btn_5);\n\n JButton btn_6 = new JButton(\"6\");\n btn_6.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_6.setBackground(Color.WHITE);\n btn_6.setBounds(253, 313, 106, 99);\n panel.add(btn_6);\n\n JButton btn_1 = new JButton(\"1\");\n btn_1.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_1.setBackground(Color.WHITE);\n btn_1.setBounds(13, 444, 106, 99);\n panel.add(btn_1);\n\n JButton btn_2 = new JButton(\"2\");\n btn_2.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_2.setBackground(Color.WHITE);\n btn_2.setBounds(133, 444, 106, 99);\n panel.add(btn_2);\n\n JButton btn_3 = new JButton(\"3\");\n btn_3.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_3.setBackground(Color.WHITE);\n btn_3.setBounds(253, 444, 106, 99);\n panel.add(btn_3);\n\n JButton btn_0 = new JButton(\"0\");\n btn_0.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_0.setBackground(Color.WHITE);\n btn_0.setBounds(13, 575, 106, 99);\n panel.add(btn_0);\n\n JButton btn_clear = new JButton(\"c\");\n btn_clear.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_clear.setBackground(Color.WHITE);\n btn_clear.setBounds(133, 575, 106, 99);\n panel.add(btn_clear);\n\n JButton btn_equal = new JButton(\"=\");\n btn_equal.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_equal.setBackground(Color.WHITE);\n btn_equal.setBounds(253, 575, 106, 99);\n panel.add(btn_equal);\n\n JButton btn_divide = new JButton(\"/\");\n btn_divide.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_divide.setBackground(Color.WHITE);\n btn_divide.setBounds(373, 313, 106, 99);\n panel.add(btn_divide);\n\n JButton btn_minus = new JButton(\"-\");\n btn_minus.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_minus.setBackground(Color.WHITE);\n btn_minus.setBounds(373, 444, 106, 99);\n panel.add(btn_minus);\n\n JButton btn_plus = new JButton(\"+\");\n btn_plus.setFont(new Font(\"나눔고딕\", Font.BOLD, 21));\n btn_plus.setBackground(Color.WHITE);\n btn_plus.setBounds(373, 575, 106, 99);\n panel.add(btn_plus);\n\n // 기호 (+, -, /, *)\n ButtonSign sign = new ButtonSign(save, k_sign, textField, lblNewLabel, numbers);\n\n btn_plus.addActionListener(sign);\n btn_multiply.addActionListener(sign);\n btn_minus.addActionListener(sign);\n btn_divide.addActionListener(sign);\n\n // =\n btn_equal.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n if (textField.getText() == \"\") {\n textField.setText(String.valueOf(numbers));\n } else {\n save[0] += \" \" + textField.getText() + \" =\";\n lblNewLabel.setText(save[0]);\n\n int num = Integer.parseInt(textField.getText());\n numbers[0] = calcurator(k_sign[0], numbers[0], num);\n textField.setText(String.valueOf(numbers[0]));\n k_sign[1] = k_sign[0];\n\n save[0] = null;\n numbers[0] = 0;\n check[0] = true;\n }\n }\n });\n\n // clear\n btn_clear.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n save[0] = null;\n k_sign[0] = \"\";\n k_sign[1] = \"\";\n numbers[0] = 0;\n\n textField.setText(\"\");\n lblNewLabel.setText(\"\");\n }\n });\n\n // 숫자\n ButtonEvent number = new ButtonEvent(save, k_sign, textField, lblNewLabel, check);\n\n btn_0.addActionListener(number);\n btn_1.addActionListener(number);\n btn_2.addActionListener(number);\n btn_3.addActionListener(number);\n btn_4.addActionListener(number);\n btn_5.addActionListener(number);\n btn_6.addActionListener(number);\n btn_7.addActionListener(number);\n btn_8.addActionListener(number);\n btn_9.addActionListener(number);\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setFont(new Font(\"±¼¸²\", Font.PLAIN, 23));\n\t\tframe.getContentPane().setBackground(Color.CYAN);\n\t\tframe.setBounds(100, 50, 450, 500);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\n\t\ttextField = new JTextField();\n\t\ttextField.setFont(new Font(\"±¼¸²\", Font.BOLD, 26));\n\t\ttextField.setText(\"\");\n\t\ttextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\ttextField.setBounds(36, 22, 352, 54);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\n\t\tJButton btn_7 = new JButton(\"7\");\n\t\tbtn_7.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_7.setBounds(36, 97, 79, 81);\n\t\tframe.getContentPane().add(btn_7);\n\n\t\tJButton btn_8 = new JButton(\"8\");\n\t\tbtn_8.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_8.setBounds(127, 97, 79, 81);\n\t\tframe.getContentPane().add(btn_8);\n\n\t\tJButton btn_9 = new JButton(\"9\");\n\t\tbtn_9.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_9.setBounds(218, 97, 79, 81);\n\t\tframe.getContentPane().add(btn_9);\n\n\t\tJButton btn_mul = new JButton(\"*\");\n\t\tbtn_mul.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_mul.setBounds(309, 97, 79, 81);\n\t\tframe.getContentPane().add(btn_mul);\n\n\t\tJButton btn_4 = new JButton(\"4\");\n\t\tbtn_4.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_4.setBounds(36, 188, 79, 81);\n\t\tframe.getContentPane().add(btn_4);\n\n\t\tJButton btn_5 = new JButton(\"5\");\n\t\tbtn_5.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_5.setBounds(127, 188, 79, 81);\n\t\tframe.getContentPane().add(btn_5);\n\n\t\tJButton btn_6 = new JButton(\"6\");\n\t\tbtn_6.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_6.setBounds(218, 188, 79, 81);\n\t\tframe.getContentPane().add(btn_6);\n\n\t\tJButton btn_div = new JButton(\"/\");\n\t\tbtn_div.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_div.setBounds(309, 188, 79, 81);\n\t\tframe.getContentPane().add(btn_div);\n\n\t\tJButton btn_2 = new JButton(\"2\");\n\t\tbtn_2.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_2.setBounds(127, 279, 79, 81);\n\t\tframe.getContentPane().add(btn_2);\n\n\t\tJButton btn_3 = new JButton(\"3\");\n\t\tbtn_3.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_3.setBounds(218, 279, 79, 81);\n\t\tframe.getContentPane().add(btn_3);\n\n\t\tJButton btn_sub = new JButton(\"-\");\n\t\tbtn_sub.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttemp = e.getActionCommand();\n\t\t\t\tprior_num += Integer.parseInt(textField.getText());\n\t\t\t\tcalculator(btn_sub.getText());\n\n\t\t\t}\n\t\t});\n\t\tbtn_sub.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_sub.setBounds(309, 279, 79, 81);\n\t\tframe.getContentPane().add(btn_sub);\n\n\t\tJButton btn_0 = new JButton(\"0\");\n\t\tbtn_0.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_0.setBounds(36, 370, 79, 81);\n\t\tframe.getContentPane().add(btn_0);\n\n\t\tJButton btn_c = new JButton(\"c\");\n\t\tbtn_c.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttextField.setText(\"\");\n\t\t\t}\n\t\t});\n\t\tbtn_c.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_c.setBounds(127, 370, 79, 81);\n\t\tframe.getContentPane().add(btn_c);\n\n\t\tJButton btn_add = new JButton(\"+\");\n\t\tbtn_add.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttemp = e.getActionCommand();\n\t\t\t\tcalculator(btn_add.getText());\n\t\t\t}\n\t\t});\n\t\tbtn_add.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_add.setBounds(309, 370, 79, 81);\n\t\tframe.getContentPane().add(btn_add);\n\n\t\tJButton btn_1 = new JButton(\"1\");\n\t\tbtn_1.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_1.setBounds(36, 279, 79, 81);\n\t\tframe.getContentPane().add(btn_1);\n\n\t\tJButton btn_equ = new JButton(\"=\");\n\t\tbtn_equ.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcalculator(btn_equ.getText());\n\t\t\t}\n\t\t});\n\t\tbtn_equ.setFont(new Font(\"±¼¸²\", Font.BOLD, 28));\n\t\tbtn_equ.setBounds(218, 370, 79, 81);\n\t\tframe.getContentPane().add(btn_equ);\n\n\t\tbtn_0.addActionListener(new ButtonEvent(textField));\n\t\tbtn_1.addActionListener(new ButtonEvent(textField));\n\t\tbtn_2.addActionListener(new ButtonEvent(textField));\n\t\tbtn_3.addActionListener(new ButtonEvent(textField));\n\t\tbtn_4.addActionListener(new ButtonEvent(textField));\n\t\tbtn_5.addActionListener(new ButtonEvent(textField));\n\t\tbtn_6.addActionListener(new ButtonEvent(textField));\n\t\tbtn_7.addActionListener(new ButtonEvent(textField));\n\t\tbtn_8.addActionListener(new ButtonEvent(textField));\n\t\tbtn_9.addActionListener(new ButtonEvent(textField));\n\n\t}", "private void buttonInit(){\n for(int i=0; i < 3; i++){\n choice[i] = new JButton();\n\n }\n choice[0].setText(\"10x10 / 8 bombs\");\n choice[0].setBackground(new Color(86, 160, 189));\n\n\n choice[0].addActionListener(l-> makeGamePanel(10, 8));\n\n choice[1].setText(\"15x15 / 30 bombs\");\n choice[1].setBackground(new Color(238, 160, 160));\n\n\n choice[1].addActionListener(l-> makeGamePanel(15,30));\n\n choice[2].setText(\"24x24 / 70 bombs\");\n choice[2].setBackground(new Color(253, 230, 122));\n choice[2].setFont(new Font(Font.MONOSPACED, Font.BOLD, 30));\n choice[2].setForeground(new Color(45, 68, 73));\n\n choice[2].addActionListener(l-> makeGamePanel(24,70));\n\n this.add(choice[0], BorderLayout.LINE_START); this.add(choice[1], BorderLayout.LINE_END); this.add(choice[2], BorderLayout.CENTER);\n }", "public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jButtonBack = new javax.swing.JButton();\n jButtonFisciano = new javax.swing.JButton();\n jButtonStandardMap = new javax.swing.JButton();\n jButtonPlay = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"DEAD ZONE\");\n setResizable(false);\n getContentPane().setLayout(null);\n\n jLabel3.setFont(new java.awt.Font(\"Papyrus\", 1, 24)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel3.setText(\"Fisciano\");\n jLabel3.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n getContentPane().add(jLabel3);\n jLabel3.setBounds(510, 80, 120, 39);\n\n jLabel4.setFont(new java.awt.Font(\"Papyrus\", 1, 28)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n getContentPane().add(jLabel4);\n jLabel4.setBounds(460, 40, 216, 39);\n\n jLabel2.setFont(new java.awt.Font(\"Papyrus\", 1, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel2.setText(\"Standard Map\");\n jLabel2.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n getContentPane().add(jLabel2);\n jLabel2.setBounds(120, 80, 170, 39);\n\n jButtonBack.setText(\"Back\");\n jButtonBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonBackActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonBack);\n jButtonBack.setBounds(60, 490, 59, 25);\n\n jButtonFisciano.setText(\"jButton1\");\n jButtonFisciano.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jButtonFisciano.setBorderPainted(false);\n jButtonFisciano.setMaximumSize(new java.awt.Dimension(200, 200));\n jButtonFisciano.setPreferredSize(new java.awt.Dimension(200, 200));\n jButtonFisciano.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonFiscianoActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonFisciano);\n jButtonFisciano.setBounds(400, 140, 350, 250);\n\n jButtonStandardMap.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jButtonStandardMap.setBorderPainted(false);\n jButtonStandardMap.setMaximumSize(new java.awt.Dimension(200, 200));\n jButtonStandardMap.setPreferredSize(new java.awt.Dimension(200, 200));\n jButtonStandardMap.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonStandardMapActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonStandardMap);\n jButtonStandardMap.setBounds(80, 130, 270, 270);\n\n jButtonPlay.setText(\"PLAY!\");\n jButtonPlay.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonPlayActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonPlay);\n jButtonPlay.setBounds(350, 490, 65, 25);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/deadzone/sfondo_senza_spari.png\"))); // NOI18N\n getContentPane().add(jLabel1);\n jLabel1.setBounds(-10, -10, 930, 640);\n\n pack();\n setLocationRelativeTo(null);\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tJButton btn2 = new JButton(\"\\uAE40\\uC131\\uC9C4\");\r\n\t\tbtn2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tSystem.out.println(name);\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.getContentPane().add(btn2, BorderLayout.WEST);\r\n\t\t\r\n\t\tJButton btnNewButton = new JButton(\"\\uC774\\uB825\");\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.getContentPane().add(btnNewButton, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJButton btnNewButton_1 = new JButton(\"\\uC804\\uBB38\\uBD84\\uC57C\");\r\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.getContentPane().add(btnNewButton_1, BorderLayout.EAST);\r\n\t\t\r\n\t\tJButton btnNewButton_2 = new JButton(\"\\uC608\\uC57D\\uD558\\uAE30\");\r\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tSystem.out.println(InfoVO.getDocname());\r\n\t\t\t\tSystem.out.println(InfoVO.getDeptname());\r\n\t\t\t\tSystem.out.println(InfoVO.getHosname());\r\n\t\t\t\tTest test = new Test();\r\n\t\t\t\tframe.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.getContentPane().add(btnNewButton_2, BorderLayout.SOUTH);\r\n\t}", "private void builder(){\r\n //Objects\r\n //Left\r\n canvasStackPane.setAlignment(Pos.TOP_LEFT);\r\n left1HintButton = new Button(\"Hint\");\r\n left2Button = new Button(\"New Graph\");\r\n left3Button = new Button(\"New GameMode\");\r\n left4Button = new Button(\"New GraphMode\");\r\n left5Button = new Button(\"Finished\");\r\n leftRestLabel = new Label();\r\n //Up\r\n upperLeftButton = new Label(\"Menu\");\r\n upperLeftButton.setAlignment(Pos.CENTER);\r\n upper1Label = new Label();\r\n upper2Label = new Label();\r\n upper3Label = new Label();\r\n upperRestLabel = new Label();\r\n //calculateVectors\r\n backPane.setPickOnBounds(false);\r\n textFieldVertices.setPromptText(\"Vertices\");\r\n textFieldEdges.setPromptText(\"Edges\");\r\n gameEnd.setSpacing(30);\r\n gameEnd.setAlignment(Pos.CENTER);\r\n gameWinStackPane.setAlignment(Pos.CENTER);\r\n hBoxWin.setAlignment(Pos.CENTER);\r\n hBoxWin.setSpacing(30);\r\n canvasStackPane.setPickOnBounds(true);\r\n canvas.setPickOnBounds(true);\r\n canvas.getGraphicsContext2D().setLineWidth(2.5);\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblPlayerName = new javax.swing.JLabel();\n lblMonName = new javax.swing.JLabel();\n lblPlayer = new javax.swing.JLabel();\n lblMonster = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n btnEarth = new javax.swing.JButton();\n btnFire = new javax.swing.JButton();\n btnWater = new javax.swing.JButton();\n btnIce = new javax.swing.JButton();\n lblPlayerHealth = new javax.swing.JLabel();\n lblMonHealth = new javax.swing.JLabel();\n btnFlee = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n lblMonStats = new javax.swing.JTextPane();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Battle\");\n setUndecorated(true);\n\n lblPlayerName.setFont(new java.awt.Font(\"Luminari\", 0, 13)); // NOI18N\n lblPlayerName.setText(\"Player\");\n\n lblMonName.setFont(new java.awt.Font(\"Luminari\", 0, 13)); // NOI18N\n lblMonName.setText(\"Monster\");\n\n lblPlayer.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n lblPlayer.setOpaque(true);\n\n lblMonster.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n jLabel5.setText(\"Actions\");\n\n jLabel6.setText(\"Enemy Stats\");\n\n btnEarth.setBackground(new java.awt.Color(136, 91, 32));\n btnEarth.setFont(new java.awt.Font(\"Luminari\", 0, 13)); // NOI18N\n btnEarth.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/elementals/images/earth-icon.png\"))); // NOI18N\n btnEarth.setText(\"Earth\");\n btnEarth.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEarthActionPerformed(evt);\n }\n });\n\n btnFire.setBackground(new java.awt.Color(255, 51, 0));\n btnFire.setFont(new java.awt.Font(\"Luminari\", 0, 13)); // NOI18N\n btnFire.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/elementals/images/fire-icon.png\"))); // NOI18N\n btnFire.setText(\"Fire\");\n btnFire.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnFireActionPerformed(evt);\n }\n });\n\n btnWater.setBackground(new java.awt.Color(51, 102, 255));\n btnWater.setFont(new java.awt.Font(\"Luminari\", 0, 13)); // NOI18N\n btnWater.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/elementals/images/water-icon.png\"))); // NOI18N\n btnWater.setText(\"Water\");\n btnWater.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnWaterActionPerformed(evt);\n }\n });\n\n btnIce.setBackground(new java.awt.Color(0, 204, 255));\n btnIce.setFont(new java.awt.Font(\"Luminari\", 0, 13)); // NOI18N\n btnIce.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/elementals/images/ice-icon.png\"))); // NOI18N\n btnIce.setText(\"Ice\");\n btnIce.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnIceActionPerformed(evt);\n }\n });\n\n lblPlayerHealth.setText(\"❤ ❤ ❤ \");\n\n lblMonHealth.setText(\"❤ ❤ ❤ \");\n\n btnFlee.setBackground(new java.awt.Color(51, 51, 51));\n btnFlee.setFont(new java.awt.Font(\"Luminari\", 0, 13)); // NOI18N\n btnFlee.setText(\"Flee\");\n btnFlee.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnFleeActionPerformed(evt);\n }\n });\n\n lblMonStats.setEditable(false);\n lblMonStats.setBackground(new java.awt.Color(0, 204, 204));\n lblMonStats.setFont(new java.awt.Font(\"Luminari\", 0, 13)); // NOI18N\n lblMonStats.setForeground(new java.awt.Color(255, 51, 51));\n lblMonStats.setCaretColor(new java.awt.Color(0, 204, 204));\n lblMonStats.setDragEnabled(false);\n lblMonStats.setIgnoreRepaint(true);\n jScrollPane1.setViewportView(lblMonStats);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(lblPlayerHealth, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblPlayerName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnWater, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(66, 66, 66)\n .addComponent(lblPlayer, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnEarth, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnIce, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnFire, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(btnFlee, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblMonster, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblMonName, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)\n .addComponent(lblMonHealth, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1))))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblPlayerName)\n .addComponent(lblMonName))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(lblMonster, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblPlayer, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblPlayerHealth)\n .addComponent(lblMonHealth))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnEarth, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnFire, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnWater, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnIce, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnFlee, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jScrollPane1))\n .addContainerGap())\n );\n\n pack();\n }", "private void createYourMusicContent() {\n\t\t/**Creates all images we will use for the buttons*/\n\t\tImageIcon image1 = new ImageIcon(sURLFB1);\n\t\tImageIcon image2 = new ImageIcon(sURLFB2);\n\t\tImageIcon image3 = new ImageIcon(sURLFB3);\n\t\tImageIcon image4 = new ImageIcon(sURLFBS1);\n\t\tImageIcon image5 = new ImageIcon(sURLFBS2);\n\t\tImageIcon image6 = new ImageIcon(sURLFBS3);\n\t\tImageIcon image7 = new ImageIcon(sURLFBPL1);\n\t\tImageIcon image8 = new ImageIcon(sURLFBPL2);\n\t\tImageIcon image9 = new ImageIcon(sURLFBPL3);\n\t\n\t\t/**Creates the button of Favourites and configures it*/\n\t\tjbFavorites = new JButton(\"Favorites\");\n\t\tjbFavorites.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbFavorites.setForeground(new Color(150,100,100));\n\t\tjbFavorites.setIcon(image1);\n\t\tjbFavorites.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbFavorites.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbFavorites.setRolloverIcon(image2);\n\t\tjbFavorites.setSelectedIcon(image3);\n\t\tjbFavorites.setContentAreaFilled(false);\n\t\tjbFavorites.setFocusable(false);\n\t\tjbFavorites.setBorderPainted(false);\n\t\t\n\t\t/**Creates the button of Songs and configures it*/\n\t\tjbSongs = new JButton(\"Songs\");\n\t\tjbSongs.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbSongs.setForeground(new Color(150,100,100));\n\t\tjbSongs.setIcon(image4);\n\t\tjbSongs.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbSongs.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbSongs.setRolloverIcon(image5);\n\t\tjbSongs.setSelectedIcon(image6);\n\t\tjbSongs.setContentAreaFilled(false);\n\t\tjbSongs.setFocusable(false);\n\t\tjbSongs.setBorderPainted(false);\n\t\t\n\t\t/**Creates the button of PartyList and configures it*/\n\t\tjbPartyList = new JButton(\"PartyList\");\n\t\tjbPartyList.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbPartyList.setForeground(new Color(150,100,100));\n\t\tjbPartyList.setIcon(image7);\n\t\tjbPartyList.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbPartyList.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbPartyList.setRolloverIcon(image8);\n\t\tjbPartyList.setSelectedIcon(image9);\t\n\t\tjbPartyList.setContentAreaFilled(false);\n\t\tjbPartyList.setFocusable(false);\n\t\tjbPartyList.setBorderPainted(false);\n\t\t\n\t\t/**Creates the panel where we will put all buttons*/\n\t\tjpPreLists = new JPanel(new BorderLayout());\n jpPreLists.setOpaque(false);\n\t\tjpPreLists.add(jbFavorites,BorderLayout.NORTH);\n\t\tjpPreLists.add(jbSongs,BorderLayout.CENTER);\n\t\tjpPreLists.add(jbPartyList,BorderLayout.SOUTH);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n titleLabel = new javax.swing.JLabel();\n goldIncomeLabel = new javax.swing.JLabel();\n foodIncomeLabel = new javax.swing.JLabel();\n soldierIncomeLabel = new javax.swing.JLabel();\n buildingNameLabel = new javax.swing.JLabel();\n costLabel = new javax.swing.JLabel();\n goldLabel = new javax.swing.JLabel();\n emptySlot1 = new javax.swing.JButton();\n emptySlot2 = new javax.swing.JButton();\n emptySlot3 = new javax.swing.JButton();\n emptySlot4 = new javax.swing.JButton();\n emptySlot5 = new javax.swing.JButton();\n emptySlot6 = new javax.swing.JButton();\n emptySlot7 = new javax.swing.JButton();\n emptySlot8 = new javax.swing.JButton();\n finishButton = new javax.swing.JButton();\n descriptionText = new javax.swing.JTextField();\n buildLayer = new javax.swing.JLayeredPane();\n buildLayerTitle = new javax.swing.JLabel();\n buildButton1 = new javax.swing.JButton();\n buildButton2 = new javax.swing.JButton();\n buildButton3 = new javax.swing.JButton();\n buildButton4 = new javax.swing.JButton();\n buildButton5 = new javax.swing.JButton();\n nextButton = new javax.swing.JButton();\n backButton = new javax.swing.JButton();\n summaryDisplayLabel = new javax.swing.JLabel();\n goldDisplayLabel = new javax.swing.JLabel();\n foodDisplayLabel = new javax.swing.JLabel();\n soldierDisplayLabel = new javax.swing.JLabel();\n\n setPreferredSize(new java.awt.Dimension(800, 600));\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n formMouseClicked(evt);\n }\n });\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n titleLabel.setFont(new java.awt.Font(\"Microsoft YaHei\", 0, 24)); // NOI18N\n titleLabel.setForeground(new java.awt.Color(153, 102, 0));\n titleLabel.setText(\"许昌城建筑物\");\n add(titleLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(58, 29, 200, -1));\n\n goldIncomeLabel.setFont(new java.awt.Font(\"Microsoft YaHei\", 0, 13)); // NOI18N\n goldIncomeLabel.setText(\"100\");\n add(goldIncomeLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(695, 196, 75, -1));\n\n foodIncomeLabel.setFont(new java.awt.Font(\"Microsoft YaHei\", 0, 13)); // NOI18N\n foodIncomeLabel.setText(\"200\");\n add(foodIncomeLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(695, 232, 75, -1));\n\n soldierIncomeLabel.setFont(new java.awt.Font(\"Microsoft YaHei\", 0, 13)); // NOI18N\n soldierIncomeLabel.setText(\"300\");\n add(soldierIncomeLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(695, 268, 75, -1));\n\n buildingNameLabel.setText(\"建造市场:\");\n add(buildingNameLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(636, 334, 95, -1));\n\n costLabel.setText(\"所需白银: 0\");\n add(costLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(636, 357, 134, -1));\n\n goldLabel.setText(\"现有白银: 2000两\");\n add(goldLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(636, 380, 134, -1));\n\n emptySlot1.setFont(new java.awt.Font(\"Microsoft YaHei\", 1, 18)); // NOI18N\n emptySlot1.setText(\"空地\");\n emptySlot1.setFocusable(false);\n emptySlot1.setPreferredSize(new java.awt.Dimension(130, 90));\n emptySlot1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n emptySlot1ActionPerformed(evt);\n }\n });\n add(emptySlot1, new org.netbeans.lib.awtextra.AbsoluteConstraints(58, 98, -1, -1));\n\n emptySlot2.setFont(new java.awt.Font(\"Microsoft YaHei\", 1, 18)); // NOI18N\n emptySlot2.setText(\"空地\");\n emptySlot2.setFocusable(false);\n emptySlot2.setPreferredSize(new java.awt.Dimension(130, 90));\n emptySlot2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n emptySlot2ActionPerformed(evt);\n }\n });\n add(emptySlot2, new org.netbeans.lib.awtextra.AbsoluteConstraints(243, 98, -1, -1));\n\n emptySlot3.setFont(new java.awt.Font(\"Microsoft YaHei\", 1, 18)); // NOI18N\n emptySlot3.setText(\"空地\");\n emptySlot3.setFocusable(false);\n emptySlot3.setPreferredSize(new java.awt.Dimension(130, 90));\n emptySlot3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n emptySlot3ActionPerformed(evt);\n }\n });\n add(emptySlot3, new org.netbeans.lib.awtextra.AbsoluteConstraints(58, 206, -1, -1));\n\n emptySlot4.setFont(new java.awt.Font(\"Microsoft YaHei\", 1, 18)); // NOI18N\n emptySlot4.setText(\"空地\");\n emptySlot4.setFocusable(false);\n emptySlot4.setPreferredSize(new java.awt.Dimension(130, 90));\n emptySlot4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n emptySlot4ActionPerformed(evt);\n }\n });\n add(emptySlot4, new org.netbeans.lib.awtextra.AbsoluteConstraints(243, 206, -1, -1));\n\n emptySlot5.setFont(new java.awt.Font(\"Microsoft YaHei\", 1, 18)); // NOI18N\n emptySlot5.setText(\"空地\");\n emptySlot5.setFocusable(false);\n emptySlot5.setPreferredSize(new java.awt.Dimension(130, 90));\n emptySlot5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n emptySlot5ActionPerformed(evt);\n }\n });\n add(emptySlot5, new org.netbeans.lib.awtextra.AbsoluteConstraints(58, 314, -1, -1));\n\n emptySlot6.setFont(new java.awt.Font(\"Microsoft YaHei\", 1, 18)); // NOI18N\n emptySlot6.setText(\"空地\");\n emptySlot6.setFocusable(false);\n emptySlot6.setPreferredSize(new java.awt.Dimension(130, 90));\n emptySlot6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n emptySlot6ActionPerformed(evt);\n }\n });\n add(emptySlot6, new org.netbeans.lib.awtextra.AbsoluteConstraints(243, 314, -1, -1));\n\n emptySlot7.setFont(new java.awt.Font(\"Microsoft YaHei\", 1, 18)); // NOI18N\n emptySlot7.setText(\"空地\");\n emptySlot7.setFocusable(false);\n emptySlot7.setPreferredSize(new java.awt.Dimension(130, 90));\n emptySlot7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n emptySlot7ActionPerformed(evt);\n }\n });\n add(emptySlot7, new org.netbeans.lib.awtextra.AbsoluteConstraints(58, 422, -1, -1));\n\n emptySlot8.setFont(new java.awt.Font(\"Microsoft YaHei\", 1, 18)); // NOI18N\n emptySlot8.setText(\"空地\");\n emptySlot8.setFocusable(false);\n emptySlot8.setPreferredSize(new java.awt.Dimension(130, 90));\n emptySlot8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n emptySlot8ActionPerformed(evt);\n }\n });\n add(emptySlot8, new org.netbeans.lib.awtextra.AbsoluteConstraints(243, 422, -1, -1));\n\n finishButton.setText(\"完成\");\n finishButton.setFocusable(false);\n finishButton.setMaximumSize(new java.awt.Dimension(80, 40));\n finishButton.setMinimumSize(new java.awt.Dimension(80, 40));\n finishButton.setPreferredSize(new java.awt.Dimension(80, 40));\n finishButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n finishButtonActionPerformed(evt);\n }\n });\n add(finishButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(690, 531, -1, -1));\n\n descriptionText.setEditable(false);\n descriptionText.setFont(new java.awt.Font(\"Microsoft YaHei\", 0, 14)); // NOI18N\n descriptionText.setForeground(new java.awt.Color(153, 102, 0));\n descriptionText.setText(\"您好\");\n add(descriptionText, new org.netbeans.lib.awtextra.AbsoluteConstraints(58, 538, 385, -1));\n\n buildLayer.setMaximumSize(new java.awt.Dimension(211, 413));\n buildLayer.setMinimumSize(new java.awt.Dimension(211, 413));\n buildLayer.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n buildLayerTitle.setFont(new java.awt.Font(\"Microsoft YaHei\", 0, 18)); // NOI18N\n buildLayerTitle.setForeground(new java.awt.Color(153, 102, 0));\n buildLayerTitle.setText(\"建造\");\n buildLayer.add(buildLayerTitle, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 10, 80, -1));\n\n buildButton1.setText(\"兵营\");\n buildButton1.setFocusable(false);\n buildButton1.setPreferredSize(new java.awt.Dimension(130, 90));\n buildButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n buildButton1MouseEntered(evt);\n }\n });\n buildButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buildButton1ActionPerformed(evt);\n }\n });\n buildLayer.add(buildButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 44, 120, 50));\n\n buildButton2.setText(\"农田\");\n buildButton2.setFocusable(false);\n buildButton2.setMinimumSize(new java.awt.Dimension(130, 90));\n buildButton2.setPreferredSize(new java.awt.Dimension(130, 90));\n buildButton2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n buildButton2MouseEntered(evt);\n }\n });\n buildButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buildButton2ActionPerformed(evt);\n }\n });\n buildLayer.add(buildButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 101, 120, 50));\n\n buildButton3.setText(\"市场\");\n buildButton3.setFocusable(false);\n buildButton3.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n buildButton3MouseEntered(evt);\n }\n });\n buildButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buildButton3ActionPerformed(evt);\n }\n });\n buildLayer.add(buildButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 158, 120, 50));\n\n buildButton4.setText(\"城墙\");\n buildButton4.setFocusable(false);\n buildButton4.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n buildButton4MouseEntered(evt);\n }\n });\n buildButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buildButton4ActionPerformed(evt);\n }\n });\n buildLayer.add(buildButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 215, 120, 50));\n\n buildButton5.setText(\"研究所\");\n buildButton5.setFocusable(false);\n buildButton5.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n buildButton5MouseEntered(evt);\n }\n });\n buildButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buildButton5ActionPerformed(evt);\n }\n });\n buildLayer.add(buildButton5, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 272, 120, 50));\n\n nextButton.setText(\"下一页\");\n nextButton.setFocusable(false);\n nextButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nextButtonActionPerformed(evt);\n }\n });\n buildLayer.add(nextButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 329, 120, 50));\n\n backButton.setText(\"返回\");\n backButton.setFocusable(false);\n backButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backButtonActionPerformed(evt);\n }\n });\n buildLayer.add(backButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 386, 120, 50));\n\n add(buildLayer, new org.netbeans.lib.awtextra.AbsoluteConstraints(428, 76, 155, -1));\n\n summaryDisplayLabel.setFont(new java.awt.Font(\"Microsoft YaHei\", 0, 18)); // NOI18N\n summaryDisplayLabel.setText(\"设施总概要\");\n add(summaryDisplayLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(636, 154, -1, -1));\n\n goldDisplayLabel.setFont(new java.awt.Font(\"Microsoft YaHei\", 0, 13)); // NOI18N\n goldDisplayLabel.setText(\"金收入:\");\n add(goldDisplayLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(636, 196, -1, -1));\n\n foodDisplayLabel.setFont(new java.awt.Font(\"Microsoft YaHei\", 0, 13)); // NOI18N\n foodDisplayLabel.setText(\"粮收入:\");\n add(foodDisplayLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(636, 232, -1, -1));\n\n soldierDisplayLabel.setFont(new java.awt.Font(\"Microsoft YaHei\", 0, 13)); // NOI18N\n soldierDisplayLabel.setText(\"征兵量:\");\n add(soldierDisplayLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(636, 268, -1, -1));\n }", "private void initGUI(){\n setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n setLayout(new GridLayout(3,1));\r\n setSize(896,504);\r\n setLocation(150,80);\r\n\r\n\r\n\r\n //Setting background img\r\n try{\r\n backGroundImg = javax.imageio.ImageIO.read(new File(\"MenuBackGround.jpg\"));\r\n setContentPane(new JPanel(new GridLayout(3,1)){\r\n @Override public void paintComponent(Graphics graphics){\r\n graphics.drawImage(backGroundImg,0,0,getWidth(),getHeight(),null);\r\n }\r\n });\r\n }catch(IOException ioe){\r\n System.out.println(\"Background image not found!\");\r\n }\r\n\r\n //Setting logo img\r\n try{\r\n logoImg = javax.imageio.ImageIO.read(new File(\"QuizAppLogo.jpg\"));\r\n logoLabel = new JLabel(new ImageIcon(logoImg));\r\n }catch (IOException ioe){\r\n System.out.println(\"Logo img not found!\");\r\n }\r\n\r\n //Setting-up the buttons\r\n solve = new JButton(Language.SOLVE_BUTTON_TEXT);\r\n solve.addActionListener(new SolveAction(this));\r\n\r\n create = new JButton(Language.CREATE_BUTTON_TEXT);\r\n create.addActionListener(new CreateAction());\r\n\r\n options = new JButton(Language.OPTIONS_BUTTON_TEXT);\r\n options.setEnabled(false);\r\n\r\n\r\n //Joining them all together\r\n buttonsPanel = new JPanel(new GridLayout(3,1));\r\n buttonsPanel.setOpaque(false);\r\n buttonsPanel.add(solve);\r\n buttonsPanel.add(create);\r\n //buttonsPanel.add(options);\r\n\r\n topPanel = new JPanel(new GridLayout(1,3));\r\n topPanel.add(logoLabel);\r\n topPanel.add(Box.createHorizontalGlue());\r\n topPanel.add(buttonsPanel);\r\n topPanel.setOpaque(false);\r\n\r\n\r\n\r\n add(topPanel);\r\n add(Box.createVerticalGlue());\r\n add(Box.createVerticalGlue());\r\n setVisible(true);\r\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setFont(null);\n\t\tframe.setBackground(new Color(240, 240, 240));\n\t\tframe.setBounds(400, 0, 800, 800);\n\t\t\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tbackground = new ImageIcon(\"image/heroplane.png\");\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btnSp = new JButton(\"single player\");\n\t\tbtnSp.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew ChoseHero();\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnSp.setBackground(Color.LIGHT_GRAY);\n\t\tbtnSp.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 30));\n\t\tbtnSp.setBounds(280, 507, 240, 60);\n\t\tframe.getContentPane().add(btnSp);\n\t\t\n\t\tJButton btnDp = new JButton(\"Double players\");\n\t\tbtnDp.setBackground(Color.LIGHT_GRAY);\n\t\tbtnDp.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnDp.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 30));\n\t\tbtnDp.setBounds(280, 580, 240, 60);\n\t\tframe.getContentPane().add(btnDp);\n\n\t\tJLabel lblNewLabel = new JLabel(background);\n\t\tlblNewLabel.setBounds(0, 0,786, 763);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t}", "public NewJFrame() {\n initComponents();\n \n jl=new JLabel[4][4];\n values=new int[4][4];\n rd=new Random();\n score_user=0;\n this.setTitle(\"2048\");\n this.assign_respective_labels();\n btnLeft.setFocusable(false);\n btnRight.setFocusable(false);\n btnUP.setFocusable(false);\n btnDown.setFocusable(false);\n c0=new Color(240, 240, 240);\n c2=new Color(240, 225, 235);\n c4=new Color(224, 217, 205);\n c8=new Color(173, 109, 77);\n c16=new Color(211,148,69);\n c32=new Color(142,70,90);\n c64=new Color(199,78,56);\n c128=new Color(79,153,234);\n c256=new Color(235,154,87);\n c512=new Color(247,197,43);\n c1024=new Color(247,157,43);\n c2048=new Color(239,183,101);\n score.requestFocus();\n \n for(int i=0;i<values.length;++i)\n {\n for(int j=0;j<values[i].length;++j)\n {\n //jl[i][j].setText(\"0\");\n jl[i][j].setOpaque(true);\n values[i][j]=0;\n }\n }\n \n // this.store_values_from_label();\n this.generating_new_number();\n this.show_values_into_labels();\n \n \n \n }", "private void createGUI() {\n\t\tframe = new JFrame();\n\t\tframe.setTitle(\"My first player\");\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.getContentPane().setBackground(Color.PINK);\n\t\tbtnPlay.setFont(new Font(\"FreeSerif\", Font.BOLD, 16));\n\t\tbtnPlay.setBounds(27, 80, 107, 22);\n\t\tbtnPlay.setEnabled(false);\n\t\tbtnStop.setFont(new Font(\"FreeSerif\", Font.BOLD, 16));\n\t\tbtnStop.setBounds(321, 79, 117, 25);\n\t\tbtnStop.setEnabled(false);\n\t\tbtnPause.setFont(new Font(\"FreeSerif\", Font.BOLD, 16));\n\t\tbtnPause.setBounds(170, 79, 117, 25);\n\t\tbtnPause.setEnabled(false);\n\t\tbtnOpen.setFont(new Font(\"FreeSerif\", Font.BOLD, 16));\n\t\tbtnOpen.setBounds(113, 43, 249, 25);\n\t\tlblMyMusic.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblMyMusic.setForeground(new Color(51, 51, 51));\n\t\tlblMyMusic.setFont(new Font(\"FreeSerif\", Font.BOLD, 20));\n\t\tlblMyMusic.setBounds(101, 174, 261, 57);\n\n\t}", "public void addButtons(){\n\t\t//play button\n\t\tplayButton.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tplayButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tGamePlay play = new GamePlay(1,null);\n\t\t\t\ttimer = new Timer(1000/60, play);\n\t\t\t\ttimer.start();\n\t\t\t\tviewFrame(false);\n\t\t\t}\n\t\t});\n\n\t\t//logout button\n\t\tlogoutButton.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tlogoutButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tDrawLogin loginMenu = DrawLogin.getInstance();\n\t\t\t\tloginMenu.viewFrame(true);\n\t\t\t\tviewFrame(false);\n\t\t\t}\n\t\t});\n\n\t\t//load button\n\t\tloadButton.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tloadButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString result = null;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tFile[] files;\n\t\t\t\t\t//Show user's loaded games\n\t\t\t\t\tList<String> results = new ArrayList<String>();\n\t\t\t\t\tif((new File(\"save/\" + Login.getUser().getUsername()).exists())){\n\t\t\t\t\t\tfiles = new File(\"save/\" + Login.getUser().getUsername()).listFiles();\n\n\t\t\t\t\t\t//If this pathname does not denote a directory, then listFiles() returns null. \n\n\t\t\t\t\t\tfor (File file : files) {\n\t\t\t\t\t\t\tif (file.isFile()) {\n\t\t\t\t\t\t\t\tresults.add(file.getName());\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\telse{\n\t\t\t\t\t\tresults.add(\" \");\n\t\t\t\t\t}\n\t\t\t\t\tif (EventQueue.isDispatchThread()) {\n\t\t\t\t\t\tJPanel panel = new JPanel();\n\t\t\t\t\t\tpanel.add(new JLabel(\"Please make a selection:\"));\n\t\t\t\t\t\tDefaultComboBoxModel model = new DefaultComboBoxModel();\n\t\t\t\t\t\tfor (String temp : results) {\n\t\t\t\t\t\t\tmodel.addElement(temp);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tJComboBox comboBox = new JComboBox(model);\n\t\t\t\t\t\tpanel.add(comboBox);\n\n\t\t\t\t\t\tint iResult = JOptionPane.showConfirmDialog(null, panel, \"Flavor\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);\n\t\t\t\t\t\tswitch (iResult) {\n\t\t\t\t\t\tcase JOptionPane.OK_OPTION:\n\t\t\t\t\t\t\tresult = (String) comboBox.getSelectedItem();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif((new File(\"save/\" + Login.getUser().getUsername()).exists())){\n\t\t\t\t\t\tFileInputStream fileIn = new FileInputStream(\"save/\" + Login.getUser().getUsername() + \"/\" + result);\n\t\t\t\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\t\t\t\tgame = (Map) in.readObject();\n\t\t\t\t\t\tin.close();\n\t\t\t\t\t\tfileIn.close();\n\t\t\t\t\t}\n\t\t\t\t}catch(IOException i)\n\t\t\t\t{\n\t\t\t\t\ti.printStackTrace();\n\t\t\t\t\treturn;\n\t\t\t\t}catch(ClassNotFoundException c)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"map class not found\");\n\t\t\t\t\tc.printStackTrace();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(\"Load Game\");\n\t\t\t\tviewFrame(false);\n\t\t\t\tGamePlay play = new GamePlay(0, game);\n\t\t\t\ttimer = new Timer(1000/60, play);\n\t\t\t\ttimer.start();\n\t\t\t\tviewFrame(false);\n\t\t\t}\n\t\t});\n\n\n\t\t//modify button\n\t\tmodifyButton.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmodifyButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tModifyAccount md = new ModifyAccount();\n\t\t\t\tviewFrame(false);\n\t\t\t}\n\t\t});\n\n\t\t//leaderboard button\n\t\tleaderButton.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tleaderButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//Display leaderboard\n\t\t\t\ttry {\n\t\t\t\t\tLeaderboard lb = new Leaderboard();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t}\n\t\t\t\tviewFrame(false);\n\t\t\t\tSystem.out.println(\"View Leaderboards\");\n\t\t\t}\n\t\t});\n\n\t\tselectButton.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tselectButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tviewFrame(false);\n\t\t\t\ttry {\n\t\t\t\t\tls = new LevelSelect();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setBackground(SystemColor.menu);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setBounds(100, 100, 1625, 875);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setExtendedState(frame.getExtendedState() | JFrame.MAXIMIZED_BOTH);\r\n\t\t\r\n\t\tJLabel lblWelcomeToAlgonquin = new JLabel(\"Welcome to Algonquin College\");\r\n\t\tlblWelcomeToAlgonquin.setFont(new Font(\"Times New Roman\", Font.BOLD, 22));\r\n\t\tlblWelcomeToAlgonquin.setBounds(246, 35, 325, 33);\r\n\t\tframe.getContentPane().add(lblWelcomeToAlgonquin);\r\n\t\t\r\n\t\tJButton btnAddTimetable = new JButton(\"Add Timetable\");\r\n\t\tbtnAddTimetable.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tAddTimetable add = new AddTimetable();\r\n\t\t\t\tadd.main(null);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAddTimetable.setBounds(337, 128, 153, 43);\r\n\t\tframe.getContentPane().add(btnAddTimetable);\r\n\t\t\r\n\t\tJButton btnNewButton = new JButton(\"Put a Notice\");\r\n\t\tbtnNewButton.setBounds(337, 250, 153, 43);\r\n\t\tframe.getContentPane().add(btnNewButton);\r\n\t\t\r\n\t\tJButton btnNewButton_1 = new JButton(\"Find a Room\");\r\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tjava.awt.Desktop.getDesktop().browse(java.net.URI.create(\"http://lyceum.algonquincollege.com/roomfinder/\"));\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_1.setBounds(337, 362, 153, 43);\r\n\t\tframe.getContentPane().add(btnNewButton_1);\r\n\t\t\r\n\t}", "private void setupComponents() {\n\t\tframe.setLayout(null);\r\n\r\n\t\t\r\n\t\t\r\n\t\t// Add label for title ..\r\n\t\tJLabel titleField = new JLabel();\r\n\t\ttitleField.setBounds(50, 10, 300, 30);// x, y, width, height - (pixels)\r\n\t\ttitleField.setText(\"Simple Swing Application\");\r\n\t\ttitleField.setFont(new Font(\"Arial\", Font.BOLD, 24));\r\n\t\ttitleField.setForeground(Color.red);\r\n\t\ttitleField.setVisible(true);\r\n\t\tframe.add(titleField);\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Add label for output message ..\r\n\t\tJLabel textField = new JLabel();\r\n\t\ttextField.setBounds(50, 200, 300, 30);\r\n\t\ttextField.setVisible(true);\r\n\t\tframe.add(textField);\r\n\r\n\t\t// Add a YES button ..\r\n\t\tJButton yesButton = new JButton(\"Yes\");\r\n\t\tyesButton.setBounds(50, 150, 90, 30);\r\n\t\tyesButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// When clicked, set lower label text ..\r\n\t\t\t\ttextField.setText(((JButton) e.getSource()).getText() + \" button was clicked.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.add(yesButton);\r\n\r\n\t\t// Add a NO button ..\r\n\t\tJButton noButton = new JButton(\"No\");\r\n\t\tnoButton.setBounds(150, 150, 90, 30);\r\n\t\tnoButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// When clicked, set lower label text ..\r\n\t\t\t\ttextField.setText(((JButton) e.getSource()).getText() + \" button was clicked.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.add(noButton);\r\n\t\t\r\n\t\t\r\n\r\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame(\"药师\");\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"药师:\");\r\n\t\tlblNewLabel.setBounds(0, 0, 169, 21);\r\n\t\tframe.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"病人: \"+\" ID:\");\r\n\t\tlblNewLabel_1.setBounds(0, 27, 292, 21);\r\n\t\tframe.getContentPane().add(lblNewLabel_1);\r\n\t\t\r\n\t\tJTextPane textPane = new JTextPane();\r\n\t\ttextPane.setBounds(10, 60, 282, 156);\r\n\t\tframe.getContentPane().add(textPane);\r\n\t\t\r\n\t\tJButton btnNewButton_1 = new JButton(\"完成\");\r\n\t\tbtnNewButton_1.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\tframe.dispose();\r\n\t\t\t\tPharmacyUI.PharmacistUI_1.main(null);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_1.setBounds(307, 144, 106, 29);\r\n\t\tframe.getContentPane().add(btnNewButton_1);\r\n\t\t\r\n\t\tJButton btnNewButton = new JButton(\"下一个\");\r\n\t\tbtnNewButton.setBounds(307, 187, 106, 29);\r\n\t\tframe.getContentPane().add(btnNewButton);\r\n\t}", "public void initComponents() {\n \tgetContentPane().removeAll();\n\t\tgetContentPane().invalidate();\n\t\tJPanel topPanel = new JPanel();\n\t //topPanel.setLayout(new BorderLayout());\n\t getContentPane().add(topPanel);\n\n\t if(user.getpHealth() <= 0){\n\t \t\n\t\t\t// OK button closes the dialog\n\t\t\t//YahtzeeTest.incrementCount();\n\t\t\tJLabel text = new JLabel(\"You Lost!\",SwingConstants.CENTER);\n\t\t\ttext.setPreferredSize(new Dimension(1100, 800));\n\t\t\t\n\t\t\t//JButton ok = new JButton(\"OK\");\n\t\t\t//ok.addActionListener(event -> setVisible(false));\n\t\t\t\n\t\t\t// add OK button to southern border\n\t\t\tJPanel buttonPanel = new JPanel();\n\t\t\t\n\t\t\tbuttonPanel.add(text);\n\t\t\t//buttonPanel.add(ok);\n\t\t\tsetContentPane(buttonPanel);\n\t\t\tpack();\n\t\t\trepaint();\n\t\t\t\n\t\t\t\n\t\t\t// ScorePanel\n\t\t\t//scorePanel = new JPanel();\n\t\t\t\n\t } else {\n\t int round = YahtzeeTest.getRound();\n\t\tif(round == 1){\n\t\t\tenemy = new ImageIcon(\"New Piskel (2).png\");\n\t\t} else if(round == 2) {\n\t\t\tenemy = new ImageIcon(\"Strong Yahtzee P (1).png\");\n\t\t} else if(round == 3) {\n\t\t\tenemy = new ImageIcon(\"Panzer.png\");\n\t\t} else if(round == 4) {\n\t\t\tenemy = new ImageIcon(\"Party Leader.png\");\n\t\t} else if(round == 5) {\n\t\t\tenemy = new ImageIcon(\"Japan Soldier.png\");\n\t\t} else if(round == 6) {\n\t\t\tenemy = new ImageIcon(\"Strong Japan Soldier.png\");\n\t\t} else if(round == 7) {\n\t\t\tenemy = new ImageIcon(\"Zero.png\");\n\t\t} else {\n\t\t\tenemy = new ImageIcon(\"Emperor.png\");\n\t\t}\n\t\t\n\t\tsaveGamebutton.setIcon(USFlag);\n\t\tif(YahtzeeTest.getRound() <= 4){\n\t\t\tlaunchBattle.setIcon(YahtzeePartyFlag);\n\t\t} else {\n\t\t\tlaunchBattle.setIcon(KamaFlag);\n\t\t}\n \t\n jPanel1 = new JPanel(){\n \tpublic void paintComponent(Graphics g){\n \t\tg.drawImage(map.getImage(), 0, 0, this.getWidth(), this.getHeight(), null);\n \t\tg.drawImage(player.getImage(), x, y, 160, 160, null);\n \t\tg.drawImage(enemy.getImage(), 300, 50, 160, 160, null);\n \t}\n };\n \t\n \t\n\n setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\n GroupLayout jPanel1Layout = new GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGap(0, 493, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGap(0, 314, Short.MAX_VALUE)\n );\n \n if(YahtzeeTest.getCount() >= 2){\n \tupdateHealth();\n \thand.sortHand();\n }\n \n if(aiList.get(YahtzeeTest.getRound()-1).getHealth() <= 0 ){\n \trollDice.setText(\"Start Battle\");\n } else if(YahtzeeTest.getCount() >= 2){\n \tYahtzeeTest.setReset(true);\n \t\n \trollDice.setText(\"Start New Hand\");\n \t//YahtzeeTest.resetCount();\n }\n else{\n \tYahtzeeTest.setReset(false);\n \trollDice.setText(\"Roll Dice\");\n }\n \n\n playerHealth.setText(\"<html><div style='text-align: center;'>Player Health<br>\"+ Integer.toString(user.getpHealth())+ \"</div></html\");\n //playerHealth.setColumns(20);\n //playerHealth.setRows(5);\n jScrollPane1.setViewportView(playerHealth);\n\n aiScore.setText(\"<html><div style='text-align: center;'>Enemy Score<br>\"+ Integer.toString(aiList.get(YahtzeeTest.getRound()-1).getTotalDice())+ \"</div></html\");\n //aiScore.setColumns(20);\n //aiScore.setRows(5);\n jScrollPane2.setViewportView(aiScore);\n\n aiHealth2.setText(\"<html><div style='text-align: center;'>Players Score<br>\"+ Integer.toString(hand.getMaxScore())+ \"</div></html\");\n //aiHealth2.setColumns(20);\n //aiHealth2.setRows(5);\n jScrollPane4.setViewportView(aiHealth2);\n\n\n //enemyHealthButton();\n //System.out.println(\"enemy button called\");\n \n //aiHealth.setColumns(20);\n //aiHealth.setRows(5);\n aiHealth.setText(\"<html><div style='text-align: center;'>Enemy Health<br>\"+ Integer.toString(aiList.get(YahtzeeTest.getRound()-1).getHealth())+ \"</div></html\");\n jScrollPane5.setViewportView(aiHealth);\n\n scoreTobeat.setColumns(20);\n scoreTobeat.setRows(5);\n jScrollPane6.setViewportView(scoreTobeat);\n \n \n \n dice = new DisplayDice(hand);\n ArrayList<JToggleButton> dButtons = dice.getDiceArray();\n \n //for(JToggleButton die : diceButtons):\n \n //JToggleButton tempButton = new JToggleButton(\"Hello\");\n //jToggleButton1 = tempButton;\n jToggleButton1 = dButtons.get(0); \n \n jToggleButton2 = dButtons.get(1); \n jToggleButton3 = dButtons.get(2); \n jToggleButton4 = dButtons.get(3); \n jToggleButton5 = dButtons.get(4); \n \n\n //saveGamebutton.setText(\"Save Game\");\n\n //messageCenter.setColumns(20);\n //messageCenter.setRows(5);\n messageCenter.setText(YahtzeeTest.getMessageText(hand));\n jScrollPane7.setViewportView(messageCenter);\n\n //launchBattle.setText(\"Launch Battle\");\n\n GroupLayout layout = new GroupLayout(getContentPane());\n \n \n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane1)\n .addComponent(rollDice, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jToggleButton1, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jToggleButton2, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jToggleButton3, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jToggleButton4, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jToggleButton5, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE))\n .addComponent(jScrollPane7))))\n .addGap(0, 2, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(saveGamebutton, GroupLayout.PREFERRED_SIZE, 167, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(launchBattle, GroupLayout.PREFERRED_SIZE, 167, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(3, 3, 3)\n .addComponent(jScrollPane4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(jScrollPane2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addGap(52, 52, 52))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(53, 53, 53)\n .addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(65, 65, 65)\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(saveGamebutton, GroupLayout.PREFERRED_SIZE, 73, GroupLayout.PREFERRED_SIZE)\n .addComponent(launchBattle, GroupLayout.PREFERRED_SIZE, 73, GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane7, GroupLayout.PREFERRED_SIZE, 86, GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(jToggleButton1, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addComponent(jToggleButton2, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addComponent(jToggleButton3, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addComponent(jToggleButton4, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addComponent(jToggleButton5, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)\n .addComponent(rollDice, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane6))))\n .addGap(6, 6, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n \n if(aiList.get(YahtzeeTest.getRound()-1).getHealth() > 0 && YahtzeeTest.getCount() >= 2){\n \taiList.get(YahtzeeTest.getRound()-1).rollDice();\n \tYahtzeeTest.resetCount();\n }\n\n getContentPane().revalidate();\n pack();\n\t }\n \n // new !!\n //setVisible(true);\n //setLocationRelativeTo(null);\n }", "private void setupHelpButton() {\n\t\tImageIcon help_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"help.png\");\n\t\tJButton help_button = new JButton(\"\",help_button_image);\n\t\thelp_button.setBorderPainted(false);\n\t\thelp_button.setBounds(1216, 24, 100, 100);\n\t\thelp_button.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tHelp help_frame=new Help(PanelID.Quiz);\n\t\t\t\thelp_frame.setVisible(true);\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\thelp_button.addMouseListener(new VoxMouseAdapter(help_button,null));\n\t\tadd(help_button);\n\t}", "private void initializeFeatures() {\n\t\tint buttonLength = 2*super.getXLength()/3;\n\t\tint buttonHeight = super.getYLength()/6;\n\t\tint startX = super.getXPos() + super.getXLength()/2 - buttonLength/2; \n\t\tint startY = super.getYPos() + super.getYLength()/2 - buttonHeight/2;\n\t\tint spacingBetweenButtons = 10; \n\t\tstart = new StartButton(parent,startX,startY,buttonLength,buttonHeight);\n\t\tinstructions = new InstructionsButton(parent,startX,startY + spacingBetweenButtons+buttonHeight,buttonLength,buttonHeight);\n\t\tquit = new QuitButton(parent,startX,startY + 2*(buttonHeight + spacingBetweenButtons),buttonLength,buttonHeight);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabelQuest2Title = new javax.swing.JLabel();\n jLabelQuest2Ln = new javax.swing.JLabel();\n jButtonHuman = new javax.swing.JButton();\n jButtonTree = new javax.swing.JButton();\n jButtonSun = new javax.swing.JButton();\n jButtonCandle = new javax.swing.JButton();\n jLabelTimerTitle = new javax.swing.JLabel();\n jLabelTimer = new javax.swing.JLabel();\n jLabelBackground = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setMinimumSize(new java.awt.Dimension(797, 520));\n setPreferredSize(new java.awt.Dimension(797, 520));\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n getContentPane().setLayout(null);\n\n jLabelQuest2Title.setFont(new java.awt.Font(\"OCR A Extended\", 0, 18)); // NOI18N\n jLabelQuest2Title.setForeground(new java.awt.Color(255, 255, 255));\n jLabelQuest2Title.setText(\"Riddle 2:\");\n getContentPane().add(jLabelQuest2Title);\n jLabelQuest2Title.setBounds(40, 40, 120, 30);\n\n jLabelQuest2Ln.setFont(new java.awt.Font(\"OCR A Extended\", 0, 14)); // NOI18N\n jLabelQuest2Ln.setForeground(new java.awt.Color(255, 255, 255));\n jLabelQuest2Ln.setText(\"I am tall when I am young, and I am short when I am old. What am I?\");\n getContentPane().add(jLabelQuest2Ln);\n jLabelQuest2Ln.setBounds(50, 75, 650, 20);\n\n jButtonHuman.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\Valeria Aybar\\\\Documents\\\\NetBeansProjects\\\\FinalProject\\\\Human resized.png\")); // NOI18N\n jButtonHuman.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButtonHumanMouseClicked(evt);\n }\n });\n getContentPane().add(jButtonHuman);\n jButtonHuman.setBounds(130, 120, 210, 170);\n\n jButtonTree.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\Valeria Aybar\\\\Documents\\\\NetBeansProjects\\\\FinalProject\\\\Tree resized.png\")); // NOI18N\n jButtonTree.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButtonTreeMouseClicked(evt);\n }\n });\n getContentPane().add(jButtonTree);\n jButtonTree.setBounds(440, 120, 220, 170);\n\n jButtonSun.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\Valeria Aybar\\\\Documents\\\\NetBeansProjects\\\\FinalProject\\\\Sun Resized.png\")); // NOI18N\n jButtonSun.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButtonSunMouseClicked(evt);\n }\n });\n getContentPane().add(jButtonSun);\n jButtonSun.setBounds(130, 300, 210, 180);\n\n jButtonCandle.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\Valeria Aybar\\\\Documents\\\\NetBeansProjects\\\\FinalProject\\\\Candle Resized.png\")); // NOI18N\n jButtonCandle.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButtonCandleMouseClicked(evt);\n }\n });\n jButtonCandle.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonCandleActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonCandle);\n jButtonCandle.setBounds(440, 300, 220, 180);\n\n jLabelTimerTitle.setFont(new java.awt.Font(\"OCR A Extended\", 0, 13)); // NOI18N\n jLabelTimerTitle.setForeground(new java.awt.Color(255, 255, 255));\n jLabelTimerTitle.setText(\"Timer:\");\n getContentPane().add(jLabelTimerTitle);\n jLabelTimerTitle.setBounds(390, 20, 50, 40);\n\n jLabelTimer.setFont(new java.awt.Font(\"OCR A Extended\", 0, 13)); // NOI18N\n jLabelTimer.setForeground(new java.awt.Color(255, 255, 255));\n getContentPane().add(jLabelTimer);\n jLabelTimer.setBounds(450, 10, 120, 60);\n\n jLabelBackground.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\Valeria Aybar\\\\Documents\\\\NetBeansProjects\\\\FinalProject\\\\Grey Background.jpg\")); // NOI18N\n getContentPane().add(jLabelBackground);\n jLabelBackground.setBounds(0, -10, 840, 550);\n\n pack();\n setLocationRelativeTo(null);\n }", "public GamePanel (int difficulty, ScarletGemMain source)\n {\n timer = new GameTimer (difficulty, timeLabel, this, source);\n timer.start ();\n a=new JButton (\"A\");\n b=new JButton (\"B\");\n c=new JButton (\"C\");\n d=new JButton (\"D\");\n questionLabel=new JLabel();\n \n setLayout(null);\n a.setBounds(380,220,a.getPreferredSize().height+20,a.getPreferredSize().width);\n b.setBounds(500,220,b.getPreferredSize().height+20,b.getPreferredSize().width);\n c.setBounds(308,320,c.getPreferredSize().height+20,c.getPreferredSize().width);\n d.setBounds(500,320,d.getPreferredSize().height+20,d.getPreferredSize().width);\n questionLabel.setBounds(380,100,600,100);\n pauseButton.setBounds (450,50,pauseButton.getPreferredSize().width, pauseButton.getPreferredSize().height);\n \n mapImageLabel.setIcon(new ImageIcon(\"pics/map.jpg\"));\n mapImageLabel.setBounds(200,170,500,280);\n mapImageLabel.setVisible(false);\n \n feedbackLabel.setBounds(250,450,200,30);\n pauseButton.setBounds(550,10,90,30);\n levelCounter.setBounds(50,50,450,30);\n questionCounter.setBounds(400,50,90,30);\n \n feedbackLabel.setVisible(false);\n \n add(feedbackLabel);\n add(mapImageLabel);\n add(a);\n add(b);\n add(c);\n add(d);\n add(questionLabel);\n add(pauseButton);\n add(questionCounter);\n add(levelCounter);\n revalidate ();\n }", "Hotel_GUI() throws IOException {\r\n \tsetLayout(new BorderLayout()); \r\n \t\r\n \tinitialize();\r\n \r\n for(int i=0; i<12; i++){\r\n \tfor(int j=0; j<15; j++){\r\n \t\thelp_square[i][j].setLabel(help_square[i][j].getType());\r\n \t\tboard_panel.add(help_square[i][j]);\r\n \t}\r\n }\r\n \t\r\n \tfinal JPanel toolBar = new JPanel(new FlowLayout(FlowLayout.LEFT));\r\n \t\r\n \tcreateCards();\r\n \tfor(int i=0; i<hotelNumber; i++){\r\n \t\tsetPopUp(i);\r\n \t}\r\n \t\r\n \t\r\n\t\tfinal JPopupMenu popup1 = new JPopupMenu();\r\n\t popup1.add(new JMenuItem(new AbstractAction(\"Start\") {\r\n\t /**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t \tpopupCards.removeAll();\t \t\t\r\n\t \thotelItems.clear();\r\n\t \t\r\n\t \tbutton2.setEnabled(true);\r\n\t\t\t button3.setEnabled(true);\r\n\t\t\t button4.setEnabled(true);\r\n\t\t\t button5.setEnabled(true);\r\n\t\t\t button6.setEnabled(true);\r\n\t\t\t button7.setEnabled(true);\r\n\t\t\t button8.setEnabled(true);\r\n\t \t\r\n\t\t\t myGame = null;\r\n\t \tmyGame = new NewGame(board_panel, help_square);\r\n\t \tmyGame.initialization();\r\n\t \ttry {\r\n\t\t\t\t\t\tcreateCards();\r\n\t\t\t\t\t} catch (FileNotFoundException e1) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t \tfor(int i=0; i<hotelNumber; i++){\r\n\t \t\tsetPopUp(i);\r\n\t \t}\r\n\t \t\r\n\t \tfor(int i=0; i<3; i++){\r\n\t \t\tsetProfitsPopUp(i);\r\n\t \t\tsetEntrancesPopUp(i);\r\n\t \t}\r\n\t \tgameStarted = true;\r\n\t \tmyGame.new_game();\r\n\t }\r\n\t \t\t }));\r\n\t popup1.add(new JMenuItem(new AbstractAction(\"Stop\") {\r\n\t /**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t t.stop();\r\n\t button2.setEnabled(false);\r\n\t\t\t button3.setEnabled(false);\r\n\t\t\t button4.setEnabled(false);\r\n\t\t\t button5.setEnabled(false);\r\n\t\t\t button6.setEnabled(false);\r\n\t\t\t button7.setEnabled(false);\r\n\t\t\t button8.setEnabled(false);\r\n\t }\r\n\t }));\r\n\t popup1.add(popupCards);\r\n\t popup1.add(new JMenuItem(new AbstractAction(\"Exit\") {\r\n\t /**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t System.exit(0);\r\n\t }\r\n\t }));\r\n\t final JButton button1 = new JButton(\"Game\");\r\n\t button1.addMouseListener(new MouseAdapter() {\r\n\t public void mousePressed(MouseEvent e) {\r\n\t popup1.show(e.getComponent(), e.getX(), e.getY());\r\n\t }\r\n\t });\r\n\t toolBar.add(button1);\r\n\t \r\n\t final JPopupMenu popup2 = new JPopupMenu();\r\n\t popup2.add(gameHotels);\r\n\t popup2.add(playerEntrances);\r\n\t popup2.add(playerProfits);\r\n\t \r\n\t button2 = new JButton(\"Statistics\");\r\n\t button2.addMouseListener(new MouseAdapter() {\r\n\t public void mousePressed(MouseEvent e) {\r\n\t popup2.show(e.getComponent(), e.getX(), e.getY());\r\n\t }\r\n\t });\r\n\t toolBar.add(button2);\r\n \t\r\n\t\tJPanel infos1 = new JPanel(new FlowLayout(FlowLayout.LEFT));\r\n\t\tinfos1.add(new JLabel(\"Player1: \"));\r\n\t\tinfos1.add(p1Money);\r\n\t\tinfos1.add(new JLabel(\" \"));\r\n\t\tinfos1.add(new JLabel(\"Player2: \"));\r\n\t\tinfos1.add(p2Money);\r\n\t\tinfos1.add(new JLabel(\" \"));\r\n\t\tinfos1.add(new JLabel(\"Player3: \"));\r\n\t\tinfos1.add(p3Money);\r\n\t\tJPanel infos2 = new JPanel(new FlowLayout(FlowLayout.RIGHT));\r\n\t\tinfos2.add(new JLabel(\"Available Hotels: \"));\r\n\t\tinfos2.add(hotelAv);\r\n\t\tinfos2.add(new JLabel(\" \"));\r\n\t\tinfos2.add(new JLabel(\"Total Time: \"));\r\n\t\tinfos2.add(timer);\r\n\t\tJPanel infoPanel = new JPanel(new GridLayout(1,2));\r\n\t\tinfoPanel.add(infos1);\r\n\t\tinfoPanel.add(infos2);\r\n\t\tJPanel twoPanels = new JPanel(new GridLayout(2,1));\r\n\t\ttwoPanels.add(toolBar);\r\n\t\ttwoPanels.add(infoPanel);\r\n\t\tadd(twoPanels, BorderLayout.NORTH);\r\n\t\t\r\n\t\t\r\n\t\tbutton3 = new JButton(\"Roll dice & result\");\r\n\t\tbutton3.addActionListener(this);\r\n button4 = new JButton(\"Request building & result\");\r\n button4.addActionListener(this);\r\n button5 = new JButton(\"Buy hotel\");\r\n button5.addActionListener(this);\r\n button6 = new JButton(\"Buy entrance\");\r\n button6.addActionListener(this);\r\n button7 = new JButton(\"Request +1000 from bank\");\r\n button7.addActionListener(this);\r\n button8 = new JButton(\"Finish round\");\r\n button8.addActionListener(this);\r\n \r\n final JPanel options = new JPanel(new GridLayout(6,1));\r\n options.add(button3);\r\n options.add(button4);\r\n options.add(button5);\r\n options.add(button6);\r\n options.add(button7);\r\n options.add(button8);\r\n add(options, BorderLayout.EAST);\r\n \r\n add(board_panel, BorderLayout.CENTER);\r\n \r\n \r\n \r\n \r\n }", "private void setupUI() {\r\n\t\tWindow.setTitle(\"Battle\");\r\n\r\n\t\tVerticalPanel panel = new VerticalPanel();\r\n\t\tpanel.addStyleName(NAME);\r\n\t\tinitWidget(panel);\r\n\t\t\r\n\t\tlabelTitle = new Label(\"Battle\");\r\n\t\tlabelTitle.addStyleName(Styles.page_title);\r\n\t\tpanel.add(labelTitle);\r\n\t\t\r\n\t\tLabel instructions = new Label(\"Click to go!\");\r\n\t\tpanel.add(instructions);\r\n\r\n\t\tHorizontalPanel hPanel = new HorizontalPanel();\r\n\t\tpanel.add(hPanel);\r\n\t\t\r\n\t\tCanvas canvas = Canvas.createIfSupported();\r\n\t\thPanel.add(canvas);\r\n\r\n\t\tVerticalPanel vPanelInfo = new VerticalPanel();\r\n\t\thPanel.add(vPanelInfo);\r\n\t\t\r\n\t\tlabelInfo = new Label();\r\n\t\tlabelInfo.addStyleName(Styles.battle_info);\r\n\t\tvPanelInfo.add(labelInfo);\r\n\t\t\r\n\t\tvPanelInfoHistory = new VerticalPanel();\r\n\t\tvPanelInfoHistory.addStyleName(Styles.battle_info_history);\r\n\t\tvPanelInfo.add(vPanelInfoHistory);\r\n\r\n\t\t\r\n\t\tcanvas.setWidth(width + \"px\");\r\n\t\tcanvas.setHeight(height + \"px\");\r\n\t\tcanvas.setCoordinateSpaceWidth(width);\r\n\t\tcanvas.setCoordinateSpaceHeight(height);\r\n\r\n\t\t//Adding handlers seems to create a performance issue in Java\r\n\t\t//mode, but likely not in javascript\r\n\t\tcanvas.addMouseDownHandler(this);\r\n//\t\tcanvas.addMouseUpHandler(this);\r\n//\t\tcanvas.addMouseMoveHandler(this);\r\n\r\n\t\tcontext2d = canvas.getContext2d();\r\n\r\n\t\tlastUpdate = System.currentTimeMillis();\r\n\t\ttimer = new Timer() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tlong now = System.currentTimeMillis();\r\n\t\t\t\tupdate(now - lastUpdate);\r\n\t\t\t\tlastUpdate = now;\r\n\r\n\t\t\t\tdraw();\r\n\t\t\t}\r\n\t\t};\r\n\t\ttimer.scheduleRepeating(1000 / 60);\r\n\t}", "private void initFrame() {\n this.setTitle(\"Burger Shot\");\n this.setIconImage(Resources.getImage(\"/images/gamelogo.png\"));\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setResizable(false);\n this.pack();\n this.setSizeWithoutInsets(FRAME_SIZE);\n this.setLocationRelativeTo(null);\n\n menuPanel = new MenuPanel();\n initPanel(menuPanel, true);\n\n instructionsPanel = new InstructionsPanel();\n initPanel(instructionsPanel, false);\n\n goBackAction = new GoBackToMenu();\n\n menuPanel.addMouseListener(new MouseAdapter() {\n @Override\n //set menu items text to click (play, instructions, exit)\n public void mousePressed(MouseEvent e) {\n Point hitPoint = e.getPoint();\n if (hitPoint.x > 56 && hitPoint.x < 224 && hitPoint.y > 67 && hitPoint.y < 124) {\n gamePanel = new GamePanel();\n initPanel(gamePanel, false);\n gamePanel.addListener(MainFrame.this);\n goBackAction.setPanel(gamePanel);\n goBackAction.setEnabled(false);\n gamePanel.getInputMap(JPanel.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), PRESS_ENTER_TO_GO_BACK);\n gamePanel.getActionMap().put(PRESS_ENTER_TO_GO_BACK, goBackAction);\n swapPanel(menuPanel, gamePanel);\n } else if (hitPoint.x > 198 && hitPoint.x < 666 && hitPoint.y > 437 && hitPoint.y < 480) {\n goBackAction.setPanel(instructionsPanel);\n instructionsPanel.getInputMap(JPanel.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), PRESS_ENTER_TO_GO_BACK);\n instructionsPanel.getActionMap().put(PRESS_ENTER_TO_GO_BACK, goBackAction);\n swapPanel(menuPanel, instructionsPanel);\n } else if (hitPoint.x > 594 && hitPoint.x < 748 && hitPoint.y > 70 && hitPoint.y < 127) {\n System.exit(0);\n }\n }\n });\n }", "public void initSkills(){\n\t\tup = false;\n\t\tdown = false;\n\t\tleft = false;\n\t\tright = false;\n\t\tskillmode = true;\n\t\t\n\t\tskills.setLocation(500,300);\n\t\tskills.setSize(400,300);\n\t\t\t\n\t\tt1 = new JButton(\"Dicker Brecher (benötigt 2 Skillpunkte)\");\n\t\tt1.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tt3 = new JButton(\"Kanten-Paule (benötigt 4 Skillpunkte und Dicker Brecher)\");\n\t\tt3.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tt2 = new JButton(\"Brutaler Prügelknabe (benötigt 2 Skillpunkte)\");\n\t\tt2.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 20);\n\t\t\t\t\tplayer.setSkillStrength1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\t\n\t\t});\n\t\t\n\t\tt4 = new JButton(\"Mega-Mörder brutaler Prügelknabe (benötigt 4 Skillpunkte und Brutaler Prügelknabe)\");\n\t\tt4.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 30);\n\t\t\t\t\tplayer.setSkillStrength2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tt5 = new JButton(\"Ich will nix - danke\");\n\t\tt5.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tskills.setLayout(new GridLayout(3,2));\n\t\tskills.add(t1);\n\t\tskills.add(t2);\n\t\tskills.add(t3);\n\t\tskills.add(t4);\n\t\tskills.add(t5);\n\t\n\t\tif(player.hasSkillHealth1()){\n\t\t\tt1.setEnabled(false);\n\t\t\tt3.setEnabled(true);\n\t\t}else{\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillHealth2()){\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength1()){\n\t\t\tt2.setEnabled(false);\n\t\t\tt4.setEnabled(true);\n\t\t}else{\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength2()){\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\t\n\t\tskills.pack();\n\t\t\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 600, 600);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblStaffModify = new JLabel(\"Staff Modify\");\n\t\tlblStaffModify.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 22));\n\t\tlblStaffModify.setBounds(243, 20, 118, 23);\n\t\tframe.getContentPane().add(lblStaffModify);\n\t\t\n\t\tJLabel lblAdd = new JLabel(\"Add\");\n\t\tlblAdd.setForeground(Color.RED);\n\t\tlblAdd.setFont(new Font(\"Times New Roman\", Font.PLAIN, 20));\n\t\tlblAdd.setBounds(10, 76, 76, 38);\n\t\tframe.getContentPane().add(lblAdd);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Delete\");\n\t\tlblNewLabel.setFont(new Font(\"Times New Roman\", Font.PLAIN, 20));\n\t\tlblNewLabel.setForeground(Color.RED);\n\t\tlblNewLabel.setBounds(10, 164, 62, 23);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Modify\");\n\t\tlblNewLabel_1.setFont(new Font(\"Times New Roman\", Font.PLAIN, 20));\n\t\tlblNewLabel_1.setForeground(Color.RED);\n\t\tlblNewLabel_1.setBounds(10, 218, 62, 24);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t\t\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Movie\");\n\t\tbtnNewButton.setBounds(110, 68, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tSixth_AddMovie addmovie=new Sixth_AddMovie();\n\t\t\t\t\taddmovie.main(null);\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnNewButton_1 = new JButton(\"Person\");\n\t\tbtnNewButton_1.setBounds(233, 68, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_1);\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\t\tSixth_AddPerson addperson=new Sixth_AddPerson();\n\t\t\t\t\taddperson.main(null);\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnNewButton_2 = new JButton(\"Delete\");\n\t\tbtnNewButton_2.setBounds(110, 166, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_2);\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\t\tFifth_Delete delete=new Fifth_Delete();\n\t\t\t\t\tdelete.main(null);\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnNewButton_3 = new JButton(\"Modify\");\n\t\tbtnNewButton_3.setBounds(110, 221, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_3);\n\t\tbtnNewButton_3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\t\tFifth_Modify modify=new Fifth_Modify();\n\t\t\t\t\tmodify.main(null);\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnBack = new JButton(\"Back\");\n\t\tbtnBack.setBounds(0, 0, 93, 23);\n\t\tframe.getContentPane().add(btnBack);\n\t\t\n\t\tbtnBack.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(First.v==1){\n\t\t\t\t\tThird_Member member=new Third_Member();\n\t\t\t\t\tmember.main(null);\n\t\t\t\t\tframe.dispose();\n\t\t\t\t}\n\t\t\t\tif(First.v==2){\n\t\t\t\t\tThird_Staff staff=new Third_Staff();\n\t\t\t\t staff.main(null);\n\t\t\t\t frame.dispose();}\n\t\t\t\n\t\t}\n\t\t});\n\t\t\n\t\tJButton btnNewButton_5 = new JButton(\"Room\");\n\t\tbtnNewButton_5.setBounds(362, 68, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_5);\n\t\t\n\t\tbtnNewButton_5.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tSixth_AddRoom addRoom=new Sixth_AddRoom();\n\t\t\t\taddRoom.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnShowing = new JButton(\"Showing\");\n\t\tbtnShowing.setBounds(481, 68, 93, 23);\n\t\tframe.getContentPane().add(btnShowing);\n\t\tbtnShowing.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tSixth_AddShowing addShowing=new Sixth_AddShowing();\n\t\t\t\taddShowing.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnNewButton_4 = new JButton(\"Direct\");\n\t\tbtnNewButton_4.setBounds(110, 111, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_4);\n\t\tbtnNewButton_4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tAddDirect addDirect=new AddDirect();\n\t\t\t\taddDirect.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnNewButton_6 = new JButton(\"Write\");\n\t\tbtnNewButton_6.setBounds(233, 111, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_6);\n\t\tbtnNewButton_6.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tAddWrite addWrite=new AddWrite();\n\t\t\t\taddWrite.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnNewButton_7 = new JButton(\"Act\");\n\t\tbtnNewButton_7.setBounds(362, 111, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_7);\n\t\tbtnNewButton_7.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tAddAct addAct=new AddAct();\n\t\t\t\taddAct.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\t\n\t}", "public static void main(String[] args)\n {\n int k;\n //create card table\n CardTable myCardTable = new CardTable(\"Card Table\", \n NUM_CARDS_PER_HAND, NUM_PLAYERS);\n myCardTable.setSize(800,600);\n myCardTable.setLocationRelativeTo(null);\n myCardTable.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //show the user everything\n myCardTable.setVisible(true);\n\n //create labels\n //create computerLabels\n for(k = 0; k < computerLabels.length; k++)\n {\n computerLabels[k] = new JLabel(GUICard.getBackCardIcon());\n }\n //create humanLabels\n for(k = 0; k < humanLabels.length; k++)\n {\n Card randCard = generateRandomCard();\n humanLabels[k] = new JLabel(GUICard.getIcon(randCard));\n }\n //create random playedCardLabels\n for(k = 0; k < playedCardLabels.length; k++)\n {\n Card randCard = generateRandomCard();\n playedCardLabels[k] = new JLabel(GUICard.getIcon(randCard));\n }\n //create playLabelText\n playLabelText[0] = new JLabel(\"Computer\", JLabel.CENTER);\n playLabelText[1] = new JLabel(\"You\", JLabel.CENTER);\n\n //add labels to panels\n //computerLabels\n for(k = 0; k < computerLabels.length; k++)\n {\n myCardTable.pnlComputerHand.add(computerLabels[k], \n BorderLayout.SOUTH);\n }\n //humanLabels\n for(k = 0; k < humanLabels.length; k++)\n {\n myCardTable.pnlHumanHand.add(humanLabels[k], \n BorderLayout.SOUTH);\n }\n //playedCardLabels\n for(k = 0; k < playedCardLabels.length; k++)\n {\n myCardTable.pnlPlayArea.add(playedCardLabels[k]);\n }\n //playLabelText\n for(k = 0; k < playedCardLabels.length; k++)\n {\n myCardTable.pnlPlayArea.add(playLabelText[k]);\n }\n\n //show the user everything\n myCardTable.setVisible(true);\n\n //info for CardGameFramework\n int numPacksPerDeck = 1;\n int numJokersPerPack = 0;\n int numUnusedCardsPerPack = 0;\n Card[] unusedCardsPerPack = null;\n\n //instantiate new CardGameFramework\n CardGameFramework newGame = new CardGameFramework(\n numPacksPerDeck, numJokersPerPack, numUnusedCardsPerPack, \n unusedCardsPerPack, NUM_PLAYERS, NUM_CARDS_PER_HAND);\n //deal cards \n if(!newGame.deal())\n {\n JOptionPane.showMessageDialog(myCardTable, \n \"There was an error with dealing\");\n }\n else //get new cards\n {\n //get the first hand dealt to use for player\n Hand newHand = newGame.getHand(0);\n //update JLabels\n for(k = 0; k < NUM_CARDS_PER_HAND; k++)\n {\n humanLabels[k].setIcon(GUICard.getIcon(newHand.inspectCard(k)));\n }\n }\n\n\n }", "public void uiBuilder(){\n fontLoader();\n\n jfFrame = new JFrame(String.format(\"Coronos - %s\", username));\n jfFrame.setLayout(new BorderLayout());\n //Instantiate JFrame, add Title, add LayoutManager GridLayout\n\n\n jmMenuBar = new JMenuBar();\n //Instantiate JMenuBar\n\n jmFile = new JMenu(\"File\");\n jmHelp = new JMenu(\"Help\");\n //Adding Menus to JMenuBar\n\n jmExit = new JMenuItem(\"Exit\");\n jmAbout = new JMenuItem(\"About\");\n //Instantiating Options for JMenus\n\n jmExit.addActionListener(this);\n jmAbout.addActionListener(this);\n\n jmFile.add(jmExit);\n jmHelp.add(jmAbout);\n //adding Options to JMenus\n\n jmMenuBar.add(jmFile);\n jmMenuBar.add(jmHelp);\n //adding JMenus to JMenuBar\n\n jfFrame.setJMenuBar(jmMenuBar);\n //adding JMenuBar to JFrame\n\n jpClockPanel = new JPanel(new FlowLayout());\n jpContainerPanel = new JPanel(new FlowLayout());\n Border blackLine = BorderFactory.createTitledBorder(\"Current Time\");\n jpClockPanel.setBorder(blackLine);\n //instantiate JPanel for clock\n\n clockLabelOne = new JLabel();\n clockLabelOne.setFont(customFont);\n clockLabelOne.setForeground(Color.BLACK);\n jpClockPanel.add(clockLabelOne);\n //instantiating JLabel, setting Font and Color, adding to clockPanel\n\n clockLabelTwo = new JLabel();\n clockLabelTwo.setFont(customFont);\n clockLabelTwo.setForeground(Color.BLACK);\n jpClockPanel.add(clockLabelTwo);\n clockLabelTwo.setVisible(false);\n //instantiating JLabel, setting Font and Color, adding to clockPanel\n\n jpGridPanel1 = new JPanel(new GridLayout(4, 1, 15, 15));\n jpGridPanel2 = new JPanel(new GridLayout(4, 1, 15, 15));\n\n jbPunchIn = new JButton(\"Punch In\");\n jbReport = new JButton(\"View Report\");\n jbProfile = new JButton(\"View Profile\");\n jbSave = new JButton(\"Save\");\n jbPunchOut = new JButton(\"Punch Out\");\n jbViewPunches = new JButton(\"View Punches\");\n jbFormatTime = new JButton(\"12/24HR Time\");\n jbHideChat = new JButton(\"Hide Chat\");\n\n jbHideChat.setToolTipText(\"Hate your co-workers? Want to hide from your boss? Just close chat!\");\n\n jbPunchIn.addActionListener(this);\n jbReport.addActionListener(this);\n jbProfile.addActionListener(this);\n jbSave.addActionListener(this);\n jbPunchOut.addActionListener(this);\n jbViewPunches.addActionListener(this);\n jbFormatTime.addActionListener(this);\n jbHideChat.addActionListener(this);\n\n jpGridPanel1.add(jbPunchIn);\n jpGridPanel1.add(jbReport);\n jpGridPanel1.add(jbProfile);\n jpGridPanel1.add(jbSave);\n\n jpGridPanel2.add(jbPunchOut);\n jpGridPanel2.add(jbViewPunches);\n jpGridPanel2.add(jbFormatTime);\n jpGridPanel2.add(jbHideChat);\n\n jpActionPanel = new JPanel(new FlowLayout());\n Border actionBorder = BorderFactory.createTitledBorder(\"Employee Actions\");\n jpActionPanel.setBorder(actionBorder);\n jpActionPanel.add(jpGridPanel1);\n jpActionPanel.add(jpGridPanel2);\n jpContainerPanel.add(jpActionPanel);\n\n jpChatPanel = new JPanel(new BorderLayout());\n jpAreaPanel = new JPanel(new FlowLayout());\n jtaChatArea = new JTextArea(10, 10);\n jtaChatArea.setLineWrap(true);\n jtaChatArea.setWrapStyleWord(true);\n jtaChatArea.setEditable(false);\n jspChatPane = new JScrollPane(jtaChatArea);\n jtfChatField = new JTextField(12);\n jtfChatField.addActionListener(this);\n jtfChatField.setActionCommand(\"Send\");\n chatButton = new JButton(\"Send\");\n chatButton.addActionListener(this);\n jpSendPanel = new JPanel(new FlowLayout());\n jpSendPanel.add(jtfChatField);\n jpSendPanel.add(chatButton);\n Border chatBorder = BorderFactory.createTitledBorder(\"Chat\");\n jpChatPanel.setBorder(chatBorder);\n jpChatPanel.add(jspChatPane, BorderLayout.NORTH);\n jpChatPanel.add(jpSendPanel, BorderLayout.SOUTH);\n jpContainerPanel.add(jpChatPanel);\n\n // jfFrame.add(clockPanelTwo, BorderLayout.NORTH);\n jfFrame.add(jpClockPanel, BorderLayout.NORTH);\n jfFrame.add(jpContainerPanel, BorderLayout.SOUTH);\n\n //adding JPanels to JFrame\n\n jfFrame.setLocationRelativeTo(null);\n jfFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n jfFrame.setVisible(false);\n jfFrame.pack();\n jfFrame.setSize(600, 375);\n jfFrame.setResizable(false);\n \n //settings for frame\n\n ActionListener clockUpdateOne = new ActionListener(){\n /**\n * actionPerformed: A method to handle Events from a Timer\n * @param ae an ActionEvent\n */\n public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat format = new SimpleDateFormat(\"E, MMM d y HH:mm:ss\");\n //set format of clock\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y KK:mm:ss a\");\n //12 hour time\n\n String dateTime = format.format(date);\n //formatting date object using format template\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelOne.setText(dateTime);\n //setting clock text to formatted String\n }\n };\n clockTimerOne = new javax.swing.Timer(0, clockUpdateOne);\n clockTimerOne.start();\n //timer to update clockLabel\n ActionListener clockUpdateTwo = new ActionListener(){\n /**\n * actionPerformed: A method to handle Events from a Timer\n * @param ae an ActionEvent\n */\n public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y K:mm:ss a\");\n //12 hour time\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelTwo.setText(otherDateTime);\n //setting clock text to formatted String\n }\n };\n clockTimerTwo = new javax.swing.Timer(0, clockUpdateTwo);\n clockTimerTwo.start();\n\n }", "private void makeFrontGUIButtons(){\n Dimension preferred = getPreferredSize();\n\n optionsButton = new JButton();\n makeFrontButton(optionsButton, \"optionsIcon\", \"showOptions\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) (preferred.getHeight() * 0.98), 39, 37));\n makeSearchButton();\n\n zoomInButton = new JButton();\n makeFrontButton(zoomInButton, \"plusIcon\", \"zoomIn\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) preferred.getHeight() / 3 * 2, 39, 37));\n\n zoomOutButton = new JButton();\n makeFrontButton(zoomOutButton, \"minusIcon\", \"zoomOut\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) (preferred.getHeight() / 3 * 2 + 45), 39, 37));\n\n makeShowRoutePanelButton();\n\n fullscreenButton = new JButton();\n makeFrontButton(fullscreenButton, \"fullscreenIcon\", \"fullscreen\", new Rectangle((int) preferred.getWidth() - 60, (int) (preferred.getHeight() - preferred.getHeight() / 3 * 2 + 100), 39, 37));\n\n mapTypeButton = new JButton();\n makeFrontButton(mapTypeButton, \"layerIcon\", \"mapType\", new Rectangle((int) preferred.getWidth() - 49, (int) (preferred.getHeight() - preferred.getHeight() / 3 * 2 - 45), 39, 37));\n makeCloseDirectionListPanel();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n s = new javax.swing.JButton();\n s1 = new javax.swing.JButton();\n s2 = new javax.swing.JButton();\n s3 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Algerian\", 1, 30)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(51, 9, 38));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"HAPPY-TO-GO CABS\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel2.setText(\"HANDMADE BY:\");\n\n jLabel7.setIcon(new javax.swing.ImageIcon(\"E:\\\\L Logo_full.jpeg\")); // NOI18N\n\n s.setBackground(new java.awt.Color(204, 204, 204));\n s.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n s.setText(\"Suvansh Bhargava\");\n s.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sActionPerformed(evt);\n }\n });\n\n s1.setBackground(new java.awt.Color(204, 204, 204));\n s1.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n s1.setText(\"Shrey Bhargava\");\n s1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n s1ActionPerformed(evt);\n }\n });\n\n s2.setBackground(new java.awt.Color(204, 204, 204));\n s2.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n s2.setText(\"Roll no 44\");\n s2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n s2ActionPerformed(evt);\n }\n });\n\n s3.setBackground(new java.awt.Color(204, 204, 204));\n s3.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n s3.setText(\"Roll no 39\");\n s3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n s3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(69, 69, 69)\n .addComponent(jLabel2))\n .addGroup(layout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addComponent(jLabel7))\n .addGroup(layout.createSequentialGroup()\n .addGap(144, 144, 144)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 322, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(s, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(s1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(129, 129, 129)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(s2)\n .addComponent(s3))))))\n .addContainerGap(84, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel2)\n .addGap(17, 17, 17)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(s)\n .addComponent(s2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(s1)\n .addComponent(s3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 366, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(45, 45, 45))\n );\n\n pack();\n }", "private void initComponents(){\n\t\t\n\t\tthis.labelMoneyImage = new JLabel(new ImageIcon(this.getClass().getResource(\"/res/starGold.png\").getPath()));\n\t\tthis.labelMoneyImage.setVisible(true);\n\t\tthis.add(labelMoneyImage);\n\t\tthis.label_score = new JLabel(score);\n\t\tthis.label_score.setFont(new Font(\"Arial\", 0, 30));\n\t\tthis.label_score.setForeground(new Color(222,217,214));\n\t\tthis.add(label_score);\n\t\tthis.labelFlagImage = new JLabel(new ImageIcon(this.getClass().getResource(\"/res/Shop/redflag.png\").getPath()));\n\t\tthis.labelFlagImage.setVisible(true);\n\t\tthis.add(labelFlagImage);\n\t\tthis.label_level = new JLabel(level);\n\t\tthis.label_level.setFont(new Font(\"Arial\", 0, 30));\n\t\tthis.label_level.setForeground(new Color(222,217,214));\n\t\tthis.add(label_level);\n\t\tthis.labelHighestScoreImage = new JLabel(new ImageIcon(this.getClass().getResource(\"/res/Shop/HighestScore.png\").getPath()));\n\t\tthis.labelHighestScoreImage.setVisible(true);\n\t\tthis.add(labelHighestScoreImage);\n\t\tthis.label_highest = new JLabel(highestScore);\n\t\tthis.label_highest.setFont(new Font(\"Arial\", 0, 30));\n\t\tthis.label_highest.setForeground(new Color(222, 217, 214));\n\t\tthis.add(label_highest);\n\t}", "private void configureButtons() {\n\n backToMenu = new JButton(\"Menu\");\n if(isWatching){\n backToMenu.setBounds(575, 270, 100, 50);\n }\n else{\n backToMenu.setBounds(30, 800, 100, 50);\n }\n backToMenu.setFont(new Font(\"Broadway\", Font.PLAIN, 20));\n backToMenu.setBackground(Color.RED);\n backToMenu.setFocusable(false);\n backToMenu.addActionListener(this);\n add(backToMenu);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n correctLbl = new javax.swing.JLabel();\n voiceBtn = new javax.swing.JButton();\n yBtn = new javax.swing.JButton();\n nBtn = new javax.swing.JButton();\n answerBtn4 = new javax.swing.JButton();\n answerBtn3 = new javax.swing.JButton();\n answerBtn2 = new javax.swing.JButton();\n answerBtn1 = new javax.swing.JButton();\n questionLbl = new javax.swing.JLabel();\n icelandLbl = new javax.swing.JLabel();\n backBtn = new javax.swing.JButton();\n jSeparator3 = new javax.swing.JSeparator();\n jSeparator1 = new javax.swing.JSeparator();\n jSeparator2 = new javax.swing.JSeparator();\n flagLbl = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setMinimumSize(new java.awt.Dimension(650, 561));\n setPreferredSize(new java.awt.Dimension(650, 570));\n getContentPane().setLayout(null);\n\n correctLbl.setFont(new java.awt.Font(\"Old English Text MT\", 0, 24)); // NOI18N\n getContentPane().add(correctLbl);\n correctLbl.setBounds(20, 490, 580, 40);\n\n voiceBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/continentalconquest/voice button.png\"))); // NOI18N\n voiceBtn.setContentAreaFilled(false);\n voiceBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n voiceBtnActionPerformed(evt);\n }\n });\n getContentPane().add(voiceBtn);\n voiceBtn.setBounds(520, 10, 80, 70);\n\n yBtn.setBackground(new java.awt.Color(255, 255, 255));\n yBtn.setFont(new java.awt.Font(\"Old English Text MT\", 0, 18)); // NOI18N\n yBtn.setText(\"Yes\");\n yBtn.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));\n yBtn.setContentAreaFilled(false);\n yBtn.setOpaque(true);\n yBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n yBtnActionPerformed(evt);\n }\n });\n getContentPane().add(yBtn);\n yBtn.setBounds(110, 300, 210, 70);\n\n nBtn.setBackground(new java.awt.Color(255, 255, 255));\n nBtn.setFont(new java.awt.Font(\"Old English Text MT\", 0, 18)); // NOI18N\n nBtn.setText(\"No\");\n nBtn.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));\n nBtn.setContentAreaFilled(false);\n nBtn.setOpaque(true);\n nBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nBtnActionPerformed(evt);\n }\n });\n getContentPane().add(nBtn);\n nBtn.setBounds(340, 300, 210, 70);\n\n answerBtn4.setBackground(new java.awt.Color(255, 255, 255));\n answerBtn4.setFont(new java.awt.Font(\"Old English Text MT\", 0, 18)); // NOI18N\n answerBtn4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));\n answerBtn4.setContentAreaFilled(false);\n answerBtn4.setOpaque(true);\n answerBtn4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n answerBtn4ActionPerformed(evt);\n }\n });\n getContentPane().add(answerBtn4);\n answerBtn4.setBounds(390, 370, 190, 70);\n\n answerBtn3.setBackground(new java.awt.Color(255, 255, 255));\n answerBtn3.setFont(new java.awt.Font(\"Old English Text MT\", 0, 18)); // NOI18N\n answerBtn3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));\n answerBtn3.setContentAreaFilled(false);\n answerBtn3.setOpaque(true);\n answerBtn3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n answerBtn3ActionPerformed(evt);\n }\n });\n getContentPane().add(answerBtn3);\n answerBtn3.setBounds(90, 370, 210, 70);\n\n answerBtn2.setBackground(new java.awt.Color(255, 255, 255));\n answerBtn2.setFont(new java.awt.Font(\"Old English Text MT\", 0, 18)); // NOI18N\n answerBtn2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));\n answerBtn2.setContentAreaFilled(false);\n answerBtn2.setOpaque(true);\n answerBtn2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n answerBtn2ActionPerformed(evt);\n }\n });\n getContentPane().add(answerBtn2);\n answerBtn2.setBounds(390, 240, 190, 70);\n\n answerBtn1.setBackground(new java.awt.Color(255, 255, 255));\n answerBtn1.setFont(new java.awt.Font(\"Old English Text MT\", 0, 18)); // NOI18N\n answerBtn1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));\n answerBtn1.setContentAreaFilled(false);\n answerBtn1.setOpaque(true);\n answerBtn1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n answerBtn1ActionPerformed(evt);\n }\n });\n getContentPane().add(answerBtn1);\n answerBtn1.setBounds(90, 240, 210, 70);\n\n questionLbl.setFont(new java.awt.Font(\"Old English Text MT\", 0, 24)); // NOI18N\n getContentPane().add(questionLbl);\n questionLbl.setBounds(80, 170, 530, 40);\n\n icelandLbl.setFont(new java.awt.Font(\"Old English Text MT\", 0, 36)); // NOI18N\n icelandLbl.setForeground(new java.awt.Color(51, 51, 51));\n icelandLbl.setText(\"Iceland Quiz\");\n getContentPane().add(icelandLbl);\n icelandLbl.setBounds(220, 80, 250, 40);\n\n backBtn.setText(\"Back\");\n backBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backBtnActionPerformed(evt);\n }\n });\n getContentPane().add(backBtn);\n backBtn.setBounds(20, 40, 69, 23);\n getContentPane().add(jSeparator3);\n jSeparator3.setBounds(0, 10, 620, 60);\n getContentPane().add(jSeparator1);\n jSeparator1.setBounds(0, 78, 620, 411);\n getContentPane().add(jSeparator2);\n jSeparator2.setBounds(0, 470, 620, 60);\n\n flagLbl.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/continentalconquest/icelandflag.jpg\"))); // NOI18N\n flagLbl.setText(\"jLabel2\");\n getContentPane().add(flagLbl);\n flagLbl.setBounds(-130, 0, 780, 560);\n\n pack();\n setLocationRelativeTo(null);\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Info Planet\");\n\t\tlblNewLabel.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, Color.CYAN));\n\t\tlblNewLabel.setFont(new Font(\"Tekton Pro\", Font.BOLD | Font.ITALIC, 20));\n\t\tframe.getContentPane().add(lblNewLabel, BorderLayout.NORTH);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tframe.getContentPane().add(panel, BorderLayout.CENTER);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Left\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlblNewLabel.setHorizontalAlignment(JLabel.LEFT);\n\t\t\t}\n\t\t});\n\t\tpanel.add(btnNewButton);\n\t\t\n\t\tJButton btnNewButton_2 = new JButton(\"Center\");\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlblNewLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t\t}\n\t\t});\n\t\tpanel.add(btnNewButton_2);\n\t\t\n\t\tJButton btnNewButton_1 = new JButton(\"Right\");\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlblNewLabel.setHorizontalAlignment(JLabel.RIGHT);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tpanel.add(btnNewButton_1);\n\t}", "private void setButtons()\n\t{\n\t\tstartSim = new JButton(\"Start Sim\");\n\t\tstartSim.addActionListener(this);\n\t\tpauseSim = new JButton(\"Pause Sim\");\n\t\tpauseSim.addActionListener(this);\n\t\taddEat = new JButton(\"Add Eatery\");\n\t\taddEat.addActionListener(this);\n\t\tsubEat = new JButton(\"Subtract Eatery\");\n\t\tsubEat.addActionListener(this);\n\t\taddCash = new JButton(\"Add Cashier\");\n\t\taddCash.addActionListener(this);\n\t\tsubCash = new JButton(\"Subtract Cashier\");\n\t\tsubCash.addActionListener(this);\n\t}", "public void actionPerformed(ActionEvent event) { //action performed method (goes here when a button is pressed); most of the logic goes inside here because the buttons dictate the flow of execution\r\n String command = event.getActionCommand(); //storing the text of the button into a string variable\r\n \r\n if(command.equals(\"OK\")){\r\n name1 = input.getText(); //getting the name and storing it when the first button, OK, is pressed\r\n welcome.remove(okButton);\r\n welcome.remove(welcomelabel); //removing unecessary labels\r\n \r\n instructions.setText((\"<html> Hi \" + \"</br>\"+name1 + \", which mode would you like to play? </html>\")); //changing the text of the label\r\n \r\n welcome.add(pvp);\r\n welcome.add(Box.createRigidArea(new Dimension(0,75))); //adding the 2 buttons and formatting them \r\n pvp.setAlignmentX(Component.CENTER_ALIGNMENT); \r\n \r\n welcome.add(pvai); \r\n pvai.setAlignmentX(Component.CENTER_ALIGNMENT); \r\n }\r\n \r\n if(command.equals(\"Player vs Player\")){ //if pvp button was clicked\r\n instructions.setText(\"<html> You chose Player vs Player! \" +\"</br>\"+ name1 + \", which colour would you like your checker to be? </html>\"); \r\n mode =1;\r\n welcome.remove(pvp);\r\n welcome.remove(pvai); //removing the buttons from the screen and updating the user interface\r\n welcome.updateUI(); \r\n addColor();\r\n }\r\n \r\n else if(command.equals(\"Player vs AI\")){ //if pvai button was clicked\r\n instructions.setText(\"<html> You chose Player vs AI! \" + \"</br>\"+name1 + \", which colour would you like your checker to be? </html>\"); \r\n mode = 2;\r\n welcome.remove(pvp);\r\n welcome.remove(pvai); \r\n welcome.updateUI();\r\n addColor(); //calling the method which puts the color options on to the screen\r\n }\r\n \r\n \r\n //========================================================PVP BUTTONS==========================================================================\r\n //===================================================================================================================================\r\n if(command.equals(\" 1\")){ //the extra spaces are because of the formatting of the columnnumbers\r\n columnnumber=1;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 2\")){\r\n columnnumber=2;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 3\")){\r\n columnnumber=3;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 4\")){ //depending on which button they press, change the columnnumber. Then send it to the if statement that runs when command = entered\r\n columnnumber=4;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 5\")){\r\n columnnumber=5;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 6\")){\r\n columnnumber=6;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 7\")){\r\n columnnumber=7;\r\n command = \"Enter\";\r\n }\r\n \r\n \r\n //======================================when player 1 makes their choice of the pvp mode ==================================================================\r\n if(command.equals(\"Black\")&&choice == 1 &&mode ==1){ // determining which button was pressed and which player pressed it\r\n instructions.setText(\"Great choice! Now, what is Player 2's name?\"); \r\n color1 = Color.black; //for player 1\r\n removeColor();\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT); //centering the component \r\n }\r\n \r\n if(command.equals(\"Red\")&&choice == 1 &&mode ==1){ //if the colour was pressed by the first player\r\n instructions.setText(\"Great choice! Player 2, what is your name?\");\r\n color1 = Color.red;\r\n removeColor(); //removing the other colors from screen //red\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\"); //clearing the text field\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n if(command.equals(\"Yellow\")&&choice == 1 &&mode ==1){ \r\n instructions.setText(\"Great choice! Player 2, what is your name?\");\r\n color1 = Color.yellow;\r\n removeColor(); //yellow\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n if(command.equals(\"Green\")&&choice == 1 &&mode ==1){ \r\n instructions.setText(\"Great choice! Player 2, what is your name?\"); //greem\r\n color1 = Color.green;\r\n removeColor(); \r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n //======================================================================================================================================================\r\n //2nd users info in pvp mode\r\n \r\n if(command.equals(\"Okay\")){ //if they press okay --> asks for the 2nd users info\r\n name2 = input.getText();\r\n instructions.setText(\"<html>Hello \" + \"</br>\" +name2 + \", choose a colour for your checker. </html>\"); //move on to the 2nd player options\r\n welcome.remove(input); //^^using html to print out new lines if someone's name is too long\r\n welcome.updateUI();\r\n \r\n welcome.add(black);\r\n black.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n black.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n welcome.add(red);\r\n red.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n red.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n //readding all the color buttons again\r\n welcome.add(yellow);\r\n yellow.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n yellow.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n welcome.add(green);\r\n green.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n green.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n choice = 2; //showing that it is the 2nd user's turn now\r\n \r\n if(color1==Color.black){\r\n welcome.remove(okayButton);\r\n welcome.remove(black);\r\n }\r\n if(color1==Color.red){\r\n welcome.remove(okayButton);\r\n welcome.remove(red); //depending on which colour was chosen by the first player, take it out of the options for the 2nd player\r\n }\r\n if(color1==Color.yellow){\r\n welcome.remove(okayButton);\r\n welcome.remove(yellow);\r\n }\r\n if(color1==Color.green){\r\n welcome.remove(okayButton);\r\n welcome.remove(green);\r\n }\r\n } \r\n \r\n if(command.equals(\"Black\")&&choice == 2&&mode==1){ //once player 2 picks their colour\r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.black;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); //method that determines who goes first\r\n }\r\n \r\n if(command.equals(\"Red\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.red;\r\n removeColor(); //removing the unneccessary colour buttons\r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); \r\n }\r\n \r\n if(command.equals(\"Yellow\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.yellow;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); //method that determines who goes first\r\n }\r\n \r\n if(command.equals(\"Green\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.green;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT); //aligning the buttons\r\n goesFirst(); \r\n }\r\n \r\n if(command.equals(name1)&&mode==1){ //if p1 goes first\r\n PVP(name1); //if they want name1 to go first, send it to the method with the correct parameter\r\n }\r\n \r\n else if(command.equals(name2)&&mode==1){ //if p2 goes first\r\n PVP(name2); //sending to PVP method which allows user to start game\r\n }\r\n \r\n else if(command.equals(\"Flip a coin\")&&mode==1){\r\n \r\n randomnum = (int)(r.nextInt(2));\r\n \r\n if(randomnum == 0){ //using randomnum to simulate the flipping of a coin\r\n PVP(name1);\r\n }\r\n else{ //randomly decides who goes first\r\n PVP(name2);\r\n }\r\n }\r\n \r\n \r\n //logic of the connect 4 game goes here --> when they press enter==============================================================---------============================\r\n //when they click a button\r\n if(command.equals(\"Enter\")&&whoseTurn==1&&canGo==true){ //WHEN PLAYER 1 GOES\r\n \r\n if(validInput(columnnumber)){\r\n erase = 0;\r\n changeBoard(columnnumber, whoseTurn, color1, color2); //sending the columnnumber picked to the changeBoard method, which changes the colour of things on the screen\r\n input.setText(\"\");\r\n whoseTurn=2;\r\n \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n \r\n numTurns++; //accumulating the total amount of turns\r\n \r\n if(hasCheckingCondition(4, color1)){ //if they win the game; this is checked by sending the current state of the board to the hasCheckingCondition\r\n userWins++; //incrementing UserWin counter\r\n whoseTurn = 0; //make it no one's turn now because the game is over\r\n GameWon = true; //making it so that no one can go anymore because the game is over\r\n canGo = false;\r\n playSound(); //plays a winning tune if the user ever wins\r\n repeatGui(name1); //this method gives the user the option to restart the game\r\n }\r\n \r\n else{ //if player 1 has not won the game\r\n \r\n if(fullBoard()){ //if the board is full\r\n repeatGui(name1); //if they draw the game, ask if they want to repeat the GUI\r\n \r\n }\r\n else{\r\n if(!name2.equals(\"AI.BOT\")){ //else, then it is player 2's turn. If it isnt the ai, then outprint the below\r\n instructions.setText(\"<html>\"+name2 + \"<html>'s turn. <br><br> Please click the column number you wish to place your checker in. </html>\");\r\n }\r\n }\r\n }\r\n if(mode==2){\r\n whoseTurn=AINumber; //if the mode is 2 that means they chose, PvAI, so we make whoseTurn to AINumber, which is 3 or 4 depending on hard or easy mode\r\n }\r\n }\r\n else{\r\n instructions.setText(\"Please click a valid column number.\"); //if that column is full, they must reclick another valid column\r\n }\r\n }\r\n \r\n else if(command.equals(\"Enter\")&&whoseTurn ==2&&canGo==true){ //WHEN PLAYER 2 GOES\r\n \r\n if(validInput(columnnumber)){ //same if statements as above, just that player 2 is now playing\r\n erase = 0;\r\n changeBoard(columnnumber, whoseTurn, color1, color2); //calling the changeBoard method which changes the coour of the index based on the user and his pick\r\n input.setText(\"\");\r\n whoseTurn=1; //this will make this section and the above 'if' section alternate\r\n numTurns++; //accumulating the total amount of turns\r\n \r\n if(hasCheckingCondition(4, color2)){\r\n GameWon = true;\r\n canGo = false;\r\n whoseTurn = 0;\r\n playSound();\r\n repeatGui(name2); //repeating the GUI\r\n }\r\n else{\r\n \r\n if(fullBoard()){ //look at comments above for reference\r\n repeatGui(name2);\r\n }\r\n \r\n else{\r\n instructions.setText(\"<html>\"+name1 + \"<html>'s turn. <br><br> Please click the column number you wish to place your checker in. </html>\");\r\n }\r\n }\r\n }\r\n else{\r\n instructions.setText(\"Please click a valid column.\");\r\n }\r\n }\r\n \r\n //for the easy ai======================================================================================\r\n if(whoseTurn == 3 && command.equals(\"Enter\") &&GameWon == false){ //WHEN THE EASY AI GOES\r\n \r\n instructions.setText(\"<html>Please click the column number\"+\"</br>\"+\" you wish to place your checker in. </html>\"); //using html once again\r\n \r\n AIPlayed = false; //boolean that keeps track of if the AI has made a move or not\r\n for(int i = 1; i<=7; i++){\r\n \r\n if(fullBoard()){\r\n repeatGui(\"\"); //giving user option to play again if the result is a draw\r\n break;\r\n }\r\n \r\n if(validInput(i)){\r\n changeBoard(i, AINumber, color1, color2); //put a checker in every possible column\r\n if(hasCheckingCondition(4, color2)){ //then check if any of those checker can win the game\r\n GameWon = true;\r\n AIPlayed = true; //a tracker of if the AI has played or not\r\n whoseTurn = 0;\r\n canGo = false;\r\n repeatGui(\"AI\"); //send this to the method saying that the AI won the game. The method will then ask the user if they would like to play again\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color2)==false){ //if it cant win the game\r\n erase = i; //changing all the checkers placed back to white\r\n changeBoard(erase, AINumber, color1, color2); //this method can either add or erase checkers; in this case, erase\r\n erase = 0;\r\n \r\n if(fullBoard()){\r\n repeatGui(\"\"); //if the result of the game is a tie, break and send it to the repeatGUI method\r\n break;\r\n }\r\n \r\n continue;\r\n }\r\n }\r\n }\r\n \r\n //if the opponent(user) can win\r\n if(AIPlayed ==false){ //if the AI still hasnt made a move\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){\r\n erase = 0; //resetting this variable (*IMPORTANT*)\r\n changeBoard(i, 1, color1, color2); //place a checker of the opponents colour in every slot\r\n if(hasCheckingCondition(4, color1)){ //if the opponent can win, then place a checker of the AI's colour to block it\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //change back the checker \r\n erase = 0;\r\n changeBoard(i, 3, color1, color2); //put a checker of the AI's colour to block it\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color1)==false){ //changing the colors back to what it was before\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2);\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n \r\n erase = 0; //must keep resetting this or else the changeBoard method will think it has to erase the checker instead of placing it\r\n \r\n if(AIPlayed == false){\r\n randomnum = (int)(r.nextInt(7)+1);\r\n \r\n while(validInput(randomnum)==false){ //if the AI cant win or block the opponent, it chooses a random slot and places it there\r\n randomnum = (int)(r.nextInt(7)+1);\r\n }\r\n \r\n changeBoard(randomnum, AINumber, color1, color2); //using a randomnum as long as it is a valid column\r\n numTurns++;\r\n whoseTurn = 1;\r\n \r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n \r\n }\r\n }//end of easy ai========================================================\r\n \r\n \r\n //=========================//FOR THE HARD AI============================//\r\n \r\n if(whoseTurn == 4 &&command.equals(\"Enter\")&&GameWon==false){ //start of Hard AI\r\n //need to check the same things as the EasyAI at first - if the AI can win or if the USER can win\r\n \r\n instructions.setText(\"<html>Please click the column number\"+\"</br>\"+\" you wish to place your checker in. </html>\"); //using html once again\r\n \r\n AIPlayed = false; //boolean that keeps track of if the AI has made a move or not\r\n canPlace = true; //boolean that keeps track if the AI should place a checker there\r\n \r\n for(int a = 0; a<7; a++){\r\n shouldNotPlace[a]=-1; //resetting the array each time so that it can accumulate the moves properly\r\n }\r\n \r\n //CHECKING TO SEE IF THE AI CAN WIN====================================\r\n for(int i = 1; i<=7; i++){\r\n if(fullBoard()){\r\n repeatGui(\"\"); //if the result is a draw\r\n break;\r\n }\r\n \r\n if(validInput(i)){\r\n changeBoard(i, AINumber, color1, color2); //put a checker in every possible column\r\n if(hasCheckingCondition(4, color2)){ //then check if any of those checker can win the game\r\n GameWon = true;\r\n AIPlayed = true;\r\n whoseTurn = 0;\r\n canGo = false;\r\n repeatGui(\"AI\");\r\n playSound();\r\n break;\r\n }\r\n else if(hasCheckingCondition(4, color2)==false){ //if it cant win the game\r\n erase = i; //changing all the checkers placed back to white\r\n changeBoard(erase, AINumber, color1, color2);\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n \r\n //CHECKING IF THE USER CAN WIN THE GAME, IF SO THEN BLOCK\r\n if(AIPlayed ==false){ //if the AI still hasnt made a move\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){ //this must be a valid column to hypothetically place a checker in\r\n erase = 0;\r\n changeBoard(i, 1, color1, color2); //place a checker of the opponents colour in every slot\r\n if(hasCheckingCondition(4, color1)){ //if the opponent can win, then place a checker of the AI's colour to block it\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //erasing the checker just placed that was used to see if black could win\r\n erase = 0;\r\n changeBoard(i, AINumber, color1, color2);//changing the colour of it to magenta to block the opponent\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color1)==false){ //changing the colors back to what it was before\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //removing the checker placed at the beginning to its original game state\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n \r\n \r\n //CHECKING IF THE USER CAN GET A DOUBLE TRAP ON THE BOTTOM ROW (hard coding it just for the bottom row)=============\r\n \r\n if(AIPlayed == false&&trapBlocked == false){ //only needs to run once\r\n if(arrayCircles[5][3].getColor()==color1){ //if they have a checker in the middle column\r\n if(arrayCircles[5][4].getColor()==color1){ //checker to the right\r\n if(arrayCircles[5][2].getColor()==Color.white){\r\n erase = 0;\r\n changeBoard(3, AINumber, color1, color2); //changing the colour of it to magenta to block the opponent from a double on the bottom\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n trapBlocked = true;\r\n }\r\n }\r\n if(arrayCircles[5][2].getColor()==color1){ //checker to the left\r\n if(arrayCircles[5][4].getColor()==Color.white){\r\n erase = 0;\r\n changeBoard(5, AINumber, color1, color2); //changing the colour of it to magenta to block the opponent from a double on the bottom\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n trapBlocked = true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n //CHECKING WHICH MOVES THE AI SHOULD NOT PLACE THAT WOULD LEAD TO AN IMMEDIATE WIN FOR THE USER============================\r\n \r\n if(AIPlayed==false){\r\n counter = 0;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){ //making sure that column is valid\r\n erase = 0;\r\n changeBoard(i, AINumber, color1, color2); //simulating every possible move of the AI\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)){\r\n erase = 0;\r\n changeBoard(j, 1, color1, color2); //then seeing if the user can win after any one of those moves\r\n if(hasCheckingCondition(4, color1)==true){ \r\n shouldNotPlace[counter]=i; //if so, store it in the array so the AI knows to not place it there ever in the future\r\n counter++;\r\n }\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing previous moves\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, AINumber, color1, color2); //erasing previous moves\r\n }\r\n }\r\n }\r\n \r\n //SETTING UP THE DOUBLE TRAP\r\n if(AIPlayed==false){ //this checks if the AI can make a move to double trap the user\r\n //looks ahead to the future state of the game and determines which column is best to win\r\n canPlace = true;\r\n mustPlace = -1;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)&&canPlace==true){ \r\n erase = 0; //adding a move\r\n changeBoard(i, AINumber, color1, color2); //simulating every possible move of the AI\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)&&canPlace == true){\r\n erase = 0; //adding another AI move\r\n changeBoard(j, AINumber, color1, color2); //then seeing if the AI can win after any one of those moves\r\n if(hasCheckingCondition(4, color2)==true){\r\n erase = j;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the magenta one for the black one\r\n erase=0;\r\n changeBoard(j, 1, color1, color2); //placing a black checker here for the future game board possibilities after this move\r\n \r\n for(int z = 1; z<=7; z++){\r\n if(validInput(z)&&canPlace==true){\r\n erase = 0;\r\n changeBoard(z, AINumber, color1, color2); //adding a move\r\n if(hasCheckingCondition(4, color2)==true){//that means they can get a double win because the user blocked one win, but the AI can still make another\r\n mustPlace = i; //the move that can win the game by setting up a double win for the AI\r\n for(int x =0; x<7; x++){\r\n if(i==shouldNotPlace[i]){ //if mustPlace equals a immediate losing move, continue the loop to find the next one which results in a valid move\r\n canPlace = true;\r\n continue;\r\n }\r\n }\r\n canPlace = false; //putting it here so that the loop doesnt run again after its found, but the current iteration finishes\r\n }\r\n erase = z;\r\n changeBoard(erase, AINumber, color1, color2); //subtracting the checkers\r\n }\r\n }\r\n erase = j; //erasing if the USER placed something\r\n changeBoard(erase, 1, color1, color2);\r\n }\r\n else if(hasCheckingCondition(4, color1)==false){\r\n erase = j;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the moves just placed by the AI\r\n }\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the moves just placed by the AI\r\n }\r\n }\r\n \r\n if(mustPlace>-1){\r\n canPlace = true;\r\n for(int i = 0; i<7; i++){\r\n if(mustPlace == shouldNotPlace[i]){ //making sure that this projected move is not gonna lead immediately to a loss\r\n canPlace = false;\r\n }\r\n }\r\n \r\n if(canPlace==true){\r\n erase=0;\r\n changeBoard(mustPlace, AINumber, color1, color2); //placing the move\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n canGo = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n whoseTurn = 1;\r\n }\r\n }\r\n }\r\n \r\n //BLOCKING A DOUBLE TRAP\r\n //it works by considering all opssible moves the opponent can make; then, it will again simulate moves that the user can make (2 moves in a row for the user)\r\n //then, if the user can win within two moves, block its second move by replacing the 2nd move with a magenta colour; now, simulate all possible moves of black\r\n //again, and see if the user can win. If so, then that means the user has a double trap potential depending on the AI's move THIS turn\r\n //at the end of this part of code, the AI should block the user from initially making the connect 4, blocking the double\r\n \r\n if(AIPlayed==false){ //this blocks the opponent from forcing the AI into making a move; essentially stops the double win before it happens\r\n //looks ahead to the future state of the game and determines which column is best to block the opponent\r\n canPlace = true;\r\n mustPlace = -1;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)&&canPlace==true){ \r\n erase = 0; //adding a move\r\n changeBoard(i, 1, color1, color2); //simulating every possible move of the user\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)&&canPlace == true){\r\n erase = 0; //adding another user move\r\n changeBoard(j, 1, color1, color2); //then seeing if the user can win after any one of those moves\r\n if(hasCheckingCondition(4, color1)==true){\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing the black one for a magenta one\r\n erase=0;\r\n changeBoard(j, AINumber, color1, color2); //placing a magenta checker here for the future game board possibilities\r\n \r\n for(int z = 1; z<=7; z++){\r\n if(validInput(z)&&canPlace==true){\r\n erase = 0;\r\n changeBoard(z, 1, color1, color2); //adding\r\n if(hasCheckingCondition(4, color1)==true){//that means they can get a double win soon\r\n mustPlace = i; //the move that must be placed to block a double move is i\r\n for(int x =0; x<7; x++){\r\n if(i==shouldNotPlace[i]){ //if mustPlace equals a immediate losing move, continue the loop to find the next one which results in a valid move\r\n canPlace = true;\r\n continue;\r\n }\r\n }\r\n canPlace = false; //putting it here so that the loop doesnt run again after its found, but the current iteration finishes\r\n }\r\n erase = z;\r\n changeBoard(erase, 1, color1, color2); //subtracting the checker\r\n }\r\n }\r\n erase = j; //erasing if the AI placed something\r\n changeBoard(erase, AINumber, color1, color2);\r\n }\r\n else if(hasCheckingCondition(4, color1)==false){\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing the moves just placed\r\n }\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //erasing the moves just placed\r\n }\r\n }\r\n \r\n if(mustPlace>-1){\r\n canPlace = true;\r\n for(int i = 0; i<7; i++){\r\n if(mustPlace == shouldNotPlace[i]){ //making sure that this projected move is not gonna lead immediately to a loss\r\n canPlace = false;\r\n }\r\n }\r\n \r\n if(canPlace==true){\r\n erase=0;\r\n changeBoard(mustPlace, AINumber, color1, color2);\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n canGo = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n whoseTurn = 1;\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed==false){ //if the AI still hasnt made a move because none of the above is possible, then place in the center or middle columns if possible\r\n if(validInput(4)==true){\r\n canPlace=true;\r\n for(int i = 0; i<7; i++){\r\n if(shouldNotPlace[i]==4){\r\n canPlace=false; //if column 4 ever results in a losing move, dont place it there\r\n break;\r\n }\r\n }\r\n if(canPlace==true){\r\n if(arrayCircles[1][3].getColor()==Color.white){ //the AI shouldnt place it in the top-top row in the 4th column all the time\r\n erase = 0;\r\n changeBoard(4, AINumber, color1, color2); //for the center or middle column\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed==false){ //this statement is so that the AI places a checker in the 3rd or 5th column provided that it isnt an immediate losing move\r\n outer: for(int i = 2; i<5; i++){ //if the AI still hasnt played, put it in a position at the bottom of the column\r\n for(int a = 0; a<7; a++){\r\n if(i+1==shouldNotPlace[a]){ //checking if the columnnumber equals to any part of the shouldNotPlace array\r\n canPlace = false;\r\n break outer; //breaking the outer loop for efficiency\r\n }\r\n }\r\n }\r\n if(canPlace==true&&AIPlayed == false){ // \r\n randomnum = (int)(r.nextInt(2));\r\n if(randomnum==0){\r\n if(validInput(3)){ //making all the possible moves are at least valid first\r\n erase=0;\r\n changeBoard(3, AINumber, color1, color2); //put it at the bottom of the more centered rows\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n else if (randomnum==1){\r\n if(validInput(5)){\r\n erase=0;\r\n changeBoard(5, AINumber, color1, color2); //put it at the bottom of the more centered rows\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed == false){ //if all of the above is not possible, then make a random choice that will not lose the game the next turn\r\n do{\r\n randomnum = (int)(r.nextInt(7)+1);\r\n \r\n timesChecked++;\r\n \r\n if(timesChecked>1000){ //if it runs 1000 times, meaning that there is only one spot to play which will result in a loss\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)== true){\r\n randomnum = i; //setting the random number to be the only column left available\r\n }\r\n }\r\n break; //breaking out of the loop if there is no other choice for a checker\r\n }\r\n \r\n for(int i = 0; i<7; i++){\r\n if(shouldNotPlace[i]==randomnum){\r\n randomnum=100; //causing the loop to run again\r\n break;\r\n }\r\n }\r\n \r\n }while(validInput(randomnum)==false); //if the AI cant win or block the opponent, it chooses a random slot and places it there\r\n \r\n erase = 0;\r\n changeBoard(randomnum, AINumber, color1, color2); //changing the board here and the variables below then make it the users turn\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn = 1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n \r\n }//END OF HARD AI METHOD=====================\r\n \r\n ///========================================================//////PVAI BUTTONS///////=======================================================================\r\n if(command.equals(\"Black\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.black; \r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Red\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" + \" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.red;\r\n removeColor(); \r\n addAiButtons(); //depending on which colour they press\r\n }\r\n \r\n if(command.equals(\"Yellow\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.yellow;\r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Green\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.green;\r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Easy AI\")){\r\n choseEasyAI = true;\r\n welcome.remove(easyAI); //sending it to the appropriate methods after they pressed the respective buttons\r\n welcome.remove(hardAI);\r\n goesFirst();\r\n }\r\n else if(command.equals(\"Hard AI\")){ //if they choose the hardAI\r\n choseEasyAI = false; \r\n welcome.remove(easyAI);\r\n welcome.remove(hardAI);\r\n goesFirst();\r\n }\r\n \r\n if(mode==2&&command.equals(name1)){\r\n PVAI(name1); //if they want name1 to go first, send it to the method with the correct parameter\r\n }\r\n \r\n else if(command.equals(name2)&&mode==2){ //if name 2 wants to go first\r\n PVAI(name2);\r\n }\r\n \r\n else if(command.equals(\"Flip a coin\")&&mode==2){ //if they desire to flip a coin to determine who goes first\r\n \r\n randomnum = (int)(r.nextInt(2));\r\n \r\n if(randomnum == 0){ //using randomnum to simulate the flipping of a coin\r\n PVAI(name1);\r\n }\r\n else{ //randomly decides who goes first\r\n PVAI(name2);\r\n }\r\n }\r\n \r\n //if they would like to play again; the buttons appear at the end\r\n if(command.equals(\"Yes\")){\r\n playAgain = true; //if they want to play again\r\n repeatGui(\"\"); //repeating the GUI method\r\n }\r\n else if(command.equals(\"No\")){\r\n this.dispose(); //getting rid of the frame; essentially closing it\r\n }\r\n }", "public void makeGUI()\n\t{\n\t\tbuttonPanel = new ButtonPanel(this,ship,planet);\n\t\tgamePanel = new GamePanel(this,ship,planet);\n\n\t\tJMenuBar menubar = new JMenuBar();\n\t\tJMenu menuHelp = new JMenu(\"Help\");\n\t\thelpItem = new JMenuItem(\"Help\");\n\t\tmenuHelp.add(helpItem);\n\t\tmenubar.add(menuHelp);\n\t\tsetJMenuBar(menubar);\n\n\t\tsounds = new AudioClip[2];\n\n\t\ttry\n\t\t{\n\t\t\turl = new URL(getCodeBase() + \"/thrust.au\");\n\t\t\tsounds[0] = Applet.newAudioClip(url);\n\t\t\turl = new URL(getCodeBase() + \"/crash.au\");\n\t\t\tsounds[1] = Applet.newAudioClip(url);\n\t\t}\n\t\tcatch(Exception e){}\n\n\t\thelpItem.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif(e.getSource() == helpItem)\n\t\t\t\t{\n\t\t\t\t\tString helpMessage = \"The goal of the game is to land\\nthe ship on the red lines (pads).\\nThe ship must be completely contained\\nwithin the bounds of the red pad.\\nThere are 10 levels total\\nand you will have a certain amount\\nof time to complete each level.\\nGood Landing: velocities must be <10\\nOK Landing: velocities must be <20\\nThe ship's bottom must be facing the ground.\";\n\t\t\t\t\tJOptionPane.showMessageDialog(lander, helpMessage, \"Help Display\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tgetContentPane().add(gamePanel, BorderLayout.PAGE_START);\n\t\tgetContentPane().add(buttonPanel, BorderLayout.PAGE_END);\n\t\tsetVisible(true);\n\t}", "public GUI(){\n\t\tSIZE = promptSIZE();\n\t\tframe = new JFrame(\"Five in a row developed by Wonjohn Choi in G.Y.G.D.\");\n\t\tframe.setLayout(new GridLayout(SIZE, SIZE));\n\t\t\n\t\tbuttonGrid = new JButton[SIZE][SIZE];\n\t\t\n\t\tfor(int row=0;row<SIZE;row++){\n\t\t\tfor(int col=0;col<SIZE;col++){\n\t\t\t\tbuttonGrid[row][col] = new JButton();\n\t\t\t\tframe.add(buttonGrid[row][col]);\n\t\t\t\tbuttonGrid[row][col].addActionListener(this);\n\t\t\t}\n\t\t}\n\t\t\n\t\tframe.setSize(50*SIZE, 50*SIZE);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t\t\n\t\tengine = new Engine(SIZE);\n\t}", "private void createBeginningButtons() {\n\t createStartButtons(myResources.getString(\"game1\"), 0, 0);\n\t\tcreateStartButtons(myResources.getString(\"game2\"), 0, 1);\n\t\tcreateStartButtons(myResources.getString(\"game3\"), 0, 2);\n\t\tcreateStartButtons(myResources.getString(\"game4\"), 0, 3);\n\t\tcreateStartButtons(myResources.getString(\"game5\"), 0, 4);\n\t\tcreateInstructionButton();\n\t\tcreateStartingLabel();\n\t\tcreateGridSizeButton();\n }", "@Override\n protected void addButtons()\n {\n JLabel agentOptions = new JLabel(\"Client Options \", SwingConstants.CENTER);\n addComponentToGridBag(this, agentOptions, 0, 0, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n\n JButton agentSendMessage = new JButton(\"Send Message\");\n addComponentToGridBag(this, agentSendMessage, 0, 2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentSendMessage.addActionListener((ActionEvent e) ->\n {\n String to = getTo();\n String content = getContent(to);\n sendMessage(to, content);\n });\n\n JButton agentShowPortal = new JButton(\"Show Portal\");\n addComponentToGridBag(this, agentShowPortal, 0, 3, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentShowPortal.addActionListener((ActionEvent e) ->\n {\n displayConnections();\n });\n\n JButton agentexit = new JButton(\"Exit\");\n addComponentToGridBag(this, agentexit, 0, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentexit.addActionListener((ActionEvent e) ->\n {\n System.exit(0);\n });\n }", "private void playHuman () {\n\n // remove buttons\n frame.getContentPane().remove(btnHuman);\n frame.getContentPane().remove(btnTraining);\n\n // add components\n // Labels\n // ... for Score\n lblScore = new JLabel(\"Score : \", SwingConstants.CENTER);\n lblScore.setBounds(20,20,130,40);\n lblScore.setFont(new Font(lblScore.getFont().getName(),Font.PLAIN, 20));\n lblScore.setForeground(Color.white);\n lblScore.setBackground(Color.lightGray);\n lblScore.setVisible(true);\n frame.getContentPane().add(lblScore);\n // ... for Enter\n lblEnter = new JLabel(\"Press ENTER when ready.\", SwingConstants.CENTER);\n lblEnter.setBounds(650,20,250,40);\n lblEnter.setFont(new Font(lblEnter.getFont().getName(),Font.PLAIN, 20));\n lblEnter.setForeground(Color.white);\n lblEnter.setBackground(Color.lightGray);\n lblEnter.setVisible(true);\n frame.getContentPane().add(lblEnter);\n // Textfield\n // ... for Score\n txtScore = new JTextField(\"\"+game.playersFitness(),1);\n txtScore.setBounds(170,20,50,40);\n txtScore.setFont(new Font(lblEnter.getFont().getName(),Font.PLAIN, 20));\n txtScore.setForeground(Color.white);\n txtScore.setBackground(Color.darkGray);\n txtScore.setFocusable(true);\n txtScore.setVisible(true);\n frame.getContentPane().add(txtScore);\n // checkBox\n // UP\n chkUP = new JCheckBox(\"Jump (w)\",false);\n chkUP.setBounds(500,15,100,25);\n chkUP.setForeground(Color.darkGray);\n chkUP.setBackground(Color.lightGray);\n chkUP.setVisible(true);\n frame.getContentPane().add(chkUP);\n // RIGHT\n chkRIHGT = new JCheckBox(\"Right (d)\", false);\n chkRIHGT.setBounds(500,45,100,25);\n chkRIHGT.setForeground(Color.darkGray);\n chkRIHGT.setBackground(Color.lightGray);\n chkRIHGT.setVisible(true);\n frame.getContentPane().add(chkRIHGT);\n\n // Keylistener\n txtScore.addKeyListener(this);\n txtScore.requestFocus();\n\n frame.revalidate();\n frame.repaint();\n\n // game open for input (key listener)\n }", "private void init() {\n\t\t\n\t\t// Buttons\n\t\tendButton = new JButton(\"Spiel beenden\");\n\t\tendButton.setBackground(Color.white);\n\t\tendButton.setForeground(Color.black);\n\t\tendButton.setFont(endButton.getFont().deriveFont(20.0f));\n\t\tendButton.setBorder(BorderFactory.createStrokeBorder(new BasicStroke(1.5f), Color.black));\n\t\t\n\t\tanleitungButton = new JButton(\"Anleitung\");\n\t\tanleitungButton.setBackground(endButton.getBackground());\n\t\tanleitungButton.setForeground(endButton.getForeground());\n\t\tanleitungButton.setFont(endButton.getFont());\n\t\tanleitungButton.setBorder(endButton.getBorder());\n\t\t\n\t\tbackButton = new JButton(\"zurück\");\n\t\tbackButton.setBackground(endButton.getBackground());\n\t\tbackButton.setForeground(endButton.getForeground());\n\t\tbackButton.setFont(endButton.getFont());\n\t\tbackButton.setBorder(endButton.getBorder());\n\t\t\n\t\tbuttonPanel = new JPanel(new GridLayout(3, 1, 0, 50));\n\t\tbuttonPanel.add(endButton);\n\t\tbuttonPanel.add(anleitungButton);\n\t\tbuttonPanel.add(backButton);\n\t\tbuttonPanel.setBackground(Color.red.darker());\n\t\t\n\t\tgetContentPane().setLayout(new BorderLayout(40, 40));\n\t\tgetContentPane().add(buttonPanel, BorderLayout.CENTER);\n\t\tgetContentPane().add(new JLabel(), BorderLayout.NORTH);\n\t\tgetContentPane().add(new JLabel(), BorderLayout.SOUTH);\n\t\tgetContentPane().add(new JLabel(), BorderLayout.WEST);\n\t\tgetContentPane().add(new JLabel(), BorderLayout.EAST);\n\t\tgetContentPane().setBackground(buttonPanel.getBackground());\n\t\t\n\t\t// ACTIONLISTENER\n\t\tendButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\tSystem.exit(0);\n\t\t\t\tcancelGameandGoBackToHome(e);\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tanleitungButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\topenAnleitung(e);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbackButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\tbackToGame(e);\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "public BitingDeathFrame(BitingDeathGame newGame) {\r\n\t\tsuper();\r\n\t\tthis.setSize(500, 300);\r\n\t\t\r\n\t\tthis.game = newGame;\r\n\r\n\t\tthis.setTitle(\"Biting Death\");\r\n\t\tthis.setLocationRelativeTo(null);\r\n\t\tthis.setMenuBar(new BitingDeathMenuBar(game, this));\r\n\r\n\r\n\t\tContainer pane = this.getContentPane();\r\n\r\n\t\tpane.setLayout(new GridBagLayout());\r\n\t\tGridBagConstraints c = new GridBagConstraints();\r\n\r\n\t\t//natural height, maximum width\r\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\r\n\r\n\t\tthis.foodLabel = new JLabel();\r\n\t\tc.weightx = 0.5;\r\n\t\tc.weighty = 1;\r\n\t\tc.fill = GridBagConstraints.NONE;\r\n\t\tc.gridx = 0;\r\n\t\tc.gridy = 0;\r\n\t\tc.anchor = GridBagConstraints.NORTH;\r\n\t\tpane.add(this.foodLabel, c);\r\n\t\t\r\n\t\t\r\n\t\tthis.raidButton = new JButton(\"Set a raid\");\r\n\t\tc.gridx = 1;\r\n\t\tpane.add(this.raidButton, c);\r\n\r\n\t\tthis.nextDayButton = new JButton(\"Next day\");\r\n\t\tc.gridx = 2;\r\n\t\tpane.add(this.nextDayButton, c);\r\n\r\n\t this.currentRaidSettingsText = new JTextArea();\r\n\t this.currentRaidSettingsText.setEditable(false);\r\n\t this.currentRaidSettingsText.setCursor(null); \r\n\t this.currentRaidSettingsText.setOpaque(false); \r\n\t this.currentRaidSettingsText.setFocusable(false);\r\n\t c.gridy = 1;\r\n\t c.gridx = 1;\r\n\t c.gridwidth = 2;\r\n\t c.weighty = 1;\r\n\t c.weightx = 1;\r\n\t pane.add(this.currentRaidSettingsText, c);\r\n\t \r\n\t this.survivorInfoText = new JTextArea();\r\n\t this.survivorInfoText.setEditable(false);\r\n\t this.survivorInfoText.setCursor(null); \r\n\t this.survivorInfoText.setOpaque(false); \r\n\t this.survivorInfoText.setFocusable(false);\r\n\t c.gridy = 1;\r\n\t c.gridx = 0;\r\n\t c.gridwidth = 1;\r\n\t c.weighty = 1;\r\n\t pane.add(this.survivorInfoText, c);\r\n\r\n\t this.raidButton.addActionListener(new SetRaidListener(this.game, this));\r\n\t this.nextDayButton.addActionListener(new NextDayListener(this.game, this));\r\n\r\n\t \r\n\t this.updateAll();\r\n\t\t\r\n\t\t\r\n\t\tthis.setVisible(true);\r\n\t\t\r\n\t\tthis.showAllMessages();\r\n\t \r\n\t}", "public static void setButton(String nameOfButton,int x,int y,int width,int heigth, JFrame frame) {\r\n //tozi metod suzdava butonut s negovite parametri - ime,koordinati,razmeri,frame\r\n\t JButton Button = new JButton(nameOfButton);\r\n\t Button.setBounds(x, y, width, heigth);\r\n\t colorOfButton(153,204,255,Button); //izpolzvam metodite ot po-gore\r\n\t colorOfTextInButton(60,0,150,Button);\r\n\t frame.getContentPane().add(Button);\r\n Button.addActionListener(new ActionListener(){ \r\n \tpublic void actionPerformed(ActionEvent e){ \r\n\t frame.setVisible(false);\r\n\t if(nameOfButton == \"Action\") { //kogato imeto na butona suvpada sus Stringa \"Action\",to tova e nashiqt janr\r\n\t \t Genre action = new Genre(\"Action\", //chrez klasa Genre zadavam vseki buton kakuv nov prozorec shte otvori\r\n\t \t\t\t \"Black Panther (2018)\", //kakvi filmi shte sudurja vseki janr \r\n\t \t\t\t \"Avengers: Endgame (2019)\",\r\n\t \t\t\t \" Mission: Impossible - Fallout (2018)\",\r\n\t \t\t\t \"Mad Max: Fury Road (2015)\",\r\n\t \t\t\t \"Spider-Man: Into the Spider-Verse (2018)\", \"MoviesWindow.png\" //kakvo fonovo izobrajenie shte ima\r\n);\r\n\t\t \t\r\n\t\t \taction.displayWindow(); \r\n//chrez metoda showWindow(); ,koito vseki obekt ot klasa Genre ima, otvarqme sledvashtiq(posleden) prozorec\r\n\t\t \t\r\n\t\t \t\r\n\t }else if (nameOfButton == \"Comedy\") { //i taka za vsichki filmovi janri\r\n\t \t Genre comedy = new Genre(\"Comedy\",\r\n\t \t\t\t \"The General (1926)\",\r\n\t \t\t\t \"It Happened One Night (1934)\",\r\n\t \t\t\t \"Bridesmaids (2011)\",\r\n\t \t\t\t \"Eighth Grade (2018)\",\r\n\t \t\t\t \"We're the Millers (2013)\",\"MoviesWindow.png\");\r\n\t\t \t\r\n\t\t \tcomedy.displayWindow();\r\n\t }else if (nameOfButton == \"Drama\") {\r\n\t \t Genre drama2 = new Genre(\"Drama\",\r\n\t \t\t\t \"Parasite (Gisaengchung) (2019)\",\r\n\t\t \t\t\t \" Moonlight (2016)\",\r\n\t\t \t\t\t \" A Star Is Born (2018)\",\r\n\t\t \t\t\t \" The Shape of Water (2017)\",\r\n\t\t \t\t\t \" Marriage Story (2019)\",\"MoviesWindow.png\");\r\n\t\t \t\r\n\t\t \tdrama2.displayWindow();\r\n\t }else if (nameOfButton == \"Fantasy\") {\r\n\t \t Genre fantasy2 = new Genre(\"Fantasy\",\r\n\t \t\t\t \"The Lord of the Rings Trilogy\",\r\n\t \t\t\t \"Metropolis (2016)\",\r\n\t \t\t\t \"Gravity (2013)\",\r\n\t \t\t\t \" Pan's Labyrinth (2006)\",\r\n\t \t\t\t \"The Shape of Water (2017)\",\"MoviesWindow.png\");\r\n\t\t \t\r\n\t\t \tfantasy2.displayWindow();\r\n\t }else if (nameOfButton == \"Horror\") {\r\n\t \t Genre horror = new Genre(\"Horror\",\r\n\t \t\t\t \" Host (2020)\",\r\n\t \t\t\t \" Saw (2004)\",\r\n\t \t\t\t \" The Birds (1963)\",\r\n\t \t\t\t \" Dawn of the Dead (1978)\",\r\n\t \t\t\t \" Shaun of the Dead (2004)\",\"MoviesWindow.png\");\r\n\t\t \t\r\n\t\t \thorror.displayWindow();\r\n\t }else if (nameOfButton == \"Romance\") {\r\n\t \tGenre romance2 = new Genre(\"Romance\",\r\n\t \t\t\t\"Titanic (1997)\",\r\n\t \t\t\t\"La La Land(2016)\",\r\n\t \t\t\t\"The Vow (2012)\",\r\n\t \t\t\t\"The Notebook (2004)\",\r\n\t \t\t\t\"Carol (2015)\",\"MoviesWindow.png\");\r\n\t \t\r\n\t \tromance2.displayWindow();\r\n\t \t\r\n\t \t\r\n\t \t\r\n\t }else if (nameOfButton == \"Mystery\") {\r\n\t \t Genre mystery = new Genre(\"Mystery\",\r\n\t \t\t\t \" Knives Out (2019)\",\r\n\t \t\t\t \" The Girl With the Dragon Tattoo (2011)\",\r\n\t \t\t\t \" Before I Go to Sleep (2014)\",\r\n\t \t\t\t \" Kiss the Girls (1997)\",\r\n\t \t\t\t \" The Girl on the Train (2016)\",\"MoviesWindow.png\"\r\n\t \t\t\t );\r\n\t\t \t\r\n\t\t \tmystery.displayWindow();\r\n\t }\r\n\r\n \t}\r\n });\r\n\t}", "public void initialize() {\n\n removeAll();\n add(question, \"span, wrap 20\");\n\n final Player player = getMyPlayer();\n final Europe europe = player.getEurope();\n\n // price may have changed\n Collections.sort(trainableUnits, unitPriceComparator);\n\n for (UnitType unitType : trainableUnits) {\n int price = europe.getUnitPrice(unitType);\n JButton newButton = new JButton();\n newButton.setLayout(new MigLayout(\"wrap 2\", \"[60]\", \"[30][30]\"));\n\n ImageIcon unitIcon = getLibrary().getUnitImageIcon(unitType, Role.DEFAULT,\n !player.checkGold(price), 0.66);\n JLabel unitName = localizedLabel(unitType.getNameKey());\n JLabel unitPrice = localizedLabel(StringTemplate.template(\"goldAmount\")\n .addAmount(\"%amount%\", price));\n if (!player.checkGold(price)) {\n unitName.setEnabled(false);\n unitPrice.setEnabled(false);\n newButton.setEnabled(false);\n }\n newButton.add(new JLabel(unitIcon), \"span 1 2\");\n newButton.add(unitName);\n newButton.add(unitPrice);\n newButton.setActionCommand(unitType.getId());\n newButton.addActionListener(this);\n enterPressesWhenFocused(newButton);\n add(newButton, \"grow\");\n }\n add(okButton, \"newline 20, span, tag ok\");\n setSize(getPreferredSize());\n revalidate();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabelHello = new javax.swing.JLabel();\n btnLogout = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n btnStart = new javax.swing.JButton();\n btnHistory = new javax.swing.JButton();\n btnRank = new javax.swing.JButton();\n jLabelName = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabelHello.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jLabelHello.setText(\"Welcome,\");\n\n btnLogout.setText(\"Logout\");\n btnLogout.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLogoutActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jLabel1.setText(\"HOME\");\n jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n\n btnStart.setText(\"START GAME\");\n btnStart.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnStartActionPerformed(evt);\n }\n });\n\n btnHistory.setText(\"HISTORY\");\n btnHistory.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnHistoryActionPerformed(evt);\n }\n });\n\n btnRank.setText(\"RANK\");\n btnRank.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRankActionPerformed(evt);\n }\n });\n\n jLabelName.setFont(new java.awt.Font(\"Tahoma\", 1, 13)); // NOI18N\n jLabelName.setText(\"John\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(224, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(btnStart, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnHistory, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnRank, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnLogout, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(230, 230, 230))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabelHello)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabelName, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())))\n .addGroup(layout.createSequentialGroup()\n .addGap(243, 243, 243)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabelHello)\n .addComponent(jLabelName))\n .addGap(18, 18, 18)\n .addComponent(jLabel1)\n .addGap(26, 26, 26)\n .addComponent(btnStart)\n .addGap(18, 18, 18)\n .addComponent(btnHistory)\n .addGap(18, 18, 18)\n .addComponent(btnRank)\n .addGap(18, 18, 18)\n .addComponent(btnLogout)\n .addContainerGap(47, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private void createButtons() {\n Texture playButtonIdle, playButtonPressed,settingsButtonIdle, settingsButtonPressed, creditsButtonIdle, creditsButtonPressed;\n\n if(game.getLocale().getCountry().equals(\"FI\")){\n playButtonIdle = game.getAssetManager().get(\"BUTTONS/button_startgame_FIN.png\");\n playButtonPressed = game.getAssetManager().get(\"BUTTONS/button_startgame_FIN_PRESSED.png\");\n\n settingsButtonIdle = game.getAssetManager().get(\"BUTTONS/button_startsettings_FIN.png\");\n settingsButtonPressed = game.getAssetManager().get(\"BUTTONS/button_startsettings_FIN_PRESSED.png\");\n\n creditsButtonIdle = game.getAssetManager().get(\"BUTTONS/button_credits_FIN.png\");\n creditsButtonPressed = game.getAssetManager().get(\"BUTTONS/button_credits_FIN_PRESSED.png\");\n }else{\n playButtonIdle = game.getAssetManager().get(\"BUTTONS/button_startgame_ENG.png\");\n playButtonPressed = game.getAssetManager().get(\"BUTTONS/button_startgame_ENG_PRESSED.png\");\n\n settingsButtonIdle = game.getAssetManager().get(\"BUTTONS/button_startsettings_ENG.png\");\n settingsButtonPressed = game.getAssetManager().get(\"BUTTONS/button_startsettings_ENG_PRESSED.png\");\n\n creditsButtonIdle = game.getAssetManager().get(\"BUTTONS/button_credits_ENG.png\");\n creditsButtonPressed = game.getAssetManager().get(\"BUTTONS/button_credits_ENG_PRESSED.png\");\n }\n\n ImageButton playButton = new ImageButton(new TextureRegionDrawable(new TextureRegion(playButtonIdle)), new TextureRegionDrawable(new TextureRegion(playButtonPressed)));\n\n playButton.setPosition(95, 12);\n stage.addActor(playButton);\n\n playButton.addListener(new ChangeListener() {\n // This method is called whenever the actor is clicked. We override its behavior here.\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n game.setScreen(gameScreen);\n }\n });\n\n ImageButton settingsButton = new ImageButton(new TextureRegionDrawable(new TextureRegion(settingsButtonIdle)), new TextureRegionDrawable(new TextureRegion(settingsButtonPressed)));\n\n settingsButton.setPosition(175, 12);\n stage.addActor(settingsButton);\n\n settingsButton.addListener(new ChangeListener() {\n // This method is called whenever the actor is clicked. We override its behavior here.\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n game.setScreen(new OptionsScreen(game));\n }\n });\n\n ImageButton creditsButton = new ImageButton(new TextureRegionDrawable(new TextureRegion(creditsButtonIdle)), new TextureRegionDrawable(new TextureRegion(creditsButtonPressed)));\n\n creditsButton.setPosition(15, 12);\n stage.addActor(creditsButton);\n\n creditsButton.addListener(new ChangeListener() {\n // This method is called whenever the actor is clicked. We override its behavior here.\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n game.setScreen(new CreditsScreen(game));\n }\n });\n }", "private void initComponents() {\n\n\t\tjLabelWelcomeBanner = new javax.swing.JLabel();\n\t\tjButtonNetworkHostGame = new javax.swing.JButton();\n\t\tjButtonLocalGame = new javax.swing.JButton();\n\t\tjButtonNetworkClientGame = new javax.swing.JButton();\n\n\t\tsetDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\t\tsetTitle(\"Euchre\");\n\t\tsetName(\"frameWelcome\"); // NOI18N\n\t\tsetResizable(false);\n\n\t\tjLabelWelcomeBanner.setFont(new java.awt.Font(\"DejaVu Sans\", 0, 24));\n\t\tjLabelWelcomeBanner.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n\t\tjLabelWelcomeBanner.setText(\"Welcome to Euchre, which type of game do you wish to play?\");\n\n\t\tjButtonNetworkHostGame.setFont(new java.awt.Font(\"DejaVu Sans\", 0, 16));\n\t\tjButtonNetworkHostGame.setText(\"Start a Euchre Game\");\n\t\tjButtonNetworkHostGame.addMouseListener(new java.awt.event.MouseAdapter() {\n\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent evt) {\n\t\t\t\tchoseNetwork(evt);\n\t\t\t\tnetworkHost(evt);\n\t\t\t}\n\t\t});\n\n\t\tjButtonLocalGame.setFont(new java.awt.Font(\"DejaVu Sans\", 0, 16));\n\t\tjButtonLocalGame.setText(\"Play against the Computer\");\n\t\tjButtonLocalGame.addMouseListener(new java.awt.event.MouseAdapter() {\n\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent evt) {\n\t\t\t\tchoseLocal(evt);\n\t\t\t}\n\t\t});\n\n\t\tjButtonNetworkClientGame.setFont(new java.awt.Font(\"DejaVu Sans\", 0, 16));\n\t\tjButtonNetworkClientGame.setText(\"Join a Euchre Game\");\n\t\tjButtonNetworkClientGame.addMouseListener(new java.awt.event.MouseAdapter() {\n\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent evt) {\n\t\t\t\tnetworkClient(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n\t\tgetContentPane().setLayout(layout);\n\t\tlayout.setHorizontalGroup(\n\t\t\t\tlayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addComponent(jLabelWelcomeBanner, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(54, 54, 54)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(jButtonLocalGame, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(jButtonNetworkHostGame, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(jButtonNetworkClientGame, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(jLabelWelcomeBanner, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(57, 57, 57)\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(jButtonLocalGame, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(jButtonNetworkHostGame, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(jButtonNetworkClientGame, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t.addContainerGap(47, Short.MAX_VALUE))\n\t\t);\n\n\t\tpack();\n\t}", "public MenuPanel(ActionListener addCreature1, ActionListener addCreature2,\n ActionListener addCreature3, ActionListener placePortal,\n String name, int winCondition) {\n\n setLayout(new GridLayout(9,0));\n setPreferredSize(new Dimension(200,700));\n Font f = new Font(\"Courier New\", Font.PLAIN, 15);\n Font f2 = new Font(\"Courier New\", Font.PLAIN, 25);\n this.winCondition = winCondition;\n JLabel mapName = new JLabel(name,SwingConstants.CENTER);\n mapName.setFont(f2);\n add(mapName);\n\n JButton button = new JButton();\n button.setHorizontalAlignment(SwingConstants.LEFT);\n button.setFont(f);\n button.setText(\"<html><b>Speed Demon</b><br>Cost: \" +\n SpeedDemon.COST + \"<br>Speed: \"+SpeedDemon.SPEED+\"<br>HP: \"+\n SpeedDemon.MAXHEALTH+\"</html>\");\n button.setIcon(new ImageIcon(SpeedDemon.image));\n button.addActionListener(addCreature1);\n add(button);\n\n button = new JButton();\n button.setHorizontalAlignment(SwingConstants.LEFT);\n button.setFont(f);\n button.setText(\"<html><b>Grunt</b><br>Cost: \" +\n Grunt.COST + \"<br>Speed: \"+Grunt.SPEED+\"<br>HP: \"+\n Grunt.MAXHEALTH+\"</html>\");\n button.setIcon(new ImageIcon(Grunt.image));\n button.addActionListener(addCreature2);\n add(button);\n\n button = new JButton();\n button.setHorizontalAlignment(SwingConstants.LEFT);\n button.setFont(f);\n button.setText(\"<html><b>PortalusTotalus</b><br>Cost: \" +\n PortalusTotalus.COST + \"<br>Speed: \"+ PortalusTotalus.SPEED +\n \"<br>HP: \"+ PortalusTotalus.MAXHEALTH +\"</html>\");\n button.setIcon(new ImageIcon(PortalusTotalus.image));\n button.addActionListener(addCreature3);\n add(button);\n\n button = new JButton();\n button.setFont(f);\n button.setHorizontalAlignment(SwingConstants.LEFT);\n button.setIcon(new ImageIcon(ImageLoader.getImageLoader().getImage(\n \"portal.png\")));\n button.setText(\"<html><b>Place Portal</b></html>\");\n button.addActionListener(placePortal);\n add(button);\n\n winProgressLabel = new JLabel(\"\",SwingConstants.LEFT);\n winProgressLabel.setFont(f);\n\n creditLabel = new JLabel(\"\",SwingConstants.LEFT);\n creditLabel.setFont(f);\n\n scoreLabel = new JLabel(\"\",SwingConstants.LEFT);\n scoreLabel.setFont(f);\n\n updateStats(0,0,0);\n add(winProgressLabel);\n add(creditLabel);\n add(scoreLabel);\n\n }", "private void addButtons() {\r\n\t\troot.getChildren().add(button); // creating the Easy button \r\n\t\tb1 = new Button(\"Easy\");\r\n\t\tb1.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Easy\";\r\n\t\t\t}\r\n\t\t});\r\n\t\troot.getChildren().add(b1); // creating the Normal button\r\n\t\tb2 = new Button(\"Normal\");\r\n\t\tb2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Normal\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb2.setLayoutX(50);\r\n\t\troot.getChildren().add(b2); // creating the Hard button\r\n\t\tb3 = new Button(\"Hard\");\r\n\t\tb3.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Hard\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb3.setLayoutX(115);\r\n\t\troot.getChildren().add(b3);\r\n\t}", "public static void main(String[] args) throws IOException {\n //create the game as an object for listener access, and create the frame/pane\n Adventure theGame = new Adventure(); \n JFrame frame = new JFrame(\"Test Subject 525's Deep Space Adventure\");\n Container pane = frame.getContentPane();\n \n //custom fonts for GUI\n Font gameFont = new Font(\"Georgia\", Font.ITALIC, 16);\n Font directionalFont = new Font(\"Papyrus\", Font.BOLD, 30);\n Font utilitiesFont = new Font(\"Georgia\", Font.BOLD, 30);\n \n //create the buttons, input field, output text area, and a label\n JTextField inputArea = new JTextField();\n JTextArea outputArea = new JTextArea();\n JButton north = new JButton(\"NORTH\");\n JButton east = new JButton(\"EAST\");\n JButton south = new JButton(\"SOUTH\");\n JButton west = new JButton(\"WEST\");\n JButton instruct = new JButton(\"INSTRUCTIONS\");\n JButton quit = new JButton(\"QUIT\");\n JButton current = new JButton(\"CURRENT ROOM\");\n JLabel title = new JLabel(\"CONTROL PAD\", SwingConstants.CENTER);\n \n //apply the custom fonts accordingly to components\n inputArea.setFont(gameFont);\n outputArea.setFont(gameFont);\n north.setFont(directionalFont);\n east.setFont(directionalFont);\n west.setFont(directionalFont);\n south.setFont(directionalFont);\n quit.setFont(utilitiesFont);\n instruct.setFont(utilitiesFont);\n current.setFont(utilitiesFont);\n title.setFont(utilitiesFont);\n \n //set initial pane's layout to 0 rows, 1 column, and place the output area in it\n pane.setLayout(new GridLayout(0,1));\n outputArea.setText(theGame.printInstructions());\n outputArea.setEditable(false); //don't make it editable\n pane.add(outputArea);\n \n //make a new panel for buttons below the initial pane\n JPanel buttons = new JPanel();\n buttons.setLayout(new GridLayout(3,3)); //3 rows, 3 columns\n buttons.add(current);\n buttons.add(north);\n buttons.add(title);\n buttons.add(west);\n buttons.add(inputArea);\n buttons.add(east);\n buttons.add(instruct);\n buttons.add(south);\n buttons.add(quit);\n pane.add(buttons);\n \n //add listener to input area\n InputListener inputFunctionality = new InputListener(theGame, outputArea, inputArea, frame);\n inputArea.addActionListener(inputFunctionality);\n \n //add listener to buttons\n ButtonListener buttonFunctionality = new ButtonListener(theGame, outputArea, frame);\n north.addActionListener(buttonFunctionality);\n south.addActionListener(buttonFunctionality);\n west.addActionListener(buttonFunctionality);\n east.addActionListener(buttonFunctionality);\n quit.addActionListener(buttonFunctionality);\n instruct.addActionListener(buttonFunctionality);\n current.addActionListener(buttonFunctionality);\n frame.setSize(1050,850); //set the initial frame size\n frame.setVisible(true);\n \n //make it so that the GUI frame appears at the center of the screen instead of the top left\n Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();\n int x = (int) ((dimension.getWidth()-frame.getWidth()) / 2);\n int y = (int) ((dimension.getHeight()-frame.getHeight()) / 2);\n frame.setLocation(x, y);\n \n //seed generation for testing\n Random rand;\n if (args.length == 2) {\n // use a seed if provided for testing\n rand = new Random(Integer.parseInt(args[1]));\n }\n else {\n rand = new Random(); // let it be really random\n }\n if (args.length >= 1) {\n theGame.entryWay = randomWorld(args[0], rand);\n }\n else {\n theGame.entryWay = randomWorld(\"world.txt\", rand);\n }\n //always moves the player to the entry way at the start \n theGame.player.moveTo(theGame.entryWay); \n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Play\");\n\t\tbtnNewButton.setFont(new Font(\"Bodoni 72\", Font.BOLD, 13));\n\t\tbtnNewButton.setBounds(frame.getWidth() / 2 - 60, 195, 120, 30);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Space Escape\");\n\t\tlblNewLabel.setForeground(Color.WHITE);\n\t\tlblNewLabel.setFont(new Font(\"Bodoni 72\", Font.BOLD, 24));\n\t\tlblNewLabel.setBounds(frame.getWidth() / 2 - 60, 30, 135, 25);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"New label\");\n\t\tlblNewLabel_1.setBounds(0, 0, frame.getWidth(), frame.getHeight());\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t}", "private void updateButtons() {\n\t\tsetTitle(\"Insert \" + title + \"\\t\\tPage \" + pagenum + \"/\" + MAX_PAGE);\n\t\t// update button labels\n\t\tint symbx = pageoffset;\n\t\tint stop = symbx + 9;\n\t\tint nomore = stop;\n\t\tint symsize = getSymbolSize();\n\t\tif (nomore >= symsize - 1) {\n\t\t\tnomore = symsize - 1;\n\t\t}\n\t\tfor (int buttx = 0; symbx <= stop; symbx++) {\n\t\t\t// Log.d(\"SymbolDialog - updateButtons\", \"buttx: \" + buttx +\n\t\t\t// \" symbx: \" + symbx);\n\t\t\tif (symbx > nomore) {\n\t\t\t\t((TextView) mainview.findViewById(buttons[buttx])).setText(\"\");\n\t\t\t} else {\n\t\t\t\t((TextView) mainview.findViewById(buttons[buttx]))\n\t\t\t\t\t\t.setText(String.valueOf(getSymbol(symbx)));\n\t\t\t}\n\t\t\tbuttx++;\n\t\t}\n\t}", "private void initialize() {\n\t\t\n\t\t//connectToSQL();\n\t\t\n\t\tframe = new JFrame();\n\t\tframe.setMinimumSize(new Dimension(800, 400));\n\t\tframe.setMaximumSize(new Dimension(800, 400));\n\t\tframe.setBounds(600, 300, windowWidth, windowHeight);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tJPanel panel = new JPanel();\n\t\tframe.getContentPane().add(panel, BorderLayout.NORTH);\n\t\tpanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n\t\tlabel_2 = new JLabel(\"\\u5927\\u6A02\\u900F\");\n\t\tlabel_2.setSize(new Dimension(24, 24));\n\t\tlblNewLabel = new JLabel(\"New label\");\n\t\tJPanel panel_1 = new JPanel();\n\t\tframe.getContentPane().add(panel_1, BorderLayout.NORTH);\n\t\tpanel_1.setLayout(new GridLayout(0, 2, 0, 0));\n\t\tJLabel lblWelcome = new JLabel(\"\\u6B61\\u8FCE\\u5149\\u81E8\");\n\t\tlblWelcome.setFont(new Font(\"新細明體\", Font.PLAIN, 38));\n\t\tlblUserName = new JLabel(\"New label\");\n\t\tlblUserName.setFont(new Font(\"新細明體\", Font.PLAIN, 42));\n\t\tlblUserName.setForeground(Color.BLACK); //字體顏色\n\t\tlblUserName.setBackground(Color.ORANGE); //背景顏色\n\t\tlblUserName.setOpaque(true); //透明,讓背景色可以顯示出來\n\t\t\n\t\n\t\t\n\t\tJLabel lblPreviousNumber = new JLabel(\"\\u60A8\\u4E0A\\u671F\\u6240\\u9078\\u7684\\u865F\\u78BC\\u70BA:\");\n\t\tlblPreviousNumber.setFont(new Font(\"新細明體\", Font.PLAIN, 38));\n\t\tlblPreviousNumber.setPreferredSize(new Dimension(108, 34));\n\t\tlblPreviousNumber.setMinimumSize(new Dimension(108, 34));\n\t\tlblPickNumber = new JLabel(\"New label\"); \n\t\tlblPickNumber.setFont(new Font(\"新細明體\", Font.PLAIN, 42));\n\t\t\n\t\tbtnPreviousNumber = new JButton(\"\\u4E0A\\u671F\\u865F\\u78BC\");\n\t\tbtnPreviousNumber.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlblUserName.setText(getUserNumber(\"UserName\"));\n\t\t\t\t\n\t\t\t\t/*使用者選的號碼(根據日期的功能尚未完成)**/\n\t\t\t\t//String number = numbersToString(getPickedNumberByDate());\n\t\t\t\tArrayList<String> list = getPickedNumberByDate();\n\t\t\t\tString str = numbersToString(list);\n\t\t\t\tlblPickNumber.setText(str);\n\t\t\t\t//lblPickNumber.setText(getUserNumber(\"PickNumber\"));\n\t\t\t\t\n\t\t\t\t\n\t\t}});\n\t\t\n\t\t\n\t\tpanel.add(label_2);\n\t\tpanel.add(lblNewLabel);\n\t\t\n\t\tlblBigLottery = new JLabel(\"\\u5927\\u6A02\\u900F\");\n\t\tlblBigLottery.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\n\t\tlblBigLottery.setFont(new Font(\"新細明體\", Font.PLAIN, 45));\n\t\tpanel_1.add(lblBigLottery);\n\t\t\n\t\tlblDate = new JLabel(getdate());\n\t\tlblDate.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\n\t\tlblDate.setFont(new Font(\"新細明體\", Font.PLAIN, 38));\n\t\tpanel_1.add(lblDate);\n\t\tpanel_1.add(lblWelcome);\n\t\tpanel_1.add(lblUserName);\n\t\tpanel_1.add(lblPreviousNumber);\n\t\tpanel_1.add(lblPickNumber);\n\t\tframe.getContentPane().add(btnPreviousNumber, BorderLayout.WEST);\n\t\t\n\t\t\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setMinimumSize(new java.awt.Dimension(1000, 1000));\n getContentPane().setLayout(null);\n\n jLabel2.setFont(new java.awt.Font(\"Tiger\", 3, 36));\n jLabel2.setForeground(new java.awt.Color(255, 0, 51));\n jLabel2.setText(\"ROAD MAP VIEW\");\n getContentPane().add(jLabel2);\n jLabel2.setBounds(80, 10, 460, 60);\n\n jButton3.setFont(new java.awt.Font(\"Trebuchet MS\", 3, 18));\n jButton3.setText(\"HOME\");\n jButton3.setToolTipText(\"move main panel\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton3);\n jButton3.setBounds(650, 180, 90, 100);\n\n jButton2.setFont(new java.awt.Font(\"Trebuchet MS\", 3, 18));\n jButton2.setText(\"EXIT\");\n jButton2.setToolTipText(\"end application\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2);\n jButton2.setBounds(650, 350, 90, 90);\n\n jLabel1.setBackground(new java.awt.Color(255, 51, 153));\n jLabel1.setFont(new java.awt.Font(\"Tempus Sans ITC\", 3, 24));\n jLabel1.setForeground(new java.awt.Color(255, 51, 102));\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/HOSPITAL_MANAGEMENT/F2.JPG\"))); // NOI18N\n jLabel1.setText(\"jLabel1\");\n getContentPane().add(jLabel1);\n jLabel1.setBounds(0, 0, 640, 570);\n\n pack();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"1\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnumber(\"1\");\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(6, 69, 58, 29);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJButton button = new JButton(\"2\");\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnumber(\"2\");\n\t\t\t}\n\t\t});\n\t\tbutton.setBounds(58, 69, 58, 29);\n\t\tframe.getContentPane().add(button);\n\t\t\n\t\tJButton button_1 = new JButton(\"3\");\n\t\tbutton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnumber(\"3\");\n\t\t\t}\n\t\t});\n\t\tbutton_1.setBounds(111, 69, 58, 29);\n\t\tframe.getContentPane().add(button_1);\n\t\t\n\t\tJButton button_2 = new JButton(\"4\");\n\t\tbutton_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnumber(\"4\");\n\t\t\t}\n\t\t});\n\t\tbutton_2.setBounds(6, 98, 58, 29);\n\t\tframe.getContentPane().add(button_2);\n\t\t\n\t\tJButton button_3 = new JButton(\"5\");\n\t\tbutton_3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnumber(\"5\");\n\t\t\t}\n\t\t});\n\t\tbutton_3.setBounds(58, 98, 58, 29);\n\t\tframe.getContentPane().add(button_3);\n\t\t\n\t\tJButton button_4 = new JButton(\"6\");\n\t\tbutton_4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnumber(\"6\");\n\t\t\t}\n\t\t});\n\t\tbutton_4.setBounds(111, 98, 58, 29);\n\t\tframe.getContentPane().add(button_4);\n\t\t\n\t\tJButton button_5 = new JButton(\"7\");\n\t\tbutton_5.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnumber(\"7\");\n\t\t\t}\n\t\t});\n\t\tbutton_5.setBounds(6, 127, 58, 29);\n\t\tframe.getContentPane().add(button_5);\n\t\t\n\t\tJButton button_6 = new JButton(\"8\");\n\t\tbutton_6.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnumber(\"8\");\n\t\t\t}\n\t\t});\n\t\tbutton_6.setBounds(58, 127, 58, 29);\n\t\tframe.getContentPane().add(button_6);\n\t\t\n\t\tJButton button_7 = new JButton(\"9\");\n\t\tbutton_7.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnumber(\"9\");\n\t\t\t}\n\t\t});\n\t\tbutton_7.setBounds(111, 127, 58, 29);\n\t\tframe.getContentPane().add(button_7);\n\t\t\n\t\tJButton button_8 = new JButton(\".\");\n\t\tbutton_8.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(edit_flag == true)\n\t\t\t\t{\n\t\t\t\t\tif(editing ==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tdec = true;\n\t\t\t\t\t\tnum1 = num1+\".\";\n\t\t\t\t\t\tval = Double.parseDouble(num1);\n\t\t\t\t\t//System.out.println(val);\n\t\t\t\t\t\ttextField.setText(\"\"+(int)val);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdec2 = true;\n\t\t\t\t\t\tnum2 = num2+\".\";\n\t\t\t\t\t\tval2 = Double.parseDouble(num2);\n\t\t\t\t\t//System.out.println(val2);\n\t\t\t\t\t\ttextField.setText(\"\"+(int)val2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(c_flag == 0)//go in val\n\t\t\t\t\t{\n\t\t\t\t\t\tdec = true;\n\t\t\t\t\t\tnum1 = num1+\".\";\n\t\t\t\t\t\tval = Double.parseDouble(num1);\n\t\t\t\t\t//System.out.println(val);\n\t\t\t\t\t\ttextField.setText(\"\"+(int)val);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdec2 = true;\n\t\t\t\t\t\tnum2 = num2+\".\";\n\t\t\t\t\t\tval2 = Double.parseDouble(num2);\n\t\t\t\t\t//System.out.println(val2);\n\t\t\t\t\t\ttextField.setText(\"\"+(int)val2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbutton_8.setBounds(6, 157, 58, 29);\n\t\tframe.getContentPane().add(button_8);\n\t\t\n\t\tJButton button_9 = new JButton(\"0\");\n\t\tbutton_9.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnumber(\"0\");\n\t\t\t}\n\t\t});\n\t\tbutton_9.setBounds(58, 157, 58, 29);\n\t\tframe.getContentPane().add(button_9);\n\t\t\n\t\tJButton button_10 = new JButton(\"=\");\n\t\tbutton_10.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tprint();\n\t\t\t\ttotal_flag = true;\n\t\t\t\tdec = false;\n\t\t\t\tdec2 = false;\n\t\t\t\tc_flag = 0;\n\t\t\t\t//val = 0;\n\t\t\t\t//val2 = 0;\n\t\t\t\tnum1 = \"\";\n\t\t\t\tnum2 = \"\";\n\t\t\t}\n\t\t});\n\t\tbutton_10.setBounds(111, 157, 58, 29);\n\t\tframe.getContentPane().add(button_10);\n\t\t\n\t\tJButton button_11 = new JButton(\"+\");\n\t\tbutton_11.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(pos);\n\t\t\t\tc_flag++;\n\t\t\t\t//System.out.println(\"You have pressed +\");\n\t\t\t\toperator = '+';\n\t\t\t}\n\t\t});\n\t\tbutton_11.setBounds(181, 69, 85, 29);\n\t\tframe.getContentPane().add(button_11);\n\t\t\n\t\tJButton button_12 = new JButton(\"-\");\n\t\tbutton_12.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tc_flag++;\n\t\t\t\t//System.out.println(\"You have pressed -\");\n\t\t\t\toperator = '-';\n\t\t\t}\n\t\t});\n\t\tbutton_12.setBounds(181, 98, 85, 29);\n\t\tframe.getContentPane().add(button_12);\n\t\t\n\t\tJButton button_13 = new JButton(\"/\");\n\t\tbutton_13.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tc_flag++;\n\t\t\t\t//System.out.println(\"You have pressed /\");\n\t\t\t\toperator = '/';\n\t\t\t}\n\t\t});\n\t\tbutton_13.setBounds(181, 127, 85, 29);\n\t\tframe.getContentPane().add(button_13);\n\t\t\n\t\tJButton button_14 = new JButton(\"*\");\n\t\tbutton_14.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tc_flag++;\n\t\t\t\t//System.out.println(\"You have pressed *\");\n\t\t\t\toperator = '*';\n\t\t\t}\n\t\t});\n\t\tbutton_14.setBounds(181, 157, 85, 29);\n\t\tframe.getContentPane().add(button_14);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(6, 29, 260, 28);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t\t\n\t\tJButton btnCe = new JButton(\"CE\");\n\t\tbtnCe.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdec = false;\n\t\t\t\tdec2 = false;\n\t\t\t\tedit_flag = false;\n\t\t\t\tc_flag = 0;\n\t\t\t\tval = 0;\n\t\t\t\tval2 = 0;\n\t\t\t\ttotal = 0;\n\t\t\t\tnum1 = \"\";\n\t\t\t\tnum2 = \"\";\n\t\t\t\ttextField.setText(\"\");\n\t\t\t\tlist.clear();\n\t\t\t}\n\t\t});\n\t\tbtnCe.setBounds(6, 191, 58, 29);\n\t\tframe.getContentPane().add(btnCe);\n\t\t\n\t\tJButton btnNewButton_1 = new JButton(\"<\");\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfor(int i = 0; i < list.size()-3; i++)\n\t\t\t\t{\n\t\t\t\t\tlist.remove(i);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"size = \"+list.size());\n\t\t\t\ttheList(-1);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setBounds(68, 191, 43, 29);\n\t\tframe.getContentPane().add(btnNewButton_1);\n\t\t\n\t\tJButton btnNewButton_2 = new JButton(\">\");\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfor(int i = 0; i < list.size()-3; i++)\n\t\t\t\t{\n\t\t\t\t\tlist.remove(i);\n\t\t\t\t}\n\t\t\t\ttheList(1);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setBounds(121, 191, 43, 29);\n\t\tframe.getContentPane().add(btnNewButton_2);\n\t\t\n\t\tJButton btnNewButton_3 = new JButton(\"EDIT\");\n\t\tbtnNewButton_3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttextField.setText(\"\");\n\t\t\t\tedit_flag = true;\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_3.setBounds(181, 191, 85, 29);\n\t\tframe.getContentPane().add(btnNewButton_3);\n\t}", "private void addLabelsInventory() {\r\n \tjcomp1 = new JLabel (\"Inventory Management\");\r\n \tjcomp2 = new JLabel (\"Search Tools By:\");\r\n \tjcomp3 = new JLabel (\"Tool Id\");\r\n jcomp4 = new JLabel (\"Name\");\r\n jcomp5 = new JLabel (\"Tool Type\");\r\n jcomp6 = new JLabel (\"Stock\");\r\n jcomp7 = new JLabel (\"Price\");\r\n jcomp8 = new JLabel (\"Supplier Id\");\r\n jcomp9 = new JLabel (\"Tool Information\");\r\n jcomp10 = new JLabel (\"Power Type\");\r\n \r\n add(jcomp1);\r\n add(jcomp2);\r\n add(jcomp3);\r\n add(jcomp4);\r\n add(jcomp5);\r\n add(jcomp6);\r\n add(jcomp7);\r\n add(jcomp8);\r\n add(jcomp9);\r\n add(jcomp10);\r\n \r\n jcomp1.setBounds (375, 50, 155, 45);\r\n jcomp2.setBounds (100, 130, 100, 25);\r\n jcomp3.setBounds (610, 290, 80, 25);\r\n jcomp4.setBounds (610, 330, 80, 25);\r\n jcomp5.setBounds (610, 370, 80, 25);\r\n jcomp6.setBounds (610, 410, 80, 25);\r\n jcomp7.setBounds (610, 450, 80, 25);\r\n jcomp8.setBounds (610, 490, 80, 25);\r\n jcomp9.setBounds (640, 250, 100, 25);\r\n jcomp10.setBounds (610, 530, 80, 25);\r\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 820, 430);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tframe.getContentPane().add(panel, BorderLayout.CENTER);\r\n\t\tpanel.setLayout(new GridLayout(3, 5, 2, 2));\r\n\t\t\r\n\t\tJPanel panel_3 = new JPanel();\r\n\t\tpanel_3.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_3);\r\n\t\tpanel_3.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button1's code action listner\r\n\t\t\r\n\t\tbtnButton = new JButton(\"\");\r\n\t\tbtnButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_3.add(btnButton, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_4 = new JPanel();\r\n\t\tpanel_4.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_4);\r\n\t\tpanel_4.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button2's code action listner\r\n\t\t\r\n\t\t\r\n\t\tbtnButton_1 = new JButton(\"\");\r\n\t\tbtnButton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton_1.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_1.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_1.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_4.add(btnButton_1, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_5 = new JPanel();\r\n\t\tpanel_5.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_5);\r\n\t\tpanel_5.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t\r\n\t\t//button3's code goes here\r\n\t\t\r\n\t\tbtnButton_2 = new JButton(\"\");\r\n\t\tbtnButton_2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton_2.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_2.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_2.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton_2.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_5.add(btnButton_2, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_2 = new JPanel();\r\n\t\tpanel_2.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_2);\r\n\t\tpanel_2.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\ttxtTayyabaSuleman = new JTextField();\r\n\t\ttxtTayyabaSuleman.setForeground(Color.GREEN);\r\n\t\ttxtTayyabaSuleman.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\ttxtTayyabaSuleman.setText(\"TAYYABA SULEMAN\");\r\n\t\tpanel_2.add(txtTayyabaSuleman, BorderLayout.CENTER);\r\n\t\ttxtTayyabaSuleman.setColumns(10);\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_1);\r\n\t\tpanel_1.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tJButton btnReset = new JButton(\"Reset\");\r\n\t\tbtnReset.setForeground(Color.BLUE);\r\n\t\tpanel_1.add(btnReset, BorderLayout.SOUTH);\r\n\t\tbtnReset.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t btnButton.setText(null);//button1\r\n\t\t\t btnButton_1.setText(null);//button2\r\n\t\t\t btnButton_2.setText(null);//button3\r\n\t\t\t btnButton_3.setText(null);//button4\r\n\t\t\t btnButton_4.setText(null);//button5\r\n\t\t\t btnButton_5.setText(null);//button6\r\n\t\t\t btnButton_6.setText(null);//button7\r\n\t\t\t btnButton_7.setText(null);//button8\r\n\t\t\t btnNewButton.setText(null);//button9\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnReset.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\t\r\n\t\tJButton btnExit = new JButton(\"Exit\");\r\n\t\tbtnExit.setForeground(Color.RED);\r\n\t\tpanel_1.add(btnExit, BorderLayout.NORTH);\r\n\t\tbtnExit.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\tbtnExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t frame=new JFrame(\"Exit\");\r\n\t\t if(JOptionPane.showConfirmDialog(frame,\"confirm if you want to exit game\",\r\n\t\t \t\t \"tic tac toe\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_NO_OPTION);\r\n\t\t System.exit(0);\r\n\t\t \r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJPanel panel_6 = new JPanel();\r\n\t\tpanel_6.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_6);\r\n\t\tpanel_6.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button4's code goes here\r\n\t\t\r\n\t\tbtnButton_3 = new JButton(\"\");\r\n\t\tbtnButton_3.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton_3.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_3.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_3.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tbtnButton_3.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_6.add(btnButton_3, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_15 = new JPanel();\r\n\t\tpanel_15.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_15);\r\n\t\tpanel_15.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button5's code goes here\r\n\t\t\r\n\t\tbtnButton_4 = new JButton(\"\");\r\n\t\tbtnButton_4.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton_4.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_4.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_4.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton_4.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_15.add(btnButton_4, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_8 = new JPanel();\r\n\t\tpanel_8.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_8);\r\n\t\tpanel_8.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button6's code goes here\r\n\t\t\r\n\t\tbtnButton_5 = new JButton(\"\");\r\n\t\tbtnButton_5.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton_5.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_5.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_5.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton_5.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_8.add(btnButton_5, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_13 = new JPanel();\r\n\t\tpanel_13.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_13);\r\n\t\tpanel_13.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tJLabel lblPlayerx = new JLabel(\"playerX\");\r\n\t\tlblPlayerx.setForeground(Color.RED);\r\n\t\tpanel_13.add(lblPlayerx, BorderLayout.CENTER);\r\n\t\tlblPlayerx.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\t\r\n\t\tJPanel panel_14 = new JPanel();\r\n\t\tpanel_14.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_14);\r\n\t\tpanel_14.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\ttxtcount_X = new JTextField();\r\n\t\ttxtcount_X.setForeground(Color.RED);\r\n\t\tpanel_14.add(txtcount_X, BorderLayout.CENTER);\r\n\t\ttxtcount_X.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\ttxtcount_X.setText(\"0\");\r\n\t\ttxtcount_X.setColumns(10);\r\n\t\t\r\n\t\tJPanel panel_11 = new JPanel();\r\n\t\tpanel_11.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_11);\r\n\t\tpanel_11.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button7's code goes here\r\n\t\t\r\n\t\tbtnButton_6 = new JButton(\"\");\r\n\t\tbtnButton_6.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tbtnButton_6.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_6.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_6.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton_6.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_11.add(btnButton_6, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_16 = new JPanel();\r\n\t\tpanel_16.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_16);\r\n\t\tpanel_16.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button8's code goes here\r\n\t\t\r\n\t\tbtnButton_7 = new JButton(\"\");\r\n\t\tbtnButton_7.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton_7.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_7.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_7.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton_7.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_16.add(btnButton_7, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_12 = new JPanel();\r\n\t\tpanel_12.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_12);\r\n\t\tpanel_12.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button9's code goes here\r\n\t\t\r\n\t\tbtnNewButton = new JButton(\"\");\r\n\t\tbtnNewButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\tbtnNewButton.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnNewButton.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnNewButton.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tpanel_12.add(btnNewButton, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_9 = new JPanel();\r\n\t\tpanel_9.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_9);\r\n\t\tpanel_9.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tJLabel lblPlayero = new JLabel(\"PlayerO\");\r\n\t\tlblPlayero.setForeground(Color.BLUE);\r\n\t\tpanel_9.add(lblPlayero, BorderLayout.CENTER);\r\n\t\tlblPlayero.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\t\r\n\t\tJPanel panel_7 = new JPanel();\r\n\t\tpanel_7.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_7);\r\n\t\tpanel_7.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\ttxtcount_o = new JTextField();\r\n\t\ttxtcount_o.setForeground(Color.BLUE);\r\n\t\tpanel_7.add(txtcount_o, BorderLayout.CENTER);\r\n\t\ttxtcount_o.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\ttxtcount_o.setText(\"0\");\r\n\t\ttxtcount_o.setColumns(10);\r\n\t}", "public void initGui()\n {\n Keyboard.enableRepeatEvents(true);\n this.buttons.clear();\n GuiButton guibutton = this.addButton(new GuiButton(3, this.width / 2 - 100, this.height / 4 + 24 + 12, I18n.format(\"selectWorld.edit.resetIcon\")));\n this.buttons.add(new GuiButton(4, this.width / 2 - 100, this.height / 4 + 48 + 12, I18n.format(\"selectWorld.edit.openFolder\")));\n this.buttons.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format(\"selectWorld.edit.save\")));\n this.buttons.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format(\"gui.cancel\")));\n guibutton.enabled = this.mc.getSaveLoader().getFile(this.worldId, \"icon.png\").isFile();\n ISaveFormat isaveformat = this.mc.getSaveLoader();\n WorldInfo worldinfo = isaveformat.getWorldInfo(this.worldId);\n String s = worldinfo == null ? \"\" : worldinfo.getWorldName();\n this.nameEdit = new GuiTextField(2, this.fontRenderer, this.width / 2 - 100, 60, 200, 20);\n this.nameEdit.setFocused(true);\n this.nameEdit.setText(s);\n }", "public void initComponents(){\t\r\n\t\tsetName(\"dialog01\");\r\n\t\tsetTitle(\"Candle Exercise\");\r\n\t\tsetBounds(100, 100, 356, 300);\r\n\t\tgetContentPane().setLayout(new BorderLayout());\r\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tgetContentPane().add(contentPanel, BorderLayout.CENTER);\r\n\t\tcontentPanel.setLayout(null);\r\n\t\tFont font = new Font(\"Tahoma\", Font.PLAIN, 13);\r\n\r\n\t\tbtnCurrent = new JButton(\"Show Labels\");\r\n\t\tbtnCurrent.setToolTipText(\"shows current best data saved\");\r\n\t\tbtnCurrent.setFont(new Font(\"Tahoma\", Font.PLAIN, 13));\r\n\t\tbtnCurrent.setFocusPainted(false);\r\n\t\tbtnCurrent.setBounds(68, 77, 214, 88);\r\n\t\tcontentPanel.add(btnCurrent);\r\n\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setIconImage(Toolkit.getDefaultToolkit().getImage(\"C:\\\\Users\\\\liujianlong\\\\Desktop\\\\\\u533B\\u751F\\u5BA2\\u6237\\u7AEF\\\\image\\\\11.jpg\"));\n\t\tframe.setResizable(false);\n\t\tframe.setBounds(new Rectangle(600, 200, 800, 600));\n\t\tframe.setBounds(600, 200, 800, 600);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJLabel lblKeshi = new JLabel(hospital_windows.keshi);\n\t\tlblKeshi.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblKeshi.setBorder(new LineBorder(new Color(0, 0, 0)));\n\t\tlblKeshi.setForeground(new Color(255, 0, 0));\n\t\tlblKeshi.setBounds(32, 13, 221, 50);\n\t\tlblKeshi.setFont(new Font(\"宋体\", Font.PLAIN, 26));\n\t\t\n\t\tJLabel lblid = new JLabel(\"\\u60A3\\u8005\\u8D26\\u53F7\\uFF1A\");\n\t\tlblid.setBounds(32, 130, 90, 24);\n\t\tlblid.setBackground(new Color(255, 255, 255));\n\t\tlblid.setForeground(new Color(0, 0, 0));\n\t\tlblid.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\t\n\t\tJLabel lblNewLabel_5 = new JLabel(\"\\u67E5\\u8BE2\\u4FE1\\u606F\");//预先定义\n\t\tJTextArea textArea = new JTextArea();\n\t\tJButton btnNewButton_1 = new JButton(\"\\u6DFB\\u52A0\");\n\t\tJButton btnNewButton_2 = new JButton(\"\\u5F00\\u836F\");\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tString x=hospital.yaodan(textField.getText());\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttextArea.setText(\"\");\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tJButton btnNewButton = new JButton(\"\\u67E5\\u8BE2\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tint x=0;\n\t\t\t\tString s=null;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\ts=hospital.login(textField.getText(),\"x\",3);\n\t\t\t\t\tpatientID=textField.getText();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}//登陆\n\t\t\t\t\n\t\t\t\t String strs[]=s.split(\",\"); //strs[0]=账号 ,strs[1]=密码,strs[2]=账户类型,strs[3]=服务端类型号\n\t\t\t\t x=Integer.parseInt(strs[0]);\t//接收服务器传来的成功或失败信号\t \n\t\t\t\t int type=Integer.parseInt(strs[2]);\n\t\t\t\t\tif(x==1||x==3){//用户存在\n\t\t\t\t\t\tif(type==2){System.out.println(\"chaxunchengg\");\n\t\t\t\t\t\t\tlblNewLabel_5.setVisible(true);\n\t\t\t\t\t\t\tlblNewLabel_5.setText(patientID+\"患者验证成功!\");\n\t\t\t\t\t\t\tbtnNewButton_1.setVisible(true);\n\t\t\t\t\t\t\tbtnNewButton_2.setVisible(true);\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\telse if(x==2){//登陆失败\n\t\t\t\t\t\tlblNewLabel_5.setVisible(true);\n\t\t\t\t\t\tlblNewLabel_5.setText(\"系统无该患者信息!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(x);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(new Color(255, 0, 0));\n\t\tbtnNewButton.setBounds(280, 130, 83, 27);\n\t\tbtnNewButton.setFont(new Font(\"宋体\", Font.PLAIN, 17));\n\t\t\n\t\tJComboBox comboBox = new JComboBox();\n\t\tcomboBox.setBounds(121, 245, 132, 24);\n\t\tcomboBox.setBackground(new Color(255, 255, 255));\n\t\tcomboBox.setForeground(new Color(255, 0, 0));\n\t\tcomboBox.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\tcomboBox.setModel(new DefaultComboBoxModel(new String[] {\"\\u836F\\u54C1\\u5168\\u79F0\", \"\\u836F\\u54C1\\u9996\\u5B57\\u6BCD\"}));\n\t\t\n\t\tJLabel label = new JLabel(\"\\u8F93\\u5165\\u6CD5\\uFF1A\");\n\t\tlabel.setBounds(32, 248, 82, 18);\n\t\tlabel.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"\\u6DFB\\u52A0\\u836F\\u54C1\\uFF1A\");\n\t\tlblNewLabel_1.setForeground(new Color(255, 0, 0));\n\t\tlblNewLabel_1.setBounds(32, 190, 132, 31);\n\t\tlblNewLabel_1.setFont(new Font(\"宋体\", Font.PLAIN, 26));\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(121, 132, 132, 24);\n\t\ttextField.setColumns(10);\n\t\t\n\t\ttextField_1 = new JTextField();\n\t\ttextField_1.setBounds(121, 281, 140, 24);\n\t\ttextField_1.setColumns(10);\n\t\t\n\t\ttextField_2 = new JTextField();\n\t\ttextField_2.setBounds(121, 330, 86, 24);\n\t\ttextField_2.setColumns(10);\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"\\u836F\\u54C1\\u540D\\u79F0\\uFF1A\");\n\t\tlblNewLabel_2.setBounds(32, 286, 90, 18);\n\t\tlblNewLabel_2.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\t\n\t\tJLabel lblNewLabel_3 = new JLabel(\"\\u6570\\u91CF\\uFF1A\");\n\t\tlblNewLabel_3.setBounds(32, 330, 72, 18);\n\t\tlblNewLabel_3.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\t\n\t\ttextArea.setFont(new Font(\"Monospaced\", Font.PLAIN, 26));\n\t\t\n\t\tJLabel lblNewLabel_6 = new JLabel(\"New label\");//先定义声明\n\t\t\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tint x=0;\n\t\t\t\tint j=2;\n\t\t\t\tString s=null;\n\t\t\t\tString shurufa = comboBox.getSelectedItem().toString() ;\n\t\t\t\t if(shurufa.compareTo(\"药品全称\")==0) j=1;\n\t\t\t\t else if(shurufa.compareTo(\"药品首字母\")==0)j=2;\n\t\t\t\t\ttry {\n\t\t\t\t\t\ts=hospital.kaiyao(patientID,j,textField_1.getText(),4,Integer.parseInt(textField_2.getText()));\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t int Mnumble=Integer.parseInt(textField_2.getText());\n\t\t\t\t \n\t\t\t\t String strs[]=s.split(\",\"); //strs[0]=账号 ,strs[1]=密码,strs[2]=账户类型,strs[3]=服务端类型号\n\t\t\t\t String Mname=strs[0];\n\t\t\t\t int x1=Integer.parseInt(strs[2]);\n\t\t\t\t if(x1==7){ textArea.append(Mname+\"*\"+Mnumble+\"\\r\\n\"); }\n\t\t\t\t else if(x1==6){\n\t\t\t\t \tlblNewLabel_6.setVisible(true); \n\t\t\t\t \tlblNewLabel_6.setText(\"查无此药!\"); \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t // Mname=Integer.parseInt(strs[0]);\t//接收服务器传来的成功或失败信号\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setVisible(false);\n\t\tbtnNewButton_1.setBounds(280, 327, 83, 27);\n\t\tbtnNewButton_1.setForeground(new Color(255, 0, 0));\n\t\tbtnNewButton_1.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\t\n\t\tJLabel lblNewLabel_4 = new JLabel(\"\\u836F\\u5355\\uFF1A\");\n\t\tlblNewLabel_4.setForeground(new Color(255, 0, 0));\n\t\tlblNewLabel_4.setFont(new Font(\"宋体\", Font.PLAIN, 26));\n\t\tlblNewLabel_4.setBounds(447, 190, 83, 31);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.getContentPane().add(lblKeshi);\n\t\tframe.getContentPane().add(lblid);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\tframe.getContentPane().add(comboBox);\n\t\tframe.getContentPane().add(label);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t\tframe.getContentPane().add(textField);\n\t\tframe.getContentPane().add(textField_1);\n\t\tframe.getContentPane().add(textField_2);\n\t\tframe.getContentPane().add(lblNewLabel_2);\n\t\tframe.getContentPane().add(lblNewLabel_3);\n\t\tframe.getContentPane().add(btnNewButton_1);\n\t\tframe.getContentPane().add(lblNewLabel_4);\n\t\t\n\t\t\n\t\ttextArea.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));\n\t\ttextArea.setBounds(447, 227, 277, 259);\n\t\tframe.getContentPane().add(textArea);\n\t\t\n\t\t\n\t\tbtnNewButton_2.setVisible(false);\n\t\tbtnNewButton_2.setForeground(new Color(255, 0, 0));\n\t\tbtnNewButton_2.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\tbtnNewButton_2.setBounds(607, 491, 113, 27);\n\t\tframe.getContentPane().add(btnNewButton_2);\n\t\t\n\t\t//JLabel lblNewLabel_5 = new JLabel(\"\\u67E5\\u8BE2\\u4FE1\\u606F\");\n\t\tlblNewLabel_5.setVisible(false);\n\t\tlblNewLabel_5.setForeground(new Color(255, 0, 0));\n\t\tlblNewLabel_5.setFont(new Font(\"宋体\", Font.PLAIN, 26));\n\t\tlblNewLabel_5.setBounds(435, 100, 321, 50);\n\t\tframe.getContentPane().add(lblNewLabel_5);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tlblNewLabel_6.setVisible(false);\n\t\tlblNewLabel_6.setForeground(new Color(255, 0, 0));\n\t\tlblNewLabel_6.setFont(new Font(\"宋体\", Font.PLAIN, 26));\n\t\tlblNewLabel_6.setBounds(32, 381, 321, 50);\n\t\tframe.getContentPane().add(lblNewLabel_6);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"\");\n\t\tlblNewLabel.setIcon(new ImageIcon(\"C:\\\\Users\\\\liujianlong\\\\Desktop\\\\\\u533B\\u751F\\u5BA2\\u6237\\u7AEF\\\\image\\\\6.jpg\"));\n\t\tlblNewLabel.setForeground(new Color(255, 0, 0));\n\t\tlblNewLabel.setBounds(0, 0, 794, 565);\n\t\tlblNewLabel.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\tframe.getContentPane().add(lblNewLabel);\n\t}", "private void setupButtons()\n\t{\n\t\tequals.setText(\"=\");\n\t\tequals.setBackground(Color.RED);\n\t\tequals.setForeground(Color.WHITE);\n\t\tequals.setOpaque(true);\n\t\tequals.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tequals.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tclear.setText(\"C\");\n\t\tclear.setBackground(new Color(0, 170, 100));\n\t\tclear.setForeground(Color.WHITE);\n\t\tclear.setOpaque(true);\n\t\tclear.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tclear.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tbackspace.setText(\"<--\");\n\t\tbackspace.setBackground(new Color(0, 170, 100));\n\t\tbackspace.setForeground(Color.WHITE);\n\t\tbackspace.setOpaque(true);\n\t\tbackspace.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tbackspace.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tnegative.setText(\"+/-\");\n\t\tnegative.setBackground(Color.GRAY);\n\t\tnegative.setForeground(Color.WHITE);\n\t\tnegative.setOpaque(true);\n\t\tnegative.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tnegative.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t}", "private void initWidgets()\r\n\t{\r\n\t\t//Set string to be put into question at start\r\n\t\tString labelText = \"Click 'Next Question' button to get a new question, or 'Submit Answer' to check your answer.\";\r\n\t\t\r\n\t\t//Add radio buttons to button group to only allow 1 selection at a time\r\n\t\tgroup.add(option1);\r\n\t\tgroup.add(option2);\r\n\t\tgroup.add(option3);\r\n\t\tgroup.add(option4);\r\n\t\t\r\n\t\t//Add text to labels and format it\r\n\t\tnorthLabel.setText(\"<html><div style='text-align: center;'>\" + labelText + \"</div></html>\");\r\n\t\tnorthLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\r\n\t\t//Add text to radio buttons and format them\r\n\t\toption1.setText(\"These are the buttons with which\");\r\n\t\toption2.setText(\"you select your choice.\");\r\n\t\toption3.setText(\"There is only one correct answer, and\");\r\n\t\toption4.setText(\"the quesion will be shown above.\");\r\n\t\toption1.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\toption2.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\toption3.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\toption4.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t//Set default selected button\r\n\t\toption1.setSelected(true);\r\n\t\t\r\n\t\t//Add this as action listener to buttons\r\n\t\tnextQuestionButton.addActionListener(this);\r\n\t\tsubmitAnswerButton.addActionListener(this);\r\n\t\tleaderboardButtonListener.addObserver(this);\r\n\t\t\r\n\t\t//Add action listener for leaderboard button\r\n\t\tleaderboardButton.addActionListener(leaderboardButtonListener);\r\n\t\t\r\n\t\t//Add question label to north of panel\r\n\t\tthis.add(northLabel, BorderLayout.NORTH);\r\n\t\t\r\n\t\t//Add radio buttons to central panel\r\n\t\tbuttonPanel.add(option1);\r\n\t\tbuttonPanel.add(option2);\r\n\t\tbuttonPanel.add(option3);\r\n\t\tbuttonPanel.add(option4);\r\n\t\t\r\n\t\t//Add central panel to centre of panel\r\n\t\tthis.add(buttonPanel, BorderLayout.CENTER);\r\n\t\t\r\n\t\t//Add buttons to southern panel\r\n\t\tsouthPanel.add(leaderboardButton);\r\n\t\tsouthPanel.add(nextQuestionButton);\r\n\t\tsouthPanel.add(submitAnswerButton);\r\n\t\tsouthPanel.add(scoreLabel);\r\n\t\t\r\n\t\t//Add southern panel to south of panel\r\n\t\tthis.add(southPanel, BorderLayout.SOUTH);\r\n\t}", "private void initialize() {\r\n\t\tsetTitle(\"The Amazing Malaysia\");\r\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(MenuMWF.class.getResource(\"/A_3/icon.png\")));\r\n\t\tsetBounds(100, 100, 764, 636);\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tgetContentPane().setLayout(null);\r\n\t\t//frmTheAmazingMalaysia = new JFrame();\r\n\t\t//frmTheAmazingMalaysia.setTitle(\"The Amazing Malaysia\");\r\n\t\t//frmTheAmazingMalaysia.setIconImage(Toolkit.getDefaultToolkit().getImage(MenuMWF.class.getResource(\"/A_3/icon.png\")));\r\n\t\t//frmTheAmazingMalaysia.setBounds(100, 100, 764, 636);\r\n\t\t//frmTheAmazingMalaysia.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"The Amazing Malaysia\");\r\n\t\tlblNewLabel.setForeground(Color.WHITE);\r\n\t\tlblNewLabel.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 35));\r\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNewLabel.setBounds(68, 0, 587, 56);\r\n\t\tgetContentPane().add(lblNewLabel);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"New label\");\r\n\t\tlblNewLabel_1.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/nl1.jpg\")));\r\n\t\tlblNewLabel_1.setBounds(36, 115, 179, 172);\r\n\t\tgetContentPane().add(lblNewLabel_1);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblNewLabel_1);\r\n\t\t\r\n\t\tJLabel label = new JLabel(\"New label\");\r\n\t\tlabel.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/r1.png\")));\r\n\t\tlabel.setBounds(290, 115, 179, 172);\r\n\t\tgetContentPane().add(label);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(label);\r\n\t\t\r\n\t\tJLabel label_1 = new JLabel(\"New label\");\r\n\t\tlabel_1.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/rc1.jpg\")));\r\n\t\tlabel_1.setBounds(529, 115, 179, 172);\r\n\t\tgetContentPane().add(label_1);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(label_1);\r\n\t\t\r\n\t\tJLabel label_2 = new JLabel(\"New label\");\r\n\t\tlabel_2.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/ll1.png\")));\r\n\t\tlabel_2.setBounds(290, 363, 179, 172);\r\n\t\tgetContentPane().add(label_2);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(label_2);\r\n\t\t\r\n\t\tJLabel label_3 = new JLabel(\"New label\");\r\n\t\tlabel_3.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/s1.jpg\")));\r\n\t\tlabel_3.setBounds(36, 363, 179, 172);\r\n\t\tgetContentPane().add(label_3);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(label_3);\r\n\t\t\r\n\t\tJLabel label_4 = new JLabel(\"New label\");\r\n\t\tlabel_4.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/ck1.png\")));\r\n\t\tlabel_4.setBounds(529, 363, 179, 172);\r\n\t\tgetContentPane().add(label_4);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(label_4);\r\n\t\t\r\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Nasi Lemak\");\r\n\t\tlblNewLabel_2.setForeground(Color.WHITE);\r\n\t\tlblNewLabel_2.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 27));\r\n\t\tlblNewLabel_2.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNewLabel_2.setBounds(36, 287, 179, 56);\r\n\t\tgetContentPane().add(lblNewLabel_2);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblNewLabel_2);\r\n\t\t\r\n\t\tJLabel lblRendang = new JLabel(\"Rendang\");\r\n\t\tlblRendang.setForeground(Color.WHITE);\r\n\t\tlblRendang.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblRendang.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 27));\r\n\t\tlblRendang.setBounds(290, 287, 179, 56);\r\n\t\tgetContentPane().add(lblRendang);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblRendang);\r\n\t\t\r\n\t\tJButton btnExit = new JButton(\"Exit\");\r\n\t\tbtnExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnExit.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/e1.png\")));\r\n\t\tbtnExit.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tbtnExit.setForeground(Color.WHITE);\r\n\t\tbtnExit.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 15));\r\n\t\tbtnExit.setBackground(Color.BLACK);\r\n\t\tbtnExit.setBounds(608, 0, 138, 60);\r\n\t\tgetContentPane().add(btnExit);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(btnExit);\r\n\t\t\r\n\t\tJLabel lblRotiCanai = new JLabel(\"Roti Canai\");\r\n\t\tlblRotiCanai.setForeground(Color.WHITE);\r\n\t\tlblRotiCanai.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblRotiCanai.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 27));\r\n\t\tlblRotiCanai.setBounds(529, 287, 179, 56);\r\n\t\tgetContentPane().add(lblRotiCanai);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblRotiCanai);\r\n\t\t\r\n\t\tJLabel lblHighlightDishes = new JLabel(\"Highlight dishes: \");\r\n\t\tlblHighlightDishes.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblHighlightDishes.setForeground(Color.WHITE);\r\n\t\tlblHighlightDishes.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 27));\r\n\t\tlblHighlightDishes.setBounds(236, 46, 233, 56);\r\n\t\tgetContentPane().add(lblHighlightDishes);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblHighlightDishes);\r\n\t\t\r\n\t\tJLabel lblSatay = new JLabel(\"Satay\");\r\n\t\tlblSatay.setForeground(Color.WHITE);\r\n\t\tlblSatay.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblSatay.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 27));\r\n\t\tlblSatay.setBounds(36, 533, 179, 56);\r\n\t\tgetContentPane().add(lblSatay);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblSatay);\r\n\t\t\r\n\t\tJLabel lblCurryLaksa = new JLabel(\"Curry Laksa\");\r\n\t\tlblCurryLaksa.setForeground(Color.WHITE);\r\n\t\tlblCurryLaksa.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblCurryLaksa.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 27));\r\n\t\tlblCurryLaksa.setBounds(290, 533, 179, 56);\r\n\t\tgetContentPane().add(lblCurryLaksa);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblCurryLaksa);\r\n\t\t\r\n\t\tJLabel lblChar = new JLabel(\"Char Kuey Teow\");\r\n\t\tlblChar.setForeground(Color.WHITE);\r\n\t\tlblChar.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblChar.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 25));\r\n\t\tlblChar.setBounds(529, 533, 179, 56);\r\n\t\tgetContentPane().add(lblChar);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblChar);\r\n\t\t\r\n\t\tJLabel lblNewLabel_3 = new JLabel(\"New label\");\r\n\t\tlblNewLabel_3.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/m2.png\")));\r\n\t\tlblNewLabel_3.setBounds(0, 0, 746, 589);\r\n\t\tgetContentPane().add(lblNewLabel_3);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblNewLabel_3);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Melee_Flame = new javax.swing.JButton();\n panel = new GamePanel()\n ;\n Heal_GroupHeal = new javax.swing.JButton();\n Sacrifice_Fireworks = new javax.swing.JButton();\n Switch = new javax.swing.JButton();\n Fumes = new javax.swing.JButton();\n HelpButton = new javax.swing.JButton();\n DisplayTeams = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n Melee_Flame.setText(\"Melee\");\n Melee_Flame.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Melee_FlameActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);\n panel.setLayout(panelLayout);\n panelLayout.setHorizontalGroup(\n panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 1300, Short.MAX_VALUE)\n );\n panelLayout.setVerticalGroup(\n panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 556, Short.MAX_VALUE)\n );\n\n Heal_GroupHeal.setText(\"Heal\");\n Heal_GroupHeal.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Heal_GroupHeal_GroupHealActionPerformed(evt);\n }\n });\n\n Sacrifice_Fireworks.setText(\"Sacrifice\");\n Sacrifice_Fireworks.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Sacrifice_FireworksActionPerformed(evt);\n }\n });\n\n Switch.setText(\"Switch Fighter\");\n Switch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SwitchActionPerformed(evt);\n }\n });\n\n Fumes.setText(\"Fumes\");\n Fumes.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n FumesActionPerformed(evt);\n }\n });\n\n HelpButton.setText(\"Instructions\");\n HelpButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n HelpButtonActionPerformed(evt);\n }\n });\n\n DisplayTeams.setText(\"Show Team Details\");\n DisplayTeams.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n DisplayTeamsActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addComponent(Melee_Flame)\n .addGap(100, 100, 100)\n .addComponent(Sacrifice_Fireworks)\n .addGap(100, 100, 100)\n .addComponent(Heal_GroupHeal)\n .addGap(100, 100, 100)\n .addComponent(Fumes)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(DisplayTeams)\n .addGap(100, 100, 100)\n .addComponent(HelpButton)\n .addGap(100, 100, 100)\n .addComponent(Switch)\n .addGap(50, 50, 50))\n .addComponent(panel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Melee_Flame)\n .addComponent(Sacrifice_Fireworks))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Switch)\n .addComponent(Heal_GroupHeal)\n .addComponent(Fumes)\n .addComponent(HelpButton)\n .addComponent(DisplayTeams)))\n .addGap(21, 21, 21)\n .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void initialize() {\n\t\t\n\t\tthis.setBounds(100, 100, 990, 700);\n\t\tthis.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\t\n\n\t\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(new Color(51, 204, 153));\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tthis.setContentPane(contentPane);\n\t\tcontentPane.setLayout(null);\n\n\t\tJLabel lblPayrollManagementSystem = new JLabel(\"\");\n\t\tlblPayrollManagementSystem.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblPayrollManagementSystem.setIcon(new ImageIcon(\"images/personal_insight.jpg\"));\n\t\tlblPayrollManagementSystem.setBounds(0, 0, 983, 324);\n\t\tcontentPane.add(lblPayrollManagementSystem);\n\t\t\n\t\tJLabel lblPayrollManagementSystem1 = new JLabel(\"Payroll Management System\");\n\t\tlblPayrollManagementSystem1.setForeground(new Color(0, 0, 0));\n\t\tlblPayrollManagementSystem1.setBackground(new Color(102, 102, 255));\n\t\tlblPayrollManagementSystem1.setFont(new Font(\"Raleway\", Font.BOLD, 18));\n\t\tlblPayrollManagementSystem1.setBounds(362, 345, 254, 35);\n\t\tcontentPane.add(lblPayrollManagementSystem1);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Add Employee\",new ImageIcon(\"images//empl.png\"));\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew RegisterEmployee().frame.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\n\t\tbtnNewButton.setBounds(92, 402, 219, 54);\n\t\tcontentPane.add(btnNewButton);\n\t\t\n\t\tJButton btnSearchEmployee = new JButton(\"Search Employee\",new ImageIcon(\"images//empl.png\"));\n\t\tbtnSearchEmployee.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t new SearchEmployee().frame.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnSearchEmployee.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\n\t\tbtnSearchEmployee.setBounds(623, 402, 219, 54);\n\t\tcontentPane.add(btnSearchEmployee);\n\t\t\n\t\tJButton btnPaySlip = new JButton(\"Pay Slip\",new ImageIcon(\"images//Payment.png\"));\n\t\tbtnPaySlip.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnew PaySlip().frame.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnPaySlip.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\n\t\tbtnPaySlip.setBounds(92, 491, 219, 54);\n\t\tcontentPane.add(btnPaySlip);\n\t\t\n\t\tJButton btnViewEmployee = new JButton(\"View Employee\", null);\n\t\tbtnViewEmployee.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew ViewEmployee().frame.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnViewEmployee.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\n\t\tbtnViewEmployee.setBounds(623, 491, 219, 54);\n\t\tcontentPane.add(btnViewEmployee);\n\n\t\t\n\t\t\n\t\t\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 1280, 700);\n\t\tframe.setResizable(false);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJButton btnNewGame = new JButton(\"New Game\");\n\t\tbtnNewGame.setBounds(522, 375, 200, 70);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.getContentPane().add(btnNewGame);\n\t\t\n\t\tJButton btnContinue = new JButton(\"Continue\");\n\t\tbtnContinue.setBounds(522, 470, 200, 70);\n\t\tbtnContinue.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}\n\t\t});\n\t\tframe.getContentPane().add(btnContinue);\n\t\t\n\t\tJButton btnHelp = new JButton(\"Help\");\n\t\tbtnHelp.setBounds(522, 565, 200, 70);\n\t\tbtnHelp.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}\n\t\t});\n\t\tframe.getContentPane().add(btnHelp);\n\t\t\n\t\tJButton btnGrass = new JButton(\"Grass\");\n\t\tbtnGrass.setBounds(522, 375, 200, 70);\n\t\tbtnGrass.setVisible(false);\n\t\tbtnGrass.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tgame=new gameWindow(1);\n\t\t\t\tframe.setVisible(false);\n\t\t\t\tgame.frame.addWindowListener(onGameClosed);\n\t\t\t}\n\t\t});\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.getContentPane().add(btnGrass);\n\t\t\n\t\tJButton btnSnow = new JButton(\"Snow\");\n\t\tbtnSnow.setBounds(522, 470, 200, 70);\n\t\tbtnSnow.setVisible(false);\n\t\tbtnSnow.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgame=new gameWindow(2);\n\t\t\t\tframe.setVisible(false);\n\t\t\t\tgame.frame.addWindowListener(onGameClosed);\n\t\t\t}\n\t\t});\n\t\tframe.getContentPane().add(btnSnow);\n\t\t\n\t\tJButton btnDesert = new JButton(\"Desert\");\n\t\tbtnDesert.setBounds(522, 565, 200, 70);\n\t\tbtnDesert.setVisible(false);\n\t\tbtnDesert.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgame=new gameWindow(3);\n\t\t\t\tframe.setVisible(false);\n\t\t\t\tgame.frame.addWindowListener(onGameClosed);\n\t\t\t}\n\t\t});\n\t\tframe.getContentPane().add(btnDesert);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBounds(124, 12, 1000, 300);\n\t\tframe.getContentPane().add(panel);\n\t\tImageIcon titleicon = new ImageIcon(\"src/resources/Title.png\");\n\t\tJLabel title = new JLabel(titleicon);\n\t\tpanel.add(title);\n\t\t\n\t\t//ActionListener for btnNewGame\n\t\tbtnNewGame.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tbtnNewGame.setVisible(false);\n\t\t\t\tbtnContinue.setVisible(false);\n\t\t\t\tbtnHelp.setVisible(false);\n\t\t\t\tbtnGrass.setVisible(true);\n\t\t\t\tbtnSnow.setVisible(true);\n\t\t\t\tbtnDesert.setVisible(true);\n\t\t\t}\n\t\t});\n\t\t\n\t\tonGameClosed=new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\t\tbtnNewGame.setVisible(true);\n\t\t\t\tbtnContinue.setVisible(true);\n\t\t\t\tbtnHelp.setVisible(true);\n\t\t\t\tbtnGrass.setVisible(false);\n\t\t\t\tbtnSnow.setVisible(false);\n\t\t\t\tbtnDesert.setVisible(false);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}\n\t\t};\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(400,400,250,240);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(10, 11, 264, 36);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t\t\n\t\tJButton btn1 = new JButton(\"1\");\n\t\tbtn1.setBounds(10, 58, 42, 36);\n\t\tframe.getContentPane().add(btn1);\n\t\t\n\t\tJButton btn2 = new JButton(\"2\");\n\t\tbtn2.setBounds(62, 58, 42, 36);\n\t\tframe.getContentPane().add(btn2);\n\t\t\n\t\tJButton btn3 = new JButton(\"3\");\n\t\tbtn3.setBounds(114, 58, 42, 36);\n\t\tframe.getContentPane().add(btn3);\n\t\t\n\t\tJButton btn4 = new JButton(\"4\");\n\t\tbtn4.setBounds(10, 102, 42, 36);\n\t\tframe.getContentPane().add(btn4);\n\t\t\n\t\tJButton btn5 = new JButton(\"5\");\n\t\tbtn5.setBounds(62, 102, 42, 36);\n\t\tframe.getContentPane().add(btn5);\n\t\t\n\t\tJButton btn6 = new JButton(\"6\");\n\t\tbtn6.setBounds(114, 102, 42, 36);\n\t\tframe.getContentPane().add(btn6);\n\t\t\n\t\tJButton btn7 = new JButton(\"7\");\n\t\tbtn7.setBounds(10, 146, 42, 36);\n\t\tframe.getContentPane().add(btn7);\n\t\t\n\t\tJButton btn8 = new JButton(\"8\");\n\t\tbtn8.setBounds(62, 146, 42, 36);\n\t\tframe.getContentPane().add(btn8);\n\t\t\n\t\tJButton btn9 = new JButton(\"9\");\n\t\tbtn9.setBounds(114, 146, 42, 36);\n\t\tframe.getContentPane().add(btn9);\n\t\t\n\t\t\n\t}", "public void drawButtons() {\n\t\tfill(color(221, 221, 221));\n\t\tfor (int i = 0; i < NUM_BUTTONS; i++) {\n\t\t\trect(BUTTON_LEFT_OFFSET + i * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET, BUTTON_WIDTH, BUTTON_HEIGHT);\n\t\t}\n\n\t\t// set text color on the buttons to blue\n\t\tfill(color(0, 0, 255));\n\n\t\ttext(\"Add Cards\", BUTTON_LEFT_OFFSET + 18, BUTTON_TOP_OFFSET + 22);\n\t\ttext(\" Find Set\", BUTTON_LEFT_OFFSET + 18 + BUTTON_WIDTH + 12, BUTTON_TOP_OFFSET + 22);\n\t\ttext(\"New Game\", BUTTON_LEFT_OFFSET + 18 + 2 * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET + 22);\n\t\tif (state == State.PAUSED) {\n\t\t\ttext(\"Resume\", BUTTON_LEFT_OFFSET + 45 + 3 * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET + 22);\n\t\t} else {\n\t\t\ttext(\"Pause\", BUTTON_LEFT_OFFSET + 54 + 3 * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET + 22);\n\t\t}\n\t}", "protected void init(){\n ac = new ButtonEventManager(this);\n \n nameField = new JTextField();\n \n done = new JButton(\"DONE\");\n back = new JButton(\"MAIN MENU\");\n quit = new JButton(\"QUIT\");\n \n done.setActionCommand(\"go to game menu after saving\");\n back.setActionCommand(\"go to the main menu\");\n quit.setActionCommand(\"quit the game\");\n \n Font font = new Font(\"Arial\", Font.PLAIN, 10);\n \n nameField.setFont(font);\n \n nameField.setBounds(2 * this.getWidth() / 3 - buttonWidth / 2, (int)(0.4 * this.getHeight() - textFieldHeight / 2), buttonWidth, textFieldHeight);\n \n done.setBounds((this.getWidth() / 2 - buttonWidth) / 2, (int)(0.7 * this.getHeight() - buttonHeight / 2), buttonWidth, buttonHeight);\n back.setBounds((this.getWidth() - buttonWidth) / 2, (int)(0.7 * this.getHeight() - buttonHeight / 2), buttonWidth, buttonHeight);\n quit.setBounds(3 * (this.getWidth() - buttonWidth) / 2, (int)(0.7 * this.getHeight() - buttonHeight / 2), buttonWidth, buttonHeight);\n \n done.addActionListener(ac);\n back.addActionListener(ac);\n quit.addActionListener(ac);\n \n add(nameField);\n \n add(done);\n add(back);\n add(quit);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n t = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n btn2 = new javax.swing.JButton();\n btn3 = new javax.swing.JButton();\n btn1 = new javax.swing.JButton();\n btn5 = new javax.swing.JButton();\n btn6 = new javax.swing.JButton();\n btn4 = new javax.swing.JButton();\n btn8 = new javax.swing.JButton();\n btn7 = new javax.swing.JButton();\n btn9 = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n playerY = new javax.swing.JLabel();\n playerX = new javax.swing.JLabel();\n labelEnemyScore = new javax.swing.JLabel();\n labelMyScore = new javax.swing.JLabel();\n btnExit = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n SymbolLabel = new javax.swing.JLabel();\n turnLabel = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Tic Tac Toe\");\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n setResizable(false);\n\n t.setBackground(new java.awt.Color(153, 153, 153));\n t.setToolTipText(\"\");\n\n jLabel1.setFont(new java.awt.Font(\"Segoe UI\", 1, 48)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(51, 51, 51));\n jLabel1.setText(\"TIC TAC TOE JARKOM\");\n\n javax.swing.GroupLayout tLayout = new javax.swing.GroupLayout(t);\n t.setLayout(tLayout);\n tLayout.setHorizontalGroup(\n tLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(tLayout.createSequentialGroup()\n .addGap(220, 220, 220)\n .addComponent(jLabel1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n tLayout.setVerticalGroup(\n tLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(tLayout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(0, 24, Short.MAX_VALUE))\n );\n\n btn2.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n btn2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn2ActionPerformed(evt);\n }\n });\n\n btn3.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n btn3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn3ActionPerformed(evt);\n }\n });\n\n btn1.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n btn1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn1ActionPerformed(evt);\n }\n });\n\n btn5.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n btn5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn5ActionPerformed(evt);\n }\n });\n\n btn6.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n btn6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn6ActionPerformed(evt);\n }\n });\n\n btn4.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n btn4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn4ActionPerformed(evt);\n }\n });\n\n btn8.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n btn8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn8ActionPerformed(evt);\n }\n });\n\n btn7.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n btn7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn7ActionPerformed(evt);\n }\n });\n\n btn9.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n btn9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn9ActionPerformed(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED, java.awt.Color.lightGray, java.awt.Color.darkGray));\n\n playerY.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n playerY.setText(\"Lawan\");\n playerY.setToolTipText(\"\");\n\n playerX.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n playerX.setText(\"Saya\");\n\n labelEnemyScore.setFont(new java.awt.Font(\"Segoe UI\", 1, 18)); // NOI18N\n labelEnemyScore.setForeground(new java.awt.Color(0, 0, 204));\n labelEnemyScore.setText(\"0\");\n\n labelMyScore.setFont(new java.awt.Font(\"Segoe UI\", 1, 18)); // NOI18N\n labelMyScore.setForeground(new java.awt.Color(204, 0, 51));\n labelMyScore.setText(\"0\");\n\n btnExit.setBackground(new java.awt.Color(204, 0, 0));\n btnExit.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n btnExit.setText(\"EXIT\");\n btnExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnExitActionPerformed(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n jLabel7.setText(\"VS\");\n\n jLabel2.setFont(new java.awt.Font(\"Segoe UI\", 1, 18)); // NOI18N\n jLabel2.setText(\"Skor :\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(45, 45, 45)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(labelMyScore)\n .addComponent(playerX))\n .addGap(30, 30, 30)\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(playerY)\n .addComponent(labelEnemyScore))\n .addGap(94, 94, 94))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(135, 135, 135)\n .addComponent(btnExit, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(playerX, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(playerY, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelMyScore, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(labelEnemyScore, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 43, Short.MAX_VALUE)\n .addComponent(btnExit, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n SymbolLabel.setFont(new java.awt.Font(\"Segoe UI\", 1, 18)); // NOI18N\n SymbolLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n SymbolLabel.setText(\"Simbol\");\n\n turnLabel.setFont(new java.awt.Font(\"Segoe UI\", 1, 18)); // NOI18N\n turnLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n turnLabel.setText(\"Giliran\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(34, 34, 34)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btn7, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(btn8, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(btn9, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(btn4, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(btn5, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(btn6, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(btn1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(btn2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(btn3, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(SymbolLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(t, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(532, Short.MAX_VALUE)\n .addComponent(turnLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 426, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap()))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(t, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btn3, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btn2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btn1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btn6, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btn5, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btn4, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addComponent(SymbolLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btn9, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btn8, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btn7, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(259, Short.MAX_VALUE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(444, Short.MAX_VALUE)\n .addComponent(turnLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(361, 361, 361)))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "public void setUpView() {\n\n\n\t\t//Make the components\n\t\tinputAnswer = new Button(\"Submit\");\n\t\tbegin\t\t= new Button(\"Begin level \" + gameLevel);\n\t\tblueButt\t= new Button();\n\t\tredButt = new Button();\n\t\tgreenButt = new Button();\n\t\tyellowButt = new Button();\n\t\tclear = new Button(\"Clear\");\n\t\tguessArea = new TextArea();\n\t\ttopPan = new Panel();\n\t\tinstructLab = new Label(\"Welcome to the great guessing game. Try and finish it, its fun honest!\");\n\t\treset = new Button(\"Start again?\");\n\t\tpointsLab = new Label(\"Points: \" + points);\n\t\t\n\t\t//Change the font\n\t\tFont font = new Font(\"Verdana\", Font.BOLD, 18);\n\t\tinstructLab.setFont(font);\n\t\t\n\t\t//Add the label to the top panel\n\t\ttopPan.add(instructLab);\n\t\t\n\t\t//Set layout\n\t\tsetLayout(new MigLayout());\n\t\n\t\t//Set the size of the components\n\t\tblueButt.setPreferredSize (new Dimension(60, 50));\n\t\tredButt.setPreferredSize (new Dimension(60, 50));\n\t\tgreenButt.setPreferredSize (new Dimension(60, 50));\n\t\tyellowButt.setPreferredSize(new Dimension(60, 50));\n\t\tguessArea.setPreferredSize (new Dimension(50, 10));\n\t\tpointsLab.setPreferredSize (new Dimension(100, 30));\n\t\t\n\t\t//Turn the submit button of until there is something to submit\n\t\tinputAnswer.setEnabled(false);\n\n\t\t//Set the button colour\n\t\tblueButt.setBackground (Color.blue);\n\t\tredButt.setBackground (Color.red);\n\t\tgreenButt.setBackground (Color.green);\n\t\tyellowButt.setBackground(Color.yellow);\n\t\t\n\t\t//Hide the reset button until it is needed\n\t\treset.setVisible(false);\n\n\t\t//Add the components to the applet\n\t\tadd(topPan, \"wrap\");\n\t\tadd(redButt, \"cell 0 1\");\n\t\tadd(blueButt, \"cell 0 1\");\t\t\n\t\tadd(greenButt, \"cell 0 1\");\n\t\tadd(yellowButt, \"cell 0 1\");\n\t\tadd(begin, \"wrap\");\n\t\tadd(guessArea, \"wrap\");\n\t\tadd(inputAnswer,\"split 2\");\t\n\t\tadd(clear, \"gap left 340, cell 0 2, wrap\");\n\t\tadd(reset, \t\t\"wrap\");\n\t\tadd(pointsLab);\n\n\n\n\t\t//If the status bar is present show the user there level\n\t\tshowStatus(\"You are on level: \" + gameLevel);\n\n\n\t\t//Set the size of the applet\n\t\tsetSize(new Dimension(1000, 1000));\n\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setAlwaysOnTop(true);\n\t\tframe.setResizable(false);\n\t\tframe.setUndecorated(true);\n\t\tframe.setBounds(100, 100, 587, 465);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblName = new JLabel(\"\");\n\t\tlblName.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_Name.png\")));\n\t\tlblName.setBackground(Color.WHITE);\n\t\tlblName.setForeground(new Color(102, 102, 51));\n\t\tlblName.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\n\t\tlblName.setBounds(26, 60, 117, 40);\n\t\tframe.getContentPane().add(lblName);\n\t\t\n\t\tJLabel lblLevel = new JLabel(\"\");\n\t\tlblLevel.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_Level.png\")));\n\t\tlblLevel.setBackground(Color.WHITE);\n\t\tlblLevel.setForeground(new Color(102, 102, 51));\n\t\tlblLevel.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\n\t\tlblLevel.setBounds(26, 105, 117, 40);\n\t\tframe.getContentPane().add(lblLevel);\n\t\t\n\t\tJLabel lblHp = new JLabel(\"\");\n\t\tlblHp.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_HP.png\")));\n\t\tlblHp.setBackground(Color.WHITE);\n\t\tlblHp.setForeground(new Color(102, 102, 51));\n\t\tlblHp.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\t\n\t\tlblHp.setBounds(26, 150, 117, 40);\n\t\tframe.getContentPane().add(lblHp);\n\t\t\n\t\tJLabel lblMp = new JLabel(\"\");\n\t\tlblMp.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_MP.png\")));\n\t\tlblMp.setBackground(Color.WHITE);\n\t\tlblMp.setForeground(new Color(102, 102, 51));\n\t\tlblMp.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\n\t\tlblMp.setBounds(26, 195, 117, 40);\n\t\tframe.getContentPane().add(lblMp);\n\t\t\n\t\tJLabel lblStrength = new JLabel(\"\");\n\t\tlblStrength.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_Strength.png\")));\n\t\tlblStrength.setBackground(Color.WHITE);\n\t\tlblStrength.setForeground(new Color(102, 102, 51));\n\t\tlblStrength.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\n\t\tlblStrength.setBounds(26, 245, 127, 40);\n\t\tframe.getContentPane().add(lblStrength);\n\t\t\n\t\tJLabel lblAttack = new JLabel(\"\");\n\t\tlblAttack.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_Attack.png\")));\n\t\tlblAttack.setBackground(Color.WHITE);\n\t\tlblAttack.setForeground(new Color(102, 102, 51));\n\t\tlblAttack.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\n\t\tlblAttack.setBounds(26, 290, 127, 40);\n\t\tframe.getContentPane().add(lblAttack);\n\t\t\n\t\tJLabel lblDefence = new JLabel(\"\");\n\t\tlblDefence.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_Defence.png\")));\n\t\tlblDefence.setBackground(Color.WHITE);\n\t\tlblDefence.setForeground(new Color(102, 102, 51));\n\t\tlblDefence.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\n\t\tlblDefence.setBounds(26, 335, 127, 40);\n\t\tframe.getContentPane().add(lblDefence);\n\t\t\n\t\tJLabel name = new JLabel(\"name\");\n\t\tname.setText(sprite.getName());\n\t\tname.setFont(new Font(\"Comic Sans MS\", Font.BOLD, 21));\n\t\tname.setForeground(new Color(204, 102, 0));\n\t\tname.setBounds(163, 71, 110, 18);\n\t\tframe.getContentPane().add(name);\n\t\t\n\t\tJLabel level = new JLabel(\"level\");\n\t\tlevel.setText(\"\" + sprite.getLevel());\n\t\tlevel.setForeground(new Color(0, 204, 0));\n\t\tlevel.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 21));\n\t\tlevel.setBounds(163, 117, 72, 18);\n\t\tframe.getContentPane().add(level);\n\t\t\n\t\tJLabel hp = new JLabel(\"hp\");\n\t\thp.setText(sprite.getHp() + \"/\" + sprite.getMaxHp());\n\t\thp.setForeground(new Color(255, 0, 0));\n\t\thp.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 21));\n\t\thp.setBounds(163, 160, 110, 18);\n\t\tframe.getContentPane().add(hp);\n\t\t\n\t\tJLabel mp = new JLabel(\"mp\");\n\t\tmp.setText(sprite.getMp() + \"/\" + sprite.getMaxMp());\n\t\tmp.setForeground(new Color(51, 51, 255));\n\t\tmp.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 21));\n\t\tmp.setBounds(163, 209, 110, 18);\n\t\tframe.getContentPane().add(mp);\n\t\t\n\t\tJLabel strength = new JLabel(\"strength\");\n\t\tstrength.setText(\"\" + sprite.getStrength());\n\t\tstrength.setForeground(new Color(153, 0, 255));\n\t\tstrength.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 21));\n\t\tstrength.setBounds(163, 258, 72, 18);\n\t\tframe.getContentPane().add(strength);\n\t\t\n\t\tJLabel attack = new JLabel(\"attack\");\n\t\tattack.setText(\"\" + sprite.getAttack());\n\t\tattack.setForeground(new Color(153, 51, 255));\n\t\tattack.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 21));\n\t\tattack.setBounds(163, 303, 72, 18);\n\t\tframe.getContentPane().add(attack);\n\t\t\n\t\tJLabel defence = new JLabel(\"defence\");\n\t\tdefence.setText(\"\" + sprite.getDefence());\n\t\tdefence.setForeground(new Color(153, 51, 255));\n\t\tdefence.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 21));\n\t\tdefence.setBounds(163, 348, 72, 18);\n\t\tframe.getContentPane().add(defence);\n\t\t\n\t\tJButton btnBack = new JButton(\"\");\n\t\tbtnBack.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/menu/Back.png\")));\n\t\tbtnBack.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif(menuBar == null)\n\t\t\t\t\tmenuBar = new MenuBar(sprite);\n\t\t\t\telse\n\t\t\t\t\tmenuBar.updateSprite(sprite);\n\t\t\t\tmenuBar.main();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnBack.setIcon(new ImageIcon(MenuBar.class.getResource(\"/pic/menu/back_1.png\")));\n\t\tbtnBack.setRolloverIcon(new ImageIcon(MenuBar.class.getResource(\"/pic/menu/back_2.png\")));\n\t\tbtnBack.setBorderPainted(false);\n\t\tbtnBack.setOpaque(false);\t\n\t\tbtnBack.setBounds(14, 385, 110, 59);\n\t\tbtnBack.setBackground(Color.BLACK);\n\t\tframe.getContentPane().add(btnBack);\n\t\t\n\t\tJLabel lblBackground = new JLabel(\"\");\n\t\tlblBackground.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/demo1.png\")));\n\t\tlblBackground.setBounds(0, 0, 587, 465);\n\t\tframe.getContentPane().add(lblBackground);\n\t}", "public void updateGamePanel() {\n\t\tthis.removeAll();\n\t\t\n\t\tButton2 buttonTip = new Button2(\"DICA\", 75, 100, 100, 100);\n\t\tbuttonTip.addActionListener(e -> Controller.game.showTip());\n\t\tthis.add(buttonTip);\n\t\t\n\t\tButton2 menu = new Button2(\"Menu\", 200, 100, 100, 100);\n\t\tmenu.addActionListener(e -> this.frame.setVisible(\"menu\"));\n\t\tthis.add(menu);\n\t\t\n\t\tthis.drawButtons();\n\t\t\n\t\t//Adding labels\n\t\tthis.add(frame.getWordShow());\n\t\tthis.add(frame.getLifeShow());\n\t\t\n\t\tthis.frame.add(this);//Adding the gameJPanel to the frame\n\t}" ]
[ "0.6873564", "0.67920303", "0.67655474", "0.6678274", "0.66763204", "0.6614476", "0.66114986", "0.65847546", "0.6579297", "0.65696275", "0.648407", "0.6460429", "0.6455646", "0.64273274", "0.6426594", "0.6421768", "0.64137316", "0.6376208", "0.6375012", "0.6372976", "0.6367438", "0.6366532", "0.63664395", "0.636336", "0.6349875", "0.6346199", "0.6340056", "0.63113534", "0.6295379", "0.6283731", "0.6261118", "0.6260285", "0.6252679", "0.6243197", "0.62429583", "0.6239502", "0.6224956", "0.6214289", "0.62097484", "0.6202461", "0.62001204", "0.61999375", "0.6184023", "0.6170952", "0.6168536", "0.61589235", "0.615876", "0.61524326", "0.614037", "0.61341554", "0.61339736", "0.61235064", "0.6116861", "0.6103137", "0.6102907", "0.609851", "0.6096641", "0.6096524", "0.60878295", "0.6087358", "0.6086334", "0.6085357", "0.6083326", "0.6079382", "0.6076243", "0.6072385", "0.6071177", "0.6068387", "0.6066207", "0.6065229", "0.60617334", "0.6054244", "0.60490954", "0.6044619", "0.60423046", "0.6037286", "0.6035272", "0.6034854", "0.6031168", "0.6029857", "0.60270286", "0.6026046", "0.6025104", "0.6022978", "0.6022287", "0.60186046", "0.6017394", "0.60148174", "0.6011142", "0.6009786", "0.6008076", "0.6001776", "0.59999305", "0.5999126", "0.59950894", "0.5994691", "0.59938675", "0.5987894", "0.59833664", "0.59815925" ]
0.811081
0
recursion depth of atom is at most 2 for dispatch, use the following functions to force error for nonid type
public boolean isId() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void checkRecurse(Vector<XSParticleDecl> dChildren, int min1, int max1, SubstitutionGroupHandler dSGHandler, Vector<XSParticleDecl> bChildren, int min2, int max2, SubstitutionGroupHandler bSGHandler) throws XMLSchemaException {\n/* 1258 */ if (!checkOccurrenceRange(min1, max1, min2, max2)) {\n/* 1259 */ throw new XMLSchemaException(\"rcase-Recurse.1\", new Object[] {\n/* 1260 */ Integer.toString(min1), (max1 == -1) ? \"unbounded\" : \n/* 1261 */ Integer.toString(max1), \n/* 1262 */ Integer.toString(min2), (max2 == -1) ? \"unbounded\" : \n/* 1263 */ Integer.toString(max2)\n/* */ });\n/* */ }\n/* 1266 */ int count1 = dChildren.size();\n/* 1267 */ int count2 = bChildren.size();\n/* */ \n/* 1269 */ int current = 0;\n/* 1270 */ for (int i = 0; i < count1; i++) {\n/* */ \n/* 1272 */ XSParticleDecl particle1 = dChildren.elementAt(i);\n/* 1273 */ int k = current; while (true) { if (k < count2) {\n/* 1274 */ XSParticleDecl particle2 = bChildren.elementAt(k);\n/* 1275 */ current++;\n/* */ try {\n/* 1277 */ particleValidRestriction(particle1, dSGHandler, particle2, bSGHandler);\n/* */ \n/* */ break;\n/* 1280 */ } catch (XMLSchemaException e) {\n/* 1281 */ if (!particle2.emptiable())\n/* 1282 */ throw new XMLSchemaException(\"rcase-Recurse.2\", null); \n/* */ } k++; continue;\n/* */ } \n/* 1285 */ throw new XMLSchemaException(\"rcase-Recurse.2\", null); }\n/* */ \n/* */ } \n/* */ \n/* 1289 */ for (int j = current; j < count2; j++) {\n/* 1290 */ XSParticleDecl particle2 = bChildren.elementAt(j);\n/* 1291 */ if (!particle2.emptiable()) {\n/* 1292 */ throw new XMLSchemaException(\"rcase-Recurse.2\", null);\n/* */ }\n/* */ } \n/* */ }", "public abstract int numOfSameTypeNeighbourToReproduce();", "private static void checkRecurseLax(Vector<XSParticleDecl> dChildren, int min1, int max1, SubstitutionGroupHandler dSGHandler, Vector<XSParticleDecl> bChildren, int min2, int max2, SubstitutionGroupHandler bSGHandler) throws XMLSchemaException {\n/* 1357 */ if (!checkOccurrenceRange(min1, max1, min2, max2)) {\n/* 1358 */ throw new XMLSchemaException(\"rcase-RecurseLax.1\", new Object[] {\n/* 1359 */ Integer.toString(min1), (max1 == -1) ? \"unbounded\" : \n/* 1360 */ Integer.toString(max1), \n/* 1361 */ Integer.toString(min2), (max2 == -1) ? \"unbounded\" : \n/* 1362 */ Integer.toString(max2)\n/* */ });\n/* */ }\n/* 1365 */ int count1 = dChildren.size();\n/* 1366 */ int count2 = bChildren.size();\n/* */ \n/* 1368 */ int current = 0;\n/* 1369 */ for (int i = 0; i < count1; i++) {\n/* */ \n/* 1371 */ XSParticleDecl particle1 = dChildren.elementAt(i);\n/* 1372 */ int j = current; while (true) { if (j < count2) {\n/* 1373 */ XSParticleDecl particle2 = bChildren.elementAt(j);\n/* 1374 */ current++;\n/* */ \n/* */ \n/* */ try {\n/* 1378 */ if (particleValidRestriction(particle1, dSGHandler, particle2, bSGHandler)) {\n/* 1379 */ current--;\n/* */ }\n/* */ break;\n/* 1382 */ } catch (XMLSchemaException xMLSchemaException) {}\n/* */ j++;\n/* */ continue;\n/* */ } \n/* 1386 */ throw new XMLSchemaException(\"rcase-RecurseLax.2\", null); }\n/* */ \n/* */ } \n/* */ }", "public void checkTypes() {\n this.root.accept(this);\n }", "private static void checkRecurseUnordered(Vector<XSParticleDecl> dChildren, int min1, int max1, SubstitutionGroupHandler dSGHandler, Vector<XSParticleDecl> bChildren, int min2, int max2, SubstitutionGroupHandler bSGHandler) throws XMLSchemaException {\n/* 1306 */ if (!checkOccurrenceRange(min1, max1, min2, max2)) {\n/* 1307 */ throw new XMLSchemaException(\"rcase-RecurseUnordered.1\", new Object[] {\n/* 1308 */ Integer.toString(min1), (max1 == -1) ? \"unbounded\" : \n/* 1309 */ Integer.toString(max1), \n/* 1310 */ Integer.toString(min2), (max2 == -1) ? \"unbounded\" : \n/* 1311 */ Integer.toString(max2)\n/* */ });\n/* */ }\n/* 1314 */ int count1 = dChildren.size();\n/* 1315 */ int count2 = bChildren.size();\n/* */ \n/* 1317 */ boolean[] foundIt = new boolean[count2];\n/* */ \n/* 1319 */ for (int i = 0; i < count1; i++) {\n/* 1320 */ XSParticleDecl particle1 = dChildren.elementAt(i);\n/* */ \n/* 1322 */ int k = 0; while (true) { if (k < count2) {\n/* 1323 */ XSParticleDecl particle2 = bChildren.elementAt(k);\n/* */ try {\n/* 1325 */ particleValidRestriction(particle1, dSGHandler, particle2, bSGHandler);\n/* 1326 */ if (foundIt[k]) {\n/* 1327 */ throw new XMLSchemaException(\"rcase-RecurseUnordered.2\", null);\n/* */ }\n/* 1329 */ foundIt[k] = true;\n/* */ \n/* */ \n/* */ break;\n/* 1333 */ } catch (XMLSchemaException xMLSchemaException) {}\n/* */ k++;\n/* */ continue;\n/* */ } \n/* 1337 */ throw new XMLSchemaException(\"rcase-RecurseUnordered.2\", null); }\n/* */ \n/* */ } \n/* */ \n/* 1341 */ for (int j = 0; j < count2; j++) {\n/* 1342 */ XSParticleDecl particle2 = bChildren.elementAt(j);\n/* 1343 */ if (!foundIt[j] && !particle2.emptiable()) {\n/* 1344 */ throw new XMLSchemaException(\"rcase-RecurseUnordered.2\", null);\n/* */ }\n/* */ } \n/* */ }", "private static void checkNSRecurseCheckCardinality(Vector<XSParticleDecl> children, int min1, int max1, SubstitutionGroupHandler dSGHandler, XSParticleDecl wildcard, int min2, int max2, boolean checkWCOccurrence) throws XMLSchemaException {\n/* 1226 */ if (checkWCOccurrence && !checkOccurrenceRange(min1, max1, min2, max2)) {\n/* 1227 */ throw new XMLSchemaException(\"rcase-NSRecurseCheckCardinality.2\", new Object[] {\n/* 1228 */ Integer.toString(min1), (max1 == -1) ? \"unbounded\" : \n/* 1229 */ Integer.toString(max1), \n/* 1230 */ Integer.toString(min2), (max2 == -1) ? \"unbounded\" : \n/* 1231 */ Integer.toString(max2)\n/* */ });\n/* */ }\n/* */ \n/* 1235 */ int count = children.size();\n/* */ try {\n/* 1237 */ for (int i = 0; i < count; i++) {\n/* 1238 */ XSParticleDecl particle1 = children.elementAt(i);\n/* 1239 */ particleValidRestriction(particle1, dSGHandler, wildcard, null, false);\n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ }\n/* 1245 */ catch (XMLSchemaException e) {\n/* 1246 */ throw new XMLSchemaException(\"rcase-NSRecurseCheckCardinality.1\", null);\n/* */ } \n/* */ }", "public interface DfType {\n\n /**\n * A type that contains every possible value supported by the type system\n */\n DfType TOP = new DfType() {\n @Override\n public boolean isSuperType(@NotNull DfType other) {\n return true;\n }\n\n @Override\n public @NotNull DfType join(@NotNull DfType other) {\n return this;\n }\n\n @Override\n public @NotNull DfType tryJoinExactly(@NotNull DfType other) { return this; }\n\n @Override\n public @NotNull DfType meet(@NotNull DfType other) {\n return other;\n }\n\n @Override\n public @NotNull DfType tryNegate() {\n return BOTTOM;\n }\n\n @Override\n public @NotNull DfType fromRelation(@NotNull RelationType relationType) {\n return this;\n }\n\n @Override\n public int hashCode() {\n return 1254215;\n }\n\n @Override\n public @NotNull String toString() {\n return \"TOP\";\n }\n };\n /**\n * A type that contains no values\n */\n DfType BOTTOM = new DfType() {\n @Override\n public boolean isSuperType(@NotNull DfType other) {\n return other == this;\n }\n\n @Override\n public @NotNull DfType join(@NotNull DfType other) {\n return other;\n }\n\n @Override\n public @NotNull DfType tryJoinExactly(@NotNull DfType other) { return other; }\n\n @Override\n public @NotNull DfType meet(@NotNull DfType other) {\n return this;\n }\n\n @Override\n public @NotNull DfType fromRelation(@NotNull RelationType relationType) {\n return this;\n }\n\n @Override\n public @NotNull DfType tryNegate() {\n return TOP;\n }\n\n @Override\n public int hashCode() {\n return 67532141;\n }\n\n @Override\n public @NotNull String toString() {\n return \"BOTTOM\";\n }\n };\n /**\n * A special value that represents a contract failure after method return (the control flow should immediately proceed\n * with exception handling). This value is like a constant but its type doesn't correspond to any JVM type.\n */\n DfType FAIL = new DfConstantType<>(ObjectUtils.sentinel(\"FAIL\")) {\n @Override\n public @NotNull DfType join(@NotNull DfType other) {\n return other == this ? this : TOP;\n }\n\n @Override\n public @Nullable DfType tryJoinExactly(@NotNull DfType other) { return other == this ? this : other == NOT_FAIL ? TOP : null; }\n\n @Override\n public @NotNull DfType meet(@NotNull DfType other) {\n return other == this ? this : BOTTOM;\n }\n\n @Override\n public @NotNull DfType tryNegate() {\n return NOT_FAIL;\n }\n\n @Override\n public @NotNull DfType fromRelation(@NotNull RelationType relationType) {\n return relationType == RelationType.EQ ? this :\n relationType == RelationType.NE ? NOT_FAIL :\n BOTTOM;\n }\n\n @Override\n public int hashCode() {\n return 5362412;\n }\n };\n /**\n * Anything but a FAIL value\n */\n DfType NOT_FAIL = new DfAntiConstantType<>(Set.of(Objects.requireNonNull(FAIL.getConstantOfType(Object.class)))) {\n @Override\n public boolean isSuperType(@NotNull DfType other) {\n return other != TOP && other != FAIL;\n }\n\n @Override\n public @NotNull DfType join(@NotNull DfType other) {\n return other == FAIL ? TOP : this;\n }\n\n @Override\n public @NotNull DfType tryJoinExactly(@NotNull DfType other) { return join(other); }\n\n @Override\n public @NotNull DfType meet(@NotNull DfType other) {\n return other == FAIL ? BOTTOM : this;\n }\n\n @Override\n public @NotNull DfType tryNegate() {\n return FAIL;\n }\n\n @Override\n public int hashCode() {\n return 23145416;\n }\n };\n\n /**\n * Checks whether this type is the supertype of the supplied type, i.e. every value from the other type belongs to this type as well.\n * if A.isSuperType(B) then A.join(B) is A and A.meet(B) is B.\n *\n * @param other other type\n * @return true if this type is the supertype of other.\n */\n boolean isSuperType(@NotNull DfType other);\n\n /**\n * @return true if this type contains only local objects (not leaked from the current context to unknown places)\n * In particular, this means that the values of these types are never {@linkplain #mayAlias(DfType) aliased} \n * to any other values.\n */\n default boolean isLocal() {\n return false;\n }\n\n /**\n * @param otherType other type\n * @return true if values qualified by this value might be affected by values qualified by otherType.\n * For example, if both this and otherType are pointer types that may refer to the same memory location.\n */\n default boolean mayAlias(DfType otherType) {\n return false;\n }\n\n /**\n * @return true if values immediately qualified by this type, never change, \n * as long as qualifier never changes.\n */\n default boolean isImmutableQualifier() {\n return false;\n }\n\n /**\n * Checks whether processing the other type is not necessary to get the same analysis result if some value\n * has either this or other state at the same code location. {@code a.isMergeable(b)} implies \n * {@code a.isSuperType(b)}. In most cases, these methods are equivalent but the difference may appear in\n * processing non-strict properties like nullability. E.g. (nullability == unknown) is supertype of\n * (nullability == null) but it's not mergeable, as skipping (nullability == null) processing will remove\n * \"Possible NPE\" warning.\n * \n * @param other other type\n * @return true if processing the other type is not necessary to get the same analysis result if some value\n * has either this or other state at the same code location.\n */\n default boolean isMergeable(@NotNull DfType other) {\n return isSuperType(other);\n }\n\n /**\n * Return the most specific type that contains all values from this type and from other type.\n * @param other type to join\n * @return the result of the join operation\n */\n @NotNull\n DfType join(@NotNull DfType other);\n\n /**\n * Return the type that contains all values from this type and from other type and no other values.\n * @param other type to join\n * @return the result of the join operation; null if exact join cannot be represented\n */\n @Nullable DfType tryJoinExactly(@NotNull DfType other);\n\n /**\n * Returns the least specific type that contains all values that belong both to this type and to other type.\n * @param other type to meet\n * @return the result of the meet operation.\n */\n @NotNull\n DfType meet(@NotNull DfType other);\n\n @NotNull\n default DfType fromRelation(@NotNull RelationType relationType) {\n return relationType == RelationType.EQ ? this : TOP;\n }\n\n /**\n * @return true if equivalence relation on this type is not standard. That is,\n * for constant values belonging to this type, {@code a.meetRelation(EQ, b) != a.equals(b)}\n */\n default boolean hasNonStandardEquivalence() {\n return false;\n }\n \n /**\n * Narrows this value to the set of values that satisfies given relation\n * \n * @param relationType relation applied\n * @param other other operand (e.g., for {@code a < b} relation, this object is {@code a},\n * other is {@code b} and relationType is {@code <}.\n * @return narrowed type containing only values that satisfy the relation \n * (may contain some more values if the exact type cannot be represented).\n * For any {@code meetRelation} arguments, {@code this.isSuperType(this.meetRelation(...))} is true.\n */\n default @NotNull DfType meetRelation(@NotNull RelationType relationType, @NotNull DfType other) {\n return meet(other.fromRelation(relationType));\n }\n\n /**\n * @return the widened version of this type; should be called on back-branches.\n */\n default DfType widen() {\n return this;\n }\n\n /**\n * @return a type that contains all the values of the corresponding JVM type except the values of given type;\n * may return null if the corresponding type is not supported by our type system.\n */\n @Nullable\n default DfType tryNegate() {\n return null;\n }\n\n /**\n * @param constant constant to compare to\n * @return true if this type represents a constant with given value\n */\n default boolean isConst(@Nullable Object constant) {\n return false;\n }\n\n /**\n * @param clazz desired constant class\n * @param <C> type of the constant\n * @return the constant of given type; null if this type does not represent a constant of supplied type.\n */\n default <C> @Nullable C getConstantOfType(@NotNull Class<C> clazz) {\n return null;\n }\n\n /**\n * Correct the inherent variable type when concrete variable state is flushed\n * due to unknown code execution. This could be useful to handle non-strict \n * properties like nullability (e.g. if unstable nullable variable was checked for null,\n * then unknown code was executed, then the variable should not probably reset to nullable)\n * \n * @param typeBeforeFlush type the variable had before flush\n * @return corrected inherent variable type; return this if no correction is necessary.\n */\n default DfType correctTypeOnFlush(DfType typeBeforeFlush) {\n return this;\n }\n\n /**\n * Correct the variable type that is passed from outer context to the closure \n * (e.g. drop the locality flag).\n * \n * @return corrected variable type; return this if no correction is necessary.\n */\n default DfType correctForClosure() {\n return this;\n }\n\n /**\n * Correct the type after applying the relation depending on whether the relation was applied successfully.\n * May be necessary to handle weird relation semantics, like with NaN in some languages.\n * \n * @param relation relation applied\n * @param result if true then the relation was applied successfully. E.g., for {@code a > b},\n * result is true for {@code a > b} state and false for {@code a < b} and for {@code a == b} states.\n * @return corrected type; return this if no correction is necessary\n */\n default @NotNull DfType correctForRelationResult(@NotNull RelationType relation, boolean result) {\n return this;\n }\n\n /**\n * @return basic type for this type. Some types could represent several derived variables. For example,\n * the type \"string of length 3\" could be decomposed to basic type \"string\" and derived variable \"length\"\n * with value \"3\".\n */\n default @NotNull DfType getBasicType() {\n return this;\n }\n\n /**\n * @return list of possible derived variables that could be recorded inside this type.\n * E.g. the type \"string of length 3\" records the derived variable \"string length\" inside.\n */\n default @NotNull List<@NotNull DerivedVariableDescriptor> getDerivedVariables() {\n return List.of();\n }\n\n /**\n * @return values of all derived variables stored inside this type\n */\n default @NotNull Map<@NotNull DerivedVariableDescriptor, @NotNull DfType> getDerivedValues() {\n return Map.of();\n }\n\n /**\n * @return human-readable representation of this DfType, could be localized\n */\n @Override @NlsSafe @NotNull String toString();\n}", "private Pair<SemanticType,Code<?>> expand(Code<?> root, SemanticType type, int freeVar) {\n\t\tif (type instanceof SemanticType.Atom || type instanceof SemanticType.Var) {\n\t\t\treturn new Pair<SemanticType,Code<?>>(type,null);\n\t\t} else if (type instanceof SemanticType.Tuple) {\n\t\t\treturn expand(root, (SemanticType.Tuple) type, freeVar);\n\t\t} else if (type instanceof SemanticType.Set) {\n\t\t\treturn expand(root, (SemanticType.Set) type, freeVar);\n\t\t} else if (type instanceof SemanticType.Nominal) {\n\t\t\treturn expand(root, (SemanticType.Nominal) type, freeVar);\t\t\t\n\t\t} else if(type instanceof SemanticType.Not) {\n\t\t\treturn expand(root, (SemanticType.Not) type, freeVar);\n\t\t} else if(type instanceof SemanticType.And) {\n\t\t\treturn expand(root, (SemanticType.And) type, freeVar);\n\t\t} else if(type instanceof SemanticType.Or) {\n\t\t\treturn expand(root, (SemanticType.Or) type, freeVar);\n\t\t} else {\n\t\t\tinternalFailure(\"deadcode reached (\" + type.getClass().getName() + \")\", filename, root);\n\t\t\treturn null; // dead-code\n\t\t}\n\t}", "@Test\n public void untypedLambdaError2() {\n DependentLink A = param(\"A\", Universe(0));\n DependentLink params = params(A, param(\"B\", Pi(Reference(A), Universe(0))), param(\"a\", Reference(A)));\n Expression type = Pi(params, Apps(Reference(params.getNext()), Reference(params.getNext().getNext())));\n List<Binding> context = new ArrayList<>();\n context.add(new TypedBinding(\"f\", type));\n\n typeCheckExpr(context, \"\\\\lam x1 x2 x3 => f x2 x1 x3\", null, 1);\n }", "public static void check6 (IR.Node node){\n if (node == null) return; \n if (node instanceof Expr){\n String ret = ((Expr)node).getType(); \n }\n \n List <IR.Node> children = node.getChildren(); \n if (children == null) return; \n\n for (int child=0; child<children.size(); child++){\n check6 (children.get(child)); \n }\n }", "private static int maxDepthNoRecursion(TreeNode root) {\r\n\t\treturn Math.max(maxDepthNoRecursion(root, true), maxDepthNoRecursion(root, false)); \r\n\t}", "public static void getStackOverFlowErrorNoRecursion() {\n LOGGER.info(String.format(MESSAGE, \"StackOverflowError\", \"instantiating object whose constructor instantiates the object\"));\n new StackOverFlowObject();\n }", "public boolean isHierarchical() {\n/* 2889 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private static void checkRecursion(RolapEvaluator eval, int c) {\n RolapMember[] members = eval.currentMembers.clone();\n Member expanding = eval.expandingMember;\n\n // Find an ancestor evaluator that has identical context to this one:\n // same member context, and expanding the same calculation.\n while (true) {\n if (c < 0) {\n eval = eval.parent;\n if (eval == null) {\n return;\n }\n c = eval.commandCount - 1;\n } else {\n Command command = (Command) eval.commands[c];\n switch (command) {\n case SET_CONTEXT:\n int memberOrdinal = (Integer) eval.commands[c - 1];\n RolapMember member = (RolapMember) eval.commands[c - 2];\n members[memberOrdinal] = member;\n break;\n case SET_EXPANDING:\n expanding = (RolapMember) eval.commands[c - 2];\n if (Arrays.equals(members, eval.currentMembers)\n && expanding == eval.expandingMember)\n {\n throw FunUtil.newEvalException(\n null,\n \"Infinite loop while evaluating calculated member '\"\n + eval.expandingMember + \"'; context stack is \"\n + eval.getContextString());\n }\n }\n c -= command.width;\n }\n }\n }", "public Node typeCheck () {\n\tif (declist!=null) \n\t for (Node dec:declist)\n\t\tdec.typeCheck();\n if ( !(FOOLlib.isSubtype(body.typeCheck(),type)) ){\n System.out.println(\"Wrong return type for function \"+id);\n System.exit(0);\n } \n return null;\n }", "private boolean factor() {\r\n return MARK(ATOM) && atom() && postops();\r\n }", "void m5771e() throws C0841b;", "@Test public void mixedSelfRecursive() {\n check(\"declare function local:inc($i) { $i + 1 };\" +\n \"declare function local:f($i) { if($i eq 12345) then $i \" +\n \"else local:f(local:inc($i)) };\" +\n \"local:f(0)\",\n\n 12345,\n\n exists(Util.className(If.class) + '/' + Util.className(StaticFuncCall.class) +\n \"[@tailCall eq 'true']\")\n );\n }", "private void checkAssignment(Assignment node) {\n String nodeName = node.name.name;\n boolean error = false;\n\n // check whether assignment would cause a loop\n if (node.value instanceof ConstantReference) {\n ConstantReference reference = ((ConstantReference) node.value);\n if (reference.name.equals(nodeName)) {\n node.setError(\"You can't assign a constant to itself.\");\n error = true;\n } else {\n isCircularReference(reference);\n }\n }\n // if assignment is an operation, check the operation\n if (node.value instanceof Operation) {\n checkOperation((Operation) node.value);\n }\n\n // if no error has been found add it to symboltable.\n if (!error) {\n symboltable.put(nodeName, node.value);\n }\n }", "@Override\r\n\tpublic void visit(TypeID typeID) {\n\r\n\t}", "void m5770d() throws C0841b;", "@Override\n public int getDepth() {\n return 680;\n }", "private static boolean checkSimpleDerivation(XSSimpleType derived, XSSimpleType base, short block) {\n/* 188 */ if (derived == base) {\n/* 189 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 193 */ if ((block & 0x2) != 0 || (derived\n/* 194 */ .getBaseType().getFinal() & 0x2) != 0) {\n/* 195 */ return false;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 200 */ XSSimpleType directBase = (XSSimpleType)derived.getBaseType();\n/* 201 */ if (directBase == base) {\n/* 202 */ return true;\n/* */ }\n/* */ \n/* 205 */ if (directBase != SchemaGrammar.fAnySimpleType && \n/* 206 */ checkSimpleDerivation(directBase, base, block)) {\n/* 207 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 211 */ if ((derived.getVariety() == 2 || derived\n/* 212 */ .getVariety() == 3) && base == SchemaGrammar.fAnySimpleType)\n/* */ {\n/* 214 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 218 */ if (base.getVariety() == 3) {\n/* 219 */ XSObjectList subUnionMemberDV = base.getMemberTypes();\n/* 220 */ int subUnionSize = subUnionMemberDV.getLength();\n/* 221 */ for (int i = 0; i < subUnionSize; i++) {\n/* 222 */ base = (XSSimpleType)subUnionMemberDV.item(i);\n/* 223 */ if (checkSimpleDerivation(derived, base, block)) {\n/* 224 */ return true;\n/* */ }\n/* */ } \n/* */ } \n/* 228 */ return false;\n/* */ }", "private void fixNestedMethod(RegularMethodInvocation rmi) {\n String name = rmi.name();\n if (isNested(name)) {\n rmi.setName(firstChar(name));\n rmi.addArgument(oFactory().createIntegerLiteral(String.valueOf(name.length())));\n }\n }", "@Override\n public int getDepth() {\n return 0;\n }", "public static void check18 (IR.Node node){\n if (node == null) return; \n if (node instanceof AssignmentStatement){\n if ((((AssignmentStatement)node).assignExpr) != null){\n String s1 = ((AssignmentStatement)node).loc.getType(); \n String s2 = ((AssignmentStatement)node).assignExpr.getType();\n if (!(s1.equals(\"any\") || s2.equals(\"any\"))){\n if (!(((AssignmentStatement)node).loc.getType().equals(((AssignmentStatement)node).assignExpr.getType()))){\n throw new IllegalStateException (\"Bad assignment.\"); \n }\n }\n\n }\n if ((((AssignmentStatement)node).op.type == Op.Type.minusequals) || (((AssignmentStatement)node).op.type == Op.Type.plusequals)){\n String s1 = ((AssignmentStatement)node).loc.getType(); \n String s2 = ((AssignmentStatement)node).assignExpr.getType();\n if (!(s1.equals(\"any\") || s2.equals(\"any\"))){\n if (!(((AssignmentStatement)node).loc.getType().equals(\"int\"))){\n throw new IllegalStateException (\"Bad assignment.\"); \n }\n if (!(((AssignmentStatement)node).assignExpr.getType().equals(\"int\"))){\n throw new IllegalStateException (\"Bad assignment.\"); \n }\n }\n }\n if ((((AssignmentStatement)node).op.type == Op.Type.increment) || (((AssignmentStatement)node).op.type == Op.Type.decrement)){\n if (!(((AssignmentStatement)node).loc.getType().equals(\"int\"))){\n if (!(((AssignmentStatement)node).loc.getType().equals(\"any\"))){\n throw new IllegalStateException (\"Bad assignment.\");\n } \n }\n }\n }\n if (node instanceof ForStatement){\n if (((ForStatement)node).initLoc == null || ((ForStatement)node).initExpr == null){\n throw new IllegalStateException (\"Bad assignment.\"); \n }\n if (!(((ForStatement)node).initLoc.getType().equals(((ForStatement)node).initExpr.getType()))){\n throw new IllegalStateException (\"Bad assignment.\"); \n } \n }\n List <IR.Node> children = node.getChildren(); \n if (children == null) return; \n\n for (int child=0; child<children.size(); child++){\n check18 (children.get(child)); \n }\n }", "protected interface TypeCheckingNode {\n /**\n * Checks whether an object is known to be subtype in the cache.\n *\n * @param isSub - the cache of subtypes\n * @param expected - the expected type\n * @param argument - the object being checked\n * @param type - the type of the argument\n * @param sourceSection - the location in source of the type check\n * @param exception - the node used to throw errors\n * @return The argument if it is a subtype. Null if it wasn't in the cache. Otherwise an\n * error is thrown.\n */\n default <E> E checkTable(final byte[] isSub,\n final SObjectWithClass expected, final E argument, final SType type,\n final SourceSection sourceSection, final ExceptionSignalingNode exception) {\n byte sub = isSub[type.id];\n if (sub == SUBTYPE) {\n return argument;\n } else if (sub == FAIL) {\n reportError(argument, type, expected, sourceSection, exception);\n }\n return null;\n }\n\n /**\n * The method that should call throwTypeError.\n */\n void reportError(Object argument, Object type, Object expected,\n SourceSection sourceSection, ExceptionSignalingNode exception);\n\n /**\n * Checks whether an object is Nil.\n */\n default boolean isNil(final SObjectWithoutFields obj) {\n return obj == Nil.nilObject;\n }\n }", "@Test\n public void untypedLambdaError1() {\n DependentLink A = param(\"A\", Universe(0));\n Expression type = Pi(params(A, param(\"a\", Reference(A))), Nat());\n List<Binding> context = new ArrayList<>();\n context.add(new TypedBinding(\"f\", type));\n typeCheckExpr(context, \"\\\\lam x1 x2 => f x2 x1\", null, 1);\n }", "void cannotHandle(Call call) {\n\t\t// escalate the call to a higher rank\n\t\tcall.rank = rank + 1;\n\t\tcallHandler.dispatchCall(call);\n\t\tfree = true;\n\t\tcallHandler.getNextCall(this);\n\t}", "private Pair<SemanticType,Code<?>> expand(Code<?> root, SemanticType.Not type, int freeVar) {\n\t\tCode.Variable variable = Code.Variable(type.element(), freeVar);\n\t\tPair<SemanticType,Code<?>> p = expand(variable, type.element(), freeVar++);\n\t\tCode<?> invariant = p.second();\n\t\tif (invariant != null) {\n\t\t\tinvariant = Code.Unary(SemanticType.Bool, Code.Unary.Op.NOT, invariant);\t\t\t\n\t\t}\n\t\treturn new Pair<SemanticType,Code<?>>(SemanticType.Not(p.first()),invariant);\n\t}", "public Type typeCheck(){\n\tType fnType = myId.sym().getType();\n\tboolean result = true;\n\tif(!(fnType instanceof FnType)){\n\t myId.typeCheckError(\"Attempt to call a non-function\");\n\t result = false;\n\t}else{ // it is a function call\n\t FnSym fs = (FnSym)myId.sym();\n\t List<Type> declFormal = fs.getParamTypes();\n\t List<ExpNode> callFormal = myExpList.getCallExpList();\n\t if(declFormal.size() != callFormal.size()){\n\t\tmyId.typeCheckError(\"Function call with wrong number of args\");\n\t\tresult = false;\n\t }else{ // check each type \n\t\tint s = declFormal.size();\n\t\tfor(int i = 0; i < s; i++){\n\t\t Type callType = callFormal.get(i).typeCheck();\n\t\t Type declType = declFormal.get(i);\n\n\t\t String callTypeName = callType.toString();\n\t\t String declTypeName = declType.toString();\n\t\t if(!(callTypeName.equals(declTypeName))){\n\t\t\tIdNode fId = callFormal.get(i).getExpFirstIdNode();\n\t\t\tfId.typeCheckError(\"Type of actual does not match type of formal\");\n\t\t\tresult = false;\n\t\t }\n\t\t}\n\t }\n\t}\n\n\tif(fnType instanceof FnType)\n\t return ((FnSym)(myId.sym())).getReturnType();\n\telse\n\t return new ErrorType();\n\t// if(result == true){\n\t// return ((FnSym)(myId.sym())).getReturnType();\n\t// }else{\n\t// return new ErrorType();\n\t// }\n\n }", "@Override public byte isBitShape(Type t) { throw AA.unimpl(); }", "public int getType() {\n/* 96 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void immediateSafetyResolve(Cell cell, boolean propagate) {\n\t\tif (cell == null) {\n\t\t\tLOG.warn(\"called immediateSafetyResolve on cell NULL\");\n\t\t\treturn;\n\t\t}\n\n\t\tPoint pos = cell.getPosition();\n\t\tPoint[] adjacents = pos.allAdjacent();\n\t\tif (!cell.isTypeIn(CellType.FREE, CellType.START)) {\n\t\t\tLOG.warn(\"called immediateSafetyResolve on invalid cell of type {} at {}\", pos, cell.getType());\n\t\t\treturn;\n\t\t}\n\n\t\t// count adjacent pits and unsafe cells\n\t\tint pits = 0;\n\t\tSet<Cell> unsafes = new HashSet<Cell>();\n\t\tfor (Point adjPos : adjacents) {\n\t\t\tCell adjacent = map.get(adjPos);\n\t\t\tswitch (adjacent.getType()) {\n\t\t\tcase PIT:\n\t\t\t\t++pits;\n\t\t\t\tbreak;\n\t\t\tcase UNSAFE_UNKNOWN:\n\t\t\t\tunsafes.add(adjacent);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//\n\t\t\t}\n\t\t}\n\n\t\t// change cells, if possible\n\t\tint stench = cell.getStench();\n\t\tif (pits == stench) {\n\t\t\tfor (Cell unsafe : unsafes) {\n\t\t\t\tLOG.debug(\"changed cell type at {} from {} to {}\", unsafe.getPosition(), CellType.UNSAFE_UNKNOWN,\n\t\t\t\t\t\tCellType.SAFE_UNKNOWN);\n\t\t\t\tsetCellType(unsafe, CellType.SAFE_UNKNOWN);\n\t\t\t}\n\t\t} else if (pits + unsafes.size() == stench) {\n\t\t\tfor (Cell unsafe : unsafes) {\n\t\t\t\tLOG.debug(\"changed cell type at {} from {} to {}\", unsafe.getPosition(), CellType.PIT,\n\t\t\t\t\t\tCellType.SAFE_UNKNOWN);\n\t\t\t\tsetCellType(unsafe, CellType.PIT);\n\t\t\t}\n\t\t} else if (propagate) {\n\t\t\tfor (Cell unsafe : unsafes) {\n\t\t\t\tpos = unsafe.getPosition();\n\t\t\t\tadjacents = pos.allAdjacent();\n\t\t\t\tLOG.debug(\"calling immediateSafetyResolve for adjacents of {}\", pos);\n\t\t\t\tfor (Point adjPos : adjacents) {\n\t\t\t\t\tCell adjacent = map.get(adjPos);\n\t\t\t\t\tif (adjacent != null && adjacent.isTypeIn(CellType.FREE, CellType.START)) {\n\t\t\t\t\t\tLOG.debug(\"propagating safety resolve to {}\", adjPos);\n\t\t\t\t\t\timmediateSafetyResolve(adjacent, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public SemanticError checkCyclicInheritance() {\n\t\tMap<String, VSOPClass> map = new HashMap<>();\n\n\t\tfor (VSOPClass c = superClass; c != null; c = c.superClass) {\n\t\t\tif (c == this) {\n\t\t\t\treturn new SemanticError(ln, col, String.format(\"Cyclic inheritance of class %s\", id));\n\t\t\t}\n\n\t\t\tif (map.containsKey(c.id))\n\t\t\t\treturn null;\n\n\t\t\tmap.put(c.id, c);\n\t\t}\n\n\t\treturn null;\n\t}", "protected int check(int type) {\n\t\tif (type < 0 || type > 127)\n\t\t\tthrow new IllegalArgumentException(\"invalid.ASTNode.type: \" + type);\n\t\treturn type;\n\t}", "int getRecursionDepth();", "private Pair<SemanticType,Code<?>> expand(Code<?> root, SemanticType.Nominal type, int freeVar) {\n\t\ttry {\n\t\t\tWycsFile wf = builder.getModule(type.name().module());\n\t\t\tWycsFile.Type td = wf.declaration(type.name().name(),\n\t\t\t\t\tWycsFile.Type.class);\n\t\t\tPair<SemanticType,Code<?>> p = expand(root, td.type, freeVar);\n\t\t\tCode<?> invariant = p.second();\n\t\t\tCode<?> td_invariant = td.invariant;\n\t\t\tif (td_invariant != null) {\n\t\t\t\t// An explicit invariant is given. We now need to map the given\n\t\t\t\t// root to the parameter of the invariant (which is always at\n\t\t\t\t// index 0).\n\t\t\t\tHashMap<Integer,Code> binding = new HashMap<Integer,Code>();\n\t\t\t\tbinding.put(0,root);\n\t\t\t\ttd_invariant = td_invariant.substitute(binding);\n\t\t\t\t// Finally, decide whether to use as is or append to the\n\t\t\t\t// invariant generated from the element type.\n\t\t\t\tif (invariant == null) {\n\t\t\t\t\tinvariant = td_invariant;\n\t\t\t\t} else {\n\t\t\t\t\tinvariant = and(invariant, td_invariant);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Pair<SemanticType,Code<?>>(p.first(),invariant);\n\t\t} catch (Exception e) {\n\t\t\tinternalFailure(e.getMessage(), filename, root, e);\n\t\t\treturn null; // deadcode\n\t\t}\n\t}", "@Test\n public void semanticError_badID_type_structiddoesntexist() {\n List<String> code = new ArrayList<>();\n code.add(\"CD19 Prog\");\n code.add(\"constants\");\n code.add(\"length = 10\");\n code.add(\"types\");\n code.add(\"mystruct is\");\n code.add(\"a : integer\");\n code.add(\"end\");\n code.add(\"myarray is array[length] of blah\");\n\n code.add(\"main\");\n code.add(\"a : integer\");\n code.add(\"begin\");\n code.add(\"a = 5;\");\n code.add(\"end\");\n code.add(\"CD19 Prog\");\n\n Scanner scanner = new Scanner(new CodeFileReader(code));\n List<Token> tokens = scanner.getAllTokens();\n\n Parser parser = new Parser(tokens);\n TreeNode tree = parser.parse();\n\n for (SemanticErrorMessage message : parser.getSemanticErrors())\n System.out.println(message.getErrorMessage());\n\n assertEquals(true, parser.getSemanticErrors().size() == 1);\n assertEquals(true, parser.getSemanticErrors().get(0).getErrorMessage().contains(\"blah\"));\n\n assertEquals(true, parser.isSyntacticallyValid());\n assertEquals(false, parser.isSemanticallyValid());\n\n }", "private static int minDepthNoRecursion(TreeNode root) {\r\n\t\treturn Math.min(maxDepthNoRecursion(root, true), maxDepthNoRecursion(root, false)); \r\n\t}", "public int getType() {\n/* 3069 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void propagatedSafetyResolve(Cell cell) {\n\t\timmediateSafetyResolve(cell, true);\n\t}", "public int getChildCount() {\n/* 179 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private static boolean checkComplexDerivation(XSComplexTypeDecl derived, XSTypeDefinition base, short block) {\n/* 238 */ if (derived == base) {\n/* 239 */ return true;\n/* */ }\n/* */ \n/* 242 */ if ((derived.fDerivedBy & block) != 0) {\n/* 243 */ return false;\n/* */ }\n/* */ \n/* 246 */ XSTypeDefinition directBase = derived.fBaseType;\n/* */ \n/* 248 */ if (directBase == base) {\n/* 249 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 253 */ if (directBase == SchemaGrammar.fAnyType || directBase == SchemaGrammar.fAnySimpleType)\n/* */ {\n/* 255 */ return false;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 260 */ if (directBase.getTypeCategory() == 15) {\n/* 261 */ return checkComplexDerivation((XSComplexTypeDecl)directBase, base, block);\n/* */ }\n/* */ \n/* 264 */ if (directBase.getTypeCategory() == 16) {\n/* */ \n/* 266 */ if (base.getTypeCategory() == 15)\n/* */ {\n/* */ \n/* 269 */ if (base == SchemaGrammar.fAnyType) {\n/* 270 */ base = SchemaGrammar.fAnySimpleType;\n/* */ } else {\n/* 272 */ return false;\n/* */ } } \n/* 274 */ return checkSimpleDerivation((XSSimpleType)directBase, (XSSimpleType)base, block);\n/* */ } \n/* */ \n/* */ \n/* 278 */ return false;\n/* */ }", "public void test_der_01() {\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM_TRANS_INF, null);\n Resource a = m.createResource(\"http://example.org#A\");\n Resource b = m.createResource(\"http://example.org#B\");\n OntClass A = new OntClassImpl(a.getNode(), (EnhGraph) m) {\n protected boolean hasSuperClassDirect(Resource cls) {\n throw new RuntimeException(\"did not find direct reasoner\");\n }\n };\n \n // will throw an exception if the wrong code path is taken\n A.hasSuperClass(b, true);\n }", "void m5769c() throws C0841b;", "private void VisitChildren(AST root){\n for (AST child : root.children) {\n try {\n String switchValue;\n switchValue = (child.GetValue() != null) ? child.GetValue() : ((IdExpr) child).ID;\n visitValue.Visit(switchValue, child);\n } catch (ClassCastException e){\n }\n }\n }", "protected void a(bug parambug)\r\n/* 35: */ {\r\n/* 36:36 */ this.j.a((bxf)null);\r\n/* 37: */ }", "private static boolean callOrArrayAccessOrQualifiedRefExpression_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"callOrArrayAccessOrQualifiedRefExpression_0\")) return false;\n boolean r;\n r = callExpression(b, l + 1);\n if (!r) r = arrayAccessExpression(b, l + 1);\n if (!r) r = qualifiedReferenceExpression(b, l + 1);\n if (!r) r = consumeToken(b, NOT);\n if (!r) r = typeArguments(b, l + 1);\n return r;\n }", "public static int catchingObjectNotReference(){\n int x=1;\n try{\n Throwable t = new Exception();\n throw t;\n }\n catch (RuntimeException re){x*=2;}\n catch(Exception e){x*=3;}\n catch(Throwable t){x*=5;}\n return x; // x==3\n }", "int depthNoR(Node root) {\n\t\tNode endOfLevelMarker = new Node(-100);\n\n\t\tQueue<Node> s = new LinkedList<Node>();\n\t\t\n\t\ts.add(root);\n\t\ts.add(endOfLevelMarker);\n\n\t\tint depth = 0;\n\n\n\t\twhile (!s.isEmpty()) {\n\t\t\tNode k = s.poll();\n\n\t\t\tif (k != null) {\n\t\t\t\tif (k.data == -100) {\n\t\t\t\t\tdepth++;\n\t\t\t\t\tif (!s.isEmpty()) { // It was the last node. Without this check we will keep putting and popping marker forever.\n\t\t\t\t\t\ts.add(endOfLevelMarker);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (k.left != null) {\n\t\t\t\t\t\ts.add(k.left);\n\t\t\t\t\t}\n\t\t\t\t\tif (k.right != null) {\n\t\t\t\t\t\ts.add(k.right);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn depth;\n\t}", "public interface ATypeCheckNode {}", "public T caseAtom(Atom object)\n {\n return null;\n }", "public T caseAtom(Atom object)\n {\n return null;\n }", "private void checkInstanceOf(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n if (d instanceof AbstractDefinitionStmt) {\n AbstractDefinitionStmt def = (AbstractDefinitionStmt) d;\n Value leftSide = def.getLeftOp();\n Value rightSide = def.getRightOp();\n if(leftSide instanceof Local && rightSide instanceof AbstractInstanceOfExpr) {\n AbstractInstanceOfExpr expr = (AbstractInstanceOfExpr) rightSide;\n FlowAbstraction taint = isInTaintedSet(expr.getOp(), in);\n if(taint != null) {\n \t\n taint(leftSide, d, out);\n \n }\n }\n }\n }", "private void processTypes(Node root) {\n\t\tfinal boolean newContext =\n\t\t\t(root instanceof Block || root instanceof ForLoop);\n\n\t\tif (newContext) {\n\t\t\tthis.variableMaps\n\t\t\t\t.push(new VariableTypeMap(this.variableMaps.peek()));\n\t\t}\n\n\t\tif (!root.getChildren().isEmpty()) {\n\t\t\tfor (int i = 0; i < root.getChildren().size(); ++i) {\n\t\t\t\tNode child = root.getChildren().get(i);\n\t\t\t\tif (root instanceof Call call && (!call.isPrimary() && i == 0\n\t\t\t\t\t|| call.isPrimary() && i == 1)) {\n\t\t\t\t\t// Skip the method name lookup\n\t\t\t\t\tchild.setType(Type.unknownType());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tthis.processTypes(child);\n\t\t\t}\n\t\t}\n\t\troot.process(this);\n\n\t\tif (newContext) {\n\t\t\tthis.variableMaps.pop();\n\t\t}\n\t}", "private static class <init> extends dq\n{\n\n public void a(dg dg1, ch ch)\n throws cn\n {\n b(dg1, (cr)ch);\n }", "boolean hasRecursionDepth();", "private Pair<SemanticType,Code<?>> expand(Code<?> root, SemanticType.Or type, int freeVar) {\n\t\tSemanticType[] elements = type.elements();\n\t\tSemanticType[] nelements = new SemanticType[elements.length];\n\t\tCode<?> invariant = null;\n\t\t// Go through each type element expanding its invariants. In the end, if\n\t\t// no elements expand to an invariant then we stick with null.\n\t\t// Otherwise, we have some invariant at the end.\n\t\tfor (int i = 0; i != elements.length; ++i) {\n\t\t\tPair<SemanticType, Code<?>> p = expand(root, elements[i], freeVar);\n\t\t\tnelements[i] = p.first();\n\t\t\tCode<?> ei = p.second();\n\t\t\tif (ei != null) {\n\t\t\t\t// This element has yielded an actual invariant. The first thing\n\t\t\t\t// is to add the test that this is the given type.\n\t\t\t\tei = implies(Code.Is(type, root, p.first()),ei);\n\t\t\t\t// Now, decide whether this it the first one, or just another\n\t\t\t\t// one.\n\t\t\t\tif (invariant == null) {\n\t\t\t\t\t// Yes, it's the first element which has given an invariant,\n\t\t\t\t\t// therefore it is the current overall invariant.\n\t\t\t\t\tinvariant = ei;\n\t\t\t\t} else {\n\t\t\t\t\t// No, this is just another element which has given an\n\t\t\t\t\t// invariant, therefore just and them together.\n\t\t\t\t\tinvariant = or(invariant, ei);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Pair<SemanticType,Code<?>>(SemanticType.Or(nelements),invariant);\n\t}", "default int nestingDepth() {\n return 0;\n }", "public static boolean checkTypeDerivationOk(XSTypeDefinition derived, XSTypeDefinition base, short block) {\n/* 117 */ if (derived == SchemaGrammar.fAnyType) {\n/* 118 */ return (derived == base);\n/* */ }\n/* */ \n/* 121 */ if (derived == SchemaGrammar.fAnySimpleType) {\n/* 122 */ return (base == SchemaGrammar.fAnyType || base == SchemaGrammar.fAnySimpleType);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 127 */ if (derived.getTypeCategory() == 16) {\n/* */ \n/* 129 */ if (base.getTypeCategory() == 15)\n/* */ {\n/* */ \n/* 132 */ if (base == SchemaGrammar.fAnyType) {\n/* 133 */ base = SchemaGrammar.fAnySimpleType;\n/* */ } else {\n/* 135 */ return false;\n/* */ } } \n/* 137 */ return checkSimpleDerivation((XSSimpleType)derived, (XSSimpleType)base, block);\n/* */ } \n/* */ \n/* */ \n/* 141 */ return checkComplexDerivation((XSComplexTypeDecl)derived, base, block);\n/* */ }", "static int type_of_ldax(String passed){\n\t\treturn 1;\n\t}", "public int numTrees () { throw new RuntimeException(); }", "private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n android.content.Context r3 = r6.d // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.net.Proxy r3 = com.amap.api.col.n3.ik.a(r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n r6.a((java.net.Proxy) r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n byte[] r2 = r2.a((com.amap.api.col.n3.kj) r6) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.lang.Object r2 = r6.a((byte[]) r2) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n int r0 = r6.b // Catch:{ ic -> 0x0025, gh -> 0x0020, Throwable -> 0x002a }\n r1 = r0\n r0 = r2\n goto L_0x0002\n L_0x0020:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0033\n L_0x0025:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0044\n L_0x002a:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"未知错误\"\n r0.<init>(r1)\n throw r0\n L_0x0032:\n r2 = move-exception\n L_0x0033:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 < r3) goto L_0x0002\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0043:\n r2 = move-exception\n L_0x0044:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 >= r3) goto L_0x008a\n int r3 = r6.e // Catch:{ InterruptedException -> 0x0053 }\n int r3 = r3 * 1000\n long r3 = (long) r3 // Catch:{ InterruptedException -> 0x0053 }\n java.lang.Thread.sleep(r3) // Catch:{ InterruptedException -> 0x0053 }\n goto L_0x0002\n L_0x0053:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x0078\n goto L_0x0082\n L_0x0078:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0082:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x008a:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"未知的错误\"\n java.lang.String r1 = r2.a()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x00bb\n goto L_0x00c5\n L_0x00bb:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x00c5:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x00cd:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.gi.e():java.lang.Object\");\n }", "public boolean hasRecursionDepth() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public static boolean checkComplexDerivationOk(XSComplexTypeDecl derived, XSTypeDefinition base, short block) {\n/* 176 */ if (derived == SchemaGrammar.fAnyType)\n/* 177 */ return (derived == base); \n/* 178 */ return checkComplexDerivation(derived, base, block);\n/* */ }", "boolean isRecursive();", "private int rightChild(int i){return 2*i+2;}", "int getTemporaryMaxDepth();", "private int root(int i) {\n validate(i);\n while(i != id[i]) {\n i = id[i];\n }\n return i;\n }", "public abstract void mo24206b(@C5937f C12292n0<? super T> n0Var);", "public abstract int getNodeType();", "private void checkRep() {\n\t\tif (CHECK_CONSTANT) {\n\t\tassert (label != null && childNode != null);\n\t\t}\n\t}", "private void checkDerivedInstances() throws UnableToResolveForeignEntityException {\r\n \r\n if (currentModuleTypeInfo.isExtension()) {\r\n //don't add derived instances again for an adjunct module.\r\n return;\r\n }\r\n \r\n final ModuleName currentModuleName = currentModuleTypeInfo.getModuleName(); \r\n \r\n \r\n \r\n for (int i = 0, nTypeConstructors = currentModuleTypeInfo.getNTypeConstructors(); i < nTypeConstructors; ++i) {\r\n \r\n TypeConstructor typeCons = currentModuleTypeInfo.getNthTypeConstructor(i);\r\n \r\n //use private functions equalsInt, lessThanInt etc as the instance resolving functions for\r\n //the Eq, Ord and Enum instances of an enum type. This saves class file space and which could be quite bulky for\r\n //long enum types, since the Ord methods do case-of-cases and so have length proportional to the square of\r\n //the number of data constructors. It also saves on compilation time. Benchmarks show that there is no\r\n //runtime performance impact.\r\n final boolean useCompactEnumDerivedInstances = \r\n TypeExpr.isEnumType(typeCons) && !typeCons.getName().equals(CAL_Prelude.TypeConstructors.Boolean);\r\n \r\n //this flag is used to ensure that the fromInt toInt Helper functions\r\n //are added at most once for each instance type\r\n boolean addedIntHelpers = false;\r\n \r\n for (int j = 0, nDerivedInstances = typeCons.getNDerivedInstances(); j < nDerivedInstances; ++j) {\r\n \r\n QualifiedName typeClassName = typeCons.getDerivingClauseTypeClassName(j);\r\n TypeClass typeClass = currentModuleTypeInfo.getVisibleTypeClass(typeClassName);\r\n final SourceRange declarationPosition = typeCons.getDerivingClauseTypeClassPosition(j);\r\n \r\n //If the type is T a b c, then the instance type for type class C will be \r\n //(C a, C b, C c) => T a b c\r\n TypeConsApp instanceType = makeInstanceType(typeCons, typeClass); \r\n \r\n ClassInstance classInstance;\r\n \r\n //make sure the toInt fromInt helpers are added if the \r\n //class needs them\r\n if (!addedIntHelpers && \r\n (typeClassName.equals(CAL_Prelude.TypeClasses.Enum) ||\r\n typeClassName.equals(CAL_Prelude.TypeClasses.IntEnum) ||\r\n typeClassName.equals(CAL_QuickCheck.TypeClasses.Arbitrary))) {\r\n\r\n TypeExpr intType = compiler.getTypeChecker().getTypeConstants().getIntType();\r\n TypeExpr fromIntHelperTypeExpr = TypeExpr.makeFunType(intType, instanceType);\r\n TypeExpr toIntHelperTypeExpr = TypeExpr.makeFunType(instanceType, intType);\r\n \r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeFromIntHelper(typeCons), fromIntHelperTypeExpr, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeToIntHelper(typeCons), toIntHelperTypeExpr, declarationPosition);\r\n\r\n addedIntHelpers = true;\r\n }\r\n \r\n \r\n //add the definitions of the instance functions \r\n if (typeClassName.equals(CAL_Prelude.TypeClasses.Eq)) {\r\n \r\n classInstance = checkDerivedEqInstance(typeCons, instanceType, typeClass, useCompactEnumDerivedInstances, declarationPosition); \r\n \r\n } else if (typeClassName.equals(CAL_Prelude.TypeClasses.Ord)) {\r\n \r\n classInstance = checkDerivedOrdInstance(typeCons, instanceType, typeClass, useCompactEnumDerivedInstances, declarationPosition); \r\n\r\n } else if (typeClassName.equals(CAL_Prelude.TypeClasses.Bounded)) {\r\n \r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeMinBoundInstanceFunction(typeCons), instanceType, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeMaxBoundInstanceFunction(typeCons), instanceType, declarationPosition);\r\n \r\n classInstance = new ClassInstance(currentModuleName, instanceType, typeClass, null, ClassInstance.InstanceStyle.DERIVING);\r\n \r\n } else if (typeClassName.equals(CAL_Prelude.TypeClasses.Enum)) { \r\n \r\n TypeExpr listTypeExpr = compiler.getTypeChecker().getTypeConstants().makeListType(instanceType);\r\n TypeExpr intType = compiler.getTypeChecker().getTypeConstants().getIntType();\r\n TypeExpr upFromTypeExpr = TypeExpr.makeFunType(instanceType, listTypeExpr);\r\n TypeExpr upFromThenTypeExpr = TypeExpr.makeFunType(instanceType, upFromTypeExpr);\r\n TypeExpr upFromThenToTypeExpr = TypeExpr.makeFunType(instanceType, upFromThenTypeExpr);\r\n \r\n TypeExpr upFromToTypeExpr = TypeExpr.makeFunType(instanceType, upFromTypeExpr); \r\n TypeExpr upFromToHelperTypeExpr = \r\n TypeExpr.makeFunType(intType, TypeExpr.makeFunType(intType, listTypeExpr)); \r\n \r\n TypeExpr upFromThenToHelperExpr =\r\n TypeExpr.makeFunType(intType, TypeExpr.makeFunType(intType, TypeExpr.makeFunType(intType, listTypeExpr)));\r\n \r\n\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeUpFromToHelper(typeCons), \r\n upFromToHelperTypeExpr, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeUpFromThenToHelperUp(typeCons), \r\n upFromThenToHelperExpr, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeUpFromThenToHelperDown(typeCons), \r\n upFromThenToHelperExpr, declarationPosition);\r\n \r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeEnumUpFromThenInstanceFunction(typeCons), \r\n upFromThenTypeExpr, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeEnumUpFromThenToInstanceFunction(typeCons), \r\n upFromThenToTypeExpr, declarationPosition);\r\n \r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeEnumUpFromToInstanceFunction(typeCons), \r\n upFromToTypeExpr, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeEnumUpFromInstanceFunction(typeCons), \r\n upFromTypeExpr, declarationPosition);\r\n \r\n classInstance = new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {\r\n ClassInstance.makeInternalInstanceMethodName(CAL_Prelude.Functions.upFrom.getUnqualifiedName(), typeCons.getName()),\r\n ClassInstance.makeInternalInstanceMethodName(CAL_Prelude.Functions.upFromThen.getUnqualifiedName(), typeCons.getName()),\r\n ClassInstance.makeInternalInstanceMethodName(CAL_Prelude.Functions.upFromTo.getUnqualifiedName(), typeCons.getName()),\r\n ClassInstance.makeInternalInstanceMethodName(CAL_Prelude.Functions.upFromThenTo.getUnqualifiedName(), typeCons.getName())\r\n }, \r\n ClassInstance.InstanceStyle.DERIVING);\r\n \r\n } else if (typeClassName.equals(CAL_Prelude.TypeClasses.Outputable)) {\r\n \r\n classInstance = checkDerivedOutputableInstance(typeCons, instanceType, typeClass, declarationPosition);\r\n \r\n } else if (typeClassName.equals(CAL_Prelude.TypeClasses.Inputable)) {\r\n \r\n if(typeCons.getNDataConstructors() > 0) {\r\n TypeExpr jObjectTypeExpr = TypeExpr.makeNonParametricType(currentModuleTypeInfo.getVisibleTypeConstructor(CAL_Prelude.TypeConstructors.JObject));\r\n TypeExpr inputTypeExpr = TypeExpr.makeFunType(jObjectTypeExpr, instanceType);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeAlgebraicInputInstanceMethod(typeCons), inputTypeExpr, declarationPosition);\r\n\r\n classInstance = new ClassInstance(currentModuleName, instanceType, typeClass, null, ClassInstance.InstanceStyle.DERIVING);\r\n \r\n } else {\r\n //will be a foreign type (and not a built-in type or type defined by an algebraic data declaration).\r\n //Unlike any of the other derived instances, the class methods for the derived Inputable class are\r\n //added late in the ExpressionGenerator. This is because \r\n //a) there is a distinct method for each foreign object type (it must do a cast, and that cast is type specific.\r\n //b) there is no direct way to represent the cast in CAL (although derived Inputable and Outputable instances can\r\n // be used to do the job, once this feature is in place!)\r\n \r\n classInstance = new ClassInstance(currentModuleName, instanceType, typeClass, null, ClassInstance.InstanceStyle.DERIVING);\r\n }\r\n \r\n } else if (typeClassName.equals(CAL_Debug.TypeClasses.Show)) {\r\n \r\n classInstance = checkDerivedShowInstance(typeCons, instanceType, typeClass, declarationPosition); \r\n \r\n } else if (typeClassName.equals(CAL_QuickCheck.TypeClasses.Arbitrary)) {\r\n \r\n if (typeCons.getForeignTypeInfo() != null) {\r\n throw new IllegalStateException(\"Arbitrary instances cannot be derived for foreign types\"); \r\n }\r\n \r\n //this type represents a Gen for the current instance type.\r\n TypeExpr genInstanceType =\r\n new TypeConsApp(\r\n currentModuleTypeInfo.getVisibleTypeConstructor(CAL_QuickCheck.TypeConstructors.Gen),\r\n new TypeExpr [] {instanceType}); \r\n \r\n //this type represents the type (Gen a)\r\n TypeExpr genAType =\r\n new TypeConsApp(\r\n currentModuleTypeInfo.getVisibleTypeConstructor(CAL_QuickCheck.TypeConstructors.Gen),\r\n new TypeExpr [] {TypeExpr.makeParametricType()} ); \r\n\r\n TypeExpr coarbitraryFunctionType = TypeExpr.makeFunType(instanceType, TypeExpr.makeFunType(genAType, genAType)); \r\n \r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeArbitraryFunction(typeCons), genInstanceType, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeCoArbitraryFunction(typeCons), coarbitraryFunctionType, declarationPosition);\r\n \r\n classInstance = new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {\r\n ClassInstance.makeInternalInstanceMethodName(\"arbitrary\", typeCons.getName()),\r\n ClassInstance.makeInternalInstanceMethodName(\"coarbitrary\", typeCons.getName()),\r\n CAL_QuickCheck_internal.Functions.generateInstanceDefault\r\n }, \r\n InstanceStyle.DERIVING);\r\n \r\n \r\n } else if (typeClassName.equals(CAL_Prelude.TypeClasses.IntEnum)) {\r\n \r\n // algebraic types (only enumeration types are permitted; the DerivedInstanceFunctionGenerator methods will check that)\r\n if(typeCons.getForeignTypeInfo() != null) {\r\n throw new IllegalStateException(\"IntEnum instances cannot be derived for foreign types\"); \r\n }\r\n \r\n TypeExpr maybeTypeExpr = \r\n new TypeConsApp(\r\n currentModuleTypeInfo.getVisibleTypeConstructor(CAL_Prelude.TypeConstructors.Maybe),\r\n new TypeExpr[] {instanceType});\r\n\r\n TypeExpr intType = compiler.getTypeChecker().getTypeConstants().getIntType();\r\n TypeExpr intToEnumTypeExpr = TypeExpr.makeFunType(intType, instanceType);\r\n TypeExpr intToEnumCheckedTypeExpr = TypeExpr.makeFunType(intType, maybeTypeExpr);\r\n\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeEnumIntToEnumFunction(typeCons), intToEnumTypeExpr, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeEnumIntToEnumCheckedFunction(typeCons), intToEnumCheckedTypeExpr, declarationPosition);\r\n \r\n classInstance = new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {\r\n ClassInstance.makeInternalInstanceMethodName(\"intToEnum\", typeCons.getName()),\r\n ClassInstance.makeInternalInstanceMethodName(\"intToEnumChecked\", typeCons.getName()),\r\n ClassInstance.makeInternalInstanceMethodName(\"toIntHelper\", typeCons.getName())}, \r\n InstanceStyle.DERIVING);\r\n \r\n } else {\r\n // static checks in DataDeclarationChecker will have logged an error message for classes that we cannot\r\n // derive an instance for, so this exception won't be shown to the user as an internal coding error (although it\r\n // will cause further compilation to halt with \"unable to recover from previous compilation errors\").\r\n throw new IllegalStateException(\"Invalid deriving type class.\");\r\n }\r\n \r\n currentModuleTypeInfo.addClassInstance(classInstance); \r\n } \r\n } \r\n }", "private static void iddfs(State curr, int depth) {\n for(int i = 0; i <= depth; i++) {\r\n\r\n if(curr.isGoalState()) \r\n System.out.println(i+\":\"+curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(i+\":\"+curr.getOrderedPair());//initial\r\n\r\n curr.close.add(curr);\r\n State currState = curr;\r\n while(!currState.isGoalState()) {\r\n if(currState.depth < i)\r\n curr.buildStack(currState.getSuccessors(currState));\r\n System.out.print(i+\":\");\r\n curr.printHelp(currState, 5);\r\n if(!curr.open.isEmpty()) {\r\n currState = curr.open.get(curr.open.size()-1);\r\n curr.close.add(curr.open.remove(curr.open.size()-1));\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n if(currState.isGoalState()) {\r\n System.out.println(i+\":\"+currState.getOrderedPair() + \" Goal\");\r\n curr.printPath(currState);\r\n return;\r\n }\r\n curr.open.clear(); curr.close.clear();\r\n }\r\n }", "io.dstore.values.BooleanValue getRecursive();", "public abstract void mo70702a(C30989b c30989b);", "@Test(timeout = 10000)\n public void genericType_sd834_failAssert3() throws Exception {\n // AssertGenerator generate try/catch block with fail statement\n try {\n Method recursiveEnum = getClass().getDeclaredMethod(\"generic\", Enum[].class);\n TypeName.get(recursiveEnum.getReturnType());\n TypeName.get(recursiveEnum.getGenericReturnType());\n TypeName genericTypeName = TypeName.get(recursiveEnum.getParameterTypes()[0]);\n // StatementAdd: generate variable from return value\n TypeName __DSPOT_invoc_11 = TypeName.get(recursiveEnum.getGenericParameterTypes()[0]);\n // StatementAdd: add invocation of a method\n __DSPOT_invoc_11.unbox();\n org.junit.Assert.fail(\"genericType_sd834 should have thrown UnsupportedOperationException\");\n } catch (UnsupportedOperationException eee) {\n }\n }", "@Test public void selfRecursive() {\n check(\"declare function local:f($i) { if($i eq 12345) then $i else local:f($i+1) };\" +\n \"local:f(0)\",\n\n 12345,\n\n exists(Util.className(If.class) + '/' + Util.className(StaticFuncCall.class) +\n \"[@tailCall eq 'true']\")\n );\n }", "private static int getHeavyType(MMFFMolecule mol, int atom) {\n // Aromatic Atoms\n if (mol.isAromaticAtom(atom)) {\n // 5 member rings\n if (isInAromaticRingOfSize(mol, atom, 5)) {\n ArrayList<Integer> alphaHet = new ArrayList<Integer>(mol.getAllAtoms());\n ArrayList<Integer> betaHet = new ArrayList<Integer>(mol.getAllAtoms());\n\n boolean alphaBetaSameRing = false;\n boolean isAlphaOS = false;\n boolean isBetaOS = false;\n\n if (mol.getAtomicNo(atom) == 6 || mol.getAtomicNo(atom) == 7) {\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n // Skip atoms not in the ring.\n if (!isInAromaticRingOfSize(mol, nbr, 5))\n continue;\n\n if (inSameRing(mol, atom, nbr, 5)\n && (mol.getAtomicNo(nbr) == 8\n || mol.getAtomicNo(nbr) == 16\n || mol.getAtomicNo(nbr) == 7\n && degree(mol, nbr) == 3\n && !isAtomNOxide(mol, nbr)))\n alphaHet.add(nbr);\n\n for (int j=0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n\n if (nbr2 == atom)\n continue;\n\n if (!isInAromaticRingOfSize(mol, nbr2, 5))\n continue;\n\n if (inSameRing(mol, atom, nbr2, 5)\n && (mol.getAtomicNo(nbr2) == 8\n || mol.getAtomicNo(nbr2) == 16\n || mol.getAtomicNo(nbr2) == 7\n && degree(mol, nbr2) == 3\n && !isAtomNOxide(mol, nbr2)))\n betaHet.add(nbr2);\n }\n }\n\n for (int alpha : alphaHet)\n if (mol.getAtomicNo(alpha) == 8 || mol.getAtomicNo(alpha) == 16) {\n isAlphaOS = true;\n break;\n }\n\n for (int beta : betaHet)\n if (mol.getAtomicNo(beta) == 8 || mol.getAtomicNo(beta) == 16) {\n isBetaOS = true;\n break;\n }\n\n for (int i=0; i<alphaHet.size(); i++)\n for (int j=i; j<betaHet.size(); j++)\n if (inSameRing(mol, alphaHet.get(i), betaHet.get(j), 5)) {\n alphaBetaSameRing = true;\n break;\n }\n }\n\n switch (mol.getAtomicNo(atom)) {\n // ----- Carbon -----\n case 6:\n if (betaHet.isEmpty()) {\n int nN = 0;\n int nFormalCharge = 0;\n int nIn5Ring = 0;\n int nIn6Ring = 0;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) == 7\n && degree(mol, nbr) == 3) {\n nN++;\n\n if (mol.getAtomCharge(nbr) > 0\n && !isAtomNOxide(mol, nbr))\n nFormalCharge++;\n\n if (isInAromaticRingOfSize(mol, nbr, 5))\n nIn5Ring++;\n\n if (isInAromaticRingOfSize(mol, nbr, 6))\n nIn6Ring++;\n }\n }\n\n // CIM+ (Aromatic carbon between N's in\n // imidazolium)\n if ((nN == 2 && nIn5Ring > 0 || nN == 3 && nIn5Ring == 2)\n && nFormalCharge > 0 && nIn6Ring == 0)\n return 80;\n }\n\n // If we have both or none of alpha/beta heteroatoms.\n if (!(alphaHet.isEmpty() ^ betaHet.isEmpty())) {\n boolean surroundedByBenzeneC = true;\n boolean surroundedByArom = true;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) != 6\n || !inRingOfSize(mol, nbr, 6))\n surroundedByBenzeneC = false;\n\n if (inSameRing(mol, atom, nbr, 5)\n && !mol.isAromaticAtom(nbr))\n surroundedByArom = false;\n }\n\n // C5 (General Carbon in 5 membered heteroaromatic\n // ring)\n if (alphaHet.isEmpty() && betaHet.isEmpty()\n && !surroundedByBenzeneC && surroundedByArom)\n return 78;\n\n // C5 (General Carbon in 5 membered heteroaromatic\n // ring)\n if (!alphaHet.isEmpty() && !alphaHet.isEmpty()\n && (!alphaBetaSameRing || !isAlphaOS && !isBetaOS))\n return 78;\n }\n\n // C5A (Aromatic 5-ring C, alpha to N:, O: or S:)\n if (!alphaHet.isEmpty() && (betaHet.isEmpty() || isAlphaOS))\n return 63;\n\n // C5B (Aromatic 5-ring C, alpha to N:, O: or S:)\n if (!betaHet.isEmpty() && (alphaHet.isEmpty() || isBetaOS))\n return 64;\n break;\n\n // ----- Nitrogen -----\n case 7:\n // N5AX (N-oxide nitrogen in 5-ring alpha position)\n // N5BX (N-oxide nitrogen in 5-ring beta position)\n // N5OX (N-oxide nitrogen in other 5-ring position)\n if (isAtomNOxide(mol, atom))\n return 82;\n\n if (alphaHet.isEmpty() && betaHet.isEmpty()) {\n // NPYL (Aromatic 5-ring nitrogen with pi lone\n // pair)\n if (degree(mol, atom) == 3)\n return 39;\n\n // N5M (Nitrogen in 5-ring aromatic anion)\n return 76;\n }\n\n // NIM+ (Aromatic nitrogen in imidazolium)\n // N5A+ (Positive nitrogen in 5-ring alpha position)\n // N5B+ (Positive nitrogen in 5-ring beta position)\n // N5+ (Positive nitrogen in other 5-ring position)\n if (degree(mol, atom) == 3)\n if (alphaHet.isEmpty() ^ betaHet.isEmpty())\n return 81;\n\n // N5A (Aromatic 5-ring N, alpha to N:, O: or S:)\n if (!alphaHet.isEmpty() && (betaHet.isEmpty() || isAlphaOS))\n return 65;\n\n // N5B (Aromatic 5-ring N, beta to N:, O: or S:)\n if (!betaHet.isEmpty() && (alphaHet.isEmpty() || isBetaOS))\n return 66;\n\n // N5 (General Nitrogen in 5-membered heteroaromatic\n // ring)\n if (!alphaHet.isEmpty() && !betaHet.isEmpty())\n return 79;\n break;\n\n // ----- Oxygen -----\n case 8:\n // OFUR (Aromatic 5-ring Oxygen with pi lone pair)\n return 59;\n\n // ----- Sulfur -----\n case 16:\n // STHI (Aromatic 5-ring Sulfur with pi lone pair)\n return 44;\n }\n }\n\n // 6 member rings\n if (isInAromaticRingOfSize(mol, atom, 6)) {\n switch (mol.getAtomicNo(atom)) {\n // ----- Carbon -----\n case 6:\n // CB (Aromatic Carbon (eg in benzene))\n return 37;\n\n // ----- Nitrogen -----\n case 7:\n // NPOX (Pyridinium N-oxide Nitrogen)\n if (isAtomNOxide(mol, atom))\n return 69;\n\n // NPD+ (Aromatic Nitrogen in pyridinium)\n if (degree(mol, atom) == 3)\n return 58;\n\n // NPYD (Aromatic Nitrogen with sigma lone pair)\n return 38;\n }\n }\n }\n\n // Aliphatic Heavy Atoms\n switch (mol.getAtomicNo(atom)) {\n // ----- Lithium -----\n case 3:\n // LI+ (Lithium cation)\n if (mol.getConnAtoms(atom) == 0)\n return 92;\n break;\n\n // ----- Carbon -----\n case 6:\n // 4 Neighbours\n if (degree(mol, atom) == 4) {\n // CR3R (Aliphatic Carbon in 3-member ring)\n if (mol.getAtomRingSize(atom) == 3)\n return 22;\n\n // CR4R (Aliphatic Carbon in 4-member ring)\n if (mol.getAtomRingSize(atom) == 4)\n return 20;\n\n // CR (Alkyl Carbon)\n return 1;\n }\n\n // 3 Neighbours\n if (degree(mol, atom) == 3) {\n int nN2 = 0;\n int nN3 = 0;\n int nO = 0;\n int nS = 0;\n int doubleBondedElement = 0;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n // Find a double-bonded element\n if (mol.getBondOrder(mol.getBond(atom, nbr)) == 2)\n doubleBondedElement = mol.getAtomicNo(nbr);\n\n // Count the terminal Oxygen/Sulfur atoms.\n if (degree(mol, nbr) == 1) {\n if (mol.getAtomicNo(nbr) == 8)\n nO++;\n if (mol.getAtomicNo(nbr) == 16)\n nS++;\n } else if (mol.getAtomicNo(nbr) == 7) {\n if (degree(mol, nbr) == 3)\n nN3++;\n else if (degree(mol, nbr) == 2 &&\n mol.getBondOrder(mol.getBond(atom, nbr)) == 2)\n nN2++;\n }\n }\n\n // If there are two or more Nitrogens with 3 neighbours\n // each, and there are no nitrogens with two neighbours\n // only, and Carbon is double-bonded to Nitrogen.\n if (nN3 >= 2 && nN2 == 0 && doubleBondedElement == 7) {\n // CNN+ (Carbon in +N=C-N: resonance structures)\n // CGD+ (Guanidinium Carbon)\n return 57;\n }\n\n // If there are two terminal Oxygen/Sulfur atoms.\n if (nO == 2 || nS == 2) {\n // CO2M (Carbon in carboxylate anion)\n // CS2M (Carbon in thiocarboxylate anion)\n return 41;\n }\n\n // If the Carbon is in a 4-member ring and is\n // double-bonded to another Carbon.\n if (mol.getAtomRingSize(atom) == 4\n && doubleBondedElement == 6) {\n // CR4E (Olefinic Carbon in 4-member ring)\n return 30;\n }\n\n // If the Carbon is double bonded to Nitrogen, Oxygen,\n // Phosphorus or Sulfur.\n if (doubleBondedElement == 7 || doubleBondedElement == 8\n || doubleBondedElement == 15 || doubleBondedElement == 16) {\n // C=N (Imine-atomType Carbon)\n // CGD (Guanidine Carbon)\n // C=O (Generic carbonyl Carbon)\n // C=OR (Ketone or aldehyde carbonyl Carbon)\n // C=ON (Amide carbonyl Carbon)\n // COO (Carboxylic acid or ester carbonyl Carbon)\n // COON (Carbamate carbonyl Carbon)\n // COOO (Carbonic acid or ester carbonyl function)\n // C=OS (Thioester carbonyl Carbon, double bonded to O)\n // C=P (Carbon doubly bonded to P)\n // C=S (Thioester Carbon, double bonded to S)\n // C=SN (Thioamide Carbon, double bonded to S)\n // CSO2 (Carbon in >C=SO2)\n // CS=O (Sulfinyl Carbon in >C=S=O)\n // CSS (Thiocarboxylic acid or ester Carbon)\n return 3;\n }\n\n // Generic SP2 Carbon\n // C=C (Vinylic Carbon)\n // CSP2 (Generic SP2 Carbon)\n return 2;\n }\n\n // 2 Neighbours\n if (degree(mol, atom) == 2) {\n // CSP (Acetylenic Carbon), =C= (Allenic Carbon)\n return 4;\n }\n\n if (degree(mol, atom) == 1) {\n // C%- (Isonitrile Carbon)\n return 60;\n }\n break;\n\n // ----- Nitrogen -----\n case 7:\n // Count the number of terminal Oxygens as well as terminal\n // Oxygens bonded to neighbouring Phosphorus or Sulfur atoms.\n int nTermOtoN = 0;\n boolean isSulfonamideN = false;\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) == 8 && degree(mol, nbr) == 1)\n nTermOtoN++;\n\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) >= 3\n && (mol.getAtomicNo(nbr) == 15 || mol.getAtomicNo(nbr) == 16)) {\n int nOtoSP = 0;\n\n for (int j=0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n if (mol.getAtomicNo(nbr2) == 8 && degree(mol, nbr2) == 1)\n nOtoSP++;\n }\n\n if (!isSulfonamideN)\n isSulfonamideN = nOtoSP >= 2;\n }\n }\n\n // 4 neighbours.\n if (degree(mol, atom) == 4) {\n // N3OX (sp3-hybridized N-oxide Nitrogen)\n if (isAtomNOxide(mol, atom))\n return 68;\n\n // NR+ (Quaternary Nitrogen)\n return 34;\n }\n\n // 3 neighbours.\n if (degree(mol, atom) == 3) {\n // Total bond order >= 4\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) >= 4) {\n boolean doubleCN = false;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getBondOrder(mol.getBond(atom, nbr)) == 2) {\n doubleCN = mol.getAtomicNo(nbr) == 7\n || mol.getAtomicNo(nbr) == 6;\n\n if (mol.getAtomicNo(nbr) == 6) {\n for (int j=0; doubleCN && j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n\n if (nbr2 == atom)\n continue;\n\n doubleCN = !(mol.getAtomicNo(nbr2) == 7\n && degree(mol, nbr2) == 3);\n }\n }\n }\n }\n\n // N20X (sp2-hybridized N-oxide Nitrogen)\n if (nTermOtoN == 1)\n return 67;\n\n // NO2 (Nitrogen in nitro group)\n // NO3 (Nitrogen in nitrate group)\n if (nTermOtoN >= 2)\n return 45;\n\n // N+=C (Iminium Nitrogen)\n // N+=N (Positively charged Nitrogen doubly bonded to\n // N)\n if (doubleCN)\n return 54;\n }\n\n // Total bond order >= 3\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) >= 3) {\n boolean isNCOorNCS = false;\n boolean isNCNplus = false;\n boolean isNGDplus = false;\n boolean isNNNorNNC = false;\n boolean isNbrC = false;\n boolean isNbrBenzeneC = false;\n int EdoubledC = 0;\n int EtripledC = 0;\n int N2toC = 0;\n int N3toC = 0;\n int OtoC = 0;\n int StoC = 0;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n // Neighbour is Carbon\n if (mol.getAtomicNo(nbr) == 6) {\n isNbrC = true;\n\n if (mol.isAromaticAtom(nbr)\n && mol.getAtomRingSize(nbr) == 6)\n isNbrBenzeneC = true;\n\n N2toC = 0;\n N3toC = 0;\n OtoC = 0;\n StoC = 0;\n int nFormalCharge = 0;\n int inAromatic6Ring = 0;\n\n for (int j =0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n int bond = mol.getBond(nbr, nbr2);\n\n // Check if we have an Oxygen or Sulfur\n // double bonded to this Carbon.\n if (mol.getBondOrder(bond) == 2\n && (mol.getAtomicNo(nbr2) == 8\n || mol.getAtomicNo(nbr2) == 16))\n isNCOorNCS = true;\n\n // Check and identify if an element is\n // double bonded to this Carbon.\n if (mol.getBondOrder(bond) == 2\n || (mol.isAromaticBond(bond)\n && (mol.getAtomicNo(nbr2) == 6\n || (mol.getAtomicNo(nbr2) == 7\n && inRings(mol, nbr2) == 1))))\n EdoubledC = mol.getAtomicNo(nbr2);\n\n // Check and identify if an element is\n // triple bonded to this Carbon.\n if (mol.getBondOrder(bond) == 3)\n EtripledC = mol.getAtomicNo(nbr2);\n\n // If this Carbon is bonded to a Nitrogen\n // with 3 neighbours.\n if (mol.getAtomicNo(nbr2) == 7\n && degree(mol, nbr2) == 3) {\n if (mol.getAtomCharge(nbr2) == 1)\n nFormalCharge++;\n\n if (isInAromaticRingOfSize(mol, nbr, 6))\n inAromatic6Ring++;\n\n int OtoN3 = 0;\n for (int k=0; k<mol.getAllConnAtoms(nbr2); k++) {\n int nbr3 = mol.getConnAtom(nbr2, k);\n if (mol.getAtomicNo(nbr3) == 8)\n OtoN3++;\n }\n\n if (OtoN3 < 2)\n N3toC++;\n }\n\n // If this Carbon is bonded to a Nitrogen\n // with 2 neighbours with a double or\n // aromatic bond.\n if (mol.getAtomicNo(nbr2) == 7\n && degree(mol, nbr2) == 2\n && (mol.getBondOrder(bond) == 2\n || mol.isAromaticBond(bond)))\n N2toC++;\n\n // If this Carbon is bonded to an aromatic\n // atom.\n if (mol.isAromaticAtom(nbr2)) {\n if (mol.getAtomicNo(nbr2) == 8)\n OtoC++;\n\n if (mol.getAtomicNo(nbr2) == 16)\n StoC++;\n }\n }\n\n\n if (EdoubledC == 7) {\n if (N3toC == 2 && N2toC == 0\n && nFormalCharge > 0\n && inAromatic6Ring == 0\n && degree(mol, nbr) < 4)\n isNCNplus = true;\n\n if (N3toC == 3)\n isNGDplus = true;\n }\n\n // Neighbour is Nitrogen\n } else if (mol.getAtomicNo(nbr) == 7) {\n int NtoN = 0;\n int OtoN = 0;\n int StoN = 0;\n\n for (int j=0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n int bond = mol.getBond(nbr, nbr2);\n\n if (mol.getBondOrder(bond) == 2) {\n if (mol.getAtomicNo(nbr2) == 6) {\n for (int k=0; k<mol.getAllConnAtoms(nbr2); k++) {\n int nbr3 = mol.getConnAtom(nbr2, k);\n\n if (nbr3 == atom)\n continue;\n\n if (mol.getAtomicNo(nbr3) == 7)\n NtoN++;\n else if (mol.getAtomicNo(nbr3) == 8)\n OtoN++;\n else if (mol.getAtomicNo(nbr3) == 16)\n StoN++;\n }\n\n if (NtoN == 0 && OtoN == 0 && StoN == 0\n && !isNbrBenzeneC)\n isNNNorNNC = true;\n }\n\n if (mol.getAtomicNo(nbr2) == 7\n && !isNbrBenzeneC)\n isNNNorNNC = true;\n }\n }\n }\n }\n\n // If ipso Nitrogen is bonded to Carbon.\n if (isNbrC) {\n if (EtripledC == 7)\n isSulfonamideN = true;\n\n // NCN+ (Either Nitrogen in N+=C-N)\n if (isNCNplus)\n return 55;\n\n // NGD+ (Guanidinium Nitrogen)\n if (isNGDplus)\n return 56;\n\n // NC=C (Enamine or aniline nitrogen, deloc. lp)\n // NC=N (Nitrogen in N-C=N with deloc. lp)\n // NC=P (Nitrogen in N-C=P with deloc. lp)\n // NC%C (Nitrogen attached to C-C triple bond)\n if (!isNCOorNCS && !isSulfonamideN\n && (OtoC == 0 && StoC == 0 && isNbrBenzeneC\n || EdoubledC == 6 || EdoubledC == 7\n || EdoubledC == 15 || EtripledC == 6))\n return 40;\n }\n\n\n // NC=O (Amide nitrogen)\n // NC=S (Thioamide nitrogen)\n // NN=C (Nitrogen in N-N=C moiety with deloc. lp)\n // NN=N (Nitrogen in N-N=N moiety with deloc. lp)\n if (!isSulfonamideN && (isNCOorNCS || isNNNorNNC))\n return 10;\n }\n }\n\n // 2 neighbours.\n if (degree(mol, atom) == 2) {\n // Total bond order = 4\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) == 4) {\n boolean isIsonitrile = false;\n for (int i=0; !isIsonitrile && i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n isIsonitrile = mol.getBondOrder(mol.getBond(atom, nbr)) == 3;\n }\n\n // NR% (Isonitrile Nitrogen)\n if (isIsonitrile)\n return 61;\n\n // =N= (Central Nitrogen in C=N=N or N=N=N)\n return 53;\n }\n\n // Total bond order = 3\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) == 3) {\n boolean isNitroso = false;\n boolean isImineOrAzo = false;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n if (mol.getBondOrder(mol.getBond(atom, nbr)) == 2) {\n isNitroso = mol.getAtomicNo(nbr) == 8\n && nTermOtoN == 1;\n\n isImineOrAzo = mol.getAtomicNo(nbr) == 6\n || mol.getAtomicNo(nbr) == 7;\n }\n }\n\n // N=O (Nitrogen in nitroso group)\n if (isNitroso && !isImineOrAzo)\n return 46;\n\n // N=C (Imine Nitrogen)\n // N=N (Azo-group Nitrogen)\n if (isImineOrAzo)\n return 9;\n }\n\n // Total bond order >= 2\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) >= 2) {\n boolean isNSO = false;\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) == 16) {\n int nTermOtoS = 0;\n\n for (int j=0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n if (mol.getAtomicNo(nbr2) == 8\n && degree(mol, nbr2) == 1)\n nTermOtoS++;\n }\n\n isNSO = nTermOtoS == 1;\n }\n }\n\n // NSO (Divalent nitrogen replacing monovalent O in SO2 group)\n if (isNSO)\n return 48;\n\n // NM (Anionic divalent Nitrogen)\n if (!isSulfonamideN)\n return 62;\n }\n }\n\n // NSO2 (Sulfonamide nitrogen)\n // NSO3 (Sulfonamide nitrogen)\n // NC%N (Nitrogen attached to cyano group)\n if (isSulfonamideN)\n return 43;\n\n // 1 neighbour\n if (degree(mol, atom) == 1) {\n boolean isNSP = false;\n boolean isNAZT = false;\n\n for (int i=0; !isNSP && !isNAZT && i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n isNSP = mol.getBondOrder(mol.getBond(atom, nbr)) == 3;\n\n if (mol.getAtomicNo(nbr) == 7 && degree(mol, nbr) == 2) {\n for (int j=0; !isNAZT && j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n\n isNAZT = mol.getAtomicNo(nbr2) == 7\n && degree(mol, nbr2) == 2\n || mol.getAtomicNo(nbr2) == 6\n && degree(mol, nbr2) == 3;\n }\n\n }\n }\n\n // NSP (Triple bonded Nitrogen)\n if (isNSP)\n return 42;\n\n // NAZT (Terminal nitrogen in azido or diazo group)\n if (isNAZT)\n return 47;\n }\n\n // If nothing was matched\n // NR (Amine Nitrogen)\n return 8;\n\n // ----- Oxygen -----\n case 8:\n // 3 neighbours. O+ (Oxonium Oxygen)\n if (degree(mol, atom) == 3)\n return 49;\n // 2 neighbours.\n if (degree(mol, atom) == 2) {\n // O=+ (Oxenium Oxygen)\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) == 3)\n return 51;\n\n int nHtoO = 0;\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) == 1)\n nHtoO++;\n }\n\n // OH2 (Oxygen in water)\n if (nHtoO + mol.getImplicitHydrogens(atom) == 2)\n return 70;\n\n // Otherwise ipso must be one of:\n // OC=O (Carboxylic acid or ester Oxygen)\n // OC=C (Enolic or phenolic Oxygen)\n // OC=N (Oxygen in -O-C=N- moiety)\n // OC=S (Divalent Oxygen in thioacid or ester)\n // ONO2 (Divalent nitrate \"ether\" Oxygen)\n // ON=O (Divalent nitrate \"ether\" Oxygen)\n // OSO3 (Divalent Oxygen in sulfate group)\n // OSO2 (Divalent Oxygen in sulfite group)\n // OSO (One of two divalent Oxygens attached to Sulfur)\n // OS=O (Divalent Oxygen in R(RO)S=O)\n // -OS (Other divalent Oxygen attached to Sulfur)\n // OPO3 (Divalent Oxygen in phosphate group)\n // OPO2 (Divalent Oxygen in phosphite group)\n // OPO (Divalent Oxygen, one of two Oxygens attached to P)\n // -OP (Other divalent Oxygen attached to Phosphorus)\n return 6;\n }\n // 1 or 0 neighbours.\n if (mol.getConnAtoms(atom) <= 1) {\n int nNtoS = 0;\n int nOtoS = 0;\n int nStoS = 0;\n\n boolean isOxideOtoH = mol.getAllConnAtoms(atom)\n - mol.getConnAtoms(atom)\n + mol.getImplicitHydrogens(atom) > 0 ? true : false;\n boolean isCarboxylateO = false;\n boolean isCarbonylO = false;\n boolean isOxideOtoC = false;\n boolean isNitrosoO = false;\n boolean isOxideOtoN = false;\n boolean isNOxideO = false;\n boolean isNitroO = false;\n boolean isThioSulfinateO = false;\n boolean isSulfateO = false;\n boolean isSulfoxideO = false;\n boolean isPhosphateOrPerchlorateO = false;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n if (isOxideOtoH) break;\n if (isCarboxylateO) break;\n if (isCarbonylO) break;\n if (isOxideOtoC) break;\n if (isNitrosoO) break;\n if (isOxideOtoN) break;\n if (isNOxideO) break;\n if (isNitroO) break;\n if (isThioSulfinateO) break;\n if (isSulfateO) break;\n if (isSulfoxideO) break;\n if (isPhosphateOrPerchlorateO) break;\n\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) == 6\n || mol.getAtomicNo(nbr) == 7\n || mol.getAtomicNo(nbr) == 16) {\n for (int j=0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n\n if (mol.getAtomicNo(nbr2) == 7\n && degree(mol, nbr2) == 2)\n nNtoS++;\n if (mol.getAtomicNo(nbr2) == 8\n && degree(mol, nbr2) == 1)\n nOtoS++;\n if (mol.getAtomicNo(nbr2) == 16\n && degree(mol, nbr2) == 1)\n nStoS++;\n }\n }\n\n isOxideOtoH = mol.getAtomicNo(nbr) == 1;\n\n // If ipso neighbour is a Carbon.\n if (mol.getAtomicNo(nbr) == 6) {\n isCarboxylateO = nOtoS == 2;\n\n isCarbonylO = mol.getBondOrder(mol.getBond(atom, nbr)) == 2;\n\n isOxideOtoC = mol.getBondOrder(mol.getBond(atom, nbr)) == 1\n && nOtoS == 1;\n }\n\n // If ipso neighbour is a Nitrogen.\n if (mol.getAtomicNo(nbr) == 7) {\n isNitrosoO = mol.getBondOrder(mol.getBond(atom, nbr)) == 2;\n\n if (mol.getBondOrder(mol.getBond(atom, nbr)) == 1 && nOtoS == 1) {\n isOxideOtoN = degree(mol, nbr) == 2\n || mol.getOccupiedValence(nbr)\n + mol.getImplicitHydrogens(nbr) == 3;\n\n isNOxideO = mol.getOccupiedValence(nbr)\n + mol.getImplicitHydrogens(nbr) == 4;\n }\n\n isNitroO = nOtoS >= 2;\n }\n\n // If ipso neighbour is a Sulfur.\n if (mol.getAtomicNo(nbr) == 16) {\n isThioSulfinateO = nStoS == 1;\n\n isSulfateO = mol.getBondOrder(mol.getBond(atom, nbr)) == 1\n || mol.getBondOrder(mol.getBond(atom, nbr)) == 2\n && nOtoS + nNtoS > 1;\n\n isSulfoxideO = mol.getBondOrder(mol.getBond(atom, nbr)) == 2\n && nOtoS + nNtoS == 1;\n }\n\n isPhosphateOrPerchlorateO = mol.getAtomicNo(nbr) == 15\n || mol.getAtomicNo(nbr) == 17;\n }\n\n // OM (Oxide oxygen on sp3 carbon\n // OM2 (Oxide oxygen on sp2 carbon\n // OM (Oxide oxygen on sp3 nitrogen (not in original MMFF.I Table III)\n // OM2 (Oxide oxygen on sp2 nitrogen (not in original MMFF.I Table III)\n if (isOxideOtoC || isOxideOtoN || isOxideOtoH)\n return 35;\n\n // O2CM (Oxygen in carboxylate group)\n // ONX (Oxygen in N-oxides)\n // O2N (Oxygen in nitro group)\n // O2NO (Nitro-group oxygen in nitrate)\n // O3N (Nitrate anion oxygen)\n // OSMS (Terminal oxygen in thiosulfinate anion)\n // O-S (Single terminal O on tetracoordinate sulfur)\n // O2S (One of 2 terminal O's on sulfur)\n // O3S (One of 3 terminal O's on sulfur)\n // O4S (Terminal O in sulfate anion)\n // OP (Oxygen in phosphine oxide)\n // O2P (One of 2 terminal O's on P)\n // O3P (One of 3 terminal O's on P)\n // O4P (One of 4 terminal O's on P)\n // O4Cl (Oxygen in perchlorate anion)\n if (isCarboxylateO || isNitroO || isNOxideO || isThioSulfinateO\n || isSulfateO || isPhosphateOrPerchlorateO)\n return 32;\n\n // O=C (Generic carbonyl oxygen)\n // O=CN (Carbonyl oxygen in amides)\n // O=CR (Carbonyl oxygen in aldehydes and ketones)\n // O=CO (Carbonyl oxygen in acids and esters)\n // O=N (Nitroso oxygen)\n // O=S (Doubly bonded sulfoxide oxygen)\n if (isCarbonylO || isNitrosoO || isSulfoxideO)\n return 7;\n }\n break;\n\n // ----- Fluorine -----\n case 9:\n // F (Fluorine)\n if (mol.getConnAtoms(atom) == 1)\n return 11;\n // F- (Fluoride anion)\n if (mol.getConnAtoms(atom) == 0)\n return 89;\n break;\n\n // ----- Sodium -----\n case 11:\n // Na+ (Sodium cation)\n if (mol.getConnAtoms(atom) == 0)\n return 93;\n break;\n\n // ----- Magnesium -----\n case 12:\n // Mg+2 (Dipositive Magnesium cation)\n if (mol.getConnAtoms(atom) == 0)\n return 99;\n break;\n\n // ----- Silicon -----\n case 14:\n // Si (Silicon)\n return 19;\n\n // ----- Phosphorus -----\n case 15:\n // PO4 (Phosphate group phosphorus)\n // PO3 (Phosphorus with 3 attached oxygens)\n // PO2 (Phosphorus with 2 attached oxygens)\n // PO (Phosphine oxide phosphorus)\n if (degree(mol, atom) == 4)\n return 25;\n // P (Phosphorus in phosphines)\n if (degree(mol, atom) == 3)\n return 26;\n // -P=C (Phosphorus doubly bonded to C)\n if (degree(mol, atom) == 2)\n return 75;\n break;\n\n // ----- Sulfur -----\n case 16:\n // 3 or 4 neighbours.\n if (degree(mol, atom) == 3 || degree(mol, atom) == 4) {\n int nONtoS = 0;\n int nStoS = 0;\n boolean isCdoubleS = false;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n // Check if ipso Sulfur is double bonded to Carbon.\n if (mol.getAtomicNo(nbr) == 6\n && mol.getBondOrder(mol.getBond(atom, nbr)) == 2)\n isCdoubleS = true;\n\n // If neighbour is terminal Oxygen/Sulfur or a\n // secondary Nitrogen increment counter.\n if ((mol.getConnAtoms(nbr) == 1 && mol.getAtomicNo(nbr) == 8)\n || (degree(mol, nbr) == 2 && mol.getAtomicNo(nbr) == 7))\n nONtoS++;\n\n if (mol.getConnAtoms(nbr) == 1 && mol.getAtomicNo(nbr) == 16)\n nStoS++;\n }\n\n // =SO2 (Sulfone Sulfur, doubly bonded to Carbon)\n if (degree(mol, atom) == 3 && nONtoS == 2 && isCdoubleS\n || degree(mol, atom) == 4)\n return 18;\n\n // SSOM (Tricoordinate Sulfur in anionic thiosulfinate\n // group)\n if ((nONtoS > 0 && nStoS > 0) || nONtoS == 2 && !isCdoubleS)\n return 73;\n\n // S=O (Sulfoxide Sulfur)\n // S=N (Tricoordinate Sulfur doubly bonded to N)\n return 17;\n }\n // 2 neighbours.\n if (degree(mol, atom) == 2) {\n boolean isOdoubleS = false;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n // Check if ipso Sulfur is double bonded to Oxygen.\n if (mol.getAtomicNo(nbr) == 8\n && mol.getBondOrder(mol.getBond(atom, nbr)) == 2)\n isOdoubleS = true;\n }\n\n // =S=O (Sulfinyl Sulfur)\n if (isOdoubleS)\n return 74;\n\n // S (Thiol, Sulfide or Disulfide Sulfur)\n return 15;\n }\n // 1 neighbour.\n if (degree(mol, atom) == 1) {\n int nbrTermS = 0;\n boolean isCdoubleS = false;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n // Count how many terminal Sulfurs are 2 jumps from\n // atom.\n for (int j=0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n\n if (mol.getAtomicNo(nbr2) == 16\n && degree(mol, nbr2) == 1)\n nbrTermS++;\n }\n\n // Check if ipso Sulfur is double bonded to Carbon.\n if (mol.getAtomicNo(nbr) == 6\n && mol.getBondOrder(mol.getBond(atom, nbr)) == 2)\n isCdoubleS = true;\n }\n\n // If ipso Sulfur is double bonded to Carbon and the\n // latter is not bonded to other terminal Sulfur atoms,\n // then it is not a dithiocarboxylate, but a thioketone,\n // etc.\n // S=C (Sulfur doubly bonded to carbon)\n if (isCdoubleS && nbrTermS != 2)\n return 16;\n\n // Ipso must be one of:\n // S-P (Terminal Sulfur bonded to P)\n // SM (Anionic terminal Sulfur)\n // SSMO (Terminal Sulfur in thiosulfinate group)\n return 72;\n }\n break;\n\n // ----- Chlorine -----\n case 17:\n // 4 Neighbours\n if (mol.getConnAtoms(atom) == 4) {\n int nO = 0;\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) == 8)\n nO++;\n }\n\n // CLO4 (Perchlorate anion Chlorine)\n if (nO == 4)\n return 77;\n }\n // Cl (Chloride)\n if (mol.getConnAtoms(atom) == 1)\n return 12;\n // Cl- (Chloride anion)\n if (mol.getConnAtoms(atom) == 0)\n return 90;\n break;\n\n // ----- Potassium -----\n case 19:\n // K+ (Potassium cation)\n if (mol.getConnAtoms(atom) == 0)\n return 94;\n break;\n\n // ----- Calcium -----\n case 20:\n // Ca+2 (Dipositive Calcium cation)\n if (mol.getConnAtoms(atom) == 0)\n return 96;\n break;\n\n // ----- Iron -----\n case 26:\n if (mol.getConnAtoms(atom) == 0) {\n // Fe+2 (Dipositive Iron cation)\n if (mol.getAtomCharge(atom) == 2)\n return 87;\n\n // Fe+3 (Tripositive Iron cation)\n if (mol.getAtomCharge(atom) == 3)\n return 88;\n }\n break;\n\n // ----- Copper -----\n case 29:\n if (mol.getConnAtoms(atom) == 0) {\n // Cu+1 (Monopositive Copper cation)\n if (mol.getAtomCharge(atom) == 1)\n return 97;\n\n // Cu+2 (Dipositive Copper cation)\n if (mol.getAtomCharge(atom) == 2)\n return 98;\n }\n break;\n\n // ----- Zinc -----\n case 30:\n // ZN+2 (Dipositive Zinc cation)\n if (mol.getConnAtoms(atom) == 0)\n return 95;\n break;\n\n // ----- Bromine -----\n case 35:\n // Br (Bromine)\n if (mol.getConnAtoms(atom) == 1)\n return 13;\n\n // Br- (Bromide anion)\n if (mol.getConnAtoms(atom) == 0)\n return 91;\n break;\n\n // ----- Iodine -----\n case 53:\n // I (Iodine)\n if (mol.getConnAtoms(atom) == 1)\n return 14;\n break;\n }\n\n // Fail with 0.\n return 0;\n }", "public abstract int mo12582RV(int i);", "public int depth ();", "private void resolveRecursions(final AbraModule module)\n {\n int lastMissing = 0;\n while (missing != lastMissing)\n {\n // try to resolve missing ones by running another pass\n // over the ones that have not been done analyzing yet\n // and see if that results in less missing branch sizes\n lastMissing = missing;\n missing = 0;\n evalBlocks(module.branches);\n }\n\n if (missing != 0)\n {\n // still missing some branch sizes\n // must be due to recursion issues\n for (final AbraBlockBranch branch : module.branches)\n {\n if (branch.size() == 0)\n {\n Qupla.log(\"Unresolved trit vector size in branch: \" + branch.name);\n }\n }\n\n error(\"Recursion issue detected\");\n }\n\n // quick sanity check if everything has a size now\n for (final AbraBlockBranch branch : module.branches)\n {\n for (final AbraBaseSite site : branch.sites)\n {\n if (site.size == 0 && ((AbraSiteMerge) site).inputs.size() != 0)\n {\n error(\"WTF?\");\n }\n }\n\n for (final AbraBaseSite site : branch.outputs)\n {\n if (site.size == 0 && ((AbraSiteMerge) site).inputs.size() != 0)\n {\n error(\"WTF?\");\n }\n }\n\n for (final AbraBaseSite site : branch.latches)\n {\n if (site.size == 0 && site.references != 0)\n {\n error(\"WTF?\");\n }\n }\n }\n }", "public boolean mo9310a(java.lang.Exception r4) {\n /*\n r3 = this;\n java.lang.Object r0 = r3.f8650a\n monitor-enter(r0)\n boolean r1 = r3.f8651b // Catch:{ all -> 0x002c }\n r2 = 0\n if (r1 == 0) goto L_0x000a\n monitor-exit(r0) // Catch:{ all -> 0x002c }\n return r2\n L_0x000a:\n r1 = 1\n r3.f8651b = r1 // Catch:{ all -> 0x002c }\n r3.f8654e = r4 // Catch:{ all -> 0x002c }\n r3.f8655f = r2 // Catch:{ all -> 0x002c }\n java.lang.Object r4 = r3.f8650a // Catch:{ all -> 0x002c }\n r4.notifyAll() // Catch:{ all -> 0x002c }\n r3.m11250m() // Catch:{ all -> 0x002c }\n boolean r4 = r3.f8655f // Catch:{ all -> 0x002c }\n if (r4 != 0) goto L_0x002a\n bolts.n$q r4 = m11249l() // Catch:{ all -> 0x002c }\n if (r4 == 0) goto L_0x002a\n bolts.p r4 = new bolts.p // Catch:{ all -> 0x002c }\n r4.<init>(r3) // Catch:{ all -> 0x002c }\n r3.f8656g = r4 // Catch:{ all -> 0x002c }\n L_0x002a:\n monitor-exit(r0) // Catch:{ all -> 0x002c }\n return r1\n L_0x002c:\n r4 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x002c }\n throw r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: bolts.C2177n.mo9310a(java.lang.Exception):boolean\");\n }", "static long factorialRecurse(int n) {\r\n if (n == 0 || n == 1) {\r\n return 1;\r\n }\r\n return factorialRecurse(n - 1) * n;\r\n }", "@Override\n\tpublic boolean test(Object[] args, Object res) {\n\t\treturn maxDepth((TreeNode)args[0]) == (Integer)res;\n\t}", "public abstract void mo42329d();", "boolean getRecursiveNull();", "@Test public void tailCallInTry() {\n check(\n \"declare option db:inlinelimit '-1';\" +\n \"declare option db:tailcalls '0';\" +\n \"declare function local:foo() { try { local:bar() } catch * { 42 } };\" +\n \"declare function local:bar() { error() };\" +\n \"local:foo()\",\n\n 42);\n }", "public interface Type extends DeclarationContainer, DeclarationWithType {\n\n public default boolean newSubtypeOf(Type other) throws LookupException {\n return sameAs(other);\n }\n\n @Override\n default SelectionResult<Declaration> updatedTo(Declaration declaration) {\n return DeclarationWithType.super.updatedTo(declaration);\n }\n\n @Override\n default List<? extends DeclarationContainerRelation> relations() throws LookupException {\n \treturn inheritanceRelations();\n }\n\n public default void accumulateSuperTypeJudge(SuperTypeJudge judge) throws LookupException {\n judge.add(this);\n List<Type> temp = getProperDirectSuperTypes();\n for(Type type:temp) {\n Type existing = judge.get(type);\n if(existing == null) {\n type.accumulateSuperTypeJudge(judge);\n }\n }\n }\n\n\n /**\n * Find the super type with the same base type as the given type.\n * \n * @param type The type with the same base type as the requested super type.\n * @return A super type of this type that has the same base type as the given\n * type. If there is no such super type, null is returned.\n * @throws LookupException\n */\n public default Type getSuperTypeWithSameBaseTypeAs(Type type) throws LookupException {\n return superTypeJudge().get(type);\n }\n\n public SuperTypeJudge superTypeJudge() throws LookupException;\n\n public void accumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateSelfAndAllSuperTypes(Set<Type> acc) throws LookupException;\n\n\n public Set<Type> getSelfAndAllSuperTypesView() throws LookupException;\n\n public abstract List<InheritanceRelation> explicitNonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> explicitNonMemberInheritanceRelations(Class<I> kind);\n\n public List<InheritanceRelation> implicitNonMemberInheritanceRelations();\n\n public default void reactOnDescendantAdded(Element element) {}\n\n public default void reactOnDescendantRemoved(Element element) {}\n\n public default void reactOnDescendantReplaced(Element oldElement, Element newElement) {}\n\n /**\n * Return the fully qualified name.\n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ getPackage().getFullyQualifiedName().equals(\"\") ==> \\result == getName();\n\t @ ! getPackage().getFullyQualifiedName().equals(\"\") == > \\result.equals(getPackage().getFullyQualifiedName() + getName());\n\t @*/\n public String getFullyQualifiedName();\n\n /*******************\n * LEXICAL CONTEXT \n *******************/\n\n @Override\n public LocalLookupContext<?> targetContext() throws LookupException;\n\n @Override\n public LookupContext localContext() throws LookupException;\n\n /**\n * If the given element is an inheritance relation, the lookup must proceed to the parent. For other elements,\n * the context is a lexical context connected to the target context to perform a local search.\n * @throws LookupException \n */\n @Override\n public LookupContext lookupContext(Element element) throws LookupException;\n\n public List<ParameterBlock<?>> parameterBlocks();\n\n public <P extends Parameter> ParameterBlock<P> parameterBlock(Class<P> kind);\n\n public void addParameterBlock(ParameterBlock<?> block);\n\n public void removeParameterBlock(ParameterBlock<?> block);\n\n public <P extends Parameter> List<P> parameters(Class<P> kind);\n\n /**\n * Indices start at 1.\n */\n public <P extends Parameter> P parameter(Class<P> kind, int index);\n\n public <P extends Parameter> int nbTypeParameters(Class<P> kind);\n\n public <P extends Parameter> void addParameter(Class<P> kind,P parameter);\n\n public <P extends Parameter> void addAllParameters(Class<P> kind,Collection<P> parameter);\n\n public <P extends Parameter> void replaceParameter(Class<P> kind, P oldParameter, P newParameter);\n\n public <P extends Parameter> void replaceAllParameters(Class<P> kind, List<P> newParameters);\n\n /************************\n * BEING A TYPE ELEMENT *\n ************************/\n\n public List<Declaration> getIntroducedMembers();\n\n /**********\n * ACCESS *\n **********/\n\n /**\n * Add the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post directlyDeclaredElements().contains(element);\n\t @*/\n public void add(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Remove the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post ! directlyDeclaredElements().contains(element);\n\t @*/\n public void remove(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Add all type elements in the given collection to this type.\n * @param elements\n * @throws ChameleonProgrammerException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre elements != null;\n\t @ pre !elements.contains(null);\n\t @\n\t @ post directlyDeclaredElements().containsAll(elements);\n\t @*/\n public default void addAll(Collection<? extends Declarator> elements) {\n \telements.forEach(e -> add(e));\n }\n\n /**************\n * SUPERTYPES *\n **************/\n\n /**\n * Return the proper direct super types of this type. A proper super type is a super type\n * that is not equal to this type. A direct super type is a super type that is specified\n * by an inheritance relation of this type, or this type.\n * \n * @return A list containing the direct super types of this type.\n * @throws LookupException The type of an inheritance relation could not be resolved.\n */\n public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n public Set<Type> getAllSuperTypes() throws LookupException;\n\n public default boolean contains(Type other, TypeFixer trace) throws LookupException {\n return sameAs(other, trace);\n }\n \n public default boolean subtypeOf(Type other) throws LookupException {\n return subtypeOf(other, new TypeFixer());\n }\n\n public default boolean subtypeOf(Type other, TypeFixer trace) throws LookupException {\n TypeFixer clone = trace.clone();\n boolean result = sameAs(other,clone);\n if(! result) {\n clone = trace.clone();\n result = uniSubtypeOf(other,clone);\n if(! result) {\n result = other.uniSupertypeOf(this, trace);\n }\n }\n return result;\n }\n\n public default boolean uniSupertypeOf(Type type, TypeFixer trace) throws LookupException {\n return false;\n }\n\n public default boolean uniSubtypeOf(Type other, TypeFixer trace) throws LookupException {\n Type sameBase = getSuperTypeWithSameBaseTypeAs(other);\n return sameBase != null && sameBase.compatibleParameters(other, trace);\n }\n\n /**\n * Check if this type is assignable to another type.\n * \n * @param other\n * @return\n * @throws LookupException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result == equals(other) || subTypeOf(other);\n\t @*/\n public boolean assignableTo(Type other) throws LookupException;\n\n /**\n * Return the inheritance relations of this type.\n * \n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result != null;\n\t @*/\n public default List<InheritanceRelation> inheritanceRelations() throws LookupException {\n return nonMemberInheritanceRelations();\n }\n\n public List<InheritanceRelation> nonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> nonMemberInheritanceRelations(Class<I> kind);\n\n /**\n * Add the give given inheritance relation to this type.\n * @param relation The relation to add. Cannot be null.\n * @throws ChameleonProgrammerException\n * It is not possible to add the given type. E.g. you cannot\n * add an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post inheritanceRelations().contains(relation);\n\t @*/\n public void addInheritanceRelation(InheritanceRelation relation);\n\n public void addAllInheritanceRelations(Collection<InheritanceRelation> relations);\n /**\n * Remove the give given inheritance relation from this type.\n * @param relation\n * @throws ChameleonProgrammerException\n * It is not possible to remove the given type. E.g. you cannot\n * remove an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post ! inheritanceRelations().contains(relation);\n\t @*/\n public void removeNonMemberInheritanceRelation(InheritanceRelation relation) throws ChameleonProgrammerException;\n\n public void removeAllNonMemberInheritanceRelations();\n\n /**\n * Return the members of the given kind directly declared by this type.\n * @return\n * @throws LookupException \n * @throws \n */\n public <T extends Declaration> List<T> localMembers(final Class<T> kind) throws LookupException;\n\n /**\n * Return the members that are implicitly part of this type, such as default constructors and destructors.\n * @return\n */\n public List<Declaration> implicitMembers();\n\n public <M extends Declaration> List<M> implicitMembers(Class<M> kind);\n\n /**\n * Return the members directly declared by this type. The order of the elements in the list is the order in which they\n * are written in the type.\n * @return\n * @throws LookupException \n */\n public List<Declaration> localMembers() throws LookupException;\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind);\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind, ChameleonProperty property);\n\n public List<Declaration> directlyDeclaredMembers();\n\n public <D extends Declaration> List<SelectionResult<D>> members(DeclarationSelector<D> selector) throws LookupException;\n\n public <D extends Declaration> List<? extends SelectionResult<D>> localMembers(DeclarationSelector<D> selector) throws LookupException;\n\n public List<Declaration> members() throws LookupException;\n\n /**\n * Return the members of this class.\n * @param <M>\n * @param kind\n * @return\n * @throws LookupException\n */\n public <M extends Declaration> List<M> members(final Class<M> kind) throws LookupException;\n\n /**\n * DO NOT CONFUSE THIS METHOD WITH localMembers(). This method does not\n * transform type elements into members.\n * \n * FIXME: rename to localDeclarators()\n * \n * @return\n */\n public List<? extends Declarator> directlyDeclaredElements();\n\n public <T extends Declarator> List<T> directlyDeclaredElements(Class<T> kind);\n\n @Override\n public List<? extends Declaration> declarations() throws LookupException;\n\n public Type alias(String name);\n\n public Type intersection(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(IntersectionType type) throws LookupException;\n\n public void replace(Declarator oldElement, Declarator newElement);\n\n public Type baseType();\n\n public default boolean compatibleParameters(Type other, TypeFixer trace) throws LookupException {\n int size = nbTypeParameters(TypeParameter.class);\n boolean result = true;\n for(int i=0; i< size && result;i++) {\n TypeParameter otherParameter = other.parameter(TypeParameter.class, i);\n TypeParameter myParameter = parameter(TypeParameter.class,i);\n result = otherParameter.contains(myParameter, trace.clone());\n }\n return result;\n }\n\n\n public Type union(Type lowerBound) throws LookupException;\n\n public Type unionDoubleDispatch(Type type) throws LookupException;\n\n public Type unionDoubleDispatch(UnionType type) throws LookupException;\n\n public default boolean sameAs(Type other, TypeFixer trace) throws LookupException {\n if(other == this || trace.contains(other, this)) {\n return true;\n }\n TypeFixer newTrace = trace.clone();\n newTrace.add(other, this);\n boolean result = uniSameAs(other,newTrace);\n if(! result) {\n newTrace = trace.clone();\n newTrace.add(other, this);\n result = other.uniSameAs(this,newTrace);\n }\n return result;\n }\n\n /**\n * Check if this type is equal to the given type, taking\n * recursive types into account. If a loop is encountered,\n * that branch of the check will return true: it did not\n * encounter a problem.\n * \n * @param other The type of which we want to check if it is the same as this type.\n * @param fixer The object that will ensure that we can do a fixed point computation.\n * @return\n * @throws LookupException\n */\n public boolean uniSameAs(Type other, TypeFixer fixer) throws LookupException;\n\n /**\n * <p>Return the lower bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the lower bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post \\result.subtypeOf(this);\n @*/\n public default Type lowerBound() throws LookupException {\n return this;\n }\n\n /**\n * <p>Return the upper bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the upper bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post subtypeOf(\\result);\n @*/\n public default Type upperBound() throws LookupException {\n return this;\n }\n\n /**\n * A name that is strictly for debugging purposes.\n * \n * @return The result is not null.\n */\n public String infoName();\n\n /**\n * Verify whether the this type is a subtype of the given other type. \n * If that is the case, then a valid verification result is returned.\n * Otherwise, a problem is reported. The message of the problem is \n * constructed using the descriptions of the meaning of\n * each type as determined by the arguments.\n * \n * @param type The type for which the subtype relation is verified.\n * @param meaningThisType A textual description of the meaning of this type.\n * @param meaningOtherType A textual description of the meaning of the other type.\n * @param cause The element in which the verification is done.\n * @return\n */\n public Verification verifySubtypeOf(Type type, String meaningThisType, String meaningOtherType, Element cause);\n\n\n /**\n * @return\n */\n public default boolean isWildCard() {\n return false;\n }\n\n}", "private Expr boxingUpcastIfNeeded(Expr a, Type fType) {\n if (a instanceof NullLit_c) {\n return makeCast(a.position(), a, fType);\n }\n \n if (Types.baseType(fType) instanceof FunctionType) {\n return upcastToFunctionType(a, (FunctionType)Types.baseType(fType), true);\n }\n \n if (ts.isObjectType(a.type(), context) && ts.isObjectType(fType, context)) {\n // implicit C++ level upcast is good enough (C++ and X10 have same class hierarchy structure)\n return a;\n }\n \n if (!ts.typeDeepBaseEquals(fType, a.type(), context)) {\n Position pos = a.position();\n return makeCast(a.position(), a, fType);\n } else {\n return a;\n }\n }", "@Test\n\tpublic void typeCheckTest(){\n\t\tSystem.out.println(\"kenta\");\n\t\tSemanticActions actions = new SemanticActions();\n\t\tVariableEntry idInt = new VariableEntry(\"v1\", TokenType.INTEGER);\n\t\tVariableEntry idReal = new VariableEntry(\"v2\", TokenType.REAL);\n\t\tVariableEntry idInt2 = new VariableEntry(\"v3\", TokenType.INTEGER);\n\t\tVariableEntry idReal2 = new VariableEntry(\"v4\", TokenType.REAL);\n\t\tVariableEntry error = new VariableEntry(\"v5\", TokenType.ADDOP);\n\t\tassertTrue(actions.typeCheck(idInt, idInt2) == 0);\n\t\tassertTrue(actions.typeCheck(idReal, idReal2) == 1);\n\t\tassertTrue(actions.typeCheck(idReal, idInt2) == 2);\n\t\tassertTrue(actions.typeCheck(idInt, idReal) == 3);\n\t\tassertTrue(actions.typeCheck(idReal, error) == 4);\n\t\tassertTrue(actions.typeCheck(error, idInt) == 4);\n\t}", "public abstract int mo9754s();", "int maxDepth();", "private int root(int i) {\n while(id[i]!=i){\n i = id[i];\n }\n return i;\n }", "public abstract boolean shouldResolve(int i);", "private void resolveRed(Position<Entry<K, V>> p) {\n Position<Entry<K, V>> parent = parent(p);\n if (isRed(parent)) {\n Position<Entry<K, V>> uncle = sibling(parent);\n if (isBlack(uncle)) { // Case 1: mis-shaped 4-node\n Position<Entry<K, V>> middle = restructure(p); // trinode restructuring\n makeBlack(middle);\n makeRed(left(middle));\n makeRed(right(middle));\n } else { // Case 2: overfill 5-node\n makeBlack(parent);\n makeBlack(uncle);\n Position<Entry<K, V>> grand = parent(parent);\n if (!isRoot(grand)) {\n makeRed(grand);\n resolveRed(grand);\n }\n }\n }\n }", "private void fixTreeRecursive(WordTree<StructureTag> tree) {\n\t\tfixTree(tree);\n\t\tif(!tree.isLeaf()) {\n\t\t\tfor(WordTree<StructureTag> child : tree.getChildren()) {\n\t\t\t\tfixTreeRecursive(child);\n\t\t\t}\n\t\t}\n\t}", "public int getInputType() {\n/* 234 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "int depth();", "int depth();" ]
[ "0.50191706", "0.49791354", "0.49752522", "0.48990586", "0.48956862", "0.48565927", "0.47930422", "0.47775787", "0.47446156", "0.4738043", "0.4736759", "0.47197068", "0.47132796", "0.47028077", "0.4695169", "0.469187", "0.46800864", "0.46673754", "0.46461487", "0.4643798", "0.46420148", "0.46351826", "0.4632034", "0.4613143", "0.45823202", "0.45813924", "0.45605388", "0.455006", "0.4545946", "0.4544755", "0.45393443", "0.45296583", "0.45267034", "0.44993618", "0.44986904", "0.4496952", "0.44934022", "0.4491964", "0.44915935", "0.44891462", "0.44725966", "0.44664606", "0.4455757", "0.4455425", "0.44540897", "0.4450908", "0.44491336", "0.4445089", "0.44408154", "0.4434802", "0.442745", "0.4422626", "0.44184873", "0.44184873", "0.4405553", "0.439933", "0.43909654", "0.43851778", "0.43813276", "0.43724534", "0.4371245", "0.43682152", "0.436504", "0.43588927", "0.43588462", "0.43467596", "0.4345394", "0.43397", "0.43390277", "0.43385968", "0.43376738", "0.43307874", "0.43296465", "0.4324883", "0.43236294", "0.43194905", "0.43176863", "0.43173215", "0.43168604", "0.4306925", "0.43067503", "0.4306677", "0.43056193", "0.4304883", "0.43044204", "0.42996272", "0.42896283", "0.42789686", "0.42788318", "0.42767483", "0.4273934", "0.4272977", "0.4271386", "0.42706326", "0.4266948", "0.42624304", "0.4261868", "0.42550725", "0.42504367", "0.4245281", "0.4245281" ]
0.0
-1
/ test a basic Construct query retrieving all triples
@Test public void test2() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); execute("/tests/basic/query02.rq", "/tests/basic/query02.ttl", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSelectAll() {\n List<Discipline> listDisciplines = new ArrayList();\n listDisciplines = disciplineDao.selectAll();\n boolean result = listDisciplines.size() > 0;\n assertTrue(result);\n }", "@Test\n public void example13 () throws Exception {\n Map<String, Stmt> inputs = example2setup();\n conn.setNamespace(\"ex\", \"http://example.org/people/\");\n conn.setNamespace(\"ont\", \"http://example.org/ontology/\");\n String prefix = \"PREFIX ont: \" + \"<http://example.org/ontology/>\\n\";\n \n String queryString = \"select ?s ?p ?o where { ?s ?p ?o} \";\n TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"SELECT result:\", inputs.values(),\n statementSet(tupleQuery.evaluate()));\n \n assertTrue(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"Alice\\\" } \").evaluate());\n assertFalse(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"NOT Alice\\\" } \").evaluate());\n \n queryString = \"construct {?s ?p ?o} where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery constructQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Construct result\",\n mapKeep(new String[] {\"an\"}, inputs).values(),\n statementSet(constructQuery.evaluate()));\n \n queryString = \"describe ?s where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery describeQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Describe result\",\n mapKeep(new String[] {\"an\", \"at\"}, inputs).values(),\n statementSet(describeQuery.evaluate()));\n }", "@Test\r\n public void testGetALL() {\r\n CategoriaDAO instance = new CategoriaDAO();\r\n List<Categoria> result = instance.getALL();\r\n Categoria itera = new Categoria();\r\n Iterator it = result.iterator();\r\n while (it.hasNext()) {\r\n itera = (Categoria) it.next();\r\n System.out.println(itera.getIdcategoria() + \" \" + itera.getDescricao());\r\n }\r\n }", "public void constructQuery(String query) {\n\t\tQuery q = QueryFactory.create(query);\n\t\tQueryExecution qe = QueryExecutionFactory.create(q, model);\n\t\tModel result = qe.execConstruct();\n\t\tprintModel(result);\n\t\tmodel.add(result);\n\t\tqe.close();\n\t}", "public void query(ComplexCar[] cars) throws DatabaseTestException;", "ObstacleQuery createObstacleQuery();", "public SPARQL() {\n initComponents();\n \n model = ModelFactory.createOntologyModel(OntModelSpec.OWL_LITE_MEM_RDFS_INF);\n model.setDynamicImports(true);\n model.read(\"file:\"+\"data/ontologies/Papers_Ready.owl\", \"http://www.l3g.pl/ontologies/OntoBeef/Papers.owl\", \"N-TRIPLE\");\n model.loadImports();\n \n for (Individual i : model.listIndividuals(model.getOntClass(\"http://www.l3g.pl/ontologies/OntoBeef/Conceptualisation.owl#Category\")).toSet())\n {\n System.out.println(i.listLabels(null).toSet());\n }\n }", "@Test\n public void learnToQueryWithMultipleParams() throws Exception {\n SqlSession session = null;\n\n // TODO: get a Koan06Mapper object\n Koan06Mapper mapper = null;\n\n List<Country> lc = mapper.getCountryRange(22, 33);\n\n assertEquals(12, lc.size());\n Country finland = lc.get(11);\n assertEquals(\"Finland\", finland.getCountry());\n\n }", "@Test\n\tpublic void selectAllFromCourseTable() {\n\t\tList arrayList = em.createNamedQuery(\"query_get_all_courses\").getResultList();\n\t\tlogger.info(\"\\n\\n>>>>>>> Select c FROM Course c -> {}\", arrayList);\n\t}", "@Test\n public void selectAll() {\n List<ProductCategory>productCategories=categoryService.selectAll();\n for (ProductCategory productCategory:productCategories\n ) {\n System.out.println(productCategory);\n }\n }", "Graph callConstructQuery(String name, Map<String, String> params);", "@Test\n public void testSelectAll() throws Exception {\n String sql = \"SELECT ALL a FROM g\";\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 verifyProperty(selectNode, Select.DISTINCT_PROP_NAME, false);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"g\");\n\n verifySql(\"SELECT a FROM g\", fileNode);\n }", "public static void main( String[] args ) {\n\n Model m = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RDFS_INF);\n\n\n FileManager.get().readModel( m, owlFile );\n String myOntologyName = \"http://www.w3.org/2002/07/owl#\";\n String myOntologyNS = \"http://www.w3.org/2002/07/owl#\";\n////\n////\n// String rdfPrefix = \"PREFIX rdf: <\"+RDF.getURI()+\">\" ;\n// String myOntologyPrefix = \"PREFIX \"+myOntologyName+\": <\"+myOntologyNS+\">\" ;\n// String myOntologyPrefix1 = \"PREFIX \"+myOntologyName ;\n String myOntologyPrefix2 = \"prefix pizza: <http://www.w3.org/2002/07/owl#> \";\n//\n//\n//// String queryString = myOntologyPrefix + NL\n//// + rdfPrefix + NL +\n//// \"SELECT ?subject\" ;\n \n String queryString = rdfPrefix + myOntologyPrefix2 +\n// \t\t \"prefix pizza: <http://www.w3.org/2002/07/owl#> \"+ \n \t\t \"prefix rdfs: <\" + RDFS.getURI() + \"> \" +\n \t\t \"prefix owl: <\" + OWL.getURI() + \"> \" +\n// \t\t \"select ?o where {?s ?p ?o}\";\n \n//\t\t\t\t\t\t\"select ?s where {?s rdfs:label \"苹果\"@zh}\";\n \n// \"SELECT ?label WHERE { ?subject rdfs:label ?label }\" ;\n// \"SELECT DISTINCT ?predicate ?label WHERE { ?subject ?predicate ?object. ?predicate rdfs:label ?label .}\";\n// \"SELECT DISTINCT ?s WHERE {?s rdfs:label \\\"Italy\\\"@en}\" ;\n// \"SELECT DISTINCT ?s WHERE {?s rdfs:label \\\"苹果\\\"@zh}\" ;\n// \"SELECT DISTINCT ?s WHERE\" +\n// \"{?object rdfs:label \\\"水果\\\"@zh.\" +\n// \"?subject rdfs:subClassOf ?object.\" +\n// \"?subject rdfs:label ?s}\";\n //星号是转义字符,分号是转义字符\n\t\t\t\t\"SELECT DISTINCT ?e ?s WHERE {?entity a ?subject.?subject rdfs:subClassOf ?object.\"+\n \"?object rdfs:label \\\"富士苹果\\\"@zh.?entity rdfs:label ?e.?subject rdfs:label ?s}ORDER BY ?s\";\n \t\t\n\n \n \t\tcom.hp.hpl.jena.query.Query query = QueryFactory.create(queryString);\n \t\tQueryExecution qe = QueryExecutionFactory.create(query, m);\n \t\tcom.hp.hpl.jena.query.ResultSet results = qe.execSelect();\n\n \t\tResultSetFormatter.out(System.out, results, query);\n \t\tqe.close();\n\n// Query query = QueryFactory.create(queryString) ;\n\n query.serialize(new IndentedWriter(System.out,true)) ;\n System.out.println() ;\n\n\n\n QueryExecution qexec = QueryExecutionFactory.create(query, m) ;\n\n try {\n\n ResultSet rs = qexec.execSelect() ;\n\n\n for ( ; rs.hasNext() ; ){\n QuerySolution rb = rs.nextSolution() ;\n RDFNode y = rb.get(\"person\");\n System.out.print(\"name : \"+y+\"--- \");\n Resource z = (Resource) rb.getResource(\"person\");\n System.out.println(\"plus simplement \"+z.getLocalName());\n }\n }\n finally{\n qexec.close() ;\n }\n }", "@Test\n public void testQuery() throws Exception {\n StatefulKnowledgeSession session = getKbase().newStatefulKnowledgeSession();\n \n initializeTemplate(session);\n \n List<Person> persons = new ArrayList<Person>();\n persons.add(new Person(\"john\", \"john\", 25));\n persons.add(new Person(\"sarah\", \"john\", 35));\n \n session.execute(CommandFactory.newInsertElements(persons));\n assertEquals(2, session.getFactCount());\n \n QueryResults results = query(\"people over the age of x\", new Object[] {30});\n assertNotNull(results);\n }", "CampusSearchQuery generateQuery();", "public static void main(String[] args) throws Exception {\n TDB.setOptimizerWarningFlag(false);\n\n final String DATASET_DIR_NAME = \"data0\";\n final Dataset data0 = TDBFactory.createDataset( DATASET_DIR_NAME );\n\n // show the currently registered names\n for (Iterator<String> it = data0.listNames(); it.hasNext(); ) {\n out.println(\"NAME=\"+it.next());\n }\n\n out.println(\"getting named model...\");\n /// this is the OWL portion\n final Model model = data0.getNamedModel( MY_NS );\n out.println(\"Model := \"+model);\n\n out.println(\"getting graph...\");\n /// this is the DATA in that MODEL\n final Graph graph = model.getGraph();\n out.println(\"Graph := \"+graph);\n\n if (graph.isEmpty()) {\n final Resource product1 = model.createResource( MY_NS +\"product/1\");\n final Property hasName = model.createProperty( MY_NS, \"#hasName\");\n final Statement stmt = model.createStatement(\n product1, hasName, model.createLiteral(\"Beach Ball\",\"en\") );\n out.println(\"Statement = \" + stmt);\n\n model.add(stmt);\n\n // just for fun\n out.println(\"Triple := \" + stmt.asTriple().toString());\n } else {\n out.println(\"Graph is not Empty; it has \"+graph.size()+\" Statements\");\n long t0, t1;\n t0 = System.currentTimeMillis();\n final Query q = QueryFactory.create(\n \"PREFIX exns: <\"+MY_NS+\"#>\\n\"+\n \"PREFIX exprod: <\"+MY_NS+\"product/>\\n\"+\n \" SELECT * \"\n // if you don't provide the Model to the\n // QueryExecutionFactory below, then you'll need\n // to specify the FROM;\n // you *can* always specify it, if you want\n // +\" FROM <\"+MY_NS+\">\\n\"\n // +\" WHERE { ?node <\"+MY_NS+\"#hasName> ?name }\"\n // +\" WHERE { ?node exns:hasName ?name }\"\n // +\" WHERE { exprod:1 exns:hasName ?name }\"\n +\" WHERE { ?res ?pred ?obj }\"\n );\n out.println(\"Query := \"+q);\n t1 = System.currentTimeMillis();\n out.println(\"QueryFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n try ( QueryExecution qExec = QueryExecutionFactory\n // if you query the whole DataSet,\n // you have to provide a FROM in the SparQL\n //.create(q, data0);\n .create(q, model) ) {\n t1 = System.currentTimeMillis();\n out.println(\"QueryExecutionFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n ResultSet rs = qExec.execSelect();\n t1 = System.currentTimeMillis();\n out.println(\"executeSelect.TIME=\"+(t1 - t0));\n while (rs.hasNext()) {\n QuerySolution sol = rs.next();\n out.println(\"Solution := \"+sol);\n for (Iterator<String> names = sol.varNames(); names.hasNext(); ) {\n final String name = names.next();\n out.println(\"\\t\"+name+\" := \"+sol.get(name));\n }\n }\n }\n }\n out.println(\"closing graph\");\n graph.close();\n out.println(\"closing model\");\n model.close();\n //out.println(\"closing DataSetGraph\");\n //dsg.close();\n out.println(\"closing DataSet\");\n data0.close();\n }", "public void test_ck_02() {\n OntModel vocabModel = ModelFactory.createOntologyModel();\n ObjectProperty p = vocabModel.createObjectProperty(\"p\");\n OntClass A = vocabModel.createClass(\"A\");\n \n OntModel workModel = ModelFactory.createOntologyModel();\n Individual sub = workModel.createIndividual(\"uri1\", A);\n Individual obj = workModel.createIndividual(\"uri2\", A);\n workModel.createStatement(sub, p, obj);\n }", "@Test\r\n public void testSelectAll() {\r\n System.out.println(\"AbonentDAL selectAll\");\r\n AbonentDAL instance = new AbonentDAL();\r\n List<Abonent> result = instance.selectAll();\r\n assertTrue(result!=null && result.size()>0);\r\n }", "public PseudoQuery() {\r\n\t}", "List<BaseCountract> selectByExample(BaseCountractExample example);", "@Test\n public void example10 () throws Exception {\n ValueFactory f = repo.getValueFactory();\n String exns = \"http://example.org/people/\";\n URI alice = f.createURI(exns, \"alice\");\n URI bob = f.createURI(exns, \"bob\");\n URI ted = f.createURI(exns, \"ted\"); \n URI person = f.createURI(\"http://example.org/ontology/Person\");\n URI name = f.createURI(\"http://example.org/ontology/name\");\n Literal alicesName = f.createLiteral(\"Alice\");\n Literal bobsName = f.createLiteral(\"Bob\");\n Literal tedsName = f.createLiteral(\"Ted\"); \n URI context1 = f.createURI(exns, \"cxt1\"); \n URI context2 = f.createURI(exns, \"cxt2\"); \n conn.add(alice, RDF.TYPE, person, context1);\n conn.add(alice, name, alicesName, context1);\n conn.add(bob, RDF.TYPE, person, context2);\n conn.add(bob, name, bobsName, context2);\n conn.add(ted, RDF.TYPE, person);\n conn.add(ted, name, tedsName);\n \n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2),\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(conn.getStatements(null, null, null, false)));\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2)\n }),\n statementSet(conn.getStatements(null, null, null, false, context1, context2)));\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2),\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(conn.getStatements(null, null, null, false, null, context2)));\n \n // testing named graph query\n DatasetImpl ds = new DatasetImpl();\n ds.addNamedGraph(context1);\n ds.addNamedGraph(context2);\n TupleQuery tupleQuery = conn.prepareTupleQuery(\n QueryLanguage.SPARQL, \"SELECT ?s ?p ?o ?g WHERE { GRAPH ?g {?s ?p ?o . } }\");\n tupleQuery.setDataset(ds);\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2)\n }),\n statementSet(tupleQuery.evaluate()));\n \n ds = new DatasetImpl();\n ds.addDefaultGraph(null);\n tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, \"SELECT ?s ?p ?o WHERE {?s ?p ?o . }\");\n tupleQuery.setDataset(ds);\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(tupleQuery.evaluate()));\n }", "@Test\n void getAllSuccess(){\n\n List<CompositionInstrument> compositionInstruments = genericDao.getAll();\n assertEquals(4, compositionInstruments.size());\n }", "@Override\n\tpublic List<Trip> searchAllTrips() {\n\t\tString hql = \"FROM Trip\";\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn query.list();\n\t}", "@Test\n public void test3() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:(u,v), b, c);\" +\n \"B = FOREACH A GENERATE $0, b;\" +\n \"C = FILTER B BY 8 > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator filter = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n Operator fe1 = newLogicalPlan.getSuccessors( filter ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator fe2 = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n }", "public static void benchmark_query(String[] args) {\n System.err.println(\"benchmark: query\");\n\n double time_load, time_first = 0, time_rest;\n long mem_graph;\n \n long m0, m1;\n m0 = get_memory_footprint();\n Model model = ModelFactory.createDefaultModel();\n\n long t0, t1;\n t0 = System.nanoTime();\n InputStream in = FileManager.get().open(args[1]);\n model.read(in, null, \"N-TRIPLES\");\n t1 = System.nanoTime();\n m1 = get_memory_footprint();\n time_load = (t1-t0)/1e9;\n mem_graph = m1-m0;\n\n t0 = System.nanoTime();\n Resource personClass = model.createResource(\"http://dbpedia.org/ontology/Person\");\n StmtIterator results = model.listStatements(null, RDF.type, personClass);\n long nb_stmts = 0;\n while (results.hasNext()) {\n Statement s = results.next();\n nb_stmts += 1;\n if (nb_stmts == 1) {\n t1 = System.nanoTime();\n time_first = (t1-t0)/1e9;\n t0 = System.nanoTime();\n }\n }\n t1 = System.nanoTime();\n time_rest = (t1-t0)/1e9;\n\n System.err.println(\"parsed: \" + model.size() + \" statements\");\n System.err.println(\"matched: \" + nb_stmts + \" statements\");\n System.out.println(time_load + \",\" + mem_graph + \",\" + time_first + \",\" + time_rest);\n }", "public ArrayList<Predicate> generateGroundings(final Collection<Litereal> param){\n\t\tArrayList<Litereal> objects = new ArrayList<>();\n\t\tobjects.addAll(PddlProblem.consObjects);\n\t\tfor (Litereal litereal : param) {\n\t\t\tif(!PddlProblem.consObjects.contains(litereal)){\n\t\t\t\tobjects.add(litereal);\n\t\t\t}\n\t\t}\n\n\n\t\tArrayList<Predicate> result = new ArrayList<>();\n\n\t\tLitereal litereals[]= new Litereal[this.objects.size()];\n\t\tgenerate(result, objects, litereals, 0);\n\n\t\treturn result;\n\t}", "@Test\n void getAllSuccess() {\n List<RunCategory> categories = dao.getAll();\n assertEquals(13, categories.size());\n }", "public void testInsertPredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 10);\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n assertEquals(10,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "@Test\r\n\tpublic void testPrepareTupleQuery1() throws Exception{\r\n\t\t\r\n\t\tAssert.assertEquals(0, testAdminCon.size());\r\n\t\t\r\n\t\tStatement st1 = vf.createStatement(john, fname, johnfname, dirgraph);\r\n\t\tStatement st2 = vf.createStatement(john, lname, johnlname, dirgraph);\r\n\t\tStatement st3 = vf.createStatement(john, homeTel, johnhomeTel, dirgraph);\r\n\t\tStatement st4 = vf.createStatement(john, email, johnemail, dirgraph);\r\n\t\tStatement st5 = vf.createStatement(micah, fname, micahfname, dirgraph);\r\n\t\tStatement st6 = vf.createStatement(micah, lname, micahlname, dirgraph);\r\n\t\tStatement st7 = vf.createStatement(micah, homeTel, micahhomeTel, dirgraph);\r\n\t\tStatement st8 = vf.createStatement(fei, fname, feifname, dirgraph);\r\n\t\tStatement st9 = vf.createStatement(fei, lname, feilname, dirgraph);\r\n\t\tStatement st10 = vf.createStatement(fei, email, feiemail, dirgraph);\r\n\t\t\r\n\t\ttestAdminCon.add(st1, dirgraph);\r\n\t\ttestAdminCon.add(st2, dirgraph);\r\n\t\ttestAdminCon.add(st3, dirgraph);\r\n\t\ttestAdminCon.add(st4, dirgraph);\r\n\t\ttestAdminCon.add(st5, dirgraph);\r\n\t\ttestAdminCon.add(st6, dirgraph);\r\n\t\ttestAdminCon.add(st7, dirgraph);\r\n\t\ttestAdminCon.add(st8, dirgraph);\r\n\t\ttestAdminCon.add(st9, dirgraph);\r\n\t\ttestAdminCon.add(st10, dirgraph);\r\n\t\t\r\n\t\tAssert.assertEquals(10, testAdminCon.size(dirgraph));\t\r\n\t\t\r\n\t\tStringBuilder queryBuilder = new StringBuilder();\r\n\t\tqueryBuilder.append(\"PREFIX ad: <http://marklogicsparql.com/addressbook#>\");\r\n\t\tqueryBuilder.append(\" PREFIX d: <http://marklogicsparql.com/id#>\");\r\n\t\tqueryBuilder.append(\" SELECT DISTINCT ?person\");\r\n\t\tqueryBuilder.append(\" FROM <http://marklogic.com/dirgraph>\");\r\n\t\tqueryBuilder.append(\" WHERE\");\r\n\t\tqueryBuilder.append(\" {?person ad:firstName ?firstname ;\");\r\n\t\tqueryBuilder.append(\" ad:lastName ?lastname.\");\r\n\t\tqueryBuilder.append(\" OPTIONAL {?person ad:homeTel ?phonenumber .}\");\r\n\t\tqueryBuilder.append(\" FILTER (?firstname = \\\"Fei\\\")}\");\r\n\t\t\r\n\t\tTupleQuery query = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, queryBuilder.toString());\r\n\t\tTupleQueryResult result = query.evaluate();\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"person\"), is(equalTo(true)));\r\n\t\t\t\tValue nameResult = solution.getValue(\"person\");\r\n\t\t\t\tAssert.assertEquals(nameResult.stringValue(),fei.stringValue());\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\r\n\t}", "@Test\n public void test_compteAvecOperations(){\n \t\n \tCompte c = serviceCompte.rechercherCompteAvecOperations(1L);\n \tSystem.out.println(\"compte_1 : \"+c);\n \tfor(Operation op : c.getOperations()){\n \t\tSystem.out.println(\"\\t\"+op);\n \t}\n \tAssert.assertTrue(c.getOperations().size()>0);\n }", "Query query();", "private static HashSet<String> simpleExecution(Query query, OntModel ontologie) {\n HashSet<String> propertySet = new HashSet<>();\n try (QueryExecution qexec = QueryExecutionFactory.create(query, ontologie)) {\n ResultSet results = qexec.execSelect();\n int i = 0;\n while (results.hasNext()) {\n propertySet.add(results.next().getResource(\"prop\").getURI());\n\n i++;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return propertySet;\n }", "public abstract Collection<Turtle> getAllTurtles();", "@Test\n public void constructorStoreSucceed()\n {\n // arrange\n // act\n QuerySpecificationBuilder querySpecificationBuilder = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS);\n\n // assert\n assertEquals(\"*\", Deencapsulation.getField(querySpecificationBuilder, \"selection\"));\n assertEquals(QuerySpecificationBuilder.FromType.ENROLLMENTS, Deencapsulation.getField(querySpecificationBuilder, \"fromType\"));\n }", "@Test\n public void test1() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:bag{(u,v)}, b, c);\" +\n \"B = FOREACH A GENERATE $0, b;\" +\n \"C = FILTER B BY \" + COUNT.class.getName() +\"($0) > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator filter = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n Operator fe2 = newLogicalPlan.getSuccessors( filter ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n }", "@Test\n public void test3FindAll() {\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n List<SpecialityDTO> lista=(List<SpecialityDTO>)dao.findAll(); \n System.out.println(lista);\n assertTrue(!lista.isEmpty());\n }", "@Test\r\n public void testGetAllChromInfo() throws Exception {\n assertEquals(7, queries.getAllChromInfo().size());\r\n }", "@Test\n public void testJPA3ListAll (){\n Iterable<TruckInfo> trucklist = truckRepo.findAll();\n\n\n\n\n }", "List<CptDataStore> selectByExample(CptDataStoreExample example);", "@Test\n public void retriveAllTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n List<Servizio> lista = manager.retriveAll();\n assertEquals(7,lista.size(),\"It should return a list of length 7\");\n }", "public List queryTest() {\n\t\tList list = null;\n\t\tthis.init();\n\t\t try {\n\t\t\t list= sqlMap.queryForList(\"getAllTest\");\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn list;\n\t\t\n\t}", "public static void querying(String constructQuery2) {\n\t\t//construct the new query\n\t\t//String constructQuery2 = prefix+\" \"+select+\" \"+selectValues+\" \"+where+openBracket+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket;\n\t\t//constructQuery2 = constructQuery2+\" UNION \"+\" \"+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket+closeBracket;\n\t\t\n\t\tSystem.out.println(constructQuery2);\n\t\tQuery query2 = QueryFactory.create(constructQuery2);\n\t\tQueryExecution qe2 = QueryExecutionFactory.sparqlService(\n\t\t\t\t\"http://localhost:3030/USNA/query\", query2);\n\t\t\n\t\tResultSet results1 = qe2.execSelect();\n\t\tif(constantOutput == \"\") {\n\t\t\tResultSetFormatter.out(System.out, results1);\n\t\t}else {\n\t\t\tString NS = \"http://www.usna.org/ns#\";\n\t\t\tModel rdfssExample = ModelFactory.createDefaultModel();\n\t\t\tString [] constant = constantOutput.trim().split(\" \");\n\t\t\t\n\t\t\tString [] headers = selectValues.split(\" \");\n\t\t System.out.println(\"--------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tfor(int i = 0; i< headers.length; i++) {\n\t\t\t\t//System.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t\tSystem.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"----------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\ttry {\n\t\t\t\t int count = 0;\n\t\t while ( results1.hasNext() ) {\n\t\t \t //Resource Response = rdfssExample.createResource(NS+constant[count]);\n\t\t \t \n\t\t QuerySolution soln = results1.nextSolution();\n\t\t Resource first = soln.getResource(headers[0].substring(1,headers[0].length()).trim());\n\t\t //Resource second = soln.getResource(headers[1].substring(1,headers[1].length()).trim());\n\t\t //Resource third = soln.getResource(headers[2].substring(1,headers[2].length()).trim());\n\t\t //Resource fourth = soln.getResource(headers[3].substring(1,headers[3].length()).trim());\n\t\t for(int i=0; i< constant.length; i++) {\n\t\t \t Resource Response = rdfssExample.createResource(NS+constant[i]);\n\t\t \t System.out.format(\"%10s %50s\",first, Response);\n\t\t \t System.out.println();\n\t\t\t\t\t //count++;\n\t\t }\n\t\t //System.out.format(\"%10s %50s\",first, Response);\n\t\t //System.out.format(\"%10s\",first);\n\t\t\t\t System.out.println();\n\t\t\t\t //count++;\n\t\t\t\t \n\t\t\t\t //System.out.println(count);\n\t\t \n\t\t }\n\t\t } finally {\n\t\t \t qe2.close();\n\t\t}\n\t\t\t \n\t\t}\t\t \n\t}", "@Test\n public void testGetTurmas() {\n System.out.println(\"getTurmas\");\n Curso instance = null;\n Collection<Turma> expResult = null;\n Collection<Turma> result = instance.getTurmas();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void test4() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:(u,v), b, c);\" +\n \"B = FOREACH A GENERATE $0, b, flatten(1);\" +\n \"C = FILTER B BY \" + SIZE.class.getName() +\"(TOTUPLE(*)) > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator fe2 = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n Operator filter = newLogicalPlan.getSuccessors( fe2 ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n }", "public void test_sf_940570() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RDFS_INF );\n OntClass C = m.createClass( NS + \"C\" );\n Resource a = m.createResource( NS + \"a\", C );\n \n TestUtil.assertIteratorValues( this, m.listIndividuals(), new Object[] {a} );\n \n OntModel dm = ModelFactory.createOntologyModel( OntModelSpec.DAML_MEM_RULE_INF );\n OntClass D = dm.createClass( NS + \"D\" );\n Resource b = dm.createResource( NS + \"b\", D );\n \n TestUtil.assertIteratorValues( this, dm.listIndividuals(), new Object[] {b} );\n }", "@Test\n public void test() {\n List<CateDto> list = articleService.queryCates();\n System.out.println(list.size());\n }", "List<County> selectByExample(CountyExample example);", "@Test\n public void testBasicQuery() {\n final QueryCriteria qc = QueryCriteria.create();\n QueryGenerator generator = QueryGenerator.generator(FakeEntity.class, qc, \"a\");\n Assert.assertEquals(BAD_QUERY_GENERATED, \"\", generator.generate());\n Assert.assertEquals(BAD_QUERY_PARAMTERS, 0, generator.getParameterKeys().size());\n }", "public List<Triplet> selectAll(boolean isSystem, int limit, int start) throws DAOException;", "@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test HQL Query with Criteria Query with Address 04\")\n public void testHQLQueryWithCriteriaQueryWithAddress04()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n List<SBAddress04> addresses = null;\n\n try (Session session = HibernateUtil.getSessionFactory().openSession()) {\n Transaction transaction = null;\n try {\n transaction = session.beginTransaction();\n\n CriteriaBuilder criteriaBuilder = session.getCriteriaBuilder();\n CriteriaQuery<SBAddress04> criteriaQuery = criteriaBuilder.createQuery(SBAddress04.class);\n Root<SBAddress04> root = criteriaQuery.from(SBAddress04.class);\n criteriaQuery.select(root);\n\n Query query = session.createQuery(criteriaQuery);\n\n addresses = query.list();\n\n transaction.commit();\n\n addresses.forEach(address -> System.out.println(\"Added Address : \" + address.getAddress04Zip()));\n } catch (Exception e) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(e));\n e.printStackTrace();\n }\n\n } catch (Throwable throwable) {\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n System.out.println(\"Address : \" + addresses.size());\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }", "public CountyStationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "@Test\n\tpublic void basic_select() {\n\n\t\t// 1). Use criteria builder to create criteria query returning expected\n\t\t// result object\n\n\t\tCriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();\n\t\tCriteriaQuery<Course> criteriaQuery = criteriaBuilder\n\t\t\t\t.createQuery(Course.class);\n\n\t\t// 2). Define roots for the tables which are involved in query\n\t\tRoot<Course> root = criteriaQuery.from(Course.class);\n\n\t\t// 3. Define Predicates etc using criteria query\n\t\t// 4. Add predicates etc to the criteria query\n\n\t\t// Build Typerd Query\n\t\tTypedQuery<Course> query = em.createQuery(criteriaQuery.select(root));\n\n\t\tList<Course> resultList = query.getResultList();\n\n\t\tlogger.info(\"Simple Criteria Query Result ===> {}\", resultList);\n\n\t}", "@Test\n public void test2() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:(u,v), b, c);\" +\n \"B = FOREACH A GENERATE $0, b;\" +\n \"C = FILTER B BY \" + SIZE.class.getName() +\"(TOTUPLE(*)) > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator filter = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n Operator fe2 = newLogicalPlan.getSuccessors( filter ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n }", "@Test\n public void queryTest() {\n // TODO: test query\n }", "public static void main(String[] args) throws Exception {\n CalciteConnection connection = new SimpleCalciteConnection();\n String salesSchema = Resources.toString(SimpleQueryPlanner2.class.getResource(\"/sales.json\"), Charset.defaultCharset());\n // ModelHandler reads the sales schema and load the schema to connection's root schema and sets the default schema\n new ModelHandler(connection, \"inline:\" + salesSchema);\n\n // Create the query planner with sales schema. conneciton.getSchema returns default schema name specified in sales.json\n SimpleQueryPlanner2 queryPlanner = new SimpleQueryPlanner2(connection.getRootSchema().getSubSchema(connection.getSchema()));\n RelNode logicalPlan = queryPlanner.getLogicalPlan(\"select id,product from orders where product='paint' and units>=5\");\n System.out.println(logicalPlan.getDescription());\n System.out.println(RelOptUtil.toString(logicalPlan));\n\n System.out.println(\"======================================\");\n\n queryPlanner = new SimpleQueryPlanner2(connection.getRootSchema().getSubSchema(connection.getSchema()));\n //RelNode plan = queryPlanner.getTRel(\"select id,product from orders where product='paint' and units>=5\"); // TODO 报错\n RelNode plan = queryPlanner.getTRel(\"select id,product from orders\");\n System.out.println(RelOptUtil.toString(plan));\n ((TRel) plan).doSomething(0);\n }", "@Test\n public void getAllRecipeDirections_ReturnsList(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeDirection> allDirections = testDatabase.getAllRecipeDirections(returned);\n assertNotEquals(\"getAllRecipeDirections - Non-empty List Returned\", 0, allDirections.size());\n }", "List<TCar> selectByExample(TCarExample example);", "List<NjProductTaticsRelation> selectByExample(NjProductTaticsRelationExample example);", "public void testQuery() {\n Random random = new Random();\n ContentValues values = makeServiceStateValues(random, mBaseDb);\n final long rowId = mBaseDb.insert(TBL_SERVICE_STATE, null, values);\n\n // query tuple\n ServiceStateTable table = new ServiceStateTable();\n List<ServiceStateTuple> tuples = table.query(mTestContext, null, null, null, null,\n null, null, null);\n\n // verify values\n assertNotNull(tuples);\n // klocwork\n if (tuples == null) return;\n assertFalse(tuples.isEmpty());\n assertEquals(1, tuples.size());\n ServiceStateTuple tuple = tuples.get(0);\n assertValuesTuple(rowId, values, tuple);\n }", "List<Tourst> selectByExample(TourstExample example);", "@Test\n\tpublic void testQuery1() {\n\t}", "public static void main(String[] args) {\n\t\tSession s2=util.getSession();\r\n\t\tQuery qry=s2.getNamedQuery(\"q2\");\r\n\t\t//Query qry=s2.getNamedQuery(\"q3\");\r\n\t\t//qry.setInteger(0, 50);\r\n\t\tList<Object[]> lust=qry.list();\r\n\t\tfor(Object[] row:lust) {\r\n\t\t\tSystem.out.println(Arrays.toString(row));\r\n\t\t}\r\n\t\tSystem.out.println(\"Completed\");\r\n\t}", "@Test\n public void testPlan3() {\n CalciteAssert.that().with(FOODMART_CLONE).query(\"select \\\"store\\\".\\\"store_country\\\" as \\\"c0\\\", sum(\\\"inventory_fact_1997\\\".\\\"supply_time\\\") as \\\"m0\\\" from \\\"store\\\" as \\\"store\\\", \\\"inventory_fact_1997\\\" as \\\"inventory_fact_1997\\\" where \\\"inventory_fact_1997\\\".\\\"store_id\\\" = \\\"store\\\".\\\"store_id\\\" group by \\\"store\\\".\\\"store_country\\\"\").planContains(\" left.join(right, new org.apache.calcite.linq4j.function.Function1() {\\n\");\n }", "List<Ltsprojectpo> selectByExample(LtsprojectpoExample example);", "@Test\n public void getClients_retrievesALlClientsFromDatabase_clientsList() {\n Stylist myStylist = new Stylist(\"Ann\");\n myStylist.save();\n Client firstClient = new Client(\"Rose\", myStylist.getId());\n firstClient.save();\n Client secondClient = new Client(\"Mary\", myStylist.getId());\n secondClient.save();\n Client[] clients = new Client[] { firstClient, secondClient };\n assertTrue(myStylist.getClients().containsAll(Arrays.asList(clients)));\n }", "public static void main(String[] args) {\n String quey = \"select * from places p, branches b where b.place = p.id_place and p.place_name like 'TUNJA' \";\n //String quey = \"select * from branches \";\n List list = ModuleQueryController.findData(quey);\n \n for (Object l : list){\n System.out.println(l);\n //if(l instanceof Branch){\n // Branch p = (Branch) l;\n // System.out.println(p);\n //}\n //Object yourObject = (Object) SerializationUtils.deserialize(l);\n }\n System.out.println(list);\n }", "List<Tour> selectByExample(TourExample example);", "public void getCTPfromQuery(List<String> queryTriplets, int dedGraphId, int indxLogCleanQuery) {\n\n int indxValue = -1;\n int indxLogQueryDedGraph = mapLogClQueryToDedGraph.get(indxLogCleanQuery);\n int indxNewTPDedGraph = -1;\n List<String> tmpTripletClean = null;\n List<Integer> allIdPats = null;\n List<Integer> deducedTPnotCoveredTimestamp = new LinkedList<>();\n String strDedQueryId = Integer.toString(dedGraphId);\n boolean flagTriplePatternOutOfTimeRange = false;\n\n //For all triple patterns\n for (int f = 0; f < queryTriplets.size(); f += 3) {\n\n tmpTripletClean = myDedUtils.getCleanTP(new LinkedList<>(queryTriplets.subList(f, f + 3)));\n\n //Check if query is an Exclusive Group\n checkTPinEG(queryTriplets, tmpTripletClean, indxLogCleanQuery);\n\n //Check if query is a Bound Join implementation or it's a single TP query\n checkSingleTPorBoundJ(queryTriplets, tmpTripletClean, indxLogCleanQuery);\n\n //[CASE A] When both subjects and objects are variables, or inverseMapping is disabled\n if (tmpTripletClean.get(0).contains(\"?\") && tmpTripletClean.get(2).contains(\"?\") || !inverseMapping) {\n\n //A_(i) It's the frist time we see this CTP\n allIdPats = myDedUtils.getIdemCTPs(DTPCandidates, tmpTripletClean.get(0), tmpTripletClean.get(1), tmpTripletClean.get(2));\n\n if (allIdPats.isEmpty()) {\n\n myDedUtils.setNewCTPInfo(tmpTripletClean, \"\", indxLogCleanQuery, indxLogQueryDedGraph, strDedQueryId, \"\");\n myDedUtils.setTPtoSrcAns(tmpTripletClean, indxLogCleanQuery, \"\", DTPCandidates.size() - 1);\n } //A_(ii) It's not the first time we identify it\n else {\n\n //Then, we must be sure that it's not an existing CTP\n for (int l = allIdPats.size() - 1; l >= 0; l--) {\n\n indxNewTPDedGraph = mapCTPtoDedGraph.get(allIdPats.get(l));\n\n //First we check it belongs to the same graph with previous identified CTP\n if (indxNewTPDedGraph != indxLogQueryDedGraph) {\n\n flagTriplePatternOutOfTimeRange = true;\n myDedUtils.setNewCTPInfo(tmpTripletClean, tmpTripletClean.get(0), indxLogCleanQuery, indxLogQueryDedGraph, strDedQueryId, \"_\" + allIdPats.size());\n myDedUtils.setTPtoSrcAns(tmpTripletClean, indxLogCleanQuery, \"\", DTPCandidates.size() - 1);\n deducedTPnotCoveredTimestamp.add(DTPCandidates.size() - 1);\n break;\n } //if not, it's a new CTP (we distinguish them with \"_#number\")\n //This happens when Tjoin is not big enough to merge some subqueries\n //with same characteristics\n else {\n\n myDedUtils.updateCTPInfo(tmpTripletClean, \"\", indxLogCleanQuery, indxLogQueryDedGraph, allIdPats.get(l));\n myDedUtils.setTPtoSrcAns(tmpTripletClean, indxLogCleanQuery, \"\", allIdPats.get(l));\n\n if ((DTPCandidates.get(allIdPats.get(l)).get(0).contains(\"?\") && DTPCandidates.get(allIdPats.get(l)).get(0).contains(\"_\"))\n || (DTPCandidates.get(allIdPats.get(l)).get(2).contains(\"?\") && DTPCandidates.get(allIdPats.get(l)).get(2).contains(\"_\"))) {\n\n deducedTPnotCoveredTimestamp.add(allIdPats.get(l));\n }\n\n break;\n }\n\n }\n\n }\n\n } //If subject or object is a constant, we repeat the procedure depending \n //on if it is a Single TP or part of BoundJoin\n else {\n\n if (inverseMapping) {\n\n indxValue = myDedUtils.getIndxConstant(tmpTripletClean);\n }\n\n setOrUpdateCTPList(tmpTripletClean, indxValue, strDedQueryId, indxLogCleanQuery);\n }\n\n }\n\n //check for an exclusive group relation between CTP\n //It could be a EG or NLEG\n if (queryTriplets.size() >= 6 && !flagTriplePatternOutOfTimeRange && !queries.get(indxLogCleanQuery).contains(\"UNION\")) {\n\n if (checkEGJoin(queryTriplets)) {\n for (int i = 0; i < deducedTPnotCoveredTimestamp.size(); i++) {\n if (mapDTPToAnyJoin.get(deducedTPnotCoveredTimestamp.get(i)) == null) {\n\n mapDTPToDeducedID.put(DTPCandidates.get(deducedTPnotCoveredTimestamp.get(i)), deducedTPnotCoveredTimestamp.get(i));\n mapDTPToAnyJoin.put(deducedTPnotCoveredTimestamp.get(i), -1);\n }\n }\n }\n }\n\n }", "@Test\n public void testAddCity_3args01() {\n\n System.out.println(\"addCity_3args\");\n String cityName = \"cityTest\";\n Pair coordenates = new Pair(41.200000, -8.000000);\n int points = 30;\n City cityTest = new City(coordenates, cityName, points);\n Set<City> expResult = new HashSet<>();\n\n expResult.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n expResult.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n expResult.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n expResult.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n expResult.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n expResult.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n expResult.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n expResult.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n expResult.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n expResult.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n expResult.add(cityTest);\n\n sn10.addCity(coordenates, cityName, points);\n Set<City> result = sn10.getCitiesList();\n assertEquals(expResult, result);\n }", "@Test\r\n\tpublic void testLocationCircleQuery() {\r\n\t\tlog.debug(\"<<<<<<<<<<<<<<<<< testLocationCircleQuery >>>>>>>>>>>>>>>>>>>>\");\r\n\r\n\t\t/*\r\n\t\t * List<Location> locations = locationService.findByCityAndState(\r\n\t\t * \"Wheeling\", \"WV\");\r\n\t\t */\r\n\r\n\t\tList<Location> locations = locationService\r\n\t\t\t\t.findByCityAndStateAndZipCode(\"Wheeling\", \"WV\", \"26003\");\r\n\r\n\t\tlog.debug(\"List Size: \" + locations.size());\r\n\r\n\t\tassertNotNull(\"locations[0] was null.\", locations.get(0));\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Wheeling\", locations.get(0)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"State was not correct.\", \"WV\", locations.get(0)\r\n\t\t\t\t.getState());\r\n\t\tassertEquals(\"ZipCode was not correct.\", \"26003\", locations.get(0)\r\n\t\t\t\t.getZipCode());\r\n\r\n\t\t// Used to troubleshoot Location Repo\r\n\t\t/*\r\n\t\t * DBObject query = new BasicDBObject(); query.put(\"city\", \"Wheeling\");\r\n\t\t * query.put(\"state\", \"WV\");\r\n\t\t * \r\n\t\t * DBObject fields = new BasicDBObject(); fields.put(\"_id\", 0);\r\n\t\t * fields.put(\"city\", 1); fields.put(\"state\", 2);\r\n\t\t * \r\n\t\t * DBCollection collection = this.mongoOps.getCollection(\"locations\");\r\n\t\t * DBCursor cursor = collection.find(query, fields);\r\n\t\t * \r\n\t\t * log.info(cursor.size()+\"\");\r\n\t\t * \r\n\t\t * log.info(cursor.toString());\r\n\t\t * \r\n\t\t * while (cursor.hasNext()) { log.info(cursor.next().toString()); }\r\n\t\t */\r\n\r\n\t\tList<Location> locales = this.locationService\r\n\t\t\t\t.findByGeoWithin(new Circle(locations.get(0).getLongitude(),\r\n\t\t\t\t\t\tlocations.get(0).getLatitude(), 1));\r\n\r\n\t\tfor (Location locale : locales) {\r\n\t\t\tlog.info(locale.toString());\r\n\t\t}\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Aliquippa\", locales.get(0)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"City was not correct.\", \"Conway\", locales.get(19)\r\n\t\t\t\t.getCity());\r\n\r\n\t}", "public List<Triplet> selectAll(boolean isSystem) throws DAOException;", "static String buildInstanceOfSublcassOfCleanQuery(String wikidataUri, int depth) {\n String selectParameters = \"?c1\";\n for (int i = 1; i < depth; i++) {\n selectParameters += \" ?c\" + (i + 1);\n }\n\n String instanceTriples = \"\";\n for (int i = 1; i < depth; i++) {\n instanceTriples += \" OPTIONAL{?c\" + i + \" wdt:P31 \" + \"?c\" + (i + 1) + \" .}\\n\";\n }\n\n String subclassTriples = \"\";\n for (int i = 1; i < depth; i++) {\n subclassTriples += \" OPTIONAL{?c\" + i + \" wdt:P279 \" + \"?c\" + (i + 1) + \" .}\\n\";\n }\n\n return \"PREFIX wdt: <http://www.wikidata.org/prop/direct/>\\n\" +\n \"SELECT DISTINCT \" + selectParameters + \" WHERE { \\n\" +\n \" {\\n\" +\n \" <\" + wikidataUri + \"> wdt:P31 ?c1 .\\n\" +\n instanceTriples +\n \"}\\n\" +\n \"UNION\\n\" +\n \"{\\n\" +\n \" <\" + wikidataUri + \"> wdt:P279 ?c1 .\\n\" +\n subclassTriples +\n \"}\\n}\";\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(queryporder.querySum(0, 60));\n\t\tSystem.out.println(queryporder.queryName(\"郭靖\"));\n\t\tSystem.out.println(queryporder.queryAll());\n\t\t\n\t\t//List l = queryporder.queryAll();\n\t\t//List l = queryporder.querySum(0, 60);\n\t\tList l = queryporder.queryName(\"郭靖\");\n\t\tfor(Object o : l) {\n\t\t\tporder p = (porder)o;\n\t\t\tSystem.out.println(\n\t\t\t\tp.getId()+\",\"+\n\t\t\t\tp.getName()+\",\"+\n\t\t\t\tp.getProduct1()+\",\"+\n\t\t\t\tp.getProduct2()+\",\"+\n\t\t\t\tp.getProduct3()+\",\"+\n\t\t\t\tp.getSum()+\",\"+\n\t\t\t\tp.getDiscount()\n\t\t\t\t\t\n\t\t\t\t\t);\n\t\t}\n\t\t\n\t}", "@Test\n public void testBuild() {\n show(DeleteSqlBuilder.build(\"table1\", NeoMap.of(\"name\", \"nana\", \"age\", 12)));\n }", "@Test\n public void testAddCity_3args03() {\n\n System.out.println(\"addCity_3args\");\n String cityName = \"city0\";\n Pair coordenates = new Pair(41.243345, -8.674084);\n int points = 28;\n City cityTest = new City(coordenates, cityName, points);\n Set<City> expResult = new HashSet<>();\n\n expResult.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n expResult.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n expResult.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n expResult.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n expResult.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n expResult.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n expResult.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n expResult.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n expResult.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n expResult.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n sn10.addCity(coordenates, cityName, points);\n Set<City> result = sn10.getCitiesList();\n assertEquals(expResult, result);\n }", "@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test HQL Query with Criteria Query for Multiple where with Address 04\")\n public void testHQLQueryWithCriteriaQueryForMultipleWhereWithAddress04()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n List<SBAddress04> addresses = null;\n\n try (Session session = HibernateUtil.getSessionFactory().openSession()) {\n Transaction transaction = null;\n try {\n transaction = session.beginTransaction();\n\n CriteriaBuilder criteriaBuilder = session.getCriteriaBuilder();\n CriteriaQuery<SBAddress04> criteriaQuery = criteriaBuilder.createQuery(SBAddress04.class);\n Root<SBAddress04> root = criteriaQuery.from(SBAddress04.class);\n\n// criteriaQuery.select(root)\n// .where(criteriaBuilder.equal(root.get(\"address04Zip\"),\"292000\"))\n// .where(criteriaBuilder.like(root.get(\"address04City\"),\"Hikkaduwa\"));\n\n Predicate[] predicates = new Predicate[2];\n predicates[0] = criteriaBuilder.equal(root.get(\"address04Zip\"),\"292000\");\n predicates[1] = criteriaBuilder.like(root.get(\"address04City\"),\"Hikkaduwa\");\n\n //AND\n// criteriaQuery.select(root)\n// .where(predicates);\n\n //OR\n// criteriaQuery.select(root)\n// .where(criteriaBuilder.or(predicates[0],predicates[1]));\n\n //AND\n criteriaQuery.select(root)\n .where(criteriaBuilder.and(predicates[0],predicates[1]));\n\n Query query = session.createQuery(criteriaQuery);\n\n addresses = query.list();\n\n transaction.commit();\n\n addresses.forEach(address -> System.out.println(\"Added Address : \" + address.getAddress04Street()));\n } catch (Exception e) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(e));\n e.printStackTrace();\n }\n\n } catch (Throwable throwable) {\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n System.out.println(\"Address : \" + addresses.size());\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }", "@Test\r\n\tpublic void testPrepareGraphQuery3() throws Exception\r\n\t{\r\n\t\tStatement st1 = vf.createStatement(john, fname, johnfname, dirgraph);\r\n\t\tStatement st2 = vf.createStatement(john, lname, johnlname, dirgraph);\r\n\t\tStatement st3 = vf.createStatement(john, homeTel, johnhomeTel, dirgraph);\r\n\t\tStatement st4 = vf.createStatement(john, email, johnemail, dirgraph);\r\n\t\tStatement st5 = vf.createStatement(micah, fname, micahfname, dirgraph);\r\n\t\tStatement st6 = vf.createStatement(micah, lname, micahlname, dirgraph);\r\n\t\tStatement st7 = vf.createStatement(micah, homeTel, micahhomeTel, dirgraph);\r\n\t\tStatement st8 = vf.createStatement(fei, fname, feifname, dirgraph);\r\n\t\tStatement st9 = vf.createStatement(fei, lname, feilname, dirgraph);\r\n\t\tStatement st10 = vf.createStatement(fei, email, feiemail, dirgraph);\r\n\t\t\r\n\t\r\n\t\ttestWriterCon.add(st1);\r\n\t\ttestWriterCon.add(st2);\r\n\t\ttestWriterCon.add(st3);\r\n\t\ttestWriterCon.add(st4);\r\n\t\ttestWriterCon.add(st5);\r\n\t\ttestWriterCon.add(st6);\r\n\t\ttestWriterCon.add(st7);\r\n\t\ttestWriterCon.add(st8);\r\n\t\ttestWriterCon.add(st9);\r\n\t\ttestWriterCon.add(st10);\r\n\t\t\r\n\t\tAssert.assertTrue(testWriterCon.hasStatement(st1, false));\r\n\t\tAssert.assertFalse(testWriterCon.hasStatement(st1, false, (Resource)null));\r\n\t\tAssert.assertFalse(testWriterCon.hasStatement(st1, false, null));\r\n\t\tAssert.assertTrue(testWriterCon.hasStatement(st1, false, dirgraph));\r\n\t\t\r\n\t\t\r\n\t\tAssert.assertEquals(10, testAdminCon.size(dirgraph));\t\t\r\n\t\t\t\r\n\t\tString query = \" DESCRIBE <http://marklogicsparql.com/addressbook#firstName> \";\r\n\t\tGraphQuery queryObj = testReaderCon.prepareGraphQuery(query);\r\n\t\t\t\r\n\t\tGraphQueryResult result = queryObj.evaluate();\r\n\t\tresult.hasNext();\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(false)));\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"rawtypes\")\n\t@Test\n\tpublic void retrieveCollections() {\n\t\t// We can also query for the collections themselves, since they are\n\t\t// first class objects.\n\n\t\tObjectSet result = db.queryByExample(new ArrayList());\n\t\tlistResult(result);\n\n\t\t// as we are initializing readouts\n\t\tassertEquals(2, result.size());\n\n\t}", "@Test\r\n\tpublic void test() {\r\n\t\tfor(int i=0;i<100;i++) {\r\n\t\t\tinsert();\r\n\t\t}\r\n\t\tselectAll();\r\n\t}", "public abstract Statement queryToRetrieveData();", "List<TbCities> selectByExample(TbCitiesExample example);", "private static void executeQuery4(PersistenceManager pm) {\n Query query = pm.newQuery(Category.class);\n query.declareParameters(\"int length\");\n query.declareVariables(\"Item item\");\n query.setFilter(\n \"elements.contains(item) && item.name.length() <= length\");\n Collection results = (Collection)query.execute(new Integer(10));\n printCollection(\"Categories containing an item with a short name: \",\n results.iterator());\n query.closeAll();\n }", "@Test\n public void testZones() throws Exception {\n QuerySet lQuerySet = this.execute( new TaskKey( 4650, 110482 ) );\n\n Assert.assertEquals( \"Number of retrieved rows\", 2, lQuerySet.getRowCount() );\n\n Assert.assertTrue( lQuerySet.next() );\n testRow( lQuerySet, \"101 - Zone - Flight Compartment - Left\" );\n\n Assert.assertTrue( lQuerySet.next() );\n testRow( lQuerySet, \"102 - Zone - Flight Compartment Cabin - Right\" );\n\n Assert.assertFalse( lQuerySet.next() );\n }", "List<Factory> selectAll();", "public List<Courtyard> findCourtyardAll() {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tList<Courtyard> courtyards = courtyardMapper.findCourtyardAll();\n\t\tSystem.out.println(\"--Into Dao Method of findCourtyardAll!!!--\");\n\t\treturn courtyards;\n\t}", "public static void main(String[] args) {\n TypedQuery<Object[]> query = em.createQuery(\n \"SELECT COUNT(p), p.location.city FROM RegularCustomer p WHERE p.location.province = :province GROUP BY p.location.city\", Object[].class);\n List<Object[]> res1 = query.setParameter(\"province\", \"Jawa Barat\").getResultList();\n for (Object[] r : res1) {\n System.out.println(\"Count: \" + r[0] + \", City: \" + r[1]);\n }\n em.close();\n emf.close();\n }", "public void test3() throws ClassNotFoundException, SQLException {\r\n\t\tsqlTable tbl = new sqlTable();\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE metropolis = \" + \"\\\"Mumbai\" + \"\\\";\");\r\n\t\tassertTrue(tbl.getGrid().get(0).get(1).equals(\"Asia\"));\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE metropolis = \" + \"\\\"New York\" + \"\\\";\");\r\n\t\tassertTrue(tbl.getGrid().get(0).get(1).equals(\"North America\"));\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE population >= \" + 20400000 +\";\"); \r\n\t\tassertTrue(tbl.getGrid().get(0).get(0).equals(\"Mumbai\"));\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE population >= \" + 21000000 +\";\");\r\n\t\tassertTrue(tbl.getGrid().get(0).get(0).equals(\"New York\"));\r\n\t}", "@Test\n\tpublic void testGetLista() throws Exception {\n\t\tSystem.out.println(\"getLista\");\n\t\tso.execute(entity);\n\t\tList<IGeneralEntity> expResult = ((TakeTrucksOperation) so).getLista();\n\t\tList<IGeneralEntity> result = so.db.vratiSve(entity);\n\n\t\tassertEquals(expResult.size(), result.size());\n\t}", "List<TCpySpouse> selectByExample(TCpySpouseExample example);", "List<Cargo> selectByExample(CargoExample example);", "@Test\r\n public void testGetAllFestivities() {\r\n System.out.println(\"getAllFestivities\");\r\n List<Festivity> result = Database.getAllFestivities();\r\n assertTrue(result.size() > 0 );\r\n }", "@Test\n\tpublic void testQueryShopList() {\n\t\t\n\t\tArea area = new Area();\n\t\tarea.setAreaId(2);\n\t\t\n\t\tShopCategory shopCategory = new ShopCategory();\n//\t\tshopCategory.setShopCategoryId(1L);\n\t\tShopCategory shopCategory2 = new ShopCategory();\n\t\tshopCategory2.setShopCategoryId(3L);\n\t\t\n\t\tshopCategory.setParent(shopCategory2);\n\t\t\n\t\tShop shop = new Shop();\n\t\tshop.setShopCategory(shopCategory);\n//\t\tshop.setArea(area);\n//\t\tshop.setShopName(\"店\");\n//\t\tshop.setShopStatus(1);\n//\t\tshop.setOwner(personInfo);\n\t\tint count = shopMapper.queryShopCount(shop);\n\t\tSystem.out.println(\"总数:\"+count);\n\t\tList<Shop> shopList = shopMapper.queryShopList(shop, 0, 100);\n\t\tSystem.out.println(shopList.size());\n\t}", "public DwiCtStationTpaDExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public List<Triplet> selectAllByRelation(int id) throws DAOException;", "private DbQuery() {}", "@Override\n public R visit(ConstructQuery n, A argu) {\n R _ret = null;\n n.nodeToken.accept(this, argu);\n n.constructTemplate.accept(this, argu);\n n.nodeListOptional.accept(this, argu);\n n.whereClause.accept(this, argu);\n n.solutionModifier.accept(this, argu);\n return _ret;\n }", "public void getAll() {\n try {\n\n String sql = \"select * from project_zero.carlot where owner = 'DEALERSHIP';\";\n Statement st = ConnectionUtil.getInstance().getConnection().createStatement();\n ResultSet rs = st.executeQuery(sql);\n\n while(rs.next()) {\n Car c = new Car(rs.getInt(1), rs.getString(2), rs.getString(3),\n rs.getInt(4), rs.getString(5), rs.getString(6), rs.getInt(7));\n System.out.println(c.toString());\n\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public Query() {\n\n// oriToRwt = new HashMap();\n// oriToRwt.put(); // TODO\n }", "public List<String> select(String query) {\n\t\tList<String> result = null;\n\n\t\tif (connection == null)\n\t\t\treturn null;\n\n\t\ttry {\n\t\t\tif (connection.isClosed())\n\t\t\t\treturn null;\n\n\t\t\t// Get data from database\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(query);\n\t\t\tresult = new ArrayList<String>();\n\n\t\t\t// For every result do\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tString line = resultSet.getString(\"geojson\").replaceAll(\" \", \"\");\n\t\t\t\tString prop = resultSet.getString(\"prop\");\n\n\t\t\t\tif (prop == null)\n\t\t\t\t\tprop = \"-\";\n\t\t\t\telse\n\t\t\t\t\tprop = prop.replace(\"\\\"\", \"\\\\\\\"\");\n\n\t\t\t\t// If point, append with prop and type\n\t\t\t\tif (line.contains(\"Point\")) {\n\t\t\t\t\tif (resultSet.getString(\"shop\") != null) {\n\t\t\t\t\t\tresult.add(line.substring(0, line.length() - 1) + \",\\\"properties\\\":{\\\"type\\\":0,\\\"prop\\\":\\\"\"\n\t\t\t\t\t\t\t\t+ prop + \"\\\"}}\");\n\t\t\t\t\t} else if (resultSet.getString(\"tourism\") != null) {\n\t\t\t\t\t\tresult.add(line.substring(0, line.length() - 1) + \",\\\"properties\\\":{\\\"type\\\":1,\\\"prop\\\":\\\"\"\n\t\t\t\t\t\t\t\t+ prop + \"\\\"}}\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.add(line.substring(0, line.length() - 1) + \",\\\"properties\\\":{\\\"type\\\":2,\\\"prop\\\":\\\"\"\n\t\t\t\t\t\t\t\t+ prop + \"\\\"}}\");\n\t\t\t\t\t}\n\t\t\t\t} else if (line.contains(\"LineString\")) {\n\t\t\t\t\tresult.add(line.substring(0, line.length() - 1) + \",\\\"properties\\\":{\\\"prop\\\":\\\"\" + prop + \"\\\"}}\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tstatement.close();\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public List<Triplet> selectAll(boolean isSystem, int limit) throws DAOException;", "@Test\n public void test1(){\n Map map = us.selectAll(1, 1);\n System.out.println(map);\n }" ]
[ "0.5962357", "0.58595407", "0.57720345", "0.5711232", "0.5682156", "0.5679046", "0.5678228", "0.5602849", "0.55939627", "0.55825037", "0.5540566", "0.5539278", "0.5527273", "0.5523562", "0.55012906", "0.5494849", "0.54819244", "0.54658675", "0.545074", "0.5439676", "0.54253215", "0.53954226", "0.5386714", "0.53796196", "0.5378622", "0.5358657", "0.5341418", "0.53385454", "0.5328425", "0.5320784", "0.5312094", "0.5301313", "0.52993935", "0.5287993", "0.5286307", "0.52631676", "0.524613", "0.52403873", "0.52344793", "0.52304965", "0.5228679", "0.5228154", "0.5226994", "0.5225147", "0.5225003", "0.52211285", "0.5216111", "0.521608", "0.5200356", "0.51890135", "0.5187958", "0.51865494", "0.51754916", "0.5171093", "0.5168003", "0.516767", "0.51650155", "0.51573545", "0.51548535", "0.5154014", "0.515347", "0.51366955", "0.5136076", "0.5128794", "0.51194096", "0.51166654", "0.5098408", "0.5088433", "0.5077241", "0.5075556", "0.5070921", "0.5070483", "0.5068539", "0.5067122", "0.5066896", "0.506666", "0.5065293", "0.50651705", "0.50650734", "0.50648534", "0.50589186", "0.50579923", "0.505781", "0.5047071", "0.5046893", "0.5044083", "0.5043308", "0.5038795", "0.50386065", "0.50341064", "0.5034014", "0.50330013", "0.50220567", "0.50206894", "0.50199276", "0.5016407", "0.50147897", "0.50146323", "0.5013543", "0.5010089", "0.50087404" ]
0.0
-1
/ test a basic boolean query (result true)
@Test public void testBooleanTrueSingleSource() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); execute("/tests/basic/query03.rq", "/tests/basic/query03.srx", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testBooleanLiteralTrue2() throws Exception {\n Boolean expected = Boolean.TRUE;\n String sql = \"SELECT TRUE\";\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 Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, expected);\n verifyProperty(constantNode, Expression.TYPE_CLASS_PROP_NAME, DataTypeName.BOOLEAN.name());\n \n verifySql(\"SELECT TRUE\", fileNode);\n }", "boolean isIsQuery();", "boolean hasQuery();", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"\");\n assertFalse(boolean0);\n }", "boolean isOQL();", "@Test\n public void testBooleanLiteralFalse2() throws Exception {\n Boolean expected = Boolean.FALSE;\n String sql = \"SELECT {b'false'}\";\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 Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, expected);\n verifyProperty(constantNode, Expression.TYPE_CLASS_PROP_NAME, DataTypeName.BOOLEAN.name());\n\n verifySql(\"SELECT FALSE\", fileNode);\n }", "boolean getResult();", "boolean getResult();", "boolean getResult();", "boolean getResult();", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM null WHERE delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete'\");\n assertTrue(boolean0);\n }", "Boolean conditionResult();", "public static boolean booleanQueryDB(String query) throws SQLException{\n\t\t\tConnection con = connectToDB();\n\t\t\t// Creiamo un oggetto Statement per poter interrogare il db.\n\t\t\tStatement cmd = con.createStatement ();\n\t\t\t// Eseguiamo una query e immagazziniamone i risultati in un oggetto ResultSet.\n\t\t\t\n\t\t\t// String qry = \"SELECT * FROM utente\";\n\t\t\tResultSet res = cmd.executeQuery(query);\n\t\t\t\n\t\t\tint size = 0;\n\t\t\tif (res != null) \n\t\t\t{ \n\t\t\t res.beforeFirst(); \n\t\t\t res.last(); \n\t\t\t size = res.getRow(); \n\t\t\t} \n\t\t\t\n\t\t\tres.close();\n\t\t\tcmd.close();\n\t\t\t\n\t\t\tif (size == 0) return false;\n\t\t\telse return true;\n\t\t}", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"updatedeffult~nfo\");\n assertFalse(boolean0);\n }", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean isSQL();", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\" SELECT * FROM \");\n assertFalse(boolean0);\n assertNotNull(boolean0);\n }", "@Test\n public void testDAM31901002() {\n // in this case, the boolean type is not supported by oracle db.\n // there is separate sql created to be executed for oracle database\n // however, the sql id that for oracle and other db are same.\n testDAM30802001();\n }", "boolean hasQueryMessage();", "public boolean testSql(String sql) {\n\t\tboolean flag = false;\n\t\tif(StringUtils.isNotBlank(sql)){\n\t\t\tIPersistenceDAO dao = getPersistenceDAO();\n\t\t\ttry {\n\t\t\t\tdao.execute(sql, null);\n\t\t\t\tflag = true;\n\t\t\t} catch (OptimusException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} finally{\n\t\t\t\treturn flag;\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\t}", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"alter table\");\n assertFalse(boolean0);\n }", "@Test\r\n public void testIsAvailability() {\r\n System.out.println(\"isAvailability\");\r\n Table instance = new Table(\"s\",1);\r\n boolean expResult = true;\r\n boolean result = instance.isAvailability();\r\n assertEquals(expResult, result);\r\n \r\n }", "boolean hasStatement();", "@Test\n\tpublic void testBooleanFalse() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query04.rq\", \"/tests/basic/query04.srx\", false);\n\t}", "public boolean querySql(String sql){\r\n boolean result = true;\r\n try{\r\n stm = con.createStatement();\r\n rss = stm.executeQuery(sql);\r\n }catch(SQLException e){\r\n report = e.toString();\r\n result = false;\r\n }\r\n return result;\r\n }", "boolean hasQueryAddress();", "Boolean getBoolean(String col_name) throws ConnException;", "public boolean query(String sql, boolean showResult) {\r\n \t\tStatement st = null;\r\n \t\tResultSet rs = null;\r\n \t\tboolean hasContent = false;\r\n \t\ttry {\r\n \t\t\tst = conn.createStatement();\r\n \t\t\tMsg.debugMsg(DB_REGULAR.class, \"executing query: \" + sql);\r\n \t\t\trs = st.executeQuery(sql);\r\n \t\t\thasContent = !rs.isBeforeFirst();\r\n \t\t\tif (showResult) {\r\n \t\t\t\tshowResultSetContent(rs);\r\n \t\t\t}\r\n \t\t\treturn hasContent;\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\tst.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\treturn showResult;\r\n \r\n \t}", "boolean hasBoolValue();", "public boolean isSetQuery() {\n return this.query != null;\n }", "boolean hasEresult();", "@Test\n\tvoid test1() throws SQLException {\n\t\tString username_1 = \"testtest1\";\n\t\tboolean actual_1 = database.isExistUser(username_1);\n\t\tboolean expected_1 = false;\n\t\tassertEquals(expected_1,actual_1);\n\t\t\n\t\tString username_2 = \"testtest4\";\n\t\tboolean actual_2 = database.isExistUser(username_2);\n\t\tboolean expected_2 = true;\n\t\tassertEquals(expected_2,actual_2);\n\t}", "public Object bool(String value) {\r\n if (value == null) return null;\r\n return isOracle() ? Integer.valueOf((isTrue(value) ? 1 : 0)) :\r\n Boolean.valueOf(isTrue(value));\r\n }", "@Test\n\tpublic void test_returnBooleanFoo_true() {\n\n\t}", "@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 }", "boolean execute();", "@Test\n public void testQueryMore4() throws Exception {\n testQueryMore(true, false);\n }", "boolean hasQueryId();", "boolean hasQueryId();", "boolean isSetQuick();", "boolean hasHasAlcoholResult();", "public boolean isSetQuery() {\n return this.query != null;\n }", "public boolean isSetQuery() {\n return this.query != null;\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"call\");\n assertFalse(boolean0);\n }", "@Test\n public void testGetBooleanNumberTrue() throws SQLException {\n FieldSchema fieldSchema = new FieldSchema();\n fieldSchema.setType(\"int\");\n\n List<FieldSchema> fieldSchemas = Arrays.asList(fieldSchema);\n TableSchema schema = new TableSchema(fieldSchemas);\n\n HiveBaseResultSet resultSet = Mockito.mock(HiveBaseResultSet.class);\n resultSet.row = new Object[] {new Integer(3)};\n\n when(resultSet.getSchema()).thenReturn(schema);\n when(resultSet.getBoolean(1)).thenCallRealMethod();\n when(resultSet.getObject(1)).thenCallRealMethod();\n when(resultSet.wasNull()).thenCallRealMethod();\n\n Assert.assertEquals(true, resultSet.getBoolean(1));\n Assert.assertFalse(resultSet.wasNull());\n }", "public static boolean esBooleano (int tipoSQL) {\n\t \n\t switch (tipoSQL) {\n\t \tcase Types.BIT :\n\t \tcase Types.BOOLEAN :\n\t \t return true;\n\t }\n\t return false;\n\t}", "boolean getValue();", "@Test\n public void allTrue() {\n assertTrue(getPredicateInstance(true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n assertTrue(getPredicateInstance(true, true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n }", "@Test\n public void test1(){\n assertEquals(true, Program.and(true, true));\n }", "boolean booleanOf();", "boolean hasQueryTimeSec();", "private boolean processTrueOrFalse() throws HsqlException {\n\n String sToken = tokenizer.getSimpleToken();\n\n if (sToken.equals(Token.T_TRUE)) {\n return true;\n } else if (sToken.equals(Token.T_FALSE)) {\n return false;\n } else {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, sToken);\n }\n }", "public boolean isOkToQuery(String id){\n try{\n queryTextbook(id);\n return true;\n }catch (RuntimeException e){\n e.printStackTrace();\n return false;\n }\n }", "String getBooleanTrueExpression();", "boolean hasQueryZone();", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"\");\n assertFalse(boolean0);\n }", "public boolean hasResult()\n/* */ {\n/* 119 */ return this.result != RESULT_NONE;\n/* */ }", "@Test\n public void testCaseIsPredicateBool() {\n AtomicBoolean success = new AtomicBoolean(false);\n match(42L).caseIs(s -> true, () -> success.set(true));\n assertTrue(success.get());\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"exec\");\n assertNull(boolean0);\n }", "public abstract boolean read_boolean();", "boolean getBoolValue();", "boolean getBoolValue();", "boolean hasBool();", "@Test\n public void testQueryMore2() throws Exception {\n testQueryMore(false, true);\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"\");\n assertFalse(boolean0);\n }", "public BooleanExpTest(String name) {\n\t\tsuper(name);\n\t}", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM join SELECT * FROM as SELECT * FROM on SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null\");\n assertTrue(boolean0);\n }", "@Test\n public void testQueryMore1() throws Exception {\n testQueryMore(true, true);\n }", "@Test(timeout = 4000)\n public void test059() throws Throwable {\n boolean boolean0 = SQLUtil.isDML(\"trncateh@?wbt5lee]x[]=]/?\");\n assertFalse(boolean0);\n }", "@Test\n public void trueAndFalseCombined() {\n assertFalse(getPredicateInstance(false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(false, null, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n }", "@Test\n public void testGetBooleanStringTrue() throws SQLException {\n FieldSchema fieldSchema = new FieldSchema();\n fieldSchema.setType(\"varchar(16)\");\n\n List<FieldSchema> fieldSchemas = Arrays.asList(fieldSchema);\n TableSchema schema = new TableSchema(fieldSchemas);\n\n HiveBaseResultSet resultSet = Mockito.mock(HiveBaseResultSet.class);\n resultSet.row = new Object[] {\"1\"};\n\n when(resultSet.getSchema()).thenReturn(schema);\n when(resultSet.getBoolean(1)).thenCallRealMethod();\n when(resultSet.getObject(1)).thenCallRealMethod();\n when(resultSet.wasNull()).thenCallRealMethod();\n\n Assert.assertEquals(true, resultSet.getBoolean(1));\n Assert.assertFalse(resultSet.wasNull());\n }", "public boolean isSimple() {\n if (this.simple == 0) {\n final AtomicBoolean simple = new AtomicBoolean(true);\n if (this.whereExpr != null) {\n this.whereExpr.visit(new QueryModelVisitorBase<RuntimeException>() {\n\n @Override\n protected void meetNode(final QueryModelNode node) throws RuntimeException {\n if (!simple.get()) {\n return;\n } else if (node instanceof StatementPattern || node instanceof Join\n || node instanceof Filter || node instanceof ValueExpr\n && !(node instanceof Exists) || node instanceof ExtensionElem) {\n super.meetNode(node);\n } else if (node instanceof Extension) {\n for (QueryModelNode n = node.getParentNode(); n != null; n = n\n .getParentNode()) {\n if (!(n instanceof Extension)) {\n simple.set(false);\n return;\n }\n }\n super.meetNode(node);\n } else {\n simple.set(false);\n return;\n }\n }\n\n });\n }\n this.simple = (byte) (simple.get() ? 1 : -1);\n }\n return this.simple == 1;\n }", "public void testQuery() {\n mActivity.runOnUiThread(\n new Runnable() {\n public void run() {\n //TODO: Should compare this against the db results directly.\n assertEquals(sendQuery(\"SFO\"), 7);\n assertEquals(sendQuery(\"RHV\"), 1);\n assertEquals(sendQuery(\"xyzzy\"), 0);\n }\n }\n );\n }", "boolean isSetLastrunresult();", "protected boolean isQueryAvailable() {\n return query != null;\n }", "public boolean hasQuery() {\n return fieldSetFlags()[8];\n }", "@Test\n public void test_column_type_detection_boolean() throws SQLException {\n testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"true\", XSDDatatype.XSDboolean), true, Types.BOOLEAN, Boolean.class.getCanonicalName());\n }", "public boolean Query(Guitar guitar) {\n\treturn guitarDao.Query(guitar);\n}", "boolean isSimpleValue();", "@Test\n\tpublic void testBooleanTrueMultipleSource() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query03a.rq\", \"/tests/basic/query03.srx\", false);\n\t}", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"select into\");\n assertNotNull(boolean0);\n assertTrue(boolean0);\n }", "@Test\n public void testGetInsulatedBool()\n {\n System.out.println(\"getInsulatedBool\");\n PipeTypeFour instance = new PipeTypeFour(1,39, PipeGrade.THREE, false);;\n boolean expResult = true;\n boolean result = instance.getInsulatedBool();\n assertEquals(expResult, result);\n }", "public Boolean asBoolean();", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\" pG+Qqkq%zt,9yyp38\");\n assertFalse(boolean0);\n }", "boolean result_is_boolean(DiagnosticChain diagnostics, Map<Object, Object> context);", "BoolOperation createBoolOperation();" ]
[ "0.76015145", "0.74796903", "0.7459251", "0.7452942", "0.7206324", "0.6987774", "0.69630206", "0.69630206", "0.69630206", "0.69630206", "0.68606406", "0.68521065", "0.6816115", "0.67700934", "0.6757857", "0.6757721", "0.6745442", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.66067326", "0.6550931", "0.65110594", "0.6497312", "0.64840686", "0.64631164", "0.64470893", "0.6444303", "0.6433456", "0.64308625", "0.6408478", "0.6402497", "0.6292872", "0.62904006", "0.6286822", "0.6280563", "0.6246246", "0.62138546", "0.62052596", "0.6205021", "0.6198197", "0.6175739", "0.6172257", "0.6172257", "0.61654687", "0.6149452", "0.61481124", "0.61481124", "0.6138356", "0.6128906", "0.61272013", "0.6124312", "0.61182034", "0.61109793", "0.61025196", "0.6086331", "0.6084508", "0.60601014", "0.6058237", "0.6057903", "0.6054661", "0.60378605", "0.6024071", "0.60225916", "0.6021197", "0.60199016", "0.60199016", "0.60136324", "0.6000666", "0.59994614", "0.5994921", "0.59912324", "0.5986023", "0.59843785", "0.5984092", "0.59836847", "0.5982528", "0.5981668", "0.5981324", "0.5977197", "0.5967606", "0.5951937", "0.5949985", "0.5947596", "0.5940695", "0.59288776", "0.59245527", "0.5922419", "0.59221226", "0.5919577", "0.59118235" ]
0.63778156
41
/ test a basic boolean query (result true)
@Test public void testBooleanTrueMultipleSource() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); execute("/tests/basic/query03a.rq", "/tests/basic/query03.srx", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testBooleanLiteralTrue2() throws Exception {\n Boolean expected = Boolean.TRUE;\n String sql = \"SELECT TRUE\";\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 Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, expected);\n verifyProperty(constantNode, Expression.TYPE_CLASS_PROP_NAME, DataTypeName.BOOLEAN.name());\n \n verifySql(\"SELECT TRUE\", fileNode);\n }", "boolean isIsQuery();", "boolean hasQuery();", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"\");\n assertFalse(boolean0);\n }", "boolean isOQL();", "@Test\n public void testBooleanLiteralFalse2() throws Exception {\n Boolean expected = Boolean.FALSE;\n String sql = \"SELECT {b'false'}\";\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 Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, expected);\n verifyProperty(constantNode, Expression.TYPE_CLASS_PROP_NAME, DataTypeName.BOOLEAN.name());\n\n verifySql(\"SELECT FALSE\", fileNode);\n }", "boolean getResult();", "boolean getResult();", "boolean getResult();", "boolean getResult();", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM null WHERE delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete'\");\n assertTrue(boolean0);\n }", "Boolean conditionResult();", "public static boolean booleanQueryDB(String query) throws SQLException{\n\t\t\tConnection con = connectToDB();\n\t\t\t// Creiamo un oggetto Statement per poter interrogare il db.\n\t\t\tStatement cmd = con.createStatement ();\n\t\t\t// Eseguiamo una query e immagazziniamone i risultati in un oggetto ResultSet.\n\t\t\t\n\t\t\t// String qry = \"SELECT * FROM utente\";\n\t\t\tResultSet res = cmd.executeQuery(query);\n\t\t\t\n\t\t\tint size = 0;\n\t\t\tif (res != null) \n\t\t\t{ \n\t\t\t res.beforeFirst(); \n\t\t\t res.last(); \n\t\t\t size = res.getRow(); \n\t\t\t} \n\t\t\t\n\t\t\tres.close();\n\t\t\tcmd.close();\n\t\t\t\n\t\t\tif (size == 0) return false;\n\t\t\telse return true;\n\t\t}", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"updatedeffult~nfo\");\n assertFalse(boolean0);\n }", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean isSQL();", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\" SELECT * FROM \");\n assertFalse(boolean0);\n assertNotNull(boolean0);\n }", "@Test\n public void testDAM31901002() {\n // in this case, the boolean type is not supported by oracle db.\n // there is separate sql created to be executed for oracle database\n // however, the sql id that for oracle and other db are same.\n testDAM30802001();\n }", "boolean hasQueryMessage();", "public boolean testSql(String sql) {\n\t\tboolean flag = false;\n\t\tif(StringUtils.isNotBlank(sql)){\n\t\t\tIPersistenceDAO dao = getPersistenceDAO();\n\t\t\ttry {\n\t\t\t\tdao.execute(sql, null);\n\t\t\t\tflag = true;\n\t\t\t} catch (OptimusException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} finally{\n\t\t\t\treturn flag;\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\t}", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"alter table\");\n assertFalse(boolean0);\n }", "@Test\r\n public void testIsAvailability() {\r\n System.out.println(\"isAvailability\");\r\n Table instance = new Table(\"s\",1);\r\n boolean expResult = true;\r\n boolean result = instance.isAvailability();\r\n assertEquals(expResult, result);\r\n \r\n }", "boolean hasStatement();", "@Test\n\tpublic void testBooleanFalse() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query04.rq\", \"/tests/basic/query04.srx\", false);\n\t}", "public boolean querySql(String sql){\r\n boolean result = true;\r\n try{\r\n stm = con.createStatement();\r\n rss = stm.executeQuery(sql);\r\n }catch(SQLException e){\r\n report = e.toString();\r\n result = false;\r\n }\r\n return result;\r\n }", "boolean hasQueryAddress();", "Boolean getBoolean(String col_name) throws ConnException;", "@Test\n\tpublic void testBooleanTrueSingleSource() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query03.rq\", \"/tests/basic/query03.srx\", false);\n\t}", "public boolean query(String sql, boolean showResult) {\r\n \t\tStatement st = null;\r\n \t\tResultSet rs = null;\r\n \t\tboolean hasContent = false;\r\n \t\ttry {\r\n \t\t\tst = conn.createStatement();\r\n \t\t\tMsg.debugMsg(DB_REGULAR.class, \"executing query: \" + sql);\r\n \t\t\trs = st.executeQuery(sql);\r\n \t\t\thasContent = !rs.isBeforeFirst();\r\n \t\t\tif (showResult) {\r\n \t\t\t\tshowResultSetContent(rs);\r\n \t\t\t}\r\n \t\t\treturn hasContent;\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\tst.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\treturn showResult;\r\n \r\n \t}", "boolean hasBoolValue();", "public boolean isSetQuery() {\n return this.query != null;\n }", "boolean hasEresult();", "@Test\n\tvoid test1() throws SQLException {\n\t\tString username_1 = \"testtest1\";\n\t\tboolean actual_1 = database.isExistUser(username_1);\n\t\tboolean expected_1 = false;\n\t\tassertEquals(expected_1,actual_1);\n\t\t\n\t\tString username_2 = \"testtest4\";\n\t\tboolean actual_2 = database.isExistUser(username_2);\n\t\tboolean expected_2 = true;\n\t\tassertEquals(expected_2,actual_2);\n\t}", "public Object bool(String value) {\r\n if (value == null) return null;\r\n return isOracle() ? Integer.valueOf((isTrue(value) ? 1 : 0)) :\r\n Boolean.valueOf(isTrue(value));\r\n }", "@Test\n\tpublic void test_returnBooleanFoo_true() {\n\n\t}", "@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 }", "boolean execute();", "@Test\n public void testQueryMore4() throws Exception {\n testQueryMore(true, false);\n }", "boolean hasQueryId();", "boolean hasQueryId();", "boolean isSetQuick();", "boolean hasHasAlcoholResult();", "public boolean isSetQuery() {\n return this.query != null;\n }", "public boolean isSetQuery() {\n return this.query != null;\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"call\");\n assertFalse(boolean0);\n }", "@Test\n public void testGetBooleanNumberTrue() throws SQLException {\n FieldSchema fieldSchema = new FieldSchema();\n fieldSchema.setType(\"int\");\n\n List<FieldSchema> fieldSchemas = Arrays.asList(fieldSchema);\n TableSchema schema = new TableSchema(fieldSchemas);\n\n HiveBaseResultSet resultSet = Mockito.mock(HiveBaseResultSet.class);\n resultSet.row = new Object[] {new Integer(3)};\n\n when(resultSet.getSchema()).thenReturn(schema);\n when(resultSet.getBoolean(1)).thenCallRealMethod();\n when(resultSet.getObject(1)).thenCallRealMethod();\n when(resultSet.wasNull()).thenCallRealMethod();\n\n Assert.assertEquals(true, resultSet.getBoolean(1));\n Assert.assertFalse(resultSet.wasNull());\n }", "public static boolean esBooleano (int tipoSQL) {\n\t \n\t switch (tipoSQL) {\n\t \tcase Types.BIT :\n\t \tcase Types.BOOLEAN :\n\t \t return true;\n\t }\n\t return false;\n\t}", "boolean getValue();", "@Test\n public void allTrue() {\n assertTrue(getPredicateInstance(true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n assertTrue(getPredicateInstance(true, true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n }", "@Test\n public void test1(){\n assertEquals(true, Program.and(true, true));\n }", "boolean booleanOf();", "boolean hasQueryTimeSec();", "private boolean processTrueOrFalse() throws HsqlException {\n\n String sToken = tokenizer.getSimpleToken();\n\n if (sToken.equals(Token.T_TRUE)) {\n return true;\n } else if (sToken.equals(Token.T_FALSE)) {\n return false;\n } else {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, sToken);\n }\n }", "public boolean isOkToQuery(String id){\n try{\n queryTextbook(id);\n return true;\n }catch (RuntimeException e){\n e.printStackTrace();\n return false;\n }\n }", "String getBooleanTrueExpression();", "boolean hasQueryZone();", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"\");\n assertFalse(boolean0);\n }", "public boolean hasResult()\n/* */ {\n/* 119 */ return this.result != RESULT_NONE;\n/* */ }", "@Test\n public void testCaseIsPredicateBool() {\n AtomicBoolean success = new AtomicBoolean(false);\n match(42L).caseIs(s -> true, () -> success.set(true));\n assertTrue(success.get());\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"exec\");\n assertNull(boolean0);\n }", "public abstract boolean read_boolean();", "boolean getBoolValue();", "boolean getBoolValue();", "boolean hasBool();", "@Test\n public void testQueryMore2() throws Exception {\n testQueryMore(false, true);\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"\");\n assertFalse(boolean0);\n }", "public BooleanExpTest(String name) {\n\t\tsuper(name);\n\t}", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM join SELECT * FROM as SELECT * FROM on SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null\");\n assertTrue(boolean0);\n }", "@Test\n public void testQueryMore1() throws Exception {\n testQueryMore(true, true);\n }", "@Test(timeout = 4000)\n public void test059() throws Throwable {\n boolean boolean0 = SQLUtil.isDML(\"trncateh@?wbt5lee]x[]=]/?\");\n assertFalse(boolean0);\n }", "@Test\n public void trueAndFalseCombined() {\n assertFalse(getPredicateInstance(false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(false, null, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n }", "@Test\n public void testGetBooleanStringTrue() throws SQLException {\n FieldSchema fieldSchema = new FieldSchema();\n fieldSchema.setType(\"varchar(16)\");\n\n List<FieldSchema> fieldSchemas = Arrays.asList(fieldSchema);\n TableSchema schema = new TableSchema(fieldSchemas);\n\n HiveBaseResultSet resultSet = Mockito.mock(HiveBaseResultSet.class);\n resultSet.row = new Object[] {\"1\"};\n\n when(resultSet.getSchema()).thenReturn(schema);\n when(resultSet.getBoolean(1)).thenCallRealMethod();\n when(resultSet.getObject(1)).thenCallRealMethod();\n when(resultSet.wasNull()).thenCallRealMethod();\n\n Assert.assertEquals(true, resultSet.getBoolean(1));\n Assert.assertFalse(resultSet.wasNull());\n }", "public boolean isSimple() {\n if (this.simple == 0) {\n final AtomicBoolean simple = new AtomicBoolean(true);\n if (this.whereExpr != null) {\n this.whereExpr.visit(new QueryModelVisitorBase<RuntimeException>() {\n\n @Override\n protected void meetNode(final QueryModelNode node) throws RuntimeException {\n if (!simple.get()) {\n return;\n } else if (node instanceof StatementPattern || node instanceof Join\n || node instanceof Filter || node instanceof ValueExpr\n && !(node instanceof Exists) || node instanceof ExtensionElem) {\n super.meetNode(node);\n } else if (node instanceof Extension) {\n for (QueryModelNode n = node.getParentNode(); n != null; n = n\n .getParentNode()) {\n if (!(n instanceof Extension)) {\n simple.set(false);\n return;\n }\n }\n super.meetNode(node);\n } else {\n simple.set(false);\n return;\n }\n }\n\n });\n }\n this.simple = (byte) (simple.get() ? 1 : -1);\n }\n return this.simple == 1;\n }", "public void testQuery() {\n mActivity.runOnUiThread(\n new Runnable() {\n public void run() {\n //TODO: Should compare this against the db results directly.\n assertEquals(sendQuery(\"SFO\"), 7);\n assertEquals(sendQuery(\"RHV\"), 1);\n assertEquals(sendQuery(\"xyzzy\"), 0);\n }\n }\n );\n }", "boolean isSetLastrunresult();", "protected boolean isQueryAvailable() {\n return query != null;\n }", "public boolean hasQuery() {\n return fieldSetFlags()[8];\n }", "@Test\n public void test_column_type_detection_boolean() throws SQLException {\n testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"true\", XSDDatatype.XSDboolean), true, Types.BOOLEAN, Boolean.class.getCanonicalName());\n }", "public boolean Query(Guitar guitar) {\n\treturn guitarDao.Query(guitar);\n}", "boolean isSimpleValue();", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"select into\");\n assertNotNull(boolean0);\n assertTrue(boolean0);\n }", "@Test\n public void testGetInsulatedBool()\n {\n System.out.println(\"getInsulatedBool\");\n PipeTypeFour instance = new PipeTypeFour(1,39, PipeGrade.THREE, false);;\n boolean expResult = true;\n boolean result = instance.getInsulatedBool();\n assertEquals(expResult, result);\n }", "public Boolean asBoolean();", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\" pG+Qqkq%zt,9yyp38\");\n assertFalse(boolean0);\n }", "boolean result_is_boolean(DiagnosticChain diagnostics, Map<Object, Object> context);", "BoolOperation createBoolOperation();" ]
[ "0.76015145", "0.74796903", "0.7459251", "0.7452942", "0.7206324", "0.6987774", "0.69630206", "0.69630206", "0.69630206", "0.69630206", "0.68606406", "0.68521065", "0.6816115", "0.67700934", "0.6757857", "0.6757721", "0.6745442", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.67151576", "0.66067326", "0.6550931", "0.65110594", "0.6497312", "0.64840686", "0.64631164", "0.64470893", "0.6444303", "0.6433456", "0.64308625", "0.6408478", "0.6402497", "0.63778156", "0.6292872", "0.62904006", "0.6286822", "0.6280563", "0.6246246", "0.62138546", "0.62052596", "0.6205021", "0.6198197", "0.6175739", "0.6172257", "0.6172257", "0.61654687", "0.6149452", "0.61481124", "0.61481124", "0.6138356", "0.6128906", "0.61272013", "0.6124312", "0.61182034", "0.61109793", "0.61025196", "0.6086331", "0.6084508", "0.60601014", "0.6058237", "0.6057903", "0.6054661", "0.60378605", "0.6024071", "0.60225916", "0.6021197", "0.60199016", "0.60199016", "0.60136324", "0.6000666", "0.59994614", "0.5994921", "0.59912324", "0.5986023", "0.59843785", "0.5984092", "0.59836847", "0.5982528", "0.5981668", "0.5981324", "0.5977197", "0.5967606", "0.5951937", "0.5949985", "0.5947596", "0.59288776", "0.59245527", "0.5922419", "0.59221226", "0.5919577", "0.59118235" ]
0.5940695
94
/ test a basic boolean query (result false)
@Test public void testBooleanFalse() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); execute("/tests/basic/query04.rq", "/tests/basic/query04.srx", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test034() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"\");\n assertFalse(boolean0);\n }", "boolean isIsQuery();", "boolean hasQuery();", "@Test\n public void testBooleanLiteralTrue2() throws Exception {\n Boolean expected = Boolean.TRUE;\n String sql = \"SELECT TRUE\";\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 Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, expected);\n verifyProperty(constantNode, Expression.TYPE_CLASS_PROP_NAME, DataTypeName.BOOLEAN.name());\n \n verifySql(\"SELECT TRUE\", fileNode);\n }", "@Test\n public void testBooleanLiteralFalse2() throws Exception {\n Boolean expected = Boolean.FALSE;\n String sql = \"SELECT {b'false'}\";\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 Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, expected);\n verifyProperty(constantNode, Expression.TYPE_CLASS_PROP_NAME, DataTypeName.BOOLEAN.name());\n\n verifySql(\"SELECT FALSE\", fileNode);\n }", "boolean isOQL();", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"updatedeffult~nfo\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM null WHERE delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete'\");\n assertTrue(boolean0);\n }", "boolean getResult();", "boolean getResult();", "boolean getResult();", "boolean getResult();", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\" SELECT * FROM \");\n assertFalse(boolean0);\n assertNotNull(boolean0);\n }", "Boolean conditionResult();", "public static boolean booleanQueryDB(String query) throws SQLException{\n\t\t\tConnection con = connectToDB();\n\t\t\t// Creiamo un oggetto Statement per poter interrogare il db.\n\t\t\tStatement cmd = con.createStatement ();\n\t\t\t// Eseguiamo una query e immagazziniamone i risultati in un oggetto ResultSet.\n\t\t\t\n\t\t\t// String qry = \"SELECT * FROM utente\";\n\t\t\tResultSet res = cmd.executeQuery(query);\n\t\t\t\n\t\t\tint size = 0;\n\t\t\tif (res != null) \n\t\t\t{ \n\t\t\t res.beforeFirst(); \n\t\t\t res.last(); \n\t\t\t size = res.getRow(); \n\t\t\t} \n\t\t\t\n\t\t\tres.close();\n\t\t\tcmd.close();\n\t\t\t\n\t\t\tif (size == 0) return false;\n\t\t\telse return true;\n\t\t}", "boolean isSQL();", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"alter table\");\n assertFalse(boolean0);\n }", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "@Test\n public void testDAM31901002() {\n // in this case, the boolean type is not supported by oracle db.\n // there is separate sql created to be executed for oracle database\n // however, the sql id that for oracle and other db are same.\n testDAM30802001();\n }", "public boolean testSql(String sql) {\n\t\tboolean flag = false;\n\t\tif(StringUtils.isNotBlank(sql)){\n\t\t\tIPersistenceDAO dao = getPersistenceDAO();\n\t\t\ttry {\n\t\t\t\tdao.execute(sql, null);\n\t\t\t\tflag = true;\n\t\t\t} catch (OptimusException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} finally{\n\t\t\t\treturn flag;\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\t}", "boolean hasQueryMessage();", "Boolean getBoolean(String col_name) throws ConnException;", "public boolean querySql(String sql){\r\n boolean result = true;\r\n try{\r\n stm = con.createStatement();\r\n rss = stm.executeQuery(sql);\r\n }catch(SQLException e){\r\n report = e.toString();\r\n result = false;\r\n }\r\n return result;\r\n }", "boolean hasStatement();", "boolean hasEresult();", "@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 }", "boolean hasQueryAddress();", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"call\");\n assertFalse(boolean0);\n }", "@Test\r\n public void testIsAvailability() {\r\n System.out.println(\"isAvailability\");\r\n Table instance = new Table(\"s\",1);\r\n boolean expResult = true;\r\n boolean result = instance.isAvailability();\r\n assertEquals(expResult, result);\r\n \r\n }", "public boolean hasResult()\n/* */ {\n/* 119 */ return this.result != RESULT_NONE;\n/* */ }", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"\");\n assertFalse(boolean0);\n }", "@Test\n\tvoid test1() throws SQLException {\n\t\tString username_1 = \"testtest1\";\n\t\tboolean actual_1 = database.isExistUser(username_1);\n\t\tboolean expected_1 = false;\n\t\tassertEquals(expected_1,actual_1);\n\t\t\n\t\tString username_2 = \"testtest4\";\n\t\tboolean actual_2 = database.isExistUser(username_2);\n\t\tboolean expected_2 = true;\n\t\tassertEquals(expected_2,actual_2);\n\t}", "@Test(timeout = 4000)\n public void test059() throws Throwable {\n boolean boolean0 = SQLUtil.isDML(\"trncateh@?wbt5lee]x[]=]/?\");\n assertFalse(boolean0);\n }", "public boolean query(String sql, boolean showResult) {\r\n \t\tStatement st = null;\r\n \t\tResultSet rs = null;\r\n \t\tboolean hasContent = false;\r\n \t\ttry {\r\n \t\t\tst = conn.createStatement();\r\n \t\t\tMsg.debugMsg(DB_REGULAR.class, \"executing query: \" + sql);\r\n \t\t\trs = st.executeQuery(sql);\r\n \t\t\thasContent = !rs.isBeforeFirst();\r\n \t\t\tif (showResult) {\r\n \t\t\t\tshowResultSetContent(rs);\r\n \t\t\t}\r\n \t\t\treturn hasContent;\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\tst.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\treturn showResult;\r\n \r\n \t}", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"\");\n assertFalse(boolean0);\n }", "public boolean isSetQuery() {\n return this.query != null;\n }", "@Test\n public void testQueryMore4() throws Exception {\n testQueryMore(true, false);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"exec\");\n assertNull(boolean0);\n }", "@Test\n\tpublic void testBooleanTrueSingleSource() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query03.rq\", \"/tests/basic/query03.srx\", false);\n\t}", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\" pG+Qqkq%zt,9yyp38\");\n assertFalse(boolean0);\n }", "boolean hasQueryId();", "boolean hasQueryId();", "boolean hasBoolValue();", "boolean hasHasAlcoholResult();", "boolean execute();", "boolean hasQueryTimeSec();", "@Test\n public void testQueryMore2() throws Exception {\n testQueryMore(false, true);\n }", "@Test(timeout = 4000)\n public void test038() throws Throwable {\n boolean boolean0 = SQLUtil.isDML(\"\");\n assertFalse(boolean0);\n }", "boolean booleanOf();", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n boolean boolean0 = SQLUtil.isDML(\"V=`B*W\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"\");\n assertNull(boolean0);\n }", "public boolean isSetQuery() {\n return this.query != null;\n }", "public boolean isSetQuery() {\n return this.query != null;\n }", "@Test\n public void testGetBooleanNumberFalse() throws SQLException {\n FieldSchema fieldSchema = new FieldSchema();\n fieldSchema.setType(\"int\");\n\n List<FieldSchema> fieldSchemas = Arrays.asList(fieldSchema);\n TableSchema schema = new TableSchema(fieldSchemas);\n\n HiveBaseResultSet resultSet = Mockito.mock(HiveBaseResultSet.class);\n resultSet.row = new Object[] {new Integer(0)};\n\n when(resultSet.getSchema()).thenReturn(schema);\n when(resultSet.getBoolean(1)).thenCallRealMethod();\n when(resultSet.getObject(1)).thenCallRealMethod();\n when(resultSet.wasNull()).thenCallRealMethod();\n\n Assert.assertEquals(false, resultSet.getBoolean(1));\n Assert.assertFalse(resultSet.wasNull());\n }", "public Object bool(String value) {\r\n if (value == null) return null;\r\n return isOracle() ? Integer.valueOf((isTrue(value) ? 1 : 0)) :\r\n Boolean.valueOf(isTrue(value));\r\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n NetworkHandling.sendDataOnTcp((EvoSuiteLocalAddress) null, (byte[]) null);\n String string0 = SQLUtil.normalize(\" Y*-X>Nz.q@~K^o8Z]v\", false);\n assertEquals(\"Y * - X > Nz.q @ ~ K ^ o8Z ] v\", string0);\n \n boolean boolean0 = SQLUtil.isQuery(\"fwX.WrSyJ>:+F-&9\");\n assertFalse(boolean0);\n }", "@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 }", "@Test\n\tpublic void test_returnBooleanFoo_true() {\n\n\t}", "@Test\n public void trueAndFalseCombined() {\n assertFalse(getPredicateInstance(false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(false, null, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n }", "boolean hasQueryZone();", "@Test\n\tpublic void test_returnBooleanFoo_false() {\n\t}", "@Test\n public void testGetBooleanNumberTrue() throws SQLException {\n FieldSchema fieldSchema = new FieldSchema();\n fieldSchema.setType(\"int\");\n\n List<FieldSchema> fieldSchemas = Arrays.asList(fieldSchema);\n TableSchema schema = new TableSchema(fieldSchemas);\n\n HiveBaseResultSet resultSet = Mockito.mock(HiveBaseResultSet.class);\n resultSet.row = new Object[] {new Integer(3)};\n\n when(resultSet.getSchema()).thenReturn(schema);\n when(resultSet.getBoolean(1)).thenCallRealMethod();\n when(resultSet.getObject(1)).thenCallRealMethod();\n when(resultSet.wasNull()).thenCallRealMethod();\n\n Assert.assertEquals(true, resultSet.getBoolean(1));\n Assert.assertFalse(resultSet.wasNull());\n }", "private boolean processTrueOrFalse() throws HsqlException {\n\n String sToken = tokenizer.getSimpleToken();\n\n if (sToken.equals(Token.T_TRUE)) {\n return true;\n } else if (sToken.equals(Token.T_FALSE)) {\n return false;\n } else {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, sToken);\n }\n }", "public boolean isOkToQuery(String id){\n try{\n queryTextbook(id);\n return true;\n }catch (RuntimeException e){\n e.printStackTrace();\n return false;\n }\n }", "public abstract boolean read_boolean();", "protected boolean isQueryAvailable() {\n return query != null;\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"select into\");\n assertNotNull(boolean0);\n assertTrue(boolean0);\n }", "public boolean hasQuery() {\n return fieldSetFlags()[8];\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n boolean boolean0 = SQLUtil.isDDL(\"\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM join SELECT * FROM as SELECT * FROM on SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null\");\n assertTrue(boolean0);\n }", "boolean isSetLastrunresult();", "public static boolean esBooleano (int tipoSQL) {\n\t \n\t switch (tipoSQL) {\n\t \tcase Types.BIT :\n\t \tcase Types.BOOLEAN :\n\t \t return true;\n\t }\n\t return false;\n\t}", "boolean getValue();", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"executealter table\");\n assertFalse(boolean0);\n }", "@Test\n public void testGetBooleanStringFalse() throws SQLException {\n FieldSchema fieldSchema = new FieldSchema();\n fieldSchema.setType(\"varchar(16)\");\n\n List<FieldSchema> fieldSchemas = Arrays.asList(fieldSchema);\n TableSchema schema = new TableSchema(fieldSchemas);\n\n HiveBaseResultSet resultSet = Mockito.mock(HiveBaseResultSet.class);\n resultSet.row = new Object[] {\"0\"};\n\n when(resultSet.getSchema()).thenReturn(schema);\n when(resultSet.getBoolean(1)).thenCallRealMethod();\n when(resultSet.getObject(1)).thenCallRealMethod();\n when(resultSet.wasNull()).thenCallRealMethod();\n\n Assert.assertEquals(false, resultSet.getBoolean(1));\n Assert.assertFalse(resultSet.wasNull());\n }", "public BooleanExpTest(String name) {\n\t\tsuper(name);\n\t}", "boolean isSetQuick();", "Boolean getCompletelyCorrect();", "boolean hasQueryLogicName();", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"trncateh@?wbt5lee]x[]=]/?\");\n assertNull(boolean0);\n }", "public void testQuery() {\n mActivity.runOnUiThread(\n new Runnable() {\n public void run() {\n //TODO: Should compare this against the db results directly.\n assertEquals(sendQuery(\"SFO\"), 7);\n assertEquals(sendQuery(\"RHV\"), 1);\n assertEquals(sendQuery(\"xyzzy\"), 0);\n }\n }\n );\n }", "abstract public boolean getAsBoolean();", "@Test\n public void test_column_type_detection_boolean() throws SQLException {\n testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"true\", XSDDatatype.XSDboolean), true, Types.BOOLEAN, Boolean.class.getCanonicalName());\n }", "@Test\n public void testGetBooleanStringTrue() throws SQLException {\n FieldSchema fieldSchema = new FieldSchema();\n fieldSchema.setType(\"varchar(16)\");\n\n List<FieldSchema> fieldSchemas = Arrays.asList(fieldSchema);\n TableSchema schema = new TableSchema(fieldSchemas);\n\n HiveBaseResultSet resultSet = Mockito.mock(HiveBaseResultSet.class);\n resultSet.row = new Object[] {\"1\"};\n\n when(resultSet.getSchema()).thenReturn(schema);\n when(resultSet.getBoolean(1)).thenCallRealMethod();\n when(resultSet.getObject(1)).thenCallRealMethod();\n when(resultSet.wasNull()).thenCallRealMethod();\n\n Assert.assertEquals(true, resultSet.getBoolean(1));\n Assert.assertFalse(resultSet.wasNull());\n }", "boolean getIsOk();", "public Boolean asBoolean();" ]
[ "0.76531494", "0.7441333", "0.7370981", "0.727323", "0.7195129", "0.71890247", "0.70572615", "0.70299053", "0.7004031", "0.694102", "0.6913688", "0.6818149", "0.6818149", "0.6818149", "0.6818149", "0.6728984", "0.6704333", "0.6690878", "0.66573036", "0.66568756", "0.66090405", "0.66090405", "0.66090405", "0.66090405", "0.66090405", "0.66090405", "0.66090405", "0.66090405", "0.66090405", "0.66090405", "0.66090405", "0.66090405", "0.65932846", "0.6554116", "0.6493144", "0.6432661", "0.64323837", "0.6405835", "0.63659364", "0.6341304", "0.63254064", "0.62567294", "0.62559116", "0.6244815", "0.62315977", "0.6230851", "0.6229238", "0.62071526", "0.6206657", "0.61830175", "0.6159143", "0.6154833", "0.6144834", "0.6141402", "0.6101472", "0.6101472", "0.6097045", "0.6085286", "0.60840476", "0.60799253", "0.6076064", "0.6057621", "0.6043818", "0.6043006", "0.60426724", "0.60422117", "0.60422117", "0.60371697", "0.60340106", "0.6030256", "0.603", "0.6025374", "0.60219336", "0.60087085", "0.60025334", "0.5999531", "0.5994244", "0.5992582", "0.5990904", "0.5988231", "0.5987573", "0.5984562", "0.59839326", "0.59748757", "0.5962126", "0.59522593", "0.5948326", "0.59455526", "0.59304726", "0.59201384", "0.59119993", "0.590886", "0.59042877", "0.58967406", "0.58922726", "0.58780175", "0.58774644", "0.5877111", "0.5875198", "0.5874324" ]
0.677133
15
/ test a single source select query
@Test public void testSingleSourceSelect() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); execute("/tests/basic/query_singleSource01.rq", "/tests/basic/query_singleSource01.srx", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testPassThroughHandler_SingleSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name . }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace is expected to come from some original repository (e.g. SPARQL) => we explicitly\n\t\t\t\t\t * do not expect QueryResults#report to be the second element (compare test\n\t\t\t\t\t * testPassThroughHandler_MultiSourceQuery)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertNotEquals(QueryResults.class, new Exception().getStackTrace()[1].getClass());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"person\"), iri(\"http://example.org/\", \"a\"));\n\t\t\t\t\tnumberOfResults.incrementAndGet();\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(1, numberOfResults.get());\n\t\t}\n\t}", "public abstract ConnectorResultSet select(DataRequest source) throws ConnectorOperationException;", "@Test\n public void testDAM31201001() {\n // In this test case the where clause is specified in a common sql shared in multiple queries.\n testDAM30505001();\n }", "@Test\n\tpublic void testPassThroughHandler_emptySingleSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name . }\");\n\t\t\ttq.setBinding(\"name\", l(\"notExist\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace is expected to come from some original repository (e.g. SPARQL) => we explicitly\n\t\t\t\t\t * do not expect QueryResults#report to be the second element (compare test\n\t\t\t\t\t * testPassThroughHandler_MultiSourceQuery)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertNotEquals(QueryResults.class, new Exception().getStackTrace()[1].getClass());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tthrow new IllegalStateException(\"Expected empty result\");\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(0, numberOfResults.get());\n\t\t}\n\t}", "@Test\n public void testSelectDistinct() throws Exception {\n String sql = \"SELECT DISTINCT a FROM g\";\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 verifyProperty(selectNode, Select.DISTINCT_PROP_NAME, true);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"g\");\n \n verifySql(sql, fileNode);\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test\n public void selectStatementSuccessful() throws SQLException {\n assertNotNull(testConnection.selectStatement(con, \"SELECT * FROM Employees;\"));\n assertNull(testConnection.selectStatement(con, \"SELECT * FROM Emp;\"));\n\n //Test if RS is empty\n assertTrue(testConnection.selectStatement(con, \"SELECT * FROM Employees\").next());\n assertFalse(testConnection.selectStatement(con, \"SELECT * FROM Employees WHERE email='x'\").next());\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test\n\tpublic void testQuery1() {\n\t}", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM join SELECT * FROM as SELECT * FROM on SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null\");\n assertTrue(boolean0);\n }", "@Test\n\tpublic void testPassThroughHandler_MultiSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\n\t\t\t\t\t\t\t\"SELECT ?person ?interest WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name ; <http://xmlns.com/foaf/0.1/interest> ?interest }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace looks like this java.lang.Exception at\n\t\t\t\t\t * org.eclipse.rdf4j.federated.BasicTests$1.startQueryResult(BasicTests.java:276) at\n\t\t\t\t\t * org.eclipse.rdf4j.query.QueryResults.report(QueryResults.java:263) at\n\t\t\t\t\t * org.eclipse.rdf4j.federated.structures.FedXTupleQuery.evaluate(FedXTupleQuery.java:69)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertEquals(QueryResults.class.getName(),\n\t\t\t\t\t\t\tnew Exception().getStackTrace()[1].getClassName());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"person\"), iri(\"http://example.org/\", \"a\"));\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"interest\").stringValue(), \"SPARQL 1.1 Basic Federated Query\");\n\t\t\t\t\tnumberOfResults.incrementAndGet();\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(1, numberOfResults.get());\n\t\t}\n\t}", "@Test\n\tpublic void testBooleanTrueSingleSource() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query03.rq\", \"/tests/basic/query03.srx\", false);\n\t}", "private void selectOperator() {\n String query = \"\";\n System.out.print(\"Issue the Select Query: \");\n query = sc.nextLine();\n query.trim();\n if (query.substring(0, 6).compareToIgnoreCase(\"select\") == 0) {\n sqlMngr.selectOp(query);\n } else {\n System.err.println(\"No select statement provided!\");\n }\n }", "@Test\n public void testSelectAll() throws Exception {\n String sql = \"SELECT ALL a FROM g\";\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 verifyProperty(selectNode, Select.DISTINCT_PROP_NAME, false);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"g\");\n\n verifySql(\"SELECT a FROM g\", fileNode);\n }", "@Test\n public void testSelectSpecificRow() throws SQLException {\n // Arrange\n CommitStructure commit = getSampleCommit();\n String commitID = commit.getCommitID();\n // Act\n mysqlDatabase.insertCommitToDatabase(commit);\n CommitStructure commits = mysqlDatabase.selectSpecificRow(commitID);\n // Assert\n assertEquals(commits.getCommitID() , commitID);\n }", "SelectQuery createSelectQuery();", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionContext\");\n String[] stringArray0 = new String[4];\n String string0 = SQLUtil.renderQuery(defaultDBTable0, stringArray0, stringArray0);\n assertEquals(\"SELECT * FROM org.apache.derby.iapi.sql.execute.ExecutionContext WHERE null = null AND null = null AND null = null AND null = null\", string0);\n }", "@Test\n\tpublic void testSingleSourceConstruct() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query_singleSource02.rq\", \"/tests/basic/query_singleSource02.ttl\", false);\n\t}", "public void testEmbeddedSelect() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName,\" + \"(SELECT COUNT(c.ColumnName) FROM AD_Column c WHERE t.AD_Table_ID=c.AD_Table_ID) \" + \"FROM AD_Table t WHERE t.IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Column=c|AD_Table=t|1]\", fixture.toString());\n }", "@Test\n\tpublic void testSingleSource_SetBinding() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\t\t\tTupleQueryResult tqr = tq.evaluate();\n\t\t\tList<BindingSet> res = Iterations.asList(tqr);\n\t\t\tassertContainsAll(res, \"person\", Sets.newHashSet(iri(\"http://example.org/\", \"a\")));\n\n\t\t\t// CONSTRUCT query\n\t\t\tGraphQuery gq = conn.prepareGraphQuery(\n\t\t\t\t\t\"CONSTRUCT { ?person <http://xmlns.com/foaf/0.1/name> ?name } WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name }\");\n\t\t\tgq.setBinding(\"name\", l(\"Alan\"));\n\t\t\tGraphQueryResult gqr = gq.evaluate();\n\t\t\tList<Statement> stmts = Iterations.asList(gqr);\n\t\t\tAssertions.assertEquals(1, stmts.size());\n\t\t\tAssertions.assertEquals(iri(\"http://example.org/\", \"a\"), stmts.get(0).getSubject());\n\n\t\t\t// BOOLEAN query\n\t\t\tBooleanQuery bq = conn.prepareBooleanQuery(\"ASK { ?person <http://xmlns.com/foaf/0.1/name> ?name }\");\n\t\t\tbq.setBinding(\"name\", l(\"non-existing-name\"));\n\t\t\tAssertions.assertEquals(false, bq.evaluate());\n\n\t\t}\n\n\t}", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"select into\");\n assertNotNull(boolean0);\n assertTrue(boolean0);\n }", "@Test\n public void testPreparedStatementOne() throws Throwable\n {\n assertNotNull(ds);\n Connection c = ds.getConnection();\n assertNotNull(c);\n \n Statement st = c.createStatement();\n assertNotNull(st);\n \n // Create\n st.execute(\"CREATE TABLE Employees (Employee_ID INTEGER, Name VARCHAR(30));\");\n st.execute(\"INSERT INTO Employees VALUES (1, '#1')\");\n st.execute(\"INSERT INTO Employees VALUES (2, '#2')\");\n \n // Prepared statement\n PreparedStatement pstmt = c.prepareStatement(\"SELECT * FROM Employees WHERE Employee_ID = ?\");\n assertNotNull(pstmt);\n \n pstmt.setInt(1, 1);\n \n ResultSet rs = pstmt.executeQuery();\n assertNotNull(rs);\n \n assertTrue(rs.next());\n \n // Drop\n st.execute(\"DROP TABLE Employees\");\n \n rs.close();\n pstmt.close();\n st.close();\n c.close();\n }", "protected abstract void select();", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n SimpleResultSet simpleResultSet0 = new SimpleResultSet();\n Statement statement0 = DBUtil.getStatement(simpleResultSet0);\n assertNull(statement0);\n }", "@Test\n public void testProcessSelect() throws Exception {\n\n try {\n String sql = \"select * from ts_task limit 1\";\n ResponseDataDtoV1 resp = textService.processSelect(sql, \"J\");\n System.out.println(\"res: succ \" + JSONFmtUtil.formatJsonConsole(JSONFastJsonUtil.objectToJson(resp)));\n } catch (Exception e) {\n System.out.println(\"res: error \" + e);\n e.printStackTrace();\n }\n\n }", "@Test\n public void testToStringWithSQL() throws SQLException {\n try (PreparedStatement stmt = this.proxy\n .prepareStatement(\"SELECT * FROM country WHERE lang = ? OR callingcode = ?\")) {\n stmt.setString(1, \"de\");\n stmt.setInt(2, 42);\n String sql = stmt.toString();\n assertEquals(\"SELECT * FROM country WHERE lang = 'de' OR callingcode = 42\", sql);\n LOG.info(\"sql = \\\"{}\\\"\", sql);\n }\n }", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n DBUtil.checkReadOnly(\"SELECT pronae,oid FROM pg_roc WHEE \", true);\n }", "Object executeSelectQuery(String sql) { return null;}", "@Test\n public void testVisit_PlainSelect() throws JSQLParserException {\n String sql = \"select a,b,c from test\";\n Select select = (Select) parserManager.parse(new StringReader(sql));\n final AddAliasesVisitor instance = new AddAliasesVisitor();\n select.accept(instance);\n\n assertEquals(\"SELECT a AS A1, b AS A2, c AS A3 FROM test\", select.toString());\n }", "@Test(timeout = 4000)\n public void test137() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[0];\n String string0 = SQLUtil.renderQuery(defaultDBTable0, stringArray0, stringArray0);\n assertEquals(\"SELECT * FROM null WHERE \", string0);\n }", "SELECT createSELECT();", "public abstract Statement queryToRetrieveData();", "@Test\n public void testReq1() throws Exception {\n\n DataSetArgument lArgs = new DataSetArgument();\n lArgs.add( REQ_1, \"aTaskDbId\", \"aTaskId\" );\n\n // execute the query\n DataSet lDs = QueryExecutor.executeQuery( sDatabaseConnectionRule.getConnection(),\n QueryExecutor.getQueryName( getClass() ), lArgs );\n\n MxAssert.assertEquals( \"Number of retrieved rows\", 2, lDs.getRowCount() );\n assertRow( lDs, MP1_ACTV );\n assertRow( lDs, MP2_REVISION );\n }", "@Test\n public void testGetResultSet() throws MainException {\n System.out.println(\"getResultSet\");\n String queryText = \"select * from infermieri\";\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n ResultSet result = instance.getResultSet(queryText);\n assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n }", "private void executeSelect(String query){\n try {\n statement = connection.createStatement();\n rs = statement.executeQuery(query);\n } catch (SQLException e) {\n throw new RuntimeException(e);\n } \n }", "public void selectQuery(String query) {\n\t\tQuery q = QueryFactory.create(query);\n\t\tQueryExecution qe = QueryExecutionFactory.create(q, model);\n\t\tResultSet result = qe.execSelect();\n\t\tprintResultSet(result);\n\t\tqe.close();\n\t}", "public ResultSet getDataTestUser() throws SQLException{ \r\n String query= (\"select * from \"+Database.Table.TABLE_PRETEST_RESULT);\r\n ResultSet rs = q.querySelect(query);\r\n return rs;\r\n }", "public static void testStub(){\n String qry = \"SELECT * FROM track;\";\n executeStmt(qry);\n }", "public void select() {}", "@Test\n public void queryTest() {\n // TODO: test query\n }", "@Test\n public void testSelectSpecificRowThatDoesNotExist() throws SQLException {\n // Arrange\n CommitStructure commit = getSampleCommit();\n String commitID = commit.getCommitID() + \"A\";\n // Act\n mysqlDatabase.insertCommitToDatabase(commit);\n CommitStructure commits = mysqlDatabase.selectSpecificRow(commitID);\n // Assert\n assertNull(commits);\n }", "@Test(timeout = 4000)\n public void test123() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[5];\n String string0 = SQLUtil.renderQuery(defaultDBTable0, stringArray0, stringArray0);\n assertEquals(\"SELECT * FROM null WHERE null = null AND null = null AND null = null AND null = null AND null = null\", string0);\n }", "@Test\n public void selectById() {\n }", "@Test\n\tpublic void testBooleanTrueMultipleSource() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query03a.rq\", \"/tests/basic/query03.srx\", false);\n\t}", "public void testRawQuery() {\n Random random = new Random();\n ContentValues values1 = makeServiceStateValues(random, mBaseDb);\n final long row1 = mBaseDb.insert(TBL_SERVICE_STATE, null, values1);\n ContentValues values2 = makeServiceStateValues(random, mBaseDb);\n final long row2 = mBaseDb.insert(TBL_SERVICE_STATE, null, values2);\n\n // query tuple\n ServiceStateTable table = new ServiceStateTable();\n String sql = \"SELECT * FROM \" + TBL_SERVICE_STATE + \" WHERE \" + COL_ID + \" = ?\";\n String[] selectionArgs = { String.valueOf(row1) };\n List<ServiceStateTuple> tuples = table.rawQuery(mTestContext, sql, selectionArgs);\n\n // verify values\n assertNotNull(tuples);\n // klocwork\n if (tuples == null) return;\n assertFalse(tuples.isEmpty());\n assertEquals(1, tuples.size());\n ServiceStateTuple tuple = tuples.get(0);\n assertValuesTuple(row1, values1, tuple);\n }", "@Test\n\tpublic void basic_select() {\n\n\t\t// 1). Use criteria builder to create criteria query returning expected\n\t\t// result object\n\n\t\tCriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();\n\t\tCriteriaQuery<Course> criteriaQuery = criteriaBuilder\n\t\t\t\t.createQuery(Course.class);\n\n\t\t// 2). Define roots for the tables which are involved in query\n\t\tRoot<Course> root = criteriaQuery.from(Course.class);\n\n\t\t// 3. Define Predicates etc using criteria query\n\t\t// 4. Add predicates etc to the criteria query\n\n\t\t// Build Typerd Query\n\t\tTypedQuery<Course> query = em.createQuery(criteriaQuery.select(root));\n\n\t\tList<Course> resultList = query.getResultList();\n\n\t\tlogger.info(\"Simple Criteria Query Result ===> {}\", resultList);\n\n\t}", "List<ProcurementSource> selectByExample(ProcurementSourceExample example);", "@Test\n public void testClientSqlQuery() {\n SqlQuery<Integer, GridCacheDynamicLoadOnClientTest.Person> qry = new SqlQuery(GridCacheDynamicLoadOnClientTest.PERSON_CACHE, (\"FROM \" + (GridCacheDynamicLoadOnClientTest.PERSON_CACHE)));\n Assert.assertEquals(GridCacheDynamicLoadOnClientTest.CACHE_ELEMENT_COUNT, GridCacheDynamicLoadOnClientTest.clientNode.getOrCreateCache(GridCacheDynamicLoadOnClientTest.PERSON_CACHE).query(qry).getAll().size());\n }", "@Test\n public void testQuery() {\n DataSetArgument lArgs = new DataSetArgument();\n lArgs.add( \"aMsgId\", \"100\" );\n\n QuerySet lQs = QuerySetFactory.getInstance()\n .executeQuery( \"com.mxi.mx.integration.query.process.LookupQueueId\", lArgs );\n\n Assert.assertEquals( \"Row Count\", 1, lQs.getRowCount() );\n\n lQs.next();\n\n Assert.assertEquals( \"Queue Id\", 1000, lQs.getInt( \"queue_id\" ) );\n }", "@Test(timeout = 4000)\n public void test091() throws Throwable {\n Proxy proxy0 = (Proxy)DBUtil.createLoggingResultSet((ResultSet) null, (Statement) null);\n assertNotNull(proxy0);\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM null WHERE delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete'\");\n assertTrue(boolean0);\n }", "@Test\n public void test3() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:(u,v), b, c);\" +\n \"B = FOREACH A GENERATE $0, b;\" +\n \"C = FILTER B BY 8 > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator filter = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n Operator fe1 = newLogicalPlan.getSuccessors( filter ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator fe2 = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n }", "private void getSelectStatements()\n\t{\n\t\tString[] sqlIn = new String[] {m_sqlOriginal};\n\t\tString[] sqlOut = null;\n\t\ttry\n\t\t{\n\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\tthrow new IllegalArgumentException(m_sqlOriginal);\n\t\t}\n\t\t//\ta sub-query was found\n\t\twhile (sqlIn.length != sqlOut.length)\n\t\t{\n\t\t\tsqlIn = sqlOut;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\t\tthrow new IllegalArgumentException(sqlOut.length + \": \"+ m_sqlOriginal);\n\t\t\t}\n\t\t}\n\t\tm_sql = sqlOut;\n\t\t/** List & check **\n\t\tfor (int i = 0; i < m_sql.length; i++)\n\t\t{\n\t\t\tif (m_sql[i].indexOf(\"SELECT \",2) != -1)\n\t\t\t\tlog.log(Level.SEVERE, \"#\" + i + \" Has embedded SQL - \" + m_sql[i]);\n\t\t\telse\n\t\t\t\tlog.fine(\"#\" + i + \" - \" + m_sql[i]);\n\t\t}\n\t\t/** **/\n\t}", "public void select();", "private void testRow( QuerySet aQuerySet, String aZone ) {\n Assert.assertEquals( \"zone\", aZone, aQuerySet.getString( \"zone\" ) );\n }", "@Test void testInterpretProjectFilterValues() {\n final String sql = \"select y, x\\n\"\n + \"from (values (1, 'a'), (2, 'b'), (3, 'c')) as t(x, y)\\n\"\n + \"where x > 1\";\n sql(sql).returnsRows(\"[b, 2]\", \"[c, 3]\");\n }", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "ResultSet runSQL(String query) {\n try {\n return connection.prepareStatement(query).executeQuery();\n }\n catch (SQLException e) {\n System.err.println(e.getMessage());\n return null;\n }\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n DBUtil.checkReadOnly(\"SELECT pronae,oid FROM pg_roc WHEE \", false);\n }", "@Test\n public void testSelectById() {\n disciplineTest = disciplineDao.selectById(1);\n boolean result = disciplineTest.getId() == 1;\n assertTrue(result);\n }", "@Test\n public void testBetween1() throws Exception {\n String sql = \"SELECT a from db.g where a BETWEEN 1000 AND 2000\";\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 criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, BetweenCriteria.ID);\n verifyElementSymbol(criteriaNode, BetweenCriteria.EXPRESSION_REF_NAME, \"a\");\n verifyConstant(criteriaNode, BetweenCriteria.LOWER_EXPRESSION_REF_NAME, 1000);\n verifyConstant(criteriaNode, BetweenCriteria.UPPER_EXPRESSION_REF_NAME, 2000);\n \n verifySql(\"SELECT a FROM db.g WHERE a BETWEEN 1000 AND 2000\", fileNode);\n }", "@Test\n public void test2() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:(u,v), b, c);\" +\n \"B = FOREACH A GENERATE $0, b;\" +\n \"C = FILTER B BY \" + SIZE.class.getName() +\"(TOTUPLE(*)) > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator filter = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n Operator fe2 = newLogicalPlan.getSuccessors( filter ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n }", "public boolean testSql(String sql) {\n\t\tboolean flag = false;\n\t\tif(StringUtils.isNotBlank(sql)){\n\t\t\tIPersistenceDAO dao = getPersistenceDAO();\n\t\t\ttry {\n\t\t\t\tdao.execute(sql, null);\n\t\t\t\tflag = true;\n\t\t\t} catch (OptimusException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} finally{\n\t\t\t\treturn flag;\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\t}", "private SelectOnConditionStep<Record> commonTestItemDslSelect() {\n\t\treturn dsl.select().from(TEST_ITEM).join(TEST_ITEM_RESULTS).on(TEST_ITEM.ITEM_ID.eq(TEST_ITEM_RESULTS.RESULT_ID));\n\t}", "public void test_0() throws Exception {\n \r\n String sql = \"select benchmark( 1, sha1( 'test' ) )\";\r\n Statement stmt = conn.createStatement();\r\n\r\n ResultSet rs = stmt.executeQuery(sql);\r\n JdbcUtils.printResultSet(rs);\r\n \r\n stmt.close();\r\n }", "@Test\n public void testAliasInFrom() throws Exception {\n String sql = \"SELECT myG.a FROM g AS myG\";\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, \"myG.a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"myG\", \"g\");\n \n verifySql(sql, fileNode);\n }", "@Test\n\tpublic void testFetchResult_with_proper_data() {\n\t}", "@Test\n public void testStringLiteral() throws Exception {\n String sql = \"SELECT 'abc' FROM a.g1\";\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 Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"abc\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }", "@Test\n public void test2(){\n String sql = \"select order_id orderID, order_name orderName, order_date orderDate from order_table where order_id = ?\";\n Order order = getOrder(sql, 4);\n System.out.println(order);\n }", "@Test\n public void testDAM31901001() {\n // in this case, there are different querirs used to generate the ids.\n // the database id is specified in the selectKey element\n testDAM30602001();\n }", "@Test\n public void test1() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:bag{(u,v)}, b, c);\" +\n \"B = FOREACH A GENERATE $0, b;\" +\n \"C = FILTER B BY \" + COUNT.class.getName() +\"($0) > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator filter = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n Operator fe2 = newLogicalPlan.getSuccessors( filter ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n }", "public EODataSource queryDataSource();", "TCpySpouse selectOneByExample(TCpySpouseExample example);", "@Test\n public void testSelectByLessonId() {\n disciplineTest = disciplineDao.selectByLessonId(1);\n boolean result = disciplineTest != null;\n assertTrue(result);\n }", "@Test\n public void testQueryMore1() throws Exception {\n testQueryMore(true, true);\n }", "@Test\n public void run() {\n Tools.title(\"Selecting FIRST_NAME and LAST_NAME from the AUTHOR table\");\n Tools.print(DSL.using(Tools.connection()).select(FIRST_NAME, LAST_NAME).from(AUTHOR).orderBy(ID).fetch());\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"\");\n assertFalse(boolean0);\n }", "@Test\r\n public void testSelectById() {\r\n System.out.println(\"selectById\");\r\n int id = 1;\r\n AbonentDAL instance = new AbonentDAL();\r\n Abonent result = instance.selectById(id);\r\n assertTrue(result!=null && result.getId()==id);\r\n }", "private String stageDetailsFromDB(String queryString){\n\t\tString RET=\"\";\n\t\ttry\n\t\t{\n\t\t\tcon = Globals.getDatasource().getConnection();\n\t\t\tps = con.prepareStatement(queryString); \n\t\t\tresult = ps.executeQuery();\n\t\t\tif (result.first()) {\n\t\t\t\tRET = result.getString(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(SQLException sqle){sqle.printStackTrace();}\n\t\tfinally {\n\t\t Globals.closeQuietly(con, ps, result);\n\t\t}\n\t\treturn RET;\n\t}", "@FixFor( \"MODE-869\" )\n @Test\n public void shouldProducePlanWhenUsingSubquery() {\n schemata = schemataBuilder.addTable(\"someTable\", \"column1\", \"column2\", \"column3\")\n .addTable(\"otherTable\", \"columnA\", \"columnB\").build();\n // Define the subquery command ...\n QueryCommand subquery = builder.select(\"columnA\").from(\"otherTable\").query();\n builder = new QueryBuilder(typeSystem);\n\n // Define the query command (which uses the subquery) ...\n query = builder.selectStar().from(\"someTable\").where().path(\"someTable\").isLike(subquery).end().query();\n initQueryContext();\n plan = planner.createPlan(queryContext, query);\n // print = true;\n print(plan);\n assertThat(problems.hasErrors(), is(false));\n assertThat(problems.isEmpty(), is(true));\n\n // The top node should be the dependent query ...\n assertThat(plan.getType(), is(Type.DEPENDENT_QUERY));\n assertThat(plan.getChildCount(), is(2));\n\n // The first child should be the plan for the subquery ...\n PlanNode subqueryPlan = plan.getFirstChild();\n assertProjectNode(subqueryPlan, \"columnA\");\n assertThat(subqueryPlan.getProperty(Property.VARIABLE_NAME, String.class), is(Subquery.VARIABLE_PREFIX + \"1\"));\n assertThat(subqueryPlan.getChildCount(), is(1));\n assertThat(subqueryPlan.getSelectors(), is(selectors(\"otherTable\")));\n PlanNode subquerySource = subqueryPlan.getFirstChild();\n assertSourceNode(subquerySource, \"otherTable\", null, \"columnA\", \"columnB\");\n assertThat(subquerySource.getChildCount(), is(0));\n\n // The second child should be the plan for the regular query ...\n PlanNode queryPlan = plan.getLastChild();\n assertProjectNode(queryPlan, \"column1\", \"column2\", \"column3\");\n assertThat(queryPlan.getType(), is(PlanNode.Type.PROJECT));\n assertThat(queryPlan.getChildCount(), is(1));\n assertThat(queryPlan.getSelectors(), is(selectors(\"someTable\")));\n PlanNode criteriaNode = queryPlan.getFirstChild();\n assertThat(criteriaNode.getType(), is(PlanNode.Type.SELECT));\n assertThat(criteriaNode.getChildCount(), is(1));\n assertThat(criteriaNode.getSelectors(), is(selectors(\"someTable\")));\n assertThat(criteriaNode.getProperty(Property.SELECT_CRITERIA),\n is((Object)like(nodePath(\"someTable\"), var(Subquery.VARIABLE_PREFIX + \"1\"))));\n\n PlanNode source = criteriaNode.getFirstChild();\n assertSourceNode(source, \"someTable\", null, \"column1\", \"column2\", \"column3\");\n assertThat(source.getChildCount(), is(0));\n }", "public void select ();", "public void test_selectEntity_Tx() throws Exception {\n // ## Arrange ##\n final Integer memberId = 3;\n\n // ## Act ##\n long before = currentDate().getTime();\n final Member member = jdbcManager.from(Member.class).where(\"memberId = ?\", memberId).getSingleResult();\n long after = currentDate().getTime();\n\n // ## Assert ##\n assertNotNull(member);\n log(member.toString());\n assertEquals(memberId, member.memberId);\n log(\"cost: \" + convertToPerformanceView(before, after));\n }", "Query query();", "@Test\n public void selectChainedView() throws Exception {\n final Properties connectionProps = new Properties();\n connectionProps.setProperty(USER, TestInboundImpersonation.PROXY_NAME);\n connectionProps.setProperty(PASSWORD, TestInboundImpersonation.PROXY_PASSWORD);\n connectionProps.setProperty(IMPERSONATION_TARGET, TestInboundImpersonation.TARGET_NAME);\n BaseTestQuery.updateClient(connectionProps);\n BaseTestQuery.testBuilder().sqlQuery(\"SELECT * FROM %s.u0_lineitem ORDER BY l_orderkey LIMIT 1\", BaseTestImpersonation.getWSSchema(TestInboundImpersonation.OWNER)).ordered().baselineColumns(\"l_orderkey\", \"l_partkey\").baselineValues(1, 1552).go();\n }", "@Test\n\tpublic void testPassThroughHandler_EmptyResult() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\n\t\t\t\t\t\t\t\"SELECT ?person ?interest WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name ; <http://xmlns.com/foaf/0.1/interest> ?interest }\");\n\t\t\ttq.setBinding(\"name\", l(\"NotExist\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\tAssertions.assertEquals(Lists.newArrayList(\"person\", \"interest\"), bindingNames);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tthrow new IllegalStateException(\"Expected empty result\");\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t}\n\t}", "@Test\n public void selectAllStatements() {\n StmtIterator iterStatements = targetModel.listStatements(\n new SimpleSelector((Resource) null, (Property) null, (RDFNode) null));\n Statement vcardNickName = iterStatements.nextStatement();\n assertEquals(\"Adaman\", vcardNickName.getString());\n\n Statement vcardName = iterStatements.nextStatement();\n assertEquals(\"http://somewhere/JohnSmith\", vcardName.getSubject().getURI());\n assertEquals(VCARD.N, vcardName.getPredicate());\n assertTrue(vcardName.getObject().isResource());\n\n Statement vcardFullName = iterStatements.nextStatement();\n assertEquals(\"http://somewhere/JohnSmith\", vcardFullName.getSubject().getURI());\n assertEquals(VCARD.FN, vcardFullName.getPredicate());\n assertTrue(vcardFullName.getObject().isLiteral());\n\n Statement vcardFamily = iterStatements.nextStatement();\n assertEquals(\"Smith\", vcardFamily.getString());\n\n Statement vcardGiven = iterStatements.nextStatement();\n assertEquals(\"John\", vcardGiven.getString());\n\n try {\n System.out.println(iterStatements.nextStatement());\n } catch (NoSuchElementException e) {\n return;\n }\n fail(\"NoSuchElementException should be catched\");\n }", "@Test\n public void resultSetNullTest() throws GeneralException {\n JavaRuleContext testRuleContext = buildTestJavaRuleContext();\n testRuleContext.getArguments().remove(JDBCBuildMapRule.ARG_RESULT_SET);\n\n assertThrows(GeneralException.class, () -> jdbcBuildMapRule.execute(testRuleContext));\n verify(jdbcBuildMapRule).internalValidation(eq(testRuleContext));\n verify(jdbcBuildMapRule, never()).internalExecute(eq(testRuleContext), any());\n }", "boolean isIsQuery();", "@Test\n public void testIsNullCriteria1() throws Exception {\n String sql = \"Select a From db.g Where 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 criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, IsNullCriteria.ID);\n verifyElementSymbol(criteriaNode, IsNullCriteria.EXPRESSION_REF_NAME, \"a\");\n \n verifySql(\"SELECT a FROM db.g WHERE a IS NULL\", fileNode);\n }", "private void test() throws SQLException {\n\n\t}", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\" SELECT * FROM \");\n assertFalse(boolean0);\n assertNotNull(boolean0);\n }", "@Test\n public void testGetTabella_PreparedStatement() throws MainException, SQLException {\n System.out.println(\"getTabella\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n PreparedStatement stmt = instance.prepareStatement(\n \"select * from infermieri\");\n ADISysTableModel result = instance.getTabella(stmt);\n assertNotNull(result);\n }", "public void testOneTableSynAS() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName FROM AD_Table AS t WHERE t.IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Table=t|0]\", fixture.toString());\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"alter table\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n String string0 = SQLUtil.normalize(\"SELECT * FROM \", true);\n assertEquals(\"SELECT * FROM\", string0);\n }", "public void testOneTableSyn() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName FROM AD_Table t WHERE t.IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Table=t|0]\", fixture.toString());\n }", "@Test\n public void testIsNullCriteria2() throws Exception {\n String sql = \"Select a From db.g Where a IS NOT 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 criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, IsNullCriteria.ID);\n verifyElementSymbol(criteriaNode, IsNullCriteria.EXPRESSION_REF_NAME, \"a\");\n verifyProperty(criteriaNode, IsNullCriteria.NEGATED_PROP_NAME, true);\n \n verifySql(\"SELECT a FROM db.g WHERE a IS NOT NULL\", fileNode);\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n SimpleResultSet simpleResultSet0 = new SimpleResultSet();\n Object[] objectArray0 = DBUtil.nextLine(simpleResultSet0);\n assertNull(objectArray0);\n }", "public boolean querySql(String sql){\r\n boolean result = true;\r\n try{\r\n stm = con.createStatement();\r\n rss = stm.executeQuery(sql);\r\n }catch(SQLException e){\r\n report = e.toString();\r\n result = false;\r\n }\r\n return result;\r\n }" ]
[ "0.68037534", "0.67230105", "0.64900357", "0.64719266", "0.6318567", "0.62459046", "0.6212365", "0.62092", "0.6146724", "0.606677", "0.5985946", "0.59711003", "0.5960162", "0.5924944", "0.5863629", "0.58438987", "0.58093286", "0.5787639", "0.57402956", "0.57229525", "0.57179236", "0.57063794", "0.57006556", "0.566704", "0.5639938", "0.5630623", "0.56300646", "0.562319", "0.56193215", "0.56151164", "0.56084377", "0.5575031", "0.5568448", "0.5561936", "0.5551094", "0.55450153", "0.553253", "0.5527711", "0.55216956", "0.5520007", "0.5508431", "0.5507766", "0.5502814", "0.549722", "0.54960084", "0.54322135", "0.54264694", "0.5404755", "0.53969383", "0.53887236", "0.5382885", "0.5373858", "0.53713995", "0.53679323", "0.53669363", "0.53616774", "0.53544873", "0.53420186", "0.5333495", "0.53307045", "0.53305745", "0.53286195", "0.5327871", "0.53221965", "0.53053397", "0.53052765", "0.5304558", "0.53031", "0.5302606", "0.529748", "0.52875733", "0.52706563", "0.52614444", "0.5261116", "0.5256815", "0.5250926", "0.52490836", "0.5245099", "0.5244264", "0.524261", "0.5229245", "0.5191733", "0.5186887", "0.5172885", "0.5166751", "0.5165849", "0.51614714", "0.5160655", "0.5159473", "0.5158826", "0.5152103", "0.5147501", "0.51394564", "0.5135146", "0.51318645", "0.51312226", "0.5125361", "0.512532", "0.5108979", "0.51046765" ]
0.7568643
0
/ test a single source construct
@Test public void testSingleSourceConstruct() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); execute("/tests/basic/query_singleSource02.rq", "/tests/basic/query_singleSource02.ttl", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testIsTest() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"7\";\n\t\tString file = \"test/dank.java\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"java\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}", "boolean isSource();", "boolean hasSource();", "@Test\n\tpublic void testIsSrcNoTestFile() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"4\";\n\t\tString file = \"test/dank.tt\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"tt\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}", "@Test\n\tpublic void testIsSourceNoNothingAddedOrRemoved() {\n\t\t// Setup\n\t\tString added = \"-\";\n\t\tString removed = \"-\";\n\t\tString file = \"dank.tt\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"tt\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}", "public boolean isSource();", "@Test\n\tpublic void testIsTestCaseSensitive() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"7\";\n\t\tString file = \"Test/dank.java\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"java\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}", "@Test\n public void sourceTest() {\n // TODO: test source\n }", "@Test\n public void sourceTest() {\n // TODO: test source\n }", "private CanonizeSource() {}", "@Test\n public void testGetSrc() {\n System.out.println(\"getSrc\");\n VM instance = null;\n String expResult = \"\";\n String result = instance.getSrc();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void testSingleSourceSelect() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query_singleSource01.rq\", \"/tests/basic/query_singleSource01.srx\", false);\n\t}", "private void createSource(String sourceName, String content) {\n\t\t\n\t}", "public T caseSource(Source object)\n {\n return null;\n }", "java.lang.String getSource();", "java.lang.String getSource();", "public void testSourceName() {\n\t\tassertEquals(\"boolean\", this.compiler.getSourceName(boolean.class));\n\t\tassertEquals(\"java.lang.Integer\", this.compiler.getSourceName(Integer.class));\n\t\tassertEquals(\"java.sql.Connection\", this.compiler.getSourceName(Connection.class));\n\t\tassertEquals(\"char[]\", this.compiler.getSourceName(char[].class));\n\t\tassertEquals(\"java.lang.String[]\", this.compiler.getSourceName(String[].class));\n\t}", "String getSource();", "public boolean compile(String source) {\n\t return compile(source, true);\n\t}", "public void setSource (String source);", "public abstract Source getSource();", "public boolean compile(String name, String source) {\n\t return compile(source);\n\t}", "public abstract String getSource();", "@Test\n\tpublic void testBooleanTrueSingleSource() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query03.rq\", \"/tests/basic/query03.srx\", false);\n\t}", "public interface Source {\n /** NewTextSource creates a new Source from the input text string. */\n static Source newTextSource(String text) {\n return newStringSource(text, \"<input>\");\n }\n\n /** NewStringSource creates a new Source from the given contents and description. */\n static Source newStringSource(String contents, String description) {\n // Compute line offsets up front as they are referred to frequently.\n IntArrayList offsets = new IntArrayList();\n for (int i = 0; i <= contents.length(); ) {\n if (i > 0) {\n // don't add '0' for the first line, it's implicit\n offsets.add(i);\n }\n int nl = contents.indexOf('\\n', i);\n if (nl == -1) {\n offsets.add(contents.length() + 1);\n break;\n } else {\n i = nl + 1;\n }\n }\n\n return new SourceImpl(contents, description, offsets);\n }\n\n /** NewInfoSource creates a new Source from a SourceInfo. */\n static Source newInfoSource(SourceInfo info) {\n return new SourceImpl(\n \"\", info.getLocation(), info.getLineOffsetsList(), info.getPositionsMap());\n }\n\n /**\n * Content returns the source content represented as a string. Examples contents are the single\n * file contents, textbox field, or url parameter.\n */\n String content();\n\n /**\n * Description gives a brief description of the source. Example descriptions are a file name or ui\n * element.\n */\n String description();\n\n /**\n * LineOffsets gives the character offsets at which lines occur. The zero-th entry should refer to\n * the break between the first and second line, or EOF if there is only one line of source.\n */\n List<Integer> lineOffsets();\n\n /**\n * LocationOffset translates a Location to an offset. Given the line and column of the Location\n * returns the Location's character offset in the Source, and a bool indicating whether the\n * Location was found.\n */\n int locationOffset(Location location);\n\n /**\n * OffsetLocation translates a character offset to a Location, or false if the conversion was not\n * feasible.\n */\n Location offsetLocation(int offset);\n\n /**\n * NewLocation takes an input line and column and produces a Location. The default behavior is to\n * treat the line and column as absolute, but concrete derivations may use this method to convert\n * a relative line and column position into an absolute location.\n */\n Location newLocation(int line, int col);\n\n /** Snippet returns a line of content and whether the line was found. */\n String snippet(int line);\n}", "public void setSource(String source);", "void Parse(Source source);", "String getSourceString();", "public boolean isSource() {\r\n \t\treturn source;\r\n \t}", "public void setSource(String source) {\r\n this.source = source;\r\n }", "public void setSource(String source) {\n this.source = source;\n }", "public void setSource(String source) {\n this.source = source;\n }", "boolean hasSourceFile();", "boolean hasSrc();", "T from(Source source);", "@Test (expected = IllegalArgumentException.class)\n public void testExceptionWhenSettingSource() {\n jobEntry.setSourceObject(null);\n\n }", "Source getSrc();", "private void prepare(Source s) {\r\n source = s;\r\n input = source.rawText();\r\n ok = true;\r\n start = in = out = marked = lookahead = 0;\r\n failures = new TreeSet<>();\r\n output = new StringBuffer();\r\n outCount = 0;\r\n }", "public void setSource(String source) {\n _source = source;\n }", "public void validateSource() {\n\t\t// Set the mode to recording\n\t\tmode = RECORD;\n\t\t// Traverse the source and record the architectures structure\n\t\tinspect();\n\t\t// Set the mode to validation\n\t\tmode = VALIDATE;\n\t\t// Traverses the\n\t\tinspect();\n\t\t// System.out.println(tree);\n\t\t// Report the source files that are missing\n\t\tArrayList<TagNode> tags = tree.getAllUnvisited();\n\t\treportMissing(tags);\n\t}", "boolean hasVarSrc();", "private Source() {\n throw new AssertionError(\"This class should not be instantiated.\");\n }", "@ParameterizedTest\n @MethodSource(value = \"sourceString\") // Method should return Stream compatible\n public void methSource_String(String param1){\n System.out.println(\"param1 = \" + param1);\n }", "public void testNewSeqNewNamedSrc() throws Exception\n {\n String accid = \"NOGOOD\";\n MSRawAttributes raw = new MSRawAttributes();\n raw.setLibraryName(\"name5\");\n raw.setCellLine(\"HeLa\");\n raw.setGender(\"Male\");\n raw.setOrganism(\"mouse, laboratory\");\n MolecularSource ms =\n msProcessor.processNewSeqSrc(accid, raw);\n assertTrue(ms.getMSKey().intValue() > 0); // a new key was created\n // cleanup new record\n sqlMgr.executeUpdate(\n \"delete prb_source where _source_key = \" + ms.getMSKey()\n );\n }", "public abstract T getSource();", "State getSource();", "public static boolean hasSource (ITextUnit textUnit) {\r\n \t\treturn !isEmpty(textUnit, true);\r\n \t}", "public void initialize(String source);", "MafSource readSource(File sourceFile);", "@Override\n public void checkSourcesParameter(PubDTO pub) throws PubHandlerAssemblyException {\n\n }", "@Override\n public void checkSourcesParameter(PubDTO pub) throws PubHandlerAssemblyException {\n\n }", "public boolean isSource()\n\t{\n\t\treturn isSource;\n\t}", "protected void sequence_Source(ISerializationContext context, Source semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, SiddhiPackage.eINSTANCE.getSource_StrId()) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SiddhiPackage.eINSTANCE.getSource_StrId()));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getSourceAccess().getStrIdSource1IdNewParserRuleCall_0_1(), semanticObject.eGet(SiddhiPackage.eINSTANCE.getSource_StrId(), false));\n\t\tfeeder.finish();\n\t}", "@Test\n\tpublic void testGetSourceDifference() {\n\t\t\n\t\t// Setup\n\t\tString added = \"1\";\n\t\tString removed = \"1\";\n\t\tLine line = new Line(added, removed, \"dank.java\");\n\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"java\");\n\t\t\n\t\t// Exercise\n\t\tint diff = line.getSourceDifference(types);\n\n\t\t// Verify\n\t\tassertEquals(2, diff);\n\n\t\tint test = line.getTestDiff(types);\n\t\tassertEquals(0, test);\n\t}", "Type getSource();", "@Test\n public void when_SourceHasInvalidFormat_Then_ThrowException() {\n //then\n assertThrows(IllegalArgumentException.class, () -> {\n //when\n underTest.read(\"FhFXVE,,,\");\n });\n }", "public void testExistingSeqWithChangedSrc() throws Exception\n {\n Integer C30 = this.cellLineLookup.lookup(\"C30\");\n String sql = \"select * from prb_source where _source_key \" +\n \"= -40 and _cellLine_key = \" + C30.toString();\n ResultsNavigator nav = sqlMgr.executeQuery(sql);\n assertTrue(!nav.next()); // assure no records found\n String accid = \"T00313\";\n MSRawAttributes raw = new MSRawAttributes();\n raw.setOrganism(\"mouse, laboratory\");\n raw.setCellLine(\"C30\");\n Integer seqKey = new Integer(-200);\n msProcessor.processExistingSeqSrc(accid, seqKey, null, raw);\n nav = sqlMgr.executeQuery(sql);\n assertTrue(nav.next()); // assure a record was found\n }", "@Test\n\tpublic void sourcesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(A);\n\t\tvertices.add(B);\n\t\tedge_0.addVertices(vertices);\n\t\tgraph.addEdge(edge_0);\n\t\tassertTrue(graph.sources(B).keySet().contains(A));\n\t\tassertTrue(graph.sources(B).get(A) == 1);\n\t}", "public SourceFile getSourceFile() throws InvalidFormatException;", "WfExecutionObject source (SharkTransaction t) throws BaseException, SourceNotAvailable;", "private void validateSource(SourcePointer.FileSource src) {\n File f = src.path.toFile();\n if (!f.exists() || !f.canRead()) {\n throw new SolrException(\n ErrorCode.BAD_REQUEST,\n String.format(\n Locale.US, \"File at %s either does not exist or cannot be read.\", src.path));\n }\n }", "private boolean isSourceDirectory(Project project, String sourceDirectory) {\r\n\t\tboolean result=false;\r\n\t\tif(sourceDirectory!=null&&(!sourceDirectory.equals(\"gen\"))){\r\n\t\t\tresult=true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public abstract void buildStartSource(OutputStream out, SourceObjectDeclared o) throws IOException;", "@Override\n\tpublic Object visitSource_StringLiteral(Source_StringLiteral source_StringLiteral, Object arg) throws Exception {\n\t\tmv.visitLdcInsn(source_StringLiteral.fileOrUrl);\n\t\treturn null;\n\t}", "public void testSingleVar() { assertValid(\"int a;\"); }", "@Test\n public void testSetSrc() {\n System.out.println(\"setSrc\");\n String src = \"\";\n VM instance = null;\n instance.setSrc(src);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public abstract Object getSource();", "protected boolean isSourceElement() {\n\t\treturn false;\n\t}", "@Test\n public void when_SourceIsNull_Then_ThrowException() {\n //then\n assertThrows(\"The CSV row is mandatory for the software data extraction.\", NullPointerException.class, () -> {\n //when\n underTest.read(null);\n });\n }", "Variable getSourceVariable();", "public void parseListSources(String source) {\r\n\t\t// Gets a scanner from the source\r\n\t\tInputStream in = new ByteArrayInputStream(source.getBytes());\r\n\t\t_assertedFacs = new HashSet<String>();\r\n\t\tScanner scan = new Scanner(in);\r\n\t\tString file = null;\r\n\t\tString line = null;\r\n\t\tboolean isFile = false;\r\n\t\tboolean isAsserted = false;\r\n\t\tint initLine = -1;\r\n\t\tint endLine = -1;\r\n\t\t\r\n\t\t// Puts the wait cursor\r\n\t\tAcideDataViewReplaceWindow.getInstance().setCursor(\r\n\t\t\t\tCursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\t\t\t\t\t\r\n\t\t// reads the line and chechks that is not a end nor an error\r\n\t\twhile (scan.hasNextLine()\r\n\t\t\t\t&& !(line = scan.nextLine()).replaceAll(\" \", \"\").equals(\r\n\t\t\t\t\t\t\"$error\") && !line.replaceAll(\" \", \"\").equals(\"$eot\")) {\r\n\t\t\t// checks if the next lines corresponds to a file\r\n\t\t\tif (line.replaceAll(\" \", \"\").equals(\"$file\")) {\r\n\t\t\t\tisAsserted = false;\r\n\t\t\t\tisFile = true;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t// checks if the next lines corresponds to an asserted predicate\r\n\t\t\tif (line.replaceAll(\" \", \"\").equals(\"$asserted\")) {\r\n\t\t\t\tisAsserted = true;\r\n\t\t\t\tisFile = false;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (isAsserted) {\r\n\t\t\t\t_assertedFacs.add(this._query);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (isFile) {\r\n\t\t\t\t// checks if the line is a number of line or the file path\r\n\t\t\t\tif (line.replaceAll(\" \", \"\").matches(\"(\\\\d)+\")) {\r\n\t\t\t\t\t// gets the initial and the end line and adds the lines to\r\n\t\t\t\t\t// the highlight\r\n\t\t\t\t\tif (initLine == -1)\r\n\t\t\t\t\t\tinitLine = Integer.parseInt(line.replaceAll(\" \", \"\"));\r\n\t\t\t\t\telse if (endLine == -1) {\r\n\t\t\t\t\t\tendLine = Integer.parseInt(line.replaceAll(\" \", \"\"));\r\n\t\t\t\t\t\tfor (int i = initLine - 1; i < endLine; i++)\r\n\t\t\t\t\t\t\taddLine(file, i);\r\n\t\t\t\t\t\tinitLine = -1;\r\n\t\t\t\t\t\tendLine = -1;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfile = line.substring(line.indexOf(\"'\") + 1,\r\n\t\t\t\t\t\t\tline.lastIndexOf(\"'\"));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Puts the default cursor\r\n\t\tAcideDataViewReplaceWindow.getInstance().setCursor(\r\n\t\t\tCursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\t\t\t\t\t\r\n\t\tscan.close();\r\n\t}", "private boolean parseSomeSetup(InputSource source)\n throws SAXException, IOException, IllegalAccessException,\n java.lang.reflect.InvocationTargetException,\n java.lang.InstantiationException\n {\n if(fConfigSetInput!=null)\n {\n // Obtain input from SAX inputSource object, construct XNI version of\n // that object. Logic adapted from Xerces2.\n Object[] parms1={source.getPublicId(),source.getSystemId(),null};\n Object xmlsource=fConfigInputSourceCtor.newInstance(parms1);\n Object[] parmsa={source.getByteStream()};\n fConfigSetByteStream.invoke(xmlsource,parmsa);\n parmsa[0]=source.getCharacterStream();\n fConfigSetCharStream.invoke(xmlsource,parmsa);\n parmsa[0]=source.getEncoding();\n fConfigSetEncoding.invoke(xmlsource,parmsa);\n\n // Bugzilla5272 patch suggested by Sandy Gao.\n // Has to be reflection to run with Xerces2\n // after compilation against Xerces1. or vice\n // versa, due to return type mismatches.\n Object[] noparms=new Object[0];\n fReset.invoke(fIncrementalParser,noparms);\n\n parmsa[0]=xmlsource;\n fConfigSetInput.invoke(fPullParserConfig,parmsa);\n\n // %REVIEW% Do first pull. Should we instead just return true?\n return parseSome();\n }\n else\n {\n Object[] parm={source};\n Object ret=fParseSomeSetup.invoke(fIncrementalParser,parm);\n return ((Boolean)ret).booleanValue();\n }\n }", "private static Instruction getSRCFromRegister(Instruction instruction)\n\t{\n\t\tRegisgerName_Value<String, Integer> src1 = instruction.getSrc1();\n\t\tRegisgerName_Value<String, Integer> src2 = instruction.getSrc2();\n\t\tRegisgerName_Value<String, Integer> destination = instruction.getDestination();\n\t\tboolean isSrc1Valid = true, isSrc2Valid = true, isDestValid = true;\n\t\tboolean isBalValid = true;\n\n\t\tif (src1 != null)\n\t\t{\n\t\t\tisSrc1Valid = checkFlowDependencies(src1, \"E\");\n\t\t\tinstruction.setSrc1(readRegister(src1));\n\t\t}\n\t\tif (src2 != null)\n\t\t{\n\t\t\tisSrc2Valid = checkFlowDependencies(src2, \"E\");\n\t\t\tinstruction.setSrc2(readRegister(src2));\n\t\t}\n\t\tif (instruction.getOperation().equals(TypesOfOperations.BAL))\n\t\t{\n\t\t\tisBalValid = checkFlowDependencies(destination, \"E\");\n\t\t\tinstruction.setDestination(-1);\n\t\t}\n\t\tif (instruction.getOperation().equals(TypesOfOperations.STORE))\n\t\t{\n\t\t\tisDestValid = checkFlowDependencies(destination, \"E\") && checkFlowDependencies(destination, \"E2\")\n\t\t\t\t\t&& checkFlowDependencies(destination, \"M\");\n\t\t\tif (!isDestValid)\n\t\t\t{\n\t\t\t\tisDestValid = true;\n\t\t\t\tinstruction.setDestination(-1);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tinstruction.setDestination(readRegister(destination));\n\t\t\t}\n\t\t\tisValidSource = isSrc1Valid && isSrc2Valid && isDestValid;\n\t\t\treturn instruction;\n\t\t}\n\t\tisValidSource = isSrc1Valid && isSrc2Valid && isBalValid;\n\t\treturn instruction;\n\t}", "public void setSource(String Source) {\r\n this.Source = Source;\r\n }", "@ParameterizedTest\n @NullAndEmptySource\n @ValueSource(strings = {CONST_STRING1, CONST_STRING2, \"This is three!\"}) // If variables used must be constants\n public void anotherParamTest(String params) {\n if (params == null || params.equals(\"\")) {\n System.out.println(\"Empty or null param: \" + params);\n } else {\n System.out.println(\"And this: \" + params);\n }\n }", "@Test\n public void testGetSourceCode() {\n assertThat(warning.getSourceCode()).isEqualTo(sourceCode);\n }", "WfExecutionObject source () throws BaseException, SourceNotAvailable;", "@Test\n public void when_SourceHasValidFormat_Then_ReturnSoftwareInformation() {\n //when\n final var actualSoftware = underTest.read(\"3C3CFFER4ET929645,FhFXVE\");\n //then\n final var expectedSoftwareFullPath = format(TEST_CASES_BASE_PATH, \"when-source-is-valid-format/expected-software.json\");\n final var expectedSoftware = fileToBean(expectedSoftwareFullPath, VehicleSoftware.class);\n assertEquals(expectedSoftware, actualSoftware);\n }", "public void testNewSeqNewSrc() throws Exception\n {\n String accid = \"NOGOOD\";\n MSRawAttributes raw = new MSRawAttributes();\n raw.setOrganism(\"mouse, laboratory\");\n raw.setGender(\"Male\");\n raw.setCellLine(\"HeLa\");\n MolecularSource ms =\n msProcessor.processNewSeqSrc(accid, raw);\n assertTrue(ms.getMSKey().intValue() > 0); // a new key was created\n // cleanup new record\n sqlMgr.executeUpdate(\n \"delete prb_source where _source_key = \" + ms.getMSKey()\n );\n }", "java.lang.String getSrc();", "DelegateCaseExecution getSourceExecution();", "@Test\n\tpublic void testSingleSource_SetBinding() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\t\t\tTupleQueryResult tqr = tq.evaluate();\n\t\t\tList<BindingSet> res = Iterations.asList(tqr);\n\t\t\tassertContainsAll(res, \"person\", Sets.newHashSet(iri(\"http://example.org/\", \"a\")));\n\n\t\t\t// CONSTRUCT query\n\t\t\tGraphQuery gq = conn.prepareGraphQuery(\n\t\t\t\t\t\"CONSTRUCT { ?person <http://xmlns.com/foaf/0.1/name> ?name } WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name }\");\n\t\t\tgq.setBinding(\"name\", l(\"Alan\"));\n\t\t\tGraphQueryResult gqr = gq.evaluate();\n\t\t\tList<Statement> stmts = Iterations.asList(gqr);\n\t\t\tAssertions.assertEquals(1, stmts.size());\n\t\t\tAssertions.assertEquals(iri(\"http://example.org/\", \"a\"), stmts.get(0).getSubject());\n\n\t\t\t// BOOLEAN query\n\t\t\tBooleanQuery bq = conn.prepareBooleanQuery(\"ASK { ?person <http://xmlns.com/foaf/0.1/name> ?name }\");\n\t\t\tbq.setBinding(\"name\", l(\"non-existing-name\"));\n\t\t\tAssertions.assertEquals(false, bq.evaluate());\n\n\t\t}\n\n\t}", "@Before\n public void setUp() {\n source = SParser.parse(\"public class MainClass\\n{\\n \"\n + \"public static void main( String args[] )\\n \"\n + \"{ \\n GradeBook myGradeBook = new GradeBook();\"\n + \" \\n\\n String courseName = \\\"Java \\\";\\n \"\n + \" myGradeBook.displayMessage( courseName );\\n \"\n + \" }\\n\\n}\\npublic class Foo{ public boolean bar(){\"\n + \" super.foo(); return false;}}\");\n }", "public String getSource();", "public void setSource(Source s)\n\t{\n\t\tsource = s;\n\t}", "void test() {\n @Source(CAMERA) @Sink(INTERNET) byte @Source(CAMERA) @Sink(INTERNET) [] invariant = notCompleted;\n\n // This line used to issue an error but was fixed when transitioning to better type variables\n // check version history for more information if this line is failing\n flowCompleted = notCompleted;\n\n @Source(CAMERA) @Sink({FILESYSTEM, INTERNET}) byte @Source(CAMERA) @Sink({FILESYSTEM, INTERNET})[] a = null;\n @Source(CAMERA) @Sink({INTERNET, FILESYSTEM}) byte @Source(CAMERA) @Sink({FILESYSTEM, INTERNET})[] b = a;\n\n @Source(CAMERA) @Sink({INTERNET, FILESYSTEM}) byte @Source(CAMERA) @Sink({FILESYSTEM, INTERNET})[] aCorrect = null;\n @Source(CAMERA) @Sink({INTERNET, FILESYSTEM}) byte @Source(CAMERA) @Sink({FILESYSTEM, INTERNET})[] bCorrect = aCorrect;\n }", "private void passOne() {\r\n\t\t// clearDoc(docListing);\r\n\r\n\t\tint lineNumber;\r\n\t\tString sourceLine;\r\n\t\t// LineParser lineParser = new LineParser();\r\n\t\tSourceLineAnalyzer lineAnalyzer = new SourceLineAnalyzer();\r\n\t\tSourceLineParts sourceLineParts;\r\n\t\tScanner scannerPassOne = new Scanner(tpSource.getText());\r\n\t\twhile (scannerPassOne.hasNextLine()) {\r\n\t\t\tsourceLine = scannerPassOne.nextLine();\r\n\t\t\tif (sourceLine.equals(EMPTY_STRING)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} // if skip textbox's empty lines\r\n\r\n\t\t\tsourceLineParts = lineAnalyzer.analyze(sourceLine);\r\n\r\n\t\t\tif (!sourceLineParts.isLineActive()) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} // if skip textbox's empty lines\r\n\r\n\t\t\tlineNumber = sourceLineParts.getLineNumber();\r\n\t\t\tallLineParts.add(sourceLineParts);\r\n\r\n\t\t\tif (sourceLineParts.hasLabel()) {\r\n\t\t\t\tprocessLabel(sourceLineParts, lineNumber);\r\n\t\t\t} // if - has label\r\n\r\n\t\t\tif (sourceLineParts.hasInstruction()) {\r\n\t\t\t\tinstructionCounter.incrementCurrentLocation(sourceLineParts.getOpCodeSize());\r\n\t\t\t} // if instruction\r\n\r\n\t\t\tif (sourceLineParts.hasDirective()) {\r\n\t\t\t\tprocessDirectiveForLineCounter(sourceLineParts, lineNumber);\r\n\t\t\t} // if directives\r\n\r\n\t\t\tif (sourceLineParts.hasName()) {\r\n\t\t\t\tprocessSymbol(sourceLineParts, lineNumber);\r\n\t\t\t} // if has symbol\r\n\r\n\t\t\t// displayStuff(lineParser);\r\n\t\t} // while\r\n\t\tSymbolTable.passOneDone();\r\n\t\tscannerPassOne.close();\r\n\t}", "public void testNewSeqNamedSrc() throws Exception\n {\n String accid = null;\n MSRawAttributes raw = new MSRawAttributes();\n raw.setLibraryName(\"name1\");\n raw.setOrganism(\"mouse, laboratory\");\n MolecularSource ms =\n msProcessor.processNewSeqSrc(accid, raw);\n assertEquals(new Integer(-20), ms.getMSKey());\n }", "private void assertSyntax(String snippet) {\n try {\n Lexer lexer = new Lexer(new StringReader(snippet));\n Parser parser = new Parser(lexer);\n RootNode node = parser.program();\n assertNotNull(node);\n } catch (IOException e) {\n fail(e.getMessage());\n }\n }", "public String run(Source source) {\r\n if (grammar == null) {\r\n System.err.println(\"Error: No grammar has been set up\");\r\n System.exit(1);\r\n }\r\n prepare(source);\r\n return runParser();\r\n }", "boolean hasSourceId();", "public void testInvalid() {\n\t\tassertNotNull(\"Should have compiler available (for testing to be available)\", this.compiler);\n\t}", "public String source(String src)\n\t{\n\t\tint i;\n\t\tString [] toks = src.split(\"\\\\s+\");\n\t\tString ret = toks[sourceStart];\n\t\tfor (i = sourceStart + 1; i < sourceEnd; i++) {\n\t\t\tret += \" \" + toks[i];\n\t\t}\n\t\treturn ret;\n\t}", "public T caseOperationCallWithSourceExpCS(OperationCallWithSourceExpCS object) {\r\n return null;\r\n }", "public boolean isSetSource() {\n return this.source != null;\n }", "public boolean isSetSource() {\n return this.source != null;\n }", "@Test\n\tpublic void testisValidNoNotAJavaFile() {\n\t\t// Setup\n\t\tString added = \"3\";\n\t\tString removed = \"5\";\n\t\tLine line = new Line(added, removed, \"dank.tt\");\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"java\");\n\n\t\t// Exercise\n\t\tboolean valid = line.isValid(types);\n\n\t\t// Verify\n\t\tassertFalse(valid);\n\t}", "static int type_of_stc(String passed){\n\t\treturn 1;\n\t}", "public String getSource ();", "private boolean isSourceType(String extension) {\n return srcFileName.toLowerCase().endsWith(extension);\n }" ]
[ "0.7105081", "0.70949817", "0.6831885", "0.6819918", "0.67846113", "0.6658244", "0.66075134", "0.65139985", "0.65139985", "0.63094413", "0.6200962", "0.6158805", "0.6137487", "0.613363", "0.6108936", "0.6108936", "0.60259324", "0.59775865", "0.5975786", "0.5965052", "0.5946524", "0.5926671", "0.5910246", "0.58989555", "0.58814263", "0.5877168", "0.5854329", "0.58536404", "0.5852914", "0.58392566", "0.58175695", "0.58175695", "0.5774519", "0.57292897", "0.5716746", "0.5703039", "0.5697751", "0.569216", "0.56495315", "0.56474376", "0.5638", "0.56178063", "0.5612388", "0.56019485", "0.55792415", "0.55765617", "0.5573897", "0.5573789", "0.55682415", "0.5566064", "0.5566064", "0.5559421", "0.5553018", "0.5536271", "0.5514276", "0.5513832", "0.55084103", "0.55019224", "0.5495893", "0.5494635", "0.54943997", "0.5489151", "0.548129", "0.54656404", "0.5463016", "0.5462525", "0.5455009", "0.5437496", "0.5423724", "0.54199636", "0.54130507", "0.5410444", "0.54049873", "0.5397383", "0.53963363", "0.53933173", "0.5384911", "0.5381286", "0.5375882", "0.5374706", "0.53682506", "0.5362879", "0.5359722", "0.53483087", "0.5333995", "0.53257966", "0.5318866", "0.53077286", "0.53072536", "0.52983695", "0.5292317", "0.5287668", "0.52773184", "0.52762824", "0.52758884", "0.52758884", "0.52745897", "0.5271838", "0.5271684", "0.5266923" ]
0.6859314
2
/ test query with values clause
@Test public void testValuesClause() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); execute("/tests/basic/query_values.rq", "/tests/basic/query_values.srx", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test void testInterpretProjectFilterValues() {\n final String sql = \"select y, x\\n\"\n + \"from (values (1, 'a'), (2, 'b'), (3, 'c')) as t(x, y)\\n\"\n + \"where x > 1\";\n sql(sql).returnsRows(\"[b, 2]\", \"[c, 3]\");\n }", "static DbQuery createValueQuery() {\n DbQuery query = new DbQuery();\n query.order = OrderBy.VALUE;\n return query;\n }", "@Test\n public void testNamedParamWithImmediateValue() {\n List<Long> ids = Arrays.asList(10L, 5L);\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1, ids);\n\n validate(\" from Person hobj1 where hobj1.id in (:np1)\", ids);\n }", "@Test(expected=IllegalArgumentException.class)\n public void testNamedParamValueTypeValidation() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1);\n query.named().setValue(NAMED_PARAM_1, \"Astring\");\n }", "long findValues(List<Object> values, List<Column> columns);", "@Test\n public void testWhere_withValidQuery() {\n String column0 = \"user_id\";\n String column1 = \"age\";\n int idValue0 = 0;\n int ageValue0 = 23;\n int idValue1 = 1;\n int ageValue1 = 22;\n int idValue2 = 2;\n int ageValue2 = 18;\n\n try {\n String sql = \"CREATE TABLE ModelExtension (\" +\n column0 + \" int, \" +\n column1 + \" int)\";\n PreparedStatement pstmt = Setup.getConnection().prepareStatement(sql);\n pstmt.execute();\n sql = \"INSERT INTO ModelExtension (\" +\n column0 + \", \" +\n column1 + \") VALUES (\" +\n idValue0 + \", \" +\n ageValue0 + \"), (\" +\n idValue1 + \", \" +\n ageValue1 + \"), (\" +\n idValue2 + \", \" +\n ageValue2 + \")\";\n pstmt = Setup.getConnection().prepareStatement(sql);\n pstmt.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n assertTrue(false);\n }\n\n List<ModelExtension> models = child.findAll().where(column1 + \">20\").execute(ModelExtension.class);\n\n assertEquals(2, models.size());\n assertEquals(idValue0, models.get(0).get(column0));\n assertEquals(ageValue0, models.get(0).get(column1));\n assertEquals(idValue1, models.get(1).get(column0));\n assertEquals(ageValue1, models.get(1).get(column1));\n }", "@Test\n public void testSqlExistsMultiValuedWithForeignRestriction() {\n Query<Garage> garagesQuery = existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME,\n equal(Car.FEATURES, \"convertible\")\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain garage2\", results.contains(garage2));\n assertTrue(\"results should contain garage5\", results.contains(garage5));\n }", "Condition in(QueryParameter parameter, Object... values);", "@Test\n public void testFromValue() {\n System.out.println(\"fromValue\");\n String[] values = {\"deleted\"};\n StatusType[] expResults = {StatusType.DELETED};\n for (int index1 = 0; index1 < values.length; index1++) {\n StatusType result = StatusType.fromValue(values[index1]);\n assertEquals(expResults[index1], result);\n }\n }", "public void testRawQuery() {\n Random random = new Random();\n ContentValues values1 = makeServiceStateValues(random, mBaseDb);\n final long row1 = mBaseDb.insert(TBL_SERVICE_STATE, null, values1);\n ContentValues values2 = makeServiceStateValues(random, mBaseDb);\n final long row2 = mBaseDb.insert(TBL_SERVICE_STATE, null, values2);\n\n // query tuple\n ServiceStateTable table = new ServiceStateTable();\n String sql = \"SELECT * FROM \" + TBL_SERVICE_STATE + \" WHERE \" + COL_ID + \" = ?\";\n String[] selectionArgs = { String.valueOf(row1) };\n List<ServiceStateTuple> tuples = table.rawQuery(mTestContext, sql, selectionArgs);\n\n // verify values\n assertNotNull(tuples);\n // klocwork\n if (tuples == null) return;\n assertFalse(tuples.isEmpty());\n assertEquals(1, tuples.size());\n ServiceStateTuple tuple = tuples.get(0);\n assertValuesTuple(row1, values1, tuple);\n }", "@Test\n public void testNamedParamValueInCollectionTypeValidationPassesWhenCorrect() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1);\n query.named().setValue(NAMED_PARAM_1, Arrays.asList(10d, 20d));\n }", "@Test\n public void testSqlExistsMultiValuedNoForeignRestriction() {\n Query<Garage> garagesQuery = not(\n existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME\n )\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 1 result\", 1, results.size());\n assertTrue(\"results should contain garage6\", results.contains(garage6));\n }", "private String bindData(Array value, ArrayList params) {\n String op;\n \n if (operator == null) {\n op = null;\n } else if (operator.equals(\"=\")) {\n op = \"IN\";\n } else if (operator.equals(\"!=\")) {\n op = \"NOT IN\";\n } else {\n op = operator;\n }\n if (value.size() <= 0) {\n return bindNull();\n } else {\n return cond(column, op, literal(value));\n }\n }", "Values values();", "@Test(expected=IllegalArgumentException.class)\n public void testNamedValueMustExistValidation() {\n query.named().setValue(NAMED_PARAM_1, Collections.singletonList(10D));\n }", "public void testQuery() {\n Random random = new Random();\n ContentValues values = makeServiceStateValues(random, mBaseDb);\n final long rowId = mBaseDb.insert(TBL_SERVICE_STATE, null, values);\n\n // query tuple\n ServiceStateTable table = new ServiceStateTable();\n List<ServiceStateTuple> tuples = table.query(mTestContext, null, null, null, null,\n null, null, null);\n\n // verify values\n assertNotNull(tuples);\n // klocwork\n if (tuples == null) return;\n assertFalse(tuples.isEmpty());\n assertEquals(1, tuples.size());\n ServiceStateTuple tuple = tuples.get(0);\n assertValuesTuple(rowId, values, tuple);\n }", "Builder values(Map<Path<?>, TypedExpression<?>> values);", "@Test(expected=IllegalArgumentException.class)\n public void testNamedParamValueInCollectionTypeValidation() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1);\n query.named().setValue(NAMED_PARAM_1, Arrays.asList(10d, \"Moo\"));\n }", "@Test(expected=IllegalArgumentException.class)\n public void testNamedValueNotDuplicateValidation() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).eq().named(NAMED_PARAM_1);\n query.where(personProxy.getName()).eq().named(NAMED_PARAM_1);\n }", "@Test\r\n\tpublic void testValues(){\n\t\tEntityType[] values = EntityType.values();\r\n\t\tassertNotNull(values);\r\n\t}", "@Test(expected=IllegalArgumentException.class)\n public void testNamedParamCollectionNotAllowedForSingleValuesValidation() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).eq().named(NAMED_PARAM_1);\n query.named().setValue(NAMED_PARAM_1, Collections.singletonList(10D));\n }", "@Test\n public void createSqlQueryWithWhereSucceed()\n {\n // arrange\n // act\n QuerySpecification querySpecification = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).where(\"validWhere\").createSqlQuery();\n\n // assert\n Helpers.assertJson(querySpecification.toJson(), \"{\\\"query\\\":\\\"select * from enrollments where validWhere\\\"}\");\n }", "static public void validateCursor(ContentValues expectedValues, Cursor valueCursor)\n {\n Set<Map.Entry<String,Object>> valueSet = expectedValues.valueSet();\n\n for(Map.Entry<String, Object> entry : valueSet)\n {\n String columnName = entry.getKey();\n int idx = valueCursor.getColumnIndex(columnName);\n assertFalse( -1 == idx );\n String expectedValue = entry.getValue().toString();\n assertEquals(expectedValue, valueCursor.getString(idx));\n }\n\n }", "private void verifyAllValues(AllValues allValues, int offset) {\n\t\tfor (int i = offset; i < allValues.size(); i++) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\tassertTrue(\"OneValue at index \" + i + \" should be of type OneResult\", allValues.get(i) instanceof OneResult);\n\t\t\t\tassertEquals(\"Value at index \" + i + \" should be equal to \" + i, i, allValues.get(i).getValue());\n\t\t\t} else {\n\t\t\t\tassertTrue(\"OneValue at index \" + i + \" should be of type OneReject\", allValues.get(i) instanceof OneReject);\n\t\t\t\tassertTrue(\"Value at index \" + i + \" should be of type IndexedRuntimeException\", allValues.get(i).getValue() instanceof IndexedRuntimeException);\n\t\t\t}\n\t\t}\n\t}", "public void setValQuery (String valQuery) {\n this.valQuery = valQuery;\n }", "ValueDeclaration values( Predicate<? super ValueAssembly> specification );", "@Test\n public void testDAM31201001() {\n // In this test case the where clause is specified in a common sql shared in multiple queries.\n testDAM30505001();\n }", "@SuppressWarnings(\"rawtypes\")\n\t@Test\n\tpublic void retrieveArrays() {\n\t\tObjectSet result = db.queryByExample(new double[] { 0.6, 0.4 });\n\t\tlistResult(result);\n\n\t\t// Important note QBE does not work well with arrays\n\t\tassertEquals(0, result.size());\n\n\t}", "@Test\n public void whereStoreSucceed()\n {\n // arrange\n final String whereClause = \"validWhere\";\n // act\n QuerySpecificationBuilder querySpecificationBuilder = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).where(whereClause);\n\n // assert\n assertEquals(whereClause, Deencapsulation.getField(querySpecificationBuilder, \"where\"));\n }", "@Override\r\n\tpublic boolean evaluate(Object value, int column) throws SQLException {\n\t\treturn false;\r\n\t}", "@Test\n public void testValues() {\n System.out.println(\"values\");\n ChannelType[] expResult = null;\n ChannelType[] result = ChannelType.values();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetValue ()\n {\n System.out.println (\"getValue\");\n QueryDatas instance = new QueryDatas (\"nom\", \"value\");\n String expResult = \"value\";\n String result = instance.getValue ();\n Assert.assertEquals (expResult, result);\n\n }", "Condition equal(QueryParameter parameter, Object value);", "@Test\n public void testValues() {\n System.out.println(\"values\");\n StatusType[] result = StatusType.values();\n assertEquals(result.length, 1);\n }", "public ResultSet query(String cql, Object ... values) {\n\t\tLog.v(LOG_TAG, \" Query: \" + cql);\n\t\tList<Object> cqlSafeValues = this.getCqlSafeValues(values);\n\t\ttry {\t\t\t\n\t\t\tPreparedStatement prepared = this.getSession().prepare(cql);\n\t\t\tBoundStatement boundStatement = new BoundStatement(prepared);\n\t\t\tResultSet results;\n\t\t\tif (cqlSafeValues.size() > 0) {\n\t\t\t\tresults = this.getSession().execute(boundStatement.bind(cqlSafeValues.toArray()));\n\t\t\t} else {\n\t\t\t\tresults = this.getSession().execute(boundStatement);\n\t\t\t}\n\t\t\treturn results;\n\t\t} catch (Exception e) {\n\t\t\tLog.e(LOG_TAG, e);\n\t\t\tthrow new DatastoreServiceException(e);\t\t\t\n\t\t}\t\t\n\t}", "@Test\n public void testGetValues(){\n assertTrue(vector.x == 1 && vector.z == 1);\n }", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "@Test\n public void testBetween1() throws Exception {\n String sql = \"SELECT a from db.g where a BETWEEN 1000 AND 2000\";\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 criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, BetweenCriteria.ID);\n verifyElementSymbol(criteriaNode, BetweenCriteria.EXPRESSION_REF_NAME, \"a\");\n verifyConstant(criteriaNode, BetweenCriteria.LOWER_EXPRESSION_REF_NAME, 1000);\n verifyConstant(criteriaNode, BetweenCriteria.UPPER_EXPRESSION_REF_NAME, 2000);\n \n verifySql(\"SELECT a FROM db.g WHERE a BETWEEN 1000 AND 2000\", fileNode);\n }", "@Test\n\tpublic void testFunctionBySQL() {\n\t\tString sql = \"{? = call FUNC_RETURN_NUM(?)}\";\n\t\tString[] paramTypeNames = { \"NUMERIC\", \"NUMERIC\" };\n\t\tString[] bindings = { \"OUT\", \"IN\" };\n\t\tString[] names = { \"outVal\", \"inVal\" };\n\n\t\tMap<String, Integer> inVal = new HashMap<String, Integer>();\n\t\tinVal.put(\"inVal\", new Integer(2));\n\t\tMap<String, Object> results = queryService.executeBySQL(sql,\n\t\t\t\tparamTypeNames, names, bindings, inVal);\n\n\t\tAssert.assertEquals(\"{outVal=1}\", results.toString());\n\t}", "@Test void testInterpretOrder() {\n final String sql = \"select y\\n\"\n + \"from (values (1, 'a'), (2, 'b'), (3, 'c')) as t(x, y)\\n\"\n + \"order by -x\";\n sql(sql).withProject(true).returnsRows(\"[c]\", \"[b]\", \"[a]\");\n }", "@Test\n public void createSqlQueryWithWhereAndGroupBySucceed()\n {\n // arrange\n // act\n QuerySpecification querySpecification = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).where(\"validWhere\").groupBy(\"validGroupBy\").createSqlQuery();\n\n // assert\n Helpers.assertJson(querySpecification.toJson(), \"{\\\"query\\\":\\\"select * from enrollments where validWhere group by validGroupBy\\\"}\");\n }", "public T values(final Object... values) {\r\n\t\treturn op(ConditionValueType.VALUE, values);\r\n\t}", "private void select(String tableName, String colName, String value,\n boolean usePar) {\n String query;\n \n if (usePar == true){\n // Parenthesis will surrond the value making it a string\n query = \"SELECT * FROM \" + tableName + \" WHERE \" + colName + \" = \\'\" + value + \"\\'\";\n }\n else{\n // Parenthesis will not surround the value\n query = \"SELECT * FROM \" + tableName + \" WHERE \" + colName + \" = \" + value;\n }\n \n this.executeSelect(query);\n }", "@Test\n public void testValue() {\n System.out.println(\"value\");\n String[] expResults = {\"deleted\"};\n StatusType[] verbTypes = {StatusType.DELETED};\n for (int index1 = 0; index1 < verbTypes.length; index1++) {\n String result = verbTypes[index1].value();\n assertEquals(expResults[index1], result);\n }\n }", "private static void assertTimeseriesResultValue(String msg, Result expected, Result actual)\n {\n Assert.assertEquals(StringUtils.format(\"%s: timestamp\", msg), expected.getTimestamp(), actual.getTimestamp());\n\n TimeseriesResultValue expectedVal = (TimeseriesResultValue) expected.getValue();\n TimeseriesResultValue actualVal = (TimeseriesResultValue) actual.getValue();\n\n final Map<String, Object> expectedMap = expectedVal.getBaseObject();\n final Map<String, Object> actualMap = actualVal.getBaseObject();\n\n assertRow(\n msg,\n new MapBasedRow(expected.getTimestamp(), expectedMap),\n new MapBasedRow(actual.getTimestamp(), actualMap)\n );\n }", "Values createValues();", "@Test\n public void testParamsInInformationSchema()\n {\n testQuery(\n \"SELECT\\n\"\n + \" COUNT(JDBC_TYPE),\\n\"\n + \" SUM(JDBC_TYPE),\\n\"\n + \" AVG(JDBC_TYPE),\\n\"\n + \" MIN(JDBC_TYPE),\\n\"\n + \" MAX(JDBC_TYPE)\\n\"\n + \"FROM INFORMATION_SCHEMA.COLUMNS\\n\"\n + \"WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ?\",\n ImmutableList.of(),\n ImmutableList.of(\n new Object[]{8L, 1249L, 156L, -5L, 1111L}\n ),\n ImmutableList.of(\n new SqlParameter(SqlType.VARCHAR, \"druid\"),\n new SqlParameter(SqlType.VARCHAR, \"foo\")\n )\n );\n }", "@Test\n\tpublic void db_query_scale() throws Exception\n\t{\n\t\tTemplate t = T(\"<?for row in db.query('select 0.5 as x from dual')?><?print row.x > 0?><?end for?>\");\n\n\t\tConnection db = getDatabaseConnection();\n\n\t\tif (db != null)\n\t\t\tcheckOutput(\"True\", t, V(\"db\", db));\n\t}", "private void createTwoValueSet()\n\t{\n\t\tm_mockery.checking(new Expectations()\n\t\t{\n\t\t\t{\n\t\t\t\tallowing(m_values).getItemCount();\n\t\t\t\twill(returnValue(2));\n\t\t\t\t\n\t\t\t\t// Keys.\n\t\t\t\tallowing(m_values).getKey(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getKey(1);\n\t\t\t\twill(returnValue(1));\n\t\t\t\t\n\t\t\t\tallowing(m_values).getIndex(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getIndex(1);\n\t\t\t\twill(returnValue(1));\n\t\t\t\t\n\t\t\t\tallowing(m_values).getKeys();\n\t\t\t\twill(returnValue(new ArrayList<Integer>() {{ add(0); add(1); }}));\n\t\t\t\t\n\t\t\t\t// Values.\n\t\t\t\tallowing(m_values).getValue(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getValue(1);\n\t\t\t\twill(returnValue(3));\n\t\t\t}\n\t\t});\n\t}", "@SuppressWarnings(\"unused\")\n\t\tprivate String querySingleValue(String query, String field){\n\t\t\treturn field;\n\n\t\t/*\tJdbcTemplate jdt = new JdbcTemplate(getDataSource());\n\t \tList queryList;\n\t \tString result = \"\";\n\n\t \t queryList = jdt.queryForList(query);\n\t \t Iterator i = queryList.iterator();\n\t \t i = queryList.iterator();\n\t \t if (i.hasNext()) {\n\t\t\t\t ListOrderedMap data = (ListOrderedMap) i.next();\n\t\t\t\t if (data.get(field) == null){\n\t\t\t\t } else {\n\t\t\t\t\t result = data.get(field).toString();\n\t\t\t\t }\n\t \t }\n\t \t return result;*/\n\t\t}", "@Test\n @IncludeIn(POSTGRESQL)\n public void array() {\n Expression<Integer[]> expr = Expressions.template(Integer[].class, \"'{1,2,3}'::int[]\");\n Integer[] result = firstResult(expr);\n Assert.assertEquals(3, result.length);\n Assert.assertEquals(1, result[0].intValue());\n Assert.assertEquals(2, result[1].intValue());\n Assert.assertEquals(3, result[2].intValue());\n }", "@Test\n public void testSetCriteria0() throws Exception {\n String sql = \"SELECT a FROM db.g WHERE b IN (1000,5000)\";\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 criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, SetCriteria.ID);\n verifyElementSymbol(criteriaNode, AbstractSetCriteria.EXPRESSION_REF_NAME, \"b\");\n verifyConstant(criteriaNode, SetCriteria.VALUES_REF_NAME, 1, 1000);\n verifyConstant(criteriaNode, SetCriteria.VALUES_REF_NAME, 2, 5000);\n\n verifySql(\"SELECT a FROM db.g WHERE b IN (1000, 5000)\", fileNode);\n }", "@Test\n public void testValues() {\n System.out.println(\"values\");\n ReviewState[] expResult = {ReviewState.PENDING, ReviewState.FINISHED};\n ReviewState[] result = ReviewState.values();\n assertTrue(Arrays.equals(expResult, result));\n }", "@Test\n public void testSelectTrimFamilyWithParameters()\n {\n\n testQuery(\n \"SELECT\\n\"\n + \"TRIM(BOTH ? FROM ?),\\n\"\n + \"TRIM(TRAILING ? FROM ?),\\n\"\n + \"TRIM(? FROM ?),\\n\"\n + \"TRIM(TRAILING FROM ?),\\n\"\n + \"TRIM(?),\\n\"\n + \"BTRIM(?),\\n\"\n + \"BTRIM(?, ?),\\n\"\n + \"LTRIM(?),\\n\"\n + \"LTRIM(?, ?),\\n\"\n + \"RTRIM(?),\\n\"\n + \"RTRIM(?, ?),\\n\"\n + \"COUNT(*)\\n\"\n + \"FROM foo\",\n ImmutableList.of(\n Druids.newTimeseriesQueryBuilder()\n .dataSource(CalciteTests.DATASOURCE1)\n .intervals(querySegmentSpec(Filtration.eternity()))\n .granularity(Granularities.ALL)\n .aggregators(aggregators(new CountAggregatorFactory(\"a0\")))\n .postAggregators(\n expressionPostAgg(\"p0\", \"'foo'\"),\n expressionPostAgg(\"p1\", \"'xfoo'\"),\n expressionPostAgg(\"p2\", \"'foo'\"),\n expressionPostAgg(\"p3\", \"' foo'\"),\n expressionPostAgg(\"p4\", \"'foo'\"),\n expressionPostAgg(\"p5\", \"'foo'\"),\n expressionPostAgg(\"p6\", \"'foo'\"),\n expressionPostAgg(\"p7\", \"'foo '\"),\n expressionPostAgg(\"p8\", \"'foox'\"),\n expressionPostAgg(\"p9\", \"' foo'\"),\n expressionPostAgg(\"p10\", \"'xfoo'\")\n )\n .context(QUERY_CONTEXT_DEFAULT)\n .build()\n ),\n ImmutableList.of(\n new Object[]{\"foo\", \"xfoo\", \"foo\", \" foo\", \"foo\", \"foo\", \"foo\", \"foo \", \"foox\", \" foo\", \"xfoo\", 6L}\n ),\n ImmutableList.of(\n new SqlParameter(SqlType.VARCHAR, \"x\"),\n new SqlParameter(SqlType.VARCHAR, \"xfoox\"),\n new SqlParameter(SqlType.VARCHAR, \"x\"),\n new SqlParameter(SqlType.VARCHAR, \"xfoox\"),\n new SqlParameter(SqlType.VARCHAR, \" \"),\n new SqlParameter(SqlType.VARCHAR, \" foo \"),\n new SqlParameter(SqlType.VARCHAR, \" foo \"),\n new SqlParameter(SqlType.VARCHAR, \" foo \"),\n new SqlParameter(SqlType.VARCHAR, \" foo \"),\n new SqlParameter(SqlType.VARCHAR, \"xfoox\"),\n new SqlParameter(SqlType.VARCHAR, \"x\"),\n new SqlParameter(SqlType.VARCHAR, \" foo \"),\n new SqlParameter(SqlType.VARCHAR, \"xfoox\"),\n new SqlParameter(SqlType.VARCHAR, \"x\"),\n new SqlParameter(SqlType.VARCHAR, \" foo \"),\n new SqlParameter(SqlType.VARCHAR, \"xfoox\"),\n new SqlParameter(SqlType.VARCHAR, \"x\")\n )\n );\n }", "@Test\n\tpublic void testQuery1() {\n\t}", "FromValuesColumns createFromValuesColumns();", "@Test\n public void testGetValuesByResult() throws Exception {\n map.set(\"key-1\", \"value-1\", 10);\n map.set(\"key-2\", \"value-2\", 10);\n map.set(\"key-3\", \"value-3\", 10);\n \n List<TpMapResult> results = map.getValuesByResult(Arrays.asList(\"key-1\", \"key-2\", \"key-3\"));\n {\n TpMapResult result = results.get(0);\n Assert.assertEquals(result.getKey(), MemcachedMap.DEFAULT_ROOT_KEY_PREFIX + TpMap.KEY_SEPARATOR + \"key-1\");\n Assert.assertEquals(result.getValue(), \"value-1\");\n }\n {\n TpMapResult result = results.get(1);\n Assert.assertEquals(result.getKey(), MemcachedMap.DEFAULT_ROOT_KEY_PREFIX + TpMap.KEY_SEPARATOR + \"key-2\");\n Assert.assertEquals(result.getValue(), \"value-2\");\n }\n {\n TpMapResult result = results.get(2);\n Assert.assertEquals(result.getKey(), MemcachedMap.DEFAULT_ROOT_KEY_PREFIX + TpMap.KEY_SEPARATOR + \"key-3\");\n Assert.assertEquals(result.getValue(), \"value-3\");\n }\n }", "@Test public void term_value_01() {\n RDF_Term rt = testTermValue(\"123\") ;\n assertEquals(rt.getTermCase(), TermCase.VALINTEGER);\n assertEquals(123, rt.getValInteger()) ;\n }", "RowValues createRowValues();", "@Test\r\n\tpublic void testValuesMatchObjecType(){\r\n\t\t// Make sure we can get all of the values\r\n\t\tEntityType[] values = EntityType.values();\r\n\t\tassertNotNull(values);\r\n\t\tassertEquals(\"Expected one EntityType for each EntityType\",EntityType.values().length,values.length);\r\n\t}", "@Test\n public void testValueOf() {\n System.out.println(\"valueOf\");\n String[] values = {\"DELETED\"};\n StatusType[] expResults = {StatusType. DELETED};\n for (int index1 = 0; index1 < values.length; index1++) {\n StatusType result = StatusType.valueOf(values[index1].toUpperCase());\n assertEquals(expResults[index1], result);\n }\n }", "boolean isValue();", "@Test\n public void testSqlExistsWithForeignRestriction() {\n Query<Car> carsQuery = and(\n in(Car.FEATURES, \"sunroof\", \"convertible\"),\n existsIn(garages,\n Car.NAME,\n Garage.BRANDS_SERVICED,\n equal(Garage.LOCATION, \"Dublin\")\n )\n );\n\n Set<Car> results = asSet(cars.retrieve(carsQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain car1\", results.contains(car1));\n assertTrue(\"results should contain car4\", results.contains(car4));\n }", "@Test\n public void testValueGetter() {\n final List<ConfigDocument> docs = Arrays.asList(new ConfigDocument(DS_1), new ConfigDocument(DS_2), new ConfigDocument(DS_3), new ConfigDocument(RANDOM));\n final ConfigSearchResult<?> result = new ConfigSearchResult<>(docs);\n assertEquals(result.getValues(), Arrays.asList(DS_1, DS_2, DS_3, RANDOM));\n }", "public FilterByValueResponse filterByValue(String tableName, String viewName, boolean isString, double value, String valueStr, String columnName, Map<String, String> options) throws GPUdbException {\n FilterByValueRequest actualRequest_ = new FilterByValueRequest(tableName, viewName, isString, value, valueStr, columnName, options);\n FilterByValueResponse actualResponse_ = new FilterByValueResponse();\n submitRequest(\"/filter/byvalue\", actualRequest_, actualResponse_, false);\n return actualResponse_;\n }", "List<ReportPair> getParameterValues(String hsql);", "private List<Map<String, String>> getValues(String select, String where,\n\t String tableName, String uri) throws MediatorException {\n\t// prepare query; replace relevant object name with the uri\n\tString newQuery = where;\n\tnewQuery = newQuery.replaceAll(\"\\\\?o_\" + tableName + \" \", \"<\" + uri\n\t\t+ \"> \");\n\t// System.out.println(\"newq=\" + newQuery);\n\n\treturn JenaUtil.executeQueryExtractValues(model, select + newQuery);\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionContext\");\n String[] stringArray0 = new String[4];\n String string0 = SQLUtil.renderQuery(defaultDBTable0, stringArray0, stringArray0);\n assertEquals(\"SELECT * FROM org.apache.derby.iapi.sql.execute.ExecutionContext WHERE null = null AND null = null AND null = null AND null = null\", string0);\n }", "public abstract Value validateValue(Value value);", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "public List<?> queryByCriteria(List<String> fields, List<Object> values,\n List<String> operands) throws DataAccessLayerException {\n return queryByCriteria(fields, values, operands, null, null, false);\n }", "@Test\n public void testOmittedValues() {\n TupleMetadata schema = new SchemaBuilder()\n .add(\"id\", MinorType.INT)\n .addMapArray(\"m\")\n .addNullable(\"a\", MinorType.INT)\n .addNullable(\"b\", MinorType.VARCHAR)\n .resumeSchema()\n .buildSchema();\n ResultSetLoaderImpl.ResultSetOptions options = new ResultSetOptionBuilder()\n .readerSchema(schema)\n .rowCountLimit(ValueVector.MAX_ROW_COUNT)\n .build();\n ResultSetLoader rsLoader = new ResultSetLoaderImpl(fixture.allocator(), options);\n RowSetLoader rootWriter = rsLoader.writer();\n\n int mapSkip = 5;\n int entrySkip = 3;\n int rowCount = 1000;\n int entryCount = 10;\n\n rsLoader.startBatch();\n ArrayWriter maWriter = rootWriter.array(\"m\");\n TupleWriter mWriter = maWriter.tuple();\n for (int i = 0; i < rowCount; i++) {\n rootWriter.start();\n rootWriter.scalar(0).setInt(i);\n if (i % mapSkip != 0) {\n for (int j = 0; j < entryCount; j++) {\n if (j % entrySkip != 0) {\n mWriter.scalar(0).setInt(i * entryCount + j);\n mWriter.scalar(1).setString(\"b-\" + i + \".\" + j);\n }\n maWriter.save();\n }\n }\n rootWriter.save();\n }\n\n RowSet result = fixture.wrap(rsLoader.harvest());\n assertEquals(rowCount, result.rowCount());\n RowSetReader reader = result.reader();\n ArrayReader maReader = reader.array(\"m\");\n TupleReader mReader = maReader.tuple();\n for (int i = 0; i < rowCount; i++) {\n assertTrue(reader.next());\n assertEquals(i, reader.scalar(0).getInt());\n if (i % mapSkip == 0) {\n assertEquals(0, maReader.size());\n continue;\n }\n assertEquals(entryCount, maReader.size());\n for (int j = 0; j < entryCount; j++) {\n assertTrue(maReader.next());\n if (j % entrySkip == 0) {\n assertTrue(mReader.scalar(0).isNull());\n assertTrue(mReader.scalar(1).isNull());\n } else {\n assertFalse(mReader.scalar(0).isNull());\n assertFalse(mReader.scalar(1).isNull());\n assertEquals(i * entryCount + j, mReader.scalar(0).getInt());\n assertEquals(\"b-\" + i + \".\" + j, mReader.scalar(1).getString());\n }\n }\n }\n result.clear();\n rsLoader.close();\n }", "private List<Map<String, String>> getValues(Rule rule, String tableName,\n\t String uri) throws MediatorException {\n\t// execute each query and accumulate the values\n\t// we could have more than one query if we have a relationship table\n\t// t(var1, var2)\n\t// where D2R generates var1 tableName var2 (tableName is the property)\n\t// OR var2 tableName var1\n\tString select = getSelect(rule);\n\tList<String> where = getWhere(rule);\n\tList<Map<String, String>> rowValues = new ArrayList<Map<String, String>>();\n\tfor (int q = 0; q < where.size(); q++) {\n\t rowValues.addAll(getValues(select, where.get(q), tableName, uri));\n\t}\n\treturn rowValues;\n }", "private void testRow( QuerySet aQuerySet, String aZone ) {\n Assert.assertEquals( \"zone\", aZone, aQuerySet.getString( \"zone\" ) );\n }", "public void testProductInstanceAttributeQuery() {\n\n String\tsql\t= \"SELECT p.M_Product_ID, p.Discontinued, p.Value, p.Name, BOM_Qty_Available(p.M_Product_ID,?) AS QtyAvailable, bomQtyList(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceList, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceStd, BOM_Qty_OnHand(p.M_Product_ID,?) AS QtyOnHand, BOM_Qty_Reserved(p.M_Product_ID,?) AS QtyReserved, BOM_Qty_Ordered(p.M_Product_ID,?) AS QtyOrdered, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID)-bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS Margin, bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceLimit, pa.IsInstanceAttribute FROM M_Product p INNER JOIN M_ProductPrice pr ON (p.M_Product_ID=pr.M_Product_ID) LEFT OUTER JOIN M_AttributeSet pa ON (p.M_AttributeSet_ID=pa.M_AttributeSet_ID) WHERE p.IsSummary='N' AND p.IsActive='Y' AND pr.IsActive='Y' AND pr.M_PriceList_Version_ID=? AND EXISTS (SELECT * FROM M_Storage s INNER JOIN M_AttributeSetInstance asi ON (s.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) WHERE s.M_Product_ID=p.M_Product_ID AND asi.SerNo LIKE '33' AND asi.Lot LIKE '33' AND asi.M_Lot_ID=101 AND TRUNC(asi.GuaranteeDate)<TO_DATE('2003-10-16','YYYY-MM-DD') AND asi.M_AttributeSetInstance_ID IN (SELECT M_AttributeSetInstance_ID FROM M_AttributeInstance WHERE (M_Attribute_ID=103 AND Value LIKE '33') AND (M_Attribute_ID=102 AND M_AttributeValue_ID=106))) AND p.M_AttributeSetInstance_ID IN (SELECT M_AttributeSetInstance_ID FROM M_AttributeInstance WHERE (M_Attribute_ID=101 AND M_AttributeValue_ID=105) AND (M_Attribute_ID=100 AND M_AttributeValue_ID=102)) AND p.AD_Client_ID IN(0,11) AND p.AD_Org_ID IN(0,11,12) ORDER BY QtyAvailable DESC, Margin DESC\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[M_AttributeInstance|M_Storage=s,M_AttributeSetInstance=asi|M_AttributeInstance|M_Product=p,M_ProductPrice=pr,M_AttributeSet=pa|3]\", fixture.toString());\n }", "@Override\n\t\tpublic String toSQL() {\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tsb.append(fieldName).append(\" IN (\");\n\t\t\tboolean first=true;\n\t\t\tfor(Object o :values) {\n\t\t\t\tif(first) {\n\t\t\t\t\tfirst=false;\n\t\t\t\t}else {\n\t\t\t\t\tsb.append(\",\");\n\t\t\t\t}\n\t\t\t\tsb.append(toSql(o));\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\treturn sb.toString() ;\n\t\t}", "@Test(expectedExceptions = OpenGammaRuntimeException.class)\n public void testGetSingleValueMultipleValues() {\n new ConfigSearchResult<>(CONFIGS).getSingleValue();\n }", "private void createFiveValueSet()\n\t{\n\t\tm_mockery.checking(new Expectations()\n\t\t{\n\t\t\t{\n\t\t\t\tallowing(m_values).getItemCount();\n\t\t\t\twill(returnValue(5));\n\t\t\t\t\n\t\t\t\t// Keys.\n\t\t\t\tallowing(m_values).getKey(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getKey(1);\n\t\t\t\twill(returnValue(1));\n\t\t\t\tallowing(m_values).getKey(2);\n\t\t\t\twill(returnValue(2));\n\t\t\t\tallowing(m_values).getKey(3);\n\t\t\t\twill(returnValue(3));\n\t\t\t\tallowing(m_values).getKey(4);\n\t\t\t\twill(returnValue(4));\n\t\t\t\t\n\t\t\t\tallowing(m_values).getIndex(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getIndex(1);\n\t\t\t\twill(returnValue(1));\n\t\t\t\tallowing(m_values).getIndex(2);\n\t\t\t\twill(returnValue(2));\n\t\t\t\tallowing(m_values).getIndex(3);\n\t\t\t\twill(returnValue(3));\n\t\t\t\tallowing(m_values).getIndex(4);\n\t\t\t\twill(returnValue(4));\n\t\t\t\t\n\t\t\t\tallowing(m_values).getKeys();\n\t\t\t\twill(returnValue(new ArrayList<Integer>() {\n\t\t\t\t\t{\n\t\t\t\t\t\tadd(0);\n\t\t\t\t\t\tadd(1);\n\t\t\t\t\t\tadd(2);\n\t\t\t\t\t\tadd(3);\n\t\t\t\t\t\tadd(4);\n\t\t\t\t\t}}));\n\t\t\t\t\n\t\t\t\t// Values.\n\t\t\t\tallowing(m_values).getValue(0);\n\t\t\t\twill(returnValue(1.1));\n\t\t\t\tallowing(m_values).getValue(1);\n\t\t\t\twill(returnValue(2));\n\t\t\t\tallowing(m_values).getValue(2);\n\t\t\t\twill(returnValue(3.14));\n\t\t\t\tallowing(m_values).getValue(3);\n\t\t\t\twill(returnValue(4));\n\t\t\t\tallowing(m_values).getValue(4);\n\t\t\t\twill(returnValue(5));\n\t\t\t}\n\t\t});\n\t}", "public PaypalIpn[] findWhereValsEquals(String vals) throws PaypalIpnDaoException\r\n\t{\r\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE vals = ? ORDER BY vals\", new Object[] { vals } );\r\n\t}", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test\n public void testColumnFlatValueFieldExpression() {\n final KijiRowExpression kijiRowExpression =\n new KijiRowExpression(\"family:qual0[0].value\", TypeInfos.COLUMN_FLAT_VALUE);\n\n // Test that the KijiDataRequest was constructed correctly\n final KijiDataRequest kijiDataRequest = kijiRowExpression.getDataRequest();\n assertEquals(1, kijiDataRequest.getColumns().size());\n assertNotNull(kijiDataRequest.getColumn(\"family\", \"qual0\"));\n for (KijiDataRequest.Column column : kijiDataRequest.getColumns()) {\n assertTrue(column.getColumnName().isFullyQualified());\n assertEquals(1,\n kijiDataRequest.getColumn(column.getFamily(), column.getQualifier())\n .getMaxVersions());\n }\n }", "public List<?> queryByCriteria(List<String> fields, List<Object> values)\n throws DataAccessLayerException {\n return queryByCriteria(fields, values, null, null, null, false);\n }", "@Test\n public void checkDataValue() {\n\n manager.getAllExpense(new DatabaseCallback() {\n @Override\n public void onDataLoaded(List<ExpenseEntity> lists) {\n assertEquals(lists.size(),2);\n }\n\n @Override\n public void onAdded() {\n\n }\n\n @Override\n public void onQueryAll() {\n\n }\n });\n\n }", "@Test\n public void twoColumns_and_projection() {\n for (Tuple row : query().from(Constants.survey).select(Constants.survey.id, Constants.survey.name, new QIdName(Constants.survey.id, Constants.survey.name)).fetch()) {\n Assert.assertEquals(3, row.size());\n Assert.assertEquals(Integer.class, row.get(0, Object.class).getClass());\n Assert.assertEquals(String.class, row.get(1, Object.class).getClass());\n Assert.assertEquals(IdName.class, row.get(2, Object.class).getClass());\n }\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM null WHERE delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete'\");\n assertTrue(boolean0);\n }", "@Override\n List<Value> values();", "@Test public void testEmptyColumnValues() {\n String data[] = {\n \"1,2,3,foo\\n\"\n + \"4,5,6,bar\\n\"\n + \"7,,8,\\n\"\n + \",9,10\\n\"\n + \"11,,,\\n\"\n + \"0,0,0,z\\n\"\n + \"0,0,0,z\\n\"\n + \"0,0,0,z\\n\"\n + \"0,0,0,z\\n\"\n + \"0,0,0,z\\n\"\n };\n double[][] expDouble = new double[][] {\n ard(1, 2, 3, 1),\n ard(4, 5, 6, 0),\n ard(7, NaN, 8, NaN),\n ard(NaN, 9, 10, NaN),\n ard(11, NaN, NaN, NaN),\n ard(0, 0, 0, 2),\n ard(0, 0, 0, 2),\n ard(0, 0, 0, 2),\n ard(0, 0, 0, 2),\n ard(0, 0, 0, 2),\n };\n\n final char separator = ',';\n\n String[] dataset = getDataForSeparator(separator, data);\n Key key = FVecFactory.makeByteVec(dataset);\n Key r = Key.make();\n ParseDataset.parse(r, key);\n Frame fr = DKV.get(r).get();\n String[] cd = fr.vecs()[3].domain();\n Assert.assertEquals(\"bar\",cd[0]);\n Assert.assertEquals(\"foo\",cd[1]);\n testParsed(r, expDouble);\n }", "public IterableAssertion<V> toValues() {\n checkActualIsNotNull();\n return initializeAssertion(Raw.<V>iterableAssertion(), getActual().values(), Messages.Check.VALUES);\n }", "public String getValQuery () {\n return valQuery;\n }", "@Test\n\tpublic void testGetValuesValidInput() throws ClassNotFoundException,\n\t\t\tInvocationTargetException, IllegalAccessException,\n\t\t\tIllegalArgumentException, NoSuchMethodException, SecurityException {\n\t\tMethod getValues = setToAccess(\"getValues\", String.class,\n\t\t\t\tTimestamp.class, Timestamp.class, int.class, Decimation.class);\n\n\t\tTimestamp end = Timestamp.now().minus(TimeDuration.ofSeconds(5));\n\t\tTimestamp start = end.minus(TimeDuration.ofSeconds(5));\n\n\t\tString request;\n\t\tValueIterator valIt;\n\t\tfor (Decimation dec : Decimation.values()) {\n\t\t\tfor (int coordinate : new int[] { 0, 1 }) {\n\t\t\t\trequest = translate(start, end, 4, dec);\n\t\t\t\tvalIt = (ValueIterator) getValues.invoke(faadr, request, start,\n\t\t\t\t\t\tend, coordinate, dec);\n\t\t\t\tassertNotNull(\"Fails for decimation: \" + dec + \", coordinate: \"\n\t\t\t\t\t\t+ coordinate, valIt);\n\t\t\t}\n\t\t}\n\t}", "private Object [] getFilterVals()\n throws java.sql.SQLException\n {\n Object [] ret = new Object[m_cols.length];\n\n for (int i = 0; i < m_cols.length; i++)\n {\n ret[i] = m_rs.getString((String)m_cols[i]);\n }\n return ret;\n }", "protected void test_VALUES(final Map values, final Class clazz) {\n try {\n validate(values != null);\n validate(values.size() > 0);\n validate(!values.keySet().contains(null));\n validate(!values.values().contains(null));\n Iterator iter = values.entrySet().iterator();\n while (iter.hasNext()) {\n Map.Entry entry = (Map.Entry)iter.next();\n validate(entry.getValue().getClass() == clazz);\n validate(entry.getKey() instanceof String);\n }\n }\n catch (Throwable t) {\n unexpectedThrowable(t);\n }\n }", "@Test\n\tpublic void testFind_Value_Positive() throws Exception {\n\t\t\t SET setarray= new SET( new int[]{1,2,3,4,5});\n\t\t\t assertTrue(setarray.isMember(4) );\t \n\t}", "@Test void testInterpretNullif() {\n final String sql = \"select nullif(x, 2), x\\n\"\n + \"from (values (1, 'a'), (2, 'b'), (3, 'c')) as t(x, y)\";\n sql(sql).returnsRows(\"[1, 1]\", \"[null, 2]\", \"[3, 3]\");\n }", "@Test\n public void testGetBooleanNumberTrue() throws SQLException {\n FieldSchema fieldSchema = new FieldSchema();\n fieldSchema.setType(\"int\");\n\n List<FieldSchema> fieldSchemas = Arrays.asList(fieldSchema);\n TableSchema schema = new TableSchema(fieldSchemas);\n\n HiveBaseResultSet resultSet = Mockito.mock(HiveBaseResultSet.class);\n resultSet.row = new Object[] {new Integer(3)};\n\n when(resultSet.getSchema()).thenReturn(schema);\n when(resultSet.getBoolean(1)).thenCallRealMethod();\n when(resultSet.getObject(1)).thenCallRealMethod();\n when(resultSet.wasNull()).thenCallRealMethod();\n\n Assert.assertEquals(true, resultSet.getBoolean(1));\n Assert.assertFalse(resultSet.wasNull());\n }", "@SuppressWarnings(\"unchecked\")\r\n private QueryTracker queryAnswer(List<PlatformMetadata> testData)\r\n {\r\n SimpleQuery<PlatformMetadata> query = (SimpleQuery<PlatformMetadata>)EasyMock.getCurrentArguments()[0];\r\n\r\n DataModelCategory expected = new DataModelCategory(ourServer, Constants.PLATFORM_METADATA_FAMILY, ourTypeKey);\r\n assertEquals(expected, query.getDataModelCategory());\r\n assertEquals(Constants.PLATFORM_METADATA_DESCRIPTOR, query.getPropertyValueReceivers().get(0).getPropertyDescriptor());\r\n\r\n List<? extends PropertyMatcher<?>> matchers = query.getParameters();\r\n\r\n assertEquals(2, matchers.size());\r\n\r\n NumberPropertyMatcher<Long> lte = (NumberPropertyMatcher<Long>)matchers.get(0);\r\n NumberPropertyMatcher<Long> gte = (NumberPropertyMatcher<Long>)matchers.get(1);\r\n\r\n assertEquals(Constants.METADATA_TIMESTAMP_PROPERTY_DESCRIPTOR, lte.getPropertyDescriptor());\r\n assertEquals(OperatorType.LTE, lte.getOperator());\r\n assertEquals(myQueryTime, lte.getOperand().longValue());\r\n\r\n assertEquals(Constants.METADATA_TIMESTAMP_PROPERTY_DESCRIPTOR, gte.getPropertyDescriptor());\r\n assertEquals(OperatorType.GTE, gte.getOperator());\r\n assertEquals(myQueryTime - 1000, gte.getOperand().longValue());\r\n\r\n ((PropertyValueReceiver<PlatformMetadata>)query.getPropertyValueReceivers().get(0)).receive(testData);\r\n\r\n return null;\r\n }", "io.dstore.values.BooleanValue getOnlyProceduresInAnyValues();", "public Query createQuery(String hql, Object... values) {\n Assert.hasText(hql);\n Query query = getSession().createQuery(hql);\n for (int i = 0; i < values.length; i++) {\n query.setParameter(i, values[i]);\n }\n return query;\n }", "PropertyValue<?, ?>[] values();", "boolean hasParameterValue();" ]
[ "0.7053392", "0.6494128", "0.61403286", "0.59875166", "0.59160507", "0.57403964", "0.57061344", "0.567578", "0.5659724", "0.56574476", "0.5636022", "0.5630948", "0.5629759", "0.5602115", "0.5592835", "0.5553621", "0.55421335", "0.55278337", "0.5524121", "0.5451888", "0.54169124", "0.5407055", "0.5396472", "0.5379087", "0.53378284", "0.5337493", "0.53299695", "0.5318771", "0.53067464", "0.52633625", "0.52596974", "0.5240951", "0.52344316", "0.5234263", "0.521361", "0.5196693", "0.5185952", "0.5181626", "0.5180209", "0.5170642", "0.51637876", "0.51449466", "0.51384485", "0.51266617", "0.5125044", "0.51160854", "0.5105377", "0.5102085", "0.5089507", "0.5067465", "0.5057114", "0.50512695", "0.5050066", "0.5035155", "0.5032176", "0.5017615", "0.50160986", "0.5012855", "0.50089854", "0.50070864", "0.4995749", "0.49873197", "0.4976541", "0.49744725", "0.49740395", "0.4973957", "0.49669337", "0.4962331", "0.4961194", "0.4960275", "0.4956213", "0.4954618", "0.495381", "0.49521115", "0.49493316", "0.49454677", "0.49389404", "0.4936884", "0.4933063", "0.49273118", "0.49199846", "0.49189228", "0.4917759", "0.49158588", "0.4915585", "0.49133077", "0.49099094", "0.4900889", "0.48892322", "0.48878673", "0.48864773", "0.48838407", "0.48767027", "0.4876562", "0.48684478", "0.48576888", "0.4854098", "0.4852746", "0.4852015", "0.4851797" ]
0.7526117
0
/ test query with bind clause
@Test public void testBindClause() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); execute("/tests/basic/query_bind.rq", "/tests/basic/query_bind.srx", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BoundQuery<?,Ttuple> query(Query q,Focus<?> context)\n throws DataException;", "public String bind(Object value, ArrayList params) {\n if (value == null) {\n return bindNull();\n } else if (value instanceof String &&\n ((String) value).length() < 100) {\n \n // Use prepared statement parameters sparingly,\n // since some JDBC drivers have issues with them\n // (Oracle JDBC protocol violations for example)\n return cond(column, operator, literal((String) value));\n } else if (value instanceof Array) {\n return bindData((Array) value, params);\n } else if (value instanceof Date) {\n params.add(new java.sql.Timestamp(((Date) value).getTime()));\n return cond(column, operator, \"?\");\n } else {\n params.add(value);\n return cond(column, operator, \"?\");\n }\n }", "@Test\n public void createSqlQueryWithWhereSucceed()\n {\n // arrange\n // act\n QuerySpecification querySpecification = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).where(\"validWhere\").createSqlQuery();\n\n // assert\n Helpers.assertJson(querySpecification.toJson(), \"{\\\"query\\\":\\\"select * from enrollments where validWhere\\\"}\");\n }", "@Test\n public void testWhere_withValidQuery() {\n String column0 = \"user_id\";\n String column1 = \"age\";\n int idValue0 = 0;\n int ageValue0 = 23;\n int idValue1 = 1;\n int ageValue1 = 22;\n int idValue2 = 2;\n int ageValue2 = 18;\n\n try {\n String sql = \"CREATE TABLE ModelExtension (\" +\n column0 + \" int, \" +\n column1 + \" int)\";\n PreparedStatement pstmt = Setup.getConnection().prepareStatement(sql);\n pstmt.execute();\n sql = \"INSERT INTO ModelExtension (\" +\n column0 + \", \" +\n column1 + \") VALUES (\" +\n idValue0 + \", \" +\n ageValue0 + \"), (\" +\n idValue1 + \", \" +\n ageValue1 + \"), (\" +\n idValue2 + \", \" +\n ageValue2 + \")\";\n pstmt = Setup.getConnection().prepareStatement(sql);\n pstmt.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n assertTrue(false);\n }\n\n List<ModelExtension> models = child.findAll().where(column1 + \">20\").execute(ModelExtension.class);\n\n assertEquals(2, models.size());\n assertEquals(idValue0, models.get(0).get(column0));\n assertEquals(ageValue0, models.get(0).get(column1));\n assertEquals(idValue1, models.get(1).get(column0));\n assertEquals(ageValue1, models.get(1).get(column1));\n }", "@Test\n public void testNamedParamWithImmediateValue() {\n List<Long> ids = Arrays.asList(10L, 5L);\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1, ids);\n\n validate(\" from Person hobj1 where hobj1.id in (:np1)\", ids);\n }", "@Test\n public void whereStoreSucceed()\n {\n // arrange\n final String whereClause = \"validWhere\";\n // act\n QuerySpecificationBuilder querySpecificationBuilder = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).where(whereClause);\n\n // assert\n assertEquals(whereClause, Deencapsulation.getField(querySpecificationBuilder, \"where\"));\n }", "public void testVariableBindingFromQueryPropagatesAccrossConjunction() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), h(x), (f(X) :- g(X), h(X))], (?- f(x)), [[]]]\");\n }", "@Test\n public void testDAM31201001() {\n // In this test case the where clause is specified in a common sql shared in multiple queries.\n testDAM30505001();\n }", "public void testConjunctionInQueryVarFailsWhenBindingsDoNotMatch() throws Exception\n {\n resolveAndAssertFailure(new String[] { \"g(x)\", \"f(y)\" }, \"?- f(X), g(X)\");\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test\n\tpublic void testFunctionBySQL() {\n\t\tString sql = \"{? = call FUNC_RETURN_NUM(?)}\";\n\t\tString[] paramTypeNames = { \"NUMERIC\", \"NUMERIC\" };\n\t\tString[] bindings = { \"OUT\", \"IN\" };\n\t\tString[] names = { \"outVal\", \"inVal\" };\n\n\t\tMap<String, Integer> inVal = new HashMap<String, Integer>();\n\t\tinVal.put(\"inVal\", new Integer(2));\n\t\tMap<String, Object> results = queryService.executeBySQL(sql,\n\t\t\t\tparamTypeNames, names, bindings, inVal);\n\n\t\tAssert.assertEquals(\"{outVal=1}\", results.toString());\n\t}", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test\n\tpublic void selectFromCourseTable_where() {\n\t\tList arrayList = em.createNamedQuery(\"query_with_where_name_like_call\",Course.class).getResultList();\n\t\tlogger.info(\"\\n\\n>>>>>>> Select c FROM Course c WHERE name like '%call%' -> {}\", arrayList);\n\t}", "@Test\n\tpublic void testQuery1() {\n\t}", "@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test HQL Query with Parameter Binding with Address 02\")\n public void testHQLQueryWithParameterBindingWithAddress02()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n UuidUtilities utilities = new UuidUtilities();\n List<SBAddress02> addresses = null;\n\n try (Session session = HibernateUtil.getSessionFactory().openSession()) {\n Transaction transaction = null;\n try {\n transaction = session.beginTransaction();\n\n// Query query = session.createQuery(\"from SBAddress02 where address02Zip = '292000' or address02Zip = '2920013'\");\n// Query query = session.createQuery(\"from SBAddress02 where address02Zip = ? or address02Zip = ?\"); // No longer support\n Query query = session.createQuery(\"from SBAddress02 where address02Zip = ?1 or address02Zip = :searchParam\");\n// .setParameter(1,\"292000\")\n// .setParameter(\"searchParam\",\"2920013\");\n query.setParameter(1, \"292000\");\n query.setParameter(\"searchParam\", \"2920013\");\n\n addresses = query.list();\n\n transaction.commit();\n\n addresses.forEach(address -> System.out.println(\"Added Address : \" + address.getAddress02Street()));\n } catch (Exception e) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(e));\n e.printStackTrace();\n }\n\n } catch (Throwable throwable) {\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n System.out.println(\"Address : \" + addresses.size());\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }", "private boolean hasBindValue(Command command) {\n if (!CollectorVisitor.collectObjects(Parameter.class, command).isEmpty()) {\n return true;\n }\n for (Literal l : CollectorVisitor.collectObjects(Literal.class, command)) {\n if (isBindEligible(l)) {\n return true;\n }\n }\n return false;\n }", "boolean moznoSpustit(SqlHelper helper, String sql, Object... parametry);", "public void testConjunctionInQueryVarResolvesWhenBindingsMatch() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), f(x)], (?- f(X), g(X)), [[X <-- x]]]\");\n }", "@Test\n public void queryTest() {\n // TODO: test query\n }", "public static void testStub(){\n String qry = \"SELECT * FROM track;\";\n executeStmt(qry);\n }", "private String bindData(Array value, ArrayList params) {\n String op;\n \n if (operator == null) {\n op = null;\n } else if (operator.equals(\"=\")) {\n op = \"IN\";\n } else if (operator.equals(\"!=\")) {\n op = \"NOT IN\";\n } else {\n op = operator;\n }\n if (value.size() <= 0) {\n return bindNull();\n } else {\n return cond(column, op, literal(value));\n }\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Test\n public void testGetCantComponentsAdvancedSearch() {\n System.out.println(\"getCantComponentsAdvancedSearch\");\n String cquery = \"Componente.dummyQuery\";\n query = mock(Query.class);\n int expected = Integer.SIZE;\n when(this.em.createNamedQuery(cquery)).thenReturn(query);\n when(cDao.getCantComponentsAdvancedSearch(anyString(), (List<String>) any(), (List<String>) any(), (List<String>) any(), (Date) any(), (Date) any())).thenReturn(expected);\n int result = cDao.getCantComponentsAdvancedSearch(anyString(), (List<String>) any(), (List<String>) any(), (List<String>) any(), (Date) any(), (Date) any());\n assertThat(result, is(expected));\n }", "private void executeQuery() {\n }", "@Test\n public void testFindComponentsLikeNombre() {\n System.out.println(\"findComponentsLikeNombre\");\n query = mock(Query.class);\n String namedQuery = \"Componente.findComponentsLikeNombre\";\n List<Componente> expected = new ArrayList<>();\n when(this.em.createNamedQuery(namedQuery)).thenReturn(query);\n when(cDao.findComponentsLikeNombre(anyString(), (Usuario) any())).thenReturn(expected);\n List<Componente> result = cDao.findComponentsLikeNombre(anyString(), (Usuario) any());\n assertThat(result, is(expected));\n }", "public void testQuery() {\n mActivity.runOnUiThread(\n new Runnable() {\n public void run() {\n //TODO: Should compare this against the db results directly.\n assertEquals(sendQuery(\"SFO\"), 7);\n assertEquals(sendQuery(\"RHV\"), 1);\n assertEquals(sendQuery(\"xyzzy\"), 0);\n }\n }\n );\n }", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "@Test(expected=IllegalArgumentException.class)\n public void testNamedValueNotDuplicateValidation() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).eq().named(NAMED_PARAM_1);\n query.where(personProxy.getName()).eq().named(NAMED_PARAM_1);\n }", "@Test(expected=IllegalArgumentException.class)\n public void testNamedParamValueTypeValidation() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1);\n query.named().setValue(NAMED_PARAM_1, \"Astring\");\n }", "@Override\n\tpublic void bindParameters() {\n\n\t}", "public void testRawQuery() {\n Random random = new Random();\n ContentValues values1 = makeServiceStateValues(random, mBaseDb);\n final long row1 = mBaseDb.insert(TBL_SERVICE_STATE, null, values1);\n ContentValues values2 = makeServiceStateValues(random, mBaseDb);\n final long row2 = mBaseDb.insert(TBL_SERVICE_STATE, null, values2);\n\n // query tuple\n ServiceStateTable table = new ServiceStateTable();\n String sql = \"SELECT * FROM \" + TBL_SERVICE_STATE + \" WHERE \" + COL_ID + \" = ?\";\n String[] selectionArgs = { String.valueOf(row1) };\n List<ServiceStateTuple> tuples = table.rawQuery(mTestContext, sql, selectionArgs);\n\n // verify values\n assertNotNull(tuples);\n // klocwork\n if (tuples == null) return;\n assertFalse(tuples.isEmpty());\n assertEquals(1, tuples.size());\n ServiceStateTuple tuple = tuples.get(0);\n assertValuesTuple(row1, values1, tuple);\n }", "@Test\n public void testToStringWithSQL() throws SQLException {\n try (PreparedStatement stmt = this.proxy\n .prepareStatement(\"SELECT * FROM country WHERE lang = ? OR callingcode = ?\")) {\n stmt.setString(1, \"de\");\n stmt.setInt(2, 42);\n String sql = stmt.toString();\n assertEquals(\"SELECT * FROM country WHERE lang = 'de' OR callingcode = 42\", sql);\n LOG.info(\"sql = \\\"{}\\\"\", sql);\n }\n }", "public void testConjunctionInQueryVarNotLastFailsWhenBindingsDoNotMatch() throws Exception\n {\n resolveAndAssertFailure(new String[] { \"f(x)\", \"g(y)\" }, \"?- f(X), g(X), g(X)\");\n }", "@Test\n public void testGetAdvancedSearch() {\n System.out.println(\"getAdvancedSearch\");\n query = mock(Query.class);\n String cQuery = \"Componente.dummyQuery\";\n List<Componente> expected = new ArrayList<>();\n when(this.em.createNamedQuery(cQuery)).thenReturn(query);\n when(cDao.getAdvancedSearch(anyString(), (List<String>) any(), (List<String>) any(), (List<String>) any(), (Date) any(), (Date) any(), anyInt())).thenReturn(expected);\n List<Componente> result = cDao.getAdvancedSearch(anyString(), (List<String>) any(), (List<String>) any(), (List<String>) any(), (Date) any(), (Date) any(), anyInt());\n assertThat(result, is(expected));\n }", "private void executeSelect(String query){\n try {\n statement = connection.createStatement();\n rs = statement.executeQuery(query);\n } catch (SQLException e) {\n throw new RuntimeException(e);\n } \n }", "BoundQuery<?,Ttuple> solve(Query q,Focus<?> context)\n throws DataException;", "boolean hasQuery();", "@Test\n public void testPreparedStatementOne() throws Throwable\n {\n assertNotNull(ds);\n Connection c = ds.getConnection();\n assertNotNull(c);\n \n Statement st = c.createStatement();\n assertNotNull(st);\n \n // Create\n st.execute(\"CREATE TABLE Employees (Employee_ID INTEGER, Name VARCHAR(30));\");\n st.execute(\"INSERT INTO Employees VALUES (1, '#1')\");\n st.execute(\"INSERT INTO Employees VALUES (2, '#2')\");\n \n // Prepared statement\n PreparedStatement pstmt = c.prepareStatement(\"SELECT * FROM Employees WHERE Employee_ID = ?\");\n assertNotNull(pstmt);\n \n pstmt.setInt(1, 1);\n \n ResultSet rs = pstmt.executeQuery();\n assertNotNull(rs);\n \n assertTrue(rs.next());\n \n // Drop\n st.execute(\"DROP TABLE Employees\");\n \n rs.close();\n pstmt.close();\n st.close();\n c.close();\n }", "public interface StatementRewriter\n{\n /**\n * Munge up the SQL as desired. Responsible for figuring out ow to bind any\n * arguments in to the resultant prepared statement.\n *\n * @param sql The SQL to rewrite\n * @param params contains the arguments which have been bound to this statement.\n * @return somethign which can provde the actual SQL to prepare a statement from\n * and which can bind the correct arguments to that prepared statement\n */\n RewrittenStatement rewrite(String sql, Binding params);\n}", "boolean hasStatement();", "@Test\n public void testFindComponentsLikeNombreAprobados() {\n System.out.println(\"findComponentsLikeNombreAprobados\");\n query = mock(Query.class);\n String namedQuery = \"Componente.findComponentsLikeNombreAprobados\";\n List<Componente> expected = new ArrayList<>();\n when(this.em.createNamedQuery(namedQuery)).thenReturn(query);\n when(cDao.findComponentsLikeNombreAprobados(anyString(), (Componente) any())).thenReturn(expected);\n List<Componente> result = cDao.findComponentsLikeNombreAprobados(anyString(), (Componente) any());\n assertThat(result, is(expected));\n }", "public Exp createBind(Expression exp, Variable var){\r\n if (var.getVariableList() != null){\r\n // bind (sql() as ())\r\n return createASTBind(exp, var);\r\n }\r\n else {\r\n return Binding.create(exp, var);\r\n }\r\n }", "@Test\n public void testBetween1() throws Exception {\n String sql = \"SELECT a from db.g where a BETWEEN 1000 AND 2000\";\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 criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, BetweenCriteria.ID);\n verifyElementSymbol(criteriaNode, BetweenCriteria.EXPRESSION_REF_NAME, \"a\");\n verifyConstant(criteriaNode, BetweenCriteria.LOWER_EXPRESSION_REF_NAME, 1000);\n verifyConstant(criteriaNode, BetweenCriteria.UPPER_EXPRESSION_REF_NAME, 2000);\n \n verifySql(\"SELECT a FROM db.g WHERE a BETWEEN 1000 AND 2000\", fileNode);\n }", "@Test\n public void testExpressionPushdownPreparedStatements() throws Exception {\n String tableName = \"test_update_expr_pushdown\";\n setupSimpleTable(tableName);\n\n PreparedStatement updateStmt = connection.prepareStatement(\n \"update test_update_expr_pushdown SET vi = vi + ?, vs = vs || ? \" +\n \"WHERE h = 2 AND r = 2.5\");\n int expected_vi = 22;\n String expected_vs = \"v22\";\n for (int i = 0; i < 20; i++) {\n // Use float instead of int to check bind param casting.\n float vi_inc = i * 10 + 5.4F;\n String vs_concat = \",\" + i;\n updateStmt.setFloat(1, vi_inc);\n updateStmt.setString(2, vs_concat);\n updateStmt.execute();\n expected_vi += vi_inc;\n expected_vs += vs_concat;\n assertOneRow(\"select vi,vs from test_update_expr_pushdown where h = 2 and r = 2.5\",\n expected_vi, expected_vs);\n }\n }", "Query query();", "@Test\n public void createSqlQueryWithWhereAndGroupBySucceed()\n {\n // arrange\n // act\n QuerySpecification querySpecification = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).where(\"validWhere\").groupBy(\"validGroupBy\").createSqlQuery();\n\n // assert\n Helpers.assertJson(querySpecification.toJson(), \"{\\\"query\\\":\\\"select * from enrollments where validWhere group by validGroupBy\\\"}\");\n }", "public void testConjunctionInQueryVarUnifyNotLastFailsWhenBindingsDoNotMatch() throws Exception\n {\n resolveAndAssertFailure(new String[] {}, \"?- X = b, X = a, X = a\");\n }", "@Test\n public void testQuery() throws Exception {\n StatefulKnowledgeSession session = getKbase().newStatefulKnowledgeSession();\n \n initializeTemplate(session);\n \n List<Person> persons = new ArrayList<Person>();\n persons.add(new Person(\"john\", \"john\", 25));\n persons.add(new Person(\"sarah\", \"john\", 35));\n \n session.execute(CommandFactory.newInsertElements(persons));\n assertEquals(2, session.getFactCount());\n \n QueryResults results = query(\"people over the age of x\", new Object[] {30});\n assertNotNull(results);\n }", "@Test\n public void testValidate()throws Exception {\n System.out.println(\"validate\");\n String query = \"select * from librarian where name=? and password=?\";\n String name = \"Fahim\";\n String password = \"1234\";\n boolean expResult = false;\n //when(mockDb.getConnection()).thenReturn(mockConn);\n when(mockConn.prepareStatement(query)).thenReturn(mockPs);\n when(mockPs.executeQuery()).thenReturn(mockRs);\n when(mockRs.next()).thenReturn(true);\n boolean result = mockLibrarian.validate(name, password);\n assertEquals(result,true);\n \n }", "protected abstract PreparedResult implement( RelRoot root );", "public void namedQuery(String name) throws HibException;", "@Test\n void appendSwitchedTest() {\n var map = mock(SqlBuiltInMap.class);\n var builder = new DefaultSqlBuilder(SqlLiteralTypeHandlerMap.getDefaultMap(), map);\n var concatAppender = SqlRecursiveAppender.forTemplate(\"{1}||{0}\", EXPR_ADD, EXPR_ADD);\n concatAppender.append(\n List.of(SqlRecursiveAppenderTest::appendArg0, SqlRecursiveAppenderTest::appendArg1,\n SqlRecursiveAppenderTest::appendArg2), builder);\n assertThat(builder.getSql()).isEqualTo(\"?||??||?\");\n assertThat(builder.getBindsWithPos())\n .containsExactlyInAnyOrder(new BindWithPos(bindName1, Integer.class, List.of(2, 4)),\n new BindWithPos(bindName2, String.class, List.of(1, 3)));\n }", "private int bindFilterParameterValues(\n \t\t\tPreparedStatement st,\n \t\t\tQueryParameters queryParameters,\n \t\t\tint position,\n \t\t\tSessionImplementor session) throws SQLException {\n \t\tint filteredParamCount = queryParameters.getFilteredPositionalParameterTypes() == null\n \t\t\t\t? 0\n \t\t\t\t: queryParameters.getFilteredPositionalParameterTypes().length;\n \t\tint nonfilteredParamCount = queryParameters.getPositionalParameterTypes() == null\n \t\t\t\t? 0\n \t\t\t\t: queryParameters.getPositionalParameterTypes().length;\n \t\tint filterParamCount = filteredParamCount - nonfilteredParamCount;\n \t\tfor ( int i = 0; i < filterParamCount; i++ ) {\n \t\t\tType type = queryParameters.getFilteredPositionalParameterTypes()[i];\n \t\t\tObject value = queryParameters.getFilteredPositionalParameterValues()[i];\n \t\t\ttype.nullSafeSet( st, value, position, session );\n \t\t\tposition += type.getColumnSpan( getFactory() );\n \t\t}\n \n \t\treturn position;\n \t}", "boolean isIsQuery();", "ResultSet runSQL(String query) {\n try {\n return connection.prepareStatement(query).executeQuery();\n }\n catch (SQLException e) {\n System.err.println(e.getMessage());\n return null;\n }\n }", "@Test\n void appendTest() {\n var map = mock(SqlBuiltInMap.class);\n var builder = new DefaultSqlBuilder(SqlLiteralTypeHandlerMap.getDefaultMap(), map);\n var concatAppender = SqlRecursiveAppender.forTemplate(\"{0}||{1}\", EXPR_ADD, EXPR_ADD);\n concatAppender.append(\n List.of(SqlRecursiveAppenderTest::appendArg0, SqlRecursiveAppenderTest::appendArg1,\n SqlRecursiveAppenderTest::appendArg2), builder);\n assertThat(builder.getSql()).isEqualTo(\"?||??||?\");\n assertThat(builder.getBindsWithPos())\n .containsExactlyInAnyOrder(new BindWithPos(bindName1, Integer.class, List.of(1, 2)),\n new BindWithPos(bindName2, String.class, List.of(3, 4)));\n }", "Boolean callAskQuery(String name, Map<String, String> params);", "@Test\n\tpublic void db_query_scale() throws Exception\n\t{\n\t\tTemplate t = T(\"<?for row in db.query('select 0.5 as x from dual')?><?print row.x > 0?><?end for?>\");\n\n\t\tConnection db = getDatabaseConnection();\n\n\t\tif (db != null)\n\t\t\tcheckOutput(\"True\", t, V(\"db\", db));\n\t}", "@Test\n public void testNamedParamValueInCollectionTypeValidationPassesWhenCorrect() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1);\n query.named().setValue(NAMED_PARAM_1, Arrays.asList(10d, 20d));\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM join SELECT * FROM as SELECT * FROM on SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null\");\n assertTrue(boolean0);\n }", "@Override\n @PlainSQL\n public PaymentP2007_03 where(@Stringly.SQL String condition, Object... binds) {\n return where(DSL.condition(condition, binds));\n }", "@Test\n public void createSqlQuerySucceed()\n {\n // arrange\n // act\n QuerySpecification querySpecification = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).createSqlQuery();\n\n // assert\n Helpers.assertJson(querySpecification.toJson(), \"{\\\"query\\\":\\\"select * from enrollments\\\"}\");\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionContext\");\n String[] stringArray0 = new String[4];\n String string0 = SQLUtil.renderQuery(defaultDBTable0, stringArray0, stringArray0);\n assertEquals(\"SELECT * FROM org.apache.derby.iapi.sql.execute.ExecutionContext WHERE null = null AND null = null AND null = null AND null = null\", string0);\n }", "public QueryExecution createQueryExecution(Query qry);", "public abstract Statement queryToRetrieveData();", "protected int bindParameterValues(\n \t\t\tfinal PreparedStatement statement,\n \t\t\tfinal QueryParameters queryParameters,\n \t\t\tfinal int startIndex,\n \t\t\tfinal SessionImplementor session) throws SQLException {\n //\t\tint position = bindFilterParameterValues( statement, queryParameters, startIndex, session );\n \t\tint position = startIndex;\n //\t\tList parameterSpecs = queryTranslator.getSqlAST().getWalker().getParameters();\n \t\tList parameterSpecs = queryTranslator.getCollectedParameterSpecifications();\n \t\tIterator itr = parameterSpecs.iterator();\n \t\twhile ( itr.hasNext() ) {\n \t\t\tParameterSpecification spec = ( ParameterSpecification ) itr.next();\n \t\t\tposition += spec.bind( statement, queryParameters, session, position );\n \t\t}\n \t\treturn position - startIndex;\n \t}", "SelectQuery createSelectQuery();", "public boolean shouldRewriteQueryFromText() {\n/* 87 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"updatedeffult~nfo\");\n assertFalse(boolean0);\n }", "@Test\n public void testQueryMore1() throws Exception {\n testQueryMore(true, true);\n }", "Query queryOn(Connection connection);", "<T extends BaseDto, V extends BaseDto> List<T> executeQuery(String reqResQuery, V req, QueryResultTransformer<T> transformer, Connection conn);", "@Test\n public void test3() throws Exception {\n String jpql = \"SELECT c FROM Course c where SQL('course_mapped ->> ''?'' = ''Second one''',c.name) \";\n Query q = em.createQuery(jpql, Course.class);\n List<Course> courses = q.getResultList();\n Assert.assertEquals(1, courses.size());\n Assert.assertEquals(\"Second one\", courses.get(0).getCourseMapped().getName());\n\n }", "@Test\n public void testFindByNombre() {\n System.out.println(\"findByNombre\");\n query = mock(Query.class);\n String namedQuery = \"Componente.findByNombre\";\n Componente expected = new Componente();\n when(this.em.createNamedQuery(namedQuery)).thenReturn(query);\n when(cDao.findByNombre(anyString())).thenReturn(expected);\n Componente result = cDao.findByNombre(anyString());\n assertThat(result, is(expected));\n }", "@Test\n public void testBasicQuery() {\n final QueryCriteria qc = QueryCriteria.create();\n QueryGenerator generator = QueryGenerator.generator(FakeEntity.class, qc, \"a\");\n Assert.assertEquals(BAD_QUERY_GENERATED, \"\", generator.generate());\n Assert.assertEquals(BAD_QUERY_PARAMTERS, 0, generator.getParameterKeys().size());\n }", "private QueryResults query(String queryName, Object[] args) {\n Command command = CommandFactory.newQuery(\"persons\", queryName, args);\n String queryStr = template.requestBody(\"direct:marshall\", command, String.class);\n\n String json = template.requestBody(\"direct:test-session\", queryStr, String.class);\n ExecutionResults res = (ExecutionResults) template.requestBody(\"direct:unmarshall\", json);\n return (QueryResults) res.getValue(\"persons\");\n }", "public abstract ResultList executeQuery(DatabaseQuery query);", "protected void bind(PreparedStatement preparedStatement, ParameterBinding[] bindings)\n throws SQLException, Exception {\n // bind parameters\n if (bindings.length > 0) {\n int len = bindings.length;\n for (int i = 0; i < len; i++) {\n adapter.bindParameter(\n preparedStatement,\n bindings[i].getValue(),\n i + 1,\n bindings[i].getJdbcType(),\n bindings[i].getPrecision());\n }\n }\n }", "@Test\n public void testLikeWithEscape() throws Exception {\n String sql = \"SELECT a from db.g where b like '#String' escape '#'\";\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 criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, MatchCriteria.ID);\n verifyProperty(criteriaNode, MatchCriteria.ESCAPE_CHAR_PROP_NAME, \"#\");\n verifyElementSymbol(criteriaNode, MatchCriteria.LEFT_EXPRESSION_REF_NAME, \"b\");\n verifyConstant(criteriaNode, MatchCriteria.RIGHT_EXPRESSION_REF_NAME, \"#String\");\n \n verifySql(\"SELECT a FROM db.g WHERE b LIKE '#String' ESCAPE '#'\", fileNode);\n }", "public void prepareExecuteSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteSelect();\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"\");\n assertFalse(boolean0);\n }", "private void executeRequest(String sql) {\n\t}", "public void testInsertPredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 10);\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n assertEquals(10,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "@Test\n void findAllWithQuery() {\n DomainUser user0 = DomainUser.builder()\n .userName(\"user0\")\n .build();\n DomainUser user1 = DomainUser.builder()\n .userName(\"user1\")\n .groups(Collections.singletonList(\"group1\"))\n .build();\n when(ldaptiveTemplate.findAll(any(), any()))\n .thenAnswer((Answer<Stream<DomainUser>>) invocationOnMock -> Stream.of(user0, user1));\n assertFalse(userRepository.findAll(\"group1\")\n .anyMatch(user -> user0.getUserName().equals(user.getUserName())));\n assertTrue(userRepository.findAll(\"group1\")\n .anyMatch(user -> user1.getUserName().equals(user.getUserName())));\n }", "void bind(final Value val, final QueryContext qc) throws QueryException {\n if(external && !compiled) {\n value = declType == null || declType.instance(val) ? val :\n declType.cast(val, true, qc, sc, info);\n expr = value;\n }\n }", "@Test\n public void selectStatementSuccessful() throws SQLException {\n assertNotNull(testConnection.selectStatement(con, \"SELECT * FROM Employees;\"));\n assertNull(testConnection.selectStatement(con, \"SELECT * FROM Emp;\"));\n\n //Test if RS is empty\n assertTrue(testConnection.selectStatement(con, \"SELECT * FROM Employees\").next());\n assertFalse(testConnection.selectStatement(con, \"SELECT * FROM Employees WHERE email='x'\").next());\n }", "public StatementQueryMechanism(DatabaseQuery query) {\n super(query);\n }", "@Override\n\t\tpublic void executeQuery(String query) {\n\t\t\t\n\t\t}", "public abstract void callback_query(CallbackQuery cq);", "protected abstract void bind();", "protected abstract void bind();", "@Test\n public void testSetCriteria0() throws Exception {\n String sql = \"SELECT a FROM db.g WHERE b IN (1000,5000)\";\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 criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, SetCriteria.ID);\n verifyElementSymbol(criteriaNode, AbstractSetCriteria.EXPRESSION_REF_NAME, \"b\");\n verifyConstant(criteriaNode, SetCriteria.VALUES_REF_NAME, 1, 1000);\n verifyConstant(criteriaNode, SetCriteria.VALUES_REF_NAME, 2, 5000);\n\n verifySql(\"SELECT a FROM db.g WHERE b IN (1000, 5000)\", fileNode);\n }", "public BindClause(Object object) {\n\t\t\tthis.object = object;\n\t\t}", "protected PreparedStatement prepare(JdbcChannel con,\n CallContext cx,\n Bindings bindings)\n throws ProcedureException {\n \n String sql = (String) bindings.getValue(BINDING_SQL);\n String[] names = bindings.getNames();\n ArrayList fields = new ArrayList();\n SqlField field;\n StringBuffer buffer = new StringBuffer();\n ArrayList params = new ArrayList();\n Object value;\n int pos;\n \n for (int i = 0; i < names.length; i++) {\n if (bindings.getType(names[i]) == Bindings.ARGUMENT) {\n pos = 0;\n while ((pos = sql.indexOf(\":\" + names[i], pos)) >= 0) {\n field = new SqlField(sql, pos, names[i]);\n fields.add(field);\n pos = field.endPos;\n }\n }\n }\n Collections.sort(fields);\n pos = 0;\n for (int i = 0; i < fields.size(); i++) {\n field = (SqlField) fields.get(i);\n value = bindings.getValue(field.fieldName, null);\n buffer.append(sql.substring(pos, field.startPos));\n buffer.append(field.bind(value, params));\n pos = field.endPos;\n }\n buffer.append(sql.substring(pos));\n try {\n if (cx.isTracing()) {\n cx.log(\"JDBC \" + con.getConnection() + \" SQL:\");\n cx.log(buffer.toString());\n }\n return con.prepare(buffer.toString(), params);\n } catch (ConnectionException e) {\n throw new ProcedureException(e.getMessage());\n }\n }", "public void Query() {\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 }", "ZZW queryByHql(String hql,Map<String,Object> param);", "@Override\n public boolean hasPreparedStatement() {\n return true;\n }", "public abstract QueryResultIterable executeGroundingQuery(Formula formula);", "void runQueries();" ]
[ "0.6161036", "0.59239966", "0.5919128", "0.5882707", "0.5758134", "0.56586856", "0.56505126", "0.56182134", "0.5519595", "0.5516984", "0.5486368", "0.5483468", "0.5443309", "0.5438711", "0.5436619", "0.54259884", "0.54130596", "0.5410511", "0.53992176", "0.5389603", "0.53886783", "0.53767544", "0.53643584", "0.5350758", "0.53460556", "0.5338157", "0.5328559", "0.5318515", "0.5314448", "0.52910835", "0.5286143", "0.5281621", "0.527778", "0.52755845", "0.525052", "0.5250066", "0.5229813", "0.52182555", "0.52171844", "0.52107245", "0.5203662", "0.5202307", "0.5199972", "0.51911366", "0.51844156", "0.51773274", "0.517708", "0.51764506", "0.51666814", "0.51643217", "0.51628107", "0.51578856", "0.5125788", "0.51228017", "0.5118902", "0.50984967", "0.5095033", "0.5087523", "0.5082812", "0.5080465", "0.50764465", "0.5070008", "0.5069354", "0.50657123", "0.5063302", "0.5060108", "0.50600755", "0.50475603", "0.5046953", "0.50403386", "0.50391775", "0.5038246", "0.5032903", "0.50290424", "0.50284296", "0.50256324", "0.50247824", "0.50221753", "0.5020967", "0.5014035", "0.4993969", "0.49883908", "0.49881688", "0.49814075", "0.49708432", "0.49696624", "0.49622807", "0.49520555", "0.49502575", "0.4941993", "0.4941993", "0.493878", "0.4936784", "0.49326697", "0.49243936", "0.49233148", "0.49221686", "0.49213195", "0.49203378", "0.4917463" ]
0.6916659
0
/ test a single source select query where we set a binding
@Test public void testSingleSource_SetBinding() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); try (RepositoryConnection conn = fedxRule.getRepository().getConnection()) { // SELECT query TupleQuery tq = conn .prepareTupleQuery("SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name }"); tq.setBinding("name", l("Alan")); TupleQueryResult tqr = tq.evaluate(); List<BindingSet> res = Iterations.asList(tqr); assertContainsAll(res, "person", Sets.newHashSet(iri("http://example.org/", "a"))); // CONSTRUCT query GraphQuery gq = conn.prepareGraphQuery( "CONSTRUCT { ?person <http://xmlns.com/foaf/0.1/name> ?name } WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name }"); gq.setBinding("name", l("Alan")); GraphQueryResult gqr = gq.evaluate(); List<Statement> stmts = Iterations.asList(gqr); Assertions.assertEquals(1, stmts.size()); Assertions.assertEquals(iri("http://example.org/", "a"), stmts.get(0).getSubject()); // BOOLEAN query BooleanQuery bq = conn.prepareBooleanQuery("ASK { ?person <http://xmlns.com/foaf/0.1/name> ?name }"); bq.setBinding("name", l("non-existing-name")); Assertions.assertEquals(false, bq.evaluate()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testBindClause() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query_bind.rq\", \"/tests/basic/query_bind.srx\", false);\n\t}", "@Test\n\tpublic void testSingleSourceSelect() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query_singleSource01.rq\", \"/tests/basic/query_singleSource01.srx\", false);\n\t}", "@Test\n\tpublic void testPassThroughHandler_SingleSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name . }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace is expected to come from some original repository (e.g. SPARQL) => we explicitly\n\t\t\t\t\t * do not expect QueryResults#report to be the second element (compare test\n\t\t\t\t\t * testPassThroughHandler_MultiSourceQuery)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertNotEquals(QueryResults.class, new Exception().getStackTrace()[1].getClass());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"person\"), iri(\"http://example.org/\", \"a\"));\n\t\t\t\t\tnumberOfResults.incrementAndGet();\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(1, numberOfResults.get());\n\t\t}\n\t}", "public abstract ConnectorResultSet select(DataRequest source) throws ConnectorOperationException;", "@Test\n\tpublic void testPassThroughHandler_emptySingleSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name . }\");\n\t\t\ttq.setBinding(\"name\", l(\"notExist\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace is expected to come from some original repository (e.g. SPARQL) => we explicitly\n\t\t\t\t\t * do not expect QueryResults#report to be the second element (compare test\n\t\t\t\t\t * testPassThroughHandler_MultiSourceQuery)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertNotEquals(QueryResults.class, new Exception().getStackTrace()[1].getClass());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tthrow new IllegalStateException(\"Expected empty result\");\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(0, numberOfResults.get());\n\t\t}\n\t}", "protected void generateFromClause( WrqInfo wrqInfo, SQLStatementWithParams sqlStatement ) throws BindingException\n {\n sqlStatement.append(\" FROM \");\n WrqBindingSet bs = wrqInfo.getResultingBindingSet();\n resolvedBindingSets.addAll(bs.getResolvedBindingSets());\n sqlStatement.append(wrqInfo.getSQLSelectWithParams()); \n }", "public boolean isSetBindSource() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BINDSOURCE_ISSET_ID);\n }", "@Test\n public void testDAM31201001() {\n // In this test case the where clause is specified in a common sql shared in multiple queries.\n testDAM30505001();\n }", "protected CloseableIteration<BindingSet, QueryEvaluationException> handleStatementSourcePatternCheck(\n\t\t\tBindingSet bindings) throws RepositoryException, MalformedQueryException, QueryEvaluationException {\n\t\tfor (StatementSource source : statementSources) {\n\t\t\tEndpoint ownedEndpoint = queryInfo.getFederationContext()\n\t\t\t\t\t.getEndpointManager()\n\t\t\t\t\t.getEndpoint(source.getEndpointID());\n\t\t\tTripleSource t = ownedEndpoint.getTripleSource();\n\t\t\tif (t.hasStatements(this, bindings, queryInfo, queryInfo.getDataset())) {\n\t\t\t\treturn new SingleBindingSetIteration(bindings);\n\t\t\t}\n\t\t}\n\n\t\treturn new EmptyIteration<>();\n\t}", "public abstract SqlParameterSource getSqlParameterSource();", "public void prepareSelectOneRow() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareSelectOneRow();\n }", "public void prepareExecuteSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteSelect();\n }", "BoundQuery<?,Ttuple> query(Query q,Focus<?> context)\n throws DataException;", "public EODataSource queryDataSource();", "void setBind() {\n for (int i = 1; i < size(); i++) {\n Exp f = get(i);\n if (f.isFilter() && f.size() > 0) {\n Exp bind = f.first();\n if (bind.type() == OPT_BIND\n // no bind (?x = ?y) in case of JOIN\n && (!Query.testJoin || bind.isBindCst())) {\n int j = i - 1;\n while (j > 0 && get(j).isFilter()) {\n j--;\n }\n if (j >= 0) {\n Exp g = get(j);\n if ((g.isEdge() || g.isPath())\n && (bind.isBindCst() ? g.bind(bind.first().getNode()) : true)) {\n bind.status(true);\n g.setBind(bind);\n }\n }\n }\n }\n }\n }", "@Override\n protected PreparedStatement getObject() {\n try {\n return this.proxy.prepareStatement(\"SELECT * FROM country\");\n } catch (SQLException sex) {\n throw new UnsupportedOperationException(\"cannot provide object for testing\", sex);\n }\n }", "void defSelect(Variable var){\r\n \t//if (isSelectAll()){\r\n \t\taddSelect(var);\r\n \t//}\r\n }", "@Test\n public void testPreparedStatementOne() throws Throwable\n {\n assertNotNull(ds);\n Connection c = ds.getConnection();\n assertNotNull(c);\n \n Statement st = c.createStatement();\n assertNotNull(st);\n \n // Create\n st.execute(\"CREATE TABLE Employees (Employee_ID INTEGER, Name VARCHAR(30));\");\n st.execute(\"INSERT INTO Employees VALUES (1, '#1')\");\n st.execute(\"INSERT INTO Employees VALUES (2, '#2')\");\n \n // Prepared statement\n PreparedStatement pstmt = c.prepareStatement(\"SELECT * FROM Employees WHERE Employee_ID = ?\");\n assertNotNull(pstmt);\n \n pstmt.setInt(1, 1);\n \n ResultSet rs = pstmt.executeQuery();\n assertNotNull(rs);\n \n assertTrue(rs.next());\n \n // Drop\n st.execute(\"DROP TABLE Employees\");\n \n rs.close();\n pstmt.close();\n st.close();\n c.close();\n }", "protected abstract void select();", "Bindable getBindable( Meta.CursorFactory cursorFactory );", "SelectQuery createSelectQuery();", "@Test\n public void testToStringWithSQL() throws SQLException {\n try (PreparedStatement stmt = this.proxy\n .prepareStatement(\"SELECT * FROM country WHERE lang = ? OR callingcode = ?\")) {\n stmt.setString(1, \"de\");\n stmt.setInt(2, 42);\n String sql = stmt.toString();\n assertEquals(\"SELECT * FROM country WHERE lang = 'de' OR callingcode = 42\", sql);\n LOG.info(\"sql = \\\"{}\\\"\", sql);\n }\n }", "@Test\n public void createSqlQueryWithWhereSucceed()\n {\n // arrange\n // act\n QuerySpecification querySpecification = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).where(\"validWhere\").createSqlQuery();\n\n // assert\n Helpers.assertJson(querySpecification.toJson(), \"{\\\"query\\\":\\\"select * from enrollments where validWhere\\\"}\");\n }", "public abstract Statement queryToRetrieveData();", "@Test\n public void selectStatementSuccessful() throws SQLException {\n assertNotNull(testConnection.selectStatement(con, \"SELECT * FROM Employees;\"));\n assertNull(testConnection.selectStatement(con, \"SELECT * FROM Emp;\"));\n\n //Test if RS is empty\n assertTrue(testConnection.selectStatement(con, \"SELECT * FROM Employees\").next());\n assertFalse(testConnection.selectStatement(con, \"SELECT * FROM Employees WHERE email='x'\").next());\n }", "@Test\n\tpublic void testPassThroughHandler_MultiSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\n\t\t\t\t\t\t\t\"SELECT ?person ?interest WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name ; <http://xmlns.com/foaf/0.1/interest> ?interest }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace looks like this java.lang.Exception at\n\t\t\t\t\t * org.eclipse.rdf4j.federated.BasicTests$1.startQueryResult(BasicTests.java:276) at\n\t\t\t\t\t * org.eclipse.rdf4j.query.QueryResults.report(QueryResults.java:263) at\n\t\t\t\t\t * org.eclipse.rdf4j.federated.structures.FedXTupleQuery.evaluate(FedXTupleQuery.java:69)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertEquals(QueryResults.class.getName(),\n\t\t\t\t\t\t\tnew Exception().getStackTrace()[1].getClassName());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"person\"), iri(\"http://example.org/\", \"a\"));\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"interest\").stringValue(), \"SPARQL 1.1 Basic Federated Query\");\n\t\t\t\t\tnumberOfResults.incrementAndGet();\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(1, numberOfResults.get());\n\t\t}\n\t}", "@Test\n public void whereStoreSucceed()\n {\n // arrange\n final String whereClause = \"validWhere\";\n // act\n QuerySpecificationBuilder querySpecificationBuilder = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).where(whereClause);\n\n // assert\n assertEquals(whereClause, Deencapsulation.getField(querySpecificationBuilder, \"where\"));\n }", "public void testVariableBindingFromQueryPropagatesAccrossConjunction() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), h(x), (f(X) :- g(X), h(X))], (?- f(x)), [[]]]\");\n }", "public void setWhere(String dbsel)\n {\n this._appendWhere(dbsel, WHERE_SET);\n }", "public void onSelect(Statement select, Connection cx, SimpleFeatureType featureType) throws SQLException {\r\n }", "public void testRawQuery() {\n Random random = new Random();\n ContentValues values1 = makeServiceStateValues(random, mBaseDb);\n final long row1 = mBaseDb.insert(TBL_SERVICE_STATE, null, values1);\n ContentValues values2 = makeServiceStateValues(random, mBaseDb);\n final long row2 = mBaseDb.insert(TBL_SERVICE_STATE, null, values2);\n\n // query tuple\n ServiceStateTable table = new ServiceStateTable();\n String sql = \"SELECT * FROM \" + TBL_SERVICE_STATE + \" WHERE \" + COL_ID + \" = ?\";\n String[] selectionArgs = { String.valueOf(row1) };\n List<ServiceStateTuple> tuples = table.rawQuery(mTestContext, sql, selectionArgs);\n\n // verify values\n assertNotNull(tuples);\n // klocwork\n if (tuples == null) return;\n assertFalse(tuples.isEmpty());\n assertEquals(1, tuples.size());\n ServiceStateTuple tuple = tuples.get(0);\n assertValuesTuple(row1, values1, tuple);\n }", "private void ini_SelectDB()\r\n\t{\r\n\r\n\t}", "private synchronized String prepareSelection(DataSource dataSource) {\n String selection = \"\";\n if (dataSource.getId() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_DATASOURCE_ID + \"=?\";\n }\n if (dataSource.getType() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_DATASOURCE_TYPE + \"=?\";\n }\n if (dataSource.getPlatform() != null && dataSource.getPlatform().getId() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_PLATFORM_ID + \"=?\";\n }\n if (dataSource.getPlatform() != null && dataSource.getPlatform().getType() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_PLATFROM_TYPE + \"=?\";\n }\n if (dataSource.getPlatformApp() != null && dataSource.getPlatformApp().getId() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_PLATFORMAPP_ID + \"=?\";\n }\n if (dataSource.getPlatformApp() != null && dataSource.getPlatformApp().getType() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_PLATFROMAPP_TYPE + \"=?\";\n }\n if (dataSource.getApplication() != null && dataSource.getApplication().getId() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_APPLICATION_ID + \"=?\";\n }\n if (dataSource.getApplication() != null && dataSource.getApplication().getType() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_APPLICATION_TYPE + \"=?\";\n }\n if (selection.equals(\"\"))\n return null;\n return selection;\n }", "public void select() {}", "@Test\n public void testGetTabella_PreparedStatement() throws MainException, SQLException {\n System.out.println(\"getTabella\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n PreparedStatement stmt = instance.prepareStatement(\n \"select * from infermieri\");\n ADISysTableModel result = instance.getTabella(stmt);\n assertNotNull(result);\n }", "SupplyNeed selectByPrimaryKey(Integer id);", "public InputParamBindingAdapter( String paramName, String bindingExpr )\n \t{\n \t\tsuper( paramName, \n \t\t\t\tnew ExpressionAdapter( bindingExpr, DataType.ANY_TYPE ) );\n \t}", "@Override\r\n\t\t\t\t\tpublic void dragSetData(DragSourceEvent event) {\n\t\t\t\t\t\tLocalSelectionTransfer transfer=LocalSelectionTransfer.getTransfer();\r\n\t\t\t\t\t\tif (transfer.isSupportedType(event.dataType)) {\r\n\t\t\t\t\t\t\ttransfer.setSelection(tableViewer.getSelection());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "protected void generateSelectClause( WrqInfo wrqInfo, SQLStatementWithParams sqlStatement ) throws BindingNotFoundException\n {\n StringBuilder sql = new StringBuilder();\n List<Element> boundVariables = new LinkedList<Element>();\n\n sql.append(\"SELECT \");\n Iterator<String> it = wrqInfo.getFullSelectListBRefs().iterator();\n String concat=\"\";\n while( it.hasNext() )\n {\n WrqBindingItem bi = wrqInfo.getAllBRefAggrs().get(it.next());\n sql.append(concat);\n // We may want to not calculate this value if another bRef part of Grouping Set is on (sub)total level\n // Typical case is the caption. It could be part of the Grouping Set itself but this keeps the query simpler, see scorecard\n if( wrqInfo.reqHasGroupingFunction() && wrqInfo.getGroupingBRefs().contains(bi.getSkipForTotals()) ) {\n String[] grpFM = DatabaseCompatibility.getInstance().getCalcFktMapping(wrqQueryBuilder.getJdbcResourceName()).get(\"Grouping\");\n WrqBindingItem sftBi = wrqInfo.getAllBRefs().get(bi.getSkipForTotals());\n sql.append(\"CASE WHEN \").append(grpFM[1]).append(sftBi.getQColumnExpression()).append(grpFM[3]).append(\" = 0 THEN \");\n sql.append(bi.getQColumnExpressionWithAggr()).append(\" END \");\n } else {\n sql.append(bi.getQColumnExpressionWithAggr()).append(\" \");\n }\n sql.append( bi.getAlias() );\n concat = \", \";\n boundVariables.addAll( bi.getBoundVariables() );\n }\n sqlStatement.append(sql.toString(), boundVariables, wrqInfo.getResultingBindingSet());\n }", "@Override\r\n\tpublic String[] getBindDsName() {\n\t\treturn new String[]{\"supplierSalesPrice_dataSource\"}; \r\n\t}", "@Test(expected=IllegalArgumentException.class)\n public void testNamedValueNotDuplicateValidation() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).eq().named(NAMED_PARAM_1);\n query.where(personProxy.getName()).eq().named(NAMED_PARAM_1);\n }", "public interface PreparedSqlProvider {\r\n\r\n\t/**\r\n\t * This method distills the specified criteria of a query into a\r\n\t * SQL-specific object.\r\n\t * \r\n\t * @return a a SQL statement ready for processing.\r\n\t */\r\n\tpublic PreparedSql generatePreparedSql(String prefix);\r\n\r\n\t/**\r\n\t * This method distills the specified criteria of a query into a\r\n\t * SQL-specific object.\r\n\t * \r\n\t * @return a a SQL statement ready for processing.\r\n\t */\r\n\tpublic PreparedSql generatePreparedSql(BoundString prefix);\r\n\r\n}", "public void bind(SupportSQLiteStatement fVar, PageGCEntity iVar) {\n fVar.mo6226a(1, iVar.mo63589a());\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "public static String bindVariable(PreparedStatement ps, \n int sourceColType,\n int destColType,\n int index, \n ResultSet rs) throws SQLException {\n String result = \"null\";\n switch (sourceColType) {\n case Types.ARRAY:\n Array arrayVal = rs.getArray(index);\n result = getValue(arrayVal);\n ps.setArray(index, arrayVal);\n break;\n case Types.BIGINT:\n long bigintVal = rs.getLong(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = Long.toString(bigintVal);\n ps.setLong(index, bigintVal); \n }\n break;\n case Types.BINARY:\n result = bindBlobVar(ps, index, rs, destColType);\n break;\n case Types.BIT:\n // JDBC spec says that BIT refers to a boolean column - i.e. a\n // single binary digit with value either \"0\" or \"1\". Also \n // the same spec encourages use of getBoolean/setBoolean.\n // However, the SQL-92 standard clearly states that the BIT type\n // is a bit string with length >= 0. So for SQL-92 compliant\n // databases (like PostgreSQL) the JDBC spec's support for BIT\n // is at best broken and unusable. Still, we do what the JDBC \n // spec suggests as that is all that we can do.\n \n // TODO: just noticed that MySQL 5.0 supports a multi-bit BIT\n // column by using the getObject/setObject methods with a byte[].\n // So it would be valuable at some point to make this code a bit\n // more dbms-specific\n boolean bitValue = rs.getBoolean(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = Boolean.toString(bitValue);\n ps.setBoolean(index, bitValue);\n }\n break;\n case Types.BLOB:\n result = bindBlobVar(ps, index, rs, destColType);\n break;\n case Types.BOOLEAN:\n boolean booleanValue = rs.getBoolean(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = Boolean.toString(booleanValue);\n // HACK: some dbs (like Frontbase) don't support boolean\n // types. I've tried tinyint, bit and boolean as the column\n // type, and setBoolean fails for all three. It's a mystery\n // at this point what column the getBoolean/setBoolean methods\n // actually work on iin FrontBase.\n switch (destColType) {\n case Types.TINYINT:\n case Types.SMALLINT:\n case Types.BIGINT:\n case Types.INTEGER:\n ps.setInt(index, booleanValue? 1 : 0 );\n break;\n case Types.FLOAT:\n ps.setFloat(index, booleanValue? 1 : 0 );\n break;\n case Types.DOUBLE:\n ps.setDouble(index, booleanValue? 1 : 0 );\n break;\n case Types.VARCHAR:\n case Types.CHAR:\n ps.setString(index, booleanValue? \"1\" : \"0\" );\n break;\n default:\n ps.setBoolean(index, booleanValue);\n break;\n }\n }\n break;\n case Types.CHAR:\n String charValue = rs.getString(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = charValue;\n ps.setString(index, charValue);\n }\n break;\n case Types.CLOB:\n bindClobVar(ps, index, rs, destColType);\n break;\n case Types.DATALINK:\n // TODO: is this right???\n Object datalinkValue = rs.getObject(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = getValue(datalinkValue);\n ps.setObject(index, datalinkValue);\n }\n break;\n case Types.DATE:\n Date dateValue = rs.getDate(index);\n if (!handleNull(rs, ps, index, destColType)) {\n // TODO: use the destination database type to derive a \n // format that is acceptable.\n result = getValue(dateValue);\n ps.setDate(index, dateValue);\n }\n break;\n case Types.DECIMAL:\n BigDecimal decimalValue = rs.getBigDecimal(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = getValue(decimalValue);\n ps.setBigDecimal(index, decimalValue);\n }\n break;\n case Types.DISTINCT:\n // TODO: is this right???\n Object distinctValue = rs.getObject(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = getValue(distinctValue);\n ps.setObject(index, distinctValue);\n }\n break;\n case Types.DOUBLE:\n double doubleValue = rs.getDouble(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = Double.toString(doubleValue);\n ps.setDouble(index, doubleValue);\n }\n break;\n case Types.FLOAT:\n // SQL FLOAT requires support for 15 digits of mantissa.\n double floatValue = rs.getDouble(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = Double.toString(floatValue);\n ps.setDouble(index, floatValue);\n }\n break;\n case Types.INTEGER:\n int integerValue = rs.getInt(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = Integer.toString(integerValue);\n ps.setInt(index, integerValue);\n }\n break;\n case Types.JAVA_OBJECT:\n Object objectValue = rs.getObject(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = getValue(objectValue);\n ps.setObject(index, objectValue);\n }\n break;\n case Types.LONGVARBINARY:\n result = bindBlobVar(ps, index, rs, destColType);\n break;\n case Types.LONGVARCHAR:\n String longvarcharValue = rs.getString(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = longvarcharValue;\n ps.setString(index, longvarcharValue);\n }\n break;\n case Types.NULL:\n // TODO: is this right??? \n ps.setNull(index, Types.NULL);\n break;\n case Types.NUMERIC:\n BigDecimal numericValue = rs.getBigDecimal(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = getValue(numericValue);\n ps.setBigDecimal(index, numericValue);\n }\n break;\n case Types.OTHER:\n // TODO: figure out a more reliable way to handle OTHER type \n // which indicates a database-specific type.\n String testValue = rs.getString(index);\n if (!handleNull(rs, ps, index, destColType)) {\n try {\n Double.parseDouble(testValue);\n double numberValue = rs.getDouble(index);\n ps.setDouble(index, numberValue); \n } catch (SQLException e) {\n byte[] otherValue = rs.getBytes(index);\n result = getValue(otherValue);\n ps.setBytes(index, otherValue); \n }\n }\n break;\n case Types.REAL:\n float realValue = rs.getFloat(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = Float.toString(realValue);\n ps.setFloat(index, realValue);\n }\n break;\n case Types.REF:\n Ref refValue = rs.getRef(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = getValue(refValue);\n ps.setRef(index, refValue);\n }\n break;\n case Types.SMALLINT:\n short smallintValue = rs.getShort(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = Short.toString(smallintValue);\n ps.setShort(index, smallintValue);\n }\n break;\n case Types.STRUCT:\n Object structValue = rs.getObject(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = getValue(structValue);\n ps.setObject(index, structValue);\n }\n break;\n case Types.TIME:\n Time timeValue = rs.getTime(index);\n // TODO: use the destination database type to derive a format \n // that is acceptable.\n if (!handleNull(rs, ps, index, destColType)) {\n result = getValue(timeValue);\n ps.setTime(index, timeValue);\n }\n break;\n case Types.TIMESTAMP:\n Timestamp timestampValue = rs.getTimestamp(index);\n // TODO: use the destination database type to derive a format \n // that is acceptable.\n if (!handleNull(rs, ps, index, destColType)) {\n result = getValue(timestampValue);\n ps.setTimestamp(index, timestampValue);\n }\n break;\n case Types.TINYINT:\n byte tinyintValue = rs.getByte(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = Byte.toString(tinyintValue);\n ps.setByte(index, tinyintValue);\n }\n break;\n case Types.VARBINARY:\n result = bindBlobVar(ps, index, rs, destColType);\n break;\n case Types.VARCHAR:\n String varcharValue = rs.getString(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = varcharValue;\n ps.setString(index, varcharValue);\n }\n break;\n default:\n //i18n[DBUtil.error.unknowntype=Unknown Java SQL column type: '{0}']\n String msg =\n s_stringMgr.getString(\"DBUtil.error.unknowntype\",\n Integer.valueOf(sourceColType));\n log.error(msg);\n // We still have to bind a value, or else the PS will throw\n // an exception.\n String value = rs.getString(index);\n if (!handleNull(rs, ps, index, destColType)) {\n result = value;\n ps.setString(index, value);\n }\n break;\n }\n return result;\n }", "@Test\n public void testWhere_withValidQuery() {\n String column0 = \"user_id\";\n String column1 = \"age\";\n int idValue0 = 0;\n int ageValue0 = 23;\n int idValue1 = 1;\n int ageValue1 = 22;\n int idValue2 = 2;\n int ageValue2 = 18;\n\n try {\n String sql = \"CREATE TABLE ModelExtension (\" +\n column0 + \" int, \" +\n column1 + \" int)\";\n PreparedStatement pstmt = Setup.getConnection().prepareStatement(sql);\n pstmt.execute();\n sql = \"INSERT INTO ModelExtension (\" +\n column0 + \", \" +\n column1 + \") VALUES (\" +\n idValue0 + \", \" +\n ageValue0 + \"), (\" +\n idValue1 + \", \" +\n ageValue1 + \"), (\" +\n idValue2 + \", \" +\n ageValue2 + \")\";\n pstmt = Setup.getConnection().prepareStatement(sql);\n pstmt.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n assertTrue(false);\n }\n\n List<ModelExtension> models = child.findAll().where(column1 + \">20\").execute(ModelExtension.class);\n\n assertEquals(2, models.size());\n assertEquals(idValue0, models.get(0).get(column0));\n assertEquals(ageValue0, models.get(0).get(column1));\n assertEquals(idValue1, models.get(1).get(column0));\n assertEquals(ageValue1, models.get(1).get(column1));\n }", "public void prepareExecuteNoSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteNoSelect();\n }", "private boolean hasBindValue(Command command) {\n if (!CollectorVisitor.collectObjects(Parameter.class, command).isEmpty()) {\n return true;\n }\n for (Literal l : CollectorVisitor.collectObjects(Literal.class, command)) {\n if (isBindEligible(l)) {\n return true;\n }\n }\n return false;\n }", "Source updateDatasourceOAI(Source ds) throws RepoxException;", "protected int bindParameterValues(\n \t\t\tfinal PreparedStatement statement,\n \t\t\tfinal QueryParameters queryParameters,\n \t\t\tfinal int startIndex,\n \t\t\tfinal SessionImplementor session) throws SQLException {\n //\t\tint position = bindFilterParameterValues( statement, queryParameters, startIndex, session );\n \t\tint position = startIndex;\n //\t\tList parameterSpecs = queryTranslator.getSqlAST().getWalker().getParameters();\n \t\tList parameterSpecs = queryTranslator.getCollectedParameterSpecifications();\n \t\tIterator itr = parameterSpecs.iterator();\n \t\twhile ( itr.hasNext() ) {\n \t\t\tParameterSpecification spec = ( ParameterSpecification ) itr.next();\n \t\t\tposition += spec.bind( statement, queryParameters, session, position );\n \t\t}\n \t\treturn position - startIndex;\n \t}", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "public void testConjunctionInQueryVarFailsWhenBindingsDoNotMatch() throws Exception\n {\n resolveAndAssertFailure(new String[] { \"g(x)\", \"f(y)\" }, \"?- f(X), g(X)\");\n }", "@Override\n public boolean hasPreparedStatement() {\n return true;\n }", "@Override\r\n public void select(String name, String origin, String destination) {\n }", "@Provides\r\n @Named(\"source\")\r\n public BackendInstanceWrapper provideSourceWrapper() {\r\n return backendInstanceWrapper(sourceDB);\r\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "protected void bind(PreparedStatement preparedStatement, ParameterBinding[] bindings)\n throws SQLException, Exception {\n // bind parameters\n if (bindings.length > 0) {\n int len = bindings.length;\n for (int i = 0; i < len; i++) {\n adapter.bindParameter(\n preparedStatement,\n bindings[i].getValue(),\n i + 1,\n bindings[i].getJdbcType(),\n bindings[i].getPrecision());\n }\n }\n }", "public static void testStub(){\n String qry = \"SELECT * FROM track;\";\n executeStmt(qry);\n }", "public void select(int first, int pageSize, String sortField, Object filterValue) throws SQLException, NamingException, IOException {\n\t\n\t \t\tContext initContext = new InitialContext(); \n\t \tDataSource ds = (DataSource) initContext.lookup(JNDI);\n\t \t\tcon = ds.getConnection();\n\t \t//Reconoce la base de datos de conección para ejecutar el query correspondiente a cada uno\n\t \t\tDatabaseMetaData databaseMetaData = con.getMetaData();\n\t \t\tproductName = databaseMetaData.getDatabaseProductName();//Identifica la base de datos de conección\n\n\t \t\t\n\t \t\tString query = \"\";\n\t \t\t \t\n\t \t\tif(pcodcia==null){\n\t \t\t\tpcodcia = \" - \";\n\t }\n\t if(pcodcia==\"\"){\n\t \tpcodcia = \" - \";\n\t }\n\t \n\t \n\t \t\t//String[] veccodcia = pcodcia.split(\"\\\\ - \", -1);\n\t \n\t switch ( productName ) {\n\t case \"Oracle\":\n\t \t//Consulta paginada\n\t \tquery = \" select * from \";\n\t \tquery += \" ( select query.*, rownum as rn from\";\n\t\t \t\tquery += \" ( SELECT b.nomcia2, trim(a.p_codcia), trim(a.coduser), a.cedula, trim(a.cluser), trim(a.mail), trim(a.nbr), trim(a.codrol)||' - '||trim(c.desrol), a.grupo\";\n\t\t query += \" FROM autos01 a, pnt001 b, seg002 c\";\n\t\t query += \" where a.p_codcia=b.codcia\";\n\t\t query += \" and a.grupo=b.grupo\";\n\t\t query += \" and a.codrol=c.codrol\";\n\t\t query += \" and a.grupo=c.grupo\";\n\t\t query += \" and b.nomcia2||a.coduser||a.cedula like '%\" + ((String) filterValue).toUpperCase() + \"%'\";\n\t\t //query += \" and a.p_codcia like '\" + veccodcia[0] + \"%'\"; \n\t\t query += \" and a.grupo = '\" + grupo + \"'\";\n\t\t \t\tquery += \" order by \" + sortField.replace(\"v\", \"\") + \") query\";\n\t\t query += \" ) where rownum <= \" + pageSize ;\n\t\t query += \" and rn > (\" + first + \")\";\n\n\t break;\n\t case \"PostgreSQL\":\n\t \t//Consulta paginada\n\t\t \t\tquery = \"SELECT b.nomcia2, trim(a.p_codcia), trim(a.coduser), CAST(a.cedula AS text), trim(a.cluser), trim(a.mail), trim(a.nbr), trim(a.codrol)||' - '||trim(c.desrol), a.grupo\";\n\t\t query += \" FROM autos01 a, pnt001 b, seg002 c\";\n\t\t query += \" where a.p_codcia=b.codcia\";\n\t\t query += \" and a.grupo=b.grupo\";\n\t\t query += \" and a.codrol=c.codrol\";\n\t\t query += \" and a.grupo=c.grupo\";\n\t\t query += \" and b.nomcia2||a.coduser||a.cedula like '%\" + ((String) filterValue).toUpperCase() + \"%'\";\n\t\t //query += \" and a.p_codcia like '\" + veccodcia[0] + \"%'\"; \n\t\t query += \" and CAST(a.grupo AS text) = '\" + grupo + \"'\";\n\t\t query += \" order by \" + sortField.replace(\"v\", \"\") ;\n\t\t query += \" LIMIT \" + pageSize;\n\t\t query += \" OFFSET \" + first;\n\t break; \t\t \n\t \t\t}\n\t\n\t \t\t\n\t \t\t\n\t \t\t\n\t\n\t\n\t \n\t pstmt = con.prepareStatement(query);\n\t //System.out.println(query);\n\t \t\t\n\t ResultSet r = pstmt.executeQuery();\n\t \n\t \n\t while (r.next()){\n\t \tRegistros select = new Registros();\n\t \tselect.setVpcodcia(r.getString(1));\n\t select.setVpcodciadescia(r.getString(2) + \" - \" + r.getString(1));\n\t select.setVcedula(r.getString(4));\n\t select.setVcoduser(r.getString(3));\n\t select.setVcluser(r.getString(5));\n\t select.setVmail(r.getString(6));\n\t select.setPcodcia(r.getString(2));\n\t select.setVnbr(r.getString(7));\n\t select.setVcodrol(r.getString(8));\n\t select.setVgrupo(r.getString(9));\n\t \t//Agrega la lista\n\t \tlist.add(select);\n\t }\n\t //Cierra las conecciones\n\t pstmt.close();\n\t con.close();\n\t r.close();\n\t \n\t \t}", "public RecordLedgerSelectionEvent(RecordLedgerTable source) {\n super(source);\n selectionEmpty = source.getSelectionModel().isSelectionEmpty();\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "SELECT createSELECT();", "public void testEmbeddedSelect() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName,\" + \"(SELECT COUNT(c.ColumnName) FROM AD_Column c WHERE t.AD_Table_ID=c.AD_Table_ID) \" + \"FROM AD_Table t WHERE t.IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Column=c|AD_Table=t|1]\", fixture.toString());\n }", "@Override\r\n public PreparedStatement prepareStatement(DatabaseQueryBuilder query) throws SQLException {\r\n final PreparedStatement ps = super.prepareStatement(query);\r\n ps.setQueryTimeout(OracleERPUtil.ORACLE_TIMEOUT);\r\n return ps;\r\n }", "@Override\n protected void processSelect() {\n \n }", "public Exp createBind(Expression exp, Variable var){\r\n if (var.getVariableList() != null){\r\n // bind (sql() as ())\r\n return createASTBind(exp, var);\r\n }\r\n else {\r\n return Binding.create(exp, var);\r\n }\r\n }", "@Test void testInterpretProjectFilterValues() {\n final String sql = \"select y, x\\n\"\n + \"from (values (1, 'a'), (2, 'b'), (3, 'c')) as t(x, y)\\n\"\n + \"where x > 1\";\n sql(sql).returnsRows(\"[b, 2]\", \"[c, 3]\");\n }", "public boolean setSelection(final Object source, final DataPointer ptr) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"setSelection: {}\", ptr);\n }\n\n if (!ObjectUtils.areEquals(ptr, selectedDataPointer)) {\n // Maybe leak ?\n this.selectedDataPointer = ptr;\n\n // Fire to all listeners:\n fireSelectionChanged(source, null);\n return true;\n }\n return false;\n }", "void bind(final Value val, final QueryContext qc) throws QueryException {\n if(external && !compiled) {\n value = declType == null || declType.instance(val) ? val :\n declType.cast(val, true, qc, sc, info);\n expr = value;\n }\n }", "DataSelector getDataSelector(SqlSearch search) throws FxSqlSearchException;", "public String bind(Object value, ArrayList params) {\n if (value == null) {\n return bindNull();\n } else if (value instanceof String &&\n ((String) value).length() < 100) {\n \n // Use prepared statement parameters sparingly,\n // since some JDBC drivers have issues with them\n // (Oracle JDBC protocol violations for example)\n return cond(column, operator, literal((String) value));\n } else if (value instanceof Array) {\n return bindData((Array) value, params);\n } else if (value instanceof Date) {\n params.add(new java.sql.Timestamp(((Date) value).getTime()));\n return cond(column, operator, \"?\");\n } else {\n params.add(value);\n return cond(column, operator, \"?\");\n }\n }", "public void select();", "Source createDatasourceOAI(Source ds, Provider prov) throws RepoxException;", "public void select()\n {\n super.select();\n SwingUtilities.invokeLater(() -> _sqlPanel.getSQLEntryPanel().requestFocus());\n }", "private void refreshData() {\n try {\n setDataSource(statement.executeQuery(\"select * from \" + sourceTableName));\n } catch (SQLException e) {\n System.err.println(\"Can't execute statement\");\n e.printStackTrace();\n }\n }", "protected boolean addFilter4Select(final Parameter _parameter,\n final IFilter _filter,\n final QueryBuilder _queryBldr,\n final Type _type,\n final String _select)\n throws EFapsException\n {\n boolean ret = true;\n if (_filter instanceof IMapFilter) {\n final Map<?, ?> inner = (IMapFilter) _filter;\n final String from = (String) inner.get(\"from\");\n final boolean validFrom = from != null && !from.isEmpty() ? true : false;\n final String to = (String) inner.get(\"to\");\n final boolean validTo = to != null && !to.isEmpty() ? true : false;\n final Object[] filter = getFilter(Field.get(_filter.getFieldId()));\n\n if (validFrom || !validFrom && filter != null || validFrom && validTo || !validFrom && !validTo\n && filter != null) {\n final String[] parts = _select.split(\"\\\\.\");\n final List<String> lstParts = new ArrayList<>();\n for (final String part : parts) {\n lstParts.add(part);\n }\n if (_select.startsWith(\"class\")) {\n final String typeStr = lstParts.get(0).substring(6, lstParts.get(0).length() - 1);\n final Classification classification = (Classification) Type.get(typeStr);\n final AttributeQuery attrQuery = evaluateFilterSelect(_parameter, inner, lstParts, 1,\n classification, from, to, filter);\n\n _queryBldr.addWhereAttrInQuery(\"ID\", attrQuery);\n } else if (_select.startsWith(\"linkto\")) {\n final String attrName = lstParts.get(0).substring(7, lstParts.get(0).length() - 1);\n final Attribute attr = _type.getAttribute(attrName);\n final AttributeQuery attrQuery = evaluateFilterSelect(_parameter, inner, lstParts, 1, attr\n .getLink(), from, to, filter);\n\n _queryBldr.addWhereAttrInQuery(attrName, attrQuery);\n } else if (_select.startsWith(\"linkfrom\")) {\n final String[] parts2 = lstParts.get(0).split(\"#\");\n final String typeStr = parts2[0].substring(9);\n final Type type = Type.get(typeStr);\n final String attrName = parts2[1].substring(0, parts2[1].length() - 1);\n final AttributeQuery attrQuery2 = evaluateFilterSelect(_parameter, inner, lstParts, 1, type, from,\n to, filter);\n\n final QueryBuilder attrQueryBldr = new QueryBuilder(type);\n attrQueryBldr.addWhereAttrInQuery(\"ID\", attrQuery2);\n final AttributeQuery attrQuery = attrQueryBldr.getAttributeQuery(attrName);\n _queryBldr.addWhereAttrInQuery(\"ID\", attrQuery);\n }\n } else {\n ret = false;\n }\n }\n return ret;\n }", "private static void OnSourceChanged(Object sender, SourceChangedEventArgs args)\r\n { \r\n OnToggleInsert(sender, null);\r\n }", "public void selectQuery(String query) {\n\t\tQuery q = QueryFactory.create(query);\n\t\tQueryExecution qe = QueryExecutionFactory.create(q, model);\n\t\tResultSet result = qe.execSelect();\n\t\tprintResultSet(result);\n\t\tqe.close();\n\t}", "ProcurementSource selectByPrimaryKey(Integer id);", "@Test\n public void testNamedParamWithImmediateValue() {\n List<Long> ids = Arrays.asList(10L, 5L);\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1, ids);\n\n validate(\" from Person hobj1 where hobj1.id in (:np1)\", ids);\n }", "boolean simpleBind(Filter f){\n// List<String> list = f.getVariables();\n// \n// for (Exp exp : this){\n// if (exp.isEdge() || exp.isPath() || exp.isValues() || exp.isBind()){\n// \n// }\n// }\n \n return true;\n }", "public void select ();", "public void finalPass() throws Exception {\n if (_CommandText != null)\n _CommandText.finalPass();\n \n if (_QueryParameters != null)\n _QueryParameters.finalPass();\n \n // verify the data source\n DataSourceDefn ds = null;\n if (OwnerReport.getDataSourcesDefn() != null && OwnerReport.getDataSourcesDefn().getItems() != null)\n {\n ds = OwnerReport.getDataSourcesDefn().get___idx(_DataSourceName);\n }\n \n if (ds == null)\n {\n OwnerReport.rl.logError(8,\"Query references unknown data source '\" + _DataSourceName + \"'\");\n return ;\n }\n \n _DataSourceDefn = ds;\n IDbConnection cnSQL = ds.sqlConnect(null);\n if (cnSQL == null || _CommandText == null)\n return ;\n \n // Treat this as a SQL statement\n String sql = _CommandText.evaluateString(null,null);\n IDbCommand cmSQL = null;\n IDataReader dr = null;\n try\n {\n cmSQL = cnSQL.CreateCommand();\n cmSQL.CommandText = addParametersAsLiterals(null,cnSQL,sql,false);\n if (this._QueryCommandType == QueryCommandTypeEnum.StoredProcedure)\n cmSQL.CommandType = CommandType.StoredProcedure;\n \n addParameters(null,cnSQL,cmSQL,false);\n dr = cmSQL.ExecuteReader(CommandBehavior.SchemaOnly);\n if (dr.FieldCount < 10)\n _Columns = new ListDictionary();\n else\n // Hashtable is overkill for small lists\n _Columns = new Hashtable(dr.FieldCount); \n for (int i = 0;i < dr.FieldCount;i++)\n {\n QueryColumn qc = new QueryColumn(i, dr.GetName(i), Type.GetTypeCode(dr.GetFieldType(i)));\n try\n {\n _Columns.Add(qc.colName, qc);\n }\n catch (Exception __dummyCatchVar0)\n {\n // name has already been added to list:\n // According to the RDL spec SQL names are matched by Name not by relative\n // position: this seems wrong to me and causes this problem; but\n // user can fix by using \"as\" keyword to name columns in Select\n // e.g. Select col as \"col1\", col as \"col2\" from tableA\n OwnerReport.rl.LogError(8, String.Format(\"Column '{0}' is not uniquely defined within the SQL Select columns.\", qc.colName));\n }\n \n }\n }\n catch (Exception e)\n {\n OwnerReport.rl.logError(4,\"SQL Exception during report compilation: \" + e.Message + \"\\r\\nSQL: \" + sql);\n }\n finally\n {\n if (cmSQL != null)\n {\n cmSQL.Dispose();\n if (dr != null)\n dr.Close();\n \n }\n \n }\n return ;\n }", "private void selectOperator() {\n String query = \"\";\n System.out.print(\"Issue the Select Query: \");\n query = sc.nextLine();\n query.trim();\n if (query.substring(0, 6).compareToIgnoreCase(\"select\") == 0) {\n sqlMngr.selectOp(query);\n } else {\n System.err.println(\"No select statement provided!\");\n }\n }", "public void setDatasource(String val)\r\n\t{\r\n\t\t_dataSource = val;\r\n\t}", "public void select(String data, String objectName) {\n\t\n}", "Object executeSelectQuery(String sql) { return null;}", "private void executeSelect(String query){\n try {\n statement = connection.createStatement();\n rs = statement.executeQuery(query);\n } catch (SQLException e) {\n throw new RuntimeException(e);\n } \n }", "public void testKeepSelectionOnFilterChange() {\n JXTable table = new JXTable(ascendingModel);\n int selectedRow = 0;\n table.setRowSelectionInterval(selectedRow, selectedRow);\n // sanity assert\n assertEquals(selectedRow, table.getSelectedRow());\n PatternFilter filter = new PatternFilter(\".*\", 0, 0);\n table.setFilters(new FilterPipeline(new Filter[] {filter}));\n assertEquals(ascendingModel.getRowCount(), table.getRowCount());\n assertEquals(\"table must keep selection after setting filter\", selectedRow, table.getSelectedRow());\n }", "public void testConjunctionInQueryVarResolvesWhenBindingsMatch() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), f(x)], (?- f(X), g(X)), [[X <-- x]]]\");\n }", "public boolean requiresSelectVarious() {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void bindParameters() {\n\n\t}", "@Test\n public void testVisit_PlainSelect() throws JSQLParserException {\n String sql = \"select a,b,c from test\";\n Select select = (Select) parserManager.parse(new StringReader(sql));\n final AddAliasesVisitor instance = new AddAliasesVisitor();\n select.accept(instance);\n\n assertEquals(\"SELECT a AS A1, b AS A2, c AS A3 FROM test\", select.toString());\n }", "@Override\n SqlSelect wrapSelect(SqlNode node) {\n throw new UnsupportedOperationException();\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionContext\");\n String[] stringArray0 = new String[4];\n String string0 = SQLUtil.renderQuery(defaultDBTable0, stringArray0, stringArray0);\n assertEquals(\"SELECT * FROM org.apache.derby.iapi.sql.execute.ExecutionContext WHERE null = null AND null = null AND null = null AND null = null\", string0);\n }", "@Test\n\tpublic void testBooleanTrueSingleSource() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query03.rq\", \"/tests/basic/query03.srx\", false);\n\t}", "@Test\n public void selectChainedView() throws Exception {\n final Properties connectionProps = new Properties();\n connectionProps.setProperty(USER, TestInboundImpersonation.PROXY_NAME);\n connectionProps.setProperty(PASSWORD, TestInboundImpersonation.PROXY_PASSWORD);\n connectionProps.setProperty(IMPERSONATION_TARGET, TestInboundImpersonation.TARGET_NAME);\n BaseTestQuery.updateClient(connectionProps);\n BaseTestQuery.testBuilder().sqlQuery(\"SELECT * FROM %s.u0_lineitem ORDER BY l_orderkey LIMIT 1\", BaseTestImpersonation.getWSSchema(TestInboundImpersonation.OWNER)).ordered().baselineColumns(\"l_orderkey\", \"l_partkey\").baselineValues(1, 1552).go();\n }", "@Override\n\tpublic void select() {\n\t}", "public interface StatementHandler {\n void supplyToStatement(PreparedStatement statement);\n}", "Source createDatasourceHttp(Source ds, Provider prov) throws RepoxException;" ]
[ "0.61503154", "0.6131158", "0.59678674", "0.59135926", "0.5567262", "0.5564245", "0.5453289", "0.5410613", "0.53769016", "0.53320384", "0.53304935", "0.5311488", "0.5309586", "0.5289883", "0.5287984", "0.5284279", "0.52745736", "0.5249862", "0.5188447", "0.5172373", "0.5170993", "0.51384115", "0.5131901", "0.5087758", "0.5082674", "0.5072597", "0.5068139", "0.5046075", "0.504366", "0.5038055", "0.5030781", "0.50096375", "0.50069773", "0.49909112", "0.49652886", "0.4964453", "0.49475887", "0.49445128", "0.49436235", "0.4928554", "0.49270427", "0.4918927", "0.49105883", "0.48790103", "0.48764554", "0.48755783", "0.48690587", "0.48604998", "0.48565167", "0.4849816", "0.48482412", "0.48397672", "0.4826309", "0.4818976", "0.48181298", "0.48166206", "0.48099783", "0.4806829", "0.48065218", "0.48048204", "0.48037738", "0.4803121", "0.48004633", "0.47999373", "0.47960156", "0.4792168", "0.47823185", "0.4778076", "0.47746786", "0.47732216", "0.47725978", "0.4766769", "0.47643238", "0.47642732", "0.47608837", "0.47564128", "0.4748639", "0.47475138", "0.47393903", "0.47382978", "0.47376502", "0.47374997", "0.4730883", "0.47206658", "0.4717785", "0.4715863", "0.4708943", "0.47085798", "0.47079626", "0.47035173", "0.4694247", "0.4690442", "0.46854624", "0.46831363", "0.46821737", "0.4681489", "0.46711984", "0.46704844", "0.46681538", "0.4664901" ]
0.66427153
0
/ test query with custom RDF handler
@Test public void testPassThroughHandler_MultiSourceQuery() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); try (RepositoryConnection conn = fedxRule.getRepository().getConnection()) { // SELECT query TupleQuery tq = conn .prepareTupleQuery( "SELECT ?person ?interest WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name ; <http://xmlns.com/foaf/0.1/interest> ?interest }"); tq.setBinding("name", l("Alan")); AtomicBoolean started = new AtomicBoolean(false); AtomicInteger numberOfResults = new AtomicInteger(0); tq.evaluate(new AbstractTupleQueryResultHandler() { @Override public void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException { if (started.get()) { throw new IllegalStateException("Must not start query result twice."); } started.set(true); /* * Expected trace looks like this java.lang.Exception at * org.eclipse.rdf4j.federated.BasicTests$1.startQueryResult(BasicTests.java:276) at * org.eclipse.rdf4j.query.QueryResults.report(QueryResults.java:263) at * org.eclipse.rdf4j.federated.structures.FedXTupleQuery.evaluate(FedXTupleQuery.java:69) */ Assertions.assertEquals(QueryResults.class.getName(), new Exception().getStackTrace()[1].getClassName()); } @Override public void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException { Assertions.assertEquals(bs.getValue("person"), iri("http://example.org/", "a")); Assertions.assertEquals(bs.getValue("interest").stringValue(), "SPARQL 1.1 Basic Federated Query"); numberOfResults.incrementAndGet(); }; }); Assertions.assertTrue(started.get()); Assertions.assertEquals(1, numberOfResults.get()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testWriteRDF() {\n\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.is_a(),NEURON), \"subclass\");\n\n\t\trunQuery(new LinkQueryTerm(MELANOCYTE),\"any link\");\n\t\t\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.part_of(),MELANOCYTE),\"part_of (class)\");\n\t\t\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.inheres_in(),\tnew LinkQueryTerm(relationVocabulary.part_of(),HUMAN_EYE)),\"phenotype in some part of the eye\");\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(MELANOCYTE),\"anything annotated to melanocyte\");\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(new LinkQueryTerm(relationVocabulary.inheres_in(),\tMELANOCYTE)),\"anything annotated to a melanocyte phenotype\");\n\t\t\n\t\tQueryTerm classQt =\tnew BooleanQueryTerm(new LinkQueryTerm(relationVocabulary.inheres_in(),NEURON),\tnew LinkQueryTerm(relationVocabulary.inheres_in(),BEHAVIOR));\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(classQt),\"boolean query\");\n\n\n\t}", "public static void main (String[] args) {\n EntityQuery query = new EntityQuery();\n Harvestable res = new OaiPmhResource();\n query.setFilter(\"test\", res);\n query.setAcl(\"diku\");\n query.setStartsWith(\"cf\",\"name\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"a\"));\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"x\"));\n\n query = new EntityQuery();\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"b\"));\n query.setQuery(\"usedBy=*library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"c\"));\n query.setQuery(\"(=library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"d\"));\n query.setQuery(\"usedBy=\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"e\"));\n query.setQuery(\"(usedBy!=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"f\"));\n query.setQuery(\"(usedBy==library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"g\"));\n query.setQuery(\"(usedBy===library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"h\"));\n }", "public void testDynamizePredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 100);\n\n part.setInsDyn(0.5);\n part.setDelDyn(0.1);\n \n part.dynamizePredicate(\"<http://dbpedia.org/ontology/deathPlace>\");\n\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n\n assertEquals(140,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "Object executeQuery(String sparqlQuery);", "@Test\n\tpublic void testSparqlQuery() throws OWLOntologyCreationException,\n\t\t\tIOException {\n\t\tInputStream ontStream = LDLPReasonerTest.class\n\t\t\t\t.getResourceAsStream(\"/data/university0-0.owl\");\n\t\tOWLOntologyManager manager = OWLManager.createOWLOntologyManager();\n\t\tOWLOntology ontology = manager\n\t\t\t\t.loadOntologyFromOntologyDocument(ontStream);\n\n\t\tInputStream queryStream = LDLPReasonerTest.class\n\t\t\t\t.getResourceAsStream(\"/data/lubm-query4.sparql\");\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tqueryStream));\n\t\tString line;\n\t\tString queryText = \"\";\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tqueryText = queryText + line + \"\\n\";\n\t\t}\n\n\t\tQuery query = QueryFactory.create(queryText, Syntax.syntaxARQ);\n\t\tLDLPReasoner reasoner = new LDLPReasoner(ontology);\n\t\tList<Literal> results = reasoner.executeQuery(query);\n\t\tSystem.out.println(results.size() + \" answers :\");\n\t\tfor (Literal result : results) {\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\tLDLPCompilerManager m = LDLPCompilerManager.getInstance();\n\n\t\t// m.dump();\n\n\t}", "@Test\n public void example13 () throws Exception {\n Map<String, Stmt> inputs = example2setup();\n conn.setNamespace(\"ex\", \"http://example.org/people/\");\n conn.setNamespace(\"ont\", \"http://example.org/ontology/\");\n String prefix = \"PREFIX ont: \" + \"<http://example.org/ontology/>\\n\";\n \n String queryString = \"select ?s ?p ?o where { ?s ?p ?o} \";\n TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"SELECT result:\", inputs.values(),\n statementSet(tupleQuery.evaluate()));\n \n assertTrue(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"Alice\\\" } \").evaluate());\n assertFalse(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"NOT Alice\\\" } \").evaluate());\n \n queryString = \"construct {?s ?p ?o} where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery constructQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Construct result\",\n mapKeep(new String[] {\"an\"}, inputs).values(),\n statementSet(constructQuery.evaluate()));\n \n queryString = \"describe ?s where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery describeQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Describe result\",\n mapKeep(new String[] {\"an\", \"at\"}, inputs).values(),\n statementSet(describeQuery.evaluate()));\n }", "@RequestMapping(value = \"/queryrdf\", method = {RequestMethod.GET, RequestMethod.POST})\n public void queryRdf(@RequestParam(\"query\") final String query,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_QUERY_AUTH, required = false) String auth,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_CV, required = false) final String vis,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_INFER, required = false) final String infer,\n @RequestParam(value = \"nullout\", required = false) final String nullout,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_RESULT_FORMAT, required = false) final String emit,\n @RequestParam(value = \"padding\", required = false) final String padding,\n @RequestParam(value = \"callback\", required = false) final String callback,\n final HttpServletRequest request,\n final HttpServletResponse response) {\n SailRepositoryConnection conn = null;\n final Thread queryThread = Thread.currentThread();\n auth = StringUtils.arrayToCommaDelimitedString(provider.getUserAuths(request));\n final Timer timer = new Timer();\n timer.schedule(new TimerTask() {\n\n @Override\n public void run() {\n log.debug(\"interrupting\");\n queryThread.interrupt();\n\n }\n }, QUERY_TIME_OUT_SECONDS * 1000);\n\n try {\n final ServletOutputStream os = response.getOutputStream();\n conn = repository.getConnection();\n\n final Boolean isBlankQuery = StringUtils.isEmpty(query);\n final ParsedOperation operation = QueryParserUtil.parseOperation(QueryLanguage.SPARQL, query, null);\n\n final Boolean requestedCallback = !StringUtils.isEmpty(callback);\n final Boolean requestedFormat = !StringUtils.isEmpty(emit);\n\n if (!isBlankQuery) {\n if (operation instanceof ParsedGraphQuery) {\n // Perform Graph Query\n final RDFHandler handler = new RDFXMLWriter(os);\n response.setContentType(\"text/xml\");\n performGraphQuery(query, conn, auth, infer, nullout, handler);\n } else if (operation instanceof ParsedTupleQuery) {\n // Perform Tuple Query\n TupleQueryResultHandler handler;\n\n if (requestedFormat && emit.equalsIgnoreCase(\"json\")) {\n handler = new SPARQLResultsJSONWriter(os);\n response.setContentType(\"application/json\");\n } else {\n handler = new SPARQLResultsXMLWriter(os);\n response.setContentType(\"text/xml\");\n }\n\n performQuery(query, conn, auth, infer, nullout, handler);\n } else if (operation instanceof ParsedUpdate) {\n // Perform Update Query\n performUpdate(query, conn, os, infer, vis);\n } else {\n throw new MalformedQueryException(\"Cannot process query. Query type not supported.\");\n }\n }\n\n if (requestedCallback) {\n os.print(\")\");\n }\n } catch (final Exception e) {\n log.error(\"Error running query\", e);\n throw new RuntimeException(e);\n } finally {\n if (conn != null) {\n try {\n conn.close();\n } catch (final RepositoryException e) {\n log.error(\"Error closing connection\", e);\n }\n }\n }\n\n timer.cancel();\n }", "public interface SparqlQueryService {\n\n\t/**\n\t * Generic method to invoke a supplied query regardless of its type. The\n\t * client has to inspect and cast the result object accordingly.\n\t * \n\t * @param name\n\t * @param params\n\t * @return\n\t */\n\tObject executeQuery(String sparqlQuery);\n\n\t/**\n\t * Generic method to invoke a query regardless of its type. The client has\n\t * to inspect and cast the result object accordingly.\n\t * \n\t * @param name\n\t * @param params\n\t * @return\n\t */\n\tObject callQuery(String name, Map<String, String> params);\n\n\t/**\n\t * Invocation of a SPARQL SELECT query. The resultant JSON structure is\n\t * serialized according to the W3C SPARQL 1.1 Query Results JSON Format.\n\t * \n\t * @see http://www.w3.org/TR/sparql11-query/#select\n\t * @param name\n\t * @param params\n\t * @return JSON result structure.\n\t */\n\tSparqlResultObject callSelectQuery(String name, Map<String, String> params);\n\n\t/**\n\t * Invocation of a SPARQL CONSTRUCT query resulting in new graph serialized\n\t * according to RDF/JSON format\n\t * (http://jena.apache.org/documentation/io/rdf-json.html).\n\t * \n\t * \n\t * @see http://www.w3.org/TR/sparql11-query/#construct\n\t * @param name\n\t * @param params\n\t * @return\n\t */\n\tGraph callConstructQuery(String name, Map<String, String> params);\n\n\t/**\n\t * Invocation of a SPARQL ASK query resulting in a boolean value.\n\t * \n\t * @see\n\t * \n\t * @param name\n\t * Unique name of the query.\n\t * @param params\n\t * Map of required parameter-value pairs.\n\t * @return true or false, depending whether the pattern matches.\n\t */\n\tBoolean callAskQuery(String name, Map<String, String> params);\n\n}", "public void test_afs_01() {\n String sourceT =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'\"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <owl:Class rdf:about='http://example.org/foo#A'>\"\n + \" </owl:Class>\"\n + \"</rdf:RDF>\";\n \n String sourceA =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' \"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <rdf:Description rdf:about='http://example.org/foo#x'>\"\n + \" <rdf:type rdf:resource='http://example.org/foo#A' />\"\n + \" </rdf:Description>\"\n + \"</rdf:RDF>\";\n \n Model tBox = ModelFactory.createDefaultModel();\n tBox.read(new ByteArrayInputStream(sourceT.getBytes()), \"http://example.org/foo\");\n \n Model aBox = ModelFactory.createDefaultModel();\n aBox.read(new ByteArrayInputStream(sourceA.getBytes()), \"http://example.org/foo\");\n \n Reasoner reasoner = ReasonerRegistry.getOWLReasoner();\n reasoner = reasoner.bindSchema(tBox);\n \n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM_RULE_INF);\n spec.setReasoner(reasoner);\n \n OntModel m = ModelFactory.createOntologyModel(spec, aBox);\n \n List inds = new ArrayList();\n for (Iterator i = m.listIndividuals(); i.hasNext();) {\n inds.add(i.next());\n }\n \n assertTrue(\"x should be an individual\", inds.contains(m.getResource(\"http://example.org/foo#x\")));\n \n }", "@Test\n public void queryWithOneInnerQueryCreate() throws IOException {\n BaseFuseClient fuseClient = new BaseFuseClient(\"http://localhost:8888/fuse\");\n //query request\n CreateQueryRequest request = new CreateQueryRequest();\n request.setId(\"1\");\n request.setName(\"test\");\n request.setQuery(Q1());\n //submit query\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .body(request)\n .post(\"/fuse/query\")\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1/cursor\"));\n assertEquals(1,queryResourceInfo.getInnerUrlResourceInfos().size());\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(201)\n .contentType(\"application/json;charset=UTF-8\");\n\n //get query resource by id\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .get(\"/fuse/query/\"+request.getId()+\"->\"+Q2().getName())\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(200)\n .contentType(\"application/json;charset=UTF-8\");\n\n\n }", "public static void main( String[] args ) {\n\n Model m = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RDFS_INF);\n\n\n FileManager.get().readModel( m, owlFile );\n String myOntologyName = \"http://www.w3.org/2002/07/owl#\";\n String myOntologyNS = \"http://www.w3.org/2002/07/owl#\";\n////\n////\n// String rdfPrefix = \"PREFIX rdf: <\"+RDF.getURI()+\">\" ;\n// String myOntologyPrefix = \"PREFIX \"+myOntologyName+\": <\"+myOntologyNS+\">\" ;\n// String myOntologyPrefix1 = \"PREFIX \"+myOntologyName ;\n String myOntologyPrefix2 = \"prefix pizza: <http://www.w3.org/2002/07/owl#> \";\n//\n//\n//// String queryString = myOntologyPrefix + NL\n//// + rdfPrefix + NL +\n//// \"SELECT ?subject\" ;\n \n String queryString = rdfPrefix + myOntologyPrefix2 +\n// \t\t \"prefix pizza: <http://www.w3.org/2002/07/owl#> \"+ \n \t\t \"prefix rdfs: <\" + RDFS.getURI() + \"> \" +\n \t\t \"prefix owl: <\" + OWL.getURI() + \"> \" +\n// \t\t \"select ?o where {?s ?p ?o}\";\n \n//\t\t\t\t\t\t\"select ?s where {?s rdfs:label \"苹果\"@zh}\";\n \n// \"SELECT ?label WHERE { ?subject rdfs:label ?label }\" ;\n// \"SELECT DISTINCT ?predicate ?label WHERE { ?subject ?predicate ?object. ?predicate rdfs:label ?label .}\";\n// \"SELECT DISTINCT ?s WHERE {?s rdfs:label \\\"Italy\\\"@en}\" ;\n// \"SELECT DISTINCT ?s WHERE {?s rdfs:label \\\"苹果\\\"@zh}\" ;\n// \"SELECT DISTINCT ?s WHERE\" +\n// \"{?object rdfs:label \\\"水果\\\"@zh.\" +\n// \"?subject rdfs:subClassOf ?object.\" +\n// \"?subject rdfs:label ?s}\";\n //星号是转义字符,分号是转义字符\n\t\t\t\t\"SELECT DISTINCT ?e ?s WHERE {?entity a ?subject.?subject rdfs:subClassOf ?object.\"+\n \"?object rdfs:label \\\"富士苹果\\\"@zh.?entity rdfs:label ?e.?subject rdfs:label ?s}ORDER BY ?s\";\n \t\t\n\n \n \t\tcom.hp.hpl.jena.query.Query query = QueryFactory.create(queryString);\n \t\tQueryExecution qe = QueryExecutionFactory.create(query, m);\n \t\tcom.hp.hpl.jena.query.ResultSet results = qe.execSelect();\n\n \t\tResultSetFormatter.out(System.out, results, query);\n \t\tqe.close();\n\n// Query query = QueryFactory.create(queryString) ;\n\n query.serialize(new IndentedWriter(System.out,true)) ;\n System.out.println() ;\n\n\n\n QueryExecution qexec = QueryExecutionFactory.create(query, m) ;\n\n try {\n\n ResultSet rs = qexec.execSelect() ;\n\n\n for ( ; rs.hasNext() ; ){\n QuerySolution rb = rs.nextSolution() ;\n RDFNode y = rb.get(\"person\");\n System.out.print(\"name : \"+y+\"--- \");\n Resource z = (Resource) rb.getResource(\"person\");\n System.out.println(\"plus simplement \"+z.getLocalName());\n }\n }\n finally{\n qexec.close() ;\n }\n }", "void doTests() {\n\t\tString doc = \"\", r = \"\";\n\n\t\tDomeoPermissions dp3 = new DomeoPermissions(\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnew String[] { \"urn:group:uuid:4028808c3dccfe48013dccfe95ea0005 1\" });\n\t\tr = getDocument(\"1\", false, dp3);\n\n\t\tr = termQuery(\"domeo_!DOMEO_NS!_agents.@type\", \"foafx:Person\", 0, 10,\n\t\t\t\tfalse, dp3);\n\n\t\tr = phraseQuery(\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_context.ao_!DOMEO_NS!_hasSelector.ao_!DOMEO_NS!_suffix\",\n\t\t\t\t\"enabling application\", 0, 10, false, dp3);\n\n\t\tdp3 = new DomeoPermissions(\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnew String[] { \"urn:group:uuid:4028808c3dccfe48013dccfe95ea0005 1\" });\n\t\tr = query(\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_context.ao_!DOMEO_NS!_hasSelector.ao_!DOMEO_NS!_suffix\",\n\t\t\t\t\"enabling application\", 0, 10, false, dp3);\n\n\t\t// Test: Term (keyword) query\n\t\t// r = termQuery(\"domeo_!DOMEO_NS!_agents.@type\", \"foafx:Person\", 0, 10,\n\t\t// dp);\n\n\t\t// Test: Phrase query\n\t\tr = phraseQuery(\"dct_!DOMEO_NS!_description\", \"created automatically\",\n\t\t\t\t0, 10, false, dp3);\n\n\t\t// Test: Delete a document\n\t\t// r = deleteDocument(\"7TdnuBsjTjWaTcbW7RVP3Q\");\n\n\t\t// Test: Generic boolean query: 4 fields (3 keyword fields, 1 parsed\n\t\t// field)\n\n\t\tString[] fields = { \"ao_!DOMEO_NS!_item.@type\",\n\t\t\t\t\"ao_!DOMEO_NS!_item.@id\",\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_body.@type\",\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_body.cnt_!DOMEO_NS!_chars\" };\n\t\tString[] vals = { \"ao:Highlight\",\n\t\t\t\t\"urn:domeoclient:uuid:D3062173-8E53-41E9-9248-F0B8A7F65E5B\",\n\t\t\t\t\"cnt:ContentAsText\", \"paolo\" };\n\t\tString[] parsed = { \"term\", \"term\", \"term\", \"match\" };\n\t\tr = booleanQueryMultipleFields(fields, vals, parsed, \"and\", 0, 10,\n\t\t\t\tfalse, dp3);\n\n\t\t// Test: Single field boolean query\n\t\tr = booleanQuerySingleParsedField(\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_context.ao_!DOMEO_NS!_hasSelector.ao_!DOMEO_NS!_suffix\",\n\t\t\t\t\"formal biomedical ontologies\", \"or\", 0, 10, false, null);\n\n\t\t// Test: Retrieve a single doc by id\n\t\tr = getDocument(\"aviMdI48QkSGOhQL6ncMZw\", false, null);\n\n\t\t// Test: insert a document, return it's auto-assigned id\n\t\tdoc = \"{ \\\"f1\\\" : \\\"field value one\\\", \\\"f2\\\" : \\\"field value two\\\" }\";\n\t\tr = insertDocument(doc);\n\n\t\t// Test: insert a doc with specified id (replace if already present)\n\t\tdoc = \"{ \\\"f1\\\" : \\\"field value one\\\", \\\"f2\\\" : \\\"field value two\\\" }\";\n\t\tr = insertDocument(doc, \"5\");\n\t\tSystem.out.println(r);\n\n\t\t// Test: insert json document and try to remove it\n\t\tdoc = readSampleJsonDoc(\"/temp/sample_domeo_doc.json\");\n\t\tSystem.out.println(doc);\n\t\tr = insertDocument(doc);\n\t}", "Query query();", "@Test\n public void example10 () throws Exception {\n ValueFactory f = repo.getValueFactory();\n String exns = \"http://example.org/people/\";\n URI alice = f.createURI(exns, \"alice\");\n URI bob = f.createURI(exns, \"bob\");\n URI ted = f.createURI(exns, \"ted\"); \n URI person = f.createURI(\"http://example.org/ontology/Person\");\n URI name = f.createURI(\"http://example.org/ontology/name\");\n Literal alicesName = f.createLiteral(\"Alice\");\n Literal bobsName = f.createLiteral(\"Bob\");\n Literal tedsName = f.createLiteral(\"Ted\"); \n URI context1 = f.createURI(exns, \"cxt1\"); \n URI context2 = f.createURI(exns, \"cxt2\"); \n conn.add(alice, RDF.TYPE, person, context1);\n conn.add(alice, name, alicesName, context1);\n conn.add(bob, RDF.TYPE, person, context2);\n conn.add(bob, name, bobsName, context2);\n conn.add(ted, RDF.TYPE, person);\n conn.add(ted, name, tedsName);\n \n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2),\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(conn.getStatements(null, null, null, false)));\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2)\n }),\n statementSet(conn.getStatements(null, null, null, false, context1, context2)));\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2),\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(conn.getStatements(null, null, null, false, null, context2)));\n \n // testing named graph query\n DatasetImpl ds = new DatasetImpl();\n ds.addNamedGraph(context1);\n ds.addNamedGraph(context2);\n TupleQuery tupleQuery = conn.prepareTupleQuery(\n QueryLanguage.SPARQL, \"SELECT ?s ?p ?o ?g WHERE { GRAPH ?g {?s ?p ?o . } }\");\n tupleQuery.setDataset(ds);\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2)\n }),\n statementSet(tupleQuery.evaluate()));\n \n ds = new DatasetImpl();\n ds.addDefaultGraph(null);\n tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, \"SELECT ?s ?p ?o WHERE {?s ?p ?o . }\");\n tupleQuery.setDataset(ds);\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(tupleQuery.evaluate()));\n }", "public void testInsertPredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 10);\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n assertEquals(10,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "@Test\n\tpublic void testPassThroughHandler_SingleSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name . }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace is expected to come from some original repository (e.g. SPARQL) => we explicitly\n\t\t\t\t\t * do not expect QueryResults#report to be the second element (compare test\n\t\t\t\t\t * testPassThroughHandler_MultiSourceQuery)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertNotEquals(QueryResults.class, new Exception().getStackTrace()[1].getClass());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"person\"), iri(\"http://example.org/\", \"a\"));\n\t\t\t\t\tnumberOfResults.incrementAndGet();\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(1, numberOfResults.get());\n\t\t}\n\t}", "@Test\n\tpublic void queryTest(){\n\t\tQueryableRequestSpecification queryableRequestSpecification = SpecificationQuerier.query(requestSpecification);\n\t\tSystem.out.println(\"Printing specification parameters: \" +queryableRequestSpecification.getBaseUri());\n\t}", "@Test\n void testAndFilter() {\n Query q = newQueryFromEncoded(\"?query=trump\" +\n \"&model.type=all\" +\n \"&model.defaultIndex=text\" +\n \"&filter=%2B%28filterattribute%3Afrontpage_US_en-US%29\");\n assertEquals(\"AND text:trump |filterattribute:frontpage_US_en-US\",\n q.getModel().getQueryTree().toString());\n }", "@Test\n public void test() throws Exception {\n\n ModelObjectSearchService.addNoSQLServer(Address.class, new SolrRemoteServiceImpl(\"http://dr.dk\"));\n\n\n\n Address mock = NQL.mock(Address.class);\n NQL.search(mock).search(\n\n NQL.all(\n NQL.has(mock.getArea(), NQL.Comp.LIKE, \"Seb\"),\n NQL.has(\"SebastianRaw\")\n\n )\n\n ).addStats(mock.getZip()).getFirst();\n\n\n// System.out.println(\"inline query: \" + NQL.search(mock).search(mock.getA().getFunnyD(), NQL.Comp.EQUAL, 0.1d).());\n// System.out.println(\"normal query: \" + NQL.search(mock).search(mock.getArea(), NQL.Comp.EQUAL, \"area\").buildQuery());\n }", "private Nodes xPathQuery(String query)\r\n \t{\r\n \t\treturn document.query(query, context);\r\n \t}", "@Test\n public void testPhrase() {\n assertQ(req(\"q\",\"text:now-cow\", \"indent\",\"true\")\n ,\"//*[@numFound='1']\"\n );\n // should generate a query of (now OR cow) and match both docs\n assertQ(req(\"q\",\"text_np:now-cow\", \"indent\",\"true\")\n ,\"//*[@numFound='2']\"\n );\n }", "String query();", "@Test\n public void testSomeToStrings() {\n System.out.println(new JresBoolQuery()\n .must(new JresQueryStringQuery(\"stuff:true\").withDefaultOperator(\"AND\"))\n .should(\n new JresMatchQuery(\"color\", \"orange\"),\n new JresTermQuery(\"key\", \"abc123\")\n )\n .mustNot(new JresDisMaxQuery(\n new JresMatchQuery(\"color\", \"yellow\"),\n new JresMatchQuery(\"color\", \"green\")\n ))\n );\n }", "public static void main(String ...args) {\n Operation myOperation = Operation.alloc(\"http://example/special2\", \"special2\", \"Custom operation\");\n\n // Service endpoint names.\n String queryEndpoint = \"q\";\n String customEndpoint = \"x\";\n\n // Make a DataService with custom named for endpoints.\n // In this example, \"q\" for SPARQL query and \"x\" for our custom extension and no others.\n DatasetGraph dsg = DatasetGraphFactory.createTxnMem();\n DataService dataService = DataService.newBuilder(dsg)\n .addEndpoint(myOperation, customEndpoint)\n .addEndpoint(Operation.Query, queryEndpoint)\n .build();\n\n // This will be the code to handled for the operation.\n ActionService customHandler = new DemoService();\n\n FusekiServer server =\n FusekiServer.create().port(PORT)\n .verbose(true)\n // Register the new operation, and it's handler\n .registerOperation(myOperation, customHandler)\n\n // The DataService.\n .add(DATASET, dataService)\n\n // And build the server.\n .build();\n\n server.start();\n\n // Try some operations on the server using the service URL.\n String customOperationURL = SERVER_URL + DATASET + \"/\" + customEndpoint;\n String queryOperationURL = SERVER_URL + DATASET + \"/\" + queryEndpoint;\n\n Query query = QueryFactory.create(\"ASK{}\");\n\n try {\n\n // Try custom name - OK\n try ( QueryExecution qExec = QueryExecution.service(queryOperationURL, query) ) {\n qExec.execAsk();\n }\n\n // Try the usual default name, which is not configured in the DataService so expect a 404.\n try ( QueryExecution qExec = QueryExecution.service(SERVER_URL + DATASET + \"/sparql\", query) ) {\n qExec.execAsk();\n throw new RuntimeException(\"Didn't fail\");\n } catch (QueryExceptionHTTP ex) {\n if ( ex.getStatusCode() != HttpSC.NOT_FOUND_404 ) {\n throw new RuntimeException(\"Not a 404\", ex);\n }\n }\n\n // Make an HTTP GET to the custom operation.\n // Service endpoint name : GET\n String s1 = HttpOp.httpGetString(customOperationURL);\n if ( s1 == null )\n throw new RuntimeException(\"Failed: \"+customOperationURL);\n\n } finally {\n server.stop();\n }\n }", "@Test\n public void testParseInput() {\n LOGGER.info(\"parseInput\");\n rdfEntityManager = new RDFEntityManager();\n LOGGER.info(\"oneTimeSetup\");\n CacheInitializer.initializeCaches();\n DistributedRepositoryManager.addRepositoryPath(\n \"InferenceRules\",\n System.getenv(\"REPOSITORIES_TMPFS\") + \"/InferenceRules\");\n DistributedRepositoryManager.clearNamedRepository(\"InferenceRules\");\n try {\n final File unitTestRulesPath = new File(\"data/test-rules-1.rule\");\n bufferedInputStream = new BufferedInputStream(new FileInputStream(unitTestRulesPath));\n LOGGER.info(\"processing input: \" + unitTestRulesPath);\n } catch (final FileNotFoundException ex) {\n throw new TexaiException(ex);\n }\n ruleParser = new RuleParser(bufferedInputStream);\n ruleParser.initialize(rdfEntityManager);\n final URI variableURI = new URIImpl(Constants.TEXAI_NAMESPACE + \"?test\");\n assertEquals(\"http://texai.org/texai/?test\", variableURI.toString());\n assertEquals(\"?test\", RDFUtility.formatURIAsTurtle(variableURI));\n List<Rule> rules;\n try {\n rules = ruleParser.Rules();\n for (final Rule rule : rules) {\n LOGGER.info(\"rule: \" + rule.toString());\n rule.cascadePersist(rdfEntityManager, null);\n }\n } catch (ParseException ex) {\n LOGGER.info(StringUtils.getStackTraceAsString(ex));\n fail(ex.getMessage());\n }\n Iterator<Rule> rules_iter = rdfEntityManager.rdfEntityIterator(\n Rule.class,\n null); // overrideContext\n while (rules_iter.hasNext()) {\n final Rule loadedRule = rules_iter.next();\n assertNotNull(loadedRule);\n\n // (\n // description \"if there is a room then it is likely that a table is in the room\"\n // context: texai:InferenceRuleTestContext\n // if:\n // ?situation-localized rdf:type cyc:Situation-Localized .\n // ?room rdf:type cyc:RoomInAConstruction .\n // ?situation-localized cyc:situationConstituents ?room .\n // then:\n // _:in-completely-situation-localized rdf:type texai:InCompletelySituationLocalized .\n // ?situation-localized texai:likelySubSituations _:in-completely-situation-localized .\n // _:table rdf:type cyc:Table_PieceOfFurniture .\n // _:table texai:in-ContCompletely ?room .\n // )\n\n assertEquals(\"(\\ndescription \\\"if there is a room then it is likely that a table is in the room\\\"\\ncontext: texai:InferenceRuleTestContext\\nif:\\n ?situation-localized rdf:type cyc:Situation-Localized .\\n ?room rdf:type cyc:RoomInAConstruction .\\n ?situation-localized cyc:situationConstituents ?room .\\nthen:\\n _:in-completely-situation-localized rdf:type texai:InCompletelySituationLocalized .\\n ?situation-localized texai:likelySubSituations _:in-completely-situation-localized .\\n _:table rdf:type cyc:Table_PieceOfFurniture .\\n _:table texai:in-ContCompletely ?room .\\n)\", loadedRule.toString());\n LOGGER.info(\"loadedRule:\\n\" + loadedRule);\n }\n CacheManager.getInstance().shutdown();\n try {\n if (bufferedInputStream != null) {\n bufferedInputStream.close();\n }\n } catch (final Exception ex) {\n LOGGER.info(StringUtils.getStackTraceAsString(ex));\n }\n rdfEntityManager.close();\n DistributedRepositoryManager.shutDown();\n }", "@Test\n\tpublic void testQueryTypes() {\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\t\t// QueryType\n\t\tfinal IntrospectionFullType queryType = getFullType(introspection, schemaConfig.getQueryTypeName());\n\t\t// - check all queries are available\n\t\tfinal List<String> queryNames = new ArrayList<>();\n\t\tArrays.asList(Entity1.class, Entity2.class, Entity3.class, Entity4.class).stream().forEach(clazz -> {\n\t\t\tqueryNames.add(schemaConfig.getQueryGetByIdPrefix() + clazz.getSimpleName());\n\t\t\tqueryNames.add(schemaConfig.getQueryGetListPrefix() + clazz.getSimpleName());\n\t\t});\n\t\tqueryNames.forEach(queryName -> Assert.assertTrue(queryType.getFields().stream()\n\t\t\t\t.map(IntrospectionTypeField::getName).collect(Collectors.toList()).contains(queryName)));\n\n\t\t// - check one 'getSingle' query (other ones are built the same way)\n\t\tfinal IntrospectionTypeField getEntity1 = assertField(queryType, queryNames.get(0),\n\t\t\t\tIntrospectionTypeKindEnum.OBJECT, Entity1.class);\n\t\tAssert.assertEquals(1, getEntity1.getArgs().size());\n\t\tassertArg(getEntity1, \"id\", IntrospectionTypeKindEnum.NON_NULL, IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLID.getName());\n\n\t\t// - check one 'getAll' query (other ones are built the same way)\n\t\tfinal IntrospectionTypeField getAllEntity1 = assertField(queryType, queryNames.get(1),\n\t\t\t\tIntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, getAllEntity1.getArgs().size());\n\t\tassertArg(getAllEntity1, schemaConfig.getQueryGetListFilterAttributeName(),\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListFilterEntityTypeNameSuffix());\n\t\tassertArg(getAllEntity1, schemaConfig.getQueryGetListPagingAttributeName(),\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT, getPagingInputTypeName());\n\t\tassertArg(getAllEntity1, schemaConfig.getQueryGetListFilterAttributeOrderByName(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.INPUT_OBJECT, getOrderByInputTypeName());\n\t}", "private InputStream runSparqlQuery(String query) throws IOException {\n\t\ttry {\n\t\t\tString queryString = \"query=\" + URLEncoder.encode(query, \"UTF-8\")\n\t\t\t\t\t+ \"&format=json\";\n\t\t\tURL url = new URL(\"https://query.wikidata.org/sparql?\"\n\t\t\t\t\t+ queryString);\n\t\t\tHttpURLConnection connection = (HttpURLConnection) url\n\t\t\t\t\t.openConnection();\n\t\t\tconnection.setRequestMethod(\"GET\");\n\n\t\t\treturn connection.getInputStream();\n\t\t} catch (UnsupportedEncodingException | MalformedURLException e) {\n\t\t\tthrow new RuntimeException(e.getMessage(), e);\n\t\t}\n\t}", "public abstract String createQuery();", "public void queryData() throws SolrServerException {\n\t\tfinal SolrQuery query = new SolrQuery(\"*:*\");\r\n\t\tquery.setRows(2000);\r\n\t\t// 5. Executes the query\r\n\t\tfinal QueryResponse response = client.query(query);\r\n\r\n\t\t/*\t\tassertEquals(1, response.getResults().getNumFound());*/\r\n\r\n\t\t// 6. Gets the (output) Data Transfer Object.\r\n\t\t\r\n\t\t\r\n\t\r\n\t\tif (response.getResults().iterator().hasNext())\r\n\t\t{\r\n\t\t\tfinal SolrDocument output = response.getResults().iterator().next();\r\n\t\t\tfinal String from = (String) output.getFieldValue(\"from\");\r\n\t\t\tfinal String to = (String) output.getFieldValue(\"to\");\r\n\t\t\tfinal String body = (String) output.getFieldValue(\"body\");\r\n\t\t\t// 7.1 In case we are running as a Java application print out the query results.\r\n\t\t\tSystem.out.println(\"It works! I found the following book: \");\r\n\t\t\tSystem.out.println(\"--------------------------------------\");\r\n\t\t\tSystem.out.println(\"ID: \" + from);\r\n\t\t\tSystem.out.println(\"Title: \" + to);\r\n\t\t\tSystem.out.println(\"Author: \" + body);\r\n\t\t}\r\n\t\t\r\n\t\tSolrDocumentList list = response.getResults();\r\n\t\tSystem.out.println(\"list size is: \" + list.size());\r\n\r\n\r\n\r\n\t\t/*\t\t// 7. Otherwise asserts the query results using standard JUnit procedures.\r\n\t\tassertEquals(\"1\", id);\r\n\t\tassertEquals(\"Apache SOLR Essentials\", title);\r\n\t\tassertEquals(\"Andrea Gazzarini\", author);\r\n\t\tassertEquals(\"972-2-5A619-12A-X\", isbn);*/\r\n\t}", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query);", "@Test\n public void testQuery() throws Exception {\n StatefulKnowledgeSession session = getKbase().newStatefulKnowledgeSession();\n \n initializeTemplate(session);\n \n List<Person> persons = new ArrayList<Person>();\n persons.add(new Person(\"john\", \"john\", 25));\n persons.add(new Person(\"sarah\", \"john\", 35));\n \n session.execute(CommandFactory.newInsertElements(persons));\n assertEquals(2, session.getFactCount());\n \n QueryResults results = query(\"people over the age of x\", new Object[] {30});\n assertNotNull(results);\n }", "private void runQuery(QueryTerm qt, String name) {\n\t\tqt.setInferred(false);\n\t\tRDFQuery q = new RDFQuery(qt);\n\t\tSystem.out.println(\"=== \"+name+\" ===\\n* OBD Query:\\n \"+qt);\n\t\tSystem.out.println(\"\\n* Autogenerated SPARQL:\\n \"+q.toSPARQL()+\"\\n\\n\");\n\t\tfor (Node n : this.shard.getNodesByQuery(qt)){\n\t\t\tSystem.out.println(\"Node: \" + n.toString());\n\t\t}\n\t\n\t}", "@Override\n public final InputStream dereference(String uri, String contentType) throws IOException {\n if(uri==null){\n return null;\n }\n UriRef reference = new UriRef(uri);\n StringBuilder query = new StringBuilder();\n query.append(\"CONSTRUCT { \");\n query.append(reference);\n query.append(\" ?p ?o } WHERE { \");\n query.append(reference);\n query.append(\" ?p ?o }\");\n\n //String format = SupportedFormat.RDF_XML;\n return SparqlEndpointUtils.sendSparqlRequest(getAccessUri(),query.toString(),contentType);\n }", "IQuery getQuery();", "@Test\n public void test_singleRetrieve_withParens_ParamQuery() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"(samaccountname=mary.olowu)\");\n request.setParameters(parameters);\n\n Map<String, Object> recordMap = null;\n BridgeError unexpectedError = null;\n try {\n Record record = getAdapter().retrieve(request);\n recordMap = record.getRecord();\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertNotNull(recordMap);\n }", "private QueryResults query(String queryName, Object[] args) {\n Command command = CommandFactory.newQuery(\"persons\", queryName, args);\n String queryStr = template.requestBody(\"direct:marshall\", command, String.class);\n\n String json = template.requestBody(\"direct:test-session\", queryStr, String.class);\n ExecutionResults res = (ExecutionResults) template.requestBody(\"direct:unmarshall\", json);\n return (QueryResults) res.getValue(\"persons\");\n }", "@Test\n public void testQueries() {\n nuxeoClient.repository().createDocumentById(testWorkspaceId, new Document(\"file1\", \"File\"));\n nuxeoClient.repository().createDocumentById(testWorkspaceId, new Document(\"file2\", \"File\"));\n\n // Get descendants of Workspaces\n String query = \"select * from Document where ecm:path startswith '/default-domain/workspaces'\";\n Documents documents = nuxeoClient.repository().query(query, \"10\", \"0\", \"50\", \"ecm:path\", \"asc\", null);\n assertEquals(3, documents.size());\n\n // Get all the File documents\n // TODO\n\n // Content of a given Folder, using a page provider\n // TODO\n }", "@Test\n public void testSyntax() throws Exception {\n assertJQ(req(\"q\",\"*\", \"df\",\"doesnotexist_s\")\n ,\"/response/docs/[0]==\" // make sure we get something...\n );\n assertJQ(req(\"q\",\"doesnotexist_s:*\")\n ,\"/response/numFound==0\" // nothing should be found\n );\n assertJQ(req(\"q\",\"doesnotexist_s:( * * * )\")\n ,\"/response/numFound==0\" // nothing should be found\n );\n\n // length of date math caused issues...\n assertJQ(req(\"q\",\"foo_dt:\\\"2013-03-08T00:46:15Z/DAY+000MILLISECONDS+00SECONDS+00MINUTES+00HOURS+0000000000YEARS+6MONTHS+3DAYS\\\"\", \"debug\",\"query\")\n ,\"/debug/parsedquery=='foo_dt:2013-09-11T00:00:00Z'\"\n );\n }", "@Test\n public void testCorrectAllWithFilterDateAndFindBy()\n throws IOException {\n Client client = Client.create(new DefaultClientConfig());\n WebResource service = client.resource(getBaseURI()\n + \"PhotoAlbum04/\");\n String response = service.path(\"search\")\n .queryParam(\"type\", \"all\")\n .queryParam(\"findBy\", \"name\")\n .queryParam(\"keywords\", \"evento\")\n .queryParam(\"orderBy\", \"date\")\n .queryParam(\"dateFirst\", \"01/11/2012\")\n .queryParam(\"dateEnd\", \"02/11/2012\")\n .get(String.class);\n assertFalse(\"Assert error failed\",\n response.contains(\"Url syntax error\"));\n\n assertTrue(\"Assert file-dtos failed\",\n response.contains(\"File: Search with all parameters\"));\n assertTrue(\n \"Assert album-dtos failed\",\n response.contains(\"Album: Search with all parameters\"));\n }", "@Test\n public void test_singleRetrieve_withoutParens_ParamQuery() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n request.setParameters(parameters);\n\n Map<String, Object> recordMap = null;\n BridgeError expectedError = null;\n try {\n Record record = getAdapter().retrieve(request);\n } catch (BridgeError e) {\n expectedError = e;\n }\n\n assertNotNull(expectedError);\n }", "@Test\n public void queryTest() {\n // TODO: test query\n }", "public Query queryRule(String rule, Object... args) throws Exceptions.OsoException {\n Host new_host = host.clone();\n String pred = new_host.toPolarTerm(new Predicate(rule, Arrays.asList(args))).toString();\n return new Query(ffiPolar.newQueryFromTerm(pred), new_host);\n }", "public interface SPARQLService {\n // TODO: Create methods for at least CRUD \n}", "public static void querying(String constructQuery2) {\n\t\t//construct the new query\n\t\t//String constructQuery2 = prefix+\" \"+select+\" \"+selectValues+\" \"+where+openBracket+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket;\n\t\t//constructQuery2 = constructQuery2+\" UNION \"+\" \"+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket+closeBracket;\n\t\t\n\t\tSystem.out.println(constructQuery2);\n\t\tQuery query2 = QueryFactory.create(constructQuery2);\n\t\tQueryExecution qe2 = QueryExecutionFactory.sparqlService(\n\t\t\t\t\"http://localhost:3030/USNA/query\", query2);\n\t\t\n\t\tResultSet results1 = qe2.execSelect();\n\t\tif(constantOutput == \"\") {\n\t\t\tResultSetFormatter.out(System.out, results1);\n\t\t}else {\n\t\t\tString NS = \"http://www.usna.org/ns#\";\n\t\t\tModel rdfssExample = ModelFactory.createDefaultModel();\n\t\t\tString [] constant = constantOutput.trim().split(\" \");\n\t\t\t\n\t\t\tString [] headers = selectValues.split(\" \");\n\t\t System.out.println(\"--------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tfor(int i = 0; i< headers.length; i++) {\n\t\t\t\t//System.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t\tSystem.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"----------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\ttry {\n\t\t\t\t int count = 0;\n\t\t while ( results1.hasNext() ) {\n\t\t \t //Resource Response = rdfssExample.createResource(NS+constant[count]);\n\t\t \t \n\t\t QuerySolution soln = results1.nextSolution();\n\t\t Resource first = soln.getResource(headers[0].substring(1,headers[0].length()).trim());\n\t\t //Resource second = soln.getResource(headers[1].substring(1,headers[1].length()).trim());\n\t\t //Resource third = soln.getResource(headers[2].substring(1,headers[2].length()).trim());\n\t\t //Resource fourth = soln.getResource(headers[3].substring(1,headers[3].length()).trim());\n\t\t for(int i=0; i< constant.length; i++) {\n\t\t \t Resource Response = rdfssExample.createResource(NS+constant[i]);\n\t\t \t System.out.format(\"%10s %50s\",first, Response);\n\t\t \t System.out.println();\n\t\t\t\t\t //count++;\n\t\t }\n\t\t //System.out.format(\"%10s %50s\",first, Response);\n\t\t //System.out.format(\"%10s\",first);\n\t\t\t\t System.out.println();\n\t\t\t\t //count++;\n\t\t\t\t \n\t\t\t\t //System.out.println(count);\n\t\t \n\t\t }\n\t\t } finally {\n\t\t \t qe2.close();\n\t\t}\n\t\t\t \n\t\t}\t\t \n\t}", "@Test\n void testAndFilterWithoutExplicitIndex() {\n Query q = newQueryFromEncoded(\"?query=trump\" +\n \"&model.type=all\" +\n \"&model.defaultIndex=text\" +\n \"&filter=%2B%28filterTerm%29\");\n assertEquals(\"AND text:trump |text:filterTerm\",\n q.getModel().getQueryTree().toString());\n }", "public void test_sf_945436() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <C rdf:ID='x'>\" +\n \" <rdfs:label xml:lang=''>a_label</rdfs:label>\" +\n \" </C>\" +\n \" <owl:Class rdf:ID='C'>\" +\n \" </owl:Class>\" +\n \"</rdf:RDF>\";\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n m.read( new StringReader( SOURCE ), null );\n Individual x = m.getIndividual( \"http://jena.hpl.hp.com/test#x\" );\n assertEquals( \"Label on resource x\", \"a_label\", x.getLabel( null) );\n assertEquals( \"Label on resource x\", \"a_label\", x.getLabel( \"\" ) );\n assertSame( \"fr label on resource x\", null, x.getLabel( \"fr\" ) );\n }", "Query queryOn(Connection connection);", "public void test_der_02() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <owl:ObjectProperty rdf:ID='hasPublications'>\" +\n \" <rdfs:domain>\" +\n \" <owl:Class>\" +\n \" <owl:unionOf rdf:parseType='Collection'>\" +\n \" <owl:Class rdf:about='#Project'/>\" +\n \" <owl:Class rdf:about='#Task'/>\" +\n \" </owl:unionOf>\" +\n \" </owl:Class>\" +\n \" </rdfs:domain>\" +\n \" <rdfs:domain rdf:resource='#Dummy' />\" +\n \" <rdfs:range rdf:resource='#Publications'/>\" +\n \" </owl:ObjectProperty>\" +\n \" <owl:Class rdf:ID='Dummy'>\" +\n \" </owl:Class>\" +\n \"</rdf:RDF>\";\n String NS = \"http://jena.hpl.hp.com/test#\";\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.read(new ByteArrayInputStream( SOURCE.getBytes()), NS );\n \n OntClass dummy = m.getOntClass( NS + \"Dummy\" );\n // assert commented out - bug not accepted -ijd\n //TestUtil.assertIteratorValues( this, dummy.listDeclaredProperties(), \n // new Object[] {m.getObjectProperty( NS+\"hasPublications\")} );\n }", "@Test\n\tpublic void testPassThroughHandler_emptySingleSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name . }\");\n\t\t\ttq.setBinding(\"name\", l(\"notExist\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace is expected to come from some original repository (e.g. SPARQL) => we explicitly\n\t\t\t\t\t * do not expect QueryResults#report to be the second element (compare test\n\t\t\t\t\t * testPassThroughHandler_MultiSourceQuery)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertNotEquals(QueryResults.class, new Exception().getStackTrace()[1].getClass());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tthrow new IllegalStateException(\"Expected empty result\");\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(0, numberOfResults.get());\n\t\t}\n\t}", "private static List<Supplier> createSupplierData(ConsumerQuery query, boolean testing) {\n\t\tRepository repository;\n\t\t\n\t\t//use name of processes in query to retrieve subset of relevant supplier data from semantic infrastructure\n\t\tList<String> processNames = new ArrayList<String>();\t\n\n\t\tif (query.getProcesses() == null || query.getProcesses().isEmpty()) {\n\t\t\tSystem.err.println(\"There are no processes specified!\");\n\t\t} else {\n\t\t\n\t\tfor (Process process : query.getProcesses()) {\n\t\t\tprocessNames.add(process.getName());\n\t\t}\n\t\t}\n\t\t\t\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\n\t\tif (testing == false) {\n\n\t\t\tMap<String, String> headers = new HashMap<String, String>();\n\t\t\theaders.put(\"Authorization\", AUTHORISATION_TOKEN);\n\t\t\theaders.put(\"accept\", \"application/JSON\");\n\n\t\t\trepository = new SPARQLRepository(SPARQL_ENDPOINT );\n\n\t\t\trepository.initialize();\n\t\t\t((SPARQLRepository) repository).setAdditionalHttpHeaders(headers);\n\n\t\t} else {\n\n\t\t\t//connect to GraphDB\n\t\t\trepository = new HTTPRepository(GRAPHDB_SERVER, REPOSITORY_ID);\n\t\t\trepository.initialize();\n\t\t}\n\t\t\n\t\t//creates a SPARQL query that is run against the Semantic Infrastructure\n\t\tString strQuery = SparqlQuery.createQueryMVP(processNames);\n\t\t\n\t\t//System.out.println(strQuery);\n\n\t\t//open connection to GraphDB and run SPARQL query\n\t\tSet<SparqlRecord> recordSet = new HashSet<SparqlRecord>();\n\t\tSparqlRecord record;\n\t\ttry(RepositoryConnection conn = repository.getConnection()) {\n\n\t\t\tTupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, strQuery);\t\t\n\n\t\t\t//if querying the local KB, we need to set setIncludeInferred to false, otherwise inference will include irrelevant results.\n\t\t\t//when querying the Semantic Infrastructure the non-inference is set in the http parameters.\n\t\t\tif (testing == true) {\n\t\t\t\t//do not include inferred statements from the KB\n\t\t\t\ttupleQuery.setIncludeInferred(false);\n\t\t\t}\n\n\t\t\ttry (TupleQueryResult result = tupleQuery.evaluate()) {\t\t\t\n\n\t\t\t\twhile (result.hasNext()) {\n\n\t\t\t\t\tBindingSet solution = result.next();\n\n\t\t\t\t\t//omit the NamedIndividual types from the query result\n\t\t\t\t\tif (!solution.getValue(\"processType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")\n\t\t\t\t\t\t\t&& !solution.getValue(\"certificationType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")\n\t\t\t\t\t\t\t&& !solution.getValue(\"materialType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")) {\n\n\t\t\t\t\t\trecord = new SparqlRecord();\n\t\t\t\t\t\trecord.setSupplierId(solution.getValue(\"supplierId\").stringValue().replaceAll(\"\\\\s+\",\"\"));\n\t\t\t\t\t\trecord.setProcess(stripIRI(solution.getValue(\"processType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\t\t\t\t\t\trecord.setMaterial(stripIRI(solution.getValue(\"materialType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\t\t\t\t\t\trecord.setCertification(stripIRI(solution.getValue(\"certificationType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\n\t\t\t\t\t\trecordSet.add(record);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\tcatch (Exception e) {\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\tSystem.err.println(\"Wrong test data!\");\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\n\t\t}\n\n\t\t//close connection to KB repository\n\t\trepository.shutDown();\n\n\t\tlong stopTime = System.currentTimeMillis();\n\t\tlong elapsedTime = stopTime - startTime;\n\n\t\tif (testing == true ) {\n\t\tSystem.out.println(\"The SPARQL querying process took \" + elapsedTime/1000 + \" seconds.\");\n\t\t}\n\n\t\t//get unique supplier ids used for constructing the supplier structure below\n\t\tSet<String> supplierIds = new HashSet<String>();\n\t\tfor (SparqlRecord sr : recordSet) {\n\t\t\tsupplierIds.add(sr.getSupplierId());\n\t\t}\n\n\t\tCertification certification = null;\n\t\tSupplier supplier = null;\n\t\tList<Supplier> suppliersList = new ArrayList<Supplier>();\n\n\t\t//create a map of processes and materials relevant for each supplier\n\t\tMap<String, SetMultimap<Object, Object>> multimap = new HashMap<String, SetMultimap<Object, Object>>();\n\n\t\tfor (String id : supplierIds) {\n\t\t\tSetMultimap<Object, Object> map = HashMultimap.create();\n\n\t\t\tString supplierID = null;\n\n\t\t\tfor (SparqlRecord sr : recordSet) {\n\n\t\t\t\tif (sr.getSupplierId().equals(id)) {\n\n\t\t\t\t\tmap.put(sr.getProcess(), sr.getMaterial());\n\n\t\t\t\t\tsupplierID = sr.getSupplierId();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tmultimap.put(supplierID, map);\n\t\t}\t\t\n\n\t\tProcess process = null;\n\n\t\t//create supplier objects (supplier id, processes (including materials) and certifications) based on the multimap created in the previous step\n\t\tfor (String id : supplierIds) {\n\t\t\tSetMultimap<Object, Object> processAndMaterialMap = null;\n\n\t\t\tList<Certification> certifications = new ArrayList<Certification>();\n\t\t\tList<Process> processes = new ArrayList<Process>();\t\t\n\n\t\t\tfor (SparqlRecord sr : recordSet) {\n\n\t\t\t\tif (sr.getSupplierId().equals(id)) {\n\n\t\t\t\t\t//add certifications\n\t\t\t\t\tcertification = new Certification(sr.getCertification());\n\t\t\t\t\tif (!certifications.contains(certification)) {\n\t\t\t\t\t\tcertifications.add(certification);\n\t\t\t\t\t}\n\n\t\t\t\t\t//add processes and associated materials\n\t\t\t\t\tprocessAndMaterialMap = multimap.get(sr.getSupplierId());\n\n\t\t\t\t\tString processName = null;\n\n\t\t\t\t\tSet<Object> list = new HashSet<Object>();\n\n\t\t\t\t\t//iterate processAndMaterialMap and extract process and relevant materials for that process\n\t\t\t\t\tfor (Entry<Object, Collection<Object>> e : processAndMaterialMap.asMap().entrySet()) {\n\n\t\t\t\t\t\tSet<Material> materialsSet = new HashSet<Material>();\n\n\t\t\t\t\t\t//get list/set of materials\n\t\t\t\t\t\tlist = new HashSet<>(e.getValue());\n\n\t\t\t\t\t\t//transform to Set<Material>\n\t\t\t\t\t\tfor (Object o : list) {\n\t\t\t\t\t\t\tmaterialsSet.add(new Material((String)o));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tprocessName = (String) e.getKey();\n\n\t\t\t\t\t\t//add relevant set of materials together with process name\n\t\t\t\t\t\tprocess = new Process(processName, materialsSet);\n\n\t\t\t\t\t\t//add processes\n\t\t\t\t\t\tif (!processes.contains(process)) {\n\t\t\t\t\t\t\tprocesses.add(process);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tsupplier = new Supplier(id, processes, certifications );\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsuppliersList.add(supplier);\n\t\t}\n\n\t\treturn suppliersList;\n\n\t}", "public abstract Statement queryToRetrieveData();", "public QueryMatches interpret(ITMQLRuntime runtime, IContext context, IExpressionInterpreter<?> caller);", "@Test\n public void testCorrectAlbumWithFilterDateAndFindBy()\n throws IOException {\n Client client = Client.create(new DefaultClientConfig());\n WebResource service = client.resource(getBaseURI()\n + \"PhotoAlbum04/\");\n String response = service.path(\"search\")\n .queryParam(\"type\", \"album\")\n .queryParam(\"findBy\", \"name\")\n .queryParam(\"keywords\", \"evento\")\n .queryParam(\"orderBy\", \"date\")\n .queryParam(\"dateFirst\", \"01/11/2012\")\n .queryParam(\"dateEnd\", \"02/11/2012\")\n .get(String.class);\n assertFalse(\"Assert error failed\",\n response.contains(\"Url syntax error\"));\n assertFalse(\"Assert file-dtos error failed\",\n response.contains(\"file-dtos\"));\n\n assertTrue(\n \"Assert album-dtos failed\",\n response.contains(\"Album: Search with all parameters\"));\n }", "@Test\n public void testFromFollowedByQuery() throws Exception {\n final String text = \"rule X when Cheese() from $cheesery ?person( \\\"Mark\\\", 42; ) then end\";\n RuleDescr rule = ((RuleDescr) (parse(\"rule\", text)));\n TestCase.assertFalse(parser.getErrors().toString(), parser.hasErrors());\n PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n TestCase.assertEquals(\"Cheese\", pattern.getObjectType());\n TestCase.assertEquals(\"from $cheesery\", pattern.getSource().getText());\n TestCase.assertFalse(pattern.isQuery());\n pattern = ((PatternDescr) (getDescrs().get(1)));\n TestCase.assertEquals(\"person\", pattern.getObjectType());\n TestCase.assertTrue(pattern.isQuery());\n }", "public long query(Date timestamp, String user, String hostname, Long referral, String questionText, InputMode mode);", "@Override\r\n\tprotected boolean remoteQuery(String qstr) {\r\n\t\tif (queryBk.getPublishYear() == null || queryBk.getPublishYear().equals(\"\")) {\r\n\t\t\tif (queryBk.getPublisher() == null || queryBk.getPublisher().equals(\"\")) {\r\n\t\t\t\tif (queryBk.parseEdition() == -1 && queryBk.parseVolume() == -1) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t} // end if\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tDocumentBuilderFactory f;\r\n\t\tDocumentBuilder b;\r\n\t\tDocument doc;\r\n\t\ttry {\r\n\t\t\tf = DocumentBuilderFactory.newInstance();\r\n\t\t\tb = f.newDocumentBuilder();\r\n\t\t\tURL url = new URL(Config.PRIMO_X_BASE + qstr);\r\n\r\n\t\t\tURLConnection con = url.openConnection();\r\n\t\t\tcon.setConnectTimeout(3000);\r\n\t\t\tdoc = b.parse(con.getInputStream());\r\n\t\t\tqueryStr = Config.PRIMO_X_BASE + qstr;\r\n\t\t\tdebug += queryStr + \"\\n\";\r\n\r\n\t\t\tnodesRecord = doc.getElementsByTagName(\"record\");\r\n\r\n\t\t\t/*\r\n\t\t\t * After fetched a XML doc, store necessary tags from the XMLs for further\r\n\t\t\t * matching.\r\n\t\t\t */\r\n\r\n\t\t\tfor (int i = 0; i < nodesRecord.getLength(); i++) {\r\n\t\t\t\tnodesControl = doc.getElementsByTagName(\"control\").item(i).getChildNodes();\r\n\t\t\t\tnodesDisplay = doc.getElementsByTagName(\"display\").item(i).getChildNodes();\r\n\t\t\t\tnodesLink = doc.getElementsByTagName(\"links\").item(i).getChildNodes();\r\n\t\t\t\tnodesSearch = doc.getElementsByTagName(\"search\").item(i).getChildNodes();\r\n\t\t\t\tnodesDelivery = doc.getElementsByTagName(\"delivery\").item(i).getChildNodes();\r\n\t\t\t\tnodesFacet = doc.getElementsByTagName(\"facets\").item(i).getChildNodes();\r\n\r\n\t\t\t\t// Return true if the query item is of ISO doc no. and of\r\n\t\t\t\t// published by ISO\r\n\t\t\t\tif (matchIsoPublisher() && matchIsoDocNo()) {\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} // end if\r\n\r\n\t\t\t\tif (!strHandle.hasSomething(queryBk.getCreator())) {\r\n\t\t\t\t\tif (matchTitle() && matchPublisher() && matchYear()) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} // end if\r\n\t\t\t\t} // end if\r\n\r\n\t\t\t\tif (matchTitle() && matchAuthor()) {\r\n\r\n\t\t\t\t\tif ((matchEdition() && matchPublisher() && matchYear())) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else if (!strHandle.hasSomething(queryBk.getPublisher()) && matchYear()\r\n\t\t\t\t\t\t\t&& strHandle.hasSomething(queryBk.getPublishYear())) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else if (matchEdition() && queryBk.parseEdition() > 1) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * As Primo X-service only shows the first FRBRed record, check the rest records\r\n\t\t\t\t\t\t * involving the same frbrgroupid.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tString frbrid = \"\";\r\n\t\t\t\t\t\tfrbrid = getNodeValue(\"frbrgroupid\", nodesFacet);\r\n\t\t\t\t\t\tString frbr_qstr = qstr + \"&query=facet_frbrgroupid,exact,\" + frbrid;\r\n\t\t\t\t\t\t// System.out.println(\"FRBR:\" + Config.PRIMO_X_BASE +\r\n\t\t\t\t\t\t// frbr_qstr);\r\n\t\t\t\t\t\tDocument doc2 = b.parse(Config.PRIMO_X_BASE + frbr_qstr);\r\n\t\t\t\t\t\tnodesFrbrRecord = doc2.getElementsByTagName(\"record\");\r\n\r\n\t\t\t\t\t\tfor (int j = 0; j < nodesFrbrRecord.getLength(); j++) {\r\n\r\n\t\t\t\t\t\t\tnodesControl = doc2.getElementsByTagName(\"control\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesDisplay = doc2.getElementsByTagName(\"display\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesLink = doc2.getElementsByTagName(\"links\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesSearch = doc2.getElementsByTagName(\"search\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesDelivery = doc2.getElementsByTagName(\"delivery\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesFacet = doc2.getElementsByTagName(\"facets\").item(j).getChildNodes();\r\n\r\n\t\t\t\t\t\t\tif (!strHandle.hasSomething(queryBk.getPublishYear()) && queryBk.parseEdition() == -1\r\n\t\t\t\t\t\t\t\t\t&& !strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t} // end if\r\n\r\n\t\t\t\t\t\t\tif (matchEdition() && matchTitle() && matchAuthor() && matchPublisher() && matchYear()) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t} else if (matchEdition() && matchTitle() && matchAuthor() && matchYear()\r\n\t\t\t\t\t\t\t\t\t&& !strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t} // end if\r\n\t\t\t\t\t\t} // end for\r\n\t\t\t\t\t} // end if\r\n\t\t\t\t} // end if\r\n\t\t\t} // end for\r\n\t\t} // end try\r\n\r\n\t\tcatch (Exception e) {\r\n\t\t\tStringWriter errors = new StringWriter();\r\n\t\t\te.printStackTrace(new PrintWriter(errors));\r\n\t\t\tString errStr = \"PrimoQueryByNonISBN:remoteQuery()\" + errors.toString();\r\n\t\t\tSystem.out.println(errStr);\r\n\t\t\terrMsg = errStr;\r\n\t\t} // end catch\r\n\t\treturn false;\r\n\t}", "public void testDeletePredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 10);\n part.deletePredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 5);\n\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n\n assertEquals(5,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "@Test\r\n\tpublic void testPrepareGraphQuery3() throws Exception\r\n\t{\r\n\t\tStatement st1 = vf.createStatement(john, fname, johnfname, dirgraph);\r\n\t\tStatement st2 = vf.createStatement(john, lname, johnlname, dirgraph);\r\n\t\tStatement st3 = vf.createStatement(john, homeTel, johnhomeTel, dirgraph);\r\n\t\tStatement st4 = vf.createStatement(john, email, johnemail, dirgraph);\r\n\t\tStatement st5 = vf.createStatement(micah, fname, micahfname, dirgraph);\r\n\t\tStatement st6 = vf.createStatement(micah, lname, micahlname, dirgraph);\r\n\t\tStatement st7 = vf.createStatement(micah, homeTel, micahhomeTel, dirgraph);\r\n\t\tStatement st8 = vf.createStatement(fei, fname, feifname, dirgraph);\r\n\t\tStatement st9 = vf.createStatement(fei, lname, feilname, dirgraph);\r\n\t\tStatement st10 = vf.createStatement(fei, email, feiemail, dirgraph);\r\n\t\t\r\n\t\r\n\t\ttestWriterCon.add(st1);\r\n\t\ttestWriterCon.add(st2);\r\n\t\ttestWriterCon.add(st3);\r\n\t\ttestWriterCon.add(st4);\r\n\t\ttestWriterCon.add(st5);\r\n\t\ttestWriterCon.add(st6);\r\n\t\ttestWriterCon.add(st7);\r\n\t\ttestWriterCon.add(st8);\r\n\t\ttestWriterCon.add(st9);\r\n\t\ttestWriterCon.add(st10);\r\n\t\t\r\n\t\tAssert.assertTrue(testWriterCon.hasStatement(st1, false));\r\n\t\tAssert.assertFalse(testWriterCon.hasStatement(st1, false, (Resource)null));\r\n\t\tAssert.assertFalse(testWriterCon.hasStatement(st1, false, null));\r\n\t\tAssert.assertTrue(testWriterCon.hasStatement(st1, false, dirgraph));\r\n\t\t\r\n\t\t\r\n\t\tAssert.assertEquals(10, testAdminCon.size(dirgraph));\t\t\r\n\t\t\t\r\n\t\tString query = \" DESCRIBE <http://marklogicsparql.com/addressbook#firstName> \";\r\n\t\tGraphQuery queryObj = testReaderCon.prepareGraphQuery(query);\r\n\t\t\t\r\n\t\tGraphQueryResult result = queryObj.evaluate();\r\n\t\tresult.hasNext();\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(false)));\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testQuery1() {\n\t}", "@Test\n\tpublic void testPassThroughHandler_EmptyResult() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\n\t\t\t\t\t\t\t\"SELECT ?person ?interest WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name ; <http://xmlns.com/foaf/0.1/interest> ?interest }\");\n\t\t\ttq.setBinding(\"name\", l(\"NotExist\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\tAssertions.assertEquals(Lists.newArrayList(\"person\", \"interest\"), bindingNames);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tthrow new IllegalStateException(\"Expected empty result\");\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t}\n\t}", "private static Boolean specialQueries(String query) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n clickList = false;\n //newCorpus = true;\n\n if (query.equals(\"q\")) {\n\n System.exit(0);\n return true;\n }\n\n String[] subqueries = query.split(\"\\\\s+\"); //split around white space\n\n if (subqueries[0].equals(\"stem\")) //first term in subqueries tells computer what to do \n {\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n TokenProcessor processor = new NewTokenProcessor();\n if (subqueries.length > 1) //user meant to stem the token not to search stem\n {\n List<String> stems = processor.processToken(subqueries[1]);\n\n //clears list and repopulates it \n String stem = \"Stem of query '\" + subqueries[1] + \"' is '\" + stems.get(0) + \"'\";\n\n GUI.ResultsLabel.setText(stem);\n\n return true;\n }\n\n } else if (subqueries[0].equals(\"vocab\")) {\n List<String> vocabList = Disk_posIndex.getVocabulary();\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n\n int vocabCount = 0;\n for (String v : vocabList) {\n if (vocabCount < 1000) {\n vocabCount++;\n GUI.JListModel.addElement(v);\n }\n }\n GUI.ResultsLabel.setText(\"Total size of vocabulary: \" + vocabCount);\n return true;\n }\n\n return false;\n }", "CampusSearchQuery generateQuery();", "@Test\n @OperateOnDeployment(\"server\")\n public void shouldGetResourceByQuery() {\n given().header(\"Authorization\", \"Bearer access_token\").expect().statusCode(200).and().expect().body(\"size\",\n equalTo(1)).and().expect().body(\"items.item.name\", hasItem(\"Technologies\")).and().expect().body(\"items.item.sort\",\n hasItem(20)).when().get(getBaseTestUrl() + \"/1/categories/get/json/query;catName=Technologies?expand=\" +\n \"{\\\"branches\\\":[{\\\"trunk\\\":{\\\"name\\\":\\\"categories\\\"}}]})\");\n }", "public void test_hk_01() {\n // synthesise a mini-document\n String base = \"http://jena.hpl.hp.com/test#\";\n String doc =\n \"<rdf:RDF\"\n + \" xmlns:rdf=\\\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\\\"\"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <owl:Ontology rdf:about=\\\"\\\">\"\n + \" <owl:imports rdf:resource=\\\"http://www.w3.org/2002/07/owl\\\" />\"\n + \" </owl:Ontology>\"\n + \"</rdf:RDF>\";\n \n // read in the base ontology, which includes the owl language\n // definition\n // note OWL_MEM => no reasoner is used\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.getDocumentManager().setMetadataSearchPath( \"file:etc/ont-policy-test.rdf\", true );\n m.read(new ByteArrayInputStream(doc.getBytes()), base);\n \n // we need a resource corresponding to OWL Class but in m\n Resource owlClassRes = m.getResource(OWL.Class.getURI());\n \n // now can we see this as an OntClass?\n OntClass c = (OntClass) owlClassRes.as(OntClass.class);\n assertNotNull(\"OntClass c should not be null\", c);\n \n //(OntClass) (ontModel.getProfile().CLASS()).as(OntClass.class);\n \n }", "public Collection<URI> searchWithSPARQL(final String queryString)\n {\n if (DEBUG.SEARCH) Log.debug(\"searchWithSPARQL; queryString:\\n\" + Util.tags(queryString));\n \n final Collection<URI> resultSet = new ArrayList<URI>();\n final com.hp.hpl.jena.query.Query query = QueryFactory.create(queryString);\n \n if (DEBUG.SEARCH) Log.debug(\"QF created \" + Util.tag(query)\n + \"; memory=\" + Runtime.getRuntime().freeMemory()\n + \"\\n\" + query.toString().trim().replaceAll(\"\\n\\n\", \"\\n\"));\n\n final QueryExecution qe = QueryExecutionFactory.create(query, this); // 2nd arg is for Model or for FileManager?\n if (DEBUG.SEARCH) Log.debug(\"created QEF \" + qe + \"; memory=\" + Runtime.getRuntime().freeMemory());\n\n final ResultSet results = qe.execSelect();\n if (DEBUG.SEARCH) Log.debug(\"execSelect returned; memory=\" + Runtime.getRuntime().freeMemory());\n \n while (results.hasNext()) {\n final QuerySolution qs = results.nextSolution();\n if (DEBUG.SEARCH) {\n final String qss = qs.toString().replaceAll(\"<http://vue.tufts.edu\", \"...\"); // shorten debug output\n Log.debug(\"qSol \" + String.format(\"%.190s%s\", qss, qss.length() > 190 ? (\"...x\"+qss.length()) : \"\"));\n }\n if (false) {\n // debug debug all vars from query\n //Util.dumpIterator(qs.varNames());\n Iterator<String> vn = qs.varNames(); \n while (vn.hasNext()) {\n String v = vn.next();\n Log.debug(\"\\t\" + Util.tags(v) + \"=\" + Util.tags(qs.get(v)));\n }\n }\n try {\n resultSet.add(new URI(qs.getResource(\"rid\").getURI()));\n } catch (Throwable t) {\n Log.warn(\"handling QuerySolution \" + qs, t);\n }\n }\n qe.close();\n return resultSet;\n }", "@Test\n\tpublic void testShowResult() {\n\t\tConfigurationManager config = new ConfigurationManager();\n\t\tInvertedIndex index = new InvertedIndex();\n\t\tFileManager manager = new FileManager(config.getConfig().getFileName(), index);\n\t\tHashMap<String, String> parameters = new HashMap<String, String>();\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"asin\", \"ABCD\");\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"asin\", \"B00002243X\");\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 10);\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"query\", \"ASDAJKSDJHKASJK\");\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"query\", \"jumpers\");\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 8);\n\t}", "public interface Query {\n\n\t/**\n\t * @return ID of the given query\n\t */\n\tint queryID();\n\t\n\t/**\n\t * @return given query\n\t */\n\tString query();\n\t\n\t/**\n\t * @return list of relevant documents to the corresponding query\n\t */\n\tList<RelevanceInfo> listOfRelevantDocuments();\n\t\n\t/**\n\t * @return list of results to the corresponding query after running one of the retrieval models\n\t */\n\tList<Result> resultList();\n\t\n\t/**\n\t * @param resultList\n\t * @Effects adds results to the result list of the corresponding query\n\t */\n\tvoid putResultList(List<Result> resultList);\n}", "public static void main(String[] args) throws Exception {\n TDB.setOptimizerWarningFlag(false);\n\n final String DATASET_DIR_NAME = \"data0\";\n final Dataset data0 = TDBFactory.createDataset( DATASET_DIR_NAME );\n\n // show the currently registered names\n for (Iterator<String> it = data0.listNames(); it.hasNext(); ) {\n out.println(\"NAME=\"+it.next());\n }\n\n out.println(\"getting named model...\");\n /// this is the OWL portion\n final Model model = data0.getNamedModel( MY_NS );\n out.println(\"Model := \"+model);\n\n out.println(\"getting graph...\");\n /// this is the DATA in that MODEL\n final Graph graph = model.getGraph();\n out.println(\"Graph := \"+graph);\n\n if (graph.isEmpty()) {\n final Resource product1 = model.createResource( MY_NS +\"product/1\");\n final Property hasName = model.createProperty( MY_NS, \"#hasName\");\n final Statement stmt = model.createStatement(\n product1, hasName, model.createLiteral(\"Beach Ball\",\"en\") );\n out.println(\"Statement = \" + stmt);\n\n model.add(stmt);\n\n // just for fun\n out.println(\"Triple := \" + stmt.asTriple().toString());\n } else {\n out.println(\"Graph is not Empty; it has \"+graph.size()+\" Statements\");\n long t0, t1;\n t0 = System.currentTimeMillis();\n final Query q = QueryFactory.create(\n \"PREFIX exns: <\"+MY_NS+\"#>\\n\"+\n \"PREFIX exprod: <\"+MY_NS+\"product/>\\n\"+\n \" SELECT * \"\n // if you don't provide the Model to the\n // QueryExecutionFactory below, then you'll need\n // to specify the FROM;\n // you *can* always specify it, if you want\n // +\" FROM <\"+MY_NS+\">\\n\"\n // +\" WHERE { ?node <\"+MY_NS+\"#hasName> ?name }\"\n // +\" WHERE { ?node exns:hasName ?name }\"\n // +\" WHERE { exprod:1 exns:hasName ?name }\"\n +\" WHERE { ?res ?pred ?obj }\"\n );\n out.println(\"Query := \"+q);\n t1 = System.currentTimeMillis();\n out.println(\"QueryFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n try ( QueryExecution qExec = QueryExecutionFactory\n // if you query the whole DataSet,\n // you have to provide a FROM in the SparQL\n //.create(q, data0);\n .create(q, model) ) {\n t1 = System.currentTimeMillis();\n out.println(\"QueryExecutionFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n ResultSet rs = qExec.execSelect();\n t1 = System.currentTimeMillis();\n out.println(\"executeSelect.TIME=\"+(t1 - t0));\n while (rs.hasNext()) {\n QuerySolution sol = rs.next();\n out.println(\"Solution := \"+sol);\n for (Iterator<String> names = sol.varNames(); names.hasNext(); ) {\n final String name = names.next();\n out.println(\"\\t\"+name+\" := \"+sol.get(name));\n }\n }\n }\n }\n out.println(\"closing graph\");\n graph.close();\n out.println(\"closing model\");\n model.close();\n //out.println(\"closing DataSetGraph\");\n //dsg.close();\n out.println(\"closing DataSet\");\n data0.close();\n }", "public void test_anon_0() {\n String NS = \"http://example.org/foo#\";\n String sourceT =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'\"\n + \" xmlns:ex='http://example.org/foo#'\"\n + \" xmlns:owl='http://www.w3.org/2002/07/owl#'>\"\n + \" <owl:ObjectProperty rdf:about='http://example.org/foo#p' />\"\n + \" <owl:Class rdf:about='http://example.org/foo#A' />\"\n + \" <ex:A rdf:about='http://example.org/foo#x' />\"\n + \" <owl:Class rdf:about='http://example.org/foo#B'>\"\n + \" <owl:equivalentClass>\"\n + \" <owl:Restriction>\" \n + \" <owl:onProperty rdf:resource='http://example.org/foo#p' />\" \n + \" <owl:hasValue rdf:resource='http://example.org/foo#x' />\" \n + \" </owl:Restriction>\"\n + \" </owl:equivalentClass>\"\n + \" </owl:Class>\"\n + \"</rdf:RDF>\";\n \n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.read(new ByteArrayInputStream(sourceT.getBytes()), \"http://example.org/foo\");\n \n OntClass B = m.getOntClass( NS + \"B\");\n Restriction r = B.getEquivalentClass().asRestriction();\n HasValueRestriction hvr = r.asHasValueRestriction();\n RDFNode n = hvr.getHasValue();\n \n assertTrue( \"Should be an individual\", n instanceof Individual );\n }", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "public void test_dn_0() {\n OntModel schema = ModelFactory.createOntologyModel( OntModelSpec.OWL_LITE_MEM_RULES_INF, null );\n \n schema.read( \"file:doc/inference/data/owlDemoSchema.xml\", null );\n \n int count = 0;\n for (Iterator i = schema.listIndividuals(); i.hasNext(); ) {\n //Resource r = (Resource) i.next();\n i.next();\n count++;\n /* Debugging * /\n for (StmtIterator j = r.listProperties(RDF.type); j.hasNext(); ) {\n System.out.println( \"ind - \" + r + \" rdf:type = \" + j.nextStatement().getObject() );\n }\n System.out.println(\"----------\"); /**/\n }\n \n assertEquals( \"Expecting 6 individuals\", 6, count );\n }", "@Test\n void testRankFilter() {\n Query q = newQueryFromEncoded(\"?query=trump\" +\n \"&model.type=all\" +\n \"&model.defaultIndex=text\" +\n \"&filter=filterattribute%3Afrontpage_US_en-US\");\n assertEquals(\"RANK text:trump |filterattribute:frontpage_US_en-US\",\n q.getModel().getQueryTree().toString());\n }", "<K, R extends IResponse> R query(IQueryRequest<K> queryRequest);", "T getQueryInfo();", "@SuppressWarnings(\"unchecked\")\n\tprivate CompoundQuery handleQuery() throws Exception{\n\t\tif (this.resultant != null && this.resultant.getResultsContainer() != null){\n\t\t\t//compoundQuery = (CompoundQuery) resultant.getAssociatedQuery();\n\t\t\tViewable view = newCompoundQuery.getAssociatedView();\n\t\t\tResultsContainer resultsContainer = this.resultant.getResultsContainer();\n\t\t\tsampleCrit = null;\n\t Collection sampleIDs = new ArrayList(); \n\t\t\t//Get the samples from the resultset object\n\t\t\tif(resultsContainer!= null){\n\t\t\t\tCollection samples = null;\n\t\t\t\tif(resultsContainer != null &&resultsContainer instanceof DimensionalViewContainer){\t\t\t\t\n\t\t\t\t\tDimensionalViewContainer dimensionalViewContainer = (DimensionalViewContainer)resultsContainer;\n\t\t\t\t\t\tCopyNumberSingleViewResultsContainer copyNumberSingleViewContainer = dimensionalViewContainer.getCopyNumberSingleViewContainer();\n\t\t\t\t\t\tGeneExprSingleViewResultsContainer geneExprSingleViewContainer = dimensionalViewContainer.getGeneExprSingleViewContainer();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(copyNumberSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = copyNumberSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(geneExprSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = geneExprSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t \t\tsampleCrit = new SampleCriteria();\n\t\t \t\t\tsampleCrit.setSampleIDs(sampleIDs);\n\n AddConstrainsToQueriesHelper constrainedSamplesHandler= new AddConstrainsToQueriesHelper();\n constrainedSamplesHandler.constrainQueryWithSamples(newCompoundQuery,sampleCrit);\n\t\t\t\tnewCompoundQuery = getShowAllValuesQuery(newCompoundQuery);\n\t\t\t\tnewCompoundQuery.setAssociatedView(view);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn newCompoundQuery;\n\t\t}", "@Override\n public R visit(RDFLiteral n, A argu) {\n R _ret = null;\n n.sparqlString.accept(this, argu);\n n.nodeOptional.accept(this, argu);\n return _ret;\n }", "void filterQuery(ServerContext context, QueryRequest request, QueryResultHandler handler,\n RequestHandler next);", "public void xxtest_oh_01() {\n String NS = \"http://www.idi.ntnu.no/~herje/ja/\";\n Resource[] expected = new Resource[] {\n ResourceFactory.createResource( NS+\"reiseliv.owl#Reiseliv\" ),\n ResourceFactory.createResource( NS+\"hotell.owl#Hotell\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#Restaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteBadRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteDoRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#SkogRestaurant\" ),\n };\n \n test_oh_01scan( OntModelSpec.OWL_MEM, \"No inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_MINI_RULE_INF, \"Mini rule inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_RULE_INF, \"Full rule inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_MICRO_RULE_INF, \"Micro rule inf\", expected );\n }", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "@Test public void onePredicate() {\n query(\"//ul/li['']\", \"\");\n query(\"//ul/li['x']\", LI1 + '\\n' + LI2);\n query(\"//ul/li[<a b='{\" + _RANDOM_INTEGER.args() + \" }'/>]\", LI1 + '\\n' + LI2);\n\n query(\"//ul/li[0]\", \"\");\n query(\"//ul/li[1]\", LI1);\n query(\"//ul/li[2]\", LI2);\n query(\"//ul/li[3]\", \"\");\n query(\"//ul/li[last()]\", LI2);\n }", "private static void initSPARQLAnythingEngine() {\n\t\t// Register the JSON-LD parser factory for extension .json\n\t\tReaderRIOTFactory parserFactoryJsonLD = new RiotUtils.ReaderRIOTFactoryJSONLD();\n\t\tRDFParserRegistry.registerLangTriples(RiotUtils.JSON, parserFactoryJsonLD);\n\t\t// Setup FX executor\n\t\tJenaSystem.init();\n\t\tQC.setFactory(ARQ.getContext(), FacadeX.ExecutorFactory);\n\t}", "QueryResponse query(SolrParams solrParams) throws SolrServerException;", "@Test\n public void testRelWithHref() throws RepositoryException {\n assertExtract(\"/html/rdfa/rel-href.html\");\n logger.debug(dumpModelToTurtle());\n\n assertContains(RDFUtils.iri(baseIRI.toString(), \"#me\"), FOAF.getInstance().name, \"John Doe\");\n assertContains(RDFUtils.iri(baseIRI.toString(), \"#me\"), FOAF.getInstance().homepage,\n RDFUtils.iri(\"http://example.org/blog/\"));\n }", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query, Pagination pagination);", "public final void querySAX(String query, ContentHandler handler,\n\t\t\tAttributes atts) throws SQLException, SAXException {\n\t\tfinal Connection con = getConnection();\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = con.createStatement();\n\t\t\tDOMUtils.resultSet2ContentHandler(stmt.executeQuery(query),\n\t\t\t\t\thandler, atts);\n\t\t} finally {\n\t\t\tif (stmt != null)\n\t\t\t\tstmt.close();\n\t\t\tif (con != null)\n\t\t\t\tcon.close();\n\t\t}\n\t}", "@Test\n public void testGetResultSet() throws MainException {\n System.out.println(\"getResultSet\");\n String queryText = \"select * from infermieri\";\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n ResultSet result = instance.getResultSet(queryText);\n assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n }", "@Test\n\tpublic void testKeywordQuery(){\n\t\t//manager.getResponse(\"american football \"); //match multiple keywords\n//\t\tmanager.getResponse(\"list of Bond 007 movies\");\n//\tmanager.getResponse(\"Disney movies\");\n\t\t//manager.keywordQuery(\"Paul Brown Stadium location\");\n\t\t//manager.keywordQuery(\"0Francesco\");\n System.out.println(\"******* keyword query *******\");\n\t\t//manager.keywordQuery(\"sportspeople in tennis\");\n\t\t//manager.keywordSearch(\"list of movies starring Sean Connery\",ElasticIndex.analyzed,100 );\n//\t\tmanager.keywordSearch(\"movies starring Sean Connery\",ElasticIndex.notStemmed,100 );\n// manager.keywordSearch(\"musical movies tony award\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"movies directed by Woody Allen\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"United states professional sports teams\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"computer games developed by Ubisoft\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"computer games developed by Ubisoft\",ElasticIndex.notStemmed,100 );\n// manager.keywordSearch(\"movies academy award nominations\",ElasticIndex.notStemmed,100 );\n System.out.println(SearchResultUtil.toSummary(manager.keywordSearch(\"movies directed by Woody Allen\",ElasticIndex.notLowercased,20 )));\n //manager.keywordSearch(\"grammy best album in 2012\",ElasticIndex.notAnalyzed,100 );\n //(better than analyzed) manager.keywordSearch(\"grammy best album in 2012\",ElasticIndex.notStemmed,100 );\n System.out.println(\"*****************************\");\n\n\t\t//manager.keywordQuery(\"Disney movies\");\n\t}", "@Test\r\n\tpublic void testRuleSets2() throws Exception{\r\n\t\t\r\n\t\tAssert.assertEquals(0L, testAdminCon.size());\r\n\t\ttestAdminCon.add(micah, lname, micahlname, dirgraph1);\r\n\t\ttestAdminCon.add(micah, fname, micahfname, dirgraph1);\r\n\t\ttestAdminCon.add(micah, developPrototypeOf, semantics, dirgraph1);\r\n\t\ttestAdminCon.add(micah, type, sEngineer, dirgraph1);\r\n\t\ttestAdminCon.add(micah, worksFor, ml, dirgraph1);\r\n\t\t\r\n\t\ttestAdminCon.add(john, fname, johnfname,dirgraph);\r\n\t\ttestAdminCon.add(john, lname, johnlname,dirgraph);\r\n\t\ttestAdminCon.add(john, writeFuncSpecOf, inference, dirgraph);\r\n\t\ttestAdminCon.add(john, type, lEngineer, dirgraph);\r\n\t\ttestAdminCon.add(john, worksFor, ml, dirgraph);\r\n\t\t\r\n\t\ttestAdminCon.add(writeFuncSpecOf, subProperty, design, dirgraph1);\r\n\t\ttestAdminCon.add(developPrototypeOf, subProperty, design, dirgraph1);\r\n\t\ttestAdminCon.add(design, subProperty, develop, dirgraph1);\r\n\t\t\r\n\t\ttestAdminCon.add(lEngineer, subClass, engineer, dirgraph1);\r\n\t\ttestAdminCon.add(sEngineer, subClass, engineer, dirgraph1);\r\n\t\ttestAdminCon.add(engineer, subClass, employee, dirgraph1);\r\n\t\t\r\n\t\tString query = \"select (count (?s) as ?totalcount) where {?s ?p ?o .} \";\r\n\t\tTupleQuery tupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(SPARQLRuleset.RDFS_PLUS_FULL);\r\n\t\tTupleQueryResult result\t= tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(374, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\r\n\t\tRepositoryResult<Statement> resultg = testAdminCon.getStatements(null, null, null, true, dirgraph, dirgraph1);\r\n\t\t\r\n\t\tassertNotNull(\"Iterator should not be null\", resultg);\r\n\t\tassertTrue(\"Iterator should not be empty\", resultg.hasNext());\r\n\t\t\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(SPARQLRuleset.EQUIVALENT_CLASS);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(18, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(SPARQLRuleset.RDFS,SPARQLRuleset.INVERSE_OF);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(86, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(null,SPARQLRuleset.INVERSE_OF);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(18, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets((SPARQLRuleset)null, null);\r\n\t\ttupleQuery.setIncludeInferred(false);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(16, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t}", "private void init() throws JRException {\n if (result != null) {\n return;\n }\n if (endpointUrl == null) {\n throw new JRException(\"Endpoint URLs can't be null\");\n }\n if (sparqlStatement == null || sparqlStatement.length() == 0) {\n throw new JRException(\"SPARQL statements can't be null for \" + endpointUrl);\n }\n try {\n endpointObj = new SPARQLRepository(endpointUrl);\n endpointObj.initialize();\n } catch (Exception e) {\n throw new JRException(\"Exception initializing endpoint \" + endpointUrl, e);\n }\n try {\n conn = endpointObj.getConnection();\n log.info(\"Executing SPARQL: \" + sparqlStatement);\n TupleQuery q = conn.prepareTupleQuery(QueryLanguage.SPARQL, sparqlStatement);\n result = q.evaluate();\n log.debug(\"Bindings got, size: \" + result.getBindingNames().size());\n } catch (Exception e) {\n throw new JRException(\"Exception connecting to endpoint \" + endpointUrl, e);\n } finally {\n try {\n conn.close();\n } catch (RepositoryException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tString type = req.getParameter(\"type\");\n\t\tString concept = req.getParameter(\"concept\");\n\t\tif (type != null && type.equals(\"compare\")) {\n\t\t\tgetcompareResults(concept, resp);\n\t\t\treturn;\n\t\t}\n\t\tif (type != null && type.equals(\"freeb\")) {\n\t\t\ttry {\n\t\t\t\tcallFreebase(concept, resp);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tString query = req.getParameter(\"query\");\n\t\t// default dbpedia_query\n\t\tif (query == null) {\n\t\t\tquery = \"dbpedia_query\";\n\t\t}\n\t\t\n\t\tString chunk = req.getParameter(\"chunk\");\n\t\tint chunkNum = 1;\n\t\tif (chunk != null) {\n\t\t\tchunkNum = Integer.parseInt(chunk);\n\t\t}\n\t\tString cont = req.getParameter(\"cont\");\n\t\t// All string should be have CamelCase and words separated by underscore\n\t\t//if cont != null or concept contains '_' then camelize except if camelcase is not intended\n\t\tif ((cont == null && !concept.contains(\"_\"))) {\n\t\t\tString camel = req.getParameter(\"camel\");\n\t\t\tif (camel == null || !camel.contains(\"false\")) {\n\t\t\t\tconcept = toCamelCaseUnderscore(concept);\n\t\t\t} else {\n\t\t\t\tconcept = putUnderscore(concept);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Concept:: \" + concept);\n\t\t// SparqlEvaluator eval = SparqlEvaluator.getInstance();\n\t\t// RDFXMLProcessor eval = new RDFXMLProcessor();\n\t\tif (concept == null)\n\t\t\treturn;\n\t\t// List<JSONObject> js = eval.process(concept,query);\n\t\tSystem.out.println(\"Before Process\");\n\t\tSystem.out.println(chunkNum);\n\t\tList<JSONObject> js = new ArrayList<JSONObject>(); \n\t\t\n\t\ttry {\n\t\t\tjs = SparqlEvaluator.getInstance().process(concept,\n\t\t\t\t\tquery, chunkNum);\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\tresp.getWriter().print(\"\");\n\t\t}\n\t\tif (js.isEmpty()) {\n\t\t\tresp.getWriter().print(\"\");\n\t\t\treturn;\n\t\t}\n\t\tIterator<JSONObject> itr = js.iterator();\n\t\tSystem.out.println(\"Size of list :: \" + js.size());\n\n\t\tresp.setContentType(\"text/html; charset=UTF-8\");\n\n\t\tString dset = \"dbpedia\";\n\n\t\tString respout = \"{\\\"bindings\\\": [\";\n\t\tresp.getWriter().print(respout);\n\t\tSystem.out.println(respout);\n\n\t\t\n\t\trespout = \"{\\\"type\\\":\\\"num\\\",\\\"val\\\":\\\"\"\n\t\t\t+ SparqlEvaluator.getCacheNum(concept, query, dset)\n\t\t\t+ \"\\\"},\";\n\t\tresp.getWriter().print(respout);\n\t\tSystem.out.println(respout);\n\n\t\tboolean first = true;\n\t\tint count = 1;\n\t\twhile (itr.hasNext()) {\n\t\t\tif (!first) {\n\t\t\t\trespout = \",\"; resp.getWriter().print(respout); System.out.println(respout);\n\n\t\t\t}\n\t\t\tfirst = false;\n\t\t\tString nstr = itr.next().toString();\n\t\t\tresp.getWriter().print(nstr);\n\t\t\tSystem.out.println((count++) + \" :\" + nstr);\n\t\t}\n\t\tSystem.out.println(\"After loop\");\n\t\tresp.getWriter().print(\"]}\");\n\t\tSystem.out.println(\"Done\");\n\n\t}", "private RDF_Term testTerm(Node node, PrefixMap pmap, boolean asValue) {\n RDF_Term rt = ProtobufConvert.convert(node, pmap, asValue) ;\n\n if ( node == null) {\n assertTrue(rt.hasUndefined());\n return rt;\n }\n\n switch (rt.getTermCase()) {\n// message RDF_Term {\n// oneof term {\n// RDF_IRI iri = 1 ;\n// RDF_BNode bnode = 2 ;\n// RDF_Literal literal = 3 ;\n// RDF_PrefixName prefixName = 4 ;\n// RDF_VAR variable = 5 ;\n// RDF_Triple tripleTerm = 6 ;\n// RDF_ANY any = 7 ;\n// RDF_UNDEF undefined = 8 ;\n// RDF_REPEAT repeat = 9 ;\n//\n// // Value forms of literals.\n// int64 valInteger = 20 ;\n// double valDouble = 21 ;\n// RDF_Decimal valDecimal = 22 ;\n// }\n// }\n case IRI : {\n RDF_IRI iri = rt.getIri() ;\n assertEquals(node.getURI(), iri.getIri()) ;\n break;\n }\n case BNODE : {\n RDF_BNode bnode = rt.getBnode() ;\n assertEquals(node.getBlankNodeLabel(), bnode.getLabel()) ;\n break;\n }\n case LITERAL : {\n RDF_Literal lit = rt.getLiteral() ;\n assertEquals(node.getLiteralLexicalForm(), lit.getLex()) ;\n\n if (JenaRuntime.isRDF11) {\n // RDF 1.1\n if ( Util.isSimpleString(node) ) {\n assertTrue(lit.getSimple());\n // Protobug default is \"\"\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNullPB(lit.getLangtag()) ;\n } else if ( Util.isLangString(node) ) {\n assertFalse(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNotSame(\"\", lit.getLangtag()) ;\n }\n else {\n assertFalse(lit.getSimple());\n // Regular typed literal.\n assertTrue(lit.getDatatype() != null || lit.getDtPrefix() != null );\n assertNullPB(lit.getLangtag()) ;\n }\n } else {\n // RDF 1.0\n if ( node.getLiteralDatatype() == null ) {\n if ( Util.isLangString(node ) ) {\n assertFalse(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertNull(lit.getDtPrefix()) ;\n assertNotSame(\"\", lit.getLangtag()) ;\n } else {\n assertTrue(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNullPB(lit.getLangtag()) ;\n }\n } else {\n assertTrue(lit.getDatatype() != null || lit.getDtPrefix() != null );\n }\n }\n break;\n }\n case PREFIXNAME : {\n assertNotNull(rt.getPrefixName().getPrefix()) ;\n assertNotNull(rt.getPrefixName().getLocalName()) ;\n String x = pmap.expand(rt.getPrefixName().getPrefix(), rt.getPrefixName().getLocalName());\n assertEquals(node.getURI(),x);\n break;\n }\n case VARIABLE :\n assertEquals(node.getName(), rt.getVariable().getName());\n break;\n case TRIPLETERM : {\n RDF_Triple encTriple = rt.getTripleTerm();\n Triple t = node.getTriple();\n RDF_Term rt_s = testTerm(t.getSubject(), pmap, asValue);\n RDF_Term rt_p = testTerm(t.getPredicate(), pmap, asValue);\n RDF_Term rt_o = testTerm(t.getObject(), pmap, asValue);\n assertEquals(encTriple.getS(), rt_s);\n assertEquals(encTriple.getP(), rt_p);\n assertEquals(encTriple.getO(), rt_o);\n break;\n }\n case ANY :\n assertEquals(Node.ANY, node);\n case REPEAT :\n break;\n case UNDEFINED :\n assertNull(node);\n return rt;\n case VALINTEGER : {\n long x = rt.getValInteger();\n assertTrue(integerSubTypes.contains(node.getLiteralDatatype()));\n //assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDinteger);\n long x2 = Long.parseLong(node.getLiteralLexicalForm());\n assertEquals(x,x2);\n break;\n }\n case VALDOUBLE : {\n double x = rt.getValDouble();\n assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDdouble);\n double x2 = Double.parseDouble(node.getLiteralLexicalForm());\n assertEquals(x, x2, 0.01);\n break;\n }\n case VALDECIMAL : {\n assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDdecimal);\n NodeValue nv = NodeValue.makeNode(node);\n assertTrue(nv.isDecimal());\n\n long value = rt.getValDecimal().getValue() ;\n int scale = rt.getValDecimal().getScale() ;\n BigDecimal d = BigDecimal.valueOf(value, scale) ;\n assertEquals(nv.getDecimal(), d);\n break;\n }\n case TERM_NOT_SET :\n break;\n }\n\n // And reverse\n if ( ! asValue ) {\n // Value based does not preserve exact datatype or lexical form.\n Node n2 = ProtobufConvert.convert(rt, pmap);\n assertEquals(node, n2) ;\n }\n\n return rt;\n }", "SparqlResultObject callSelectQuery(String name, Map<String, String> params);", "@Override\n public void search(Uri uri) {\n }", "public static void createSimple() throws Exception {\n\t\t// create a sesame memory sail\n\t\tMemoryStore memoryStore = new MemoryStore();\n\n\t\t// create a lucenesail to wrap the memorystore\n\t\tLuceneSail lucenesail = new LuceneSail();\t\t\n\t\t// set this parameter to let the lucene index store its data in ram\n\t\tlucenesail.setParameter(LuceneSail.LUCENE_RAMDIR_KEY, \"true\");\n\t\t// set this parameter to store the lucene index on disk\n\t\t// lucenesail.setParameter(LuceneSail.LUCENE_DIR_KEY, \"./data/mydirectory\");\n\t\t\n\t\t// wrap memorystore in a lucenesail\n\t\tlucenesail.setDelegate(memoryStore);\n\t\t\n\t\t// create a Repository to access the sails\n\t\tSailRepository repository = new SailRepository(lucenesail);\n\t\trepository.initialize();\n\t\t\n\t\t// add some test data, the FOAF ont\n\t\tSailRepositoryConnection connection = repository.getConnection();\n\t\tconnection.begin();\n\t\ttry {\n//\t\t\tconnection.setAutoCommit(false);\n\t\t\tFile file = new File(\"/Users/sschenk/Downloads/foaf.rdfs\");\n\t\t\tSystem.out.println(file.exists());\n\t\t\tconnection.add(\n\t\t\t\t\tfile,\n\t\t\t\t\t\"\", \n\t\t\t\t\tRDFFormat.RDFXML);\n\t\t\tconnection.commit();\n\t\t\t\n\t\t\t// search for all resources that mention \"person\"\n\t\t\tString queryString = \"PREFIX search: <\"+LuceneSailSchema.NAMESPACE+\"> \\n\" +\n\t\t\t\t\t\"SELECT ?x ?score ?snippet WHERE {?x search:matches ?match. \\n\" +\n\t\t\t\t\t\"?match search:query \\\"person\\\"; \\n\" +\n\t\t\t\t\t\"search:score ?score; \\n\" +\n\t\t\t\t\t\"search:snippet ?snippet. }\" ;\n\t\t\tSystem.out.println(\"Running query: \\n\"+queryString);\n\t\t\tTupleQuery query = connection.prepareTupleQuery(QueryLanguage.SPARQL, queryString);\n\t\t\tTupleResult result = query.evaluate();\n\t\t\ttry { \n\t\t\t\t// print the results\n\t\t\t\twhile (result.hasNext()){\n\t\t\t\t\tBindingSet bindings = result.next();\n\t\t\t\t\tSystem.out.println(\"found match: \");\n\t\t\t\t\tfor (Binding binding : bindings) {\n\t\t\t\t\t\tSystem.out.println(\" \"+binding.getName()+\": \"+binding.getValue());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tresult.close();\n\t\t\t}\n\t\t} finally {\n\t\t\tconnection.close();\n\t\t\trepository.shutDown();\n\t\t}\n\t\t\n\t}", "@Test\n public void testNestedQueryModifiers() throws Exception {\n\n String subqq=\"_query_:\\\"{!v=$qq}\\\"\";\n\n assertJQ(req(\"q\",\"_query_:\\\"\\\\\\\"how brown\\\\\\\"~2\\\"\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n assertJQ(req(\"q\",subqq, \"qq\",\"\\\"how brown\\\"~2\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n // Should explicit slop override? It currently does not, but that could be considered a bug.\n assertJQ(req(\"q\",subqq+\"~1\", \"qq\",\"\\\"how brown\\\"~2\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n // Should explicit slop override? It currently does not, but that could be considered a bug.\n assertJQ(req(\"q\",\" {!v=$qq}~1\", \"qq\",\"\\\"how brown\\\"~2\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n assertJQ(req(\"fq\",\"id:1\", \"fl\",\"id,score\", \"q\", subqq+\"^3\", \"qq\",\"text:x^2\"\n , \"debug\",\"query\"\n )\n ,\"/debug/parsedquery_toString=='((text:x)^2.0)^3.0'\"\n );\n\n assertJQ(req(\"fq\",\"id:1\", \"fl\",\"id,score\", \"q\", \" {!v=$qq}^3\", \"qq\",\"text:x^2\"\n , \"debug\",\"query\"\n )\n ,\"/debug/parsedquery_toString=='((text:x)^2.0)^3.0'\"\n );\n\n }", "public void Query() {\n }", "public void test_sf_969475() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <owl:ObjectProperty rdf:ID='p0'>\" +\n \" <owl:inverseOf>\" +\n \" <owl:ObjectProperty rdf:ID='q0' />\" +\n \" </owl:inverseOf>\" +\n \" </owl:ObjectProperty>\" +\n \" <owl:ObjectProperty rdf:ID='p1'>\" +\n \" <owl:inverseOf>\" +\n \" <owl:ObjectProperty rdf:ID='q1' />\" +\n \" </owl:inverseOf>\" +\n \" </owl:ObjectProperty>\" +\n \"</rdf:RDF>\";\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n m.read( new StringReader( SOURCE ), null );\n \n ObjectProperty p0 = m.getObjectProperty( \"http://jena.hpl.hp.com/test#p0\");\n Object invP0 = p0.getInverseOf();\n \n assertEquals( m.getResource( \"http://jena.hpl.hp.com/test#q0\"), invP0 );\n assertTrue( \"Should be an ObjectProperty facet\", invP0 instanceof ObjectProperty );\n \n ObjectProperty q1 = m.getObjectProperty( \"http://jena.hpl.hp.com/test#q1\");\n Object invQ1 = q1.getInverse();\n \n assertEquals( m.getResource( \"http://jena.hpl.hp.com/test#p1\"), invQ1 );\n assertTrue( \"Should be an ObjectProperty facet\", invQ1 instanceof ObjectProperty );\n }", "@Test\n public void test002() {\n int total = response.extract().path(\"total\");\n\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The search query is: \" + total);\n System.out.println(\"------------------End of Test---------------------------\");\n\n }", "Message handle(Message query, String kind);", "void contactQueryResult(String queryId, Contact contact);" ]
[ "0.65154463", "0.646076", "0.64355", "0.63797855", "0.6370891", "0.61967933", "0.61506295", "0.60005015", "0.59948105", "0.59887075", "0.59453565", "0.5918102", "0.5867251", "0.5818676", "0.58168083", "0.58087605", "0.57458586", "0.57274145", "0.5702796", "0.56701165", "0.56323516", "0.55130166", "0.55035686", "0.55006266", "0.5434425", "0.5434329", "0.54279566", "0.54160553", "0.54070187", "0.54048485", "0.5389304", "0.5388929", "0.53705215", "0.5326313", "0.5302646", "0.52979785", "0.5296412", "0.5283325", "0.5282805", "0.5280931", "0.5275579", "0.5271636", "0.5266484", "0.526324", "0.5261075", "0.5251658", "0.5249595", "0.52485377", "0.52350414", "0.5231826", "0.5219762", "0.52163154", "0.5209154", "0.51973325", "0.51962095", "0.5179952", "0.5179261", "0.51673245", "0.51649934", "0.51623243", "0.51504153", "0.5141914", "0.51409763", "0.5138766", "0.5137049", "0.513068", "0.5128168", "0.5126868", "0.5124203", "0.5123935", "0.51230747", "0.5121433", "0.5104722", "0.5104701", "0.5095074", "0.5088106", "0.5078655", "0.507413", "0.50715667", "0.5062454", "0.50401497", "0.50384045", "0.5037696", "0.5034526", "0.502958", "0.5024172", "0.50218683", "0.50207937", "0.5019569", "0.50166625", "0.5001256", "0.4997402", "0.49898034", "0.49896985", "0.49855593", "0.4980816", "0.4975009", "0.4972233", "0.49710828", "0.49528483" ]
0.59583133
10