query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Creates a new instance of ChangePasswordBean
public ChangePasswordBean() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PasswordChangeDTO() {}", "public ChangePasswordOperation() {\r\n }", "public PasswordChangeDTO(String currentPassword, String newPassword) {\n\t\tthis.currentPassword = currentPassword;\n\t\tthis.newPassword = newPassword;\n\t}", "public ChangePasswordPanel() {\n initComponents();\n }", "public Builder setNewPassword(\n String value) {\n copyOnWrite();\n instance.setNewPassword(value);\n return this;\n }", "@Override\r\n\tpublic JChangeApply createBean() {\n\t\treturn new JChangeApply();\r\n\t}", "public void setPassword(java.lang.String newPassword);", "public LoginBean() {\r\n }", "public LoginBean() {\r\n \r\n \r\n }", "public loginBean() {\n }", "public editarUsuarioBean() {\r\n }", "public MutablePasswordBuilder(String passwordType) {\r\n this.passwordType = passwordType;\r\n }", "public static PasswordField createPasswordField() {\t\t\n\t\tPasswordField password = new PasswordField();\n\t\tpassword.setPrefWidth(200);\n\t\tpassword.setPrefHeight(30);\n\t\treturn password;\n\t}", "public Builder setChangePasswordReq(ChangePassword.Req value) {\n copyOnWrite();\n instance.setChangePasswordReq(value);\n return this;\n }", "public JPasswordChange(Bonde innloggetBonde) {\n this.newPass2 = \"\";\n this.gammelPass = \"\";\n this.newPass1 = \"\";\n initComponents();\n this.innloggetBonde = innloggetBonde;\n\n }", "public RegisterUserBean() {\n this.account.setGender(Boolean.TRUE);\n this.roleID = 5;\n }", "public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n onChanged();\n return this;\n }", "public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n onChanged();\n return this;\n }", "public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n onChanged();\n return this;\n }", "private void setNewPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newPassword_ = value;\n }", "@Override\r\n\tpublic UserBean createUserBean()\r\n\t{\r\n\t\treturn new UserManagedBean();\r\n\t}", "public Builder clearNewPassword() {\n copyOnWrite();\n instance.clearNewPassword();\n return this;\n }", "public Builder setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n password_ = value;\n onChanged();\n return this;\n }", "@Test\r\n public void testSetNewPassword() {\r\n System.out.println(\"setNewPassword\");\r\n String newPassword = \"\";\r\n ForgotPasswordDTO instance = new ForgotPasswordDTO();\r\n instance.setNewPassword(newPassword);\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 assertTrue(true);\r\n }", "public Password(String password) {\n if (isValid(password)) {\n this.password = password;\n //this.date =date;\n\n this.setActive(true);\n } else {\n this.password = null;\n }\n }", "public ChangePassword() {\n initComponents();\n SQLConnect sqlcon = new SQLConnect();\n con=sqlcon.sqlCon(con);\n jPasswordField2.setEnabled(false);\n jPasswordField3.setEnabled(false);\n }", "public PasswordModel (){\n\n }", "public ModificarPerfilBean() {\r\n }", "public Builder setPassword(\n String value) {\n copyOnWrite();\n instance.setPassword(value);\n return this;\n }", "public Builder setPassword(\n String value) {\n copyOnWrite();\n instance.setPassword(value);\n return this;\n }", "com.google.protobuf.ByteString\n getNewPasswordBytes();", "ChangePassword.Req getChangePasswordReq();", "public ForgotPassword() {\n initComponents();\n SQLConnect sqlcon = new SQLConnect();\n con=sqlcon.sqlCon(con);\n }", "public Customer(String newUserId, String newPassword) {\r\n this.userId = newUserId;\r\n this.password = newPassword;\r\n }", "public LoginFormBean() {\r\n \r\n }", "public Builder setNewPasswordBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setNewPasswordBytes(value);\n return this;\n }", "@Override\r\n\tpublic void upadatePassword(String newPassword, ForgetBean forget) {\r\n\t\tSession session = factory.openSession();\r\n\t\tTransaction txn = session.getTransaction();\r\n\r\n\t\tString sql = \"UPDATE account SET password = '\" + newPassword + \"' WHERE email='\" + forget.getEmail() + \"'\";\r\n\r\n\t\tSQLQuery query = session.createSQLQuery(sql);\r\n\t\tquery.executeUpdate();\r\n\r\n\t}", "@Override\r\n\tpublic AuthZResponseDto changePassword(PasswordDto passwordDto) throws Exception {\n\t\treturn null;\r\n\t}", "private ForgotPasswordUser populateForgotPassword()\n\t{\n\t\tForgotPasswordUser fUser = new ForgotPasswordUser();\n\t\tfUser.setAction(WebServiceAction.FORGOTPASSWORD);\n\t\tfUser.setEmail(medtUserName.getText().toString());\n\t\treturn fUser;\n\t}", "public void setPassword(String password)\n {\n _password = password;\n }", "public UserBean() {\n }", "public UserBean() {\n }", "public void changePassword(String passwordChange){\n\t this.password = passwordChange;\n\t}", "public Forgotpassword()\n {\n initComponents();\n \n }", "public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n password_ = value;\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getNewPasswordBytes() {\n return instance.getNewPasswordBytes();\n }", "private void setNewPasswordBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n newPassword_ = value.toStringUtf8();\n }", "public Builder clearPassword() {\n\n password_ = getDefaultInstance().getPassword();\n onChanged();\n return this;\n }", "public Builder clearPassword() {\n\n password_ = getDefaultInstance().getPassword();\n onChanged();\n return this;\n }", "public PasswordChangeRequestPage( WOContext context )\n {\n super( context );\n }", "public Builder clearPassword() {\n \n password_ = getDefaultInstance().getPassword();\n onChanged();\n return this;\n }", "public Builder clearPassword() {\n \n password_ = getDefaultInstance().getPassword();\n onChanged();\n return this;\n }", "public Builder clearPassword() {\n \n password_ = getDefaultInstance().getPassword();\n onChanged();\n return this;\n }", "public userBean() {\r\n }", "public Builder setChangePasswordRsp(ChangePassword.Rsp value) {\n copyOnWrite();\n instance.setChangePasswordRsp(value);\n return this;\n }", "@GetMapping(\"/login/{id}/changePassword\")\n public String showChangePasswordForm(@PathVariable(name = \"id\") Long id, Model model){\n User user = userService.getUser(id);\n model.addAttribute(\"tempUser\", new TempUser());\n model.addAttribute(\"user\", user);\n return \"changePassword\";\n }", "ChangePassword.Rsp getChangePasswordRsp();", "void setPassword(Password newPassword, String plainPassword) throws NoUserSelectedException;", "public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n password_ = value;\n onChanged();\n return this;\n }", "public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n password_ = value;\n onChanged();\n return this;\n }", "String getNewPassword();", "public Builder withPassword(String password) {\n this.password = password;\n return this;\n }", "private void clearNewPassword() {\n \n newPassword_ = getDefaultInstance().getNewPassword();\n }", "public PeopleBean() {\n\n }", "public TCustomerPasswdChangeLog() {\n this(DSL.name(\"t_customer_passwd_change_log\"), null);\n }", "public ChangePassword.Rsp getChangePasswordRsp() {\n return instance.getChangePasswordRsp();\n }", "public void setPassword2(String password2);", "public void setPassword(String pw)\n {\n this.password = pw;\n }", "void setPassword(String password);", "void setPassword(String password);", "void setPassword(String password);", "public ChangePasswordRequestNotificationEventHandler(AppProperties appProperties) {\n super(ChangePasswordRequestNotificationEvent.class, Templates.CHANGE_PASSWORD);\n this.appProperties = appProperties;\n }", "public RegistroBean() {\r\n }", "public Builder setPasswordBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n password_ = value;\n onChanged();\n return this;\n }", "public Builder setPasswordBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n password_ = value;\n onChanged();\n return this;\n }", "public Builder setPasswordBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n password_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic boolean setNewPassword(BigInteger tUserFId,String password) {\n\t\tint res = accountManageDao.updateApplyPwdWithMainUser(tUserFId,password);\n\t\treturn res>0?true:false;\n\t}", "public Builder setPasswordBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n password_ = value;\n onChanged();\n return this;\n }", "public UIUserLogginMangementBean() {\n }", "public ProfiledApplicationBean() {}", "public Builder setPasswordBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n password_ = value;\n onChanged();\n return this;\n }", "public Builder setPasswordBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n password_ = value;\n onChanged();\n return this;\n }", "public Builder clearPassword() {\n copyOnWrite();\n instance.clearPassword();\n return this;\n }", "public Builder clearPassword() {\n copyOnWrite();\n instance.clearPassword();\n return this;\n }", "void setPassword(String ps) {\n this.password = ps;\n }", "public ChangePassword.Rsp getChangePasswordRsp() {\n if (rspCase_ == 15) {\n return (ChangePassword.Rsp) rsp_;\n }\n return ChangePassword.Rsp.getDefaultInstance();\n }", "public ChangePassword.Req getChangePasswordReq() {\n return instance.getChangePasswordReq();\n }", "public Builder clearChangePasswordRsp() {\n copyOnWrite();\n instance.clearChangePasswordRsp();\n return this;\n }", "public ChatBean() {\r\n }", "public passwordForm() {\n initComponents();\n }", "public Builder mergeChangePasswordReq(ChangePassword.Req value) {\n copyOnWrite();\n instance.mergeChangePasswordReq(value);\n return this;\n }", "public String getNewPassword() {\n return instance.getNewPassword();\n }", "public void setPassword(String password)\r\n/* 26: */ {\r\n/* 27:42 */ this.password = password;\r\n/* 28: */ }", "public Builder setChangePasswordRsp(\n ChangePassword.Rsp.Builder builderForValue) {\n copyOnWrite();\n instance.setChangePasswordRsp(builderForValue);\n return this;\n }", "public ChangePassword() {\n initComponents();\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n UIHelper.bindBackground(pnlBackground);\n }", "private void passwordJBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_passwordJBActionPerformed\n String newPassword = String.valueOf(passwordJPF.getPassword());\n BD.cambiarPassword(newPassword);\n JOptionPane.showMessageDialog(null, \"La PASSWORD se ha modificado con éxito.\",\n \"Información\", JOptionPane.INFORMATION_MESSAGE);\n }", "public CampingBean() {\n }", "public void setPassword(String pass);", "public void setPassword(String password){\r\n this.password = password;\r\n }", "public Builder clearChangePasswordReq() {\n copyOnWrite();\n instance.clearChangePasswordReq();\n return this;\n }" ]
[ "0.6542053", "0.6276443", "0.61709094", "0.59808725", "0.5904708", "0.5892138", "0.58862305", "0.58522767", "0.5852102", "0.5842908", "0.58370185", "0.5830283", "0.5811222", "0.5787891", "0.57364625", "0.5734627", "0.57295793", "0.57295793", "0.57295793", "0.57198095", "0.57049227", "0.57043916", "0.5702545", "0.5699097", "0.5689243", "0.5677667", "0.5675213", "0.56670666", "0.566057", "0.566057", "0.56568134", "0.5608642", "0.5606202", "0.560309", "0.5595356", "0.55811125", "0.5580148", "0.557201", "0.5570003", "0.5559563", "0.5553525", "0.5553525", "0.5551904", "0.5550712", "0.5549391", "0.5529985", "0.5526895", "0.5523049", "0.55219096", "0.55179566", "0.5513102", "0.5513102", "0.5513102", "0.5511893", "0.55080837", "0.5485473", "0.54760087", "0.5471117", "0.5439891", "0.5439891", "0.5439026", "0.5430274", "0.5406109", "0.5395141", "0.5393195", "0.53856677", "0.537392", "0.5353579", "0.5352954", "0.5352954", "0.5352954", "0.53450453", "0.53446305", "0.53376836", "0.53376836", "0.53376836", "0.53286254", "0.53256285", "0.5324221", "0.531763", "0.5316467", "0.5316467", "0.53158784", "0.53158784", "0.53153753", "0.5306659", "0.5300577", "0.5300181", "0.5294729", "0.52930295", "0.52921164", "0.52914685", "0.5289601", "0.52823555", "0.5282188", "0.5254995", "0.5249407", "0.524381", "0.52420783", "0.5240098" ]
0.82089645
0
Created by sreelal on 16/12/17.
public interface DataBasePresent { void setDistrict(List<Name_Id> list); void setLocalBodyType(List<Name_Id> list); void setLocalBodyName(List<LocalBody> list); List<Name_Id> getDistrict(); List<Name_Id> getLocalBodyType(); List<LocalBody> getLocalBodyName(String districId ,String locatType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\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 dormir() {\n\t\t\r\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}", "private void m50366E() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void init() {\n\n }", "protected boolean func_70814_o() { return true; }", "private void poetries() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void gored() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {}", "@Override\n void init() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n protected void init() {\n }", "public void mo4359a() {\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\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\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}", "private void init() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n protected void initialize() \n {\n \n }", "private void kk12() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\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 nghe() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private Rekenhulp()\n\t{\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 int mettreAJour() {\n\t\treturn 0;\n\t}", "public void method_4270() {}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public void m23075a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void initialize() { \n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "public final void mo91715d() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "private void m50367F() {\n }", "@Override\n public void init() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}" ]
[ "0.60705274", "0.5894938", "0.5866747", "0.5824997", "0.5800171", "0.5771144", "0.5771144", "0.57544774", "0.5711638", "0.57083976", "0.5681119", "0.56665444", "0.5649293", "0.5641524", "0.5636162", "0.56189394", "0.56189394", "0.56189394", "0.56189394", "0.56189394", "0.56068987", "0.56003153", "0.5599706", "0.5597109", "0.5596054", "0.5593401", "0.5588977", "0.557997", "0.55754894", "0.5570679", "0.55521816", "0.5549219", "0.55416435", "0.5516788", "0.5516788", "0.5511739", "0.5498155", "0.5497512", "0.54904854", "0.5489506", "0.54888284", "0.5488237", "0.5483357", "0.54790395", "0.54790395", "0.54790395", "0.54790395", "0.54790395", "0.54790395", "0.5474179", "0.5469702", "0.54660404", "0.54582614", "0.54582614", "0.54582614", "0.5448529", "0.5448529", "0.5448529", "0.5432392", "0.543172", "0.543172", "0.5428891", "0.5428891", "0.5428891", "0.54256797", "0.54227436", "0.5413659", "0.54112214", "0.5408484", "0.54078084", "0.53888285", "0.5385758", "0.53793126", "0.5378323", "0.5373971", "0.5373971", "0.53734475", "0.5372425", "0.5371532", "0.53703946", "0.5358928", "0.5358928", "0.5358928", "0.5358928", "0.5358928", "0.5358928", "0.5358928", "0.53529656", "0.53378594", "0.53350335", "0.53336525", "0.532997", "0.5312902", "0.53120255", "0.53107494", "0.53107494", "0.5305475", "0.5304948", "0.5298911", "0.5293405", "0.52888405" ]
0.0
-1
Throw an exception if the date is out of bounds
public boolean runsOn( GTFSDate date ) { if( date.before( this.start_date) ) { throw new DateOutOfBoundsException( date+" is before period start "+this.start_date ); } if( date.after( this.end_date) ) { throw new DateOutOfBoundsException( date+" is after period end "+this.end_date ); } //Return false if service is canceled on this day; true of it specifically runs ServiceCalendarDate exception = this.getServiceCalendarDate(date); if(exception != null) { if( exception.exception_type.intValue() == ServiceCalendarDateExceptionType.ADDED ) { return true; } else if( exception.exception_type.intValue() == ServiceCalendarDateExceptionType.REMOVED ) { return false; } } //Return true if it runs on today's DOW GregorianCalendar cal = new GregorianCalendar(date.year,date.month-1,date.day); int dow = cal.get(GregorianCalendar.DAY_OF_WEEK); if((dow==GregorianCalendar.MONDAY && this.monday.val ) || (dow==GregorianCalendar.TUESDAY && this.tuesday.val ) || (dow==GregorianCalendar.WEDNESDAY && this.wednesday.val) || (dow==GregorianCalendar.THURSDAY && this.thursday.val ) || (dow==GregorianCalendar.FRIDAY && this.friday.val ) || (dow==GregorianCalendar.SATURDAY && this.saturday.val ) || (dow==GregorianCalendar.SUNDAY && this.sunday.val )) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testDateRangeValidDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n fields.put(\"generatedTimestamp\", \"12/31/1981\");\n \n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertEquals(\"does not contain valid date range \" + fields.get(\"generatedTimestamp\"),\n \"12/31/1981..01/01/1982\", fields.get(\"generatedTimestamp\"));\n }", "void checkForValidDate(String dateTime) {\n\n int daysOfMonth[] = {31,28,31,30,31,30,31,31,30,31,30,31};\n\n Timestamp now = new Timestamp(new java.util.Date().getTime());\n Timestamp date = Timestamp.valueOf(startDateTime);\n if (date.after(now)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Date / Time later than today's date : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (date.after(now))\n\n StringTokenizer t = new StringTokenizer(dateTime, \"- :.\");\n int year = Integer.parseInt(t.nextToken());\n int month = Integer.parseInt(t.nextToken());\n int day = Integer.parseInt(t.nextToken());\n int hour = Integer.parseInt(t.nextToken());\n int minute = Integer.parseInt(t.nextToken());\n boolean isLeapYear = ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0));\n if (isLeapYear) daysOfMonth[1] += 1;\n if (year < 1850) {\n outputError(lineCount + \" - Fatal - \" +\n \"Year before 1850 : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (year < 1850)\n\n if (month > 12) {\n outputError(lineCount + \" - Fatal - \" +\n \"Month invalid ( > 12) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (month > 12)\n\n if (day > daysOfMonth[month-1]) {\n outputError(lineCount + \" - Fatal - \" +\n \"Day invalid ( > no of days in month) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (day > (daysOfMonth[month-1])\n\n if (hour > 23) {\n outputError(lineCount + \" - Fatal - \" +\n \"Hour invalid ( > 23) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (hour > 23)\n\n if (minute > 59) {\n outputError(lineCount + \" - Fatal - \" +\n \"Minute invalid ( > 59) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (minute > 59)\n\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectMonth() {\r\n SimpleDate d1 = new SimpleDate(\"-3/1/1700\");\r\n }", "public void checkDate() throws InvalidDateException {\n Date todayDate = new Date();\n if (!todayDate.after(date)) {\n throw new InvalidDateException(\"Date is from the future!\");\n }\n }", "@Test\n public void testDateRangeInvalidDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n fields.put(\"generatedTimestamp\", \"foo\");\n \n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertEquals(\"should not have changed time field \" + fields.get(\"generatedTimestamp\"),\n \"foo\", fields.get(\"generatedTimestamp\"));\n }", "@Test(expected = IllegalDateException.class)\n\tpublic void testBookStartDateInPast() throws Exception {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, -2);\n\t\t// start is current date - 2\n\t\tDate invalidStartDate = cal.getTime();\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), invalidStartDate, validEndDate);\n\t}", "@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectYear() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/1700\");\r\n }", "private boolean exceededDateListLimit() {\n final int MAX_DATE_PARSE = 2;\n return dateList.size() > MAX_DATE_PARSE;\n }", "@Test\n public void testResponseGivenARangeOfInvalidDates(){\n String startDate = \"1990-02-20\";\n String endDate = \"2030-01-09\";\n String dateParamExtension = \"&start_date=\" + startDate + \"&end_date=\" + endDate;\n try {\n response = restTemplate.getForObject(templateUrl + apiKey + dateParamExtension, String.class);\n } catch (HttpClientErrorException ex) {\n Assert.assertEquals(\"Bad request response code should be returned from server\", 400, ex.getRawStatusCode());\n }\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n long long0 = (-1903L);\n // Undeclared exception!\n try { \n Range.ofLength((-1903L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // must be >=0\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test\n public void testV4HeaderDateValidationFailure() {\n LocalDate now = LocalDate.now();\n String dateStr = \"\";\n assertThrows(MalformedResourceException.class,\n () -> testRequestWithSpecificDate(dateStr));\n\n // Case 2: Date after yesterday.\n String dateStr2 = DATE_FORMATTER.format(now.plus(2, DAYS));\n assertThrows(MalformedResourceException.class,\n () -> testRequestWithSpecificDate(dateStr2));\n\n // Case 3: Date before yesterday.\n String dateStr3 = DATE_FORMATTER.format(now.minus(2, DAYS));\n assertThrows(MalformedResourceException.class,\n () -> testRequestWithSpecificDate(dateStr3));\n\n // Case 4: Invalid date format\n String dateStr4 = now.toString();\n assertThrows(MalformedResourceException.class,\n () -> testRequestWithSpecificDate(dateStr4));\n }", "@Test(timeout = 4000)\n public void test035() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range.of(range_CoordinateSystem0, (-2147483648L), (-2147483648L));\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, 3993L, (-2147483648L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n // Undeclared exception!\n try { \n Range.of(3253L, 1198L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, (-2147483648L), (-2147483649L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private void checkDateBounds(PortfolioRecord portRecord) {\n List<DataPoint> history = portRecord.getHistory();\n\n if (!userSetDates) {\n fromDateBound = null;\n toDateBound = null;\n }\n\n if (history.size() > 0) {\n LocalDate minDate = history.get(0).getDate();\n LocalDate maxDate = history.get(history.size() - 1).getDate();\n\n if (fromDateBound == null && toDateBound == null) {\n fromDateBound = minDate;\n toDateBound = maxDate;\n } else if (toDateBound.compareTo(maxDate) < 0) {\n toDateBound = maxDate;\n }\n } else {\n fromDateBound = null;\n toDateBound = null;\n userSetDates = false;\n }\n }", "private static void checkDate(String date) {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n if (!date.matches(RegexPattern.DATE_PATTERN)) {\n throw new DaoException(ExceptionMessage.getMessage(ExceptionMessage.DATE_PATTERN_ERROR));\n }\n try {\n Date formatDate = simpleDateFormat.parse(date);\n if (formatDate.getTime() + TIME_IN_DAY < new Date().getTime()) {\n throw new DaoException(\"Date must be in Future\");\n }\n } catch (ParseException ex) {\n throw new DaoException(ex.getMessage());\n }\n }", "public static void birthdateValidation(Date birthdate) throws Exception {\n if (birthdate.after(new Date())) {\n throw new Exception(\"Your birth date cannot be in the future\");\n }\n }", "@Test\r\n\tpublic void testInvalidEndDate() {\r\n\t\ttry {\r\n\t\t\tfinal BazaarManager manager = BazaarManager.newInstance();\r\n\t\t\tfinal Item item = manager.newItem(\"testInvalidEndDate\", \"testInvalidEndDate\", manager.findRootCategory());\r\n\t\t\tfinal Calendar startDate = Calendar.getInstance();\r\n\t\t\tstartDate.setWeekDate(2020, 2, DayOfWeek.MONDAY.getValue());\r\n\t\t\tfinal Calendar endDate = Calendar.getInstance();\r\n\t\t\tendDate.setWeekDate(2020, 1, DayOfWeek.MONDAY.getValue());\r\n\t\t\tfinal Bazaar bazaar = manager.newBazaar(item, startDate, endDate);\r\n\t\t\tbazaar.persist();\r\n\t\t}\r\n\t\tcatch (final BazaarExpiredException exception) {\r\n\t\t\tAssert.assertNotNull(exception);\r\n\t\t}\r\n\t\tcatch (final BazaarException exception) {\r\n\t\t\tAssert.assertNotNull(exception);\r\n\t\t}\r\n\r\n\t}", "public void validateEndDate(Date value)\n {\n \n if (value != null)\n {\n OADBTransaction transaction = getOADBTransaction();\n\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, you cannot compare \n // oracle.jbo.domain.Date objects directly. Instead, convert the value to \n // a long as shown.\n \n long sysdate = transaction.getCurrentDBDate().dateValue().getTime();\n long endDate = value.dateValue().getTime();\n\n if (endDate < sysdate)\n { \n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"EndDate\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_END_DATE_PAST\"); // Message name\n } \n }\n\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n Range range0 = Range.of(0L);\n range0.toString();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n range0.getEnd(range_CoordinateSystem0);\n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.ZERO_BASED;\n range0.getEnd(range_CoordinateSystem1);\n range0.iterator();\n Range.of((-1233L), 0L);\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem1, 0L, (-1233L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test\n void deve_retornar_uma_datetimeexception() {\n List<LocalTime> localTimes = Arrays.asList(LocalTime.parse(\"12:00:00\"));\n TimeModel timeModel = TimeModelStub.getTimeModel();\n timeModel.setPeriod(TimeCourseEnum.SECOND_PERIOD_IN);\n timeModel.setTime(\"12:30\");\n Assert.assertThrows(DateTimeException.class, () -> timeService.checkInterval(timeModel, localTimes));\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n long long0 = 2147483647L;\n Range.of(2147483647L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"\", range_CoordinateSystem0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test016() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n // Undeclared exception!\n try { \n range_Builder0.contractBegin(2147483647L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n long long0 = 785L;\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, 9223372036854775806L, (-128L));\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // given length -129 would make range [9223372036854775805 - ? ] beyond max allowed end offset\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectLeapYear() {\r\n SimpleDate d1 = new SimpleDate(\"2/29/2000\");\r\n }", "@Test\n public void testDateRangeNoDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertNull(\"should not contain a time \" + fields.get(\"generatedTimestamp\"), fields.get(\"generatedTimestamp\"));\n }", "public static void printDateTimeErr() {\n printLine();\n System.out.println(\" Oops! Please enter your date in the yyyy-mm-dd format\\n\");\n printLine();\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n long long0 = (-1L);\n Range range0 = Range.of((-1L));\n range0.getBegin();\n Range.Builder range_Builder0 = new Range.Builder(range0);\n range_Builder0.build();\n long long1 = 0L;\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test\r\n public void testEndBeforeStartException() {\r\n boolean result = false;\r\n try {\r\n new TimeCell(\r\n LocalDateTime.now(),\r\n LocalDateTime.now().minusDays(1),\r\n LocalDateTime.now(),\r\n new Manager(\"James\"),\r\n new Worker(\"Fred\", TypeOfWork.ANY),\r\n TypeOfWork.ANY);\r\n } catch (ZeroLengthException ex) {\r\n result = false;\r\n } catch (EndBeforeStartException ex) {\r\n result = true;\r\n }\r\n assertTrue(result);\r\n }", "private void validateDate() {\n if (dtpSightingDate.isEmpty()) {\n dtpSightingDate.setErrorMessage(\"This field cannot be left empty.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is after research began (range check)\n else if (!validator.checkDateAfterMin(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter from \" + researchDetails.MIN_DATE + \" and afterwards. This is when the research period began.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is not in the future (range check / logic check)\n else if (!validator.checkDateNotInFuture(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter a date from today or before. Sighting date cannot be in the future.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n }", "@Test(timeout = 4000)\n public void test004() throws Throwable {\n Range range0 = Range.ofLength(9223372032559808565L);\n String string0 = \"]?&0A@\";\n range0.getLength();\n // Undeclared exception!\n try { \n Range.ofLength((-2524L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // must be >=0\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test\n public void testGetMaxEndDate() {\n ApplicationInfo.info(\n DatabaseHelperTest.class, ApplicationInfo.TEST, ApplicationInfo.UNIT_TEST, \"testBeginsWithEmpty\");\n // Date expResult = null;\n Date result = DatabaseHelper.getMaxEndDate();\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT+1\"));\n cal.setTime(result);\n assertEquals(3000, cal.get(Calendar.YEAR));\n assertEquals(Calendar.DECEMBER, cal.get(Calendar.MONTH));\n assertEquals(31, cal.get(Calendar.DATE));\n }", "@Test\n void deve_retornar_ApiException_quando_for_domingo() {\n TimeModel timeModel = TimeModelStub.getTimeModel();\n timeModel.setDate(\"21-3-2021\");\n Assert.assertThrows(ApiException.class, () -> timeService.checkWeekend(timeModel));\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"/9-5!2 Hl\", range_CoordinateSystem0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test\n public void testGetDailyListingFromFileSystemInvalidDate() {\n ListingFileHelper instance = new ListingFileHelper();\n\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n GregorianCalendar calendar = new GregorianCalendar(2009, 0, 1);\n List<Listing> result = instance.getDailyListingFromFileSystem(new Date(calendar.getTimeInMillis()));\n \n assertTrue(result.isEmpty());\n }", "@Test (expected = java.lang.IllegalArgumentException.class)\n public void testDatumKorrekt() throws ParseException{\n //letzten testTermin1 entfernen\n testTerminsatz.tEntfernen(testTermin1);\n //test ob ungültige Zeiten erkannt werden (Ende < Start)\n testTermin1.setStt(sdf.parse(\"2011.02.15-11:15:00\"));\n testTermin1.setStp(sdf.parse(\"2011.02.15-09:45:00\"));\n testTerminsatz.tAnlegen(testTermin1);\n System.out.println(\"Datum vertauscht wirft Exception\");\n\n }", "private static boolean dateValid(int[] time ) { \r\n\t\tfor ( int i = 0 ; i < time.length; i++) \r\n\t\t\tif (time[i] >2400 || time[i] < 0 ) \r\n\t\t\t\treturn false;\r\n\t\treturn true;\t\t\r\n\t}", "private int checkDay(int testDay) {\n\t\t// check if day in range for month\n\t\tif (testDay > 0 && testDay <= daysPerMonth[month])\n\t\t\treturn testDay;\n\n\t\t// check for leap year\n\t\tif (month == 2 && testDay == 29 && (year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)))\n\t\t\treturn testDay;\n\n\t\tthrow new IllegalArgumentException(\"day out-of-range for the specified month and year\");\n\t}", "private boolean checkValidDay() {\n return numDays >= 0 && numDays <= 7;\n }", "@Test\n public void testV4HeaderDateValidationSuccess()\n throws MalformedResourceException {\n LocalDate now = LocalDate.now();\n String dateStr = DATE_FORMATTER.format(now);\n testRequestWithSpecificDate(dateStr);\n\n // Case 2: Valid date with in range.\n dateStr = DATE_FORMATTER.format(now.plus(1, DAYS));\n testRequestWithSpecificDate(dateStr);\n\n // Case 3: Valid date with in range.\n dateStr = DATE_FORMATTER.format(now.minus(1, DAYS));\n testRequestWithSpecificDate(dateStr);\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testFindFreeFacilitiesWithIllegalEnd() {\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), SEARCH_TEXT, NEEDED_WORKPLACES);\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, -2);\n\t\t// end is current date - 2\n\t\tDate invalidEndDate = cal.getTime();\n\t\tbookingManagement.findFreeFacilites(query, validStartDate, invalidEndDate, true);\n\t}", "@Test\n public void testValidateUpdateLifeTimeWithBadDates() {\n updates.add(mockAssetView(\"endDate\", new Timestamp(25000).toString()));\n updates.add(mockAssetView(\"startDate\", new Timestamp(20000).toString()));\n defaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n verify(assetService, never()).addError(eq(RuleProperty.END_DATE), anyString()); \n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void beginGreaterException() {\n\n\t\tset.beginAt(set.size() + 1);\n\t}", "@Test(expected = IllegalArgumentException.class)\n\tpublic void endLesserException() {\n\n\t\tset.beginAt(2);\n\t\tset.endAt(1);\n\t}", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n long long0 = (-665L);\n long long1 = (-1L);\n Range.Builder range_Builder0 = new Range.Builder(range_CoordinateSystem0, (-665L), (-1L));\n range_Builder0.contractEnd((-665L));\n range_Builder0.expandEnd((-1L));\n // Undeclared exception!\n try { \n range_Builder0.contractEnd(9223372036854775807L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private void checkCorrectDateFormat(String date) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\", Locale.getDefault());\n sdf.setLenient(false);\n try {\n sdf.parse(date);\n } catch (ParseException e) {\n throw new IllegalArgumentException(\n \"Google Calendar Event Date must follow\" + \" the format: \\\"yyyy-MM-dd'T'HH:mm:ss\\\"\");\n }\n }", "private void verifyPeriod(Date start, Date end){\n List dates = logRepositoy.findAllByDateGreaterThanEqualAndDateLessThanEqual(start, end);\n if(dates.isEmpty()){\n throw new ResourceNotFoundException(\"Date range not found\");\n }\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n Object object0 = new Object();\n // Undeclared exception!\n try { \n Range.of((Range.CoordinateSystem) null, 1226L, 2776L);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // CoordinateSystem can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public void testCreateCreationDateFilter2() {\r\n try {\r\n instance.createCreationDateFilter(new Date(20000), new Date(10000));\r\n fail(\"IllegalArgumentException expected.\");\r\n } catch (IllegalArgumentException iae) {\r\n //good\r\n }\r\n }", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n long long0 = 0L;\n Range.Builder range_Builder0 = new Range.Builder(range_CoordinateSystem0, 0L, 0L);\n range_Builder0.shift(0L);\n range_Builder0.copy();\n // Undeclared exception!\n try { \n Range.parseRange((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n Range range0 = Range.ofLength(9223372032559808565L);\n String string0 = \"]?&0A@\";\n range0.getLength();\n // Undeclared exception!\n try { \n range0.split(9223372032559808565L);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // given length -8589934487 would make range [9223372032559808565 - ? ] beyond max allowed end offset\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test\n public void testGetListingInvalidDateFormat() {\n ListingFileHelper instance = new ListingFileHelper();\n try {\n StringBuilder sb = new StringBuilder();\n sb.append(getTestListingDateTimeStamp());\n sb.append(\"~\");\n sb.append(testTvShow);\n sb.append(\"~\");\n sb.append(testTitle);\n sb.append(\"~\");\n sb.append(testChannel.getChannelName());\n instance.getListing(sb.toString());\n fail(\"Expected an IllegalArgumentException to be thrown\");\n } catch (IllegalArgumentException iaEx) {\n String expectedErrorMessage = \"Unable to parse listing datetime: \" + getTestListingDateTimeStamp();\n assertEquals(expectedErrorMessage, iaEx.getMessage());\n }\n }", "@Test(timeout = 4000)\n public void test30() throws Throwable {\n Range.of(4294967296L);\n long long0 = 1264L;\n // Undeclared exception!\n try { \n Range.of(1321L, 1264L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n range0.getEnd();\n // Undeclared exception!\n try { \n range0.split(0L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // max splitLength must be >= 1\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testFindFreeFacilitiesWithIllegalStart() {\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), SEARCH_TEXT, NEEDED_WORKPLACES);\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, -2);\n\t\t// start is current date - 2\n\t\tDate invalidStartDate = cal.getTime();\n\t\tbookingManagement.findFreeFacilites(query, invalidStartDate, validEndDate, true);\n\t}", "public void validateStartDate(Date value)\n {\n \n if (value != null)\n {\n OADBTransaction transaction = getOADBTransaction();\n\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, you cannot compare \n // oracle.jbo.domain.Date objects directly. Instead, convert the value to \n // a long as shown.\n \n long sysdate = transaction.getCurrentDBDate().dateValue().getTime();\n long startDate = value.dateValue().getTime();\n\n if (startDate < sysdate)\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"StartDate\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_DATE_PAST\"); // Message name\n } \n }\n \n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void beginNegativeException() {\n\n\t\tset.beginAt(-1);\n\t}", "public static void isValidDate(LocalDate date) throws ValidationException {\n\t\tLocalDate today = LocalDate.now();\n\t\tif (date.isBefore(today)) {\n\t\t\tthrow new ValidationException(\"Date cannot be past date\");\n\t\t}\n\t}", "private void checkRange(int index) {\n if ((index < 0 || index >= curSize))\n throw new IndexOutOfBoundsException(\"Index: \" + index + \" is out of bounds. Size = \" + size());\n }", "@Test(timeout = 4000)\n public void test003() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, 2147483646L, (-9223372036854775808L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Range coordinates 2147483646, -9223372036854775808 are not valid Zero Based coordinates\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test318() throws Throwable {\n Form form0 = new Form(\"w\");\n // Undeclared exception!\n try { \n form0.dateFormat(\"? fOYd~2\", form0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Failed to initialize SimpleDateFormat with pattern '? fOYd~2'.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void setMaxDate(LocalDate maxDate) throws Exception {\r\n this.maxDate = maxDate;\r\n if (minDate != null){\r\n if (minDate.isAfter(maxDate)){\r\n throw new Exception(\"La date \" + minDate +\" n'est pas anterieure à la date max \" + maxDate);\r\n }\r\n }\r\n }", "@Test(expected = IllegalDateException.class)\n\tpublic void testBookStartDateAfterEndDate() throws Exception {\n\t\t// switched end and start\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), validEndDate, validStartDate);\n\t}", "public void setInvalidDate(Date invalidDate) {\n this.invalidDate = invalidDate;\n }", "void timeCheck() throws Exception{\n\t\tif(arrival<time_check)\n\t\tthrow new Exception(\"Arrival time should be non-descending\");\n\t}", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n Object object0 = new Object();\n range0.equals(\"[ 0 .. -1 ]/0B\");\n // Undeclared exception!\n try { \n range0.endsBefore((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Null Range used in range comparison operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public Date getInvalidDate() {\n return invalidDate;\n }", "@Test public void Month_name_0__day__year__bad_day()\t\t\t{tst_date_(\"Mar 32 2001\"\t\t\t, \"Invalid day: 32\");}", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem0, 0L, 4294967295L);\n Range range0 = Range.of(range_CoordinateSystem0, (-1241L), 848L);\n // Undeclared exception!\n try { \n range0.split(0L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // max splitLength must be >= 1\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@SuppressWarnings(\"unchecked\")\n @Test\n public void insertOldDate() throws ServletException, IOException {\n final String finalDate = \"2007-12-03\";\n final String requestId = \"1\";\n initialize(finalDate, requestId);\n servlet.doPost(request, response);\n assertEquals(\"Invalid date! Date must be in the future!\",\n ((Map<String, Object>) request.getAttribute(\"viewModel\")).get(\"errorMessage\"));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2117L, 2117L);\n // Undeclared exception!\n try { \n range0.getBegin((Range.CoordinateSystem) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // CoordinateSystem can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public void checkErrorMsgForEventCreationWithPastStartDate(EcpCoreLSProgram ecpCoreLSProgram)\n throws ParseException;", "public static void validateDate(String date) throws CustomExceptionHandler {\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd.MM.yyyy\");\n formatter.setLenient(false);\n Date parsedDate;\n\n //Throw Exception if string is blank\n if(date.isBlank()||date.isEmpty())\n throw new CustomExceptionHandler(\"Date NOT Specified\");\n\n\n\n //Throw exception if date is not formatted correctly\n try\n {\n parsedDate = formatter.parse(date);\n\n }\n catch (Exception e)\n {\n throw new CustomExceptionHandler(\"The date format is not correct\");\n }\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n Range.Comparators.values();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem0, (-5250L), 2383L);\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private void validateDateRange(String startDateStr, String endDateStr) {\n Date startDate = null;\n Date endDate = null;\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n \n try {\n if ((startDateStr != null) && (endDateStr != null)) {\n startDate = dateFormat.parse(startDateStr);\n endDate = dateFormat.parse(endDateStr);\n \n if ((startDate != null) && (endDate != null) && (startDate.after(endDate))) {\n throw new IllegalArgumentException(\n \"The date range is invalid. Start date ('\" + startDateStr + \n \"') should be less than end date ('\" + endDateStr + \"').\"); \t\n }\n }\n }\n catch (ParseException e) {\n logger.warn(\"Couldn't parse date string: \" + e.getMessage());\n }\n \n }", "private void checkDate(String strDate, LocalDate localDate) {\n if (Integer.parseInt(strDate.substring(0, 4)) != localDate.getYear()\n || Integer.parseInt(strDate.substring(5, 7)) != localDate.getMonthValue()\n || Integer.parseInt(strDate.substring(8,10)) != localDate.getDayOfMonth()) {\n throw new IllegalArgumentException(\"Illegal date: date dose not exist.\");\n }\n }", "public boolean checkPastDate(boolean said)\n {\n try\n {\n if( date==null ){\n if(this.getDateString()!=null) date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n } }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n if(date==null)\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n }\n if(!date.before(currentDate))\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n\n }\n else\n {\n return true;\n }\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.getEnd();\n long long0 = 0L;\n // Undeclared exception!\n try { \n range0.isSubRangeOf((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // range can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Override\n public void add(final int index, final Date value) {\n final long date = value.getTime();\n if (date2 == Long.MIN_VALUE) {\n switch (index) {\n case 0: {\n date2 = date1;\n date1 = date;\n modCount++;\n return;\n }\n case 1: {\n if (date1 == Long.MIN_VALUE) {\n break; // Exception will be thrown below.\n }\n date2 = date;\n modCount++;\n return;\n }\n }\n }\n throw new IndexOutOfBoundsException(Errors.format(Errors.Keys.IndexOutOfBounds_1, index));\n }", "@Test\n public void testValidateUpdateLifeTimeWithGoodDates() {\n updates.add(mockAssetView(\"endDate\", new Timestamp(20000).toString()));\n updates.add(mockAssetView(\"startDate\", new Timestamp(25000).toString()));\n defaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n verify(assetService).addError(eq(RuleProperty.END_DATE), anyString()); \n }", "private void rangeCheck(int index) {\n if (index >= this.values.length) {\n throw new ArrayIndexOutOfBoundsException(\"Index of out bounds!\");\n }\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n Range.Builder range_Builder1 = new Range.Builder(0L);\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(243L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n long long0 = 127L;\n Range range1 = Range.of((-636L), 127L);\n range1.isSubRangeOf(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n Range range0 = Range.ofLength(9223372032559808565L);\n // Undeclared exception!\n try { \n range0.intersects((Range) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Null Range used in intersection operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test100() throws Throwable {\n Range range0 = Range.of(0L);\n long long0 = new Long(0L);\n // Undeclared exception!\n try { \n range0.getEnd((Range.CoordinateSystem) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // CoordinateSystem can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public void testIndexCostForDate() {\n final Date dateIndexing = new Date();\n this.classHandler.applyIndexesForDate(dateIndexing);\n }", "private void validationLocalDates(LocalDate startDate, LocalDate endDate) {\n\t\t\n\t\tif(startDate == null || endDate == null) {\n\t\t\tthrow new EmptyDateException();\n\t\t}\n\t\t\n\t\tif(startDate.compareTo(endDate) > 0) {\n\t\t\tthrow new LocalDatesTwoValidException(startDate, endDate);\n\t\t}\n\t}", "public static void printEmptyDeadlineDateError() {\n botSpeak(Message.EMPTY_DEADLINE_DATE_ERROR);\n }", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n Object object0 = new Object();\n range0.endsBefore(range0);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"[ 0 .. -1 ]/0B\", range_CoordinateSystem0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse [ 0 .. -1 ]/0B into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test000() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n long long0 = (-665L);\n long long1 = 14L;\n Range.Builder range_Builder0 = new Range.Builder(14L);\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(14L, (-665L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public void makeValidDate() {\n\t\tdouble jd = swe_julday(this.year, this.month, this.day, this.hour, SE_GREG_CAL);\n\t\tIDate dt = swe_revjul(jd, SE_GREG_CAL);\n\t\tthis.year = dt.year;\n\t\tthis.month = dt.month;\n\t\tthis.day = dt.day;\n\t\tthis.hour = dt.hour;\n\t}", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 9223372032559808565L, 9223372036854775806L);\n Range range1 = Range.of(range_CoordinateSystem0, 9223372036854775806L, 9223372036854775806L);\n range0.equals(range1);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange((String) null, range_CoordinateSystem1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public static void PurchaseOrder_SearchPage_InvalidDate_Val(List<HashMap<String, String>> data) {\n\t\tWebdriverWait.findElement(\"id\", \"minDate_i18n\").sendKeys(data.get(8).get(\"Column1\"));\n\t\tWebdriverWait.findElement(\"id\", \"maxDate_i18n\").sendKeys(data.get(7).get(\"Column1\"));\n\t\tWebdriverWait.findElement(\"xpath\", \"//*[@value='Search']\").click();\n\n\t\tString PO_ThruDate = WebdriverWait.findElement(\"xpath\", \"//*[@id= 'content-messages']/div/ul/li[1]\").getText();\n\t\tPO_PurchaseOrder_softAssert.assertThat(PO_ThruDate).isEqualTo(data.get(21).get(\"Column2\"));\n\t}", "private void checkOutOfBounds(int index) {\n if (this.isOutOfBounds(index)) {\n throw new IndexOutOfBoundsException();\n }\n }", "public ExceptionDate(){\n\t\tsuper();\n\t}", "public void testRetrieveRecentlyCreatedPaymentTerms_ErrorRecentDays() throws Exception {\r\n try {\r\n this.getManager().retrieveRecentlyCreatedPaymentTerms(-2);\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n assertTrue(e.getMessage()\r\n .indexOf(\"The recent days must be positive or equal -1\") >= 0);\r\n }\r\n }", "void validateDates(ComponentSystemEvent event);", "@Test(expected = IllegalArgumentException.class)\n\tpublic void endNegativeException() {\n\n\t\tset.endAt(-1);\n\t}", "@SuppressWarnings(\"unchecked\")\n @Test\n public void nonParsableDate() throws ServletException, IOException {\n final String finalDate = \"asd\";\n final String requestId = \"1\";\n initialize(finalDate, requestId);\n servlet.doPost(request, response);\n assertEquals(\"Invalid date!\", ((Map<String, Object>) request.getAttribute(\"viewModel\")).get(\"errorMessage\"));\n }", "@Test\n public void testRegisterPatientInvalidDate(){\n assertThrows(IllegalArgumentException.class,\n () -> { register.registerPatient(\"Donald\", \"Trump\", \"00019112345\", \"Doctor Proctor\");});\n }", "@Test(expectedExceptions = DataAccessLayerException.class)\n void findBetweenThrowsTest() {\n Mockito.when(reservationDao.findReservationBetween(Mockito.any(), Mockito.any())).thenThrow(IllegalArgumentException.class);\n reservationService.findReservationsBetween(null, LocalDate.now());\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 9223372032559808509L, 9223372036854775806L);\n // Undeclared exception!\n try { \n range0.split((-797L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // max splitLength must be >= 1\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }" ]
[ "0.6448233", "0.6380966", "0.6366629", "0.63516694", "0.6346406", "0.6280348", "0.6210121", "0.6172112", "0.6137925", "0.6118421", "0.61023206", "0.60284495", "0.5967378", "0.594319", "0.593694", "0.591665", "0.58669066", "0.586268", "0.58485746", "0.5841562", "0.58024395", "0.57957804", "0.5788809", "0.57745004", "0.57394665", "0.5729717", "0.5673972", "0.5668043", "0.5660878", "0.56505746", "0.5645424", "0.56319076", "0.56290805", "0.562677", "0.56178397", "0.5596912", "0.5586523", "0.557178", "0.5558681", "0.55548775", "0.5553656", "0.55513597", "0.5542797", "0.55418205", "0.55351377", "0.5510692", "0.55065876", "0.5497947", "0.54915106", "0.5483485", "0.5482509", "0.54744744", "0.5472431", "0.5471113", "0.54572916", "0.54334676", "0.54282147", "0.54198235", "0.54115194", "0.53997666", "0.53948873", "0.5392473", "0.5384436", "0.53787583", "0.5374339", "0.53731406", "0.5362062", "0.5357634", "0.5355241", "0.5351036", "0.5350474", "0.53451586", "0.534419", "0.53408325", "0.53388387", "0.5338126", "0.5338021", "0.5325603", "0.53156996", "0.53142124", "0.5313308", "0.53032404", "0.5301028", "0.53003305", "0.5298995", "0.52887756", "0.5287475", "0.5274333", "0.52736014", "0.52721584", "0.5270246", "0.5270011", "0.5268492", "0.52674204", "0.52644664", "0.52629507", "0.52477294", "0.52457213", "0.5235306", "0.5234778", "0.52283895" ]
0.0
-1
Hibernate SessionFactory Variable Constructor NationalityDAO Initializes sessionFactory
public NationalityDAO() { //sessionFactory = HibernateUtil.getSessionFactory(); session=HibernateUtil.openSession(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PaymentDAOImpl(SessionFactory sessionfactory)\n\t{\n\tthis.sessionFactory=sessionfactory; \n\tlog.debug(\"Successfully estblished connection\");\n\t}", "public FuncaoCasoDAOImpl() {\n\t\tsetSession(HibernateUtil.getSessionFactory());\n\t}", "@Autowired\n public CuestionarioDaoHibernate(SessionFactory sessionFactory) {\n this.setSessionFactory(sessionFactory);\n }", "public RegionDAO(SessionFactory factory) {\r\n this.factory = factory;\r\n }", "private static SessionFactory buildSessionFact() {\n try {\n\n return new Configuration().configure(\"hibernate.cfg.xml\").buildSessionFactory();\n\n \n } catch (Throwable ex) {\n \n System.err.println(\"Initial SessionFactory creation failed.\" + ex);\n throw new ExceptionInInitializerError(ex);\n }\n }", "protected\r\n JpaDaoFactory()\r\n {\r\n ISessionStrategy mySessionStrategy = new JpaSessionStrategy();\r\n ITransactionStrategy myTransactionStrategy = \r\n new JpaTransactionStrategy(mySessionStrategy);\r\n\r\n setSessionStrategy(mySessionStrategy);\r\n setTransactionStrategy(myTransactionStrategy);\r\n }", "private static synchronized void lazyinit()\n {\n try\n {\n if (sessionFactory == null)\n {\n System.out.println(\"Going to create SessionFactory \");\n sessionFactory = new Configuration().configure().buildSessionFactory();\n// sessionFactory.openSession();\n System.out.println(\"Hibernate could create SessionFactory\");\n }\n } catch (Throwable t)\n {\n System.out.println(\"Hibernate could not create SessionFactory\");\n t.printStackTrace();\n }\n }", "static void initialize() {\n final StandardServiceRegistry registry = new StandardServiceRegistryBuilder()\r\n .configure() // configures settings from hibernate.cfg.xml\r\n .build();\r\n try {\r\n sessionFactory = new MetadataSources( registry ).buildMetadata().buildSessionFactory();\r\n }\r\n catch (Exception e) {\r\n StandardServiceRegistryBuilder.destroy( registry );\r\n }\r\n }", "static void initialize() {\n final StandardServiceRegistry registry = new StandardServiceRegistryBuilder()\n .configure() // configures settings from hibernate.cfg.xml\n .build();\n try {\n sessionFactory = new MetadataSources( registry ).buildMetadata().buildSessionFactory();\n }\n catch (Exception e) {\n StandardServiceRegistryBuilder.destroy( registry );\n }\n }", "public SessionDao(Configuration configuration) {\n super(Session.SESSION, com.scratch.database.mysql.jv.tables.pojos.Session.class, configuration);\n }", "public void setSessionFactory(SessionFactory sessionFactory) {\n template = new HibernateTemplate(sessionFactory);\n}", "@Autowired\n\tpublic HibernateAccountManager(SessionFactory sessionFactory) {\n\t\tthis.sessionFactory = sessionFactory;\n\t\tthis.hibernateTemplate = new HibernateTemplate(sessionFactory);\n\t}", "public BlogDaoHibernateFactoryImpl() {\n\t\tsuper();\n\t}", "public synchronized static SessionFactory createSessionFactory() {\r\n\r\n if (sessionFactory == null) {\r\n LOG.debug(MODULE + \"in createSessionFactory\");\r\n sessionFactory = new Configuration().configure().buildSessionFactory();\r\n// ApplicationContext appcontext = ApplicationContextProvider.getApplicationContext();\r\n// sessionFactory = (SessionFactory) appcontext.getBean(\"sessionFactory\");\r\n LOG.debug(MODULE + \"sessionFactory created\");\r\n }\r\n\r\n return sessionFactory;\r\n }", "public OnibusDAO() {}", "@Autowired\n public void initReference(SessionFactory sessionFactory) {\n setSessionFactory(sessionFactory);\n }", "@Profile(\"production\")\r\n @Bean\r\n @DependsOn(\"SessionFactory\") \r\n public EshopDAOImpl getLocaleDAO(SessionFactory sessionFactory, DataSource dataSource) { \r\n \r\n EshopDAOImpl instanceDAOImpl = new EshopDAOImpl();\r\n \r\n //Inject datasource for JDBC.\r\n// instanceDAOImpl.setDataSource(dataSource); \r\n \r\n //Initialize reference to a SessionFactoryBean for database's methods. \r\n instanceDAOImpl.setSessionFactory(sessionFactory);\r\n \r\n return instanceDAOImpl; \r\n }", "@Autowired\n public UsuarioPerfilDaoHibernate(SessionFactory sessionFactory) {\n this.setSessionFactory(sessionFactory);\n }", "public ETLLogDAOImpl(SessionFactory factory) {\r\n this.factory = factory;\r\n }", "protected abstract SessionFactory buildSessionFactory() throws Exception;", "public void init(SessionFactory sessFactory) throws HibException;", "protected ContaCapitalCadastroDaoFactory() {\n\t\t\n\t}", "public SessionDao() {\n super(Session.SESSION, com.scratch.database.mysql.jv.tables.pojos.Session.class);\n }", "private static SessionFactory buildSessionFactory() {\n Configuration configObj = new Configuration();\n configObj.configure(\"hibernate.cfg.xml\");\n\n ServiceRegistry serviceRegistryObj = new StandardServiceRegistryBuilder().applySettings(configObj.getProperties()).build();\n\n // Creating Hibernate SessionFactory Instance\n sessionFactoryObj = configObj.buildSessionFactory(serviceRegistryObj);\n return sessionFactoryObj;\n }", "private SessionFactoryUtil() {\r\n try {\r\n LOG.info(\"Configurando hibernate.cfg.xml\");\r\n CfgFile cfgFile = new CfgFile();\r\n Configuration configure = new Configuration().configure(new File(cfgFile.getPathFile()));\r\n cfgFile.toBuildMetaData(configure);\r\n ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().applySettings(configure.getProperties()).build();\r\n sessionFactory = configure.buildSessionFactory(serviceRegistry);\r\n LOG.info(\"Configuracion se cargo a memoria de forma correcta\");\r\n } // try\r\n catch (Exception e) {\r\n Error.mensaje(e);\r\n } // catch\r\n }", "private static void createSessionFactory() {\n\t\ttry {\n\t\t\tif (sessionFactory == null) {\n\n\t\t\t\tProperties properties = new Properties();\n\t\t\t\tproperties.load(ClassLoader.getSystemResourceAsStream(\"hibernate.properties\"));\n\n\t\t\t\tConfiguration configuration = new Configuration();\n\t\t\t\tEntityScanner.scanPackages(\"musala.schoolapp.model\").addTo(configuration);\n\t\t\t\tconfiguration.mergeProperties(properties).configure();\n\t\t\t\tStandardServiceRegistry builder = new StandardServiceRegistryBuilder()\n\t\t\t\t\t\t.applySettings(configuration.getProperties()).build();\n\t\t\t\tsessionFactory = configuration.buildSessionFactory(builder);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Failed to create session factory object.\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "@Profile(\"development\")\r\n @Bean\r\n @DependsOn(\"SessionFactory\") \r\n public EshopDAOImpl getDevLocaleDAO(SessionFactory sessionFactory, DataSource dataSource) { \r\n \r\n EshopDAOImpl instanceDAOImpl = new EshopDAOImpl(); \r\n \r\n //Initialize reference to a SessionFactoryBean for database's methods. \r\n instanceDAOImpl.setSessionFactory(sessionFactory);\r\n \r\n return instanceDAOImpl; \r\n }", "public ProfesorDAOImpl() {\n super();\n }", "public static SessionFactory getSessionFactory(boolean bJournal) throws Exception {\r\n\t\tString domain = DomainOwner.getDomain();\r\n\t\tString configurationName = bJournal? EnvConstants.HB_CONFIG_CORE : // 获取bonita_journal库的连接\r\n\t\t\t\t\t\t\t\t\t\t\tEnvConstants.HB_CONFIG_HISTORY;//获取bonita_history库的连接\r\n\t\tfinal SessionFactory sessionFactory = getSessionFactory(domain,\r\n\t\t\t\tconfigurationName.replaceAll(\"-configuration\",\r\n\t\t\t\t\t\t\"-session-factory\"));\r\n\t\treturn sessionFactory;\r\n\t}", "SessionManagerImpl() {\n }", "public DaoFactory()\n\t{\n\n\t}", "private static SessionFactory buildSessionFactory() {\n\t\t// Creating Configuration Instance & Passing Hibernate Configuration File\n\t\tConfiguration configObj = new Configuration();\n\t\tconfigObj.configure(\"hibernate.cfg.xml\");\n\n\t\t// Since Hibernate Version 4.x, ServiceRegistry Is Being Used\n\t\tServiceRegistry serviceRegistryObj = new StandardServiceRegistryBuilder()\n\t\t\t\t.applySettings(configObj.getProperties()).build();\n\n\t\t// Creating Hibernate SessionFactory Instance\n\t\tsessionFactoryObj = configObj.buildSessionFactory(serviceRegistryObj);\n\t\treturn sessionFactoryObj;\n\t}", "private HibernateToListDAO(){\r\n\t\tfactory = new AnnotationConfiguration().addPackage(\"il.hit.model\") //the fully qualified package name\r\n .addAnnotatedClass(User.class).addAnnotatedClass(Items.class)\r\n .addResource(\"hibernate.cfg.xml\").configure().buildSessionFactory();\r\n\t}", "private static SessionFactory buildSessionFactory() {\n\n try {\n Configuration configuration = new Configuration();\n\n Properties properties = new Properties();\n properties.load(AuthDao.class.getResourceAsStream(\"/db.properties\"));\n configuration.setProperties(properties);\n\n// configuration.addAnnotatedClass(Driver.class);\n// configuration.addAnnotatedClass(DriverStatusChange.class);\n// configuration.addAnnotatedClass(Freight.class);\n// configuration.addAnnotatedClass(Location.class);\n configuration.addAnnotatedClass(Manager.class);\n// configuration.addAnnotatedClass(Order.class);\n// configuration.addAnnotatedClass(OrderDriver.class);\n// configuration.addAnnotatedClass(OrderWaypoint.class);\n// configuration.addAnnotatedClass(Truck.class);\n// configuration.addAnnotatedClass(Waypoint.class);\n\n ServiceRegistry serviceRegistry =\n new StandardServiceRegistryBuilder().applySettings(configuration.getProperties()).build();\n\n return configuration.buildSessionFactory(serviceRegistry);\n\n } catch (IOException e) {\n e.printStackTrace();\n throw new ExceptionInInitializerError(e);\n }\n }", "public AbstractHibernateDAOSupport() {\n super();\n }", "private static SessionFactory buildSessionFactory() {\n\t\ttry {\n\t\t\tConfiguration config = new Configuration().configure(); \n\t\t\tServiceRegistry serviceRegistry =\n\t\t\t\t\tnew StandardServiceRegistryBuilder()\n\t\t\t.applySettings(config.getProperties()).build();\n\n\t\t\tHibernatePBEEncryptorRegistry registry = HibernatePBEEncryptorRegistry.getInstance();\n\t\t\t\n\t\t\tStandardPBEStringEncryptor myEncryptor = new StandardPBEStringEncryptor();\n\t\t\t// FIXME : this is insecure and needs to be fixed\n\t\t\tmyEncryptor.setPassword(\"123\");\n\t\t\tregistry.registerPBEStringEncryptor(\"myHibernateStringEncryptor\", myEncryptor);\n\t\t\t\n\t\t\t\n\t\t\treturn config.buildSessionFactory(serviceRegistry); \n\t\t}\n\t\tcatch (Throwable ex) {\n\t\t\t// Make sure you log the exception, as it might be swallowed\n\t\t\tSystem.err.println(\"Initial SessionFactory creation failed.\" + ex);\n\t\t\tthrow new ExceptionInInitializerError(ex);\n\t\t}\n\t}", "public static void initialize(Configuration config) {\n // Create the SessionFactory\n \tif (sessionFactory != null) {\n \t\tthrow new IllegalStateException(\"HibernateUtil already initialized.\");\n \t}\n \tHibernateUtil.configuration = config;\n \t\n sessionFactory = config.buildSessionFactory();\n }", "public TeamViewerConnectionDAOImpl(SessionFactory sessionFactory){\n\t\tsuper.sessionFactory = sessionFactory;\n\t\tsuper.type = TeamViewerConnection.class;\n\t}", "public static SessionFactory getSessionFactory() {\n\n if(sessionFactory == null) {\n try {\n MetadataSources metadataSources = new MetadataSources(configureServiceRegistry());\n\n addEntityClasses(metadataSources);\n\n sessionFactory = metadataSources.buildMetadata()\n .getSessionFactoryBuilder()\n .build();\n\n } catch (Exception e) {\n e.printStackTrace();\n if(registry != null)\n StandardServiceRegistryBuilder.destroy(registry);\n }\n }\n\n return sessionFactory;\n }", "@Inject\n private DataStore() {\n final StandardServiceRegistry registry = new StandardServiceRegistryBuilder()\n .configure()\n .build();\n try {\n sessionFactory = new MetadataSources(registry).buildMetadata().buildSessionFactory();\n } catch (Exception e) {\n LOGGER.error(\"Fehler beim initialisieren der Session\", e);\n StandardServiceRegistryBuilder.destroy(registry);\n }\n \n }", "@Autowired()\n\tpublic PostDao(SessionFactory sessfact) {\n\t\tthis.sessfact = sessfact;\n\t}", "public RequisicaoDAO() {\n em = JPAUtil.initConnection();\n }", "public interface Dao {\n\tpublic void setMySessionFactory(SessionFactory sf);\n}", "private static void init() {\n\t\tif (factory == null) {\n\t\t\tfactory = Persistence.createEntityManagerFactory(\"hibernatePersistenceUnit\");\n\t\t}\n\t\tif (em == null) {\n\t\t\tem = factory.createEntityManager();\n\t\t}\n\t}", "public PacienteDAO(){ \n }", "private static void init(){\n entityManager = HibernateUtil.getEntityManager();\n transaction = entityManager.getTransaction();\n }", "public TermDAOImpl(){\n connexion= new Connexion();\n }", "DepartReportDAOJDBC(DAOFactory daoFactory) {\r\n this.daoFactory = daoFactory;\r\n }", "private static SessionFactory buildSessionFactory() {\n\t\ttry {\n\t\t\t// Create the SessionFactory from hibernate.cfg.xml\n\t\t\tConfiguration configuration = new Configuration().configure();\n\t\t\tServiceRegistry serviceRegistry = new ServiceRegistryBuilder()\n\t\t\t\t\t.applySettings(configuration.getProperties())\n\t\t\t\t\t.buildServiceRegistry();\n\t\t\tSessionFactory sessionFactory = configuration\n\t\t\t\t\t.buildSessionFactory(serviceRegistry);\n\t\t\treturn sessionFactory;\n\t\t} catch (Throwable ex) {\n\t\t}\n\t\treturn null;\n\t}", "@Autowired\n\t public FlightSeatRepositoryImpl(EntityManagerFactory factory) {\n\t\t if(factory.unwrap(SessionFactory.class) == null){\n\t\t\t throw new NullPointerException(\"factory is not a hibernate factory\");\n\t\t }\n\t\t this.sessionFactory = factory.unwrap(SessionFactory.class);\n\t }", "public static SessionFactory getSessionFactory() {\n\t\tConfiguration configObj = new Configuration();\n\t\tconfigObj.addAnnotatedClass(com.training.org.User.class);\n\t\tconfigObj.configure(\"hibernate.cfg.xml\");\n\t\t\n\t\t\n\t\n\n\t\t// Since Hibernate Version 4.x, Service Registry Is Being Used\n\t\tServiceRegistry serviceRegistryObj = new StandardServiceRegistryBuilder().applySettings(configObj.getProperties()).build(); \n\n\t\t// Creating Hibernate Session Factory Instance\n\t\tSessionFactory factoryObj = configObj.buildSessionFactory(serviceRegistryObj);\t\t\n\t\treturn factoryObj;\n\t}", "PublicationDAO(DAOFactory factory) {\n\t\tsuper( factory );\n\t}", "private DAOJPAFactory() {\r\n }", "private OrderFacade(){\n\t\tAbstractDAOFactory f = new MySQLDAOFactory();\n \tthis.odao = f.getOrderDAO();\n\t}", "public UserLoginDAOImpl() {\r\n\r\n }", "protected ETLLogDAOImpl(Configuration config) {\r\n config.addClass(ETLLog.class);\r\n factory = config.buildSessionFactory();\r\n }", "public static SessionFactory getSessionFactory() {\r\n\t\t/*\r\n\t\t * Instead of a static variable, use JNDI: SessionFactory sessions =\r\n\t\t * null; try { Context ctx = new InitialContext(); String jndiName =\r\n\t\t * \"java:hibernate/HibernateFactory\"; sessions =\r\n\t\t * (SessionFactory)ctx.lookup(jndiName); } catch (NamingException ex) {\r\n\t\t * throw new InfrastructureException(ex); } return sessions;\r\n\t\t */\r\n\t\treturn sessionFactory;\r\n\t}", "private SessionFactoryUtil() {\r\n\t}", "public SingleSessionFactory(Session session) {\n\t\tthis.session = session;\n\t}", "public empresaDAO(){\r\n \r\n }", "public abstract void initialize(ISession session);", "public static void open() {\r\n final Session session = sessionFactory.isClosed() ? sessionFactory.openSession() : sessionFactory.getCurrentSession();\r\n session.beginTransaction();\r\n }", "private HibernateUtil() {\r\n }", "public HProvinceFbDAOImpl() {\r\n super();\r\n }", "DatabaseSession openSession();", "public UserDAO() {\n\t\tthis.emf = Persistence.createEntityManagerFactory(\"feedr_v3\");\n\t\tthis.em = this.emf.createEntityManager();\n\t\tthis.et = this.em.getTransaction();\n\t}", "public IncomeDao(Configuration configuration) {\n super(Income.INCOME, moneytree.persist.db.generated.tables.pojos.Income.class, configuration);\n }", "public AddressDaoImpl()\n {\n \t//Initialise the related Object stores\n \n }", "public ZyCorporationDAOImpl() {\r\n super();\r\n }", "public SessionFactory getSessionFactory()\n {\n return sessionFactory;\n }", "public static Session createSession(SessionFactory factory){\n Session s;\n\n if((s = (Session) _sessionRef.get()) == null) {\n s = factory.openSession();\n _sessionRef.set(s);\n }\n else{\n if(!s.isConnected())s.reconnect();\n }\n\n return s; \n }", "public HibernateTrapdIpMgr() {\n }", "public void setSessionFactory(SessionFactory sessionFactory) {\r\n template = new HibernateTemplate(sessionFactory);\r\n }", "@BeforeClass\n\tpublic static void setUp() throws Exception {\n\t\tSession session = Preparation.getSessionFactory().openSession();\n\t\tcatDAO = new CategoryHibernateDAO();\n\t\tcatDAO.setSession(session);\n\t}", "public ModeOfPurchaseDAOImpl() {\r\n\r\n }", "public static SessionFactory getSessionFactory() {\n \t\n \treturn sessionFactory;\n }", "public static DaoFactory getInstance(){\n\t\tif(daoFactory==null){\n\t\t\tdaoFactory = new DaoFactory();\n\t\t}\n\t\treturn daoFactory;\n\t}", "public interface DAOFactory {\n\n BalanceDAO createBalanceDAO();\n}", "private HibernateUtil() {\n\t}", "public BLFacadeImplementation() {\t\t\r\n\t\tSystem.out.println(\"Creating BLFacadeImplementation instance\");\r\n\t\tConfigXML c=ConfigXML.getInstance();\r\n\t\t\r\n\t\tif (c.getDataBaseOpenMode().equals(\"initialize\")) {\r\n\t\t\tDataAccess dbManager=new DataAccess(c.getDataBaseOpenMode().equals(\"initialize\"));\r\n\t\t\tdbManager.initializeDB();\r\n\t\t\tdbManager.close();\r\n\t\t\t}\r\n\t\t\r\n\t}", "private static SessionFactory buildSessionFactory() {\n\t\ttry {\r\n\t\t\tConfiguration config=new Configuration();\r\n\t\t\tconfig.addClass(Customer.class);\r\n\t\t\treturn config\r\n\t\t\t\t\t.buildSessionFactory(new StandardServiceRegistryBuilder().build());\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new RuntimeException(\"error building sessions\");\r\n\t\t}\r\n\t}", "@SuppressWarnings({ \"deprecation\"})\r\n\tpublic static SessionFactory getSessionFactory() \r\n\t{\r\n //configuration object\r\n Configuration configuration=new Configuration();\r\n //configuring xml file\r\n \tconfiguration.configure(\"hibernate.cfg.xml\");\r\n \t//SessionFactory object\r\n \tsessionFactory=configuration.buildSessionFactory();\r\n //returning sessonFactory+\r\n return sessionFactory;\r\n }", "@Override\n public void initSessionFactories() {\n super.initSessionFactories();\n\n sessionFactories.put(EntityCache.class, new SessionFactory() {\n\n @Override\n public Class<?> getSessionType() {\n return EntityCache.class;\n }\n @Override\n public Session openSession(CommandContext commandContext) {\n return new EntityCacheImpl();\n }\n });\n }", "public SufficientFundsDaoOjb() {\n }", "public StateDAOImpl() {\n super();\n }", "public HLCICPUserDAO() {\n }", "@Autowired\r\n public void setSessionFactory(SessionFactory sessionFactory) {\r\n this.sessionFactory = sessionFactory;\r\n }", "public CoreDao(DaoConfig config) {\n this.txManager = config.getTxManager();\n txTemplate = new TransactionTemplate(txManager);\n setSessionFactory(config.getSessionFactory());\n\n this.daoClass = config.getDaoClass();\n getHibernateTemplate().setCacheQueries(true);\n }", "private void initialisation()\n\t{\n\t\tdaoFactory = new DaoFactory();\n\n\t\ttry\n\t\t{\n\t\t\tequationStandardSessions = EquationCommonContext.getContext().getGlobalProcessingEquationStandardSessions(\n\t\t\t\t\t\t\tsession.getSessionIdentifier());\n\t\t}\n\t\tcatch (Exception eQException)\n\t\t{\n\t\t\tif (LOG.isErrorEnabled())\n\t\t\t{\n\t\t\t\tStringBuilder message = new StringBuilder(\"There is a problem creating Global processing the sessions\");\n\t\t\t\tLOG.error(message.toString(), eQException);\n\t\t\t}\n\t\t}\n\t}", "private HibernateController(){}", "@Generated(hash = 709124051)\npublic void __setDaoSession(DaoSession daoSession) {\n this.daoSession = daoSession;\n myDao = daoSession != null ? daoSession.getOcorrenciaDocumentoDao() : null;\n}", "public static SessionFactory getSessionFactory() {\n\t\treturn sessionFactory;\r\n\t}", "public Session(){\n\t\tdb = ALiteOrmBuilder.getInstance().openWritableDatabase();\n\t\texternalsCallbacks = new ArrayList<EntityListener>();\n\t}", "public VRpDyHlrforbeDAOImpl() {\r\n super();\r\n }", "public static void inicializarBD() {\n\t\ts = new StandardServiceRegistryBuilder().configure().build();\r\n\t\tsf = new MetadataSources(s).buildMetadata().buildSessionFactory();\r\n\t}", "public SchoolCourseStudentDAOImpl() {\r\n\t\tsuper();\r\n\t}", "public static SessionFactory getSessionFactory() {\r\n\t\tConfiguration configuration = new Configuration().configure();\r\n\t\tStandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder()\r\n\t\t\t\t.applySettings(configuration.getProperties());\r\n\t\tSessionFactory sessionFactory = configuration\r\n\t\t\t\t.buildSessionFactory(builder.build());\r\n\t\treturn sessionFactory;\r\n\t}", "public SessionFactory getSessionFactory() {\r\n return sessionFactory;\r\n }", "public static SessionFactory getSessionFactory() {\n\t\treturn sessionFactory;\n\t}", "public static SessionFactory getSessionFactory() {\n\t\tif (sessionFactory == null) {\n\t\t\tcreateSessionFactory();\n\t\t}\n\t\treturn sessionFactory;\n\t}" ]
[ "0.7255217", "0.7126036", "0.68735224", "0.67230886", "0.67046905", "0.6624205", "0.65868026", "0.6518535", "0.64782375", "0.64100856", "0.6395699", "0.6371434", "0.63599515", "0.63424355", "0.63058865", "0.6295747", "0.6277092", "0.62707263", "0.6265568", "0.6252619", "0.62183946", "0.621307", "0.6200246", "0.6188679", "0.617923", "0.61652195", "0.61585534", "0.61565655", "0.6152071", "0.6147101", "0.61411613", "0.6126215", "0.61200595", "0.6109325", "0.6108812", "0.6101724", "0.60969734", "0.6093457", "0.6089805", "0.606827", "0.60588264", "0.60581297", "0.6051382", "0.60057694", "0.60024613", "0.6002093", "0.5987138", "0.595826", "0.59529626", "0.5949978", "0.5949446", "0.59393644", "0.5921275", "0.59167343", "0.5913578", "0.59126294", "0.59068376", "0.5893073", "0.5873432", "0.58696", "0.5865152", "0.58623564", "0.58572084", "0.5850961", "0.5836019", "0.5822486", "0.58204037", "0.58164626", "0.58164054", "0.58150774", "0.58143026", "0.58040714", "0.57986337", "0.57981086", "0.57951236", "0.579435", "0.5789038", "0.57879025", "0.5787651", "0.5785937", "0.577557", "0.5775308", "0.5749413", "0.5737667", "0.5736336", "0.57321376", "0.57225806", "0.57184297", "0.5717452", "0.57141703", "0.56937957", "0.56934357", "0.5686292", "0.56555766", "0.56532496", "0.5651339", "0.56384045", "0.56375444", "0.5635968", "0.5625919" ]
0.8822425
0
Created by Pontus on 20160304.
public interface IPickUpAble { Character getCharacter(); boolean isPickedUp(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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 getExras() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\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 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 func_104112_b() {\n \n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void initialize() {\n\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 public void init() {}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void poetries() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "private Rekenhulp()\n\t{\n\t}", "private void m50366E() {\n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void mo6081a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "private void init() {\n\n\t}", "protected void mo6255a() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public void mo55254a() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public void initialize() { \n }", "@Override\n public int getOrder() {\n return 0;\n }", "Petunia() {\r\n\t\t}", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}" ]
[ "0.61514413", "0.60161734", "0.59820384", "0.59260243", "0.5889962", "0.5887028", "0.58847284", "0.5801708", "0.5796147", "0.5796147", "0.5725833", "0.5723191", "0.5672562", "0.5672375", "0.56651074", "0.56536037", "0.56536037", "0.56536037", "0.56536037", "0.56536037", "0.5646638", "0.5643169", "0.56394297", "0.5632953", "0.5632953", "0.56227434", "0.56182146", "0.56125075", "0.5605972", "0.56013757", "0.5599414", "0.5597019", "0.55879295", "0.55879295", "0.55879295", "0.55879295", "0.55879295", "0.55879295", "0.55879295", "0.55702335", "0.55669874", "0.55669874", "0.55669874", "0.55669874", "0.55669874", "0.55669874", "0.55656534", "0.5560016", "0.5558446", "0.5557653", "0.5546665", "0.55465716", "0.55465716", "0.55465716", "0.55458283", "0.5537193", "0.5536738", "0.5529675", "0.5525537", "0.5520603", "0.55188304", "0.55188304", "0.55188304", "0.55149335", "0.5512691", "0.5511134", "0.5508267", "0.54973406", "0.54973406", "0.54973406", "0.54935473", "0.5474128", "0.5474128", "0.54736614", "0.54704255", "0.5463391", "0.545559", "0.5451292", "0.54461664", "0.5442966", "0.5442597", "0.5437132", "0.5434445", "0.54338795", "0.542758", "0.5420378", "0.5420378", "0.541981", "0.5417746", "0.5415275", "0.54145634", "0.54145634", "0.5414011", "0.5399097", "0.53928846", "0.5391208", "0.5381712", "0.53811514", "0.5368069", "0.53679", "0.53645754" ]
0.0
-1
This is the constructor of the class. It creates the layout of the panel, from number of rows & columns to the background colour.
public ConnectFourPanel(int gameType) { this.gameType = gameType; setLayout(new GridLayout(COL, ROW)); setBackground(Color.WHITE); setPreferredSize(new Dimension(700, 600)); setLayout(new GridLayout(7, 7, 10, 10)); /** * This creates a black row of 6 at top, which indicates to user that * the corresponding column is not filled completely */ for (int a = 0; a < COL; a++) { buttons[a] = new JButton(); buttons[a].setBackground(Color.BLACK); buttons[a].setOpaque(true); buttons[a].addActionListener(new ClickListener()); buttons[a].setBorder(BorderFactory.createLineBorder(Color.RED)); add(buttons[a]); } /** * This creates the board for the game, 6 rows and 7 columns. The * squares are where the chips will be places. */ for (int n = 0; n < ROW; n++) { for (int m = 0; m < COL; m++) { squares[n][m] = new JLabel(); squares[n][m].setBackground(Color.BLUE); squares[n][m].setOpaque(true); squares[n][m].setBorder(BorderFactory.createLineBorder(Color.WHITE)); squares[n][m].setFont(new Font("Arial", Font.BOLD, FONT_SIZE)); squares[n][m].setHorizontalAlignment(SwingConstants.CENTER); squares[n][m].setBorder(BorderFactory.createLineBorder(Color.BLACK)); add(squares[n][m]); } } for (int i = 0; i < COL; i++) { index[i] = ROW; } board(); compAI = new ComputerAI(ROW, COL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setUpLayout() {\n\n this.setLayout(new GridLayout(7, 1, 40, 37));\n this.setBackground(new Color(72, 0, 0));\n this.setBorder(BorderFactory.createEmptyBorder(8, 150, 8, 150));\n }", "public GriddedPanel() {\n this(new Insets(2, 2, 2, 2));\n\n }", "public ColorPanel() {\r\n setLayout(null);\r\n\r\n chooser = new ColorChooserComboBox[8];\r\n chooserLabel = new JLabel[8];\r\n String[][] text = new String[][] {\r\n {\"Hintergrund\", \"Background\"},\r\n {\"Kante I\", \"Edge I\"},\r\n {\"Kante II\", \"Edge II\"},\r\n {\"Gewicht\", \"Weight\"},\r\n {\"Kantenspitze\", \"Edge Arrow\"},\r\n {\"Rand der Knoten\", \"Node Borders\"},\r\n {\"Knoten\", \"Node Background\"},\r\n {\"Knoten Kennzeichnung\", \"Node Tag\"}};\r\n\r\n for (int i = 0; i < 8; i++) {\r\n createChooser(i, text[i], 10 + 30 * i);\r\n }\r\n\r\n add(createResetButton());\r\n add(createApplyButton());\r\n add(createReturnButton());\r\n\r\n setColorSelection();\r\n this.changeLanguageSettings(mainclass.getLanguageSettings());\r\n }", "public MyPanel(Color farba) {\r\n this.setBackground(farba);\r\n this.setPreferredSize(new Dimension(40, 200));\r\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}", "public BubblePanel()\n\t{\n\t\t// Set the layout to be border-style\n\t\tsuper( new BorderLayout());\n\t\t// Create panel defaults\n\t\tinitPanel();\n\t}", "private JPanel initializePanel() {\n JPanel myPanel = new JPanel();\n //myPanel.setPreferredSize(new Dimension(600,600));\n\n myPanel.setLayout(new GridLayout(8,8));\n myPanel.setSize(600,600);\n myPanel.setLocation(100,100);\n myPanel.setBorder(new LineBorder(Color.BLACK));\n return myPanel;\n }", "public BoardGUI()\n {\n setBackground(Color.GRAY);\n setLayout(null);\n }", "public void setupPanel() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new ModifiedFlowLayout(FlowLayout.LEFT));\n\t\tpanel.setBackground(Color.BLACK);\n\t\tpanel.setOpaque(true);\n\t}", "public FinalFrame()\n {\n \tsuper (\"Multi Brush\"); \n \tdrawingPanel = new DrawingPanel (buttons,colors); // A new DrawingPanel object with two parameters.\n \tJMenuBar menuBar = createMenuBar ();\n \tsetJMenuBar (menuBar); \n // Panel layout arrangement code segments.\n \tpanel.setLayout (new BorderLayout ());\n \tpanel.add (drawingPanel,BorderLayout.CENTER);\n \tpanel.add (buttons,BorderLayout.NORTH);\n \tpanel.add (colors,BorderLayout.SOUTH); \n \tgetContentPane().add(panel);\n \taddWindowListener (new WindowCloser());\n }", "public AbstractREPLPanel() {\r\n\t\tsuper(new BorderLayout());\r\n\r\n\t\tloadArea();\r\n\t\tstyles = StyleSettings.getInstance(area);\r\n\t}", "public Canvas(){\r\n\t\tsuper(new FlowLayout());\r\n\t\tthis.setPreferredSize(new Dimension(400, 400));\r\n\t\tthis.setBackground(Color.WHITE);\r\n\t}", "public Panel()\n/* */ {\n/* 56 */ this(new FlowLayout());\n/* */ }", "public BuildingConfigPanel() {\n\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setOpaque(true);\n\t\tDimension size = new Dimension(1200, 700);\n\t\tthis.setMaximumSize(size);\n\t\tthis.setPreferredSize(size);\n\t\tthis.setMinimumSize(size);\n\t\tthis.setAlignmentX(LEFT_ALIGNMENT);\n\t\tthis.setBorder(BorderFactory.createLineBorder(Color.blue));\n\t\tthis.setBackground(Color.WHITE);\n\t\tthis.setLayout(null);\n\n\t\tfont = new Font(\"Serif\", Font.BOLD, 18);\n\t\tfont1 = new Font(\"Serif\", Font.PLAIN, 15);\n\n\t\t// method to create sensors checkboxes, date and time fields\n\t\tcreateSensors();\n\t\t// method to connect to database\n\t\tcreateJDBCConnection();\n\t\t// method to highlight the area of selection\n\t\tareaTracker();\n\n\t}", "public MazePanel(int width, int height) {\r\n\r\n\t\t\tsetLayout(null);\r\n\r\n\t\t\tMouseHandler listener = new MouseHandler();\r\n\t\t\taddMouseListener(listener);\r\n\t\t\taddMouseMotionListener(listener);\r\n\r\n\t\t\tsetBorder(BorderFactory.createMatteBorder(2, 2, 2, 2, Color.blue));\r\n\r\n\t\t\tsetPreferredSize(new Dimension(width, height));\r\n\r\n\t\t\tgrid = new int[rows][columns];\r\n\r\n\t\t\t// Criando o conteudo do panel\r\n\r\n\t\t\tmessage = new JLabel(msgDrawAndSelect, JLabel.CENTER);\r\n\t\t\tmessage.setForeground(Color.blue);\r\n\t\t\tmessage.setFont(new Font(\"Helvetica\", Font.PLAIN, 16));\r\n\r\n\t\t\tJLabel rowsLbl = new JLabel(\"Nº Linhas (5-50):\", JLabel.RIGHT);\r\n\t\t\trowsLbl.setFont(new Font(\"Helvetica\", Font.PLAIN, 13));\r\n\r\n\t\t\trowsField = new JTextField();\r\n\t\t\trowsField.setText(Integer.toString(rows));\r\n\r\n\t\t\tJLabel columnsLbl = new JLabel(\"Nº Colunas (5-50):\", JLabel.RIGHT);\r\n\t\t\tcolumnsLbl.setFont(new Font(\"Helvetica\", Font.PLAIN, 13));\r\n\r\n\t\t\tcolumnsField = new JTextField();\r\n\t\t\tcolumnsField.setText(Integer.toString(columns));\r\n\r\n\t\t\tJButton resetButton = new JButton(\"Novo GRID\");\r\n\t\t\tresetButton.addActionListener(new ActionHandler());\r\n\t\t\tresetButton.setBackground(Color.lightGray);\r\n\t\t\tresetButton\r\n\t\t\t\t\t.setToolTipText(\"Limpa e redesenha o GRID de acordo com o número de linhas e colunas estipulado.\");\r\n\t\t\tresetButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\tresetButtonActionPerformed(evt);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tJButton mazeButton = new JButton(\"Gerar Labirinto\");\r\n\t\t\tmazeButton.addActionListener(new ActionHandler());\r\n\t\t\tmazeButton.setBackground(Color.lightGray);\r\n\t\t\tmazeButton.setToolTipText(\"Cria um labirinto aleatório\");\r\n\t\t\tmazeButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\tmazeButtonActionPerformed(evt);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tJButton clearButton = new JButton(\"Limpar\");\r\n\t\t\tclearButton.addActionListener(new ActionHandler());\r\n\t\t\tclearButton.setBackground(Color.lightGray);\r\n\t\t\tclearButton.setToolTipText(\"Primeiro click: Limpa as buscas, Segundo click: Limpa obstáculos\");\r\n\r\n\t\t\tJButton stepButton = new JButton(\"Passo-a-Passo\");\r\n\t\t\tstepButton.addActionListener(new ActionHandler());\r\n\t\t\tstepButton.setBackground(Color.lightGray);\r\n\t\t\tstepButton.setToolTipText(\"A busca é realizada passo-a-passo pelo click\");\r\n\r\n\t\t\tJButton animationButton = new JButton(\"INICIAR\");\r\n\t\t\tanimationButton.addActionListener(new ActionHandler());\r\n\t\t\tanimationButton.setBackground(Color.lightGray);\r\n\t\t\tanimationButton.setToolTipText(\"A pesquisa é realizada automaticamente\");\r\n\r\n\t\t\tJLabel velocity = new JLabel(\"Velocidade\", JLabel.CENTER);\r\n\t\t\tvelocity.setFont(new Font(\"Helvetica\", Font.PLAIN, 10));\r\n\r\n\t\t\tslider = new JSlider(0, 1000, 500); // valor inicial do slider em 500 msec\r\n\t\t\tslider.setToolTipText(\"Regula o atraso para cada etapa (0 to 1 sec)\");\r\n\r\n\t\t\tdelay = 1000 - slider.getValue();\r\n\t\t\tslider.addChangeListener(new ChangeListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void stateChanged(ChangeEvent evt) {\r\n\t\t\t\t\tJSlider source = (JSlider) evt.getSource();\r\n\t\t\t\t\tif (!source.getValueIsAdjusting()) {\r\n\t\t\t\t\t\tdelay = 1000 - source.getValue();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// ButtonGroup que sincroniza os cinco botões de rádio \r\n\t\t\t// escolha do algoritmo, de modo que apenas uma \r\n\t\t\t// pode ser selecionada a qualquer momento\r\n\t\t\t\r\n\t\t\tButtonGroup algoGroup = new ButtonGroup();\r\n\r\n\t\t\tdfs = new JRadioButton(\"DFS\");\r\n\t\t\tdfs.setToolTipText(\"Depth First Search algorithm\");\r\n\t\t\talgoGroup.add(dfs);\r\n\t\t\tdfs.addActionListener(new ActionHandler());\r\n\r\n\t\t\tbfs = new JRadioButton(\"BFS\");\r\n\t\t\tbfs.setToolTipText(\"Breadth First Search algorithm\");\r\n\t\t\talgoGroup.add(bfs);\r\n\t\t\tbfs.addActionListener(new ActionHandler());\r\n\r\n\t\t\taStar = new JRadioButton(\"A*\");\r\n\t\t\taStar.setToolTipText(\"Algoritmo A Estrela \");\r\n\t\t\taStar.setSelected(true);\r\n\t\t\talgoGroup.add(aStar);\r\n\t\t\taStar.addActionListener(new ActionHandler());\r\n\r\n\t\t\tguloso = new JRadioButton(\"Guloso\");\r\n\t\t\tguloso.setToolTipText(\"Algoritmo de Busca Gulosa\");\r\n\t\t\talgoGroup.add(guloso);\r\n\t\t\tguloso.addActionListener(new ActionHandler());\r\n\r\n\t\t\tdijkstra = new JRadioButton(\"Dijkstra\");\r\n\t\t\tdijkstra.setToolTipText(\"Dijkstra's algorithm\");\r\n\t\t\talgoGroup.add(dijkstra);\r\n\t\t\tdijkstra.addActionListener(new ActionHandler());\r\n\r\n\t\t\tJPanel algoPanel = new JPanel();\r\n\t\t\talgoPanel.setBorder(\r\n\t\t\t\t\tjavax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(),\r\n\t\t\t\t\t\t\t\"Algoritmos\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,\r\n\t\t\t\t\t\t\tjavax.swing.border.TitledBorder.TOP, new java.awt.Font(\"Helvetica\", 0, 14)));\r\n\r\n\t\t\taStar.setSelected(true); // A* selecionado como inicial\r\n\r\n\t\t\tdiagonal = new JCheckBox(\"Movimentos Diagonais\");\r\n\t\t\tdiagonal.setToolTipText(\"Movimentos diagonais também estão autorizados\");\r\n\t\t\tdiagonal.setSelected(true);\r\n\r\n\t\t\tdrawArrows = new JCheckBox(\"Setas para antecessores\");\r\n\t\t\tdrawArrows.setToolTipText(\"Desenha setas para os antecessores\");\r\n\r\n\t\t\tJLabel robot = new JLabel(\"INICIO\", JLabel.LEFT);\r\n\t\t\trobot.setForeground(Color.red);\r\n\t\t\trobot.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\r\n\r\n\t\t\tJLabel target = new JLabel(\"ALVO\", JLabel.LEFT);\r\n\t\t\ttarget.setForeground(Color.green);\r\n\t\t\ttarget.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\r\n\r\n\t\t\tJLabel frontier = new JLabel(\"FRONTEIRA\", JLabel.LEFT);\r\n\t\t\tfrontier.setForeground(Color.blue);\r\n\t\t\tfrontier.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\r\n\r\n\t\t\tJLabel closed = new JLabel(\"FECHADOS\", JLabel.LEFT);\r\n\t\t\tclosed.setForeground(Color.cyan);\r\n\t\t\tclosed.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\r\n\r\n\t\t\tJButton aboutButton = new JButton(\"Sobre\");\r\n\t\t\taboutButton.addActionListener(new ActionHandler());\r\n\t\t\taboutButton.setBackground(Color.lightGray);\r\n\t\t\taboutButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\taboutButtonActionPerformed(evt);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t//Adicionando conteudo ao Panel\r\n\t\t\tadd(message);\r\n\t\t\tadd(rowsLbl);\r\n\t\t\tadd(rowsField);\r\n\t\t\tadd(columnsLbl);\r\n\t\t\tadd(columnsField);\r\n\t\t\tadd(resetButton);\r\n\t\t\tadd(mazeButton);\r\n\t\t\tadd(clearButton);\r\n\t\t\tadd(stepButton);\r\n\t\t\tadd(animationButton);\r\n\t\t\tadd(velocity);\r\n\t\t\tadd(slider);\r\n\t\t\tadd(dfs);\r\n\t\t\tadd(bfs);\r\n\t\t\tadd(aStar);\r\n\t\t\tadd(guloso);\r\n\t\t\tadd(dijkstra);\r\n\t\t\tadd(algoPanel);\r\n\t\t\tadd(diagonal);\r\n\t\t\t// add(drawArrows);\r\n\t\t\tadd(robot);\r\n\t\t\tadd(target);\r\n\t\t\tadd(frontier);\r\n\t\t\tadd(closed);\r\n\t\t\tadd(aboutButton);\r\n\r\n\t\t\t// Regulando posição dos componentes\r\n\t\t\tmessage.setBounds(0, 515, 500, 23);\r\n\t\t\trowsLbl.setBounds(520, 5, 140, 25);\r\n\t\t\trowsField.setBounds(665, 5, 25, 25);\r\n\t\t\tcolumnsLbl.setBounds(520, 35, 140, 25);\r\n\t\t\tcolumnsField.setBounds(665, 35, 25, 25);\r\n\t\t\tresetButton.setBounds(520, 65, 170, 25);\r\n\t\t\tmazeButton.setBounds(520, 95, 170, 25);\r\n\t\t\tclearButton.setBounds(520, 125, 170, 25);\r\n\t\t\tstepButton.setBounds(520, 155, 170, 25);\r\n\t\t\tanimationButton.setBounds(520, 185, 170, 25);\r\n\t\t\tvelocity.setBounds(520, 215, 170, 10);\r\n\t\t\tslider.setBounds(520, 225, 170, 25);\r\n\t\t\t// dfs.setBounds(530, 270, 70, 25);\r\n\t\t\t// bfs.setBounds(600, 270, 70, 25);\r\n\t\t\taStar.setBounds(530, 295, 70, 25);\r\n\t\t\tguloso.setBounds(600, 295, 85, 25);\r\n\t\t\t// dijkstra.setBounds(530, 320, 85, 25);\r\n\t\t\talgoPanel.setLocation(520, 250);\r\n\t\t\talgoPanel.setSize(170, 100);\r\n\t\t\tdiagonal.setBounds(520, 355, 170, 25);\r\n\t\t\t// drawArrows.setBounds(520, 380, 170, 25);\r\n\t\t\trobot.setBounds(530, 380, 80, 25);\r\n\t\t\ttarget.setBounds(530, 400, 80, 25);\r\n\t\t\tfrontier.setBounds(530, 420, 80, 25);\r\n\t\t\tclosed.setBounds(530, 440, 80, 25);\r\n\t\t\taboutButton.setBounds(520, 515, 170, 25);\r\n\r\n\t\t\t// Criando timer\r\n\t\t\ttimer = new Timer(delay, action);\r\n\r\n\t\t\t// Nós ligamos às células nos valores iniciais de grade.\r\n\t\t\t// Aqui é os primeiros passos dos algoritmos\r\n\t\t\tfillGrid();\r\n\r\n\t\t}", "public BoardPanel() {\n\t\t\tfinal Dimension size = new Dimension(600, 600);\n\t\t\tsetSize(size);\n\t\t\tsetPreferredSize(size);\n\t\t\t\n\t\t\taddMouseListener(new ClickHandler());\n\t\t}", "public void crearPanel(){\n\n panel = new JPanel();\n this.getContentPane().add(panel);\n panel.setBackground(Color.CYAN);\n panel.setLayout(null);\n }", "private void initPanel() {\n\t\tthis.panel = new JPanel();\n\t\tthis.panel.setBounds(5, 5, 130, 20);\n\t\tthis.panel.setLayout(null); \n\n\t}", "private void initializePanels() {\n queueInfoPanel.setBackground(new Color(236, 125, 51));\n queueButtonsPanel.setBackground(new Color(93, 118, 161));\n createLabelForPanel(queueInfoPanel);\n createButtonsForPanel(queueButtonsPanel);\n }", "private void initialize() {\n // Create a panel with the labels for the colorbar.\n JPanel labelPanel = new JPanel();\n labelPanel.setLayout(new BoxLayout(labelPanel, BoxLayout.LINE_AXIS));\n labelPanel.add(minLabel);\n labelPanel.add(Box.createHorizontalGlue());\n labelPanel.add(medLabel);\n labelPanel.add(Box.createHorizontalGlue());\n labelPanel.add(maxLabel);\n\n // Add the color panel\n gradientPanel = new LinearGradientTools.ColorGradientPanel();\n\n // Add the panel indicating the error value color.\n errorPanel = new JPanel();\n //errorPanel.setBackground(heatMapModel.getColorScheme().getErrorReadoutColor());\n\n // Create a label for the panel indicating the missing value color.\n errorLabel = new JLabel(\" Err \");\n errorLabel.setHorizontalAlignment(JLabel.CENTER);\n\n // Add the panel indicating the missing value color.\n JPanel emptyPanel = new JPanel();\n emptyPanel.setBackground(ColorScheme.EMPTY_READOUT);\n\n // Create a label for the panel indicating the missing value color.\n emptyLabel = new JLabel(\" Empty \");\n emptyLabel.setHorizontalAlignment(JLabel.CENTER);\n\n // Set the font of the labels\n setLabelFont(labelFontSize);\n\n // Add the component to the main panel\n setLayout(new GridBagLayout());\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.gridx = 0;\n constraints.gridy = 0;\n constraints.weightx = 1;\n constraints.weighty = 0.9;\n constraints.fill = GridBagConstraints.BOTH;\n add(gradientPanel, constraints);\n constraints.gridy = 1;\n constraints.weighty = 0.1;\n add(labelPanel, constraints);\n\n constraints.gridx = 1;\n constraints.weightx = -1;\n add(errorLabel, constraints);\n constraints.gridy = 0;\n constraints.weighty = 0.9;\n add(errorPanel, constraints);\n\n constraints.gridx = 2;\n add(emptyPanel, constraints);\n constraints.gridy = 1;\n constraints.weighty = 0.1;\n add(emptyLabel, constraints);\n }", "public GridPane() {\n\t\t for (int i=0;i<MAX_X; i++) {\n\t\t\tfor (int j=0;j<MAX_Y;j++) {\n\t\t\t\tseed[i][j] = new Cell(i,j,false);\n\t\t\t}//end for j\n\t\t }//end for i\n\t\n\t \tdefaultBackground = getBackground();\n\t\n\t MatteBorder border = new MatteBorder(1, 1, 1, 1, Color.BLACK);\n\t \tthis.setBorder(border);\n\t \t\t\n\t\t addMouseListener(new MouseAdapter() {\n\t @Override\n\t public void mouseClicked(MouseEvent e) {\n\t \t int x1 = (int)(e.getX()/CELL_WIDTH);\n\t \t int y1 = (int)(e.getY()/CELL_WIDTH);\n\t \t if(seed[x1][y1].isAlive()) {\n\t \t\t seed[x1][y1].isAlive = false;\n\t \t }\n\t \t else {\n\t \t\t seed[x1][y1].isAlive = true;\n\t \t }\n//\t \t System.out.println(\"[\"+x1+\",\"+y1+\"]\");\n\t repaint();\n\t }\n\t });\n\t }", "public Grid() {\n setPreferredSize(new Dimension(960, 640));\n setBounds(0, 0, 960, 640);\n setLayout(null);\n setBackground(Color.black);\n this.size = 30;\n squares = new Square[size][20];\n }", "public Test1UI() {\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setLayout(new BorderLayout());\n\t\tsetDefaultValues();\n\t\taddActionListeners();\n\n\t\tthis.add(pnlWest, BorderLayout.WEST);\n\t\tthis.add(pnlEast, BorderLayout.EAST);\n\t\tthis.add(pnlCenter, BorderLayout.CENTER);\n\t\tthis.add(pnlSouth, BorderLayout.SOUTH);\n\n\t\tfor (int row = 0; row < 7; row++) {\n\t\t\tpnlWest.add(tfWest[row]);\n\t\t\tpnlSouth.add(tfSouth[row]);\n\t\t\tfor (int col = 0; col < 7; col++) {\n\t\t\t\tpnlCenter.add(lblCenter[row][col]);\n\t\t\t}\n\t\t}\n\t\tpnlEast.add(pnlEastTop, BorderLayout.NORTH);\n\t\tpnlEast.add(pnlEastBottom, BorderLayout.SOUTH);\n\n\t\tpnlEastTop.add(pnlEastTopText);\n\t\tpnlEastTop.add(btnReadRow);\n\t\tpnlEastTop.add(btnPrintRow);\n\t\tpnlEastTopText.add(lblRow);\n\t\tpnlEastTopText.add(tfRow);\n\n\t\tpnlEastBottom.add(pnlEastBottomText);\n\t\tpnlEastBottom.add(btnReadCol);\n\t\tpnlEastBottom.add(btnPrintCol);\n\t\tpnlEastBottomText.add(lblCol);\n\t\tpnlEastBottomText.add(tfCol);\n\n\t\tpack();\n\t\tsetVisible(true);\n\t}", "Board createLayout();", "public MakeTable() {\n\t\t//for setting the title for the internal frame\n\t\tsuper(PanelName, true, true, true, true);\n\t\t//for setting the icon\n\t\tsetFrameIcon(new ImageIcon(ClassLoader.getSystemResource(\"images/Add16.gif\")));\n\t\t//for getting the graphical user interface components display area\n\t\tContainer cp = getContentPane();\n\n\t\t//for setting the layout\n\t\tnorthPanel.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\t//for setting the font\n\t\tnorthLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\t//for adding the label to the panel\n\t\tnorthPanel.add(northLabel);\n\t\t//for adding the panel to the container\n\t\tcp.add(\"North\", northPanel);\n\n\t\t//for setting the layout\n\t\tcenterPanel.setLayout(new BorderLayout());\n\t\t//for setting the border to the panel\n\t\tcenterPanel.setBorder(BorderFactory.createTitledBorder(\"Wrong Data :\"));\n\t\t//for setting the layout\n\t\tinformationLabelPanel.setLayout(new GridLayout(1, 2, 1, 1));\n\t\t//for setting the layout\n\t\tinformationTextFieldPanel.setLayout(new GridLayout(1, 2, 1, 1));\n\t\t/***********************************************************************\n\t\t * for adding the strings to the labels, for setting the font\t\t *\n\t\t * and adding these labels to the panel.\t\t\t\t\t\t\t *\n\t\t * finally adding the panel to the container\t\t\t\t\t\t *\n\t\t ***********************************************************************/\n//\t\tfor (int i = 0; i < informationLabel.length; i++) {\n//\t\t\tinformationLabelPanel.add(informationLabel[i] = new JLabel(informaionString[i]));\n//\t\t\tinformationLabel[i].setFont(new Font(\"Tahoma\", Font.BOLD, 11));\n//\t\t}\n \n//informationLabelPanel.add(informationLabel[0] = new JLabel(informaionString[0]));\n//for adding the panel to the centerPanel\n//\t\tcenterPanel.add(\"West\", informationLabelPanel);\n\n\t\t/***********************************************************************\n\t\t * for adding the JTextField and JPasswordField to the panel and *\n\t\t * setting the font to the JTextField and JPasswordField. Finally *\n\t\t * adding the panel to the centerPanel *\n\t\t ***********************************************************************/\n//\t\tfor (int i = 0; i < informationLabel.length; i++) {\n//\n//\t\t\t\n//\t\t\t\tinformationTextFieldPanel.add(informationTextField[i] = new JTextField(25));\n//\t\t\t\tinformationTextField[i].setFont(new Font(\"Tahoma\", Font.PLAIN, 11));\n//\t\t\t\n//\t\t}\n\n JScrollPane scrollPane = new JScrollPane(textArea);\n informationTextFieldPanel.add(scrollPane); \n\t\tcenterPanel.add(\"Center\", informationTextFieldPanel);\n \n\t\t/***********************************************************************\n\t\t * for setting the layout for the panel,setting the font for the button*\n\t\t * and adding the button to the panel.\t\t\t\t\t\t\t\t *\n\t\t * finally adding the panel to the container\t\t\t\t\t\t *\n\t\t ***********************************************************************/\n\t\tinsertInformationButtonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\tinsertInformationButton.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\n\t\tinsertInformationButtonPanel.add(insertInformationButton);\n insertInformationButtonPanel.add(SearchButton);\n insertInformationButtonPanel.add(searchField);\n insertInformationButtonPanel.add(SaveButton);\n\t\tcenterPanel.add(\"South\", insertInformationButtonPanel);\n\t\tcp.add(\"Center\", centerPanel);\n\n\t\t/***********************************************************************\n\t\t * for setting the layout for the panel,setting the font for the button*\n\t\t * adding the button to the panel & setting the border.\t\t\t\t *\n\t\t * finally adding the panel to the container\t\t\t\t\t\t *\n\t\t ***********************************************************************/\n\t\tsouthPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\tOKButton.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\n\t\tsouthPanel.add(OKButton);\n\t\tsouthPanel.setBorder(BorderFactory.createEtchedBorder());\n\t\tcp.add(\"South\", southPanel);\n\n\t\t/***********************************************************************\n\t\t * for adding the action listener to the button,first the text will be *\n\t\t * taken from the JTextField[] and make the connection for database, *\n\t\t * after that update the table in the database with the new value *\n\t\t ***********************************************************************/\n\t\tinsertInformationButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\t//for checking if there is a missing information\n\t\t\t\t\tThread runner = new Thread() {\n //private OpenFile opf;\n private OutputToFile otf;\n\n\t\t\t\t\t\t\tpublic void run() {\n \n otf = new OutputToFile();\n if(!otf.takeFilePath().trim().contentEquals(\"\")){\n System.out.println(\" Show File Path : \"+otf.takeFilePath()+\" >>>>\");\n centerPanel.setBorder(BorderFactory.createTitledBorder(\"Wrong Data :\"+otf.takeFilePath()));\n textArea.setText(\"\");\n datainFile=new File(otf.takeFilePath());\n \n\n try {\n fis = new FileInputStream(datainFile);\n reader = new BufferedReader(new InputStreamReader(fis));\n //StringBuilder out = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n //out.append(line);\n \n //textArea.setText(line+System.getProperty( \"line.separator\"));\n textArea.append(line+System.getProperty( \"line.separator\"));\n \n }\n //System.out.println(out.toString()); //Prints the string content read from input stream\n reader.close();\n \n \n\n \n \n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(MakeTable.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(MakeTable.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n \n }else \n {\n JOptionPane.showMessageDialog(null, \"Əvvəlcədən [XML] uzantılı fayıl emal edilməlidir\", \"Xəbərdarlıq\", JOptionPane.WARNING_MESSAGE);\n }\nSystem.out.println(\" Button clicked\");\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\trunner.start();\n\t\t\t\t\t\n\t\t\t\t\t//JOptionPane.showMessageDialog(null, \"Please, complete the information\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n\t\t\t}\n\t\t});\n\t\t//for adding the action listener for the button to dispose the frame\n \n \n SearchButton.addActionListener(new ActionListener() {\n \n public void actionPerformed(ActionEvent ae) {\n \n \t\t\t\tThread runner;\n runner = new Thread() { \n \n public void run() {\n \n \n \n hili= textArea.getHighlighter();\n Highlighter.Highlight[] hilis = hili.getHighlights();\n for(int i=0 ; i<hilis.length; i++)\n {\n if (hilis[i].getPainter() instanceof Highlighter.HighlightPainter)\n {\n hili.removeHighlight(hilis[i]);\n }\n }\n \n \n System.out.println(\" Searchable text \"+searchField.getText());\n \n \nHighlighter.HighlightPainter painter = new DefaultHighlighter.DefaultHighlightPainter( Color.cyan );\n\noffset= textArea.getText().indexOf(searchField.getText());\nlength = searchField.getText().length();\n\nwhile ( offset != -1)\n{\n try\n {\n System.out.println(\" Offest1 : \"+offset+\" Length :\"+length);\n \n textArea.getHighlighter().addHighlight(offset, offset + length, painter);\n //offset = textArea.getText().indexOf(searchField.getText(), offset+1);\n \n \n \n Rectangle viewRect = textArea.modelToView(offset);\n // Scroll to make the rectangle visible\n textArea.scrollRectToVisible(viewRect);\nSystem.out.println(\" Offest2 : \"+offset); offset=-1;\nbreak;\n\n//if(offset==-1)\n//{ break;}\n \n \n }\n catch(BadLocationException ble) { System.out.println(ble); }\n}\n\n\n\n }\n };\n\t\t\t\t\t\trunner.start();\n\t\t\t\t\t\n \n\t\t\t}\n \n });\n \n \n \n \n \n \n\t\tSaveButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tSystem.out.println(\" Save \");\n \n System.out.println(\" Out put File Again\"+textArea.getText()+\" Line Count \"+textArea.getLineCount());\n OutputToFile otf = new OutputToFile();\n \n try {\n// textArea.getLineStartOffset(r);\n// System.out.println(\n// \" Line Out : Start :\"+textArea.getLineStartOffset(r)+\n// \" .... End :\"+textArea.getLineEndOffset(r)+\n// \" data \"+textArea.getText().substring(textArea.getLineStartOffset(r), textArea.getLineEndOffset(r)));\n FileOutputStream outputStream = new FileOutputStream(otf.takeFilePath(),false);\n OutputStreamWriter writer = new OutputStreamWriter(outputStream);\nfor (int r=0;r<textArea.getLineCount();r++){\nwriter.write(textArea.getText().substring(textArea.getLineStartOffset(r), textArea.getLineEndOffset(r)));\n}\nwriter.flush();\n \nwriter.close();\n \n } catch (BadLocationException ex) {\n Logger.getLogger(MakeTable.class.getName()).log(Level.SEVERE, null, ex);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MakeTable.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(MakeTable.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n \n \n\t\t\t}\n\t\t});\n \n \n OKButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tdispose();\n\t\t\t}\n\t\t}); \n\t\t//for setting the visible to true\n\t\tsetVisible(true);\n\t\t//show the internal frame\n\t\tpack();\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 }", "@Override\n protected Layout constructShellLayout() {\n GridLayout mainLayout = new GridLayout(1, false);\n\n return mainLayout;\n }", "public PreviewPanel() {\r\n\t\t\tsuper(new FlowLayout(FlowLayout.LEFT, 0, 0));\r\n\t\t\t\r\n\t\t\tJPanel p = new JPanel(new GridBagLayout());\t\t\t\r\n\t\t\tthis.add(p);\r\n\t\t\tp.setBorder(new EmptyBorder(10, 0, 0, 0));\r\n\t\t\tcolPanel.setPreferredSize(new Dimension(50, 10));\r\n\t\t\tcolPanel.setBorder(new EtchedBorder());\r\n\t\t\thexLabel.setBorder(new EmptyBorder(8, 0, 0, 0));\r\n\r\n\t\t\tGridBagConstraints gc = new GridBagConstraints();\r\n\t\t\tgc.insets = new Insets(0, 0, 0, 10);\r\n\t\t\tgc.fill = GridBagConstraints.BOTH;\r\n\t\t\tgc.anchor = GridBagConstraints.WEST;\r\n\t\t\tgc.gridx = 0;\r\n\t\t\tgc.gridy = 0;\r\n\r\n\t\t\tgc.gridheight = 2;\r\n\t\t\tp.add(colPanel, gc);\r\n\t\t\tgc.gridx++;\r\n\t\t\tgc.gridheight = 1;\r\n\t\t\tp.add(decLabel, gc);\r\n\t\t\tgc.gridx = 1;\r\n\t\t\tgc.gridy++;\r\n\t\t\tp.add(hexLabel, gc);\r\n\t\t\tgc.gridx++;\r\n\t\t}", "public JPanel createPanel() {\n\t\t\r\n\t\tJPanel mainPanel = new JPanel();\r\n\t\tmainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\r\n\t\tmainPanel.setBackground(Color.WHITE);\r\n\t\tmainPanel.setBorder(new CompoundBorder(\r\n\t\t\t\tBorderFactory.createLineBorder(new Color(0x3B70A3), 4),\r\n\t\t\t\tnew EmptyBorder(10, 20, 10, 20)));\r\n\r\n\t\t/*\r\n\t\t * Instruction\r\n\t\t */\t\r\n\t\tmainPanel.add(instructionPanel());\r\n\t\t\r\n\t\t\r\n\t\t// TODO: set task order for each group - make first 3 tasks = groups tasks\r\n\t\tmainPanel.add(messagesPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(phonePanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(clockPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(cameraPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\t\r\n\r\n\t\tmainPanel.add(contactPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(galleryPanel());\r\n\t\t\r\n\t\treturn mainPanel;\r\n\t}", "public PanelJuego() {\r\n\t\tsetLayout(new GridLayout(3, 3, 20, 20));// Se crea una matriz 3x3 con un\r\n\t\t\t\t\t\t\t\t\t\t\t\t// espaciado tanto horizontal\r\n\t\t\t\t\t\t\t\t\t\t\t\t// como vertical.\r\n\t\tposicion = new JTextField[9];\r\n\t\tllenarPanel();\r\n\t\tsetBackground(Color.BLACK);// Se pinta el fondo de negro.\r\n\t\tsetVisible(true);\r\n\t}", "public GraphPanel()\n\t{\n\t\t// instantiates graphArray to hold list of names to graph \n\t\tgraphArray = new ArrayList<NameRecord>();\n\t\t\n\t\t// sets the size of the panel\n\t\tsetPreferredSize(new Dimension(600,600));\n\t}", "public SnowmanPanel()\n {\n setPreferredSize(new Dimension(300,225));\n setBackground(Color.cyan);\n }", "public Home() {\n initComponents();\n panel_overlay.setBackground(new Color(0,0,0,200));\n \n \n \n }", "public FlowPanel(){\r\n setLayout(new FlowLayout());\r\n setBackground(Color.green);\r\n JButton b1 = new JButton(\"Button 1\");\r\n JButton b2 = new JButton(\"Button 2\");\r\n JButton b3 = new JButton(\"Button 3\");\r\n JButton b4 = new JButton(\"Button 4\");\r\n JButton b5 = new JButton(\"Button 5\");\r\n add(b1);\r\n add(b2);\r\n add(b3);\r\n add(b4);\r\n add(b5);\r\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 ShapePanel() {\n super();\n shapes = new ArrayList<>();\n this.setPreferredSize(new Dimension(1000, 1000));\n }", "public void create() {\n\t\t// setup Chess board\n\t\tthis.removeAll();\n\t\tthis.layout = new GridLayout(this.startupBoardSize, this.startupBoardSize);\n\t\tthis.squares = new SquarePanel[this.startupBoardSize][this.startupBoardSize];\n\t\t\n\t\tsetLayout(layout);\n\t\tsetPreferredSize(new Dimension(600, 600));\n\t\tsetBorder(new LineBorder(new Color(0, 0, 0)));\n\n\t\t//paint the chess board\n\n\t\tfor (int i = 0; i < this.startupBoardSize; i++) \n\t\t{\n\t\t\tfor (int j = 0; j < this.startupBoardSize; j++) \n\t\t\t{\n\t\t\t\tsquares[i][j] = new SquarePanel(j, i);\n\t\t\t\tsquares[i][j].setPreferredSize(new Dimension(600 / this.startupBoardSize - 5, 600 / this.startupBoardSize - 5));\n\n\n\t\t\t\tsquares[i][j].setBackground(Color.WHITE);\n\t\t\t\t\n\t\t\t\tif (((i + j) % 2) == 0) \n\t\t\t\t{\n\t\t\t\t\tsquares[i][j].setBackground(Color.DARK_GRAY);\n\t\t\t\t}\n\t\t\t\tadd(squares[i][j]);\n\t\t\t}\n\t\t}\n\t}", "public BorderPanel(){\r\n setLayout(new BorderLayout());\r\n setBackground(Color.green);\r\n JButton b1 = new JButton(\"Button 1\");\r\n JButton b2 = new JButton(\"Button 2\");\r\n JButton b3 = new JButton(\"Button 3\");\r\n JButton b4 = new JButton(\"Button 4\");\r\n JButton b5 = new JButton(\"Button 5\");\r\n add(b1, BorderLayout.CENTER);\r\n add(b2, BorderLayout.NORTH);\r\n add(b3, BorderLayout.SOUTH);\r\n add(b4, BorderLayout.EAST);\r\n add(b5, BorderLayout.WEST);\r\n }", "public Panel() {\n initComponents();\n\n\n }", "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}", "public Panel(LayoutManager paramLayoutManager)\n/* */ {\n/* 65 */ setLayout(paramLayoutManager);\n/* */ }", "public void initPanel(){\r\n\t \r\n\t\t//Titre\r\n\t\tlabel.setFont(new Font(\"Verdana\",1,40));\r\n\t label.setForeground(Color.black);\r\n\t label.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label.setBounds(110,0,575,50);\r\n\t\tthis.panel.setLayout(null);\t \r\n\t this.panel.add(label);\r\n\t \r\n\t //dc\r\n\t this.panel.add(label1, BorderLayout.CENTER);\r\n\t label1.setFont(new Font(\"Verdana\",1,40));\r\n\t label1.setForeground(Color.black);\r\n\t label1.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label1.setBounds(150,500,100,50);\r\n\t //ab\r\n\t this.panel.add(label2);\r\n\t label2.setFont(new Font(\"Verdana\",1,40));\r\n\t label2.setForeground(Color.black);\r\n\t label2.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label2.setBounds(550,500,100,50);\r\n\t //Button dc\r\n\t\tdc.setBounds(50,200,300,250);\r\n\t\tthis.panel.add(dc);\r\n\t\tdc.addActionListener(this);\r\n\t\t//Button ab\r\n\t\tab.setBounds(450,200,300,250);\r\n\t\tthis.panel.add(ab);\r\n\t\tab.addActionListener(this);\r\n\t\t\r\n\t\tthis.panel.add(label3);\r\n\t label3.setFont(new Font(\"Verdana\",1,20));\r\n\t label3.setForeground(Color.black);\r\n\t label3.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label3.setBounds(90,575,220,30);\r\n\t \r\n\t this.panel.add(label4);\r\n\t label4.setFont(new Font(\"Verdana\",1,20));\r\n\t label4.setForeground(Color.black);\r\n\t label4.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label4.setBounds(490,575,220,30);\r\n\t}", "public TrianglePanel()\n {\n this.setPreferredSize(new Dimension(PANEL_W, PANEL_H));\n this.repaint();\n }", "private Panel buildPanelImg() {\n\t\tpanelImg = new Panel();\r\n\t\tpanelImg.setImmediate(false);\r\n\t\tpanelImg.setWidth(\"-1px\");\r\n\t\tpanelImg.setHeight(\"-1px\");\r\n\t\t\r\n\t\t// gridImg\r\n\t\tgridImg = new HorizontalLayout();\r\n\t\tgridImg.setImmediate(false);\r\n\t\tgridImg.setWidth(\"128px\");\r\n\t\tgridImg.setHeight(\"128px\");\r\n\t\tgridImg.setMargin(false);\r\n\t\tpanelImg.setContent(gridImg);\r\n\t\t\r\n\t\treturn panelImg;\r\n\t}", "void addPanel() {\n \tPanel panel = new Panel();\r\n\r\n panel.setLayout(new GridLayout(4, 1));\r\n jSliderBrightness = makeTitledSilder(\"Helligkeit\", 0, 256, 128); // werte veraendert\r\n jSliderContrast = makeTitledSilder(\"Kontrast\", 0, 10, 5);\r\n jSliderSaturation = makeTitledSilder(\"Sättigung\", 0, 9, 4);\r\n jSliderHue = makeTitledSilder(\"Hue\", 0, 360, 0);\r\n //jSliderContrast = makeTitledSilder(\"Slider2-Wert\", 0, 100, 50);\r\n panel.add(jSliderBrightness);\r\n panel.add(jSliderContrast);\r\n panel.add(jSliderSaturation);\r\n panel.add(jSliderHue);\r\n \r\n add(panel);\r\n \r\n pack();\r\n }", "public DrawPanel() {\n initComponents();\n }", "public ParamPanel() {\n Insets lft_spc = new Insets(0, 5, 0, 0);\n\n /*----------------------------------------------\n Constructor: ParamPanel\n \n \n Purpose: Sets up the control panel containing the\n user specified parameters for performing\n the LSystems image\n \n ---------------------------------------------*/\n\n initColors();\n\n b_doApply = false;\n b_gotImagePnl = false;\n\n\n Panel lPanel = new Panel();\n Panel rPanel = new Panel();\n Panel mPanel = new Panel();\n ClrPanel bPanel = new ClrPanel(aColors);\n\n\n GridBagLayout gridbag = new GridBagLayout();\n GridBagConstraints c = new GridBagConstraints();\n setLayout(gridbag);\n\n c.fill = GridBagConstraints.HORIZONTAL;\t/* fill horizontally*/\n c.weightx = 1; \t\t\t /* each of the 3 panels\n get same horiz space */\n c.insets = new Insets(0, 0, 0, 10); \t/* pad left and right */\n\n c.gridwidth = 1;\n c.anchor = GridBagConstraints.NORTH;\n\n gridbag.setConstraints(lPanel, c);\n gridbag.setConstraints(rPanel, c);\n\n gridbag.setConstraints(mPanel, c);\n\n add(lPanel);\t\t\t/* add panels left to right */\n add(mPanel);\n add(rPanel);\n\n\n\n /*------------\n color panel\n ------------*/\n\n\n\n c = new GridBagConstraints();\n c.gridx = 0;\n c.gridwidth = GridBagConstraints.REMAINDER;\n c.insets = new Insets(15, 0, 0, 0);\n c.fill = GridBagConstraints.HORIZONTAL;\n c.anchor = GridBagConstraints.WEST;\n gridbag.setConstraints(bPanel, c);\n add(bPanel);\n\n gridbag = new GridBagLayout();\n bPanel.setLayout(gridbag);\n\n\n GridBagConstraints c_num = new GridBagConstraints();\n\n c_num.gridwidth = 1; /* first in row */\n c_num.fill = GridBagConstraints.HORIZONTAL;\n c_num.weightx = 1;\n\n\n c_num.insets = new Insets(5, 20, 5, 0);\n Label label8 = new Label(\"0\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n c_num.insets = new Insets(5, 59, 5, 0);\n label8 = new Label(\"5\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n label8 = new Label(\"10\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n label8 = new Label(\"15\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n label8 = new Label(\"20\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n label8 = new Label(\"25\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n\n label8 = new Label(\"30\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n label8 = new Label(\"35\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n c_num.insets = new Insets(5, 10, 5, 5);\n tb_clr = new TextField(3);\n gridbag.setConstraints(tb_clr, c_num);\n bPanel.add(tb_clr);\n\n\n\n gridbag = new GridBagLayout();\n c = new GridBagConstraints();\n setFont(new Font(\"Helvetica\", Font.PLAIN, 14));\n lPanel.setLayout(gridbag);\n\n c.fill = GridBagConstraints.NONE; /* stretch components left to right */\n\n\n\n c.fill = GridBagConstraints.HORIZONTAL; /* stretch components left to right */\n\n /*----------------------\n LSystems Samples\n ---------------------*/\n GridBagConstraints c_smpl = new GridBagConstraints();\n c_smpl.gridx = 0;\n c_smpl.gridy = 0;\n c_smpl.gridwidth = GridBagConstraints.REMAINDER;\n\n\n /* Rules Label */\n c_smpl.anchor = GridBagConstraints.WEST;\n Label label7 = new Label(\"Sample LSystems:\");\n gridbag.setConstraints(label7, c_smpl);\n lPanel.add(label7);\n\n\n GridBagConstraints c_btn = new GridBagConstraints();\n c_btn.gridwidth = 1;\n c_btn.fill = GridBagConstraints.HORIZONTAL;\n c_btn.weightx = 1;\n\n c_btn.gridx = 0;\n c_btn.gridy = 1;\n TextField tb_placeholder = new TextField(25);\n gridbag.setConstraints(tb_placeholder, c_btn);\n tb_placeholder.hide();\n lPanel.add(tb_placeholder);\n tb_placeholder.show();\n tb_placeholder.hide();\n\n /* List of Samples LSystem Patterns */\n c_smpl.fill = GridBagConstraints.HORIZONTAL;\n c_smpl.anchor = GridBagConstraints.WEST;\n c_smpl.gridy = 1;\n ch_ptrnspecs = new List(6, false);\n ch_ptrnspecs.clear();\n gridbag.setConstraints(ch_ptrnspecs, c_smpl);\n lPanel.add(ch_ptrnspecs);\n fillSpecChoices(ch_ptrnspecs);\n\n\n\n c_btn = new GridBagConstraints();\n c_btn.gridwidth = 1;\n c_btn.fill = GridBagConstraints.HORIZONTAL;\n c_btn.weightx = 1;\n c_btn.insets = new Insets(30, 0, 0, 0);\n\n\n /* Apply button */\n b_apply = new Button(\"Apply\");\n gridbag.setConstraints(b_apply, c_btn);\n lPanel.add(b_apply);\n\n\n\n\n\n\n gridbag = new GridBagLayout();\n c = new GridBagConstraints();\n setFont(new Font(\"Helvetica\", Font.PLAIN, 14));\n mPanel.setLayout(gridbag);\n c.fill = GridBagConstraints.NONE; /* stretch components left to right */\n\n /*----------------------\n Rule Controls\n ---------------------*/\n GridBagConstraints c_rule = new GridBagConstraints();\n c_rule.gridx = 0;\n c_rule.insets = lft_spc;\n c_rule.gridwidth = GridBagConstraints.REMAINDER;\n\n /* Rules Label */\n c_rule.anchor = GridBagConstraints.WEST;\n Label label5 = new Label(\"Rules:\");\n gridbag.setConstraints(label5, c_rule);\n mPanel.add(label5);\n\n\n /* List of Rules */\n c_rule.fill = GridBagConstraints.HORIZONTAL;\n c_rule.anchor = GridBagConstraints.WEST;\n lst_rules = new List(4, false);\n gridbag.setConstraints(lst_rules, c_rule);\n mPanel.add(lst_rules);\n lst_rules.clear();\n\n /* rule edit box */\n c_rule.insets = new Insets(35, 5, 0, 0);\n c_rule.anchor = GridBagConstraints.WEST;\n c_rule.fill = GridBagConstraints.NONE;\n tb_rule = new TextField(27);\n gridbag.setConstraints(tb_rule, c_rule);\n mPanel.add(tb_rule);\n\n\n\n\n\n /*------------------\n Rule Editing Buttons\n (Add, Update, Delete, New)\n ------------------*/\n\n c_btn = new GridBagConstraints();\n c_btn.insets = lft_spc;\n c_btn.gridwidth = 1;\n c_btn.fill = GridBagConstraints.HORIZONTAL;\n c_btn.weightx = 1;\n\n /* rule editing buttons */\n b_add = new Button(\"Add\");\n b_updt = new Button(\"Update\");\n b_del = new Button(\"Delete\");\n b_new = new Button(\"Clear\");\n\n\n gridbag.setConstraints(b_add, c_btn);\n\n gridbag.setConstraints(b_updt, c_btn);\n\n gridbag.setConstraints(b_del, c_btn);\n\n c_btn.gridwidth = GridBagConstraints.REMAINDER; /* last-in-row */\n gridbag.setConstraints(b_new, c_btn);\n\n\n mPanel.add(b_add);\n mPanel.add(b_updt);\n mPanel.add(b_del);\n mPanel.add(b_new);\n\n\n gridbag = new GridBagLayout();\n c = new GridBagConstraints();\n setFont(new Font(\"Helvetica\", Font.PLAIN, 14));\n rPanel.setLayout(gridbag);\n\n c.fill = GridBagConstraints.NONE; /* don't stretch components */\n\n\n cbg_Lines = new CheckboxGroup();\n\n\n /*-------------------\n Line Checkboxes\n ------------------*/\n GridBagConstraints c_line = new GridBagConstraints();\n c_line.gridx = 0;\n c_line.anchor = GridBagConstraints.WEST;\n c_line.gridwidth = GridBagConstraints.REMAINDER; /* last-in-row */\n\n\n\n /* Straight Line Checkbox*/\n\n c_line.insets = new Insets(20, 50, 0, 0);\n cb_strt = new Checkbox(\"Straight Lines\", cbg_Lines, true);\n gridbag.setConstraints(cb_strt, c_line);\n rPanel.add(cb_strt);\n\n\n /* Hermite Curve Checkbox*/\n\n c_line.insets = new Insets(0, 50, 0, 0);\n cb_hermite = new Checkbox(\"Hermite Curved Lines\", cbg_Lines, false);\n gridbag.setConstraints(cb_hermite, c_line);\n rPanel.add(cb_hermite);\n\n\n /* BSpline Curve Checkbox*/\n cb_bspline = new Checkbox(\"B-Spline Curved Lines\", cbg_Lines, false);\n c_line.insets = new Insets(0, 50, 12, 0);\n gridbag.setConstraints(cb_bspline, c_line);\n rPanel.add(cb_bspline);\n\n\n\n\n /*-------------------\n Parameter Text Boxes \n \n Axiom, Ignore, Depth, Angle, Scale\n ------------------*/\n\n GridBagConstraints c_textb = new GridBagConstraints();\n\n /* Axiom */\n c_textb.gridwidth = 1; /* first in row */\n c_textb.anchor = GridBagConstraints.WEST;\n Label label1 = new Label(\"Axiom: \");\n gridbag.setConstraints(label1, c_textb);\n rPanel.add(label1);\n\n\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n c_textb.gridwidth = GridBagConstraints.REMAINDER;/* last-in-row */\n tb_axiom = new TextField(26);\n gridbag.setConstraints(tb_axiom, c_textb);\n rPanel.add(tb_axiom);\n\n\n /* Ignore */\n c_textb.gridwidth = 1; /* first in row */\n c_textb.anchor = GridBagConstraints.WEST;\n Label label6 = new Label(\"Ignore: \");\n gridbag.setConstraints(label6, c_textb);\n rPanel.add(label6);\n\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n c_textb.gridwidth = GridBagConstraints.REMAINDER;/* last-in-row */\n tb_ignore = new TextField(26);\n gridbag.setConstraints(tb_ignore, c_textb);\n rPanel.add(tb_ignore);\n\n\n /* Depth */\n c_textb.gridwidth = 1; /* first in row */\n c_textb.anchor = GridBagConstraints.WEST;\n Label label2 = new Label(\"Depth:\");\n gridbag.setConstraints(label2, c_textb);\n rPanel.add(label2);\n\n\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n tb_depth = new TextField(1);\n gridbag.setConstraints(tb_depth, c_textb);\n rPanel.add(tb_depth);\n\n\n /* Angle */\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n Label label3 = new Label(\"Angle:\");\n gridbag.setConstraints(label3, c_textb);\n rPanel.add(label3);\n\n\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n tb_angle = new TextField(3);\n gridbag.setConstraints(tb_angle, c_textb);\n rPanel.add(tb_angle);\n\n\n /* Scale */\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n Label label4 = new Label(\"Scale:\");\n gridbag.setConstraints(label4, c_textb);\n rPanel.add(label4);\n\n\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n tb_scale = new TextField(3);\n gridbag.setConstraints(tb_scale, c_textb);\n rPanel.add(tb_scale);\n\n\n\n lPanel.show();\n rPanel.show();\n mPanel.show();\n bPanel.show();\n\n tb_placeholder.hide();\n\n\n ch_ptrnspecs.select(0);\n changeSpecs(ch_ptrnspecs.getSelectedIndex());\n\n\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}", "public NewJPanel() {\n initComponents();\n }", "public NewJPanel() {\n initComponents();\n }", "private void initComponents() {\r\n\r\n \tholdPanel = new HoldPanel(getBackground());\r\n \tnextPanel = new NextPanel(getBackground());\r\n linesPanel = new LinesPanel(getBackground());\r\n levelPanel = new LevelPanel(getBackground());\r\n scorePanel = new ScorePanel(getBackground());\r\n statisticsPanel = new StatisticsPanel(getBackground());\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n setBackground(new java.awt.Color(0, 0, 0));\r\n \r\n paintPanel.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)));\r\n\r\n// javax.swing.GroupLayout paintPanelLayout = new javax.swing.GroupLayout(paintPanel);\r\n// paintPanel.setLayout(paintPanelLayout);\r\n// paintPanelLayout.setHorizontalGroup(\r\n// paintPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n// .addGap(0, 0, Short.MAX_VALUE)\r\n// );\r\n// paintPanelLayout.setVerticalGroup(\r\n// paintPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n// .addGap(0, 400, Short.MAX_VALUE)\r\n// );\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(statisticsPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(holdPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(linesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)\r\n .addComponent(paintPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(scorePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(nextPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\r\n .addComponent(levelPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(linesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(holdPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(statisticsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(scorePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(nextPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(levelPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addComponent(paintPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addContainerGap())\r\n );\r\n\r\n pack();\r\n }", "private void init() {\r\n\t\tthis.setBackground(Color.decode(\"#c5dfed\"));\r\n\r\n\t\tthis.initPanelButtons();\r\n\r\n\t\tUtilityClass.addBorder(this, 20, 20, 20, 20);\r\n\t\t\r\n\t\tthis.title.setFont(ConstantView.FONT_TITLE_CRUD);\r\n\t\tthis.title.setHorizontalAlignment(JLabel.CENTER);\r\n\t\tthis.add(title, BorderLayout.NORTH);\r\n\t\t\r\n\t\tthis.add(panelButtons, BorderLayout.SOUTH);\r\n\t\tthis.jPanelFormClient.setOpaque(false);\r\n\t\tthis.add(jPanelFormClient, BorderLayout.CENTER);\r\n\t}", "private Panel designPanel() {\n Panel panel = new Panel();\n contentLayout = new FormLayout();\n wrapperLayout = new VerticalLayout();\n numberOfDatasetsBox = new ComboBox<>();\n numberOfReplicatesBox = new ComboBox<>(\"Select number of Replicates\");\n\n\n List<Integer> possibleDatasetNumber =\n IntStream.rangeClosed(1, 100).boxed().collect(Collectors.toList());\n numberOfDatasetsBox.setItems(possibleDatasetNumber);\n\n List<Integer> possibleReplicateNumber =\n IntStream.rangeClosed(1, 100).boxed().collect(Collectors.toList());\n numberOfReplicatesBox.setItems(possibleReplicateNumber);\n\n datasetAccordion = new Accordion();\n datasetAccordion.setWidth(\"100%\");\n\n panel.setContent(wrapperLayout);\n return panel;\n }", "public void initCon() {\n\t\t\n\t\t//ImageIcon icon = new ImageIcon(this.getClass().getResource(\"lib/data/icon/log.png\"));\n\t\t//txtArea.setLineWrap(true);\n\t\ttxtArea = new JTextArea(16,70);\n\t\t//txtArea.setLineWrap(true);\n\t\tJTabbedPane tPane = new JTabbedPane();\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane(txtArea); \n\t\t\n\t\t\n\t\tJPanel top = new JPanel();\n\t\tJPanel center = new JPanel();\n\t\t\n\t\tbottom = new JPanel();\n\t\tColor color = UIManager.getColor ( \"Panel.background\" );\n\t\t\n\t\ttop.add( scrollPane );\n\t\ttPane.addTab(\"Console\", top);\n\t\t\n\t\t\n\t\t//set colors\n\t\treadout.setBackground(color);\n\t\ttop.setBackground(color);\n\t\tcenter.setBackground(color);\n\t\tbottom.setBackground(color);\n\t\t//.setOpaque(true);\n\t\t\n\t\tbottom.setLayout(new GridLayout(1,2));\n\t\tbottom.add(readout);\n\t\tcenter.setLayout(new GridLayout(2,1));\n\t\tadd(center, BorderLayout.CENTER);\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\tadd(tPane, BorderLayout.NORTH);\n\t}", "private void setupPanel()\n\t{\n\t\tsetLayout(numberLayout);\n\t\tsetBorder(new EtchedBorder(EtchedBorder.RAISED, Color.GRAY, Color.DARK_GRAY));\n\t\tsetBackground(Color.LIGHT_GRAY);\n\t\tadd(ans);\n\t\tadd(clear);\n\t\tadd(backspace);\n\t\tadd(divide);\n\t\tadd(seven);\n\t\tadd(eight);\n\t\tadd(nine);\n\t\tadd(multiply);\n\t\tadd(four);\n\t\tadd(five);\n\t\tadd(six);\n\t\tadd(subtract);\n\t\tadd(one);\n\t\tadd(two);\n\t\tadd(three);\n\t\tadd(add);\n\t\tadd(negative);\n\t\tadd(zero);\n\t\tadd(point);\n\t\tadd(equals);\n\t}", "public MyPanel(int x,int y,int width,int height){\r\n\t\tsetBounds(x,y,width,height);}", "private void customize() {\r\n panel.setSize(new Dimension(width, height));\r\n panel.setLayout(new BorderLayout());\r\n }", "public JComponent createContentPanel() {\n\t\t// Separating the component initialization and configuration\n\t\t// from the layout code makes both parts easier to read.\n\t\tinitControls();\n\t\t//TODO set minimum size\n\t\tFormLayout layout = new FormLayout(\"default, 3dlu, default\", // cols\n\t\t\t\t\"p, 3dlu,p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu\"); // rows\n\t\tDefaultFormBuilder builder = new DefaultFormBuilder(layout);\n\t\tbuilder.setDefaultDialogBorder();\n\t\tCellConstraints cc = new CellConstraints();\n\t\t\n\t\tIterator l=labels.iterator();\n\t\tIterator c=valueComponents.iterator();\n\t\twhile (l.hasNext()){\n\t\t String name=(String)l.next();\n\t\t JComponent comp=(JComponent)c.next();\n\t\t builder.append(name,comp);\n\t\t builder.nextLine(2);\n\t\t}\n\t\treturn builder.getPanel();\n\t}", "public DashBoardPanel() {\n initComponents();\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tJFrame frame=new JFrame();\r\n\t\tframe.setSize(500, 500);\r\n\t\tframe.setTitle(\"Border Layout Demo\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setLayout(new BorderLayout());//Set the layout to BorderLayout\r\n\t\t//We can add margin between the regions by passing hgap and vgap to the constructor\r\n\t\t//frame.setLayout(new BorderLayout(0,10));//Setting only vertical gap\r\n\t\t//frame.setLayout(new BorderLayout(10,0));//Setting only horizontal gap\r\n\t\t//frame.setLayout(new BorderLayout(10,0));//Setting both vertical and horizontal gap\r\n\r\n\t\tframe.setVisible(true);\r\n\t\t\r\n\t\t//Create 5 panels\r\n\t\tJPanel panel1= new JPanel();\r\n\t\tJPanel panel2= new JPanel();\r\n\t\tJPanel panel3= new JPanel();\r\n\t\tJPanel panel4= new JPanel();\r\n\t\tJPanel panel5= new JPanel();\r\n\t\t\r\n\t\t//Set different background colors\r\n\t\tpanel1.setBackground(Color.RED);\r\n\t\tpanel2.setBackground(Color.BLUE);\r\n\t\tpanel3.setBackground(Color.GREEN);\r\n\t\tpanel4.setBackground(Color.YELLOW);\r\n\t\tpanel5.setBackground(Color.PINK);\r\n\t\t\r\n\t\t//Set size for each panel\r\n\t\tpanel1.setPreferredSize(new Dimension(100,100));\r\n\t\tpanel2.setPreferredSize(new Dimension(100,100));\r\n\t\tpanel3.setPreferredSize(new Dimension(100,100));\r\n\t\tpanel4.setPreferredSize(new Dimension(100,100));\r\n\t\tpanel5.setPreferredSize(new Dimension(100,100));\r\n\t\t\r\n\t\t//Optional- Set the center panel layout to BorderLayout and add panels to it \r\n\t\t//Create 5 more panels that will be used as inner panels\r\n\t\t//JPanel panel6= new JPanel();\r\n\t\t//JPanel panel7= new JPanel();\r\n\t\t//JPanel panel8= new JPanel();\r\n\t\t//JPanel panel9= new JPanel();\r\n\t\t//JPanel panel10= new JPanel();\r\n\t\t\t\t\r\n\t\t//Set different background colors for the inner panels\r\n\t\t//panel6.setBackground(Color.BLACK);\r\n\t\t//panel7.setBackground(Color.GRAY);\r\n\t\t//panel8.setBackground(Color.DARK_GRAY);\r\n\t\t//panel9.setBackground(Color.LIGHT_GRAY);\r\n\t\t//panel10.setBackground(Color.WHITE);\r\n\t\t\t\t\r\n\t\t//Set size for each inner panel\r\n\t\t//panel6.setPreferredSize(new Dimension(50,50));\r\n\t\t//panel7.setPreferredSize(new Dimension(50,50));\r\n\t\t//panel8.setPreferredSize(new Dimension(50,50));\r\n\t\t//panel9.setPreferredSize(new Dimension(50,50));\r\n\t\t//panel10.setPreferredSize(new Dimension(50,50));\r\n\r\n\t\t\r\n\t\t//panel5.setLayout(new BorderLayout());//Set the Layout of panel5 to be BorderLayout\r\n\t\t//Add the inner panels to the frame and set the region for each panel\r\n\t\t//panel5.add(panel6, BorderLayout.NORTH);\r\n\t\t//panel5.add(panel7, BorderLayout.SOUTH);\r\n\t\t//panel5.add(panel8, BorderLayout.WEST);\r\n\t\t//panel5.add(panel9, BorderLayout.EAST);\r\n\t\t//panel5.add(panel10, BorderLayout.CENTER);\r\n\r\n\t\t//Add the panels to the frame and set the region for each panel\r\n\t\tframe.add(panel1, BorderLayout.NORTH);//NORTH region will expand only horizontally if we will make the window larger\r\n\t\tframe.add(panel2, BorderLayout.EAST);//EAST region will expand only vertically if we will make the window larger\r\n\t\tframe.add(panel3, BorderLayout.WEST);//WEST region will expand only vertically if we will make the window larger\r\n\t\tframe.add(panel4, BorderLayout.SOUTH);//SOUTH region will expand only horizontally if we will make the window larger\r\n\t\tframe.add(panel5, BorderLayout.CENTER);//CENTER region will expand both horizontally and vertically if we will make the window larger\r\n\t}", "private void initPanels() {\r\n\t\r\n\tpanel = new JPanel();\r\n\tpanel.setBounds(0, 0, ScreenSize.WIDTH + 25, ScreenSize.HEIGHT + 50);\r\n\tpanel.setLayout(new BorderLayout());\r\n\tpanel.addComponentListener(this);\r\n\r\n\tbord = new BordPanel();\r\n\tbord.setBounds(0 ,0 ,ScreenSize.WIDTH, ScreenSize.HEIGHT);\r\n\tbord.setOpaque(true);\r\n\r\n\tlabel = new JLabel();\r\n\tlabel.setText(\"Text\");\r\n\r\n\tpanel.add(label, BorderLayout.SOUTH);\r\n\tpanel.add(bord, BorderLayout.CENTER);\r\n\t\r\n\tframe.add(panel);\r\n }", "public void initPanel()\n\t{\n\t\tthis.setVisible(false);\n\t\t//this.setLayout(new BorderLayout());\n \n\t\t//*Layout setup\n\t\t\n\t\tGroupLayout layout = new GroupLayout(this);\n\t\t//this.setLayout(layout);\n\n\t\tlayout.setAutoCreateGaps(true);\n\t\tlayout.setAutoCreateContainerGaps(true);\t\t\n\t\t\t\t\n\t\t//frame = new JFrame();\n offscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n onscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n offscreen = offscreenImage.createGraphics();\n onscreen = onscreenImage.createGraphics();\n setXscale();\n setXscale();\n offscreen.setColor(DEFAULT_CLEAR_COLOR);\n offscreen.fillRect(0, 0, width, height);\n setPenColor();\n setPenRadius();\n setFont();\n clear();\n\n // add antialiasing\n RenderingHints hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n offscreen.addRenderingHints(hints);\n\n \n // frame stuff\n ImageIcon icon = new ImageIcon(onscreenImage);\n drawLabel = new JLabel(icon);\n\n drawLabel.addMouseListener(this);\n drawLabel.addMouseMotionListener(this);\n \n //Create buttons\n resetButton = new JButton();\n undoButton = new JButton();\n \n undoButton.setVisible(true);\n undoButton.setEnabled(true);\n undoButton.setName(\"Undo\");\n undoButton.setText(\"Undo\");\n undoButton.setSize(75, 30);\n undoButton.setPreferredSize(new Dimension(75,30));\n \n resetButton.setVisible(true);\n resetButton.setEnabled(true);\n resetButton.setName(\"Reset\");\n resetButton.setText(\"Reset\");\n \tresetButton.setSize(75, 30);\n \tresetButton.setPreferredSize(new Dimension(75,30));\n \t\n //this.add(resetButton, BorderLayout.NORTH);\n //this.add(undoButton, BorderLayout.NORTH);\n \n // JPanel mainPanel = new JPanel(new BorderLayout());\n\n // JPanel northPanel = new JPanel();\n // northPanel.add(resetButton);\n // northPanel.add(undoButton);\n // mainPanel.add(northPanel, BorderLayout.NORTH);\n // mainPanel.add(drawLabel, BorderLayout.CENTER);\n \n\n // generalColorValue = getColorParameter(Skin.GENERAL_TEXT_COLOR); \n //controlColorValue = getColorParameter(Skin.CONTROL_BACKGROUND_COLOR); \n \n\t\t//trimColorValue = getColorParameter(Skin.TRIM_COLOR); \n\t \n\t\tinitComboBox();\n\t\t//this.setContentPane(drawLabel); <---------------------------\n this.add(drawLabel, BorderLayout.CENTER);\n \n this.addKeyListener(this); // JLabel cannot get keyboard focus\n this.setResizable(true);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // closes all windows\n //this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); // closes only current window\n this.setTitle(name);\n // frame.setJMenuBar(createMenuBar());\n this.pack();\n this.requestFocusInWindow();\n this.setVisible(true);\n \n\t}", "public MondrianPanel()\n {\n setPreferredSize(new Dimension(size, size));\n }", "private JPanel buildContentPane(){\t\n\t\tinitialiseElements();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new FlowLayout());\n\t\tpanel.setBackground(Color.lightGray);\n\t\tpanel.add(scroll);\n\t\tpanel.add(bouton);\n\t\tpanel.add(bouton2);\n\t\treturn panel;\n\t}", "private void setupLayout() {\r\n\t\tgetContentPane().add(panel);\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 }", "public BattleMatLayout() {\n\t\tcreateConent();\n\t\tinitWidget(dockPanel);\n\t\t// ensure this widget takes up as much space as possible\n\t\tthis.setSize(\"100%\", \"100%\");\n\t\tsetupEventHandler();\n\t}", "public Z4Frame() {\n initComponents();\n setSize(new Dimension(330, 370));\n setResizable(false);\n setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);\n\n FlowLayout layout = new FlowLayout();\n\n Container contentPane = getContentPane();\n contentPane.setLayout(layout);\n\n JPanel imagePanel = new JPanel();\n imagePanel.setBackground(new Color(0, 0, 0));\n imagePanel.setPreferredSize(new Dimension(300, 300));\n imagePanel.setVisible(true);\n imagePanel.setLayout(new GridLayout(10, 10, 1, 1));\n\n for (int i = 0; i < BoxPanel.SIZE; i++) {\n for (int j = 0; j < BoxPanel.SIZE; j++) {\n boxes[i][j] = new BoxPanel();\n imagePanel.add(boxes[i][j]);\n }\n }\n\n KolejnyPrzyklad pokazPrzyklad = new KolejnyPrzyklad();\n HopfieldButton hopfieldButton = new HopfieldButton();\n\n contentPane.add(imagePanel);\n\n contentPane.add(pokazPrzyklad);\n contentPane.add(hopfieldButton);\n contentPane.add(new JSeparator(SwingConstants.HORIZONTAL));\n\n setVisible(true);\n }", "private void initComponents() {\n\n jScrollPane = new javax.swing.JScrollPane();\n jPanelContent = new javax.swing.JPanel();\n\n setPreferredSize(new java.awt.Dimension(300, 600));\n\n jScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n\n jPanelContent.setLayout(new java.awt.GridLayout(1, 0));\n jScrollPane.setViewportView(jPanelContent);\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 .addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 523, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE)\n );\n }", "public JComponent createTopPanel() {\n\n\t//\tcontent();\n\t\tfields = new JTextField[NBR_FIELDS];\n\t\tmyTable = new PalletTable(db);\n\t\ttable = new JTable(myTable);\n\t\ttable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n\t\ttable.setPreferredScrollableViewportSize(new Dimension(750, 100));\n table.setFillsViewportHeight(true);\n\t\tscroll = new JScrollPane(table);\n\t//\tcontent();\n\t\tmainPanel= new JPanel();\n\t\tmainPanel.setLayout(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.gridy=0;\n\t\tmainPanel.add(scroll,c);\n\t\tc.gridy=1;\n\t\tmainPanel.add(content(),c);\n\t\t//scroll.setPreferredSize(new Dimension(300,250));\n\t\treturn mainPanel;\n\t}", "public SpectrumPanel() {\n super() ;\n super.setDoubleBuffered( true ) ;\n super.setBackground( Color.RED ) ;\n super.setPreferredSize( new Dimension( 1, 7 ) ) ;\n }", "ReportGenerationPanel() {\n initComponents();\n reportPanel.setLayout(new GridBagLayout());\n constraints = new GridBagConstraints();\n constraints.fill = GridBagConstraints.BOTH;\n constraints.gridx = 0;\n constraints.gridy = 0;\n constraints.weightx = 1.0;\n glue = Box.createVerticalGlue();\n progressPanel = new ReportProgressPanel();\n }", "public StartPanel() {\n\n\t\tGridBagLayout gbl_startPane = new GridBagLayout();\n\t\tgbl_startPane.columnWidths = new int[]{141, 174, 0, 0};\n\t\tgbl_startPane.rowHeights = new int[]{57, 23, 23, 0, 0, 0, 63, 48, 0, 0, 0, 0, 0};\n\t\tgbl_startPane.columnWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};\n\t\tgbl_startPane.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\n\t\tsetLayout(gbl_startPane);\n\t\t\n\t\t/*\n\t\t * Label declarations\n\t\t */\n\t\tselectLabel = new JLabel(\"Select Actions to Perform\");\n\t\tGridBagConstraints gbc_selectLabel = new GridBagConstraints();\n\t\tgbc_selectLabel.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_selectLabel.gridx = 1;\n\t\tgbc_selectLabel.gridy = 0;\n\t\t\n\t\t\n\t\t/*\n\t\t * Checkbox declarations\n\t\t */\n\t\ttrimCkBox = new JCheckBox(\"Trim\");\n\t\tGridBagConstraints gbc_trimCkBox = new GridBagConstraints();\n\t\tgbc_trimCkBox.anchor = GridBagConstraints.WEST;\n\t\tgbc_trimCkBox.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_trimCkBox.gridx = 1;\n\t\tgbc_trimCkBox.gridy = 4;\n\t\t\n\t\trefCkBox = new JCheckBox(\"Build Reference\");\n\t\tGridBagConstraints gbc_refCkBox = new GridBagConstraints();\n\t\tgbc_refCkBox.anchor = GridBagConstraints.WEST;\n\t\tgbc_refCkBox.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_refCkBox.gridx = 1;\n\t\tgbc_refCkBox.gridy = 5;\n\t\t\n\t\t/*alignCkBox = new JCheckBox(\"Align\");\n\t\tGridBagConstraints gbc_alignCkBox = new GridBagConstraints();\n\t\tgbc_alignCkBox.anchor = GridBagConstraints.WEST;\n\t\tgbc_alignCkBox.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_alignCkBox.gridx = 1;\n\t\tgbc_alignCkBox.gridy = 5;*/\n\t\t\n\t\t\n\t\tadd(selectLabel, gbc_selectLabel);\n\t\tadd(trimCkBox, gbc_trimCkBox);\n\t\tadd(refCkBox, gbc_refCkBox);\n\t\t//add(alignCkBox, gbc_alignCkBox);\n\t\t\n\t\t\n\t}", "public Login() {\n initComponents();\n pnl1.setBackground(new Color(0,0,0,200));\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n contentPanel = new javax.swing.JPanel();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n contentPanel.setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout contentPanelLayout = new javax.swing.GroupLayout(contentPanel);\n contentPanel.setLayout(contentPanelLayout);\n contentPanelLayout.setHorizontalGroup(\n contentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 393, Short.MAX_VALUE)\n );\n contentPanelLayout.setVerticalGroup(\n contentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 307, Short.MAX_VALUE)\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(0, 0, Short.MAX_VALUE)\n .addComponent(contentPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 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(0, 0, Short.MAX_VALUE)\n .addComponent(contentPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n }", "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 }", "private void setup() {\n this.jpanel = new JPanel(new BorderLayout());\n this.jframe = new JFrame(\"Minesweeper\");\n this.jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.jframe.setSize(sizeX * LENGTH + 18, (sizeY + 1) * LENGTH + 43);\n\n this.jframe.setVisible(true);\n this.jpanel.addMouseListener(this);\n this.jpanel.setSize(sizeX * LENGTH, (sizeY + 1) * LENGTH);\n this.jframe.add(this.jpanel);\n\n this.g = jpanel.getGraphics();\n }", "public ProblemPanel()\r\n\t{\r\n\t\tsetVerticalAlignment(ALIGN_MIDDLE);\r\n\r\n\t\tquestionPanel = new QuestionPanel(null);\r\n\t\tanswerPanel = new AnswerPanel(null);\r\n\r\n\t\tadd(questionPanel);\r\n\t\tadd(answerPanel);\r\n\r\n\t\tsetCellHeight(questionPanel, \"50%\");\r\n\t\tsetCellHeight(answerPanel, \"50%\");\r\n\r\n\t\taddStyleName(\"problem-panel\");\r\n\t}", "public RegularGrid() {\r\n }", "private void init() {\r\n\t\tthis.panel.setLayout(new BoxLayout(this.panel, BoxLayout.PAGE_AXIS));\r\n\t\tthis.labelTitle = new JLabel(\"Edit your weapons\");\r\n\t\tthis.labelTitle.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tthis.initFilter();\r\n\t\tthis.initList();\r\n\t\tthis.list.setSelectedIndex(0);\r\n\t\tthis.initInfo();\r\n\t\tthis.initButton();\r\n\r\n\t\tJPanel panelWest = new JPanel();\r\n\t\tpanelWest.setLayout(new BoxLayout(panelWest, BoxLayout.PAGE_AXIS));\r\n\t\tJPanel panelCenter = new JPanel();\r\n\t\tpanelCenter.setLayout(new BoxLayout(panelCenter, BoxLayout.LINE_AXIS));\r\n\r\n\t\tpanelWest.add(this.panelFilter);\r\n\t\tpanelWest.add(Box.createRigidArea(new Dimension(0, 5)));\r\n\t\tpanelWest.add(this.panelInfo);\r\n\t\tpanelCenter.add(panelWest);\r\n\t\tpanelCenter.add(Box.createRigidArea(new Dimension(10, 0)));\r\n\t\tthis.panelList.setPreferredSize(new Dimension(300, 150));\r\n\t\tpanelCenter.add(this.panelList);\r\n\r\n\t\tthis.panel.add(this.labelTitle);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(panelCenter);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(this.panelButton);\r\n\r\n\t}", "public VerticalLayout() {\r\n this(5, CENTER, TOP);\r\n }", "public WidgetPanel() {\n\n // setup the master panel\n HorizontalPanel outer = new HorizontalPanel();\n HorizontalPanel border = new HorizontalPanel();\n border.setStyleName(\"WidgetPanelBorder\");\n border.setHeight(\"100%\");\n outer.add(border);\n\n // setup the widgets panel\n widgets.setStyleName(\"WidgetPanel\");\n widgets.setHeight(\"100%\");\n outer.add(widgets);\n \n // init the outer panel\n initWidget(outer);\n }", "SummaryPanel() {\r\n\t\tsetLayout(new GridBagLayout());\r\n\t\tsetBackground(Color.white);\r\n\t\twriteButton.addActionListener(this);\r\n\t\tsetupGui();\r\n\t}", "public Panel() {\n }", "public TMCropperPanel() {\n initComponents();\n this.setBorder(new WorkflowModuleBorder(WorkflowModuleBorder.BLUE_SHADOW));\n }", "public ReportingControlPanel(){\r\n\t\tsetLayout(new GridBagLayout());\r\n\t\t\r\n\t\t\r\n\t\tGridBagConstraints c = new GridBagConstraints();\r\n\t\tc.fill = GridBagConstraints.BOTH;\r\n\t\tc.anchor = GridBagConstraints.PAGE_START;\r\n\t\tc.weightx = 0.5;\r\n\t\tc.weighty = 0;\r\n\t\tc.gridx = 0;\r\n\t\tc.gridy = 0;\r\n\t\tc.gridheight = 1;\r\n\t\tc.insets = new Insets(5,5,5,5);\r\n\t\t\r\n\t\tc.gridwidth = 3;\r\n\t\t\r\n\t\t//text area for display of statistics.\r\n\t\tJLabel jLabel1 = new JLabel(\"<html><u><b>\" + Messages.getString(\"ReportingControlPanel.statistics\") + \"</u></b></html>\"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n\t\t++c.gridy;\r\n\t\tadd(jLabel1, c);\r\n\t\tc.gridwidth = 2;\r\n\t\tautoUpdateStatisticsCheckBox_ = new JCheckBox(Messages.getString(\"ReportingControlPanel.autoupdateStatistics\"), false); //$NON-NLS-1$\r\n\t\tautoUpdateStatisticsCheckBox_.addItemListener(this);\r\n\t\t++c.gridy;\r\n\t\tadd(autoUpdateStatisticsCheckBox_,c);\r\n\t\tstatisticsTextArea_ = new JTextArea(11,1);\r\n\t\tstatisticsTextArea_.setEditable(false);\r\n\t\tstatisticsTextArea_.setLineWrap(true);\r\n\t\tJScrollPane scrolltext = new JScrollPane(statisticsTextArea_);\r\n\t\tscrolltext.setMinimumSize(new Dimension(180,300));\r\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t++c.gridy;\r\n\t\tadd(scrolltext, c);\r\n\t\t\r\n\t\tc.gridwidth = 1;\r\n\t\tc.gridx = 1;\r\n\t\t++c.gridy;\r\n\t\tc.fill = GridBagConstraints.NONE;\r\n\t\tJPanel tmpPanel = new JPanel();\r\n\t\ttmpPanel.add(ButtonCreator.getJButton(\"refresh.png\", \"refresh\", Messages.getString(\"ReportingControlPanel.refresh\"), this)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n\t\ttmpPanel.add(ButtonCreator.getJButton(\"clipboard.png\", \"copyStatisticsInfo\", Messages.getString(\"ReportingControlPanel.copyStatisticsToClipboard\"), this)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n\t\tadd(tmpPanel, c);\r\n\t\t\r\n\t\t\r\n\t\tc.gridwidth = 3;\r\n\t\tc.gridx = 0;\r\n\t\tc.fill = GridBagConstraints.BOTH;\r\n\t\tjLabel1 = new JLabel(\"<html><u><b>\" + Messages.getString(\"ReportingControlPanel.monitoredBeaconZoneInfo\") + \"</u></b></html>\"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n\t\t++c.gridy;\r\n\t\tc.insets = new Insets(25,5,5,5);\r\n\t\tadd(jLabel1, c);\r\n\t\tc.insets = new Insets(5,5,0,5);\r\n\t\t\r\n\t\tdoMonitorBeaconsCheckBox_ = new JCheckBox(Messages.getString(\"ReportingControlPanel.enableMonitoring\"), false); //$NON-NLS-1$\r\n\t\tdoMonitorBeaconsCheckBox_.addItemListener(this);\r\n\t\t++c.gridy;\r\n\t\tadd(doMonitorBeaconsCheckBox_,c);\r\n\t\t\r\n\t\tmonitoredBeaconZoneShowCheckBox_ = new JCheckBox(Messages.getString(\"ReportingControlPanel.showMonitoredZone\"), false); //$NON-NLS-1$\r\n\t\tmonitoredBeaconZoneShowCheckBox_.addItemListener(this);\r\n\t\t++c.gridy;\r\n\t\tadd(monitoredBeaconZoneShowCheckBox_,c);\r\n\t\t\r\n\t\tmonitoredBeaconZoneEditCheckBox_ = new JCheckBox(Messages.getString(\"ReportingControlPanel.editMonitoredZone\"), false); //$NON-NLS-1$\r\n\t\tmonitoredBeaconZoneEditCheckBox_.addItemListener(this);\r\n\t\t++c.gridy;\r\n\t\tadd(monitoredBeaconZoneEditCheckBox_,c);\r\n\t\t\r\n\t\tc.insets = new Insets(5,5,5,5);\r\n\t\t//text area for display of vehicles leaving mix zones.\r\n\t\tbeaconInfoTextArea_ = new JTextArea(25,1);\r\n\t\tbeaconInfoTextArea_.setEditable(false);\r\n\t\tbeaconInfoTextArea_.setText(Messages.getString(\"ReportingControlPanel.legend\")); //$NON-NLS-1$\r\n\t\tbeaconInfoTextArea_.setLineWrap(true);\r\n\t\tscrolltext = new JScrollPane(beaconInfoTextArea_);\r\n\t\tscrolltext.setMinimumSize(new Dimension(180,300));\r\n\t\tscrolltext.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\tbeaconInfoVerticalScrollBar_ = scrolltext.getVerticalScrollBar();\r\n\t\t++c.gridy;\r\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tadd(scrolltext, c);\r\n\t\t\r\n\t\tc.gridwidth = 1;\r\n\t\tc.gridx = 1;\r\n\t\t++c.gridy;\r\n\t\tc.fill = GridBagConstraints.NONE;\r\n\t\ttmpPanel = new JPanel();\r\n\t\ttmpPanel.add(ButtonCreator.getJButton(\"delete.png\", \"deleteBeaconInfo\", Messages.getString(\"ReportingControlPanel.deleteBeaconInfo\"), this)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n\t\ttmpPanel.add(ButtonCreator.getJButton(\"clipboard.png\", \"copyBeaconInfo\", Messages.getString(\"ReportingControlPanel.copyBeaconToClipBoard\"), this)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n\t\tadd(tmpPanel, c);\r\n\t\t\r\n\t\t//log analyser\r\n\t\tc.gridwidth = 2;\r\n\t\tc.gridx = 0;\r\n\t\tc.fill = GridBagConstraints.BOTH;\r\n\t\t++c.gridy;\r\n\t\tc.insets = new Insets(25,5,5,5);\r\n\t\tadd(new JLabel(\"<html><u><b>\" + Messages.getString(\"ReportingControlPanel.analyseLog\") + \"</u></b></html>\"), c);\r\n\t\tc.insets = new Insets(5,5,0,5);\r\n\t\t\r\n\t\t//exchanges coordinates with port numbers in mix-zone-logs\r\n\t\t++c.gridy;\r\n\t\tc.gridx = 0;\r\n\t\tprivacyLogCleaner_ = new JButton(Messages.getString(\"EditLogControlPanel.privacyLogCleanerButton\"));\r\n\t\tprivacyLogCleaner_.setActionCommand(\"cleanLog\");\r\n\t\tprivacyLogCleaner_.setPreferredSize(new Dimension(200,20));\r\n\t\tprivacyLogCleaner_.addActionListener(this);\r\n\t\tadd(privacyLogCleaner_,c);\r\n\t\t\r\n\t\t//opens the log-analyzer component\r\n\t\t++c.gridy;\r\n\t\tc.gridx = 0;\r\n\t\tprivacyLogAnalyzer_ = new JButton(Messages.getString(\"EditLogControlPanel.privacyLogAnalyzerButton\"));\r\n\t\tprivacyLogAnalyzer_.setActionCommand(\"openAnalyzer\");\r\n\t\tprivacyLogAnalyzer_.setPreferredSize(new Dimension(200,20));\r\n\t\tprivacyLogAnalyzer_.addActionListener(this);\r\n\t\tadd(privacyLogAnalyzer_,c);\r\n\t\t\r\n\t\t//sums up the length of all streets on the map\r\n\t\t++c.gridy;\r\n\t\tc.gridx = 0;\r\n\t\tJButton calculateStreetLengthButton = new JButton(Messages.getString(\"ReportingControlPanel.calculateStreetLength\"));\r\n\t\tcalculateStreetLengthButton.setActionCommand(\"openStreetLengthCalculator\");\r\n\t\tcalculateStreetLengthButton.setPreferredSize(new Dimension(200,20));\r\n\t\tcalculateStreetLengthButton.addActionListener(this);\r\n\t\tadd(calculateStreetLengthButton,c);\r\n\t\t\r\n\t\t//show the location information on a map\r\n\t\t++c.gridy;\r\n\t\tc.gridx = 0;\r\n\t\tJButton advancedLocationInformation = new JButton(Messages.getString(\"ReportingControlPanel.showAdvancedLocationInformation\"));\r\n\t\tadvancedLocationInformation.setActionCommand(\"showAdvancedLocationInformation\");\r\n\t\tadvancedLocationInformation.setPreferredSize(new Dimension(200,20));\r\n\t\tadvancedLocationInformation.addActionListener(this);\r\n\t\tadd(advancedLocationInformation,c);\r\n\t\t\r\n\t\t//define FileFilter for fileChooser\r\n\t\tlogFileFilter_ = new FileFilter(){\r\n\t\t\tpublic boolean accept(File f) {\r\n\t\t\t\tif (f.isDirectory()) return true;\r\n\t\t\t\treturn f.getName().toLowerCase().endsWith(\".log\"); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tpublic String getDescription () { \r\n\t\t\t\treturn Messages.getString(\"EditLogControlPanel.logFiles\") + \" (*.log)\"; //$NON-NLS-1$ //$NON-NLS-2$\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\t//to consume the rest of the space\r\n\t\tc.weighty = 1.0;\r\n\t\t++c.gridy;\r\n\t\tadd(new JPanel(), c);\r\n\t}", "public VariableGridLayout() {\n\t\tthis(FIXED_NUM_ROWS, 1, 0, 0);\n\t}", "public ViewerComponent() {\n int images = layout_threads.size();\n int comp_w = 4*w, comp_h = (h*images)/4; if ((images%4) != 0) comp_h += h;\n Dimension dimension = new Dimension(comp_w, comp_h); setPreferredSize(dimension); setMinimumSize(dimension);\n addMouseListener(this); addMouseMotionListener(this);\n }", "public RubberLinesPanel()\n\t{\n\t\tLineListener listener = new LineListener();\n\t\tpoints = new HashMap<Point, Point>();\n\t\taddMouseListener(listener);\n\t\taddMouseMotionListener(listener);\n\t\tsetBackground(Color.black);\n\t\tsetPreferredSize(new Dimension(400, 200));\n\t}", "private void initComponents() {\n\n setBackground(java.awt.Color.lightGray);\n setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\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 .addGap(0, 394, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 294, Short.MAX_VALUE)\n );\n }", "public PrintsPanel() {\n initComponents();\n createPanels();\n\n }", "public static void initialisePanel(){\n\t\t\n\t\tBrewPanel = new JPanel();\n\t\tBrewPanel.setLayout(new MigLayout(\"\", \"[grow][65px:n:65px]\", \"[20px:n:20px][25px:n:25px][grow]\"));\n\t\t\n\t\t\n\t\t//Header\n\t\tBrewHeader = new JLabel(\"Brew\");\n\t\tBrewHeader.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tBrewPanel.add(BrewHeader, \"cell 0 0,grow\");\n\t\t\n\t\t\n\t\t//Subtitle\n\t\tBrewSubtitle = new JLabel(\"Browse and edit the brew database.\");\n\t\tBrewSubtitle.setFont(new Font(\"Tahoma\", Font.ITALIC, 13));\n\t\tBrewPanel.add(BrewSubtitle, \"cell 0 1,growx,aligny top\");\n\t\t\n\t\tbtnPrintBrew = new JButton();\n\t\tbtnPrintBrew.setIcon(new ImageIcon(BrewPanel.class.getResource(\"/images/print.png\")));\n\t\tbtnPrintBrew.setToolTipText(\"Save currently selected brew data to printable .pdf\");\n\t\tBrewPanel.setVisible(true);\n \tbtnPrintBrew.setVisible(false);\n\t\tbtnPrintBrew.setEnabled(false);\n\t\tBrewPanel.add(btnPrintBrew, \"cell 1 0\");\n\t\t\n\t\t//Tabbed Pane\n\t\ttabbedBrewPane = new JTabbedPane(JTabbedPane.TOP);\n\t\tBrewPanel.add(tabbedBrewPane, \"cell 0 2 2,grow\");\n\t\t\t\t\n\t\t\n\t\t//Brew Search Tab\n\t\tBrewSearchPanel.initialisePanel();\t\t\n\t\ttabbedBrewPane.addTab(\"Search\", null, BrewSearchPanel.tabbedBrewSearchPanel, null);\n\t\t\n\t\t\n\t\t//Brew Data Tab\n\t\tBrewDataPanel.initialisePanel();\t\t\n\t\ttabbedBrewPane.addTab(\"Brew Data\", null, BrewDataPanel.tabbedBrewDataPanel, null);\n\t\t\n\t\t\n\t\t//Brew Notes Tab\n\t\tBrewNotesPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Brew Notes\", null, BrewNotesPanel.tabbedBrewNotesPanel, null);\n\t\t\n\t\t\n\t\t//Brew Pictures Tab\n\t\tBrewPicturesPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Brew Pictures\", null, BrewPicturesPanel.tabbedBrewPicturesPanel, null);\n\t\t\n\t\t\n\t\t//Brew Pictures Tab\n\t\tBrewCostPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Brew Costs\", null, BrewCostPanel.tabbedBrewCostPanel, null);\n\t\t\t\t\n\t\t\n\t\t//Add New Brew Tab\n\t\tBrewAddPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Add New Brew\", new ImageIcon(BrewPanel.class.getResource(\"/images/new.png\")), BrewAddPanel.tabbedBrewAddPanel, null);\n\t\t\n\t\t\n\t\t//Set some tabs disabled initially\n\t\ttabbedBrewPane.setEnabledAt(1, false);\n\t\ttabbedBrewPane.setEnabledAt(2, false);\n\t\ttabbedBrewPane.setEnabledAt(3, false);\n\t\ttabbedBrewPane.setEnabledAt(4, false);\n\t\t\n\t \t\n\t\t//Add it all to the main window\n\t\tLegacyApp.WineBrewDBFrame.getContentPane().add(BrewPanel, \"cell 0 0,grow\");\n\t\tBrewPanel.setVisible(false);\n\n\t\t\n\t\tBrewPanelStatus = \"Initialised\";\n\t\t\n\t\t\n\t\t//Add print button listener\n\t\tbtnPrintBrew.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJFileChooser c = new JFileChooser();\n\t\t\t int rVal = c.showSaveDialog(LegacyApp.WineBrewDBFrame);\n\t\t\t if (rVal == JFileChooser.APPROVE_OPTION) {\t\t\t \t \t \n\t\t\t\t\tString pdflocation = c.getCurrentDirectory().toString() + LegacyApp.OSSlash + c.getSelectedFile().getName() + \".pdf\";\n\t\t\t\t\tBrewPDF.createPDF(pdflocation);\t \t \n\t\t\t \t \n\t\t\t }\n\t\t\t if (rVal == JFileChooser.CANCEL_OPTION) {\n\t\t\t \t \n\t\t\t }\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\ttabbedBrewPane.addChangeListener(new ChangeListener() {\n\t\t // This method is called whenever the selected tab changes\n\t\t public void stateChanged(ChangeEvent evt) {\n\t\t JTabbedPane pane = (JTabbedPane)evt.getSource();\n\n\t\t // Get current tab\n\t\t int sel = pane.getSelectedIndex();\n\t\t if(sel == 0 || sel == 5){\n\t\t \tbtnPrintBrew.setVisible(false);\n\t\t \t\tbtnPrintBrew.setEnabled(false);\n\t\t }else{\n\t\t \tbtnPrintBrew.setVisible(true);\n\t\t \t\tbtnPrintBrew.setEnabled(true);\n\t\t }\n\t\t }\n\t\t});\n\t}", "private void initLayoutComponents()\n {\n viewPaneWrapper = new JPanel(new CardLayout());\n viewPane = new JTabbedPane();\n crawlPane = new JPanel(new BorderLayout());\n transitionPane = new JPanel();\n searchPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n resultsPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n }", "public ViewPanel(final ViewFrame viewFrame) {\n\t\tthis.setViewFrame(viewFrame);\n\t\tviewFrame.getModel().getObservable().addObserver(this);\n\t\t//this.setSize(640,384);\n\t\t/*JLabel image = new JLabel( new ImageIcon( \"C:/Users/Drazyl Dul/Desktop/sprite/pd.png\"));\n\t\tJLabel image2 = new JLabel( new ImageIcon( \"C:/Users/Drazyl Dul/Desktop/sprite/purse.png\"));\n\t\tJLabel image3 = new JLabel( new ImageIcon( \"C:/Users/Drazyl Dul/Desktop/sprite/gate_open.png\"));\n\t\tBorder blackline = BorderFactory.createLineBorder(Color.black,1); \n\t\t\n\t\tthis.setLayout(new GridLayout(12,20));\n\t\tfor(int i = 0; i<240;i++){*/\n\t\t //JPanel ptest = new JPanel();\n\t\t //ptest.setBorder(blackline);\n\t\t //this.add(image,0,0);\n\t\t \n\t\t// this.add(image3,0,2);\n\t\t\n\t\t}", "public MainFrame() {\n\n // set a name of the window\n super(\"Spectrum Analyzer\");\n\n Cursor normalCursor = new Cursor(Cursor.DEFAULT_CURSOR);\n Cursor hourglassCursor = new Cursor(Cursor.WAIT_CURSOR);\n setCursor(normalCursor);\n\n // set layout (we chose the BorderLayout)\n setLayout(new GridBagLayout());\n\n // create an important object - gc\n GridBagConstraints gc = new GridBagConstraints();\n\n // something that needs to be done\n gc.fill = GridBagConstraints.BOTH;\n\n // set components\n tablePanelInput = new LightTablePanel();\n tablePanelOutput = new ResultTablePanel();\n formPanel = new FormPanel();\n textPanel = new TextPanel();\n setJMenuBar(createMenuBar());\n\n configFileChooser = new JFileChooser();\n graphFileChooser = new JFileChooser();\n controller = new Controller();\n\n // load data to table\n tablePanelInput.setData(controller.getLights());\n tablePanelOutput.setResults(controller.getResults());\n\n // load default light database to inputTable\n tablePanelInput.clearData();\n\n // absolute path to inputFile\n String workingDirectory = System.getProperty(\"user.dir\"); // ........\\SMOG\n String filename = \"list_of_lights_generic.txt\";\n String absoluteFilePath = \"\";\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"input_data\" + File.separator + filename;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // load inputFile to upper table\n controller.loadFromFile(new File(absoluteFilePath));\n tablePanelInput.refreshData();\n\n // set up fileChooser and filters\n configFileChooser.addChoosableFileFilter(new LightFileFilter());\n graphFileChooser.addChoosableFileFilter(new GraphFileFilter());\n\n // add components to GridLayouts\n // FIRST ROW\n gc.gridy = 0;\n\n // add formPanel at [0, 0]\n gc.weightx = 0.2;\n gc.weighty = 1;\n gc.gridx = 0;\n gc.anchor = GridBagConstraints.CENTER;\n gc.insets = new Insets(0, 0, 0, 0);\n add(formPanel, gc);\n\n // add tablePanelInput at [1, 0]\n gc.weightx = 3;\n gc.weighty = 1;\n gc.gridx = 1;\n gc.anchor = GridBagConstraints.CENTER;\n gc.insets = new Insets(0, 0, 0, 0 );\n add(tablePanelInput, gc);\n\n // SECOND ROW\n gc.gridy = 1;\n\n // add textPanel at [0, 1]\n gc.weightx = 0.2;\n gc.weighty = 1;\n gc.gridx = 0;\n gc.anchor = GridBagConstraints.CENTER;\n gc.insets = new Insets(0, 0, 0, 0);\n add(textPanel, gc);\n\n // add tablePanelOutput at [1, 1]\n gc.weightx = 3;\n gc.weighty = 2;\n gc.gridx = 1;\n gc.anchor = GridBagConstraints.CENTER;\n gc.insets = new Insets(0, 0, 0, 0 );\n add(tablePanelOutput, gc);\n\n\n // if something happen in formPanel, this will be done\n formPanel.setFormListener(new FormListener() {\n public void formEventOccurred(FormEvent e) {\n if (e.isInputFileChanged()) {\n // this will happen when showLightBtn was clicked\n // clean the table\n tablePanelInput.clearData();\n\n // absolute path to inputFile\n String workingDirectory = System.getProperty(\"user.dir\"); // ........\\SMOG\n String filename = e.getInputFile();\n String absoluteFilePath = \"\";\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"input_data\" + File.separator + filename;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // load inputFile to upper table\n controller.loadFromFile(new File(absoluteFilePath));\n tablePanelInput.refreshData();\n }\n\n if (e.isdoItForMeClicked()) {\n // this will happen when doItForMe was clicked\n // absolute path to inputFile\n String workingDirectory = System.getProperty(\"user.dir\");\n String inputFileName = e.getInputFile();\n String absoluteFilePath = \"\";\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"input_data\" + File.separator + inputFileName;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // save to inputFile\n controller.saveToFile(new File(absoluteFilePath));\n\n String absoluteProgramPath = \"\";\n String programName = \"\";\n\n // find absolute path to kernel\n programName = \"\";\n absoluteProgramPath = \"\";\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"WIN\") >= 0) {//windows configuration\n programName = \"run_hard_work.cmd\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n\n // create run.cmd file\n try (PrintWriter writer = new PrintWriter(absoluteProgramPath, \"UTF-8\")){\n // write a line in run_hard_work.cmd file\n writer.print(\"hard_work \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n\n System.out.println(\"hard_work \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n } catch (FileNotFoundException | UnsupportedEncodingException ev) {\n ev.printStackTrace();\n }\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"NUX\") >= 0) { //linux configuration\n programName = \"run_hard_work.sh\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n\n // create run.sh file\n try (PrintWriter writer = new PrintWriter(absoluteProgramPath, \"UTF-8\")){\n // write a line in run_hard_work.sh file\n writer.print(\"./hard_work \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n\n System.out.println(\"./hard_work \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n } catch (FileNotFoundException | UnsupportedEncodingException ev) {\n ev.printStackTrace();\n }\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"MAC\") >= 0) { //mac configuration\n // do something here\n }\n\n // run program HARD_WORK\n ProcessBuilder pb = new ProcessBuilder(absoluteProgramPath);\n pb.directory(new File(workingDirectory + \"/kernel\"));\n if (textPanel.getExperimentSpectrum() != null) {\n try {\n textPanel.clear();\n setCursor(hourglassCursor);\n Process process = pb.start();\n System.out.println(\"Program HARD_WORK started\");\n\n\n InputStream is = process.getInputStream();\n\n BufferedReader br = new BufferedReader (new InputStreamReader (is));\n\n String aux = br.readLine();\n while (aux!=null) {\n System.out.println (aux);\n //textPanel.appendText(aux + '\\n');\n\n aux = br.readLine();\n }\n\n //textPanel.appendText(\"\\n\\n\");\n //textPanel.appendText(\"Optimum Found!\\n\\n\");\n\n // wait for smog.exe to terminate\n int result = process.waitFor();\n if(result == 0) {\n setCursor(normalCursor);\n // clear textPanel\n //textPanel.clear();\n // write which spectrum in being analysed\n textPanel.appendText(\"SPECTRUM: \\n\" + textPanel.getExperimentSpectrum() + \"\\n\" +\n \"*****************************************\\n\");\n // load log file from smog to textPanel\n textPanel.loadLogFileKernel();\n // load log file of spectrumavg to textpanel\n textPanel.loadLogFileAvg();\n\n // this will happen when clearTableBtn was clicked\n // clean table\n tablePanelOutput.clearResults();\n\n // get absolute path file\n String resultFileName = \"percentage.txt\";\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"results\" + File.separator + resultFileName;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // load results\n controller.loadResultsFromFile(new File(absoluteFilePath));\n tablePanelOutput.refreshResults();\n\n // load new configuration\n // load default light database to inputTable\n tablePanelInput.clearData();\n\n // absolute path to inputFile\n String filename = e.getInputFile();\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"input_data\" + File.separator + filename;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // load inputFile to upper table\n controller.loadFromFile(new File(absoluteFilePath));\n tablePanelInput.refreshData();\n }\n else\n {\n JOptionPane.showMessageDialog(new JFrame(),\n \"An error occured during task solving. Look into 'logFileKernel.txt' and\" +\n \" logFileAvg.txt for more details.\",\n \"Result\", JOptionPane.ERROR_MESSAGE);\n System.out.println(\"An error occured during task solving\");\n setCursor(normalCursor);\n }\n } catch (IOException | InterruptedException e1) {\n e1.printStackTrace();\n }\n }\n else {\n JOptionPane.showMessageDialog(new JFrame(),\n \"Choose spectrum first: FILE -> Load Spectrum\",\n \"Warning\", JOptionPane.ERROR_MESSAGE);\n System.out.println(\"An error occured during task solving\");\n }\n\n }\n else if (e.isStartClicked()) {\n // this will happen when startBtn was clicked\n // absolute path to inputFile\n String workingDirectory = System.getProperty(\"user.dir\");\n String inputFileName = e.getInputFile();\n String absoluteFilePath = \"\";\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"input_data\" + File.separator + inputFileName;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // save to inputFile\n controller.saveToFile(new File(absoluteFilePath));\n\n // find absolute path to kernel\n String programName = \"\";\n String absoluteProgramPath = \"\";\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"WIN\") >= 0) {//windows configuration\n programName = \"run.cmd\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n\n // create run.cmd file\n try (PrintWriter writer = new PrintWriter(absoluteProgramPath, \"UTF-8\")){\n // write a line in run.cmd file\n writer.print(\"smog \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n\n System.out.println(\"smog \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n } catch (FileNotFoundException | UnsupportedEncodingException ev) {\n ev.printStackTrace();\n }\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"NUX\") >= 0) { //linux configuration\n programName = \"run.sh\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n\n // create run.sh file\n try (PrintWriter writer = new PrintWriter(absoluteProgramPath, \"UTF-8\")){\n // write a line in run.cmd file\n writer.print(\"./smog \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n\n System.out.println(\"./smog \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n } catch (FileNotFoundException | UnsupportedEncodingException ev) {\n ev.printStackTrace();\n }\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"MAC\") >= 0) { //mac configuration\n // do something here\n }\n\n\n // run program\n ProcessBuilder pb = new ProcessBuilder(absoluteProgramPath);\n pb.directory(new File(workingDirectory + \"/kernel\"));\n if (textPanel.getExperimentSpectrum() != null) {\n try{\n setCursor(hourglassCursor);\n Process process = pb.start();\n System.out.println(\"Program SMOG started\");\n\n // wait for smog.exe to terminate\n int result = process.waitFor();\n if(result == 0) {\n setCursor(normalCursor);\n // clear textPanel\n textPanel.clear();\n // write which spectrum in being analysed\n textPanel.appendText(\"SPECTRUM: \\n\" + textPanel.getExperimentSpectrum() + \"\\n\" +\n \"*****************************************\\n\");\n // load log file from smog to textPanel\n textPanel.loadLogFileKernel();\n // load log file of spectrumavg to textpanel\n textPanel.loadLogFileAvg();\n\n // this will happen when clearTableBtn was clicked\n // clean table\n tablePanelOutput.clearResults();\n\n // get absolute path file\n String resultFileName = \"percentage.txt\";\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"results\" + File.separator + resultFileName;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // load results\n controller.loadResultsFromFile(new File(absoluteFilePath));\n tablePanelOutput.refreshResults();\n }\n else\n {\n JOptionPane.showMessageDialog(new JFrame(),\n \"An error occured during task solving. Look into 'logFileKernel.txt' and\" +\n \" logFileAvg.txt for more details.\",\n \"Result\", JOptionPane.ERROR_MESSAGE);\n System.out.println(\"An error occured during task solving\");\n }\n } catch (IOException | InterruptedException e1) {\n e1.printStackTrace();\n }\n\n\n }\n else {\n JOptionPane.showMessageDialog(new JFrame(),\n \"Choose spectrum first: FILE -> Load Spectrum\",\n \"Warning\", JOptionPane.ERROR_MESSAGE);\n System.out.println(\"An error occured during task solving\");\n }\n\n\n }\n else if (e.isShowGraphClicked()) {\n // this will happen when showGraphBtn was clicked\n // shows graph\n String workingDirectory = System.getProperty(\"user.dir\");\n String programName = \"\";\n String absoluteProgramPath = \"\";\n\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"WIN\") >= 0) { //windows configuration\n programName = \"open_graph.cmd\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"NUX\") >= 0) { //linux configuration\n programName = \"open_graph.sh\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"MAC\") >= 0) { //mac configuration\n // do something here\n }\n\n // run\n ProcessBuilder pb = new ProcessBuilder(absoluteProgramPath);\n pb.directory(new File(workingDirectory + \"/kernel\"));\n try{\n Process process = pb.start();\n //System.out.println(\"open_graph.cmd\");\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n else if (e.isShowGraphOrigClicked()) {\n // this will happen when showGraphBtn was clicked\n // shows graph\n String workingDirectory = System.getProperty(\"user.dir\");\n String programName = \"\";\n String absoluteProgramPath = \"\";\n\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"WIN\") >= 0) { //windows configuration\n programName = \"open_original_graph.cmd\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"NUX\") >= 0) { //linux configuration\n programName = \"open_original_graph.sh\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"MAC\") >= 0) { //mac configuration\n // do something here\n }\n\n // run\n ProcessBuilder pb = new ProcessBuilder(absoluteProgramPath);\n pb.directory(new File(workingDirectory + \"/kernel\"));\n try{\n Process process = pb.start();\n //System.out.println(\"open_original_graph.cmd\");\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n }\n });\n\n setMinimumSize(new Dimension(500, 600));\n setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH);\n\n // set what program should do when closing window\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n // set visible, so we can see it\n setVisible(true);\n }", "private void initComponents() {\r\n\r\n jPanel1 = new javax.swing.JPanel();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n getContentPane().setLayout(new java.awt.GridLayout(1, 0));\r\n\r\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\r\n jPanel1.setLayout(jPanel1Layout);\r\n jPanel1Layout.setHorizontalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGap(0, 400, Short.MAX_VALUE)\r\n );\r\n jPanel1Layout.setVerticalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGap(0, 300, Short.MAX_VALUE)\r\n );\r\n\r\n getContentPane().add(jPanel1);\r\n\r\n pack();\r\n }", "private void initialiseUI()\n { \n // The actual data go in this component.\n String defaultRootElement = \"icr:regionSetData\";\n JPanel contentPanel = initialiseContentPanel(defaultRootElement);\n pane = new JScrollPane(contentPanel);\n \n panelLayout = new GroupLayout(this);\n\t\tthis.setLayout(panelLayout);\n\t\tthis.setBackground(DAOConstants.BG_COLOUR);\n\n\t\tpanelLayout.setAutoCreateContainerGaps(true);\n\n panelLayout.setHorizontalGroup(\n\t\t\tpanelLayout.createParallelGroup()\n\t\t\t.addComponent(pane, 10, 520, 540)\n );\n\n panelLayout.setVerticalGroup(\n\t\t\tpanelLayout.createSequentialGroup()\n .addComponent(pane, 10, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)\n );\n }", "private void initialize() {\r\n\t\tframe = new JFrame(\"Dashboard\");\r\n\t\tframe.getContentPane().setFont(new Font(\"Yu Gothic Medium\", Font.BOLD, 15));\r\n\t\tframe.getContentPane().setForeground(new Color(255, 255, 255));\r\n\t\tframe.getContentPane().setBackground(new Color(255, 255, 255));\r\n\t\tframe.setBackground(new Color(47, 79, 79));\r\n\t\tframe.setBounds(100, 100, 1126, 556);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tBorder blackline = BorderFactory.createLineBorder(Color.red);\r\n\t\t\r\n\t\tJLabel lbl_name = new JLabel(\"Name\");\r\n\t\tlbl_name.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlbl_name.setForeground(new Color(255, 255, 255));\r\n\t\tlbl_name.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tlbl_name.setBounds(625, 196, 127, 24);\r\n\t\tframe.getContentPane().add(lbl_name);\r\n\t\t\r\n\t\tJLabel lbl_photo = new JLabel(\"\");\r\n\t\tlbl_photo.setBackground(new Color(255, 255, 255));\r\n\t\tlbl_photo.setBounds(625, 28, 127, 148);\r\n\t\tlbl_photo.setBorder(blackline);\r\n\t\tframe.getContentPane().add(lbl_photo);\r\n\t\t\r\n\t\tJPanel menuPanel = new JPanel();\r\n\t\tmenuPanel.setBounds(0, 0, 278, 517);\r\n\t\tmenuPanel.setBackground(new Color(47, 79, 79));\r\n\t\tframe.getContentPane().add(menuPanel);\r\n\t\tmenuPanel.setLayout(null);\r\n\t\t\r\n\t\tJLabel menuLabel = new JLabel(\"My Dashboard\");\r\n\t\tmenuLabel.setBounds(0, 0, 278, 54);\r\n\t\tmenuLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tmenuLabel.setForeground(new Color(255, 255, 255));\r\n\t\tmenuLabel.setFont(new Font(\"Bell MT\", Font.BOLD, 28));\r\n\t\tmenuLabel.setBackground(new Color(46, 139, 87));\r\n\t\tmenuLabel.setOpaque(true);\r\n\t\tmenuPanel.add(menuLabel);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBackground(new Color(47, 79, 79));\r\n\t\tpanel.setForeground(new Color(255, 255, 255));\r\n\t\tpanel.setBounds(10, 80, 258, 45);\r\n\t\tmenuPanel.add(panel);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\tJLabel lbl_1 = new JLabel(\"\");\r\n\t\tlbl_1.setBounds(20, 5, 40, 35);\r\n\t\tlbl_1.setIcon(new ImageIcon(img_home));\r\n\t\tpanel.add(lbl_1);\r\n\t\t\r\n\t\tJButton btn_home = new JButton(\"Home\");\r\n\t\tbtn_home.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_home.setForeground((new Color(46, 139, 87)));\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_home.setForeground(new Color(255, 255, 255));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_home.setForeground(new Color(255, 255, 255));\r\n\t\tbtn_home.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Home is clicked\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_home.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tbtn_home.setHorizontalAlignment(SwingConstants.LEADING);\r\n\t\tbtn_home.setBounds(66, 5, 142, 35);\r\n\t\tbtn_home.setOpaque(false);\r\n\t\tbtn_home.setContentAreaFilled(false);\r\n\t\tbtn_home.setBorderPainted(false);\r\n\t\tbtn_home.setFocusPainted(false);\r\n\t\tpanel.add(btn_home);\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setBackground(new Color(47, 79, 79));\r\n\t\tpanel_1.setLayout(null);\r\n\t\tpanel_1.setBounds(10, 145, 258, 45);\r\n\t\tmenuPanel.add(panel_1);\r\n\t\t\r\n\t\tJLabel lbl_2 = new JLabel(\"\");\r\n\t\tlbl_2.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlbl_2.setBounds(20, 5, 40, 35);\r\n\t\tlbl_2.setIcon(new ImageIcon(img_leave));\r\n\t\tpanel_1.add(lbl_2);\r\n\t\t\r\n\t\tJButton btn_leave = new JButton(\"Apply Leave\");\r\n\t\tbtn_leave.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_leave.setForeground((new Color(46, 139, 87)));\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_leave.setForeground((new Color(255, 255, 255)));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_leave.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Leave is clicked\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_leave.setForeground(new Color(255, 255, 255));\r\n\t\tbtn_leave.setHorizontalAlignment(SwingConstants.LEADING);\r\n\t\tbtn_leave.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tbtn_leave.setFocusPainted(false);\r\n\t\tbtn_leave.setContentAreaFilled(false);\r\n\t\tbtn_leave.setBorderPainted(false);\r\n\t\tbtn_leave.setBounds(70, 5, 142, 35);\r\n\t\tpanel_1.add(btn_leave);\r\n\t\t\r\n\t\tJPanel panel_1_1 = new JPanel();\r\n\t\tpanel_1_1.setBackground(new Color(47, 79, 79));\r\n\t\tpanel_1_1.setLayout(null);\r\n\t\tpanel_1_1.setBounds(10, 210, 258, 45);\r\n\t\tmenuPanel.add(panel_1_1);\r\n\t\t\r\n\t\tJLabel lbl_3 = new JLabel(\"\");\r\n\t\tlbl_3.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlbl_3.setBounds(20, 5, 40, 35);\r\n\t\tlbl_3.setIcon(new ImageIcon(img_marks));\r\n\t\tpanel_1_1.add(lbl_3);\r\n\t\t\r\n\t\tJButton btn_marks = new JButton(\"Marks\");\r\n\t\tbtn_marks.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_marks.setForeground((new Color(46, 139, 87)));\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_marks.setForeground((new Color(255, 255, 255)));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_marks.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Marks is clicked\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_marks.setForeground(new Color(255, 255, 255));\r\n\t\tbtn_marks.setOpaque(false);\r\n\t\tbtn_marks.setHorizontalAlignment(SwingConstants.LEADING);\r\n\t\tbtn_marks.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tbtn_marks.setFocusPainted(false);\r\n\t\tbtn_marks.setContentAreaFilled(false);\r\n\t\tbtn_marks.setBorderPainted(false);\r\n\t\tbtn_marks.setBounds(70, 5, 142, 35);\r\n\t\tpanel_1_1.add(btn_marks);\r\n\t\t\r\n\t\tJPanel panel_1_1_1 = new JPanel();\r\n\t\tpanel_1_1_1.setBackground(new Color(47, 79, 79));\r\n\t\tpanel_1_1_1.setLayout(null);\r\n\t\tpanel_1_1_1.setBounds(10, 275, 258, 45);\r\n\t\tmenuPanel.add(panel_1_1_1);\r\n\t\t\r\n\t\tJLabel lbl_4 = new JLabel(\"\");\r\n\t\tlbl_4.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlbl_4.setBounds(20, 5, 40, 35);\r\n\t\tlbl_4.setIcon(new ImageIcon(img_attendance));\r\n\t\tpanel_1_1_1.add(lbl_4);\r\n\t\t\r\n\t\tJButton btn_attendance = new JButton(\"Atendance\");\r\n\t\tbtn_attendance.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_attendance.setForeground((new Color(46, 139, 87)));\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_attendance.setForeground((new Color(255, 255, 255)));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_attendance.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Attendance is clicked\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_attendance.setForeground(new Color(255, 255, 255));\r\n\t\tbtn_attendance.setOpaque(false);\r\n\t\tbtn_attendance.setHorizontalAlignment(SwingConstants.LEADING);\r\n\t\tbtn_attendance.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tbtn_attendance.setFocusPainted(false);\r\n\t\tbtn_attendance.setContentAreaFilled(false);\r\n\t\tbtn_attendance.setBorderPainted(false);\r\n\t\tbtn_attendance.setBounds(70, 5, 142, 35);\r\n\t\tpanel_1_1_1.add(btn_attendance);\r\n\t\t\r\n\t\tJLabel lbl_back = new JLabel(\"\");\r\n\t\tlbl_back.setBounds(278, 0, 832, 255);\r\n\t\tlbl_back.setIcon(new ImageIcon(img_background));\r\n\t\tframe.getContentPane().add(lbl_back);\r\n\t\t\r\n\t\tJLabel lbl_logo = new JLabel(\"\");\r\n\t\tlbl_logo.setBounds(308, 255, 278, 100);\r\n\t\tlbl_logo.setIcon(new ImageIcon(img_logo));\r\n\t\tframe.getContentPane().add(lbl_logo);\r\n\t\t\r\n\t\tJLabel lbl_welcome = new JLabel(\"WELCOME\");\r\n\t\tlbl_welcome.setForeground(new Color(47, 79, 79));\r\n\t\tlbl_welcome.setFont(new Font(\"Times New Roman\", Font.BOLD, 25));\r\n\t\tlbl_welcome.setBounds(308, 366, 239, 38);\r\n\t\tframe.getContentPane().add(lbl_welcome);\r\n\t\t\r\n\t\tJLabel lbl_name1 = new JLabel(\"Name\");\r\n\t\tlbl_name1.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tlbl_name1.setBounds(308, 415, 134, 24);\r\n\t\tframe.getContentPane().add(lbl_name1);\r\n\t\t\r\n\t\tJLabel lbl_id = new JLabel(\"ID : \");\r\n\t\tlbl_id.setForeground(new Color(47, 79, 79));\r\n\t\tlbl_id.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\r\n\t\tlbl_id.setBounds(308, 452, 90, 24);\r\n\t\tframe.getContentPane().add(lbl_id);\r\n\t\t\r\n\t\tJLabel lbl_id1 = new JLabel(\"Identification number\");\r\n\t\tlbl_id1.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tlbl_id1.setBounds(308, 482, 144, 24);\r\n\t\tframe.getContentPane().add(lbl_id1);\r\n\t\t\r\n\t\t\r\n\t}", "private CellPanel defineUI()\n\t{\n\t\t//TODO define all UI Stuff here - not needed if GWT Designer is used as it will do the work for us.\n\n\t\tcellPanelContainer = new VerticalPanel();\t\t\n\t cellPanelContainer.setSize(\"598px\", \"530px\");\n\t\treturn cellPanelContainer;\n\t}", "public JJPanel() {\n\n\t}", "private JPanel buildNorthPanel() {\n\t\t\n\t\tGridBagLayout layout;\n\t\tGridBagConstraints constraints;\n\t\tJPanel panel;\n\t\tint row, col;\n\t\t\n\t\tlayout = new GridBagLayout();\n\t\tconstraints = new GridBagConstraints();\n\t\tpanel = new JPanel(layout);\n\t\trow = 0;\n\t\tcol = 0;\n\t\tJLabel headerLabel = new JLabel(stringFactory.getString(\n\t\t\t\tLabelStringFactory.SAVEASCONFIG_FRAME_SAVE_NEW_CONFIGURATION));\n\t\theaderLabel.setFont(new Font(\"arial\", Font.PLAIN, 18));\n\t\tGUIUtils.add(panel, headerLabel, layout, constraints, row++, col, \n\t\t\t1, 1, 1, 1, GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH,\n\t\t\tGUIUtils.MED_LARGE_INSETS);\n\t\treturn panel;\n\t}" ]
[ "0.70441073", "0.70279884", "0.698105", "0.687864", "0.67957926", "0.6759544", "0.67472386", "0.67107993", "0.6698306", "0.6678", "0.6652404", "0.6634418", "0.66281354", "0.66260374", "0.65903896", "0.65338635", "0.65068483", "0.6487616", "0.6462174", "0.6456086", "0.6439384", "0.6439261", "0.64092344", "0.6379797", "0.63533187", "0.6340438", "0.6338304", "0.63337046", "0.6326375", "0.63164663", "0.6312294", "0.6310451", "0.63031745", "0.6303075", "0.6300393", "0.6292904", "0.62746286", "0.6271258", "0.6264792", "0.62597793", "0.62551063", "0.62468255", "0.62379855", "0.6217476", "0.6214583", "0.6211819", "0.6197804", "0.6197419", "0.6193532", "0.6193532", "0.61909527", "0.6188641", "0.61814207", "0.61733484", "0.6166387", "0.61653465", "0.6150835", "0.61430186", "0.6140984", "0.6133606", "0.61313295", "0.6124476", "0.6112037", "0.6107617", "0.61038285", "0.60992825", "0.6098496", "0.60900545", "0.6089582", "0.6086678", "0.6082262", "0.6078417", "0.60629725", "0.6050984", "0.60419756", "0.6040143", "0.6010227", "0.60096925", "0.60094357", "0.60083735", "0.6008314", "0.60077816", "0.6003972", "0.60004836", "0.59994996", "0.5994861", "0.5988361", "0.5987871", "0.5985871", "0.5984412", "0.59830356", "0.5978028", "0.597774", "0.59704083", "0.5969338", "0.5962119", "0.59336144", "0.59332424", "0.5925831", "0.5921668", "0.5915967" ]
0.0
-1
Game Set up for single player. Sets colours for user and Computer as well as places chip for CPU automatically after user has gone
private void compMode(int col) { int colPlayer, rowPlayer, colComp, rowComp; Color player = Color.yellow; Color comp = Color.red; colPlayer = col; rowPlayer = compAI.playerMove(colPlayer); squares[rowPlayer][colPlayer].setBackground(player); /** * Automatically places chip for computer (This is where the turn of AI takes place) */ compAI.compMove(); colComp = compAI.getColOfAITurn(); rowComp = compAI.getRowOfAITurn(); if (!compAI.isColumnFull(colComp)) { squares[rowComp][colComp].setBackground(comp); } if (compAI.isColumnFull(col)) { buttons[col].setEnabled(false); buttons[col].setBackground(Color.WHITE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void newGame(boolean humanChecker,boolean whoTurn, boolean computerColor) {\n\t\tG=new gamePlay();\n\t\tnumRed=0;\n\t\tnumBlue=0;\n\t\t\n\t\t\n\t\tdouble value = Math.random();\n\t\tFont font = new Font(\"Sans Serif\", 20, 20);\n\t\tStdDraw.setFont(font);\n\t\t\n\t\twhosFirst = true;\n\t\tif (value < 0.5) {\n\t\t\tStdDraw.text(500, 950, \"Blue Player goes first!\");\n\t\t\tif(computerColor){\n\t\t\t\twhoTurn=true;\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\twhoTurn=false;\n\t\t\t\t\n\t\t\t}\n\t\t} else {\n\t\t\tStdDraw.text(500, 950, \"Red Player goes first!\");\n\t\t\tif(computerColor){\n\t\t\t\twhoTurn=false;\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\twhoTurn=true;\n\t\t\t\t\n\t\t\t}\n\t\t\twhosFirst = false;\n\t\t}\n\t\t\n\t\tStdDraw.text(500, 100, \"Please click on the location that you wish to place your piece.\");\n\t\t\n\t\t//creating objects to represent each piece that you are playing with\n\t\tpieceArray = new PlayerPiece[12];\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tif (i < 6) {\n\t\t\t\tpieceArray[i] = new PlayerPiece(\"BLUE\", i + 1);\n\t\t\t} else {\n\t\t\t\tpieceArray[i] = new PlayerPiece(\"RED\", i + 1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//creating objects to represent each location on the game board\n\t\tspots = new moveLocations[17];\n\t\tspots[0] = new moveLocations(165, 235, 765, 835);\n\t\tspots[1] = new moveLocations(465, 535, 765, 835);\n\t\tspots[2] = new moveLocations(765, 835, 765, 835);\n\t\tspots[3] = new moveLocations(765, 835, 465, 535);\n\t\tspots[4] = new moveLocations(765, 835, 165, 235);\n\t\tspots[5] = new moveLocations(465, 535, 165, 235);\n\t\tspots[6] = new moveLocations(165, 235, 165, 235);\n\t\tspots[7] = new moveLocations(165, 235, 465, 535);\n\t\tspots[8] = new moveLocations(315, 385, 615, 685);\n\t\tspots[9] = new moveLocations(465, 535, 615, 685);\n\t\tspots[10] = new moveLocations(615, 685, 615, 685);\n\t\tspots[11] = new moveLocations(615, 685, 465, 535);\n\t\tspots[12] = new moveLocations(615, 685, 315, 385);\n\t\tspots[13] = new moveLocations(465, 535, 315, 385);\n\t\tspots[14] = new moveLocations(315, 385, 315, 385);\n\t\tspots[15] = new moveLocations(315, 385, 465, 535);\n\t\tspots[16] = new moveLocations(1000, 2000, 1000, 2000);\n\t\t\n\t\t\n\t\tif(humanChecker){\n\t\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\t\t\n\t\t\tif(computerColor){\n\t\t\t\t\n\t\t\t\tStdDraw.text(80, 820, \"Computer\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\n\t\t\t\tStdDraw.text(920, 820, \"Computer\");\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tint j = 0;\n\t\tint num1 = 700;\n\t\tint num2 = 700;\n\t\t\n\t\tboolean mouseClicked = false;\n\t\tboolean mouseClicked1 = false;\n\t\tboolean boolVal = true;\n\t\tboolean boolVal2 = true;\n\t\tdouble xLocation = 0;\n\t\tdouble yLocation = 0;\n\t\tdouble xLocation1 = 0;\n\t\tdouble yLocation1 = 0;\n\t\tint countBlue=0;\n\t\tint countRed=6;\n\t\tboolean turn=true;\n\t\tboolean fixingTurn=false;\n\t\t//Main while loop for 12 turns\n\t\t//setting up the game board when the user clicks new game\n\t\twhile (j < 12) {\n\t\t\t\n\t\t\t//all the if's and else if's were designed in assignment 1 to represent where a player can put there piece\n\t\t\t//we realize that this is a very inefficient way of coding although it does work\n\t\t\t//This class is designed for setting up the board with the first moves\n\t\t\t//the rest of the game is in the gamePlay class\n\t\t\t//we made the gamePlay class for assignment 2 and we made sure to modularize it\n\t\t\t//we also reduced the conditional statements to make the code easier to read and improve efficiency\n\t\t\tif (j == 1) {\n\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\tStdDraw.filledRectangle(500, 950, 400, 50);\n\t\t\t}\n\t\t\tif(whoTurn&&humanChecker){\n\t\t\t\tComputerMove moving=new ComputerMove();\n\t\t\t\tif(computerColor){\n\t\t\t\t\tmoving.placeAIPiece(countBlue);\n\t\t\t\t\t\n\t\t\t\t\tcountBlue++;\n\t\t\t\t\tnumBlue++;\n\t\t\t\t\tif(fixingTurn){\n\t\t\t\t\t\tfixingTurn=false;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfixingTurn=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tmoving.placeAIPiece(countRed);\n\t\t\t\t\t\n\t\t\t\t\tcountRed++;\n\t\t\t\t\tnumRed++;\n\t\t\t\t\tif(fixingTurn){\n\t\t\t\t\t\tfixingTurn=false;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfixingTurn=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\tif (j % 2 == 0) {// first\n\t\t\t\tif (whosFirst) {// blue goes first\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledRectangle(900, 900, 100, 50);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\t\t\t\tStdDraw.text(100, 900, \"Blue's Turn!\");\n\t\t\t\t\tfixingTurn=true;\n\t\t\t\t\twhile (boolVal) {\n\n\t\t\t\t\t\tmouseClicked = StdDraw.mousePressed();\n\t\t\t\t\t\txLocation = StdDraw.mouseX();\n\t\t\t\t\t\tyLocation = StdDraw.mouseY();\n\t\t\t\t\t\tif (!spots[0].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[0].getMinX(), spots[0].getMaxX(), spots[0].getMinY(), spots[0].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(200, 800, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[0].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(0);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[1].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[1].getMinX(), spots[1].getMaxX(), spots[1].getMinY(), spots[1].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 800, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[1].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[2].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[2].getMinX(), spots[2].getMaxX(), spots[2].getMinY(), spots[2].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(800, 800, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[2].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[3].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[3].getMinX(), spots[3].getMaxX(), spots[3].getMinY(), spots[3].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(800, 500, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[3].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(3);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[4].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[4].getMinX(), spots[4].getMaxX(), spots[4].getMinY(), spots[4].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(800, 200, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[4].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(4);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[5].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[5].getMinX(), spots[5].getMaxX(), spots[5].getMinY(), spots[5].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 200, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[5].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(5);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[6].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[6].getMinX(), spots[6].getMaxX(), spots[6].getMinY(), spots[6].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(200, 200, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[6].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(6);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[7].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[7].getMinX(), spots[7].getMaxX(), spots[7].getMinY(), spots[7].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(200, 500, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[7].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(7);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[8].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[8].getMinX(), spots[8].getMaxX(), spots[8].getMinY(), spots[8].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(350, 650, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[8].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(8);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[9].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[9].getMinX(), spots[9].getMaxX(), spots[9].getMinY(), spots[9].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 650, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[9].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(9);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[10].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[10].getMinX(), spots[10].getMaxX(), spots[10].getMinY(), spots[10].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(650, 650, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[10].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(10);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[11].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[11].getMinX(), spots[11].getMaxX(), spots[11].getMinY(), spots[11].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(650, 500, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[11].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(11);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[12].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[12].getMinX(), spots[12].getMaxX(), spots[12].getMinY(), spots[12].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(650, 350, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[12].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(12);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[13].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[13].getMinX(), spots[13].getMaxX(), spots[13].getMinY(), spots[13].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 350, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[13].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(13);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[14].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[14].getMinX(), spots[14].getMaxX(), spots[14].getMinY(), spots[14].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(350, 350, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[14].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(14);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[15].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[15].getMinX(), spots[15].getMaxX(), spots[15].getMinY(), spots[15].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(350, 500, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[15].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(15);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t}\n\t\t\t\t\tcountBlue++;\n\t\t\t\t\tnumBlue++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledRectangle(100, 900, 100, 50);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\t\t\t\tStdDraw.text(900, 900, \"Red's Turn!\");//this is for red's turn assuming blue got to go first\n\t\t\t\t\tfixingTurn=false;\n\t\t\t\t\t//all the conditions below on where red can put their piece\n\t\t\t\t\twhile (boolVal2) {\n\t\t\t\t\t\tmouseClicked = StdDraw.mousePressed();\n\t\t\t\t\t\txLocation = StdDraw.mouseX();\n\n\t\t\t\t\t\tyLocation = StdDraw.mouseY();\n\t\t\t\t\t\tif (!spots[0].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[0].getMinX(), spots[0].getMaxX(), spots[0].getMinY(), spots[0].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(200, 800, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[0].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(0);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[1].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[1].getMinX(), spots[1].getMaxX(), spots[1].getMinY(), spots[1].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 800, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[1].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[2].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[2].getMinX(), spots[2].getMaxX(), spots[2].getMinY(), spots[2].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(800, 800, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[2].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[3].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[3].getMinX(), spots[3].getMaxX(), spots[3].getMinY(), spots[3].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(800, 500, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[3].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(3);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if (!spots[4].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[4].getMinX(), spots[4].getMaxX(), spots[4].getMinY(), spots[4].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(800, 200, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[4].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(4);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[5].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[5].getMinX(), spots[5].getMaxX(), spots[5].getMinY(), spots[5].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 200, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[5].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(5);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[6].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[6].getMinX(), spots[6].getMaxX(), spots[6].getMinY(), spots[6].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(200, 200, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[6].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(6);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[7].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[7].getMinX(), spots[7].getMaxX(), spots[7].getMinY(), spots[7].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(200, 500, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[7].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(7);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[8].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[8].getMinX(), spots[8].getMaxX(), spots[8].getMinY(), spots[8].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(350, 650, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[8].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(8);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[9].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[9].getMinX(), spots[9].getMaxX(), spots[9].getMinY(), spots[9].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 650, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[9].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(9);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[10].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[10].getMinX(), spots[10].getMaxX(), spots[10].getMinY(), spots[10].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(650, 650, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[10].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(10);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[11].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[11].getMinX(), spots[11].getMaxX(), spots[11].getMinY(), spots[11].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(650, 500, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[11].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(11);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[12].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[12].getMinX(), spots[12].getMaxX(), spots[12].getMinY(), spots[12].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(650, 350, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[12].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(12);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[13].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[13].getMinX(), spots[13].getMaxX(), spots[13].getMinY(), spots[13].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 350, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[13].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(13);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[14].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[14].getMinX(), spots[14].getMaxX(), spots[14].getMinY(), spots[14].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(350, 350, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[14].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(14);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[15].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\t\t\t\tspots[15].getMinX(), spots[15].getMaxX(), spots[15].getMinY(), spots[15].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(350, 500, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation = 0;\n\t\t\t\t\t\t\tyLocation = 0;\n\t\t\t\t\t\t\tmouseClicked = false;\n\t\t\t\t\t\t\tspots[15].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(15);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcountRed++;\n\t\t\t\t\tnumRed++;\n\t\t\t\t}\n\n\t\t\t} else {// second\n\t\t\t\tif (!whosFirst) {// if blue does not get to go first, these are for blue's moves\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledRectangle(900, 900, 100, 50);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\t\t\t\tStdDraw.text(100, 900, \"Blue's Turn!\");\n\t\t\t\t\tfixingTurn=true;\n\t\t\t\t\twhile (boolVal) {\n\t\t\t\t\t\tmouseClicked1 = StdDraw.mousePressed();\n\t\t\t\t\t\txLocation1 = StdDraw.mouseX();\n\t\t\t\t\t\tyLocation1 = StdDraw.mouseY();\n\n\t\t\t\t\t\tif (!spots[0].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[0].getMinX(), spots[0].getMaxX(), spots[0].getMinY(), spots[0].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(200, 800, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[0].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(0);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[1].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[1].getMinX(), spots[1].getMaxX(), spots[1].getMinY(), spots[1].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 800, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[1].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[2].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[2].getMinX(), spots[2].getMaxX(), spots[2].getMinY(), spots[2].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(800, 800, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[2].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[3].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[3].getMinX(), spots[3].getMaxX(), spots[3].getMinY(), spots[3].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(800, 500, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[3].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(3);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[4].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[4].getMinX(), spots[4].getMaxX(), spots[4].getMinY(), spots[4].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(800, 200, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[4].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(4);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[5].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[5].getMinX(), spots[5].getMaxX(), spots[5].getMinY(), spots[5].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 200, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[5].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(5);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[6].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[6].getMinX(), spots[6].getMaxX(), spots[6].getMinY(), spots[6].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(200, 200, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[6].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(6);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[7].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[7].getMinX(), spots[7].getMaxX(), spots[7].getMinY(), spots[7].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(200, 500, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[7].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(7);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[8].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[8].getMinX(), spots[8].getMaxX(), spots[8].getMinY(), spots[8].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(350, 650, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[8].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(8);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[9].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[9].getMinX(), spots[9].getMaxX(), spots[9].getMinY(), spots[9].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 650, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[9].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(9);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[10].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[10].getMinX(), spots[10].getMaxX(), spots[10].getMinY(), spots[10].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(650, 650, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[10].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(10);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[11].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[11].getMinX(), spots[11].getMaxX(), spots[11].getMinY(), spots[11].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(650, 500, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[11].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(11);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[12].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[12].getMinX(), spots[12].getMaxX(), spots[12].getMinY(), spots[12].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(650, 350, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[12].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(12);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[13].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[13].getMinX(), spots[13].getMaxX(), spots[13].getMinY(), spots[13].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 350, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[13].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(13);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[14].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[14].getMinX(), spots[14].getMaxX(), spots[14].getMinY(), spots[14].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(350, 350, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[14].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(14);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[15].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[15].getMinX(), spots[15].getMaxX(), spots[15].getMinY(), spots[15].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(350, 500, 35);\n\t\t\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\t\tboolVal = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[15].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countBlue].changePiecePosition(15);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcountBlue++;\n\t\t\t\t\tnumBlue++;\n\t\t\t\t\t\n\t\t\t\t} else {//finally this is for if red gets to go first\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledRectangle(100, 900, 100, 50);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\t\t\t\tStdDraw.text(900, 900, \"Red's Turn!\");\n\t\t\t\t\tfixingTurn=false;\n\t\t\t\t\twhile (boolVal2) {\n\n\t\t\t\t\t\tmouseClicked1 = StdDraw.mousePressed();\n\n\t\t\t\t\t\txLocation1 = StdDraw.mouseX();\n\t\t\t\t\t\tyLocation1 = StdDraw.mouseY();\n\t\t\t\t\t\tif (!spots[0].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[0].getMinX(), spots[0].getMaxX(), spots[0].getMinY(), spots[0].getMaxY())) {\n\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(200, 800, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[0].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(0);\n\t\t\t\t\t\t} else if (!spots[1].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[1].getMinX(), spots[1].getMaxX(), spots[1].getMinY(), spots[1].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 800, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[1].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[2].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[2].getMinX(), spots[2].getMaxX(), spots[2].getMinY(), spots[2].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(800, 800, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[2].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[3].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[3].getMinX(), spots[3].getMaxX(), spots[3].getMinY(), spots[3].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(800, 500, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[3].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(3);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if (!spots[4].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[4].getMinX(), spots[4].getMaxX(), spots[4].getMinY(), spots[4].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(800, 200, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[4].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(4);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[5].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[5].getMinX(), spots[5].getMaxX(), spots[5].getMinY(), spots[5].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 200, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[5].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(5);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[6].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[6].getMinX(), spots[6].getMaxX(), spots[6].getMinY(), spots[6].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(200, 200, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[6].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(6);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[7].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[7].getMinX(), spots[7].getMaxX(), spots[7].getMinY(), spots[7].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(200, 500, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[7].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(7);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[8].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[8].getMinX(), spots[8].getMaxX(), spots[8].getMinY(), spots[8].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(350, 650, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[8].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(8);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[9].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[9].getMinX(), spots[9].getMaxX(), spots[9].getMinY(), spots[9].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 650, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[9].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(9);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[10].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[10].getMinX(), spots[10].getMaxX(), spots[10].getMinY(), spots[10].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(650, 650, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[10].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(10);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[11].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[11].getMinX(), spots[11].getMaxX(), spots[11].getMinY(), spots[11].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(650, 500, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[11].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(11);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[12].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[12].getMinX(), spots[12].getMaxX(), spots[12].getMinY(), spots[12].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(650, 350, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[12].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(12);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[13].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[13].getMinX(), spots[13].getMaxX(), spots[13].getMinY(), spots[13].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(500, 350, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[13].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(13);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[14].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[14].getMinX(), spots[14].getMaxX(), spots[14].getMinY(), spots[14].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(350, 350, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[14].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(14);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (!spots[15].checkOccupied() && mouseClicked1 && mouseInRange(xLocation1, yLocation1,\n\t\t\t\t\t\t\t\tspots[15].getMinX(), spots[15].getMaxX(), spots[15].getMinY(), spots[15].getMaxY())) {\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\t\t\tStdDraw.filledCircle(350, 500, 35);\n\t\t\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\t\tboolVal2 = false;\n\t\t\t\t\t\t\txLocation1 = 0;\n\t\t\t\t\t\t\tyLocation1 = 0;\n\t\t\t\t\t\t\tmouseClicked1 = false;\n\t\t\t\t\t\t\tspots[15].changeOccupied();\n\t\t\t\t\t\t\tpieceArray[countRed].changePiecePosition(15);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcountRed++;\n\t\t\t\t\tnumRed++;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t//after each piece is placed on the game board, the piece is enabled so that it can be used later in the game\n\t\t\tif((j%2==0&&!whosFirst)||(j%2==1&&whosFirst)){\n\t\t\t\tpieceArray[countRed-1].changeEnabled();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpieceArray[countBlue-1].changeEnabled();\n\t\t\t}\n\t\t\tj++;\n\t\t\t\n\t\t\t\n\t\t\tboolVal = true;\n\t\t\tboolVal2 = true;\n\t\t\tint pieces=6;\n\t\t\tif((j%2==0&&!whosFirst)||(j%2==1&&whosFirst)){\n\t\t\t\tpieces=0;\n\t\t\t}\n\t\t\t//checking for mills in the set up of new game\n\t\t\tif(j>=0){\n\t\t\t\t\n\t\t\t\tG.millBoard(pieces,numBlue,numRed,fixingTurn,value,humanChecker,computerColor);//to deal with a mill\n\t\t\t\tG.resetMill();//to reset previous mills if they are not left in a line\n\t\t\t\t//prevents a player from getting a mill each turn for not moving their line of 3\n\t\t\t}\n\t\t\tif(humanChecker){\n\t\t\t\tif(j==1&&!whoTurn){\n\t\t\t\t\tG.turnButton();//button created in the gamePlay class to help prevent double clicking\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(humanChecker){\n\t\t\t\tif(j!=1&& !whoTurn){\n\t\t\t\t\tG.turnButton();//button created in the gamePlay class to help prevent double clicking\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!humanChecker){\t\n\t\t\t\tG.turnButton();//button created in the gamePlay class to help prevent double clicking\n\t\t\t\t\n\t\t\t}\n\t\t\tif(turn){\n\t\t\t\tturn=false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tturn=true;\n\t\t\t}\n\t\t\t\n\t\t\tif(whoTurn){\n\t\t\t\twhoTurn=false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\twhoTurn=true;\n\t\t\t}\n\t\t}\n\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\tStdDraw.filledRectangle(500, 100, 500, 50);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.text(500, 130, \"Piece Placement Complete!\");\n\t\tmouseClicked=false;\n\t\tmouseClicked1=false;\n\t\tboolean fixer=true;\n\t\tif(humanChecker){\n\t\t\tfixer=whoTurn;\n\t\t}\n\t\tG.createGame(numRed,numBlue,humanChecker,fixer,computerColor,\"new\");//calls on the gamePlay.createGame method which allows the user to play the game until one player wins\n\t}", "public static void continueGame(boolean humanChecker,boolean computerColor) {\n\t\t\n\t\t\n\t\tStdDraw.setPenRadius(0.05);\n\t\t// Done button\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.filledRectangle(500, 100, 85, 55);\n\t\tStdDraw.setPenColor(StdDraw.ORANGE);\n\t\tStdDraw.filledRectangle(500, 100, 80, 50);\n\n\t\t// Toggle Blue\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.filledRectangle(700, 900, 55, 55);\n\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\tStdDraw.filledRectangle(700, 900, 50, 50);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.filledRectangle(900, 900, 55, 55);\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.filledRectangle(900, 900, 50, 50);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.text(700, 900, \"BLUE\");\n\t\tStdDraw.text(900, 900, \"RED\");\n\t\tStdDraw.text(500, 100, \"DONE\");\n\n\t\tStdDraw.setPenColor(StdDraw.YELLOW);\n\t\tStdDraw.filledCircle(700, 980, 10);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.text(270, 900, \"Please click on a position to place a piece\");\n\t\tStdDraw.text(270, 870, \"Toggle the color of the piece you wish to place\");\n\t\t\n\t\t//creating objects for all the pieces that can be played\n\t\tpieceArray = new PlayerPiece[12];\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tif (i < 6) {\n\t\t\t\tSixMensMorris.pieceArray[i] = new PlayerPiece(\"BLUE\", i + 1);\n\t\t\t} else {\n\t\t\t\tSixMensMorris.pieceArray[i] = new PlayerPiece(\"RED\", i + 1);\n\t\t\t}\n\t\t}\n\n\t\t//creating objects for each spot on the game board that a player can put a piece\n\t\tspots = new moveLocations[16];\n\t\tspots[0] = new moveLocations(185, 215, 785, 815);\n\t\tspots[1] = new moveLocations(485, 515, 785, 815);\n\t\tspots[2] = new moveLocations(785, 815, 785, 815);\n\t\tspots[3] = new moveLocations(785, 815, 485, 515);\n\t\tspots[4] = new moveLocations(785, 815, 185, 215);\n\t\tspots[5] = new moveLocations(485, 515, 185, 215);\n\t\tspots[6] = new moveLocations(185, 215, 185, 215);\n\t\tspots[7] = new moveLocations(185, 215, 485, 515);\n\t\tspots[8] = new moveLocations(335, 365, 635, 665);\n\t\tspots[9] = new moveLocations(485, 515, 635, 665);\n\t\tspots[10] = new moveLocations(635, 665, 635, 665);\n\t\tspots[11] = new moveLocations(635, 665, 485, 515);\n\t\tspots[12] = new moveLocations(635, 665, 335, 365);\n\t\tspots[13] = new moveLocations(485, 515, 335, 365);\n\t\tspots[14] = new moveLocations(335, 365, 335, 365);\n\t\tspots[15] = new moveLocations(335, 365, 485, 515);\n\n\t\t\n\t\tif(humanChecker){\n\t\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\n\t\t\tif(computerColor){\n\t\t\t\t\n\t\t\t\tStdDraw.text(700, 865, \"Comp\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tStdDraw.text(900, 865, \"Comp\");\n\t\t\t}\n\n\t\t}\n\t\tboolean mouseClicked3 = false;\n\t\tdouble xLocation3 = 0;\n\t\tdouble yLocation3 = 0;\n\t\tint color = 1; // Blue\n\t\tint num1 = 700;\n\t\tint num2 = 700;\n\t\tboolean mouseClicked = false;\n\t\tdouble xLocation = 0;\n\t\tdouble yLocation = 0;\n\t\t\n\t\tint bluePieces = 0;\n\t\tint redPieces = 0;\n\t\t\n\t\twhile (!mouseClicked3 || (!(mouseInRange(xLocation3, yLocation3, 415, 585, 45, 155)))) {\n\t\t\tmouseClicked3 = StdDraw.mousePressed();\n\t\t\txLocation3 = StdDraw.mouseX();\n\t\t\tyLocation3 = StdDraw.mouseY();\n\t\t\t\n\t\t\t//toggle button for which color the user wants to place onto the game board\n\t\t\tif (color == 1 && mouseClicked3 && (mouseInRange(xLocation3, yLocation3, 845, 955, 845, 955))) {\n\t\t\t\tStdDraw.setPenColor(StdDraw.YELLOW);\n\t\t\t\tStdDraw.filledCircle(900, 980, 10);\n\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\tStdDraw.filledCircle(700, 980, 10);\n\t\t\t\tcolor = 2;\n\t\t\t} else if (color == 2 && mouseClicked3 && (mouseInRange(xLocation3, yLocation3, 645, 755, 845, 955))) {\n\t\t\t\tStdDraw.setPenColor(StdDraw.YELLOW);\n\t\t\t\tStdDraw.filledCircle(700, 980, 10);\n\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\tStdDraw.filledCircle(900, 980, 10);\n\t\t\t\tcolor = 1;\n\t\t\t}\n\t\t\t\n\t\t\t//a bunch of ifs and else ifs to allow the user to place a piece on a specific spot\n\t\t\t//it alternates between movements for blue and movements for red\n\t\t\tmouseClicked = StdDraw.mousePressed();\n\t\t\txLocation = StdDraw.mouseX();\n\t\t\tyLocation = StdDraw.mouseY();\n\t\t\tif (!spots[0].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation, spots[0].getMinX(),\n\t\t\t\t\tspots[0].getMaxX(), spots[0].getMinY(), spots[0].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(200, 800, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(200, 800, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[0].changeOccupied();\n\t\t\t} else if (!spots[1].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[1].getMinX(), spots[1].getMaxX(), spots[1].getMinY(), spots[1].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(500, 800, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(500, 800, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[1].changeOccupied();\n\t\t\t} else if (!spots[2].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[2].getMinX(), spots[2].getMaxX(), spots[2].getMinY(), spots[2].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(800, 800, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(2);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(800, 800, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(2);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[2].changeOccupied();\n\t\t\t} else if (!spots[3].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[3].getMinX(), spots[3].getMaxX(), spots[3].getMinY(), spots[3].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(800, 500, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(3);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(800, 500, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(3);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[3].changeOccupied();\n\t\t\t} else if (!spots[4].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[4].getMinX(), spots[4].getMaxX(), spots[4].getMinY(), spots[4].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(800, 200, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(4);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(800, 200, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(4);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[4].changeOccupied();\n\t\t\t} else if (!spots[5].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[5].getMinX(), spots[5].getMaxX(), spots[5].getMinY(), spots[5].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(500, 200, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(5);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(500, 200, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(5);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[5].changeOccupied();\n\t\t\t} else if (!spots[6].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[6].getMinX(), spots[6].getMaxX(), spots[6].getMinY(), spots[6].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(200, 200, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(6);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(200, 200, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(6);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[6].changeOccupied();\n\t\t\t} else if (!spots[7].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[7].getMinX(), spots[7].getMaxX(), spots[7].getMinY(), spots[7].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(200, 500, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(7);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(200, 500, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(7);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[7].changeOccupied();\n\t\t\t} else if (!spots[8].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[8].getMinX(), spots[8].getMaxX(), spots[8].getMinY(), spots[8].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(350, 650, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(8);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(350, 650, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(8);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[8].changeOccupied();\n\t\t\t} else if (!spots[9].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[9].getMinX(), spots[9].getMaxX(), spots[9].getMinY(), spots[9].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(500, 650, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(9);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(500, 650, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(9);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[9].changeOccupied();\n\t\t\t} else if (!spots[10].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[10].getMinX(), spots[10].getMaxX(), spots[10].getMinY(), spots[10].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(650, 650, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(10);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(650, 650, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(10);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[10].changeOccupied();\n\t\t\t} else if (!spots[11].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[11].getMinX(), spots[11].getMaxX(), spots[11].getMinY(), spots[11].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(650, 500, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(11);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(650, 500, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(11);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[11].changeOccupied();\n\t\t\t} else if (!spots[12].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[12].getMinX(), spots[12].getMaxX(), spots[12].getMinY(), spots[12].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(650, 350, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(12);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(650, 350, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(12);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[12].changeOccupied();\n\t\t\t} else if (!spots[13].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[13].getMinX(), spots[13].getMaxX(), spots[13].getMinY(), spots[13].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(500, 350, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(13);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(500, 350, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(13);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[13].changeOccupied();\n\t\t\t} else if (!spots[14].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[14].getMinX(), spots[14].getMaxX(), spots[14].getMinY(), spots[14].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(350, 350, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(14);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(350, 350, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(14);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[14].changeOccupied();\n\t\t\t} else if (!spots[15].checkOccupied() && mouseClicked && mouseInRange(xLocation, yLocation,\n\t\t\t\t\tspots[15].getMinX(), spots[15].getMaxX(), spots[15].getMinY(), spots[15].getMaxY())) {\n\t\t\t\tif (color == 1) {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(80, num1, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\t\t\tStdDraw.filledCircle(350, 500, 35);\n\t\t\t\t\tnum1 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(bluePieces<6){\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[bluePieces].changePiecePosition(15);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbluePieces++;\n\t\t\t\t} else {\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\t\t\tStdDraw.filledCircle(920, num2, 35);\n\t\t\t\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\t\t\t\tStdDraw.filledCircle(350, 500, 35);\n\t\t\t\t\tnum2 -= 100;\n\t\t\t\t\t\n\t\t\t\t\tif(redPieces+6<12){\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changeEnabled();\n\t\t\t\t\t\tSixMensMorris.pieceArray[redPieces+6].changePiecePosition(15);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tredPieces++;\n\t\t\t\t}\n\t\t\t\txLocation = 0;\n\t\t\t\tyLocation = 0;\n\t\t\t\tmouseClicked = false;\n\t\t\t\tspots[15].changeOccupied();\n\t\t\t}\n\t\t\txLocation = 0;\n\t\t\tyLocation = 0;\n\t\t\tmouseClicked = false;\n\n\t\t}\n\t\tmouseClicked3=false;\n\t\t//get rid of some shapes\n\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\tStdDraw.filledCircle(700, 980, 10);\n\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\tStdDraw.filledCircle(900, 980, 10);\n\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\tStdDraw.filledRectangle(500, 100, 105, 55);\n\t\tStdDraw.filledRectangle(700, 900, 705, 55);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\t\n\t\t//checks if the setup they gave is valid\n\t\tif(!(redPieces < 3 || bluePieces < 3)&&!(redPieces > 6 || bluePieces > 6)){\n\t\t\tboolean w=true;\n\t\t\t\n\t\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\t\tStdDraw.text(500, 130, \"Who goes first?\");\n\t\t\t\n\t\t\tStdDraw.setPenColor(StdDraw.YELLOW);\n\t\t\tStdDraw.filledRectangle(360, 70, 40, 40);\n\t\t\tStdDraw.filledRectangle(640, 70, 40, 40);\n\n\t\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\t\tStdDraw.text(360, 70, \"BLUE\");\n\t\t\tStdDraw.text(640, 70, \"RED\");\n\t\t\t\n\t\t\tif(humanChecker){\n\t\t\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\t\t\t\n\t\t\t\tFont font = new Font(\"Sans Serif\", 16, 16);\n\t\t\t\tStdDraw.setFont(font);\n\t\t\t\tif(computerColor){\n\t\t\n\t\t\t\t\tStdDraw.text(361, 45, \"Comp\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\n\t\t\t\t\tStdDraw.text(639, 45, \"Comp\");\n\t\t\t\t}\n\t\t\t\tFont font1 = new Font(\"Sans Serif\", 20, 20);\n\t\t\t\tStdDraw.setFont(font1);\n\n\t\t\t}\n\t\t\t\n\t\t\tboolean mouseClicked4=false;\n\t\t\tdouble xLocation4 = 0;\n\t\t\tdouble yLocation4 = 0;\n\t\t\t//while loop to ask who's turn it is to go first\n\t\t\twhile(w){\n\t\t\t\tmouseClicked4 = StdDraw.mousePressed();\n\t\t\t\txLocation4 = StdDraw.mouseX();\n\t\t\t\tyLocation4 = StdDraw.mouseY();\n\t\t\t\tif(mouseClicked4&&SixMensMorris.mouseInRange(xLocation4, yLocation4, 320, 400, 30, 110)){\n\t\t\t\t\tSixMensMorris.whosFirst=true;//blue's turn first\n\t\t\t\t\tw=false;\n\t\t\t\t}\n\t\t\t\telse if(mouseClicked4&&SixMensMorris.mouseInRange(xLocation4, yLocation4, 600, 680, 30, 110)){\n\t\t\t\t\tSixMensMorris.whosFirst=false;//red's turn first\n\t\t\t\t\tw=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmouseClicked4=false;\n\t\t\t\n\t\t\t//reset shapes\n\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\tStdDraw.filledRectangle(500, 130, 120, 25);\n\t\t\tStdDraw.filledRectangle(360, 70, 40, 40);\n\t\t\tStdDraw.filledRectangle(640, 70, 40, 40);\n\t\t\tStdDraw.filledCircle(80, 700, 35);\n\t\t\tStdDraw.filledCircle(80, 600, 35);\n\t\t\tStdDraw.filledCircle(80, 500, 35);\n\t\t\tStdDraw.filledCircle(80, 400, 35);\n\t\t\tStdDraw.filledCircle(80, 300, 35);\n\t\t\tStdDraw.filledCircle(80, 200, 35);\n\t\t\tStdDraw.filledCircle(920, 700, 35);\n\t\t\tStdDraw.filledCircle(920, 600, 35);\n\t\t\tStdDraw.filledCircle(920, 500, 35);\n\t\t\tStdDraw.filledCircle(920, 400, 35);\n\t\t\tStdDraw.filledCircle(920, 300, 35);\n\t\t\tStdDraw.filledCircle(920, 200, 35);\n\t\t\tint[][] mill={{0,1,2},{2,3,4},{4,5,6},{6,7,0},{8,9,10},{10,11,12},{12,13,14},{14,15,8}};\n\t\t\t//checks for mills in the setup so that when the game is played, it will already have record of a mill in a location\n\t\t\tint[] tempB=new int[3];\n\t\t\tfor(int P=0;P<mill.length;P++){\n\t\t\t\tint Row=0;\n\t\t\t\tfor(int T=0;T<3;T++){\n\t\t\t\t\tfor(int R=0;R<6;R++){\n\t\t\t\t\t\tif(SixMensMorris.pieceArray[R].getEnabled()&&SixMensMorris.pieceArray[R].getPiecePosition()==mill[P][T]){\n\t\t\t\t\t\t\ttempB[Row]=R;\n\t\t\t\t\t\t\tRow++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Row==3){//blue mill\n\t\t\t\t\tgamePlay.blueArray[0]=tempB[0];\n\t\t\t\t\tgamePlay.blueArray[1]=tempB[1];\n\t\t\t\t\tgamePlay.blueArray[2]=tempB[2];\n\t\t\t\t\tgamePlay.firstMillIndex=P;\n\t\t\t\t\tgamePlay.AA=SixMensMorris.pieceArray[gamePlay.blueArray[0]].getPiecePosition();\n\t\t\t\t\tgamePlay.BB=SixMensMorris.pieceArray[gamePlay.blueArray[1]].getPiecePosition();\n\t\t\t\t\tgamePlay.CC=SixMensMorris.pieceArray[gamePlay.blueArray[2]].getPiecePosition();\n\t\t\t\t\tgamePlay.blueCountMill=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint[] tempR=new int[3];\n\t\t\tfor(int P=0;P<mill.length;P++){\n\t\t\t\tint Row1=0;\n\t\t\t\tfor(int T=0;T<3;T++){\n\t\t\t\t\tfor(int R=6;R<12;R++){\n\t\t\t\t\t\tif(SixMensMorris.pieceArray[R].getEnabled()&&SixMensMorris.pieceArray[R].getPiecePosition()==mill[P][T]){\n\t\t\t\t\t\t\ttempR[Row1]=R;//\n\t\t\t\t\t\t\tRow1++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Row1==3){//red mill\n\t\t\t\t\tgamePlay.redArray[0]=tempR[0];\n\t\t\t\t\tgamePlay.redArray[1]=tempR[1];\n\t\t\t\t\tgamePlay.redArray[2]=tempR[2];\n\t\t\t\t\t\n\t\t\t\t\tgamePlay.secondMillIndex=P;\n\t\t\t\t\tgamePlay.A=SixMensMorris.pieceArray[gamePlay.redArray[0]].getPiecePosition();\n\t\t\t\t\tgamePlay.B=SixMensMorris.pieceArray[gamePlay.redArray[1]].getPiecePosition();\n\t\t\t\t\tgamePlay.C=SixMensMorris.pieceArray[gamePlay.redArray[2]].getPiecePosition();\n\t\t\t\t\tgamePlay.redCountMill=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(humanChecker){\n\t\t\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\t\t\t\n\t\t\t\tif(computerColor){\n\t\t\t\t\tStdDraw.text(80, 820, \"Computer\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tStdDraw.text(920, 820, \"Computer\");\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tboolean fixer=true;\n\t\t\tif(humanChecker){\n\t\t\t\tfixer=SixMensMorris.whosFirst;\n\t\t\t}\n\t\t\tG=new gamePlay();\n\t\t\tG.createGame(redPieces,bluePieces,humanChecker, fixer,computerColor,\"cont\");//calls on the game so that they can proceed\n\t\t}\n\t\telse{//errors in the setup that the user gave\n\t\t\tif (redPieces < 3 || bluePieces < 3){//not enough pieces\n\t\t\t\tStdDraw.text(500, 125, \"There must be a minimum of 3 pieces for each color!\");\n\t\t\t}\n\t\t\tif (redPieces > 6 || bluePieces > 6){//too many pieces\n\t\t\t\tStdDraw.text(500, 75, \"There cannot be more than 6 pieces of a color!\");\n\t\t\t}\n\t\t\tFont font = new Font(\"Sans Serif\",Font.BOLD,16);\n\t\t\tStdDraw.setFont(font);\n\t\t\tStdDraw.text(500, 905, \"Please Restart Game!\");\n\t\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\t\tStdDraw.filledRectangle(910, 60, 50, 40);\n\t\t}\n\t\t\n\t\t\n\t}", "private void setupComponents() {\n mPlayerProfileArea = (LinearLayout) findViewById(R.id.profile_area_player);\n mPlayerUsername = (TextView) findViewById(R.id.username_player);\n mOpponentProfileArea = (LinearLayout) findViewById(R.id.profile_area_opponent);\n mOpponentUsername = (TextView) findViewById(R.id.username_opponent);\n\n // If player plays with black pieces (also starts the game):\n if(mPlayerGamePiece == GamePiece.BLACK){\n\n // Setting black and white counters:\n mBlackCounter = (TextView) findViewById(R.id.piece_counter_player);\n mWhiteCounter = (TextView) findViewById(R.id.piece_counter_opponent);\n\n // Setting player's profile area color to green:\n mPlayerProfileArea.setBackgroundResource(R.drawable.user_area_green);\n mPlayerUsername.setBackgroundResource(R.color.colorGreenDarkAlpha);\n\n }\n\n // Otherwise:\n else{\n\n // Setting black and white counters:\n mWhiteCounter = (TextView) findViewById(R.id.piece_counter_player);\n mBlackCounter = (TextView) findViewById(R.id.piece_counter_opponent);\n\n // Setting opponents's profile area color to green:\n mOpponentProfileArea.setBackgroundResource(R.drawable.user_area_green);\n mOpponentUsername.setBackgroundResource(R.color.colorGreenDarkAlpha);\n\n }\n\n // Setting colors for counters:\n mBlackCounter.setTextColor(ContextCompat.getColor(this, R.color.colorWhite));\n mBlackCounter.setBackgroundResource(R.drawable.piece_counter_black);\n mWhiteCounter.setTextColor(ContextCompat.getColor(this, R.color.colorBlack));\n mWhiteCounter.setBackgroundResource(R.drawable.piece_counter_white);\n\n // Setting bot name tag:\n if(mDifficulty == Difficulty.BEGINNER) mOpponentUsername.setText(R.string.bot_name_beginner);\n else if (mDifficulty == Difficulty.EASY) mOpponentUsername.setText(R.string.bot_name_easy);\n else if (mDifficulty == Difficulty.MEDIUM) mOpponentUsername.setText(R.string.bot_name_medium);\n else if (mDifficulty == Difficulty.HARD) mOpponentUsername.setText(R.string.bot_name_hard);\n else if (mDifficulty == Difficulty.EXPERT) mOpponentUsername.setText(R.string.bot_name_expert);\n\n // Setting emote bubbles components:\n mPlayerEmoteBubble = (TextView) findViewById(R.id.emote_player);\n mOpponentEmoteBubble = (TextView) findViewById(R.id.emote_opponent);\n\n mEmoteButton = (Button) findViewById(R.id.emote_button);\n\n mShakeButton = (Button) findViewById(R.id.shake_button);\n\n }", "public void newGame() {\n\n //reset game board before initializing newgame\n clearGame();\n \n whiteplayer = new Player(\"white\", chessboard, this);\n blackplayer = new Player(\"black\", chessboard, this);\n colorsTurn = \"white\";\n gamelog.logCurrentTurn(colorsTurn);\n\n }", "private void setupGame() {\n \tdrawBricks();\n \tdrawPaddle();\n \tdrawBall(); \t\n \tsetInitialBallVelocity();\n }", "public void setup(){\n frameRate(60);\n \n\n //Set initial variables\n jumpSpeed = 0;\n fallSpeed = 3.5f;\n jumpCount = 0;\n score = 0;\n brickSpeed = -20;\n resetIndex = -1;\n colorVal = 0;\n colorChange = false;\n\n\n //Load the user's highscore\n String[] highScores = loadStrings(\"score.txt\");\n if (highScores != null)\n highScore = Integer.valueOf(highScores[0]);\n\n\n //Create objects\n p = new Player();\n b = new ArrayList<Brick>();\n b.add(new Brick(brickSpeed));\n playerSize = p.getSize();\n brickSize = b.get(0).getSize();\n\n gameOver = false;\n start = false;\n}", "private void gameSetup(){\n\t\tboard.boardSetup();\n\t\tdirectionArray = setUpDirectionArray();\n\t\tcurrentPlayer = SharedConstants.PlayableItem.BLACK;\n\t\tcurrentState = SharedConstants.GameStatus.PLAYING;\n\t\tgameStateModel = new GameSateModel();\n\t\tloadGame = new GameStateRetriever();\n\t\tsaveGame = new GameStateWrter(connectFourModel.getGameStateModel());\n\t}", "private void startGame(){\n try {\n String playersName = fromServer.readUTF();\n lbPl1.setText(playersName.split(POINTS_DELIMITER)[0]);\n lbPl2.setText(playersName.split(POINTS_DELIMITER)[1]);\n lbWhiteStone.setIcon(whiteIcon);\n// lbWhiteStone.setText(playersName.split(POINTS_DELIMITER)[1]);\n lbBlackStone.setIcon(blackIcon);\n// lbBlackStone.setText(playersName.split(POINTS_DELIMITER)[0]);\n\n boardComponent.initiate();\n boardComponent.repaint();\n setScoreText();\n if(this.color == 0) {\n setMsgText(\"\");\n colorLabel.setText(\"You are a viewer.\");\n setButtons(false);\n btnNewGame.setEnabled(false);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void paintGame(Graphics g){\n\t\tg.setColor(Color.RED);\n\t\tg.fillRect(0, 0, DIMENSIONS_SIZE, DIMENSIONS_SIZE);\n\t\t\n\t\t//Search through for the player/AI blocks, paint them blue/black.\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tfor(int j = 0; j<DIVISIONS; j++){\n\t\t\t\tint initialXCoord = i*DIVISION_DIMENSION;\n\t\t\t\tint initialYCoord = j*DIVISION_DIMENSION;\n\t\t\t\tif (gameArray[i][j] == USER){\n\t\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\t\tg.fillRect(initialXCoord, initialYCoord, DIVISION_DIMENSION, DIVISION_DIMENSION);\n\t\t\t\t}\n\t\t\t\tif (gameArray[i][j] == AI){\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.fillRect(initialXCoord, initialYCoord, DIVISION_DIMENSION, DIVISION_DIMENSION);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run(){\n Settings.setGameSettings(new Player(0,Color.RED,1800, \"Player 1\",true),\n new Player(1,Color.BLUE,1800, \"Player 2\",false),1800,25);\n MenuFrame menuFrame = new MenuFrame();\n }", "void defaultsetup(int phi) \n {// The Images should be loded here... Also add labels here\n System.out.println(\"IN DEFAULT SETUP..\");\n if( phi == 0) \n whiteToPlay = true;\n else if (phi == 1) \n whiteToPlay = false;\n // White Chess Pieces\n whiteHorse1.position = 1; whiteHorse1.color = 0;\n whiteHorse2.position = 6; whiteHorse2.color = 0;\n whiteQueen.position = 3; whiteQueen.color = 0;\n whiteKing.position =4 ; whiteKing.color = 0;\n whiteCastle1.position = 0; whiteCastle1.color = 0;\n whiteCastle2.position = 7; whiteCastle2.color = 0;\n whiteBishop1.position = 2; whiteBishop1.color = 0;\n whiteBishop2.position = 5; whiteBishop2.color = 0;\n int y = 8;\n for(int x = 0 ; x < 8; x++)\n {\n whitePawn[x] = new pawn();\n whitePawn[x].position = 8+x;\n whitePawn[x].color = 0;\n }\n //Black Chess Pieces\n blackHorse1.position = 57; blackHorse1.color = 1;\n blackHorse2.position = 62; blackHorse2.color = 1;\n blackQueen.position = 59; blackQueen.color = 1;\n blackKing.position = 60; blackKing.color = 1;\n blackCastle1.position = 56;blackCastle1.color = 1;\n blackCastle2.position = 63;blackCastle2.color = 1;\n blackBishop1.position = 58;blackBishop1.color = 1;\n blackBishop2.position = 61;blackBishop2.color = 1;\n y = 8;\n for(int x = 0 ; x < 8; x++)\n {\n blackPawn[x] = new pawn();\n blackPawn[x].position = 48+x;\n blackPawn[x].color = 1;\n }\n \n this.updatePositions();\n }", "public void setup() {\r\n\t\thumanCardsPanel.setHumanCards(players.get(0).getCards());\r\n\t\tfor ( Player p : players ) {\r\n\t\t\tp.setBoard(board);\r\n\t\t\tp.setGame(this);\r\n\t\t}\r\n\t\tboard.setGame(this);\r\n\t\tboard.repaint();\r\n\t\tJOptionPane popup = new JOptionPane();\r\n\t\tString message = \"You are Miss Scarlet. Press Next Player to begin.\\n Hint: Use File > Detective Notes to help you win!\";\r\n\t\tpopup.showMessageDialog(this, message, \"Welcome to Clue!\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}", "public GameLogic() {\n this.display = createScreen();\n playerShipHealth = 30;\n enemyShipHealth = 20;\n playerShield = 1;\n enemyShield = 1;\n playerMissile = 10;\n enemyMissile = 5;\n\n isPlayerPilotDamaged = false;\n isPlayerGunLDamaged = false;\n isPlayerGunMDamaged = false;\n isPlayerShieldDamaged = false;\n isPlayerEngineDamaged = false;\n\n isEnemyPilotDamaged = false;\n isEnemyGunLDamaged = false;\n isEnemyGunMDamaged = false;\n isEnemyShieldDamaged = false;\n isEnemyEngineDamaged = false;\n\n playerEvasionPercent = .3;\n enemyEvasionPercent = .3;\n\n }", "private void assign() throws IOException, ReversiException {\n this.color = fromServer.readInt();\n if(this.color == BLACK){\n opponentColor = WHITE;\n colorLabel.setText(\"YOU ARE BLACK\");\n boardComponent.setEnabled(true);\n setMsgText(\"Game start! It's your turn\");\n }else if (this.color == WHITE){\n opponentColor = BLACK;\n colorLabel.setText(\"YOU ARE WHITE\");\n setMsgText(\"Game start! Waiting for your opponents\");\n }else {\n report(\"Something wrong in the color assign\");\n }\n\n // display text\n setScoreText();\n\n // active the buttons\n setButtons(true);\n\n // after assign, keep listening to the NEWGAME command\n responseToServer();\n }", "public Game() {\n whitePlayer = new AwfulAIPlayer(Colour.WHITE, board);\n blackPlayer = new HumanPlayer(Colour.BLACK, board);\n\n sharedBoard = new CompositeBitBoard(whitePlayer.getOccupied(), blackPlayer.getOccupied());\n }", "public GameSession()\r\n {\r\n red = new Player(\"Red\");\r\n blue = new Player(\"Blue\");\r\n \r\n gameBoard = new Board();\r\n \r\n redRounds = 0;\r\n blueRounds = 0;\r\n \r\n currentRedScore = 0;\r\n currentBlueScore = 0;\r\n \r\n matchEnd = false;\r\n roundEnd = false;\r\n \r\n redWin = false;\r\n blueWin = false;\r\n \r\n move[0] = -1;\r\n move[1] = -1;\r\n \r\n line[0] = -1;\r\n line[1] = -1;\r\n }", "public static void initial()\n\t{\n\t\tscoreteam1 = 0; scoreteam2 = 0;\n\t\tdelayed = 0;\n\t\tplayers = new Player[5];\n\t\tfor (int i = 0; i < 5; i++) \n\t\t{\n\t\t\tplayers[i] = new Player();\n\t\t}\n\n\t\t// finding how many players there are (2, 3, or 4) and initializing status\n\t\tplayerNum = 0;\n\t\tfor (int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif (Selection.exist[i])\n\t\t\t{\n\t\t\t\tplayerNum++;\n\t\t\t}\n\t\t\tplayers[i].exist = Selection.exist[i]; \n\t\t\tplayers[i].ai = Selection.ai[i];\n\t\t\tplayers[i].name = Selection.name[i];\t\t \n\t\t}\n\n\n\t\tplayers[3].keyDown = KeyEvent.VK_SEMICOLON;\n\t\tplayers[3].keyLeft = KeyEvent.VK_L;\n\t\tplayers[3].keyRight = KeyEvent.VK_QUOTE;\n\t\tplayers[3].keyUp = KeyEvent.VK_P;\n\t\tplayers[2].keyDown = KeyEvent.VK_H;\n\t\tplayers[2].keyLeft = KeyEvent.VK_G;\n\t\tplayers[2].keyRight = KeyEvent.VK_J;\n\t\tplayers[2].keyUp = KeyEvent.VK_Y;\n\t\tplayers[1].keyDown = KeyEvent.VK_S;\n\t\tplayers[1].keyLeft = KeyEvent.VK_A;\n\t\tplayers[1].keyRight = KeyEvent.VK_D;\n\t\tplayers[1].keyUp = KeyEvent.VK_W;\n\t\tplayers[4].keyDown = KeyEvent.VK_DOWN;\n\t\tplayers[4].keyLeft = KeyEvent.VK_LEFT;\n\t\tplayers[4].keyRight = KeyEvent.VK_RIGHT;\n\t\tplayers[4].keyUp = KeyEvent.VK_UP;\n\t\tplayers[1].color = Color.red;\n\t\tplayers[3].color = Color.green;\n\n\t\tif (Selection.team)\n\t\t{\n\t\t\tplayers[2].color = Color.red;\n\t\t\tplayers[4].color = Color.green;\n\t\t} \n\t\telse\n\t\t{\n\t\t\tplayers[2].color = Color.blue;\n\t\t\tplayers[4].color = Color.yellow;\n\t\t}\n\n\t}", "public GameState(){\n this.gameResults = \"\";\n initVars();\n this.theme = DEFAULT_THEME;\n this.board = new Board(DEFAULT_BOARD);\n createSetOfPlayers(DEFAULT_PLAYERS, DEFAULT_AUTOPLAYER, DEFAULT_AUTOMODE);\n }", "public GameState(Theme theme, List<ImgPath.Color> plColors, boolean specialBoard){\n this.gameResults = \"\";\n initVars();\n this.theme = theme;\n this.board = new Board(specialBoard);\n createSetOfPlayers(plColors, DEFAULT_AUTOPLAYER, DEFAULT_AUTOMODE);\n }", "private void Management_Player(){\n\t\t\n\t\t// render the Player\n\t\tswitch(ThisGameRound){\n\t\tcase EndRound:\n\t\t\treturn;\t\t\t\n\t\tcase GameOver:\n\t\t\t// do nothing\n\t\t\tbreak;\n\t\tcase Running:\n\t\t\tif (PauseGame==false){\n\t\t\t\tplayerUser.PlayerMovement();\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse if (PauseGame==true){\n\t\t\t\t// do not update gravity\n\t\t\t}\n\t\t\tbreak;\t\t\n\t\t}\n\t\n\t\tbatch.draw(playerUser.getframe(PauseGame), playerUser.getPosition().x , playerUser.getPosition().y,\n\t \t\tplayerUser.getBounds().width, playerUser.getBounds().height);\n\t\t\n\t\t\n\t\t\n\t\tswitch (playerUser.EquipedToolCycle)\n\t\t{\t\n\t\tcase 0:\n\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\tbreak;\n\t\t\t\n\t\tcase 1: \n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// tool is grabbed\n\t\t\testimatedTimeEffect = System.currentTimeMillis() - startTimeTool;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tplayerUser.pe_grab.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n \t\t\n\t\t\t\tplayerUser.pe_grab.update(Gdx.graphics.getDeltaTime());\n\t\t\t\tplayerUser.pe_grab.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (estimatedTimeEffect >= Conf.SYSTIME_MS){\n\t\t\t\testimatedTimeEffect = 0;\n\t\t\t\tplayerUser.ToolEquiped();\n\t\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\t\tplayerUser.EquipedToolCycle++;\n\t\t\t}else{\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\t\t\n\t\tcase 2:\n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\testimatedTimeEffect = (System.currentTimeMillis() - startTimeTool) / 1000;\t\t\t\t\n\t\t\tplayerUser.pe_equip.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n\t\t\tplayerUser.pe_equip.update(Gdx.graphics.getDeltaTime());\n\t\t\tplayerUser.pe_equip.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_LIMIT){\n\t\t\t\tplayerUser.EquipedToolCycle=0;\t\t\n\t\t\t\tplayerUser.color = Color.NONE;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_MUSIC_LIMIT){\n\t\t\t\tPhoneDevice.Settings.setMusicValue(true);\n\t\t\t}\n\t\t}\t\t\t\t\n\t}", "public void initGame() {\n // clear the board contents\n board.init();\n // CROSS speelt eerst\n currentPlayer = Mark.CROSS;\n currentState = GameState.PLAYING;\n // ready for start\n }", "private void setUp() {\n players.forEach(player -> player.draw(GameConstants.STARTING_HAND_SIZE.value()));\n }", "private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\n }", "public void start() {\n clear();\n // Assigning chess pieces to players.\n whitePieces.add(new Piece(Owner.WHITE, Who.KING, Rank.R1, File.E));\n whitePieces.add(new Piece(Owner.WHITE, Who.QUEEN, Rank.R1, File.D));\n whitePieces.add(new Piece(Owner.WHITE, Who.ROOK, Rank.R1, File.A));\n whitePieces.add(new Piece(Owner.WHITE, Who.ROOK, Rank.R1, File.H));\n whitePieces.add(new Piece(Owner.WHITE, Who.BISHOP, Rank.R1, File.C));\n whitePieces.add(new Piece(Owner.WHITE, Who.BISHOP, Rank.R1, File.F));\n whitePieces.add(new Piece(Owner.WHITE, Who.KNIGHT, Rank.R1, File.B));\n whitePieces.add(new Piece(Owner.WHITE, Who.KNIGHT, Rank.R1, File.G));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.A));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.B));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.C));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.D));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.E));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.F));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.G));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.H));\n\n for (Piece p : whitePieces) {\n board[p.row.ordinal()][p.col.ordinal()] = p;\n }\n\n blackPieces.add(new Piece(Owner.BLACK, Who.KING, Rank.R8, File.E));\n blackPieces.add(new Piece(Owner.BLACK, Who.QUEEN, Rank.R8, File.D));\n blackPieces.add(new Piece(Owner.BLACK, Who.ROOK, Rank.R8, File.A));\n blackPieces.add(new Piece(Owner.BLACK, Who.ROOK, Rank.R8, File.H));\n blackPieces.add(new Piece(Owner.BLACK, Who.BISHOP, Rank.R8, File.C));\n blackPieces.add(new Piece(Owner.BLACK, Who.BISHOP, Rank.R8, File.F));\n blackPieces.add(new Piece(Owner.BLACK, Who.KNIGHT, Rank.R8, File.B));\n blackPieces.add(new Piece(Owner.BLACK, Who.KNIGHT, Rank.R8, File.G));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.A));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.B));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.C));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.D));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.E));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.F));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.G));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.H));\n\n for (Piece p : blackPieces) {\n board[p.row.ordinal()][p.col.ordinal()] = p;\n }\n\n whoseTurn = Owner.WHITE;\n canCastle = 15;\n passer = null;\n movesDone = lastEatMove = 0;\n }", "private final void setupNewGame() throws IOException {\n\t\tmessage.setText(\"Make your move!\");\n\n\t\twhiteTeam = PokemonDao.getRandomPokemons(TEAM_SIZE);\n\t\tblackTeam = PokemonDao.getRandomPokemons(TEAM_SIZE);\n\n\t\tcreateImages();\n\n\t\tint middleSquare = BOARD_SIZE/2;\n\n\t\tint i=0;\n\t\tfor(int col = middleSquare - whiteTeam.size()/2; col< middleSquare+ whiteTeam.size()/2;col++){\n\t\t\tJButton jButton = chessBoardSquares[col][0];\n\t\t\tImageIcon icon = new ImageIcon(whiteImages.get(i++));\n\t\t\tjButton.setIcon(icon);\n\t\t}\n\n\t\tint j=0;\n\t\tfor(int col = middleSquare - whiteTeam.size()/2; col< middleSquare+ whiteTeam.size()/2;col++){\n\t\t\tJButton jButton = chessBoardSquares[col][BOARD_SIZE-1];\n\t\t\tImageIcon icon = new ImageIcon(blackImages.get(j++));\n\t\t\tjButton.setIcon(icon);\n\t\t}\n\n\t\tframe.pack();\n\t\t//\t\tfor (int ii = 0; ii < BOARD_SIZE; ii++) {\n\t\t//\t\t\tfor (int jj = 0; jj < BOARD_SIZE; jj++) {\n\t\t//\t\t\t\tchessBoardSquares[ii][jj].setIcon(new ImageIcon(whiteImages.get(0)));\n\t\t//\t\t\t}\n\t\t//\t\t}\n\t\t//\t\t// set up the black pieces\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][0].setIcon(new ImageIcon(chessPieceImages[BLACK][STARTING_ROW[ii]]));\n\t\t//\t\t}\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][1].setIcon(new ImageIcon(chessPieceImages[BLACK][PAWN]));\n\t\t//\t\t}\n\t\t//\t\t// set up the white pieces\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][6].setIcon(new ImageIcon(chessPieceImages[WHITE][PAWN]));\n\t\t//\t\t}\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][7].setIcon(new ImageIcon(chessPieceImages[WHITE][STARTING_ROW[ii]]));\n\t\t//\t\t}\n\t}", "public SinglePlayerGameController() {\n player1 = new Player(\"Player 1\");\n computer = new Player(\"Computer\");\n game = new Game(new Dice(), player1, computer);\n player1.setColor(\"blue\");\n computer.setColor(\"red\");\n diceImage = new DiceImage();\n }", "private void colorSetup(){\n Color color2 = Color.GRAY;\n Color color = Color.LIGHT_GRAY;\n this.setBackground(color);\n this.mainPanel.setBackground(color);\n this.leftPanel.setBackground(color);\n this.rightPanel.setBackground(color);\n this.rightCenPanel.setBackground(color);\n this.rightLowPanel.setBackground(color);\n this.rightTopPanel.setBackground(color);\n this.inputPanel.setBackground(color);\n this.controlPanel.setBackground(color);\n this.setupPanel.setBackground(color);\n this.cameraPanel.setBackground(color);\n this.jPanel4.setBackground(color);\n this.sensSlider.setBackground(color); \n }", "void initializeGame() {\n // Initialize players\n // Put the pieces on the board\n }", "public void setUpGame() {\n\t\tGameID = sql.getTheCurrentGameID() + 1;\r\n\t\tSystem.err.println(GameID);\r\n\t\ttheModel.shuffleDeck();\r\n\t\ttheModel.createPlayers();\r\n\t\ttheModel.displayTopCard();\r\n\t\t// theModel.chooseFirstActivePlayer();\r\n\t}", "public void newGame() {\n \tturn = PieceColor.White;\n \t\n \t//the middle are empty squares\n \tfor(int i = 2; i < 6; i++) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tsetPiece(j, i, new NoPiece(j, i));\n \t\t}\n \t}\n \t\n \t//pawns\n \tfor(int i = 0; i < 8; i++) {\n \t\t//make these pawns\n \t\tsetPiece(i, 1, new Pawn(i, 1, PieceColor.White, this));\n \t\tsetPiece(i, 6, new Pawn(i, 6, PieceColor.Black, this));\n \t}\n \t\n \t//white back row\n \tsetPiece(0, 0, new Rook(0, 0, PieceColor.White, this));\n \tsetPiece(1, 0, new Knight(1, 0, PieceColor.White, this));\n \tsetPiece(2, 0, new Bishop(2, 0, PieceColor.White, this));\n \tsetPiece(3, 0, new Queen(3, 0, PieceColor.White, this));\n \tsetPiece(4, 0, new King(4, 0, PieceColor.White, this));\n \tsetPiece(5, 0, new Bishop(5, 0, PieceColor.White, this));\n \tsetPiece(6, 0, new Knight(6, 0, PieceColor.White, this));\n \tsetPiece(7, 0, new Rook(7, 0, PieceColor.White, this));\n \t\n \t//black back row\n \tsetPiece(0, 7, new Rook(0, 7, PieceColor.Black, this));\n \tsetPiece(1, 7, new Knight(1, 7, PieceColor.Black, this));\n \tsetPiece(2, 7, new Bishop(2, 7, PieceColor.Black, this));\n \tsetPiece(3, 7, new Queen(3, 7, PieceColor.Black, this));\n \tsetPiece(4, 7, new King(4, 7, PieceColor.Black, this));\n \tsetPiece(5, 7, new Bishop(5, 7, PieceColor.Black, this));\n \tsetPiece(6, 7, new Knight(6, 7, PieceColor.Black, this));\n \tsetPiece(7, 7, new Rook(7, 7, PieceColor.Black, this));\n \t\n \t//store locations of king so they can be checked\n \twKing = new Square(4, 0);\n \tbKing = new Square(4, 7);\n }", "public void restart()\n {\n //resets values \n x = 0; // stores current row of black piece when moving right or right + down\n x3 = 7; // stores current row of black piece when moving right + down\n y = 0; // stores current column of black piece\n x2 = 0; // stores current row of white piece when moving left or left + down\n x4 = 7; // stores current row of white piece when moving left + down\n y2 = 7; // stores current column of black piece\n gameSet = false; // decides if a player has won the game or not\n whiteCount = 0; // counts how many white pieces were taken\n blackCount = 0; // counts how many black pieces were taken\n \n \n //determines which players start first\n turn = Math.random() < 0.5; \n \n //if turn == 0/false \n if(turn == false)\n {\n player.setText(\"<html><strong><font color='red'>Player 1 starts first!</font></strong></html>\");\n }\n \n //if turn == 1/true\n if(turn == true)\n {\n player.setText(\"<html><strong><font color='blue'>Player 2 starts first!</font></strong></html>\");\n }\n \n \n \n //sets icons for the left 16 buttons to the icon black\n for( int rows = 0; rows< gridUnits.length; rows++)\n {\n \n for(int cols = 0;cols <2; cols++)\n {\n gridUnits[rows][cols].setIcon(black);\n }\n }\n \n \n //sets icons for the right 16 buttons to the icon white\n for(int rows = 0; rows< gridUnits.length; rows++)\n {\n \n for(int cols = 6;cols <8; cols++)\n {\n gridUnits[rows][cols].setIcon(white);\n \n }\n \n }\n \n //sets icons for the middle 32 buttons to the icon blank\n for(int rows = 0; rows< gridUnits.length; rows++)\n {\n \n for(int cols = 2;cols <6; cols++)\n {\n gridUnits[rows][cols].setIcon(blank);\n \n }\n \n } \n \n //adds actionListeners to all of the 64 buttons\n for (int rows = 0; rows < gridUnits.length; rows++)\n {\n \n for(int cols = 0; cols < gridUnits.length; cols++)\n {\n gridUnits[rows][cols].addActionListener(this);\n \n }\n \n }\n \n }", "private void assignColors() {\n soundQuickStatus.setBackground(drawables[noise]);\n comfortQuickStatus.setBackground(drawables[comfort]);\n lightQuickStatus.setBackground(drawables[light]);\n convenienceQuickStatus.setBackground(drawables[convenience]);\n }", "private void setupPlayers() {\n\t\tuserData=(UserData) Main.currentStage.getUserData();\n\t\tnumberPlayers=userData.getNumberPlayers();\n\t\tplayerNames=userData.getPlayerNames();\n\t\tcurrentPlayer=userData.getFirstPlayer();\n\t\tlb_currentplayername.setText(playerNames[currentPlayer]);\n\t\tplayers =new Player[4];\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tif(i<numberPlayers) {\n\t\t\t\tplayers[i]=new Player(playerNames[i], false, i) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void rollDices() {\n\t\t\t\t\t\trotatedDice1();\n\t\t\t\t\t\trotatedDice2();\n\t\t\t\t\t\t//waiting for player choose what way to go then handler that choice\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\telse {\n\t\t\t\tplayers[i]=new Player(playerNames[i], true, i) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void rollDices() {\n\t\t\t\t\t\trotatedDice1();\n\t\t\t\t\t\trotatedDice2();\n\t\t\t\t\t\t//randomchoice and next player rolldice\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\tswitch (i) {\n\t\t\t\tcase 0:{\n\t\t\t\t\tplayers[i].setHorseColor(yh0, yh1, yh2, yh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 1:{\n\t\t\t\t\tplayers[i].setHorseColor(bh0, bh1, bh2, bh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 2:{\n\t\t\t\t\tplayers[i].setHorseColor(rh0, rh1, rh2, rh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 3:{\n\t\t\t\t\tplayers[i].setHorseColor(gh0, gh1, gh2, gh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void setUpGame() {\n\t\tsetUpBlocks();\n\t\tsetUpBall();\n\t\tsetUpPaddle();\n\t\taddMouseListeners();\n\t}", "public void startMenu() {\n textAlign(CENTER);\n textFont(f);\n background(20, 20, 20);\n PImage img = loadImage (\"TRON.png\");\n image (img, 10, 100, width-20, 180);\n //text(\"TRON\", width/2, height/2);\n fill(color(109, 236, 255));\n textSize(34);\n text(\"Press [2-4] to Select a Game Size\", width/2, height/2 + 50);\n\n int playerSize = -1;\n\n // Below code is from: https://stackoverflow.com/questions/628761/convert-a-character-digit-to-the-corresponding-integer-in-c\n if (keyPressed) {\n playerSize = key - '0';\n\n if (playerSize >= 2 && playerSize <= 4) {\n // Later on player 1 and player 2 will be taken from text box input (same for color)\n this.players = new ArrayList();\n ArrayList<String> controls = new ArrayList();\n controls.add(\"wasd\"); // player 1\n controls.add(\"arrows\"); // player 2\n controls.add(\"ijkl\"); // player 3\n controls.add(\"gvbn\"); // player 4\n\n for (int i=0; i<playerSize; i++) {\n String controlString = controls.get(i);\n char[] controlArray = new char[4];\n if (controlString.equals(\"arrows\")) {\n controlArray[0] = UP;\n controlArray[1] = LEFT;\n controlArray[2] = DOWN;\n controlArray[3] = RIGHT;\n } else {\n for (int j=0; j<4; j++) { // Add each direction to the array using charAt\n controlArray[j] = controlString.charAt(j);\n }\n }\n this.players.add(new Player(controlArray[0], controlArray[1], controlArray[2], controlArray[3]).setControlKeys(controlString)); // One player mode breaks game\n }\n\n this.state = GameState.CREATE_PLAYER;\n }\n }\n}", "protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }", "private void setup()\r\n {\r\n \r\n char[][] examplemap = {\r\n { 'e','w','e','e','e','e','e','e','e','e' },\r\n { 'e','w','e','w','w','w','w','e','w','w' },\r\n { 'e','w','e','w','e','w','w','e','w','e' },\r\n { 'e','e','e','w','e','w','e','e','w','e' },\r\n { 'e','w','e','e','e','w','e','e','w','e' },\r\n { 'e','w','w','w','e','w','e','w','w','e' },\r\n { 'e','e','e','e','e','e','e','w','e','e' },\r\n { 'e','w','w','e','w','e','w','w','w','e' },\r\n { 'e','e','w','e','e','w','w','e','e','e' },\r\n { 'e','e','w','e','e','e','e','e','e','w' }};\r\n for (int i=0; i<map.length; i++)\r\n {\r\n for (int n=0; n<map[i].length; n++)\r\n {\r\n if (examplemap[n][i] == 'e')\r\n map[i][n].setBackground(Color.white);\r\n else\r\n map[i][n].setBackground(Color.black);\r\n }\r\n }\r\n \r\n map[0][0].setBackground(Color.red);\r\n this.Playerpos[0]=0;\r\n this.Playerpos[1]=0;\r\n \r\n \r\n map[9][8].setBackground(Color.blue);\r\n this.Goalpos[0]=9;\r\n this.Goalpos[1]=8;\r\n \r\n \r\n \r\n \r\n }", "public void displayGameMode (Graphics g1)\n {\n if (state == 1)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/1/2player2.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/1/1player2.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/1/plain2.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 2)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/2/2player2.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/2/1player2.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/2/plain2.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 3)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/3/2player.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/3/1player.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/3/plain.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 4)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/4/2player.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/4/1player.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/4/plain.png\").getImage(), 0, 0, null);\n }\n \n bird1.displayDisplayCharacter (g1);\n bird2.displayDisplayCharacter (g1);\n bird3.displayDisplayCharacter (g1);\n }", "private void initColours() {\n colourArray = Utilities.get2dResourceArray(getContext(), \"colour\");\n\n // A means to save colour configuration when screen is rotated between games.\n if (colourSet == null) {\n // Set new colour pairing.\n colourSet = new ColourSet();\n }\n\n // Set View colours\n mGameLoop.setColour(colourSet.primarySet);\n setToolbarColour(colourSet.primaryColourDark);\n mAltBackground.setBackgroundColor(colourSet.primaryColour);\n mTempToolbar.setBackgroundColor(colourSet.primaryColourDark);\n mFab.setBackgroundTintList(ColorStateList.valueOf(colourSet.secondaryColour));\n mWorldScore.setBackgroundColor(colourSet.getPrimaryColour(COLOUR_LOCATION_SCORE));\n }", "private void startNewGame(){\n if (selectedPiece!=null)\n selectedPiece.setBackground(getDefaultColor(selectedPiece));\n selectedPiece = null;\n setAllToDefaultColor();\n setDefulatMessage();\n board = new ChessBoard(1, false);\n for(int row = 0 ; row < ROWS; row++){\n for(int col = 0; col < COLS ; col++){\n setButtonIcon(row,col);\n }\n }\n }", "private void green(){\n\t\tthis.arretes_fG();\n\t\tthis.coins_fG();\n\t\tthis.coins_a1G();\n\t\tthis.coins_a2G();\n\t\tthis.aretes_aG();\n\t\tthis.cube[31] = \"G\";\n\t}", "public void init() {\n\t\tGRect background = new GRect(APPLICATION_WIDTH, APPLICATION_HEIGHT);\n\t\tbackground.setFilled(true);\n\t\tbackground.setFillColor(Color.LIGHT_GRAY);\n\t\tadd(background);\n\t\t\n\t\ttopText = new GLabel(\"Welcome to the slot machine!\");\n\t\tmidText = new GLabel(\"You now have $50.\");\n\t\tbotText = new GLabel(\"Click to play\");\n\t\ttopText.setFont(\"Serif-24\");\n\t\tmidText.setFont(\"Serif-24\");\n\t\tbotText.setFont(\"Serif-24\");\n\t\tadd(topText, 100, 250);\n\t\tadd(midText, 100, 280);\n\t\tadd(botText, 100, 310);\n\t\t\n\t\tslotBox1 = new GImage(\"empty.png\");;\n\t\tslotBox2 = new GImage(\"empty.png\");\n\t\tslotBox3 = new GImage(\"empty.png\");\n\t\tadd(slotBox1, 100, 100);\n\t\tadd(slotBox2, 250, 100);\n\t\tadd(slotBox3, 400, 100);\n\t\t\n\t\t\n\t\t\n\t\twhile (!gameOver()) {\n\t\t\twaitForClick();\n\t\t\tremoveAll();\n\t\t\tadd(background);\n\t\t\tplayGame();\n\t\t}\n\t}", "public static void main(String[] args) {\n setUpGamePlayer();\r\n \r\n //display of game board for computer\r\n setUpGameComp();\r\n System.out.println();\r\n \r\n System.out.println();\r\n System.out.println();\r\n \r\n //starting game\r\n // code incomplete to play game\r\n //playGame();\r\n }", "public static void newGame(){\n\t\tsetUp.buildBoard(8,8);\n\t\tfor(int i = 0; i < boardBoundsRow * boardBoundsColumn; i++){\n\t\t\tJPanel selectedTile = (JPanel) userInterface.boardButtons.getComponent(i);\n\t\t\tselectedTile.removeAll();\n\t\t\tselectedTile.revalidate();\n\t\t}\n\t\tuserInterface.addBlackPiece();\n\t\tuserInterface.addWhitePiece();\n\t\tuserInterface.check.setText(\"You are not in check\");\n\t\tking.blackKingCheck = false;\n\t\tking.whiteKingCheck = false;\n\t\tturn = \"white\";\n\t\tString playerTurn = \"Player turn: \";\n\t\tuserInterface.turn.setText(playerTurn.concat(turn));\n\t\tundoMoveClass.clearStacks();\n\t}", "private void initialGame() {\n Display display = this.getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n GameUtils.mWidth = size.x;\n GameUtils.mHeight = size.y;\n GameUtils.frameWidth = (int)(GameUtils.mWidth / 2.5);\n GameUtils.frameHeight = GameUtils.frameWidth;\n GameUtils.dx = GameUtils.mWidth / 120;\n GameUtils.maxVelX = GameUtils.mHeight / 15;\n GameUtils.maxVelY = GameUtils.mHeight / 8;\n\n // Bitmap\n GameUtils.bitmapPika = BitmapFactory.decodeResource(getResources(),\n R.drawable.pika_sprite_8_384);\n GameUtils.bitmapPika = Bitmap.createScaledBitmap(GameUtils.bitmapPika,\n GameUtils.frameWidth * GameUtils.frameCount, GameUtils.frameHeight, false);\n GameUtils.apple = BitmapFactory.decodeResource(getResources(), R.drawable.apple);\n GameUtils.banana = BitmapFactory.decodeResource(getResources(), R.drawable.banana);\n GameUtils.coke = BitmapFactory.decodeResource(getResources(), R.drawable.coke);\n\n GameUtils.bitmapRestart = BitmapFactory.decodeResource(getResources(), R.drawable.restart);\n GameUtils.bitmapRestart = Bitmap.createScaledBitmap(GameUtils.bitmapRestart,\n GameUtils.mWidth / 12, GameUtils.mWidth / 12, false);\n GameUtils.bitmapPause = BitmapFactory.decodeResource(getResources(), R.drawable.pause);\n GameUtils.bitmapPause = Bitmap.createScaledBitmap(GameUtils.bitmapPause,\n GameUtils.mWidth / 15, GameUtils.mWidth / 15, false);\n\n // Game Data\n GameUtils.WIN = true;\n GameUtils.score = 0;\n GameUtils.apples = 0;\n GameUtils.bananas = 0;\n GameUtils.cokes = 0;\n GameUtils.jumps = 0;\n GameUtils.totalSec = GameUtils.totalTime;\n GameUtils.visibleFruit = 0;\n }", "public void initGame() {\n board.init(); // clear the board contents\n currentPlayer = Seed.CROSS; // CROSS plays first\n currentState = GameState.PLAYING; // ready to play\n }", "public void setUpTheGame() throws UserCancelsException{\n played = true;\n ui.printToUser(\"Close the game at any time by inputting letters instead of numbers.\");\n currentOcean = new OceanImpl();\n currentOcean.placeAllShipsRandomly();\n \n currentScore = 0;\n playTheGame();\n if(currentScore<highestScore\n ||highestScore == 0){\n highestScore = currentScore;\n ui.printToUser(\"New High Score! : \" + highestScore);\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tif (colors.getSelectedIndex() == 1) {\n\t\t\t\t\tthisgame.setAppColor(BLUE);\n\t\t\t\t\t//settingsmenu.dispose();\n\t\t\t\t\tdrawSettingsScreen(thisgame);\n\t\t\t\t\tsettingsmenu.dispose();\n\t\t\t\t}\n\t\t\t\t//Settings Background Color to Red\n\t\t\t\telse if (colors.getSelectedIndex() == 2) {\n\t\t\t\t\tthisgame.setAppColor(RED);\n\t\t\t\t\t//settingsmenu.dispose();\n\t\t\t\t\tdrawSettingsScreen(thisgame);\n\t\t\t\t\tsettingsmenu.dispose();\n\t\t\t\t}\n\t\t\t\t//Setting Background Color to Yellow\n\t\t\t\telse if (colors.getSelectedIndex() == 3) {\n\t\t\t\t\tthisgame.setAppColor(YELLOW);\n\t\t\t\t\t//settingsmenu.dispose();\n\t\t\t\t\tdrawSettingsScreen(thisgame);\n\t\t\t\t\tsettingsmenu.dispose();\n\t\t\t\t}\n\t\t\t\t//Settings Background Color to Green\n\t\t\t\telse if (colors.getSelectedIndex() == 4){\n\t\t\t\t\tthisgame.setAppColor(GREEN);\t\n\t\t\t\t\t//settingsmenu.dispose();\n\t\t\t\t\tdrawSettingsScreen(thisgame);\n\t\t\t\t\tsettingsmenu.dispose();\n\t\t\t\t}\n\t\t\t\t//Settings Background Color to Purple\n\t\t\t\telse if (colors.getSelectedIndex() == 5) {\n\t\t\t\t\tthisgame.setAppColor(PURPLE);\t\n\t\t\t\t\t//settingsmenu.dispose();\n\t\t\t\t\tdrawSettingsScreen(thisgame);\n\t\t\t\t\tsettingsmenu.dispose();\n\t\t\t\t}\n\t\t\t\t//Setting Background Color to Gray\n\t\t\t\telse if (colors.getSelectedIndex() == 6) {\n\t\t\t\t\tthisgame.setAppColor(GRAY);\n\t\t\t\t\t//settingsmenu.dispose();\n\t\t\t\t\tdrawSettingsScreen(thisgame);\n\t\t\t\t\tsettingsmenu.dispose();\n\t\t\t\t}\n\t\t\t}", "SettingsScreenClass(){\r\n cursorRow=0;\r\n counter=0;\r\n endPart=false;\r\n initSprites();\r\n setImage(512,500);\r\n fadeAmount=12;\r\n for(int i=0;i<12;i++){\r\n fadeColors[i]=new Color(0,0,0,(i)*20);\r\n }\r\n }", "@Override\n\tpublic void settings(int numPegs, List<Colour> colors, int turns){\n\n\t\tString colorNames = \"\";\n\t\tfor(Colour color : colors){\n\t\t\tcolorNames += color.getName()+\", \";\n\t\t}\n\t\tcolorNames=colorNames.substring(0,colorNames.length()-2);\n\t\n\tthis.greeting = \"Welcome to Mastermind. \\nThis is a text version of the classic board game Mastermind. Here are some Rules:\\n\"\n\t\t\t+ \"- The computer will think of a secret code. \\n- The code consists of \" + numPegs + \" colored pegs. \"\n\t\t\t\t\t+ \"\\n- The pegs may be one of six colors: \" + colorNames.toString() + \".\"\n\t\t\t\t\t+ \"\\n- A color may appear more than once in the code.\"\n\t\t\t\t\t+ \"\\n- You try to guess what colored pegs are in the code and what order they are in.\"\n\t\t\t\t\t+ \"\\n- After making a guess the result will be displayed.\\n\"\n\t\t\t\t\t+ \"- A result consists of a black peg for each peg you have exactly correct (color and position) in your guess.\"\n\t\t\t\t\t+ \"\\n- For each peg in the guess that is the correct color, but is out of position, you get a white peg.\"\n\t\t\t\t\t+ \"\\n- Only the first letter of the color is displayed. B for Blue, R for Red, and so forth.\"\n\t\t\t\t\t+ \"\\n- When entering guesses you only need to enter the first character of the color as a capital letter.\"\n\t\t\t\t\t+ \"\\n\"\n\t\t\t\t\t+ \"\\nYou have \" + turns + \" turns to guess the answer or you lose the game. Good Luck!\";\n\t}", "public static void main(String[] args) {\n\t\tBoard gameBoard = new Board();\n\t\tDisplay screen = new TextDisplay();\n\n\t\t// give each player some pieces\n\t\tPieces blackPieces = new Pieces(gameBoard, PieceCode.BLACK);\n\t\tPieces whitePieces = new Pieces(gameBoard, PieceCode.WHITE);\n\n\t\t// Player blackPlayer = new HumanPlayer(\"Black\", blackPieces, gameBoard, null);\n\t\t// Player blackPlayer = new RandomPlayer(\"Black\", blackPieces, gameBoard, null);\n\t\tPlayer blackPlayer = new AggressivePlayer(\"Black\", blackPieces, gameBoard, null);\n\n\t\tPlayer whitePlayer = new HumanPlayer(\"White\", whitePieces, gameBoard, null);\n\t\t// Player whitePlayer = new RandomPlayer(\"White\", whitePieces, gameBoard,null);\n\t\t// Player whitePlayer = new AggressivePlayer(\"White\", whitePieces,\n\t\t// gameBoard,null);\n\n\t\tblackPlayer.setOpponent(whitePlayer);\n\t\twhitePlayer.setOpponent(blackPlayer);\n\n\t\tPlayer activePlayer = whitePlayer;\n\t\t// while both kings are alive\n\t\twhile (blackPlayer.getPieces().getPiece(blackPlayer.getPieces().getNumPieces() - 1).getValue() == PieceCode.KING\n\t\t\t\t&& whitePlayer.getPieces().getPiece(whitePlayer.getPieces().getNumPieces() - 1)\n\t\t\t\t\t\t.getValue() == PieceCode.KING) {\n\n\t\t\tscreen.displayBoard(activePlayer.getPieces());\n\t\t\tBoolean madeMove = false;\n\n\t\t\twhile (!madeMove) {\n\t\t\t\tmadeMove = activePlayer.makeMove();\n\t\t\t}\n\n\t\t\tactivePlayer = activePlayer.getOpponent();\n\t\t}\n\t\t// Display the end board\n\t\tscreen.displayBoard(activePlayer.getPieces());\n\n\t\t// Find out who's king died\n\t\tPlayer winner = null;\n\t\tif (blackPlayer.getPieces().getPiece(blackPlayer.getPieces().getNumPieces() - 1).getValue() == PieceCode.KING) {\n\t\t\twinner = blackPlayer;\n\t\t} else {\n\t\t\twinner = whitePlayer;\n\t\t}\n\t\t// and crown them champion\n\t\tSystem.out.println(winner + \" Wins!\");\n\t}", "public void gameLoop() {\r\n // make the whites of the eyes move from side to side\r\n if (whiteRight == 210){\r\n whiteRight += 20;\r\n }\r\n else if (whiteRight == 230){\r\n whiteRight -= 30;\r\n }\r\n else if (whiteRight == 200){\r\n whiteRight += 10;\r\n }\r\n if (whiteLeft == 350){\r\n whiteLeft += 20;\r\n }\r\n else if (whiteLeft == 370){\r\n whiteLeft -= 30;\r\n }\r\n else if (whiteLeft == 340){\r\n whiteLeft += 10;\r\n }\r\n // make the eyebrows move up and down\r\n if (eyebrowMove == 150){\r\n eyebrowMove -= 100;\r\n }\r\n else if (eyebrowMove == 50){\r\n eyebrowMove += 100;\r\n }\r\n // make the mustache move up and down\r\n if (mustache == 590){\r\n mustache +=20;\r\n }\r\n else if (mustache == 610){\r\n mustache -=40;\r\n }\r\n else if (mustache == 570){\r\n mustache +=20;\r\n }\r\n // make the tongue move up and down\r\n if (tongue == 700){\r\n tongue += 15;\r\n }\r\n else if (tongue == 715){\r\n tongue -= 15;\r\n }\r\n }", "public GameState(Theme theme, List<ImgPath.Color> plColors, List<Boolean> auto, List<AutoplayMode> autoMode, boolean specialBoard){\n initVars();\n this.theme = theme;\n this.board = new Board(specialBoard);\n createSetOfPlayers(plColors, auto, autoMode);\n }", "@Override\r\n\tpublic void render(GameContainer gc, StateBasedGame sbgame, Graphics g)\r\n\t\t\tthrows SlickException {\r\n\t\tbackground.draw(0, 0);\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(45, 65, 645, 500);\r\n\t\tg.setColor(Color.white);\r\n\t\tg.drawString(\"War Vessels Instructions\", 55, 70);\r\n\t\tg.drawString(\"On the main menu select 'New Game' to start a new game of War Vessels.\", 55, 100);\r\n\t\tg.drawString(\"From this screen you, the player, must strategically place your ships\", 55, 125);\r\n\t\tg.drawString(\"in order to elude your enemies attacks.\", 55, 140);\r\n\t\tg.drawString(\"Once all of your ships have been placed from here you must make a\", 55, 170);\r\n\t\tg.drawString(\"decision. Should you play against a regular opponent or take on the\", 55, 185);\r\n\t\tg.drawString(\"challenge of a smarter one? You make this decision by selecting\", 55, 200);\r\n\t\tg.drawString(\"the start button for either opponent.\", 55, 215);\r\n\t\tg.drawString(\"At this point the game enters the battle phase and you may make\", 55, 245);\r\n\t\tg.drawString(\"your first move by slecting a space to attack on the radar screen,\", 55, 260);\r\n\t\tg.drawString(\"the grid on the right. The game will respond with a hit or a miss\", 55, 275);\r\n\t\tg.drawString(\"for each space and your opponent will then take a shot at your ships.\", 55, 290);\r\n\t\tg.drawString(\"As the game progresses ships will be hit, once the ship is sunk\", 55, 320);\r\n\t\tg.drawString(\"it will be marked in the tray with a large red X\", 55, 335);\r\n\t\tg.drawString(\"The game continues until either you or your opponent has\", 55, 350);\r\n\t\tg.drawString(\"destroyed all of the opposing ships.\", 55, 365);\r\n\t\tg.drawString(\"Once the game is over the opposing player's grid will be shown\", 55, 395);\r\n\t\tg.drawString(\"and statistics will be displayed. You may then go back to the\", 55, 410);\r\n\t\tg.drawString(\"main menu and play another game.\", 55, 425);\r\n\t\tmainMenuButton.draw(MENUX, MENUY);\r\n\t\t\r\n\t}", "public void prepareGame() {\n setInitialPosition();\n\n //Check NickName\n boolean nickNameEstablished = checkNickName();\n if (!nickNameEstablished) {\n Intent intent = new Intent(this, NickNameActivity.class);\n startActivityForResult(intent, NICKNAME_ACTIVITY_REQUEST_CODE);\n } else {\n setDynamicBackground();\n }\n }", "public void newGame(int c)\r\n\t{\r\n\t\tcolour = c;\r\n\t\tpw.println(\"2 \" + c);\r\n\t\tpw.flush();\r\n\t}", "public void WildIsPlayedAskUserForColor() {\n\t\tJFrame window = new JFrame(\"Wild Card Was Played\");\n\t\twindow.setSize(600, 125);\n\t\twindow.setLayout(new FlowLayout());\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\twindow.setLocationRelativeTo(null);\n\t\t\n\t\t// Creating Color name field\n\t\tJLabel colorMessageLabel = new JLabel(\"Choose New Game Color:\");\n\t\t\n\t\t// Creating color buttons\n\t\tJButton redButton = new JButton(\"Red\");\n\t\tJButton greenButton = new JButton(\"Green\");\n\t\tJButton blueButton = new JButton(\"Blue\");\n\t\tJButton yellowButton = new JButton(\"Yellow\");\n\t\t\n\t\t//Creating panels to add all objects to\n\t\tJPanel panel1 = new JPanel(new GridLayout(1,1)); // Creating a Flow Layout for first row\n\t\tpanel1.add(colorMessageLabel);\n\n\t\tJPanel panel2 = new JPanel(new GridLayout(2,2));\n\t\tpanel2.add(redButton);\n\t\tpanel2.add(greenButton);\n\t\tpanel2.add(blueButton);\n\t\tpanel2.add(yellowButton);\n\t\t\n\t\t//Adding panel of objects to the JFrame window\n\t\twindow.add(panel1);\n\t\twindow.add(panel2);\n\t\twindow.setVisible(true); \n\t\t\n\t\t//Event handler for Red button\n\t\tredButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurrentTurnColor = \"Red\";\n\t\t\t\twindow.setVisible(false);\n\t\t\t\t}\n\t\t});\n\t\t\n\t\t//Event Handler for Green button\n\t\tgreenButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurrentTurnColor = \"Green\";\n\t\t\t\twindow.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\t//Event Handler for Green button\n\t\tblueButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurrentTurnColor = \"Blue\";\n\t\t\t\twindow.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t//Event Handler for Green button\n\t\tyellowButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurrentTurnColor = \"Yellow\";\n\t\t\t\twindow.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\t\t\n\t}", "public void newGame() {\n\n\n inGame = true;\n mines_left = mines+ePirate+mPirate+hPirate;\n\n all_cells = rows * cols;\n field = new int[all_cells];\n\n for (int i = 0; i < all_cells; i++)\n field[i] = COVER_FOR_CELL;\n\n statusbar.setText(Integer.toString(mines_left));\n\n // draw the board -- pass to the undo array\n drawBoard(mines) ; // now rocks\n drawBoard(ePirate) ;\n drawBoard(mPirate) ;\n drawBoard(hPirate) ;\n\n }", "public Simonish(){\n\t\tframe = new JFrame();\n\t\tframe.setTitle(\"Simon Supreme\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(true);\n\t\t\n\t\tpane = frame.getContentPane();\n\t\tpane.setLayout(new BorderLayout());\n\t\tpane.setPreferredSize(new Dimension(450, 500));\n\t\tcolor = new Container();\n\t\tcolor.setLayout(new GridLayout(2, 2));\n\t\n\t\tdisplayCounter = 0;\n\t\tscoreCounter = 0;\n\t\tscore = 0;\n\t\thighScore = 0;\n\t\tspeed = 500;\n\t\tcompTurn = true;\n\t\ttotalGames = 0;\n\t\taverageScore = 0;\n\t\t\n\t\tmenu = new MenuBar(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (e.getSource() == menu.panel1){\n\t\t\t\t\tColor color = JColorChooser.showDialog(frame,\n\t\t\t\t \"Choose background color\", Color.white);\n\t\t\t\t\tif (color == null){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tred.setNewColor(color.darker());\n\t\t\t\t}\n\t\t\t\telse if(e.getSource() == menu.panel2){\n\t\t\t\t\tColor color = JColorChooser.showDialog(frame,\n\t\t\t\t \"Choose background color\", Color.white);\n\t\t\t\t\tif (color == null){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tblue.setNewColor(color.darker());\n\t\t\t\t}\n\t\t\t\telse if (e.getSource() == menu.panel3){\n\t\t\t\t\tColor color = JColorChooser.showDialog(frame,\n\t\t\t\t \"Choose background color\", Color.white);\n\t\t\t\t\tif (color == null){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tyellow.setNewColor(color.darker());\n\t\t\t\t}\n\t\t\t\telse if (e.getSource() == menu.panel4){\n\t\t\t\t\tColor color = JColorChooser.showDialog(frame,\n\t\t\t\t \"Choose background color\", Color.white);\n\t\t\t\t\tif (color == null){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tgreen.setNewColor(color.darker());\n\t\t\t\t}\n\t\t\t\telse if (e.getSource() == menu.fast){\n\t\t\t\t\tspeed = 100;\n\t\t\t\t}\n\t\t\t\telse if (e.getSource() == menu.med){\n\t\t\t\t\tspeed = 250;\n\t\t\t\t}\n\t\t\t\telse if (e.getSource() == menu.slow){\n\t\t\t\t\tspeed = 500;\n\t\t\t\t}\n\t\t\t\telse if (e.getSource() == menu.highScore){\n\t\t\t\t\tString topTen = \"\";\n\t\t\t\t\tfor (int i=0; i<nameList.size(); i++){\n\t\t\t\t\t\tif (scoreList.get(i)!=-1)\n\t\t\t\t\t\t\ttopTen+=nameList.get(i)+ \": score of \" + scoreList.get(i)+\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Top Ten High Scores: \\n\" +\n\t\t\t\t\t\t\ttopTen);\n\t\t\t\t}\n\t\t\t\telse if (e.getSource() == menu.history){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tScanner read = new Scanner(new File(\"games.txt\"));\n\t\t\t\t\t\tScanner read2 = new Scanner(new File(\"average.txt\"));\n\t\t\t\t\t\tif(!read.hasNext())\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\telse if(!read2.hasNext())\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\ttotalGames += read.nextInt();\n\t\t\t\t\t\taverageScore += read2.nextDouble();\n\t\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\taverageScore = (averageScore / totalGames);\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Total games played: \" + totalGames +\n\t\t\t\t\t\"\\nAverage Score: \" + averageScore);\n\t\t\t\t}\n\t\t\t\telse if (e.getSource() == menu.about){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"New Features: \\n\" + \"1.You can change color of the panels!\\n\" +\n\t\t\t\t\"2.You can change the speed of the game!\\n\" + \"3.You can view the previous high scores!\\n\" +\n\t\t\t\t\"4.You can add your name to the list of high scores!\");\n\t\t\t\t}\n\t\t\t\telse if (e.getSource() == menu.rules){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"1. Press the 'Start Button' to begin game.\\n\" + \n\t\t\t\t\"2. Pay attention to the sequence of colors the computer displays.\\n\" + \n\t\t\t\t\"3. Press the colors in the same order.\\n\" + \"4. Continue until you miss.\\n\" +\n\t\t\t\t\"5. Have fun!\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tscoreBoard = new ScorePanel(this);\n\t\tred = new ColorPiece(Color.red, this);\n\t\tblue = new ColorPiece(Color.blue, this);\n\t\tyellow = new ColorPiece(Color.yellow, this);\n\t\tgreen = new ColorPiece(Color.green, this);\n\t\t\n\t\tscoreBoard.setBounds(0, 0, 450, 50);\n\t\t\n\t\t/**\n\t\t * uses the scorepanel class to create the \"start\" button\n\t\t */\n\t\tscoreBoard.getStartBtn().addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstartGame();\n\t\t\t}\n\t\t});\n\t\t\n\t\tplayer = new Vector<>();\n\t\tinput = new Vector<>();\n\t\tscoreList = new ArrayList<>();\n\t\tnameList = new ArrayList<>();\n\t\t\n\t\tpane.add(scoreBoard, BorderLayout.NORTH);\n\t\t\n\t\tcolor.add(red);\n\t\tcolor.add(blue);\n\t\tcolor.add(yellow);\n\t\tcolor.add(green);\n\t\tpane.add(color, BorderLayout.CENTER);\n\t\t\n\t\t/**\n\t\t *associates computer player color flashes with integer\n\t\t */\n\t\tdisplayTimer = new Timer(1000, new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\t\t\t\t\n\t\t\t\tif (displayCounter == input.size()){\n\t\t\t\t\tdisplayTimer.stop();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tswitch (input.get(displayCounter)){\n\t\t\t\tcase 1:\n\t\t\t\t\tred.blink(speed);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tblue.blink(speed);\n\t\t\t\t\tcompTurn = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tyellow.blink(speed);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tgreen.blink(speed);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdisplayCounter++;\n\t\t\t\tcompTurn = false;\n\t\t\t}\n\t\t});\n\t\n\t\tframe.setJMenuBar(menu);\n\t\tframe.pack();\n\t\tframe.setLocationRelativeTo(null);\t\n\t\tframe.setVisible(true);\n\t\t\n\t\tpopulateList();\n\t}", "public void gameSetUp() {\n if (!running.get()) return;\n if (!setup.compareAndSet(true, false)) return;\n ArrayList<GodController> controllers = new ArrayList<GodController>();\n controllers.add(new ApolloController(this));\n controllers.add(new ArtemisController(this));\n controllers.add(new AthenaController(this));\n controllers.add(new AtlasController(this));\n controllers.add(new DemeterController(this));\n controllers.add(new HephaestusController(this));\n controllers.add(new HestiaController(this));\n controllers.add(new LimusController(this));\n controllers.add(new MedusaController(this));\n controllers.add(new MinotaurController(this));\n controllers.add(new PanController(this));\n controllers.add(new PrometheusController(this));\n controllers.add(new TritonController(this));\n controllers.add(new ZeusController(this));\n\n Deck deck = game.getDeck();\n\n for (GodController godController : controllers) {\n deck.addCard(godController.generateCard());\n }\n\n players = game.getPlayers();\n\n try {\n broadcastGameInfo(\"gameSetup\");\n broadcastMessage(\"Game started!\");\n broadcastMessage(\"Picking cards...\");\n pickCards();\n broadcastGameInfo(\"boardSetup\");\n chooseStartPlayer();\n placeWorkers();\n\n broadcastGameInfo(\"gameStart\");\n playGame();\n } catch (IOExceptionFromController e) {\n handleDisconnection(e.getController());\n }\n }", "@Override\n public void startGame() {\n //create new board instance\n board = new int[NUM_ROWS][NUM_COLS];\n //set all elements to EMPTY\n for (int c = 0; c < NUM_COLS; c++) {\n for (int r = 0; r < NUM_ROWS; r++) {\n board[r][c] = EMPTY;\n }\n }\n //set the turn to red\n turn = RED;\n }", "public PJam_ColorGame() {\n initComponents();\n //Basic window formatting\n setLayout(null);\n setTitle(\"Color Game\");\n setPreferredSize(new Dimension(600, 400));\n setLocationRelativeTo(null);\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n setResizable(false);\n \n //Label is given random color and random string\n buttonColor = colorArr[(int) (Math.random() * 5)];\n currentText = colorTxtArr[(int) (Math.random() * 5)];\n colorText.setForeground(buttonColor);\n colorText.setText(currentText);\n \n //Set highscore and rounds remaining label to base values\n highscoreLabel.setText(\"Highscore = \" + highscore);\n roundsLabel.setText(\"Rounds Remaining: \" + roundsRemaining);\n \n //Set up buttons to be at random locations\n //BLUE BUTTON location\n int blueLocationX = randomXLocations[(int) (Math.random() * xSize)];\n int blueLocationY = randomYLocations[(int) (Math.random() * ySize)];\n System.out.println(\"Blue X = \" + blueLocationX + \", Blue Y = \" + blueLocationY);\n chosenXLocations.add(blueLocationX);\n \n buttonBlue.setLocation(blueLocationX, blueLocationY);\n boolean added = false;\n //RED BUTTON location\n int redLocationX = randomXLocations[(int) (Math.random() * xSize)];\n \n //used to prevent overlap of other buttons\n while(!added) {\n if (chosenXLocations.contains(redLocationX)) {\n redLocationX = randomXLocations[(int) (Math.random() * xSize)];\n }\n else {\n chosenXLocations.add(redLocationX);\n added = true;\n }\n }\n \n int redLocationY = randomYLocations[(int) (Math.random() * ySize)];\n System.out.println(\"Red X = \" + redLocationX + \", Red Y = \" + redLocationY);\n \n buttonRed.setLocation(redLocationX, redLocationY);\n \n //YELLOW BUTTON location\n added = false;\n int yellowLocationX = randomXLocations[(int) (Math.random() * xSize)];\n //used to prevent overlap of other buttons \n while(!added) {\n if (chosenXLocations.contains(yellowLocationX)) {\n yellowLocationX = randomXLocations[(int) (Math.random() * xSize)];\n }\n else {\n chosenXLocations.add(yellowLocationX);\n added = true;\n }\n }\n int yellowLocationY = randomYLocations[(int) (Math.random() * ySize)];\n System.out.println(\"Yellow X = \" + yellowLocationX + \", Yellow Y = \" + yellowLocationY);\n \n buttonYellow.setLocation(yellowLocationX, yellowLocationY);\n \n \n //GREEN BUTTON location\n added = false;\n int greenLocationX = randomXLocations[(int) (Math.random() * xSize)];\n //used to prevent overlap of other buttons\n while(!added) {\n if (chosenXLocations.contains(greenLocationX)) {\n greenLocationX = randomXLocations[(int) (Math.random() * xSize)];\n }\n else {\n chosenXLocations.add(greenLocationX);\n added = true;\n }\n }\n int greenLocationY = randomYLocations[(int) (Math.random() * ySize)];\n System.out.println(\"Green X = \" + greenLocationX + \", Green Y = \" + greenLocationY);\n \n buttonGreen.setLocation(greenLocationX, greenLocationY);\n \n //PURPLE BUTTON location\n added = false;\n int purpleLocationX = randomXLocations[(int) (Math.random() * xSize)];\n //used to prevent overlap of other buttons\n while(!added) {\n if (chosenXLocations.contains(purpleLocationX)) {\n purpleLocationX = randomXLocations[(int) (Math.random() * xSize)];\n }\n else {\n chosenXLocations.add(purpleLocationX);\n added = true;\n }\n }\n int purpleLocationY = randomYLocations[(int) (Math.random() * ySize)];\n System.out.println(\"Purple X = \" + purpleLocationX + \", Purple Y = \" + purpleLocationY);\n \n buttonPurple.setLocation(purpleLocationX, purpleLocationY);\n //add to frame\n this.pack();\n startClock();\n }", "public static void setup(){\n\t\tfor(int i=0;i<9;i++){\r\n\t\t\tTicTac.place[i]='_';\r\n\t\t}\r\n\t\tdrawBoard();\r\n\t\twhile((TicTac.team != 'X') && (TicTac.team != 'O')){\r\n\t\t\tSystem.out.println(\"\\n\\nselect your team enter X or O below\");\r\n\t\t\tSystem.out.print(\"Enter your selection:\");\r\n\t\t\tScanner input=new Scanner(System.in);\r\n\t\t\tTicTac.usrStr=input.next();\r\n\t\t\tif(TicTac.usrStr.toUpperCase().equals(\"X\")){\r\n\t\t\t\tTicTac.team='X';\r\n\t\t\t\tTicTac.opp='O';\r\n\t\t\t}\r\n\t\t\telse if(TicTac.usrStr.toUpperCase().equals(\"O\")){\r\n\t\t\t\tTicTac.team='O';\r\n\t\t\t\tTicTac.opp='X';\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"You entered :\"+usrStr);{\r\n\t\t\t\t\tSystem.out.println(\"this is not a valid optiuon plase enter either X or O to continue\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(\"you are team\"+TicTac.team);\r\n\t\tgame();\r\n\t}", "public void createPlayer() {\n ColorPicker colorPicker = new ColorPicker();\n\n for (Player player : players) {\n if (player.getColor() == color(0, 0, 0) || (player.hasName() == false)) {\n pickColor(player, colorPicker);\n return;\n }\n }\n\n // if (ENABLE_SOUND) {\n // sfx.moveToGame();\n // }\n\n state = GameState.PLAY_GAME;\n\n // Spawn players\n int index = 0;\n for (int i=players.size()-1; i>=0; i--) {\n String dir = directions.get(index); // Need to add players in reverse so that when they respawn, they move in the right direction\n players.get(i).setSpawn(spawns.get(dir)).setDirection(dir);\n index++;\n }\n\n // Update game state only if all players have name and color\n}", "public void startGame() {\n\t\ttank1.create(20, 530, 0, 0);\n\t\ttank1.setDefaults();\n\t\ttank2.create(960, 530, 0, 0);\n\t\ttank2.setDefaults();\n\t\tobjects.add(tank1);\n\t\tobjects.add(tank2);\n\t\tground = new Groundmod2((int) (Math.random() * 4));\n\t\tturn = Turn.PLAYER1;\n\t\tgrabFocus();\n\t}", "public void createPlayers() {\n\t\t\n\t\twhite = new Player(Color.WHITE);\n\t\twhite.initilizePieces();\n\t\tcurrentTurn = white;\n\t\t\n\t\tblack = new Player(Color.BLACK);\n\t\tblack.initilizePieces();\n\t}", "public void setupGame() {\n\t\t// Re-spawn the appropriate number of sheep\n\t\tint numSheep = 31;\n\t\t\n\t\tif (!SheepPhysicsState.PRODUCTION) {\n\t\t\tnumSheep = 1;\n\t\t}\n\t\t\n\t\t// It takes half the sheep to win.\n\t\t_scoreToWin = numSheep / 2;\n\t\tp(\"It takes \" + _scoreToWin + \" sheep to win.\");\n\t\t\n\t\t_hasBeenWon = false;\n\t\t\n\t\t// Non-infrastructural entities.\n\t\t//////////////////////////\n\t\t\n\t\t// Don't create this stuff if I'm replaying.\n\t\tint mod = 1;\n\t\tfor (int i = 0; i < numSheep; i++) {\n\t\t\t//int x = _generator.nextInt(40) - 20;\n\t\t\t//int z = _generator.nextInt(80) - 40;\n\t\t\tmod *= -1;\n\t\t\tint x = i/2 * mod;\n\t\t\tint z = 0;\n\n\t\t\tSheep s = new Sheep(\"sheep-\" + i + \"[\" + _sheepID + \"]\", x, 2, z);\n\t\t\t\n\t\t\tif (!SheepPhysicsState.PRODUCTION) {\n\t\t\t\ts.setBehaviorActive(false);\n\t\t\t}\n\t\t\t\n\t\t\t_sheepID++;\n\t\t}\n\t\t\n\t\t// Add a wubble for testing.\n\t\tif (!_isJimboSpawned && !SheepPhysicsState.PRODUCTION) {\n\t\t\tSystem.out.println(\"Adding Jimbo.\");\n\t\t\t_isJimboSpawned = true;\n\t\t\taddWubble(\"Jimbo\", (short)100, (Integer)1);\n\t\t\taddSidekick(\"Jimbo\");\n\t\t\t//addWubble(\"Bimbo\", (short)101, (Integer)0);\n\t\t}\n\t\t\n\t\t//////////////////////////\n\n\t\t// Add some wrenches in the appropriate spots.\n\t\tnew Wrench(\"blueWrench1\", -8, 5, -20);\n\t\tnew Wrench(\"blueWrench2\", 8, 5, -20);\n\t\tnew Wrench(\"redWrench1\", -8, 5, 20);\n\t\tnew Wrench(\"redWrench2\", 8, 5, 20);\n\t\t\n\t\t// Save the start of the me.\n\t\t_gameStart = System.currentTimeMillis();\n\t\tSystem.out.println(\"Started game at \" + _gameStart);\n\t\t\n\t\t// Make some predicates.\n\t\t//Predicate p = new Predicate(\"baseClassPred\");\n\t\t//GoPred g = new GoPred(\"derivedGoClass\", 1);\n\t\t\n\t\t//new PowerUp(\"PowerUpS\", -1, PowerUpInfo.PowerUpType.SPEEDY, new Vector3f(0, 0.4f, 0));\n\t\t//new PowerUp(\"PowerUpE\", -1, PowerUpInfo.PowerUpType.EATER, new Vector3f(2, 0.4f, 0));\n\t\t//new PowerUp(\"PowerUpS\", -1, PowerUpInfo.PowerUpType.STICKY, new Vector3f(2, 0.4f, 2));\n\t}", "private void startUpConditions(){\n\t\t\tString strSize = JOptionPane.showInputDialog(null, \n\t\t\t\t\t\"Pick a Board Size between 3-30.\");\n\t\t\ttry{\n\t\t\t\tselectedSize = Integer.parseInt(strSize);\n\t\t\t\t\n\t\t\tif(selectedSize < 2||selectedSize > 30){\n\t\t\t\tselectedSize = 10;\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The Game has\"\n\t\t\t\t+ \" defaulted to a Board Size of 10.\");\n\t\t\t\t}\n\t\t\t\n\t\t\t}catch(NumberFormatException exception){\n\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The Game has\"\n\t\t\t\t+ \" defaulted to a Board Size of 10.\"+\n\t\t\t\t\" Because you input characters other than numbers.\");\n\t\t\t\tselectedSize = 10;\t\t\t\t\n\t\t\t}\n\n\t\n\t\t//selecting the number of players within the game\n\t\t//verifying a valid input for the Players\n\t\t//It's awfully boring to play by yourself after all.\n\t\t\tString strPlay = JOptionPane.showInputDialog(null, \n\t\t\t\t\t\"Pick number of players between 2-10\");\n\t\t\ttry{\n\t\t\t\tif(strPlay==null){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t+\" has defaulted to 2 players.\");\n\t\t\t\t\tselectedPlayers = 2;\n\t\t\t\t}\n//\t\t\t\tif(input == JOptionPane.CANCEL_OPTION){\n//\t\t\t\t\tSystem.exit(1);\n//\t\t\t\t}\n\t\t\t\tif(strPlay!=null){\n\t\t\t\t\tselectedPlayers = Integer.parseInt(strPlay);\n\t\t\t\t\t\n\t\t\t\t\tif(selectedPlayers < 2||selectedPlayers > 10){\n\t\t\t\t\t\tselectedPlayers = 2;\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t\t\t+\" has defaulted to 2 players.\"\n\t\t\t\t\t\t\t+\" Because you input a number that \"\n\t\t\t\t\t\t\t+\"was out of bounds.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(NumberFormatException exception){\n\t\t\t\tJOptionPane.showMessageDialog(null,\"You input \"\n\t\t\t\t\t+ \"something that was not a number.\"\n\t\t\t\t\t+ \" The game has defaulted to 2 players.\");\n\t\t\t\tselectedPlayers = 2;\n\t\t\t}\n\t\t\t\n\t\t\tString goFirst = JOptionPane.showInputDialog(null, \"Pick\"\n\t\t\t+ \" who will go first.\");\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(goFirst==null){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t+\" has defaulted to Player 1s turn.\");\n\t\t\t\t\tthis.firstTurn = 0;\n\t\t\t\t}\n\t\t\t\tif(goFirst!=null){\n\t\t\t\t\t this.firstTurn = Integer.parseInt(goFirst);\n\t\t\t\t}\n\t\t\t}catch(NumberFormatException exception){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"You input \"\n\t\t\t\t+ \"something other than a number.\"\n\t\t\t\t+ \" The Game has defaulted to player 1s turn.\");\n\t\t\t\tthis.firstTurn = 0;\n\t\t\t}finally{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t+\" will now begin.\");\n\t\t\t}\n\t\t\t\n\t\t}", "public void updateDisplay()\n {\n\t Color metal = new Color(153, 153, 153);\n\t Color background = new Color(0, 0, 0);\n\t Color sand = new Color(251, 251, 208);\n\t Color water = new Color(102, 179, 255);\n\t int rows = grid.length;\n\t int cols = grid[0].length;\n\t for(int i = 0; i < rows; i++) {\n\t\t for(int j = 0; j < cols; j++) {\n\t\t\t if(grid[i][j] == METAL) {\n\t\t\t\t //color should be gray or whatever\n\t\t\t\t display.setColor(i, j, metal);\n\t\t\t }\n\t\t\t else if(grid[i][j] == EMPTY) {\n\t\t\t\t display.setColor(i, j, background);\n\t\t\t }\n\t\t\t else if(grid[i][j] == SAND) {\n\t\t\t\t display.setColor(i, j, sand);\n\t\t\t }\n\t\t\t else {\n\t\t\t\t display.setColor(i, j, water);\n\t\t\t }\n\t\t }\n\t }\n }", "private void consoleGameStart(){\n\t\tconsoleGetOptions();\n\t\t\n\t\t//diplay the board\n\t\tconsoleBoardDisplay();\n\t\tdo{\t\n\t\t\t//either player makes a move\t\t\n\t\t\tif (ttt.isPlayerTurn()) consoleBoardInput();\n\t\t\telse ttt.computeMove();\n\t\t\tconsoleBoardDisplay();\n\t\t\t\n\t\t\t//check for winning states and draw states\n\t\t\tif (ttt.checkWin()){\n\t\t\t\tif (ttt.isPlayerTurn()) System.out.println(\"Computer Wins\");\n\t\t\t\telse System.out.println(\"Player Wins\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (ttt.checkDraw()){\n\t\t\t\tSystem.out.println(\"Its a Draw Game\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}while (true);\n\t}", "public void DisplayWithMultiTypes() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard purpleCard = new Card(Type.PURPLE, 3);\n\t\tCard greenCard = new Card(Type.GREEN, 1);\n\t\tCard yellowCard = new Card(Type.YELLOW, 2);\n\t\tCard blueCard = new Card(Type.BLUE, 3);\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\tCard squire = new Card(Type.WHITE, 2);\n\t\tCard maiden = new Card (Type.WHITE, 6);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t\tgame.getDisplay(1).add(purpleCard);\n\t\tgame.getDisplay(1).add(blueCard);\n\t\tgame.getDisplay(1).add(greenCard);\n\t\tgame.getDisplay(1).add(squire);\n\t\tgame.getDisplay(1).add(yellowCard);\n\t\tgame.getDisplay(1).add(maiden);\n\t}", "public void startGame() {\n\t\tfor(Chess.RowConfiguration rowConfiguration : Chess.getRowConfigurations()) {\n\t\t\tint row = rowConfiguration.row;\n\t\t\tClass[] pieceClasses = rowConfiguration.pieces;\n\t\t\tChess.Color sideColor = rowConfiguration.sideColor;\n\n\t\t\tfor(int col = 0; col < Chess.NUM_COLS; col++) {\n\t\t\t\taddPiece(pieceClasses[col], sideColor, board.getSpot(row, col));\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.inPlay = true;\n\t\t\n\t\tstartNewTurn();\n\t\t\n\t\tif(eventListener != null) {\n\t\t\teventListener.onGameStarted();\n\t\t}\n\t}", "public final static void play()\n\t{\n\t\tDatabase.resetForNewGame();\n\n\n\t\tclearConsole();\n\t\tint playerOnePoints = 0, playerTwoPoints = 0, matrixSize=0, userChoise=0;\n\t\tString playerOneName, playerTwoName;\n\t\tchar controller;\n\n\n\t\tSystem.out.println(\"LET THE GAME BEGIN!\");\n\t\tSystem.out.println(\"Please type players' names: \");\n\n\t\t/**\n\t\t * Asks for player's names and Galaxy size.\n\t\t * */\n\t\tdo\n\t\t{\n\t\t\tSystem.out.println(\"Player One: \");\n\t\t\tplayerOneName=Global.sc.next(\"\\\\w+\");\n\t\t\tSystem.out.println(\"Player Two: \");\n\t\t\tplayerTwoName=Global.sc.next(\"\\\\w+\");\n\t\t\tif ((!checkNames(playerOneName, playerTwoName)))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error. Please enter names with no marks and spaces, different first letter or less length.: \");\n\t\t\t}\n\t\t} while(!checkNames(playerOneName, playerTwoName));\n\t\tclearConsole();\n\t\tSystem.out.println(\"Please choose galaxy size: \");\n\t\tSystem.out.println(\"[1] Small\");\n\t\tSystem.out.println(\"[2] Large\");\n\t\tuserChoise=Global.sc.nextInt();\n\t\twhile(userChoise!=1&&userChoise!=2)\n\t\t{\n\t\t\tSystem.out.println(\"Wrong number. Please enter again: \");\n\t\t\tuserChoise=Global.sc.nextInt();\n\t\t}\n\t\tif (userChoise==1) {\n\t\t\tmatrixSize=GameConstants.smallMatrixSize;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tmatrixSize=GameConstants.largeMatrixSize;\n\t\t}\n\n\t\t/**\n\t\t * Creates the Galaxy and player's coordinates.\n\t\t * */\n\t\tGalaxy galaxy = new Galaxy(matrixSize);\n\t\tPlayerOne playerOneCol=new PlayerOne();\n\t\tPlayerOne playerOneRow=new PlayerOne();\n\t\tPlayerTwo playerTwoRow=new PlayerTwo(matrixSize);\n\t\tPlayerTwo playerTwoCol=new PlayerTwo(matrixSize);\n\t\t/**\n\t\t * Creates TemporaryChar which will hold a potential symbol ('8'/'+'/'*') of a question.\n\t\t * */\n\t\tTemporaryChar temp = new TemporaryChar();\n\t\tgalaxy.putStars(matrixSize);\n\t\tgalaxy.putPlayers(playerOneName, playerTwoName, matrixSize);\n\n\n\t\t//GAME BEGINS\n\n\n\n\t\tdo\n\t\t{\n\t\t\t//First player\n\n\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\t\t\tSystem.out.print(playerOneName);\n\t\t\tSystem.out.print(\", please make a move: \");\n\n\t\t\tcontroller=Global.sc.next(\".\").charAt(0);\n\n\t\t\tmovePlayer(galaxy,temp, controller, playerOneRow, playerOneCol);\n\n\t\t\t//Throws exception if player has tried to move on the other player's position.\n\t\t\tif (playerOneRow.coordinate == playerTwoRow.coordinate&&playerOneCol.coordinate ==playerTwoCol.coordinate)\n\t\t\t{\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException();\t\n\t\t\t}\n\t\t\tplayerOnePoints+=pointsToAdd(temp);\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\n\t\t\t//Checks if there are any stars.\n\t\t\tif(!galaxy.checkForRemainingStars(matrixSize)) break;\n\n\n\n\n\n\t\t\t//Second player\n\n\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\t\t\tSystem.out.print(playerTwoName);\n\t\t\tSystem.out.print(\", please make a move: \");\n\n\t\t\tcontroller=Global.sc.next(\".\").charAt(0);\n\n\t\t\tmovePlayer(galaxy,temp, controller, playerTwoRow, playerTwoCol);\n\n\t\t\tif (playerOneRow.coordinate == playerTwoRow.coordinate&&playerOneCol.coordinate ==playerTwoCol.coordinate)\n\t\t\t{\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException();\t\n\t\t\t}\n\t\t\tplayerTwoPoints+=pointsToAdd(temp);\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\t\t} while (galaxy.checkForRemainingStars(matrixSize));\n\n\n\n\n\t\tif (playerOnePoints > playerTwoPoints)\n\t\t{\n\t\t\tSystem.out.print(playerOneName);\n\t\t\tSystem.out.println(\" wins!\");\n\t\t}\n\t\telse if (playerOnePoints < playerTwoPoints)\n\t\t{\n\t\t\tSystem.out.print(playerTwoName);\n\t\t\tSystem.out.println(\" wins!\");\n\t\t}\n\t\telse System.out.println(\"It's a draw!\");\n\n\t\tpressAnyKeyToContinue();\n\t\tshowMenu();\n\n\n\t}", "public void startGame() {\n\t\tinitChips();\n\t\tassignAndStartInitialProjects();\n\t}", "public static void mainMenu() {\n\t\tStdDraw.setCanvasSize(600, 600);\n\t\tStdDraw.setScale(0, 1000);\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.filledRectangle(500, 500, 1000, 1000);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tFont font = new Font(\"Sans Serif\", 20, 20);\n\t\tStdDraw.setFont(font);\n\t\tStdDraw.text(500, 850, \"Six Men Morris Game\");\n\t\tStdDraw.text(500, 750, \"Game Created By: \");\n\t\tStdDraw.text(500, 700, \"Phillip Pavlich, Prakhar Jalan, Dinesh Balakrishnan\");\n\t\tStdDraw.filledRectangle(500, 500, 205, 75);\n\t\tStdDraw.filledRectangle(500, 300, 205, 75);\n\t\tStdDraw.filledRectangle(500, 100, 205, 75);\n\t\t\n\t\tStdDraw.setFont();\n\t\tStdDraw.setPenColor(StdDraw.ORANGE);\n\t\tStdDraw.setPenRadius(0.05);\n\n\t\tStdDraw.filledRectangle(500, 500, 200, 70);\n\t\tStdDraw.filledRectangle(500, 300, 200, 70);\n\t\tStdDraw.filledRectangle(500, 100, 200, 70);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.text(500, 500, \"Start New Game\");\n\t\tStdDraw.text(500, 300, \"Continue Game\");\n\t\tStdDraw.text(500, 100, \"Load Saved Game\");\n\t}", "public interface Constants {\n /*Title of game*/\n String EUKER = \"Euker\";\n\n int FRAME_PADDING = 25;\n\n /*Size of mainFrame*/\n int WIDTH_FRAME = FRAME_PADDING;\n int HEIGHT_FRAME = (FRAME_PADDING * 5);\n\n /*Size of GamePlayChoice*/\n int WIDTH_GAME_PLAY = 100;\n int HEIGHT_GAME_PLAY = 200;\n\n\n /*StatusPanel*/\n String STATUS_PANEL = \"Status Panel\";\n String WINNER = \"Winner: \";\n String CURRENT_TURN = \"Current Turn: \";\n\n /*Button labels for game play popup*/\n String TWO_PLAYER_BUTTON = \"2 H\";\n String FOUR_PLAYER_BUTTON = \"4 H\";\n String THREE_PLAYER_PC_BUTTON = \"3 H 1 PC\";\n String TWO_PLAYER_PC_BUTTON = \"2 H 2 PC\";\n String ONE_PLAYER_PC_BUTTON = \"1 H 3 PC\";\n\n /*Suits*/\n String CLUBS = \"CLUBS\";\n String HEARTS = \"HEARTS\";\n String SPADES = \"SPADES\";\n String DIAMONDS = \"DIAMONDS\";\n\n /*Values of cards*/\n String ACE = \"ACE\";\n String KING = \"KING\";\n String QUEEN = \"QUEEN\";\n String JACK = \"JACK\";\n String TEN = \"TEN\";\n String NINE = \"NINE\";\n String EIGHT = \"EIGHT\";\n String SEVEN = \"SEVEN\";\n String SIX = \"SIX\";\n String FIVE = \"FIVE\";\n String FOUR = \"FOUR\";\n String THREE = \"THREE\";\n String TWO = \"TWO\";\n\n /**Number of iterations to shuffle a deck of cards.*/\n int SHUFFLE_ITERATIONS = 100;\n\n /**Maximum number of cards a player can have at any given time.\n * 5 for normal hand, 6 if you are the dealer.*/\n int MAX_PLAYER_CARD_COUNT = 6;\n\n /**Number of cards in a euker deck.*/\n int EUKER_CARD_COUNT = 24;\n\n /*Orientation of each player.*/\n String LEFT = \"LEFT\";\n String RIGHT = \"RIGHT\";\n String TOP = \"TOP\";\n String BOTTOM = \"BOTTOM\";\n}", "public void setupGUI(){\n //home button\n homeBtn = (ImageButton) findViewById(R.id.home_button);\n homeBtn.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n goToHome();\n }\n });\n\n sharedpreferences = getSharedPreferences(savedColor, Context.MODE_PRIVATE);\n\n int value1 = sharedpreferences.getInt(\"value1\", 0);\n int value2 = sharedpreferences.getInt(\"value2\", 0);\n int value3 = sharedpreferences.getInt(\"value3\", 0);\n int value4 = sharedpreferences.getInt(\"set\", 0);\n if(value4 != 0){\n View v = findViewById(R.id.measure_id_3);\n v.setBackgroundColor(Color.rgb(value1, value3, value2));\n setContentView(v);\n }\n }", "public GamePad(GraphicsContext gc) {\n\t\tbrickgc = gc;\n\t\tbrick = generateBricks();\n\t\t//brickgc.setFill(brick.getColor());\n\t\tgameBoard = new boolean[10][20];\n\t\tpieceColors = new Color[10][20];\n\t}", "public void initialize2() {\n\t\txHero1 = 10;\n\t\tinsecondmode=true;\n\t\tImageIcon bg = new ImageIcon(\"bg for one player.png\");\n\t\tBackground = (bg.getImage().getScaledInstance(bg.getIconWidth(), bg.getIconHeight(), Image.SCALE_DEFAULT));\n\t\tImageIcon[] in1 = new ImageIcon[12];\n\t\tin1[0] = new ImageIcon(\"\");\n\t\tin1[1] = new ImageIcon(\"\");\n\t\tin1[2] = new ImageIcon(\"\");\n\t\tin1[3] = new ImageIcon(\"\");\n\t\tin1[4] = new ImageIcon(\"\");\n\t\tin1[5] = new ImageIcon(\"\");\n\t\tin1[6] = new ImageIcon(\"\");\n\t\tin1[7] = new ImageIcon(\"\");\n\t\tin1[8] = new ImageIcon(\"\");\n\t\tin1[9] = new ImageIcon(\"\");\n\t\tin1[10] = new ImageIcon(\"\");\n\t\tin1[11] = new ImageIcon(\"\");\n\t\tImageIcon[] in2 = new ImageIcon[12];\n\t\tin2[0] = new ImageIcon(\"Hero02.png\");\n\t\tin2[1] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[2] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[3] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[4] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[5] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[6] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[7] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[8] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[9] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[10] = new ImageIcon(\"Hero02 Attack01.png\");\n\t\tin2[11] = new ImageIcon(\"Hero02 Die.png\");\n\t\tImageIcon[] inBullet1 = new ImageIcon[3];\n\t\tinBullet1[0] = new ImageIcon(\"\");\n\t\tinBullet1[1] = new ImageIcon(\"\");\n\t\tinBullet1[2] = new ImageIcon(\"\");\n\t\tImageIcon[] inBullet2 = new ImageIcon[5];\n\t\tinBullet2[0] = new ImageIcon(\"20.png\");\n\t\tinBullet2[1]= new ImageIcon(\"50.png\");\n\t\tinBullet2[2]= new ImageIcon(\"100.png\");\n\t\tinBullet2[3]= new ImageIcon(\"200.png\");\n\t\tinBullet2[4]= new ImageIcon(\"500.png\");\n\t\tcannotdefend(1);\n\t\tHero1.settemplate(in2);\n\t\tHero2.settemplate(in1);\n\t\tBullet1.settemplate(inBullet2);\n\t\tBullet2.settemplate(inBullet1);\n\t\tHero1.setstatus(0);\n\t\tHero2.setstatus(0);\n\t}", "public void init(){\n\t\tsetBackground(Color.green);\n\t\tmsg = \"Let's Play\";\n//\t\tmsg1 = \"Your Frinds Choice\";\n\t\tSystem.out.println(cpu);\n\t\tb1 = new Button(\"Stone\");\n\t\tb2 = new Button(\"Paper\");\n\t\tb3 = new Button(\"Seaser\");\n\t\tb1.addActionListener(this);\n\t\tb2.addActionListener(this);\n\t\tb3.addActionListener(this);\n\t\tadd(b1);\n\t\tadd(b2);\n\t\tadd(b3);\n\t}", "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}", "private void setUpGame() {\n DotCom one = new DotCom();\n one.setName(\"Pets.com\");\n DotCom two = new DotCom();\n two.setName(\"eToys.com\");\n DotCom three = new DotCom();\n three.setName(\"Go2.com\");\n dotComList.add(one);\n dotComList.add(two);\n dotComList.add(three);\n\n //display brief instructions for the user//Выводим краткие инструкции для пользователя\n System.out.println(\"Ваша цель - потопить 3 сайта\");\n System.out.println(\"Pets.com, eToys.com,Go2.com\");\n System.out.println(\"Потытайтесь потопить их за минимальное количество ходов\");\n\n for (DotCom dotComToSet : dotComList) {// Повторяем с каждым объектом DotCom в списке\n ArrayList<String> newLocation = helper.placeDotCom(3);//Запрашиваем у вспомогательного объекта адрес \"сайта\"\n dotComToSet.setLocationCells(newLocation); // Вызываем сеттре из объекта DotCom чтобы передать ему\n // местоположение которое только что получилии от вспомогательного объекта\n }\n }", "interface Cnst {\r\n\r\n /////////////////////////////////////////////////////////////\r\n // These constants can be changed to edit the big bang ran //\r\n /////////////////////////////////////////////////////////////\r\n\r\n //full size is eight, scales the size of the board\r\n int scale = 8;\r\n\r\n //numbers of blocks in a row and a column\r\n int blocks = 10;\r\n\r\n //number of colors the game will use, between 2-8 inclusive\r\n int numOfColors = 8;\r\n\r\n //the number of turns you have to win the game\r\n int maxTurns = 25;\r\n\r\n\r\n ////////////////////////////////////////\r\n // Please do not edit these constants //\r\n ////////////////////////////////////////\r\n\r\n //the visible board width, scales with scale\r\n int boardWidth = 70 * scale;\r\n\r\n //the visible board height, scales with scale\r\n int boardHeight = 70 * scale;\r\n\r\n //cell width scales with the board and scale\r\n int cellWidth = boardWidth / blocks;\r\n\r\n //cell height scales with board and scale\r\n int cellHeight = boardHeight / blocks;\r\n\r\n //new constant for text on the board\r\n int textHeight = boardWidth / 12;\r\n\r\n //the 8 colors that can be selected by the user\r\n ArrayList<Color> colorsToChoose =\r\n new ArrayList<Color>(Arrays.asList(\r\n Color.CYAN, Color.PINK, Color.ORANGE,\r\n Color.BLUE, Color.RED, Color.GREEN,\r\n Color.MAGENTA, Color.YELLOW));\r\n}", "public void initMultiPlayer() {\n\t\tWorld.clear();\n\t\tstate = STATE.MENU;\n\t\tconfig[0] = new PlayerConfig(\"LEFTIE\", Keyboard.KEY_W, Keyboard.KEY_S,\n\t\t\t\tKeyboard.KEY_D, 0);\n\t\tconfig[1] = new PlayerConfig(\"RIGHTIE\", Keyboard.KEY_UP,\n\t\t\t\tKeyboard.KEY_DOWN, Keyboard.KEY_LEFT, 1);\n\n\t\tbat1 = new Bat(100, Screen.getCenterY() - Bat.HEIGHT / 2, config[0]);\n\n\t\tbat2 = new Bat(Screen.getWidth() - 100, Screen.getCenterY()\n\t\t\t\t- Bat.HEIGHT / 2, config[1]);\n\t\tfetchControlInput(config[0], new Callback() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tWorld.clear();\n\t\t\t\tfetchControlInput(config[1], new Callback() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tinitGame();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\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 }", "SettingsScreenClass(Dimension dim){\r\n cursorRow=0;\r\n counter=0;\r\n endPart=false;\r\n initSprites();\r\n setImage(dim.width,dim.height);\r\n fadeAmount=12;\r\n for(int i=0;i<12;i++){\r\n fadeColors[i]=new Color(0,0,0,(i)*20);\r\n }\r\n }", "private void prepareGame()\n {\n Rocket rocket = new Rocket();\n \n scoreCounter = new Counter(\"Score: \");\n \n addObject(rocket, getWidth()/2 + 100, getHeight()/2);\n \n addObject(scoreCounter, 60, 480);\n \n //TODO (69): Make a method call to addAsteroids that uses your constant for the number of asteroids\n addAsteroids(START_ASTEROIDS);\n }", "public static void changeScreens() {\r\n\t\tnone = true;\r\n\t\toption1 = false;\r\n\t\toption2 = false;\r\n\t\toption3 = false;\r\n\t\toption4 = false;\r\n\t\toption5 = false;\r\n\t\tbackToRegFromItem = false;\r\n\t\toverItem = false;\r\n\t\toverYes = false;\r\n\t\toverNo = false;\r\n\t\toverNext = false;\r\n\t\toverHealth = false;\r\n\t\toverAlly = false;\r\n\t\toverPummel = false;\r\n\t\toverLaser = false;\r\n\t\titemSelect = false;\r\n\t\tgoBackFromProg = false;\r\n\t\tgoBackFromAlly = false;\r\n\t\toverAnAlly = false;\r\n\t\tgoBackFromAttire = false;\r\n\t\toverAnOutfit = false;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void toggle() {\n if (currentPlayer.equals(\"red\")) {\n currentColor = BLUE_COLOUR;\n currentPlayer = \"blue\";\n } else {\n currentColor = RED_COLOUR;\n currentPlayer = \"red\";\n }\n //change color of grid\n changeColor();\n }", "public interface GameParameters {\n\n\t// Window Settings\n\tpublic static final int WINDOW_WIDTH = 800;\n\tpublic static final int WINDOW_HEIGHT = 600;\n\tpublic static final int FRAME_RATE = 60;\n\n\t// Game States\n\tpublic static final int MAINMENU_STATE = 0;\n\tpublic static final int GAMEPLAY_STATE = 1;\n\tpublic static final int HIGHSCORE_STATE = 2;\n\n\t// Background\n\tpublic static final String BACKGROUND_ID = \"background\";\n\tpublic static final String BACKGROUND_IMAGE = \"/images/background.png\";\n\n\t// Borders\n\tpublic enum BorderType {\n\t\tTOP, LEFT, RIGHT\n\t};\n\n\tpublic static final int BORDER_WIDTH = 6;\n\tpublic static final String TOP_BORDER_ID = \"topBorder\";\n\tpublic static final String LEFT_BORDER_ID = \"leftBorder\";\n\tpublic static final String RIGHT_BORDER_ID = \"rightBorder\";\n\n\t// Blocks\n\tpublic static final String MAP_FILE = \"maps/level1.map\";\n\tpublic static final String BLOCK_1_IMAGE = \"/images/block_1.png\";\n\tpublic static final String BLOCK_2_IMAGE = \"/images/block_2.png\";\n\tpublic static final String BLOCK_3_IMAGE = \"/images/block_3.png\";\n\n\t// Timer\n\tpublic static final String STOP_WATCH_ID = \"stopWatch\";\n\n\t// Ball\n\tpublic static final String BALL_ID = \"ball\";\n\tpublic static final float INITIAL_BALL_SPEED = 0.3f;\n\tpublic static final float SPEEDUP_VALUE = 0.0001f;\n\tpublic static final String BALL_IMAGE = \"/images/ball.png\";\n\n\t// Stick\n\tpublic static final String STICK_ID = \"stick\";\n\tpublic static final float STICK_SPEED = 0.5f;\n\tpublic static final String STICK_IMAGE = \"/images/stick.png\";\n\n\t// Player\n\tpublic static final String PLAYER_ID = \"player\";\n\tpublic static final String NO_LIFE_LEFT = \"noLifeLeft\";\n\n\t// Pause\n\tpublic static final String PAUSE_ID = \"pause\";\n\tpublic static final String PAUSE_IMAGE = \"/images/pause.png\";\n\n\t// Win\n\tpublic static final String WIN_ID = \"win\";\n\n\t// Escape\n\tpublic static final String ESCAPE_ID = \"escape\";\n\n\t// Highscore\n\tpublic static final String HIGHSCORE_FILE = \"highscores/highscore.hsc\";\n}", "private void initBoard() {\n initCommands();\n setBackground(Color.BLACK);\n setPreferredSize(new Dimension((int) (W * Application.scale), (int) (H * Application.scale)));\n\n commandClasses.forEach((cmdstr) -> {\n try {\n Object obj = Class.forName(cmdstr).getDeclaredConstructor().newInstance();\n Command cmd = (Command) obj;\n connectCommand(cmd);\n System.out.println(\"Loaded \" + cmdstr);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n });\n\n Particle.heatmap.addColor(0, Color.GREEN);\n Particle.heatmap.addColor(50, Color.YELLOW);\n Particle.heatmap.addColor(100, Color.RED);\n\n Particle.slopemap.addColor(-5, Color.RED);\n Particle.slopemap.addColor(0, Color.WHITE);\n Particle.slopemap.addColor(5, Color.GREEN);\n\n setFocusable(true);\n }", "@Override\n public void onSurfaceCreated(GL10 unused, javax.microedition.khronos.egl.EGLConfig config) {\n GLES20.glClearColor(Player.colorBG[0], Player.colorBG[1], Player.colorBG[2], 1.0f);\n // initialize a triangle\n mHat = new Hat();\n robe = new Robe();\n // initialize a square\n mSquare = new Square(Player.PLAYER_ONE);\n mHat2 = new Hat();\n robe2 = new Robe();\n // initialize a square\n mSquare2 = new Square(Player.PLAYER_TWO);\n\n\n\n float[] colorWhite = {1f, 1f, 1f, 1.0f};\n p1Eye = new Circle(colorWhite);\n p2Eye = new Circle(colorWhite);\n\n }", "private void setupGame(@NotNull String data) {\n if (game == null) {\n throw new IllegalArgumentException(\"Tried to start game with a null reference to GameGraphics\");\n }\n NewGameDto newGameDto = GameGraphics.gson.fromJson(data, NewGameDto.class);\n RoboRally.scheduleSync(() -> {\n game.setScreen(new GameScreen(game, newGameDto, this));\n writeToServer(ServerAction.FINISHED_SETUP + \"\");\n IPlayerHandler playerHandler = GameGraphics.getRoboRally().getPlayerHandler();\n if (playerHandler instanceof MultiPlayerHandler) {\n this.playerHandler = (MultiPlayerHandler) playerHandler;\n } else {\n throw new IllegalStateException(\"Player handler is not for multiplayer\");\n }\n\n }, 0);\n }", "public ProjectGame() {\n\n super(\"BulletHell\", 1200, 900);\n die = new Event();\n backgroundMusic = new SoundManagerClass();\n playButton.setPositionX(420);\n playButton.setPositionY(180);\n quitButton.setPositionX(623);\n quitButton.setPositionY(181);\n //x = 0;\n reduceLife = new Event();\n fadeOutEvent = new Event();\n PickedUpEvent = new Event();\n die.setEventType(\"playerDeath\");\n fadeOutEvent.setEventType(\"FadeOut\");\n reduceLife.setEventType(\"Collision\");\n collidedEvent = new Event();\n collidedEvent.setEventType(\"CollidedEvent\");\n throwKnife = new Event();\n throwKnife.setEventType(\"throwKnife\");\n\n\n keyIcon.setPositionX(200);\n keyIcon.setPositionY(40);\n\n knifeIcon.setPositionX(205);\n knifeIcon.setPositionY(95);\n\n currentLevel = 0;//0 = base , 3=brigham's level\n\n\n PickedUpEvent.setEventType(\"CoinPickedUp\");\n\n this.addEventListener(myQuestManager, collidedEvent.getEventType());\n\n\n background.setScaleX(5);\n background.setScaleY(5);\n\n background.setScaleX(5);\n background.setScaleY(5);\n\n\n player = new Player(\"player\", \"resources/player_sheet.png\", \"idle_right\");\n player.setSpriteSheetJson(\"resources/player_sheet.json\");\n player.setDelay(100);\n\n player.getLifeArray().get(0).setPositionX(390);\n player.getLifeArray().get(0).setPositionY(40);\n player.getLifeArray().get(1).setPositionX(420);\n player.getLifeArray().get(1).setPositionY(40);\n player.getLifeArray().get(2).setPositionX(450);\n player.getLifeArray().get(2).setPositionY(40);\n // player.setHasPhysics(true);\n keyCount = 0;\n knifeCount = 4;\n // player.setHasPhysics(true);\n\n // platform.setPositionX(50);\n // platform.setPositionY(550);\n\n\n // platform1.setPositionX(150);\n // platform1.setPositionY(150);\n\n\n player.setPositionX(550);\n player.setPositionY(700);\n\n pressE = new Sprite(\"pressE\", \"pressE.png\");\n player.addChild(pressE);\n pressE.setPositionY(-50);\n\n\n coin.setPositionY(250);\n coin.setPositionX(660);\n\n findKey.setPositionX(500);\n findKey.setPositionY(-20);\n\n getToRoom.setPositionX(500);\n getToRoom.setPositionY(-20);\n\n killTurtle.setPositionX(500);\n killTurtle.setPositionY(-20);\n\n\n //Rectangle2D rect = new Rectangle2D.Float(600,400,700,500);\n //coverList = new ArrayList<Rectangle2D>(); //list of cover sprites\n //coverList.add(rect);\n\n ///////////////////////////////////////LEVEL 0 ////////////////////////////////////////////////////////////////\n\n if (currentLevel == 0) {\n\n tutorial = new TutorialLevel1(\"Tutorial\");\n tutorial.run();\n addChild(tutorial);\n\n myLevel = new Level0(\"Room1\");\n myLevel.run();\n addChild(myLevel);\n\n\n myLevel1 = new Level1(\"Room2\");\n myLevel1.run();\n myLevel1.hide();\n addChild(myLevel1);\n\n myLevel2 = new ahmedslevel(\"Room3\", player);\n myLevel2.run();\n myLevel2.hide();\n addChild(myLevel2);\n\n myLevel3 = new BrighamLevel(\"Room4\");\n myLevel3.run();\n myLevel3.hide();\n addChild(myLevel3);\n\n level4 = new AlternatingSpikesLevel(\"Room6\");\n level4.run();\n level4.hide();\n addChild(level4);\n\n bossLevel = new BossLevel(\"Room5\", player);\n bossLevel.run();\n bossLevel.hide();\n addChild(bossLevel);\n\n\n\n tutorial.mapDoorToRoom(0,myLevel);\n myLevel.mapDoorToRoom(0, myLevel1);\n myLevel1.mapDoorToRoom(0, myLevel2);\n myLevel2.mapDoorToRoom(0, myLevel3);\n myLevel3.mapDoorToRoom(0, level4);\n level4.mapDoorToRoom(0, bossLevel);\n //myLevel3.mapDoorToRoom(0,bossLevel);\n\n\n currentRoom = tutorial;\n\n //myLevel1.mapDoorToRoom(0,myLevel2);\n\n //myLevel2.run();\n //myLevel2.hide();\n\n\n //myLevel2.mapDoorToRoom(0,myLevel3);\n //myLevel3.run();\n //myLevel3.hide();\n currentQuestObjective = 0;\n\n }\n\n if (currentLevel == 4) {\n\n\n bossLevel = new BossLevel(\"Room4\", player);\n bossLevel.run();\n currentRoom = bossLevel;\n\n\n }\n\n enemies = currentRoom.enemies;\n pickpocketEnemy = null;\n\n transitionY = 615;\n transitionYCurrent = 615;\n\n\n backgroundMusic.playSoundEffect(\"resources/oceanOperator.wav\", 100);\n\n }", "@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}", "public static void tick() {\r\n\r\n\t\t// Switches on the different states of the game that it could be in\r\n\t\tswitch (gameState) {\r\n\t\tcase MAINMENU:\r\n\t\t\t// If there is not already a Main menu instance that exists\r\n\t\t\tif (mainMenu == null) {\r\n\t\t\t\t// Create a new Menu Instance\r\n\t\t\t\tmainMenu = new MainMenu();\r\n\t\t\t}\r\n\t\t\tmainMenu.tick();\r\n\t\t\tbreak;\r\n\t\tcase GAME:\r\n\t\t\t// If there is not already a game instance that exists\r\n\t\t\tif (game == null) {\r\n\t\t\t\t// Create a new game Instance\r\n\t\t\t\tgame = new Game(map, gm);\r\n\t\t\t}\r\n\t\t\t// Every time the state manager ticks it also ticks the current game state\r\n\t\t\tgame.tick();\r\n\t\t\tbreak;\r\n\t\tcase GAME_ONLINE:\r\n\t\t\tif (gameOnline == null) {\r\n\t\t\t\t// Create a new game Instance\r\n\r\n//\t\t\t\tip = JOptionPane.showInputDialog(\"Enter Server Ip\");\r\n//\t\t\t\tportTCP = Integer.parseInt(JOptionPane.showInputDialog(\"Enter TCP PORT\"));\r\n//\t\t\t\tportUDP = Integer.parseInt(JOptionPane.showInputDialog(\"Enter UDP PORT\"));\r\n//\t\t\t\tusername = JOptionPane.showInputDialog(\"Enter Your username\");\r\n\t\t\t\tgameOnline = new GameOnline(username, ip, portUDP, portTCP);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase LEVEL_EDITOR:\r\n\t\t\t// If there is not already a Editor instance that exists\r\n\t\t\tif (levelEditor == null) {\r\n\t\t\t\t// Create a new Editor Instance\r\n\t\t\t\tlevelEditor = new LevelEditor();\r\n\t\t\t}\r\n\t\t\tlevelEditor.tick();\r\n\t\t\tbreak;\r\n\t\tcase LEADERBOARD:\r\n\t\t\tif (leaderBoard == null) {\r\n\t\t\t\tleaderBoard = new Leaderboard();\r\n\t\t\t}\r\n\t\t\tleaderBoard.tick();\r\n\t\t\tbreak;\r\n\t\tcase SPLASHSCREEN_LOADING:\r\n\t\t\tif (splashScreenLoading == null) {\r\n\t\t\t\tsplashScreenLoading = new SplashScreenLoading();\r\n\t\t\t}\r\n\t\t\tsplashScreenLoading.tick();\r\n\t\t\tbreak;\r\n\t\tcase OPTIONS:\r\n\t\t\tbreak;\r\n\t\tcase TESTSCREEN:\r\n\t\t\tif (testScreen == null) {\r\n\t\t\t\ttestScreen = new TestScreen();\r\n\t\t\t}\r\n\t\t\ttestScreen.tick();\r\n\t\t\tbreak;\r\n\t\tcase MAP_SELECT_SCREEN:\r\n\t\t\tif (mapSelectScreen == null) {\r\n\t\t\t\tmapSelectScreen = new MapSelectScreen();\r\n\t\t\t}\r\n\t\t\tmapSelectScreen.tick();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tlong currentTime = System.currentTimeMillis();\r\n\t\tif (currentTime > nextSecond) {\r\n\t\t\tnextSecond += 1000;\r\n\t\t\tframesInLastSecond = framesInCurrentSecond;\r\n\t\t\tframesInCurrentSecond = 0;\r\n\r\n\t\t\t// System.out.println(framesInLastSecond + \"fps\");\r\n\t\t}\r\n\r\n\t\tframesInCurrentSecond++;\r\n\r\n\t}", "private void initialSetup() {\n\t\tplaceNewPiece('a', 1, new Rook(board, Color.WHITE));\n placeNewPiece('b', 1, new Knight(board, Color.WHITE));\n placeNewPiece('c', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('d', 1, new Queen(board, Color.WHITE));\n placeNewPiece('e', 1, new King(board, Color.WHITE, this)); // 'this' refere-se a esta jogada\n placeNewPiece('f', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('g', 1, new Knight(board, Color.WHITE));\n placeNewPiece('h', 1, new Rook(board, Color.WHITE));\n placeNewPiece('a', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('b', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('c', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('d', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('e', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('f', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('g', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('h', 2, new Pawn(board, Color.WHITE, this));\n\n placeNewPiece('a', 8, new Rook(board, Color.BLACK));\n placeNewPiece('b', 8, new Knight(board, Color.BLACK));\n placeNewPiece('c', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('d', 8, new Queen(board, Color.BLACK));\n placeNewPiece('e', 8, new King(board, Color.BLACK, this));\n placeNewPiece('f', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('g', 8, new Knight(board, Color.BLACK));\n placeNewPiece('h', 8, new Rook(board, Color.BLACK));\n placeNewPiece('a', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('b', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('c', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('d', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('e', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('f', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('g', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('h', 7, new Pawn(board, Color.BLACK, this));\n\t}", "public static void boardInit() {\n ArrayList<Piece> white_piece_list = new ArrayList<>();\n ArrayList<Piece> black_piece_list = new ArrayList<>();\n ArrayList<Piece> piece_array = PieceFactory.createPieces();\n for(Piece p : piece_array)\n {\n if(p.getColor())\n {\n black_piece_list.add(p);\n }\n else\n {\n white_piece_list.add(p);\n }\n }\n white_player.setpieceList(white_piece_list);\n white_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER);\n black_player.setpieceList(black_piece_list);\n black_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER + PieceFactory.DIST_BETWEEN_PIECES);\n }", "public static void StartGame(ArrayList<String> names) {\n for (String name : names) {\n Player player = new Player();\n player.Name = name;\n player.Color = new Color(0,0,0);\n players.add(player);\n }\n generateColor();\n // Read XML\n readXML();\n GameRunning = true;\n trackDices=false;\n dicesEqual=0;\n gameboard=new GameBoard();\n gameboard.initGame();\n }", "public void setupGame(boolean cl) {\n currentScore = 0;\n GameWorldGenerator.generateWorld(this);\n setup = new GameSetup(this, cl);\n if (!cl) {\n new SetupWindow(this);\n }\n }", "public static void main(String[] args) {\r\n\t\t // SET UP: user input versus a heuristic monte carlo simulator vs a random player\r\n\t\t{\r\n\t\t\tPlayer[] players = new Player[]{new Player(\"user\", DecisionType.SCANNER), new Player(\"monte carlo\", DecisionType.HEURISTIC_MONTE_CARLO_10000), new Player(\"random\", DecisionType.RANDOM)};\r\n\t\t\tScanner scanner = new Scanner(System.in);\r\n\t\t\tplayers[0].setScanner(scanner);\r\n\r\n\t\t\tGame game = new Game(players, true, false);\r\n\t\t\tint numRounds = 10;\r\n\t\t\tfor (int i = 0; i < numRounds; i++) {\r\n\t\t\t\tgame.startNewRound();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// SET UP: three players (three user input players)\r\n//\t\t{\r\n//\t\t\tPlayer[] players = new Player[]{new Player(\"1\", DecisionType.SCANNER), new Player(\"2\", DecisionType.SCANNER), new Player(\"3\", DecisionType.SCANNER)};\r\n//\t\t\tScanner scanner = new Scanner(System.in);\r\n//\t\t\tplayers[0].setScanner(scanner);\r\n//\t\t\tplayers[1].setScanner(scanner);\r\n//\t\t\tplayers[2].setScanner(scanner);\r\n//\r\n//\t\t\tGame game = new Game(players, true, false);\r\n//\t\t\tint numRounds = 10;\r\n//\t\t\tfor (int i = 0; i < numRounds; i++) {\r\n//\t\t\t\tgame.startNewRound();\r\n//\t\t\t}\r\n//\t\t}\r\n\r\n\t\t// SET UP: a heuristic monte carlo player vs a monte carlo player vs a random player\r\n//\t\t{\r\n//\t\t\tPlayer[] players = new Player[]{new Player(\"heuristic monte carlo\", DecisionType.HEURISTIC_MONTE_CARLO_10000), new Player(\"monte carlo\", DecisionType.MONTE_CARLO_10000), new Player(\"random\", DecisionType.RANDOM)};\r\n//\t\t\tGame game = new Game(players, true, false);\r\n//\t\t\tint numRounds = 10;\r\n//\t\t\tfor (int i = 0; i < numRounds; i++) {\r\n//\t\t\t\tgame.startNewRound();\r\n//\t\t\t}\r\n//\t\t}\r\n\r\n\t\t// SET UP: three random players\r\n//\t\t{\r\n//\t\t\tPlayer[] players = new Player[]{new Player(\"1\", DecisionType.RANDOM), new Player(\"2\", DecisionType.RANDOM), new Player(\"3\", DecisionType.RANDOM)};\r\n//\t\t\tGame game = new Game(players, true, false);\r\n//\t\t\tint numRounds = 10;\r\n//\t\t\tfor (int i = 0; i < numRounds; i++) {\r\n//\t\t\t\tgame.startNewRound();\r\n//\t\t\t}\r\n//\t\t}\r\n\t}" ]
[ "0.68162376", "0.68041545", "0.6754566", "0.66115373", "0.6539697", "0.64950556", "0.6477035", "0.64480764", "0.6436621", "0.6421935", "0.64050263", "0.64027226", "0.6397024", "0.639566", "0.63340664", "0.6318089", "0.631808", "0.63133717", "0.63047385", "0.6292554", "0.6289445", "0.62549853", "0.6244762", "0.6237262", "0.6230846", "0.6230061", "0.6229697", "0.6224432", "0.62145996", "0.62131417", "0.6209497", "0.62014306", "0.61974084", "0.6185607", "0.6184445", "0.6160222", "0.6131029", "0.61215925", "0.6117302", "0.61154646", "0.61119705", "0.61028326", "0.6100366", "0.6099054", "0.60974884", "0.6096339", "0.60893327", "0.60885465", "0.6081165", "0.60697985", "0.6068848", "0.60673857", "0.60612565", "0.60611916", "0.6040921", "0.60408485", "0.6040549", "0.6038621", "0.6034938", "0.6032517", "0.6031916", "0.60124254", "0.60088813", "0.6007453", "0.6006454", "0.6000176", "0.59974724", "0.5996463", "0.59895253", "0.59875387", "0.5982552", "0.5979631", "0.59766895", "0.5974811", "0.5974405", "0.5966897", "0.59641445", "0.5952479", "0.5949191", "0.5948528", "0.59433025", "0.59382975", "0.593224", "0.59099954", "0.59094256", "0.5904295", "0.5903386", "0.5902177", "0.5895843", "0.58952725", "0.5894747", "0.5892606", "0.58925873", "0.5892518", "0.58912975", "0.5885009", "0.58820075", "0.58780044", "0.5877252", "0.58766425", "0.5873828" ]
0.0
-1
Makes another board which corresponds game board, this board is used to check winner
private void board() { for (int n = 0; n < ROW; n++) { for (int m = 0; m < COL; m++) { board[n][m] = 'X'; } } turnRemaining = 42; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void generateBoard(){\n\t}", "public static void makeBoardChess() {\r\n \r\n white = new AllPiece(\"White\");\r\n black = new AllPiece(\"Black\");\r\n \r\n }", "public void Makeboard() {\r\n\r\n Normalboard(new Point2(20, 300));\r\n Normalboard(new Point2(224, 391));\r\n Stingboard(new Point2(156, 209));\r\n Leftlboard(new Point2(88, 482));\r\n Rightboard(new Point2(292, 573));\r\n Regenerateboard(new Point2(360, 118));\r\n\r\n }", "void generateBoard(){\r\n rearrangeSolution();\r\n makeInitial();\r\n }", "public void newGame() {\n \tturn = PieceColor.White;\n \t\n \t//the middle are empty squares\n \tfor(int i = 2; i < 6; i++) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tsetPiece(j, i, new NoPiece(j, i));\n \t\t}\n \t}\n \t\n \t//pawns\n \tfor(int i = 0; i < 8; i++) {\n \t\t//make these pawns\n \t\tsetPiece(i, 1, new Pawn(i, 1, PieceColor.White, this));\n \t\tsetPiece(i, 6, new Pawn(i, 6, PieceColor.Black, this));\n \t}\n \t\n \t//white back row\n \tsetPiece(0, 0, new Rook(0, 0, PieceColor.White, this));\n \tsetPiece(1, 0, new Knight(1, 0, PieceColor.White, this));\n \tsetPiece(2, 0, new Bishop(2, 0, PieceColor.White, this));\n \tsetPiece(3, 0, new Queen(3, 0, PieceColor.White, this));\n \tsetPiece(4, 0, new King(4, 0, PieceColor.White, this));\n \tsetPiece(5, 0, new Bishop(5, 0, PieceColor.White, this));\n \tsetPiece(6, 0, new Knight(6, 0, PieceColor.White, this));\n \tsetPiece(7, 0, new Rook(7, 0, PieceColor.White, this));\n \t\n \t//black back row\n \tsetPiece(0, 7, new Rook(0, 7, PieceColor.Black, this));\n \tsetPiece(1, 7, new Knight(1, 7, PieceColor.Black, this));\n \tsetPiece(2, 7, new Bishop(2, 7, PieceColor.Black, this));\n \tsetPiece(3, 7, new Queen(3, 7, PieceColor.Black, this));\n \tsetPiece(4, 7, new King(4, 7, PieceColor.Black, this));\n \tsetPiece(5, 7, new Bishop(5, 7, PieceColor.Black, this));\n \tsetPiece(6, 7, new Knight(6, 7, PieceColor.Black, this));\n \tsetPiece(7, 7, new Rook(7, 7, PieceColor.Black, this));\n \t\n \t//store locations of king so they can be checked\n \twKing = new Square(4, 0);\n \tbKing = new Square(4, 7);\n }", "public abstract void createBoard();", "void makeMove(Square from, Square to) {\r\n assert isLegal(from, to);\r\n\r\n if (kingPosition().isEdge()) {\r\n _winner = WHITE;\r\n listOfMoves.push(mv(kingPosition(), sq(0, 0)));\r\n System.out.println(winner());\r\n checkRepeated();\r\n return;\r\n }\r\n\r\n Piece side = map.get(from);\r\n if (_turn == side.opponent()) {\r\n return;\r\n }\r\n listOfMoves.push(mv(from, to));\r\n revPut(map.get(from), to);\r\n map.put(from, EMPTY);\r\n map.put(to, side);\r\n board[from.col()][from.row()] = EMPTY;\r\n legalMoves(side);\r\n for (Square sq : map.keySet()) {\r\n if (map.get(sq) == side.opponent()) {\r\n if (to.isRookMove(sq)) {\r\n Square captureAble = to.rookMove(to.direction(sq), 2);\r\n if (to.adjacent(sq) && ((map.get(captureAble) == side)\r\n || (captureAble == THRONE\r\n && map.get(THRONE) == EMPTY))) {\r\n capture(to, captureAble);\r\n }\r\n }\r\n }\r\n }\r\n\r\n _turn = _turn.opponent();\r\n _moveCount += 1;\r\n checkRepeated();\r\n }", "private void newGame(){\n for (int i = 0; i < 6; i++) {\r\n for (int j = 0; j < 7; j++) {\r\n boardSquares[i][j].setBackground(Color.WHITE);\r\n boardRep[i][j] = 0;\r\n \r\n }\r\n }\r\n for (int i = 0; i < 7; i++) {\r\n currentFilled[i] = 0;\r\n moveSelect[i].setEnabled(true);\r\n }\r\n winnerText.setText(\"No Winner Yet\"); //clear winner text and 4s tracker\r\n for (int i = 0; i < 6; i++) {\r\n for (int j = 0; j < 4; j++) {\r\n horizontal4s[i][j] = 0;\r\n }\r\n }\r\n \r\n for (int i = 0; i < 3; i++) {\r\n for (int j = 0; j < 7; j++) {\r\n vertical4s[i][j] = 0;\r\n }\r\n }\r\n \r\n for (int i = 0; i < 3; i++) {\r\n for (int j = 0; j < 4; j++) {\r\n diagonalTLBR4s[i][j] = 0;\r\n diagonalTRBL4s[i][j] = 0;\r\n }\r\n }\r\n }", "public void initializeBoard() {\n\n\t\t/*\n\t\t * How the array coordinates align with the actual chess board\n\t\t * (row,col) \n\t\t * (7,0) ... ... ... \n\t\t * (7,7) ... ... ... \n\t\t * ... ... ... \n\t\t * (2,0) ...\n\t\t * (1,0) ... \n\t\t * (0,0) ... ... ... (0,7)\n\t\t */\n\n\t\tboolean hasMoved = false;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set white piece row\n\t\tboard[0][0] = new Piece('r', white, hasMoved, 0, 0, PieceArray.A_rookId);\n\t\tboard[0][1] = new Piece('n', white, hasMoved, 0, 1, PieceArray.B_knightId);\n\t\tboard[0][2] = new Piece('b', white, hasMoved, 0, 2, PieceArray.C_bishopId);\n\t\tboard[0][3] = new Piece('q', white, hasMoved, 0, 3, PieceArray.D_queenId);\n\t\tboard[0][4] = new Piece('k', white, hasMoved, 0, 4, PieceArray.E_kingId);\n\t\tboard[0][5] = new Piece('b', white, hasMoved, 0, 5, PieceArray.F_bishopId);\n\t\tboard[0][6] = new Piece('n', white, hasMoved, 0, 6, PieceArray.G_knightId);\n\t\tboard[0][7] = new Piece('r', white, hasMoved, 0, 7, PieceArray.H_rookId);\n\n\t\t// Set white pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[1][i] = new Piece('p', white, hasMoved, 1, i, i + 8);\n\t\t}\n\n\t\t// Set empty rows\n\t\tfor (int row = 2; row < 6; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\t// Set black pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[6][i] = new Piece('p', black, hasMoved, 6, i, i+8);\n\t\t}\n\n\t\t// Set black piece row\n\t\tboard[7][0] = new Piece('r', black, hasMoved, 7, 0, PieceArray.A_rookId);\n\t\tboard[7][1] = new Piece('n', black, hasMoved, 7, 1, PieceArray.B_knightId);\n\t\tboard[7][2] = new Piece('b', black, hasMoved, 7, 2, PieceArray.C_bishopId);\n\t\tboard[7][3] = new Piece('q', black, hasMoved, 7, 3, PieceArray.D_queenId);\n\t\tboard[7][4] = new Piece('k', black, hasMoved, 7, 4, PieceArray.E_kingId);\n\t\tboard[7][5] = new Piece('b', black, hasMoved, 7, 5, PieceArray.F_bishopId);\n\t\tboard[7][6] = new Piece('n', black, hasMoved, 7, 6, PieceArray.G_knightId);\n\t\tboard[7][7] = new Piece('r', black, hasMoved, 7, 7, PieceArray.H_rookId);\n\t}", "public static void winnerBoard(Player winner) {\r\n\t\tfor (int i = 0; i < Spaces.length; i++) {\r\n\t\t\tSpaces[i] = winner.piece[0];\r\n\t\t}\r\n\t}", "public void createBoard() {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n matrix[i][j] = WATER;\n }\n }\n }", "public boolean win() {\r\n\t\tfor (int n = 0; n < 3; n++) {\r\n\t\t\tfor (int m = 0; m < 7; m++) {\r\n\t\t\t\tif (board[n][m] != 'X') {\r\n\t\t\t\t\tif (board[n + 1][m] == board[n][m] && board[n + 2][m] == board[n][m]\r\n\t\t\t\t\t\t\t&& board[n + 3][m] == board[n][m]) {\r\n\t\t\t\t\t\tsquares[n][m].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n + 1][m].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n + 2][m].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n + 3][m].setText(\"X\");\r\n\r\n\t\t\t\t\t\twinnerChip = board[n][m];\r\n\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int n = 0; n < 6; n++) {\r\n\t\t\tfor (int m = 0; m < 4; m++) {\r\n\t\t\t\tif (board[n][m] != 'X') {\r\n\t\t\t\t\tif (board[n][m + 1] == board[n][m] && board[n][m + 2] == board[n][m]\r\n\t\t\t\t\t\t\t&& board[n][m + 3] == board[n][m]) {\r\n\t\t\t\t\t\tsquares[n][m].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n][m + 1].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n][m + 2].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n][m + 3].setText(\"X\");\r\n\t\t\t\t\t\twinnerChip = board[n][m];\r\n\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int n = 0; n < 3; n++) {\r\n\t\t\tfor (int m = 0; m < 4; m++) {\r\n\t\t\t\tif (board[n][m] != 'X') {\r\n\t\t\t\t\tif (board[n + 1][m + 1] == board[n][m] && board[n + 2][m + 2] == board[n][m]\r\n\t\t\t\t\t\t\t&& board[n + 3][m + 3] == board[n][m]) {\r\n\t\t\t\t\t\tsquares[n][m].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n + 1][m + 1].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n + 2][m + 2].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n + 3][m + 3].setText(\"X\");\r\n\r\n\t\t\t\t\t\twinnerChip = board[n][m];\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int n = 3; n < 6; n++) {\r\n\t\t\tfor (int m = 0; m < 4; m++) {\r\n\t\t\t\tif (board[n][m] != 'X') {\r\n\t\t\t\t\tif (board[n - 1][m + 1] == board[n][m] && board[n - 2][m + 2] == board[n][m]\r\n\t\t\t\t\t\t\t&& board[n - 3][m + 3] == board[n][m]) {\r\n\t\t\t\t\t\tsquares[n][m].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n - 1][m + 1].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n - 2][m + 2].setText(\"X\");\r\n\t\t\t\t\t\tsquares[n - 3][m + 3].setText(\"X\");\r\n\r\n\t\t\t\t\t\twinnerChip = board[n][m];\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\r\n\t}", "public Board twin() {\n Board newBoard = new Board(blocks); \n // Switch the first two blocks if they are not blank\n if (newBoard.blocks[0][0] != 0 && newBoard.blocks[0][1] != 0) {\n exchangeBlocks(newBoard.blocks, 0, 0, 0, 1);\n } else { // Switch the first two elements of the second row\n exchangeBlocks(newBoard.blocks, 1, 0, 1, 1);\n }\n return newBoard;\n }", "public void next(){\n\t\tboolean[][] newBoard = new boolean[rows][columns]; //create a temporary board, same size as real game board\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){\n\t\t\t\tnewBoard[i][j] = false; //set all to false\n\t\t\t}\n\t\t}\n\t\tint cellCounter = 0;\n\t\tfor (int i = (rows - 1); i >= 0; i--) {\n\t\t\tfor (int j = (columns - 1); j >= 0; j--) { //iterate through the game board\n\t\t\t\tfor (int k = (i - 1); k < (i + 2); k++) {\n\t\t\t\t\tfor (int m = (j - 1); m < (j + 2); m++) {//iterate around the testable element\n\t\t\t\t\t\tif (!(k == i && m == j)) {\n\t\t\t\t\t\t\tif (!((k < 0 || k > (rows - 1)) || (m < 0 || m > (columns - 1)))) { //if not out of bounds and not the original point\n\t\t\t\t\t\t\t\tif (theGrid[k][m]) {\n\t\t\t\t\t\t\t\t\tcellCounter++; //if a cell is alive at the surrounding point, increase the counter\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\tif (cellCounter == 3 || cellCounter == 2 && theGrid[i][j]) { //if meets the criteria\n\t\t\t\t\tnewBoard[i][j] = true; //create on new board\n\t\t\t\t}\n\t\t\t\tcellCounter = 0; //reset cell counter\n\t\t\t}\n\t\t}\n\t\t//transpose onto new grid\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){\n\t\t\t\tif(newBoard[i][j]){ //read temp board, set temp board data on real game board\n\t\t\t\t\ttheGrid[i][j] = true;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttheGrid[i][j] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void newGame(){\n\t\tsetUp.buildBoard(8,8);\n\t\tfor(int i = 0; i < boardBoundsRow * boardBoundsColumn; i++){\n\t\t\tJPanel selectedTile = (JPanel) userInterface.boardButtons.getComponent(i);\n\t\t\tselectedTile.removeAll();\n\t\t\tselectedTile.revalidate();\n\t\t}\n\t\tuserInterface.addBlackPiece();\n\t\tuserInterface.addWhitePiece();\n\t\tuserInterface.check.setText(\"You are not in check\");\n\t\tking.blackKingCheck = false;\n\t\tking.whiteKingCheck = false;\n\t\tturn = \"white\";\n\t\tString playerTurn = \"Player turn: \";\n\t\tuserInterface.turn.setText(playerTurn.concat(turn));\n\t\tundoMoveClass.clearStacks();\n\t}", "public void setBeginningBoard() {\n clearBooleanBoard();\n\n figBoard[0][0] = new Rook(\"white\", 00, white[0]);\n figBoard[0][1] = new Knight(\"white\", 01, white[1]);\n figBoard[0][2] = new Bishop(\"white\", 02, white[2]);\n figBoard[0][4] = new King(\"white\", 04, white[3]);\n figBoard[0][3] = new Queen(\"white\", 03, white[4]);\n figBoard[0][5] = new Bishop(\"white\", 05, white[2]);\n figBoard[0][6] = new Knight(\"white\", 06, white[1]);\n figBoard[0][7] = new Rook(\"white\", 07, white[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[0][i] = true;\n gA.getBoard()[0][i].setRotation(180);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[1][i] = true;\n gA.getBoard()[1][i].setRotation(180);\n figBoard[1][i] = new Pawn(\"white\", 10 + i, white[8]);\n }\n\n figBoard[7][0] = new Rook(\"black\", 70, black[0]);\n figBoard[7][1] = new Knight(\"black\", 71, black[1]);\n figBoard[7][2] = new Bishop(\"black\", 72, black[2]);\n figBoard[7][4] = new King(\"black\", 74, black[3]);\n figBoard[7][3] = new Queen(\"black\", 73, black[4]);\n figBoard[7][5] = new Bishop(\"black\", 75, black[2]);\n figBoard[7][6] = new Knight(\"black\", 76, black[1]);\n figBoard[7][7] = new Rook(\"black\", 77, black[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[7][i] = true;\n gA.getBoard()[7][i].setRotation(0);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[6][i] = true;\n gA.getBoard()[6][i].setRotation(0);\n figBoard[6][i] = new Pawn(\"black\", 60 + i, black[8]);\n }\n\n clearFallenFigures();\n clearBoardBackground();\n clearStringBoard();\n showBoard(); //shows the figures\n showScore();\n setBoardClickable();\n\n if (beginner % 2 == 0)\n this.turn = 0;\n else this.turn = 1;\n\n beginner++;\n\n numberOfBlackFallen = 0;\n numberOfWhiteFallen = 0;\n fallenFiguresWhite = new ArrayList<Figure>();\n fallenFiguresBlack = new ArrayList<Figure>();\n\n showCheck();\n showTurn();\n }", "public Board twin() {\n exchangeFirstKeys(); // exchange (0,0) with (0,1)\n Board twinBoard = new Board(tiles);\n exchangeFirstKeys(); // roll it back\n return twinBoard;\n }", "MainBoard createMainBoard();", "private final void setupNewGame() throws IOException {\n\t\tmessage.setText(\"Make your move!\");\n\n\t\twhiteTeam = PokemonDao.getRandomPokemons(TEAM_SIZE);\n\t\tblackTeam = PokemonDao.getRandomPokemons(TEAM_SIZE);\n\n\t\tcreateImages();\n\n\t\tint middleSquare = BOARD_SIZE/2;\n\n\t\tint i=0;\n\t\tfor(int col = middleSquare - whiteTeam.size()/2; col< middleSquare+ whiteTeam.size()/2;col++){\n\t\t\tJButton jButton = chessBoardSquares[col][0];\n\t\t\tImageIcon icon = new ImageIcon(whiteImages.get(i++));\n\t\t\tjButton.setIcon(icon);\n\t\t}\n\n\t\tint j=0;\n\t\tfor(int col = middleSquare - whiteTeam.size()/2; col< middleSquare+ whiteTeam.size()/2;col++){\n\t\t\tJButton jButton = chessBoardSquares[col][BOARD_SIZE-1];\n\t\t\tImageIcon icon = new ImageIcon(blackImages.get(j++));\n\t\t\tjButton.setIcon(icon);\n\t\t}\n\n\t\tframe.pack();\n\t\t//\t\tfor (int ii = 0; ii < BOARD_SIZE; ii++) {\n\t\t//\t\t\tfor (int jj = 0; jj < BOARD_SIZE; jj++) {\n\t\t//\t\t\t\tchessBoardSquares[ii][jj].setIcon(new ImageIcon(whiteImages.get(0)));\n\t\t//\t\t\t}\n\t\t//\t\t}\n\t\t//\t\t// set up the black pieces\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][0].setIcon(new ImageIcon(chessPieceImages[BLACK][STARTING_ROW[ii]]));\n\t\t//\t\t}\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][1].setIcon(new ImageIcon(chessPieceImages[BLACK][PAWN]));\n\t\t//\t\t}\n\t\t//\t\t// set up the white pieces\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][6].setIcon(new ImageIcon(chessPieceImages[WHITE][PAWN]));\n\t\t//\t\t}\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][7].setIcon(new ImageIcon(chessPieceImages[WHITE][STARTING_ROW[ii]]));\n\t\t//\t\t}\n\t}", "public Board createBoard(Square[][] grid) {Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\");assert grid != null; Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1053\"); Board board = new Board(grid); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1079\"); int width = board.getWidth(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1115\"); int height = board.getHeight(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1148\"); for (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tSquare square = grid[x][y];\n\t\t\t\tfor (Direction dir : Direction.values()) {\n\t\t\t\t\tint dirX = (width + x + dir.getDeltaX()) % width;\n\t\t\t\t\tint dirY = (height + y + dir.getDeltaY()) % height;\n\t\t\t\t\tSquare neighbour = grid[dirX][dirY];\n\t\t\t\t\tsquare.link(neighbour, dir);\n\t\t\t\t}\n\t\t\t}\n\t\t} Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1183\"); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1552\");return board ; }", "public Board twin() {\n short[] s1;\n short[] s2;\n if (blank_r == 0 && blank_c == 0) {\n s1 = new short[]{0, 1};\n s2 = new short[]{1, 0};\n } else {\n s1 = new short[]{0, 0};\n if (blank_r == 1 && blank_c == 0) s2 = new short[]{0, 1};\n else s2 = new short[]{1, 0};\n }\n return swapTiles1d(s1, s2);\n }", "private void initializeBoard() {\n\n squares = new Square[8][8];\n\n // Sets the initial turn to the White Player\n turn = white;\n\n final int maxSquares = 8;\n for(int i = 0; i < maxSquares; i ++) {\n for (int j = 0; j < maxSquares; j ++) {\n\n Square square = new Square(j, i);\n Piece piece;\n Player player;\n\n if (i < 2) {\n player = black;\n } else {\n player = white;\n }\n\n if (i == 0 || i == 7) {\n switch(j) {\n case 3:\n piece = new Queen(player, square);\n break;\n case 4:\n piece = new King(player, square);\n break;\n case 2:\n case 5:\n piece = new Bishop(player, square);\n break;\n case 1:\n case 6:\n piece = new Knight(player, square);\n break;\n default:\n piece = new Rook(player, square);\n }\n square.setPiece(piece);\n } else if (i == 1 || i == 6) {\n piece = new Pawn(player, square);\n square.setPiece(piece);\n }\n squares[j][i] = square;\n }\n }\n }", "public void setBoard() {\n bestPieceToMove = null;\n bestPieceFound = false;\n bestMoveDirectionX = 0;\n bestMoveDirectionY = 0;\n bestMoveFound = false;\n killAvailable = false;\n lightCounter = 12;\n darkCounter = 12;\n for (int y = 0; y < boardSize; y++) {\n for (int x = 0; x < boardSize; x++) {\n board[y][x] = new Field(x, y);\n if (y < 3 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.DARK, PieceType.MEN));\n } else if (y > 4 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.LIGHT, PieceType.MEN));\n }\n }\n }\n }", "private Board twinBySwitching(int x1, int y1, int x2, int y2) {\n int value1 = blocks[x1][y1];\n int value2 = blocks[x2][y2];\n\n int[][] newBlocks = new int[dimension()][dimension()];\n for (int i = 0; i < dimension(); i++){\n for (int j = 0; j < dimension(); j++) {\n if (i == x1 && j == y1) {\n newBlocks[i][j] = value2;\n } else if (i == x2 && j == y2) {\n newBlocks[i][j] = value1;\n } else {\n newBlocks[i][j] = blocks[i][j];\n }\n }\n }\n\n return new Board(newBlocks);\n }", "public Piece[][] createStandardChessboard(Player whitePlayer, Player blackPlayer) {\t\t\r\n\t\tPiece[][] start_board = {\r\n\t\t\t\t{new Rook(0,0,blackPlayer), new Knight(1,0,blackPlayer), new Bishop(2,0,blackPlayer), new Queen(3,0,blackPlayer),new King(4,0,blackPlayer), new Bishop(5,0,blackPlayer), new Knight(6,0,blackPlayer), new Rook(7,0,blackPlayer)},\r\n\t\t\t\t{new Pawn(0,1,blackPlayer), new Pawn(1,1,blackPlayer), new Pawn(2,1,blackPlayer), new Pawn(3,1,blackPlayer),new Pawn(4,1,blackPlayer), new Pawn(5,1,blackPlayer), new Pawn(6,1,blackPlayer), new Pawn(7,1,blackPlayer)},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{new Pawn(0,6,whitePlayer), new Pawn(1,6,whitePlayer), new Pawn(2,6,whitePlayer), new Pawn(3,6,whitePlayer),new Pawn(4,6,whitePlayer), new Pawn(5,6,whitePlayer), new Pawn(6,6,whitePlayer), new Pawn(7,6,whitePlayer)},\r\n\t\t\t\t{new Rook(0,7,whitePlayer), new Knight(1,7,whitePlayer), new Bishop(2,7,whitePlayer), new Queen(3,7,whitePlayer),new King(4,7,whitePlayer), new Bishop(5,7,whitePlayer), new Knight(6,7,whitePlayer), new Rook(7,7,whitePlayer)}\r\n\t\t};\r\n\t\treturn start_board;\r\n\t}", "public void makeBoard2d() {\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n this.board2d[i][j] = this.board[(i * 3) + j];\n }\n }\n }", "private void setDefaultBoard() throws TooManyPlayersException, InvalidColourException{\r\n\t\tif(getPlayers().size() != 2) {\r\n\t\t\tthrow new TooManyPlayersException(\"There are too many players, must only be 2\");\r\n\t\t}else {\r\n\t\t\tArrayList<Coordinate> pawnRankCoords, backRankCoords; //indexes for row numbers for ranks\r\n\t\t\tfor (Player player: getPlayers()) {\r\n\t\t\t\t\r\n\t\t\t\t//select what rank the pieces should be based on colour\r\n\t\t\t\tswitch (player.getColour()) {\r\n\t\t\t\tcase BLACK:\r\n\t\t\t\t\tpawnRankCoords = this.getRowCoordinates(1);\r\n\t\t\t\t\tbackRankCoords = this.getRowCoordinates(0);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase WHITE:\r\n\t\t\t\t\tpawnRankCoords = this.getRowCoordinates(getBoardArray().length-2);\r\n\t\t\t\t\tbackRankCoords = this.getRowCoordinates(getBoardArray().length-1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new InvalidColourException(\"Chess only has white or black colours, please reset\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfinal int NUM_PIECES_IN_RANK = 8;\r\n\t\t\t\t//create the pieces, assigning the player to them\r\n\t\t\t\tPiece[] specialPieces = {new Rook(player), new Knight(player), new Bishop(player), new Queen(player),\r\n\t\t\t\tnew King(player), new Bishop(player), new Knight(player), new Rook(player)};\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = 0; i < NUM_PIECES_IN_RANK; i++) {\r\n\t\t\t\t\tthis.setPiece(pawnRankCoords.get(i), new Pawn(player));\r\n\t\t\t\t\tthis.setPiece(backRankCoords.get(i), specialPieces[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void checkWinner(){\n \n if ((board[0][0] == 'X' && board[0][1] == 'X' && board[0][2] == 'X')||(board[1][0] == 'X' && board[1][1] == 'X' && board[1][2] == 'X')||(board[2][0] == 'X' && board[2][1] == 'X' && board[2][2] == 'X')){\n winner();\n }\n else if ((board[0][0] == 'X' && board[1][0] == 'X' && board[2][0] == 'X')||(board[0][1] == 'X' && board[1][1] == 'X' && board[2][1] == 'X')||(board[0][2] == 'X' && board[1][2] == 'X' && board[2][2] == 'X')){\n winner();\n }\n else if ((board[0][0] == 'X' && board[1][1] == 'X' && board[2][2] == 'X')||(board[0][2] == 'X' && board[1][1] == 'X' && board[2][0] == 'X')){\n winner();\n }\n else if ((board[0][0] == 'O' && board[0][1] == 'O' && board[0][2] == 'O')||(board[1][0] == 'O' && board[1][1] == 'O' && board[1][2] == 'O')||(board[2][0] == 'O' && board[2][1] == 'O' && board[2][2] == 'O')){\n winner();\n }\n else if ((board[0][0] == 'O' && board[1][0] == 'O' && board[2][0] == 'O')||(board[0][1] == 'O' && board[1][1] == 'O' && board[2][1] == 'O')||(board[0][2] == 'O' && board[1][2] == 'O' && board[2][2] == 'O')){\n winner();\n }\n else if ((board[0][0] == 'O' && board[1][1] == 'O' && board[2][2] == 'O')||(board[0][2] == 'O' && board[1][1] == 'O' && board[2][0] == 'O')){\n winner();\n }\n \n }", "public Board(Player p1, Player p2) {\r\n try {\r\n crownImage = ImageIO.read(new File(\"crown.jpg\"));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n checks = new int[8][8];\r\n currentPlayer = p2;\r\n nextPlayer = p1;\r\n whiteQueens = 0;\r\n whiteChecks = 12;\r\n blackQueens = 0;\r\n blackChecks = 12;\r\n winner = null;\r\n isGame = true;\r\n window(this);\r\n initializeBoard();\r\n swapPlayer();\r\n repaint();\r\n\r\n }", "public static Board makeBoard(final Player lightPlayer, final Player darkPlayer, final String FEN) {\n Board board = new Board(lightPlayer, darkPlayer);\n\n Tile[][] matrix = board.getMatrix();\n \n // rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 default ren\n \n /*\n Part 1: read in board state string and generate the pieces based off of their location\n */\n \n int i = 0, j = 0, k = 0;\n boolean boardComplete = false;\n for( ; !boardComplete ; k++){\n switch (FEN.charAt(k)){\n case ' ':\n boardComplete=true; // a _ means we are done with the board data\n break;\n case '/':\n i++; // a / means move to next rank/line\n j=0;\n break;\n case 'r': // ROOKS\n matrix[i][j].setPiece(new Rook(darkPlayer, true));\n j++;\n break;\n case 'R':\n matrix[i][j].setPiece(new Rook(lightPlayer, true));\n j++;\n break;\n case 'n': // KNIGHTS\n matrix[i][j].setPiece(new Knight(darkPlayer));\n j++;\n break;\n case 'N':\n matrix[i][j].setPiece(new Knight(lightPlayer));\n j++;\n break;\n case 'b': // BISHOPS\n matrix[i][j].setPiece(new Bishop(darkPlayer));\n j++;\n break;\n case 'B':\n matrix[i][j].setPiece(new Bishop(lightPlayer));\n j++;\n break;\n case 'q': // QUEENS\n matrix[i][j].setPiece(new Queen(darkPlayer));\n j++;\n break;\n case 'Q':\n matrix[i][j].setPiece(new Queen(lightPlayer));\n j++;\n break;\n case 'k': // KINGS\n matrix[i][j].setPiece(new King(darkPlayer, true));\n darkPlayer.setLocationOfKing(matrix[i][j].getPosition());\n j++;\n break;\n case 'K':\n matrix[i][j].setPiece(new King(lightPlayer, true));\n lightPlayer.setLocationOfKing(matrix[i][j].getPosition());\n j++;\n break;\n case 'p': // PAWNS\n matrix[i][j].setPiece(new Pawn(darkPlayer));\n j++;\n break;\n case 'P':\n matrix[i][j].setPiece(new Pawn(lightPlayer));\n j++;\n break;\n default: // SPACES BETWEEN PIECES\n j+=Character.getNumericValue(FEN.charAt(k));\n \n }\n }\n\n /*\n Part 2: load in character w or b to determine who's turn it is\n */\n \n board.setCurrentPlayer(FEN.charAt(k) == 'w' ? board.getLightPlayer() : board.getDarkPlayer());\n board.setEnemyPlayer(FEN.charAt(k) == 'w' ? board.getDarkPlayer() : board.getLightPlayer());\n \n k += 2; // skips over the turn char and the space after it putting FEN.charAt(k) at the next stage\n \n /*\n Part 3: read in castle availability string and set the boolean flag hasTakenFirstMove for each respective piece\n For rook and king hasTakenFirstMove is default to true. It is only set to false if the correct char's below are present.\n */\n boolean notFinishedCastle = true;\n for ( ; notFinishedCastle; k++) {\n switch (FEN.charAt(k)) {\n case '-':\n notFinishedCastle = false;\n break;\n case ' ':\n notFinishedCastle = false;\n break;\n case 'K':\n board.getMatrix()[board.getLightPlayer().getHomeRow()][Constants.ROOK_COLUMN_KINGSIDE].getPiece().setHasTakenFirstMove(false);\n board.getMatrix()[board.getLightPlayer().getHomeRow()][Constants.KING_COLUMN].getPiece().setHasTakenFirstMove(false);\n break;\n case 'Q':\n board.getMatrix()[board.getLightPlayer().getHomeRow()][Constants.ROOK_COLUMN_QUEENSIDE].getPiece().setHasTakenFirstMove(false);\n board.getMatrix()[board.getLightPlayer().getHomeRow()][Constants.KING_COLUMN].getPiece().setHasTakenFirstMove(false);\n break;\n case 'k':\n board.getMatrix()[board.getDarkPlayer().getHomeRow()][Constants.ROOK_COLUMN_KINGSIDE].getPiece().setHasTakenFirstMove(false);\n board.getMatrix()[board.getDarkPlayer().getHomeRow()][Constants.KING_COLUMN].getPiece().setHasTakenFirstMove(false);\n break;\n case 'q':\n board.getMatrix()[board.getDarkPlayer().getHomeRow()][Constants.ROOK_COLUMN_QUEENSIDE].getPiece().setHasTakenFirstMove(false);\n board.getMatrix()[board.getDarkPlayer().getHomeRow()][Constants.KING_COLUMN].getPiece().setHasTakenFirstMove(false);\n break;\n }\n \n if (k == FEN.length() - 1) {\n notFinishedCastle = false;\n }\n }\n \n return board;\n }", "public Board twin()\n {\n // int[][] twinBlocks = new int[N][N];??\n int temp;\n int[][] twinBlocks = convertTo2D(blocks);\n \n if (twinBlocks[0][0] != 0 && twinBlocks[0][1] != 0)\n {\n temp = twinBlocks[0][0];\n twinBlocks[0][0] = twinBlocks[0][1];\n twinBlocks[0][1] = temp;\n }\n \n else\n {\n temp = twinBlocks[1][0];\n twinBlocks[1][0] = twinBlocks[1][1];\n twinBlocks[1][1] = temp;\n }\n \n return new Board(twinBlocks);\n }", "private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}", "Board(Board board) {\n copyFrom(board);\n }", "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 static void boardInit() {\n ArrayList<Piece> white_piece_list = new ArrayList<>();\n ArrayList<Piece> black_piece_list = new ArrayList<>();\n ArrayList<Piece> piece_array = PieceFactory.createPieces();\n for(Piece p : piece_array)\n {\n if(p.getColor())\n {\n black_piece_list.add(p);\n }\n else\n {\n white_piece_list.add(p);\n }\n }\n white_player.setpieceList(white_piece_list);\n white_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER);\n black_player.setpieceList(black_piece_list);\n black_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER + PieceFactory.DIST_BETWEEN_PIECES);\n }", "public void resetBoard() {\n piece = 1;\n b = new Board(9);\n board = b.getBoard();\n\n board2d = new int[3][3];\n makeBoard2d();\n\n }", "public void create2(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\n\n\t\t//creating door in the rooms\n\t\tfor(int i = 0; i <this.Door.length; i++){\n\t\t\tfor(int p = 0; p < this.Door.length; p++){\n\t\t\t\tthis.Door[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of Door making board\n\t\tthis.Door[1][1] = 1;\n\n\t\t//creating stairs to transport to room3\n\t\tfor(int i = 0; i <this.Stairs.length; i++){\n\t\t\tfor(int p = 0; p < this.Stairs.length; p++){\n\t\t\t\tthis.Stairs[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of Door making board\n\t\tthis.Stairs[18][18] = 1;\n\n\t\t//creating board to keep track of ari\n\t\tfor(int i = 0; i <this.Ari.length; i++){\n\t\t\tfor(int p = 0; p < this.Ari.length; p++){\n\t\t\t\tthis.Ari[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}\n\t\tthis.Ari[7][11] = 1;//putts ari there\n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 3; i< 4 ; i++){\n\t\t\tfor(int p = 1; p < 18; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 7 ; i++){\n\t\t\tfor(int p = 19; p > 1; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 9; i< 10 ; i++){\n\t\t\tfor(int p = 1; p < 18; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 12; i< 13 ; i++){\n\t\t\tfor(int p = 19; p > 1; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 1; p < 18; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes\n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{\n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}", "private void updateBigGameBoardForNextMove(){\n changeLetterAndVisuals();\n /*\n This next step is essential to the game:\n The player just chose a position on a smallGameBoard; this position is where he will\n be able to choose on the big board. For example, if player 1 puts an x in the top-left\n corner of a small game, then player 2 should play in the top-left small game (provided\n it is not already won).\n */\n nextGamePosition = chosenButton.getButtonPosition();\n nextGame = getGame(nextGamePosition);\n //If the next game is already won, then the next player can choose anywhere\n if (checkGameWin(nextGame.getLettersOfAllButtons())){\n for (ButtonClass b : allButtons) {\n b.setAvailable(true);\n }\n for(SmallGameBoard game: games){\n if (game.getGameBoardColor() == R.color.blackTransparent){\n game.changeGameColor(R.color.black);\n }\n }\n } else {\n //If next game is not won, then the player must play on the next game board\n setAvailableButtons(nextGamePosition);\n //Sets all boards besides the next game board to half transparent\n for (SmallGameBoard game: games){\n if(game.getGameBoardColor() == R.color.black){\n game.changeGameColor(R.color.blackTransparent);\n }\n }\n nextGame.changeGameColor(R.color.black);\n }\n //For playerVsComputer, this is when the computer makes its move\n if (!activity.getPlayerVsPlayer() && !computerIsMoving){\n computerMove(activity.getDifficulty());\n computerIsMoving = false;\n }\n }", "public static void main(String[] args){\n Board b1 = new Board(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 0}});\n assert b1.dimension() == 3;\n\n assert b1.hamming() == 0 : \"b1 hamming is: \" + b1.hamming();\n assert b1.manhattan() == 0;\n assert b1.isGoal();\n\n Board b2 = new Board(new int[][]{{5, 2, 3}, {4, 1, 6}, {7, 8, 0}});\n assert b2.hamming() == 2;\n assert b2.manhattan() == 4;\n assert !b2.isGoal();\n assert !b1.equals(b2);\n\n Board b3 = new Board(new int[][]{{4, 2, 3}, {5, 1, 6}, {7, 8, 0}});\n assert b3.twin().equals(b2);\n\n Board b4 = new Board(new int[][]{{4, 2, 3}, {5, 0, 6}, {7, 8, 1}});\n for (Board board: b4.neighbors() ){\n System.out.println(board);\n }\n\n Board b5 = new Board(new int[][]{{0, 1, 3}, {4, 2, 5}, {7, 8, 6}});\n assert b5.manhattan() == 4;\n\n Board b6 = new Board(new int[][]{{5, 8, 7}, {1, 4, 6}, {3, 0, 2}});\n assert b6.manhattan() == 17;\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}", "public Board twin() {\n \tint[][] newBlocks = new int[dimension()][dimension()];\n \tfor (int row = 0; row < dimension(); row++) {\n \t\tfor (int col = 0; col < dimension(); col++) {\n \t\t\tnewBlocks [row][col] = blocks[row][col];\n \t\t}\n \t}\n \tboolean swappable = false;\n \t//Swap 2 blocks that are not 0\n \tint r1 = 0;\n \tint c1 = 0;\n \tint r2 = 0;\n \tint c2 = 0;\n \twhile ( !swappable ){\n \t\tr1 = StdRandom.uniform(dimension());\n \t\tc1 = StdRandom.uniform(dimension());\n \t\tif ( newBlocks[r1][c1] == 0 )\n \t\t\tcontinue;\n \t\tfor (int i = -1; i <= 1; i+=2){\n \t\t\tif ( c1 + i < 0 || c1 + i > dimension()-1 ){\n \t\t\t\tcontinue;\n \t\t\t} else if ( newBlocks[r1][c1+i] != 0 ){\n \t\t\t\tr2 = r1;\n \t\t\t\tc2 = c1 + i;\n \t\t\t\tswappable = true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \t\n \tint temp = newBlocks[r1][c1];\n \tnewBlocks[r1][c1] = newBlocks[r2][c2];\n \tnewBlocks[r2][c2] = temp;\n \t\n \t//Create new board to return\n \treturn new Board(newBlocks, moves);\n }", "@Override\n public BoardFramework copyBoard() {\n List<List<GamePiece>> pieceCopies= new ArrayList<>();\n for(List<GamePiece> row: myGamePieces){\n List<GamePiece> rowOfPieceCopies = new ArrayList<>();\n for(GamePiece piece: row){\n rowOfPieceCopies.add(piece.copy());\n }\n pieceCopies.add(rowOfPieceCopies);\n }\n return new Board(pieceCopies,new ArrayList<>(myNeighborhoods),myEmptyState);\n }", "public static void main(String[] args) {\n Board b = new Board();\n Scanner in = new Scanner(System.in);\n\n Random r = new Random(System.currentTimeMillis());\n int start = Math.abs(r.nextInt()) % 2;\n int init = start;\n // Daca start este 1, incepe calculatorul, altfel jucatorul\n PLAYER perspective = PLAYER.PLAY_AS_X;\n // X mereu va avea prima mutare\n\n\n while (b.GetWinner() == WINNER.PLAYER_NONE) {\n Pair current_move;\n if (start == 1) {\n System.out.println(\"Computer is thinking...\");\n Board newBoard = new Board(b);\n current_move = PlayMove(newBoard, perspective);\n System.out.println(\"Computer chose move: (\" + current_move.first +\" \" + current_move.second + \")\");\n } else {\n int row, col;\n System.out.println(\"It's your turn, enter move:\");\n do {\n System.out.println(\"Row:\");\n row = in.nextInt();\n } while (row < 0 || row > 2);\n do {\n System.out.println(\"Column:\");\n col = in.nextInt();\n } while (col < 0 || col > 2);\n current_move = new Pair(row, col);\n }\n if (b.GetMark(current_move.first, current_move.second) != MARK.NONE) {\n System.out.println(\"Invalid move, exiting\");\n return;\n }\n if (perspective == PLAYER.PLAY_AS_X) {\n b.MarkX(current_move.first, current_move.second);\n } else {\n b.MarkZero(current_move.first, current_move.second);\n }\n start = 1 - start;\n perspective = (perspective == PLAYER.PLAY_AS_X) ? PLAYER.PLAY_AS_ZERO : PLAYER.PLAY_AS_X;\n System.out.println(\"Current board is:\\n\" + b);\n }\n\n System.out.println(\"Game is finished\");\n if (b.GetWinner() == WINNER.PLAYER_X) {\n if (init == 1) {\n System.out.println(\"Computer won\");\n return;\n }\n System.out.println(\"Player won, you should at most draw, keep working on the AI\");\n return;\n }\n if (b.GetWinner() == WINNER.PLAYER_ZERO) {\n if (init == 1) {\n System.out.println(\"Player won, you should at most draw, keep working on the AI\");\n return;\n }\n System.out.println(\"Computer won\");\n return;\n }\n System.out.println(\"Draw, Well Done!\");\n return;\n }", "public Board twin() {\n int row1 = -1; // Row value of first tile to be exchanged\n int col1 = -1; // Column value of first tile to be exchanged\n int row2 = -1; // Row value of second tile to be exchanged\n int col2 = -1; // Column value of second tile to be exchanged\n int count = 0; // Number of non-empty tiles found to exchange\n\n search:\n for (int i = 0; i < N; i++) // For each row in tiles grid\n for (int j = 0; j < N; j++) { // For each tile space in row\n if (tiles[i][j] != 0) { // If space contains a tile\n if (count == 0) { // If no tiles have been found yet\n row1 = i; // Set row value of first tile to be exchanged\n col1 = j; // Set column value of first tile to be exchanged\n count++;\n }\n else if (count == 1) { // Otherwise, if one tile has already been found to be exchanged\n row2 = i; // Set row value of second tile to be exchanged\n col2 = j; // Set column value of second tile to be exchanged\n break search; // End search\n }\n }\n }\n return swap(row1, col1, row2, col2); // Exchange the two located tiles by passing their row/col values to the swap method and return the resulting board\n }", "public static void createBoard() \n\t{\n\t\tfor (int i = 0; i < tictactoeBoard.length; i++) \n\t\t{\n\t\t\ttictactoeBoard[i] = '-';\n\t\t}\n\t}", "public Move composeMove(Player player, Board board) {\n Move move = new Move();\n System.out.println(\"Choix des billes à déplacer\");\n System.out.println(\"Instructions :\");\n System.out.println(\"- Veuillez saisir successivemement les coordonnée des billes à déplacer\");\n System.out.println(\"- Commencez toujours par une extrémité du groupe de bille que vous sélectionnez\");\n System.out.println(\"- Pour chaque bille saisissez sa première coordonnée puis faites ENTREE avant de rentrer la seconde\");\n System.out.println(\"- Entre chaque saisie il vous sera demandé si vous souhaitez continuer.\");\n System.out.println();\n chooseMarble(move,1,board,player);\n if(askContinue()){\n chooseMarble(move,2,board,player);\n if(askContinue()){\n chooseMarble(move,3,board,player);\n }\n }\n move.setMoveDirection(chooseDirection());\n System.out.println(\"\");\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n return move;\n }", "public void fillBoard() {\n List<Integer> fifteen = ArrayUtils.intArrayToList(SOLVED_BOARD);\n Collections.shuffle(fifteen, this.random);\n this.emptyTileIndex = fifteen.indexOf(0);\n this.matrix = fifteen.stream().mapToInt(i -> i).toArray();\n }", "public void createNewGame() {\n\t\tfor(int n = 0; n < 8; n++){\n\t\t\tfor(int j = 0; j < 8; j++){\n\t\t\t\tif ( n % 2 == j % BLACK_PAWN ) {\n\t\t\t\t\tif (n < 3)\n\t\t\t\t\t\tarr[n][j] = RED_PAWN;\n\t\t\t\t\telse if (n > 4)\n\t\t\t\t\t\tarr[n][j] = BLACK_PAWN;\n\t\t\t\t\telse\n\t\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t } \n\t\t\t\telse\n\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t\t}\n\t\t}\n\t}", "private void prepareBoard(){\n gameBoard.arrangeShips();\n }", "public static int[][] createBoard() {\r\n\t\t\r\n\t\tint[][] board = new int [8][8];\r\n\t\t//printing the red solduers\r\n\t\tfor (int line =0,column=0;line<3;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//printing the blu solduers\r\n\t\tfor (int line =5,column=0;line<8;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = -1;\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\treturn board;\r\n\t}", "@Override\n\tpublic void makeMove(Game game) \n\t{\n\t\t\n\t\tint row1,col1,row2,col2;\n\t\tCheckers tttGame = (Checkers) game;\n\t\t\n\t\tboolean first = true;\n\n\t\t\tcorrectmove= false;\n\t\t\tSystem.out.println(\"Insert target (row,column) and destination (row, column) ([0,7])\");\n\n\t\t\trow1 = tttGame.x1;\n\t\t\tcol1 = tttGame.y1;\n\t\t\trow2 = tttGame.x2;\n\t\t\tcol2 = tttGame.y2;\n\t\t\tSystem.out.println(row1 + \" \" + col1 + \" \" + row2 + \" \" + col2 + \" \" + role);\n\t\t\t\n\t\t\tfirst=false;\n\t\tcorrectmove= tttGame.isValidCell(row1, col1, row2, col2,role);\n\t\tSystem.out.println(correctmove);\n\n\t\tif(correctmove)\n\t\t{\n\t\t\ttttGame.board[row2][col2]= tttGame.board[row1][col1];\n\t\t\tif(row2==0 && role==0) \n\t\t\t{\n\t\t\t\tif(role==0) tttGame.board[row2][col2]= 2;\n\t\t\t\telse tttGame.board[row2][col2]= -2;\n\t\t\t}\n\t\t\telse if(row2==7 && role==1) \n\t\t\t{\n\t\t\t\tif(role==0) tttGame.board[row2][col2]= 2;\n\t\t\t\telse tttGame.board[row2][col2]= -2;\n\t\t\t}\n\t\t\ttttGame.board[row1][col1]=0;\n\t\t\tif(abs(row1-row2)==2)\n\t\t\t{\n\t\t\t\tint x= (row1+ row2)/2;\n\t\t\t\tint y= (col1+ col2)/2;\n\t\t\t\ttttGame.board[x][y]=0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"invalid move!\");\n\t\t}\n\t\t\n//\t\ttttGame.board[row][col] = role;\n\t}", "public static void createBoard() {\n Checkers[] CheckerBoard = new Checkers[24];\n CheckerBoard[0] = new Checkers(0,1,\"black\");\n CheckerBoard[1] = new Checkers(0,3,\"black\");\n CheckerBoard[2] = new Checkers(0,5,\"black\");\n CheckerBoard[3] = new Checkers(0,7,\"black\");\n CheckerBoard[4] = new Checkers(1,0,\"black\");\n CheckerBoard[5] = new Checkers(1,2,\"black\");\n CheckerBoard[6] = new Checkers(1,4,\"black\");\n CheckerBoard[7] = new Checkers(1,6,\"black\");\n CheckerBoard[8] = new Checkers(2,1,\"black\");\n CheckerBoard[9] = new Checkers(2,3,\"black\");\n CheckerBoard[10] = new Checkers(2,5,\"black\");\n CheckerBoard[11] = new Checkers(2,7,\"black\");\n CheckerBoard[12] = new Checkers(5,1,\"red\");\n CheckerBoard[13] = new Checkers(5,3,\"red\");\n CheckerBoard[14] = new Checkers(5,5,\"red\");\n CheckerBoard[15] = new Checkers(5,7,\"red\");\n CheckerBoard[16] = new Checkers(6,0,\"red\");\n CheckerBoard[17] = new Checkers(6,2,\"red\");\n CheckerBoard[18] = new Checkers(6,4,\"red\");\n CheckerBoard[19] = new Checkers(6,6,\"red\");\n CheckerBoard[20] = new Checkers(7,1,\"red\");\n CheckerBoard[21] = new Checkers(7,3,\"red\");\n CheckerBoard[22] = new Checkers(7,5,\"red\");\n CheckerBoard[23] = new Checkers(7,7,\"red\");\n\n\n\n }", "private void createBoard() {\n\t// An array of rows containing rows with squares are made\n\t\tfor (int i = 0; i < squares.length; i++) {\n\t \trows[i] = new Row(squares[i]);\n\t\t}\n\n\n\t// An array of columns containing columns with squares are made\n\t\tSquare[] columnArray = new Square[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int row = 0; row < size; row++) {\n\t\t\t\tcolumnArray[row] = squares[row][i];\n\t\t }\n\t\t columns[i] = new Column(columnArray);\n\t\t columnArray = new Square[size];\n\t\t}\n\n\n\t\tSquare[] boxArray;\n\t\tint counter;\n\t\t// Box nr i\n\t\tfor (int i = 0; i < size; i = i + height) {\n\t\t // Box nr j\n\t\t for (int j = 0; j < size; j = j + length) {\n\t\t\t\tcounter = 0;\n\t\t\t\tboxArray = new Square[size];\n\t\t\t\tint rowIndex = (i / height) * height;\n\t\t\t\tint columnIndex = (j / length) * length;\n\t\t\t\t// Row nr k\n\t\t\t\tfor (int k = rowIndex; k < rowIndex + height; k++) {\n\t\t\t\t // Column nr l\n\t\t\t\t for (int l = columnIndex; l < columnIndex + length; l++) {\n\t\t\t\t\t\tboxArray[counter] = squares[k][l];\n\t\t\t\t\t\tcounter++;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tboxes[j/length][i/height] = new Box(boxArray);\n\t\t }\n\t\t}\t\n\t\tcreatePointers();\n }", "public void setBoard(){\n \n\t m_Pieces[3][3]= WHITE_PIECE;\n m_Pieces[4][4]= WHITE_PIECE;\n m_Pieces[3][4]= BLACK_PIECE;\n m_Pieces[4][3]= BLACK_PIECE;\n for(int x=0;x<WIDTH;x++){\n for(int y=0;y<HEIGHT;y++){\n if(m_Pieces[x][y]==null){\n m_Pieces[x][y]=NONE_PIECE;\n }\n }\n }\n }", "public void resetBoard() {\n //sets current board to a new board\n currentBoard = new Board(7, 6);\n\n //sets all text fields back to white\n for (int i = 0; i < currentBoard.getSizeX(); i++) {\n for (int v = 0; v < currentBoard.getSizeY(); v++) {\n squares[i][v].setBackground(Color.white);\n }\n }\n //sets turn to true (first player)\n turn = true;\n }", "private void fillBoard() {\n\n boardMapper.put(1, new int[]{0, 0});\n boardMapper.put(2, new int[]{0, 1});\n boardMapper.put(3, new int[]{0, 2});\n boardMapper.put(4, new int[]{1, 0});\n boardMapper.put(5, new int[]{1, 1});\n boardMapper.put(6, new int[]{1, 2});\n boardMapper.put(7, new int[]{2, 0});\n boardMapper.put(8, new int[]{2, 1});\n boardMapper.put(9, new int[]{2, 2});\n\n }", "public void newBoard(LiteBoard board) {\n }", "public static void main(String[]args){\n Scanner reader = new Scanner(System.in);\n TTTBoard board = new TTTBoard();\n \n // Display the empty board\n System.out.println(board);\n\n // Let the non-CPU go first\n int turn = 1;\n int a = 0;\n int b = 0;\n char player;\n\n // Loop while there is no winner and the board is not full \n while (board.getWinner() == '-' && !board.full()){\n if (turn%2!=0){\n player = 'X';\n \n // Prompt the user for a move\n System.out.println(\"Your turn\");\n System.out.print(\"Enter the row and column[1-3, space, 1-3]: \");\n \n // Read the move\n int row = reader.nextInt();\n int column = reader.nextInt();\n \n // Attempt the move\n // If the move is illegal\n // display an error message\n // Else\n // display the board and switch players\n boolean success = board.placeXorO(player, row, column);\n if (!success)\n System.out.println(\"Error: cell already occupied!\");\n else{\n System.out.println(board);\n }\n }else{\n player = 'O';\n int row = board.getRow();\n int column = board.getColumn();\n boolean cool = board.placeXorO(player, row, column);\n while (!cool){\n row = (int) (Math.random()*3+1);\n column = (int) (Math.random()*3+1);\n cool = board.placeXorO(player, row, column);\n }System.out.println(board);\n }turn++;\n }\n \n // Display the results \n char winner = board.getWinner();\n if (winner != '-'){\n System.out.println(winner + \"s win!\");\n }else{\n System.out.println(\"It's a draw!\");\n }\n }", "void setBoard(Board board);", "void generateNewBoard() {\n createAvailableDice();\n\n // Add them to board\n generateBoardLayout();\n }", "private void getWinner() {\r\n int nWhite = 0, nBlack = 0;\r\n if(nextPlayer.getChecks() == 0 && nextPlayer.getQueens() == 0){\r\n winner = currentPlayer;\r\n }\r\n else if(currentPlayer.getQueens() == nextPlayer.getQueens()){\r\n for (int i = 1; i<8; i++){\r\n for (int x = 0; x<8; x++) {\r\n if (checks[i][x] == 1) nBlack++;\r\n if (checks[7 - i][x] == 2) nWhite++;\r\n }\r\n if (nWhite>nBlack) winner = getPlayer(WHITE);\r\n else if(nBlack>nWhite)winner = getPlayer(BLACK);\r\n nWhite = 0;\r\n nBlack = 0;\r\n }\r\n }\r\n else if (currentPlayer.getQueens() > nextPlayer.getQueens()){ winner = currentPlayer;}\r\n else{winner = nextPlayer; }\r\n }", "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 }", "public void create3(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\n\n\t\t//creating stairs to connect rooms\n\t\tfor(int i = 0; i <this.Stairs.length; i++){\n\t\t\tfor(int p = 0; p < this.Stairs.length; p++){\n\t\t\t\tthis.Stairs[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}\n\t\tthis.Stairs[1][1] = 1;\n\n\t\t//creating board to keep track of garret\n\t\tfor(int i = 0; i <this.Garret.length; i++){\n\t\t\tfor(int p = 0; p < this.Garret.length; p++){\n\t\t\t\tthis.Garret[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of garret board\n\t\tthis.Garret[18][10] = 1;//putts garret there\n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 1; i< 6 ; i++){\n\t\t\tfor(int p = 7; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 7 ; i++){\n\t\t\tfor(int p = 7; p > 4; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 11 ; i++){\n\t\t\tfor(int p = 4; p < 5; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 10; i< 11 ; i++){\n\t\t\tfor(int p = 5; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 11; i< 15 ; i++){\n\t\t\tfor(int p = 7; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 7; p > 3; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 14 ; i++){\n\t\t\tfor(int p = 1; p < 4; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 12; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 5; i< 9 ; i++){\n\t\t\tfor(int p = 12; p < 13; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 14 ; i++){\n\t\t\tfor(int p = 7; p < 12; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 16 ; i++){\n\t\t\tfor(int p = 12; p < 13; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 9; i< 10 ; i++){\n\t\t\tfor(int p = 12; p < 19; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes\n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{\n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}", "public Board twin() {\n if (tiles[0][0] != 0 && tiles[0][1] != 0)\n return new Board(tiles, new Position(0, 0), new Position(0, 1));\n else\n return new Board(tiles, new Position(1, 0), new Position(1, 1));\n }", "public void newGame() {\n\n //reset game board before initializing newgame\n clearGame();\n \n whiteplayer = new Player(\"white\", chessboard, this);\n blackplayer = new Player(\"black\", chessboard, this);\n colorsTurn = \"white\";\n gamelog.logCurrentTurn(colorsTurn);\n\n }", "public static void main(String[] args) {\r\n\t\tint[][] blocks = new int[3][3];\r\n\t\tint k = 0;\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\tfor (int j = 0; j < 3; j++) {\r\n\t\t\t\tblocks[i][j] = k;\r\n\t\t\t\tk++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tBoard board = new Board(blocks);\r\n\t\tSystem.out.println(board.isGoal());\r\n\t\tSystem.out.println(board.hamming());\r\n\t\tSystem.out.println(board.manhattan());\r\n\r\n\t\tint[][] blocks2 = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 0 } };\r\n\t\tBoard board2 = new Board(blocks2);\r\n\t\tSystem.out.println(board2.isGoal());\r\n\t\tSystem.out.println(board2.hamming());\r\n\t\tSystem.out.println(board2.manhattan());\r\n\r\n\t\tint[][] blocks3 = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 0, 8 } };\r\n\t\tBoard board3 = new Board(blocks3);\r\n\t\tSystem.out.println(board3.isGoal());\r\n\t\tSystem.out.println(board3.hamming());\r\n\t\tSystem.out.println(board3.manhattan());\r\n\r\n\t\tint[][] blocks4 = { { 1, 2, 3 }, { 4, 5, 6 }, { 0, 8, 7 } };\r\n\t\tBoard board4 = new Board(blocks4);\r\n\t\tSystem.out.println(board4.isGoal());\r\n\t\tSystem.out.println(board4.hamming());\r\n\t\tSystem.out.println(board4.manhattan());\r\n\r\n\t\tint[][] blocks5 = { { 8, 1, 3 }, { 4, 0, 2 }, { 7, 6, 5 } };\r\n\t\tBoard board5 = new Board(blocks5);\r\n\t\tSystem.out.println(board5.isGoal());\r\n\t\tSystem.out.println(board5.hamming());\r\n\t\tSystem.out.println(board5.manhattan());\r\n\t\tSystem.out.println(board5.toString());\r\n\t\tList<Board> neighborsList = board5.neighborsList();\r\n\t\tfor (Board b : neighborsList) {\r\n\t\t\tSystem.out.println(b.toString());\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n int[][] arr = {{1, 2, 3}, {4, 0, 5}, {6, 7, 8}};\n int[][] arr2 = {{1, 2, 3}, {5, 0, 4}, {6, 7, 8}};\n Board b = new Board(arr);\n Board b2 = new Board(arr2);\n System.out.println(b.toString());\n System.out.println(b.hamming());\n System.out.println(b.equals(b2));\n int[][] arr3 = {{8, 1, 3}, {4, 0, 2}, {7, 6, 5}};\n Board b3 = new Board(arr3);\n System.out.println(b3.manhattan());\n System.out.println(b3.hamming());\n System.out.println(\"----------original-------------------\");\n System.out.println(b3);\n System.out.println(\"----------neighbors-------------------\");\n\n\n for (Board x: b3.neighbors()) {\n System.out.println(x.toString());\n }\n\n System.out.println(\"----------twin-------------------\");\n int[][] arr4 = {{1, 0}, {3, 2}};\n Board b4 = new Board(arr4);\n System.out.println(b4.twin());\n\n\n }", "private void win() {\r\n Player winner = board.win();\r\n if (winner == null)\r\n return;\r\n\r\n int winner_number;\r\n Label winner_info;\r\n Label loser_info;\r\n if (winner.getId() == 'U') {\r\n winner_info = player1info;\r\n loser_info = player2info;\r\n winner_number = 1;\r\n }\r\n else {\r\n winner_info = player2info;\r\n loser_info = player1info;\r\n winner_number = 2;\r\n }\r\n\r\n winner_info.setFont(new Font(\"Segoe UI Semibold\", 20));\r\n winner_info.setText(\"You Won!!\");\r\n loser_info.setFont(new Font(\"Segoe UI Semibold\", 20));\r\n loser_info.setText(\"You Lost :)\");\r\n\r\n for (int i = 0; i < 17; ++i)\r\n for (int j = 0; j < 17; j++) {\r\n String id = \"#cell\" + ((i < 10) ? \"0\" + i : i) + ((j < 10) ? \"0\" + j : j);\r\n AnchorPane cell = (AnchorPane) (play.getScene().lookup(id));\r\n // remove functionality\r\n cell.setOnMouseClicked(null);\r\n cell.setOnMouseEntered(null);\r\n cell.setOnMouseExited(null);\r\n if (!cup_is_on) {\r\n if (i == 6) {\r\n if (j == 6) {\r\n cell.setStyle(\"-fx-background-color: mediumaquamarine\");\r\n Label label = new Label(\"try\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n else if (j == 8) {\r\n cell.setStyle(\"-fx-background-color: mediumaquamarine\");\r\n Label label = new Label(\"again?\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n }\r\n else if(i == 8) {\r\n if (j == 6) {\r\n cell.setStyle(\"-fx-background-color: limegreen\");\r\n Label label = new Label(\"YES\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n label.setOnMouseClicked(event -> {\r\n try {\r\n gotoNewGame(new Player(board.getPlayer1().getName(), 'U', 10),\r\n new Player(board.getPlayer2().getName(), 'D', 10));\r\n } catch (IOException ioException) { ioException.printStackTrace(); }\r\n });\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n else if (j == 8) {\r\n cell.setStyle(\"-fx-background-color: red\");\r\n Label label = new Label(\"NO\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n label.setOnMouseClicked(event -> {\r\n try { gotoGameModes(); } catch (IOException ioException) {\r\n ioException.printStackTrace();\r\n }\r\n });\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (cup_is_on)\r\n cupOptimizer(winner_number);\r\n }", "public void setPieces(){\r\n Pawn[] arrwPawn = new Pawn[8];\r\n for (int i=0 ; i<8 ; i++){\r\n pos.setPosition(6,i);\r\n arrwPawn[i] = new Pawn (pos , piece.Colour.WHITE);\r\n GameBoard.putPiece(arrwPawn[i]);\r\n }\r\n\r\n Pawn[] arrbPawn = new Pawn[8];\r\n for(int i=0 ; i<8 ; i++){\r\n pos.setPosition(0,i);\r\n arrbPawn[i] = new Pawn(pos , piece.Colour.BLACK);\r\n GameBoard.putPiece(arrbPawn[i]);\r\n }\r\n\r\n\r\n //set black pieces in the board\r\n\r\n pos.setPosition(0,0);\r\n Rook bRook1 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook1);;\r\n\r\n pos.setPosition(0,7);\r\n Rook bRook2 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook2);\r\n\r\n\r\n pos.setPosition(0,1);\r\n Knight bKnight1 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,6);\r\n Knight bKnight2 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,2);\r\n Bishop bBishop1 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop1);\r\n\r\n pos.setPosition(0,5);\r\n Bishop bBishop2 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop2);\r\n\r\n pos.setPosition(0,3);\r\n Queen bQueen = new Queen(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bQueen);\r\n\r\n pos.setPosition(0,4);\r\n King bKing = new King(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKing);\r\n\r\n //set white pieces in the board\r\n\r\n pos.setPosition(7,0);\r\n Rook wRook1 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook1);\r\n\r\n pos.setPosition(7,7);\r\n Rook wRook2 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook2);\r\n\r\n pos.setPosition(7,1);\r\n Knight wKnight1 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,6);\r\n Knight wKnight2 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,2);\r\n Bishop wBishop1 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop1);\r\n\r\n pos.setPosition(7,5);\r\n Bishop wBishop2 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop2);\r\n\r\n pos.setPosition(7,3);\r\n Queen wQueen = new Queen(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wQueen);\r\n\r\n pos.setPosition(7,4);\r\n King wKing = new King(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKing);\r\n\r\n\r\n\r\n Rook arrwRook[] = {wRook1,wRook2};\r\n Rook arrbRook[] = {bRook1,bRook2};\r\n Queen arrwQueen[] = {wQueen};\r\n Queen arrbQueen[] = {bQueen};\r\n Knight arrwKnight[] = {wKnight1,wKnight2};\r\n Knight arrbKnight[] = {bKnight1,bKnight2};\r\n King arrwKing[] = {wKing};\r\n King arrbKing[] = {bKing};\r\n Bishop arrwBishop[] = {wBishop1,wBishop2};\r\n Bishop arrbBishop[] = {bBishop1,bBishop2};\r\n }", "public Board twin() {\n Board twin = new Board(board);\n // exchange the pairs of the same row\n int i = (iBlank+1) % dim;\n swap(twin.board, i, 0, i, 1);\n return twin;\n }", "private void copyBoard(Piece[][] board){\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tfor (int j = 0; j < SIZE; j++) {\r\n\t\t\t\tif (board[i][j] != null) {\r\n\t\t\t\t\tthis.board[i][j] = board[i][j].deepCopy();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (board[i][j] == null) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\telse if(this.board[i][j].getPlayer().color == Color.BLACK) {\r\n\t\t\t\t\tthis.black.addElement(this.board[i][j]);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.white.addElement(this.board[i][j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void newRound()\n\t{\n\t\tif(player1.getDeck().isEmpty())\n\t\t{\n\t\t\treshufflePlayer1();\n\t\t}\n\t\tif(player2.getDeck().isEmpty())\n\t\t{\n\t\t\treshufflePlayer2();\n\t\t}\n\t\t\n\t\tactivePlayerOneCard = player1.draw();\n\t\tactivePlayerTwoCard = player2.draw();\n\t}", "public void checkBoard(){\n\n //check horizontally for a winner\n for(int i = 0; i < 3; i++) {\n if (boardStatus[i][0].equals(boardStatus[i][1]) && boardStatus[i][1].equals(boardStatus[i][2])) {\n if (boardStatus[i][0].equals(\"X\")) {\n winnerResults = playerOne + \" has won the game!\";\n winnerName = playerOne;\n userExists();\n\n break;\n } else {\n winnerResults = playerTwo + \" has won the game!\";\n winnerName = playerTwo;\n userExists();\n\n break;\n\n }\n }\n\n\n }\n\n //check vertically for a winner\n for(int i = 0; i < 3; i++) {\n if (boardStatus[0][i].equals(boardStatus[1][i]) && boardStatus[1][i].equals(boardStatus[2][i])) {\n if (boardStatus[0][i].equals(\"X\")) {\n winnerResults = playerOne + \" has won the game!\";\n winnerName = playerOne;\n userExists();\n\n break;\n } else {\n winnerResults = playerTwo + \" has won the game!\";\n winnerName = playerTwo;\n userExists();\n\n break;\n }\n }\n }\n\n //diagonally\n\n if((boardStatus[0][0].equals(boardStatus[1][1])) && (boardStatus[0][0].equals(boardStatus[2][2]))){\n\n if (boardStatus[0][0].equals(\"X\")) {\n winnerResults = playerOne + \" has won the game!\";\n winnerName = playerOne;\n userExists();\n\n\n }\n else {\n winnerResults = playerTwo + \" has won the game!\";\n winnerName = playerTwo;\n userExists();\n\n\n }\n\n }\n\n //diagonally\n if (boardStatus[0][2].equals(boardStatus[1][1]) && (boardStatus[0][2].equals(boardStatus[2][0]))) {\n\n if (boardStatus[0][2].equals(\"X\")) {\n winnerResults = playerOne + \" has won the game!\";\n winnerName = playerOne;\n userExists();\n\n } else {\n winnerResults = playerTwo + \" has won the game!\";\n winnerName = playerTwo;\n userExists();\n\n }\n }\n\n //If all the locations on the board have been played but no win conditions have been met\n //the game will end without a winner\n if(boardStatus[0][0] != \"a\" && boardStatus[0][1] != \"b\" && boardStatus[0][2] != \"c\" &&\n boardStatus[1][0] != \"d\" && boardStatus[1][1] != \"e\" && boardStatus[1][2] != \"f\" &&\n boardStatus[2][0] != \"g\" && boardStatus[2][1] != \"h\" && boardStatus[2][2] != \"i\"){\n NoWinnerDialog dialog = new NoWinnerDialog();\n dialog.show(getSupportFragmentManager(), \"NoWinner\");\n }\n\n\n\n\n }", "public void createBoard() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j <colls; j++) {\n if(i==0 || j == 0 || i == rows-1|| j == colls-1){\n board[i][j] = '*';\n } else {\n board[i][j] = ' ';\n }\n }\n }\n }", "public void addMoveToBoardAndSwitchesTurns(Move move) {\n int moveX = move.getMoveX();\n int moveY = move.getMoveY(); \n char symbol = move.getPlayer().getType();\n this.boardState[moveX][moveY] = symbol;\n this.turn = move.getPlayer().getId() == 1 ? 2 : 1; \n }", "public static void move(TTTBoard board, char piece) {\n if (board.winner() != ' ') {\n throw new IllegalArgumentException(\"Game Over\");\n }\n if (board.size() == 1) {\n board.set(0, 0, piece);\n return;\n }\n if (board.size() == 3) {\n int turnNumber = getBoardTurnNumber(board);\n if (turnNumber == 1) {\n board.set(0, 0, piece);\n return;\n } else if (turnNumber == 2) {\n if (board.get(1, 1) == ' ') {\n board.set(1, 1, piece);\n return;\n } else if (board.get(0, 0) == ' ') {\n board.set(0, 0, piece);\n return;\n }\n } else if (turnNumber == 3) {\n try {\n int[] opp = getFirstOpp(board, piece);\n int oppRow = opp[0];\n if (oppRow == 0) {\n board.set(2, 0, piece);\n return;\n } else if (oppRow == 1) {\n board.set(0, 2, piece);\n return;\n } else {\n board.set(0, 2, piece);\n return;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n\n // check if win diagonal\n int selfC = 0;\n int oppC = 0;\n int spaceC = 0;\n for (int i = 0; i < board.size(); ++i) {\n int j = i;\n char p = board.get(i, j);\n if (p == ' ') spaceC++;\n else if (p == piece) selfC++;\n else oppC++;\n }\n\n if (spaceC == 1 && (selfC == 0 || oppC == 0)) {\n // fill in that space\n for (int i = 0; i < board.size(); ++i) {\n int j = i;\n char p = board.get(i, j);\n if (p == ' ') {\n board.set(i, j, piece);\n return;\n }\n }\n }\n\n selfC = 0;\n oppC = 0;\n spaceC = 0;\n for (int i = 0; i < board.size(); ++i) {\n int j = board.size() - i - 1;\n char p = board.get(i, j);\n if (p == ' ') spaceC++;\n else if (p == piece) selfC++;\n else oppC++;\n\n }\n\n if (spaceC == 1 && (selfC == 0 || oppC == 0)) {\n // fill in that space\n for (int i = 0; i < board.size(); ++i) {\n int j = board.size() - i - 1;\n char p = board.get(i, j);\n if (p == ' ') {\n board.set(i, j, piece);\n return;\n }\n }\n }\n\n // check if win row col\n\n boolean[] selfWinnableRows = new boolean[board.size()];\n boolean[] oppWinnableRows = new boolean[board.size()];\n boolean[] selfWinnableCols = new boolean[board.size()];\n boolean[] oppWinnableCols = new boolean[board.size()];\n int[] selfCountRows = new int[board.size()];\n int[] selfCountCols = new int[board.size()];\n int[] oppCountRows = new int[board.size()];\n int[] oppCountCols = new int[board.size()];\n\n // checks if any rows can be won\n for (int i = 0; i < board.size(); ++i) {\n boolean containsSelf = false;\n boolean containsOpp = false;\n boolean hasEmpty = false;\n int selfCount = 0;\n int oppCount = 0;\n\n for (int j = 0; j < board.size(); ++j) {\n char p = board.get(i, j);\n\n if (p == ' ') {\n hasEmpty = true;\n } else if (p == piece) {\n containsSelf = true;\n selfCount++;\n } else {\n containsOpp = true;\n oppCount++;\n }\n }\n\n selfCountRows[i] = selfCount;\n oppCountRows[i] = oppCount;\n\n if (!hasEmpty) continue;\n\n if (!containsSelf && !containsOpp) {\n selfWinnableRows[i] = true;\n oppWinnableRows[i] = true;\n }\n\n if (containsSelf && !containsOpp) {\n selfWinnableRows[i] = true;\n }\n if (containsOpp && !containsSelf) {\n oppWinnableRows[i] = true;\n }\n }\n\n // checks if any cols can be won\n for (int i = 0; i < board.size(); ++i) {\n boolean containsSelf = false;\n boolean containsOpp = false;\n boolean hasEmpty = false;\n int selfCount = 0;\n int oppCount = 0;\n for (int j = 0; j < board.size(); ++j) {\n char p = board.get(j, i);\n\n if (p == ' ') {\n hasEmpty = true;\n } else if (p == piece) {\n containsSelf = true;\n selfCount++;\n } else {\n containsOpp = true;\n oppCount++;\n }\n }\n\n selfCountCols[i] = selfCount;\n oppCountCols[i] = oppCount;\n\n if (!hasEmpty) continue;\n\n if (!containsSelf && !containsOpp) {\n selfWinnableCols[i] = true;\n oppWinnableCols[i] = true;\n }\n\n if (containsSelf && !containsOpp) {\n selfWinnableCols[i] = true;\n }\n\n if (containsOpp && !containsSelf) {\n oppWinnableCols[i] = true;\n }\n }\n\n int[] selfInRowRows = new int[board.size()];\n int[] selfInRowCols = new int[board.size()];\n int[] oppInRowRows = new int[board.size()];\n int[] oppInRowCols = new int[board.size()];\n\n for (int i = 0; i < selfWinnableRows.length; ++i) {\n if (selfWinnableRows[i]) {\n int count = selfCountRows[i];\n selfInRowRows[count]++;\n }\n }\n for (int i = 0; i < selfWinnableCols.length; ++i) {\n if (selfWinnableCols[i]) {\n int count = selfCountCols[i];\n selfInRowCols[count]++;\n }\n }\n for (int i = 0; i < oppWinnableRows.length; ++i) {\n if (oppWinnableRows[i]) {\n int count = oppCountRows[i];\n oppInRowRows[count]++;\n }\n }\n for (int i = 0; i < oppWinnableCols.length; ++i) {\n if (oppWinnableCols[i]) {\n int count = oppCountCols[i];\n oppInRowCols[count]++;\n }\n }\n\n if (board.size() == 3) {\n int turnNumber = getBoardTurnNumber(board);\n if (selfInRowRows[board.size() - 1] == 0 &&\n selfInRowCols[board.size() - 1] == 0 &&\n oppInRowRows[board.size() - 1] == 0 &&\n oppInRowCols[board.size() - 1] == 0) {\n if (turnNumber == 4) {\n if ((board.get(1, 1) != ' ' && board.get(1, 1) != piece)\n && (board.get(2, 2) != ' ' && board.get(2, 2) != piece)) {\n board.set(2, 0, piece);\n return;\n }\n } else if (turnNumber == 5) {\n if (selfCountCols[0] == 2) {\n board.set(2, 2, piece);\n return;\n } else if (selfCountRows[0] == 2) {\n if (board.get(1, 0) != piece && board.get(1, 0) != ' ') {\n board.set(2, 2, piece);\n return;\n }\n if (board.get(2, 0) != piece && board.get(2, 0) != ' ') {\n board.set(2, 2, piece);\n return;\n }\n board.set(2, 0, piece);\n return;\n }\n }\n }\n }\n\n for (int i = board.size() - 1; i >= 0; i--) {\n int selfRowsCount = selfInRowRows[i];\n //System.out.println(i + \" self rows count: \" + selfRowsCount);\n if (selfRowsCount > 0) {\n // get a row index that contains this self in row rows\n try {\n int rowIndex = getRowIndexForInRowRows(board, i, selfWinnableRows, selfCountRows);\n int colIndex = getNextInRow(board, rowIndex);\n board.set(rowIndex, colIndex, piece);\n return;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n int selfColsCount = selfInRowCols[i];\n if (selfColsCount > 0) {\n try {\n int colIndex = getRowIndexForInRowRows(board, i, selfWinnableCols, selfCountCols);\n int rowIndex = getNextInCol(board, colIndex);\n board.set(rowIndex, colIndex, piece);\n return;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n int oppRowsCount = oppInRowRows[i];\n // System.out.println(i + \" opp rows count: \" + oppRowsCount);\n if (oppRowsCount > 0) {\n\n try {\n int rowIndex = getRowIndexForInRowRows(board, i, oppWinnableRows, oppCountRows);\n int colIndex = getNextInRow(board, rowIndex);\n board.set(rowIndex, colIndex, piece);\n return;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n int oppColsCount = oppInRowCols[i];\n if (oppColsCount > 0) {\n try {\n int colIndex = getRowIndexForInRowRows(board, i, oppWinnableCols, oppCountCols);\n int rowIndex = getNextInCol(board, colIndex);\n board.set(rowIndex, colIndex, piece);\n return;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n\n try {\n int[] nextEmpty = getNextEmpty(board);\n board.set(nextEmpty[0], nextEmpty[1], piece);\n } catch (Exception e) {\n throw new IllegalArgumentException(\"DRAW / SOMEONE WON\");\n }\n }", "public void newGame() {\n\n\n inGame = true;\n mines_left = mines+ePirate+mPirate+hPirate;\n\n all_cells = rows * cols;\n field = new int[all_cells];\n\n for (int i = 0; i < all_cells; i++)\n field[i] = COVER_FOR_CELL;\n\n statusbar.setText(Integer.toString(mines_left));\n\n // draw the board -- pass to the undo array\n drawBoard(mines) ; // now rocks\n drawBoard(ePirate) ;\n drawBoard(mPirate) ;\n drawBoard(hPirate) ;\n\n }", "public TicTacToe() {\n\t\tinitialiazeBoard();\n\t\tthis.currentPlayer = Player.X;\n\t\tthis.winner = null;\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 }", "private Board createMovedBoard(MatrixIndex src, MatrixIndex dest) {\n int srcVal = blocks[src.i][src.j];\n blocks[src.i][src.j] = blocks[dest.i][dest.j];\n blocks[dest.i][dest.j] = srcVal;\n Board movedBoard = new Board(blocks);\n blocks[dest.i][dest.j] = blocks[src.i][src.j];\n blocks[src.i][src.j] = srcVal;\n return movedBoard;\n }", "public void makeMove(Move m){\n int oldTurn = turn;\n turn = -turn;\n moves++;\n enPassant = -1;\n if (m.toY == 0){ // white rook space\n if (m.toX == 0){\n castles &= nWHITE_LONG;\n //castles[1] = false;\n }else if (m.toX == 7){\n castles &= nWHITE_SHORT;\n //castles[0] = false;\n }\n } else if (m.toY == 7){ // black rook space\n if (m.toX == 0){\n castles &= nBLACK_LONG;\n //castles[3] = false;\n }else if (m.toX == 7){\n castles &= nBLACK_SHORT;\n //castles[2] = false;\n }\n }\n if (m.piece == WHITE_ROOK && m.fromY == 0){\n if (m.fromX == 0){castles &= nWHITE_LONG;} //castles[1] = false;}\n else if (m.fromX == 7){castles &= nWHITE_SHORT;} //castles[0] = false;}\n } else if (m.piece == BLACK_ROOK && m.fromY == 7){\n if (m.fromX == 0){castles &= nBLACK_LONG;} //castles[3] = false;}\n else if (m.fromX == 7){castles &= nBLACK_SHORT;} //castles[2] = false;}\n }\n // castling\n if (m.piece % 6 == 0){\n if (oldTurn == WHITE){\n castles &= 0b1100;\n //castles[0] = false; castles[1] = false;\n } else {\n castles &= 0b11;\n //castles[2] = false; castles[3] = false;\n }\n if (m.toX - m.fromX == 2){ // short\n board[m.fromY][m.fromX] = 0;\n board[m.toY][m.toX] = m.piece;\n // rook\n board[m.fromY][5] = board[m.fromY][7];\n board[m.fromY][7] = 0;\n return;\n } else if (m.toX - m.fromX == -2){ // long\n board[m.fromY][m.fromX] = 0;\n board[m.toY][m.toX] = m.piece;\n // rook\n board[m.fromY][3] = board[m.fromY][0];\n board[m.fromY][0] = 0;\n return;\n }\n } else if (m.piece % 6 == 1) { // pawn move\n stalemateCountdown = 0; // resets on a pawn move\n // promotion\n if (m.toY % 7 == 0){\n board[m.toY][m.toX] = m.promoteTo;\n board[m.fromY][m.fromX] = 0;\n return;\n }\n // en passant\n else if (m.fromX != m.toX && board[m.toY][m.toX] == 0){\n board[m.fromY][m.fromX] = 0;\n board[m.toY][m.toX] = m.piece;\n if (oldTurn == WHITE){\n board[4][m.toX] = 0;\n }else{\n board[3][m.toX] = 0;\n }\n return;\n } else if (m.toY - m.fromY == 2*oldTurn){\n enPassant = m.fromX;\n }\n }\n // regular\n if (board[m.toY][m.toX] != 0){\n stalemateCountdown = 0; // resets on a capture\n }\n board[m.fromY][m.fromX] = 0;\n board[m.toY][m.toX] = m.piece;\n }", "public Board twin() {\n MatrixIndex nonFreeBlock1 = new MatrixIndex(0, 0);\n findNextBlock(nonFreeBlock1);\n\n MatrixIndex nonFreeBlock2 = new MatrixIndex(nonFreeBlock1.i, nonFreeBlock1.j);\n incrementMatrixIndex(nonFreeBlock2);\n findNextBlock(nonFreeBlock2);\n\n if (verbose) {\n System.out.println(nonFreeBlock1 + \" \" + nonFreeBlock2);\n }\n return createMovedBoard(nonFreeBlock1, nonFreeBlock2);\n }", "@Before\r\n public void setUpBoard(){\r\n board3 = new Board(makeTiles(3*3), boardManager3, 3);\r\n board4 = new Board(makeTiles(4*4), boardManager4, 4);\r\n board5 = new Board(makeTiles(5*5), boardManager5, 5);\r\n boardManager3.setBoard(board3);\r\n boardManager4.setBoard(board4);\r\n boardManager5.setBoard(board5);\r\n board3.setSlidingScoreBoard(slidingScoreBoard3);\r\n board4.setSlidingScoreBoard(slidingScoreBoard4);\r\n board5.setSlidingScoreBoard(slidingScoreBoard5);\r\n }", "public ChessRunner(){\n\t\taddMouseListener(this);\n\t\tfor(int i=0;i<8;i++){\n\t\t\tfor (int j=1;j<7;j++)\n\t\t\t\tif(j==1)\n\t\t\t\t\tboard[i][j] = new BlackPawn();\n\t\t\t\telse if(j==6)\n\t\t\t\t\tboard[i][j] = new WhitePawn();\n\t\t\t\telse\n\t\t\t\t\tboard[i][j]= new BlankPiece();\n\t\t}\n\t\tboard[1][0] = new BlackKnight();\n\t\tboard[6][0] = new BlackKnight();\n\t\tboard[0][0] = new BlackRook();\n\t\tboard[7][0] = new BlackRook();\n\t\tboard[2][0] = new BlackBishop();\n\t\tboard[5][0] = new BlackBishop();\n\t\tboard[4][0] = new BlackKing();\n\t\tboard[3][0] = new BlackQueen();\n\t\t\n\t\tboard[1][7] = new WhiteKnight();\n\t\tboard[6][7] = new WhiteKnight();\n\t\tboard[0][7] = new WhiteRook();\n\t\tboard[7][7] = new WhiteRook();\n\t\tboard[2][7] = new WhiteBishop();\n\t\tboard[5][7] = new WhiteBishop();\n\t\tboard[4][7] = new WhiteKing();\n\t\tboard[3][7] = new WhiteQueen();\n\t\t\n\t}", "@Test\n public void test9() { \n Board board9 = new Board();\n board9.put(1,1,2);\n board9.put(1,2,2);\n board9.put(1,3,2);\n assertTrue(board9.checkWin());\n }", "public Board(){\n for(int holeIndex = 0; holeIndex<holes.length; holeIndex++)\n holes[holeIndex] = new Hole(holeIndex);\n for(int kazanIndex = 0; kazanIndex<kazans.length; kazanIndex++)\n kazans[kazanIndex] = new Kazan(kazanIndex);\n nextToPlay = Side.WHITE;\n }", "private void getBoard() {\n gameBoard = BoardFactory.makeBoard();\n }", "void prepareBoardBeforePlacement( Board board );", "public Board twin() {\n int x = -1, y = -1;\n int[][] tmpBlock = new int[N][N];\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (j < N-1 && matrix[i][j] != 0 && matrix[i][j+1] != 0) {\n x = i;\n y = j;\n }\n tmpBlock[i][j] = matrix[i][j];\n }\n }\n if (x == -1 && y == -1) throw new IllegalArgumentException();\n int t = tmpBlock[x][y];\n tmpBlock[x][y] = tmpBlock[x][y+1];\n tmpBlock[x][y+1] = t;\n return new Board(tmpBlock);\n }", "public static boolean checkWinner(){\n \n if(board[0][0] == board[0][1] && board[0][1] == board[0][2] && (board[0][0] == 'x' || board [0][0] == 'o'))\n return true;\n else if(board[1][0] == board[1][1] && board[1][1] == board[1][2] && (board[1][0] == 'x' || board[1][0] == 'o'))\n return true;\n else if(board[2][0] == board[2][1] && board[2][1] == board[2][2] && (board[2][0] == 'x' || board[2][0] == 'o'))\n return true;\n else if(board[0][0] == board[1][0] && board[1][0] == board[2][0] && (board[0][0] == 'x' || board[0][0] == 'o'))\n return true;\n else if(board[0][1] == board[1][1] && board[1][1] == board[2][1] && (board[0][1] == 'x' || board[0][1] == 'o'))\n return true;\n else if(board[0][2] == board[1][2] && board[1][2] == board[2][2] && (board[0][2] == 'x' || board[0][2] == 'o'))\n return true;\n else if(board[0][0] == board[1][1] && board[1][1] == board[2][2] && (board[0][0] == 'x' || board[0][0] == 'o'))\n return true;\n else if(board[0][2] == board[1][1] && board[1][1] == board[2][0] && (board[0][2] == 'x' || board[0][2] == 'o'))\n return true;\n else\n return false;\n \n }", "ArrayList<ArrayList<GamePiece>> makeBoard() {\n ArrayList<ArrayList<GamePiece>> row = new ArrayList<ArrayList<GamePiece>>();\n for (int i = 0; i < this.width; i++) {\n ArrayList<GamePiece> column = new ArrayList<GamePiece>();\n for (int j = 0; j < this.height; j++) {\n GamePiece temp = new GamePiece(i, j);\n column.add(temp);\n nodes.add(temp);\n }\n row.add(column);\n }\n return row;\n }", "public GameState won() {\n if ( (board[0][0] != TileState.BLANK) && (board[0][0] == board[0][1]) && (board[0][0] == board[0][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[1][0] != TileState.BLANK) && (board[1][0] == board[1][1]) && (board[1][0] == board[1][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[2][0] != TileState.BLANK) && (board[2][0] == board[2][1]) && (board[2][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][1]) && (board[0][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ( (board[0][2] != TileState.BLANK) && (board[0][2] == board[1][1]) && (board[0][2] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][0]) && (board[0][0] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][1] != TileState.BLANK) && (board[0][1] == board[1][1]) && (board[0][1] == board[2][1])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][2] != TileState.BLANK) && (board[0][2] == board[1][2]) && (board[0][2] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if (movesPlayed == 9)\n return GameState.DRAW;\n return GameState.IN_PROGRESS;\n }", "@Test\n public void test11() { \n Board board11 = new Board();\n board11.put(1,3,1);\n board11.put(2,3,1);\n board11.put(3,3,1);\n assertTrue(board11.checkWin());\n }", "public Board twin() {\r\n\t\tint n = dimension();\r\n\t\tint x = -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] == 0) {\r\n\t\t\t\t\tx = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tint[][] copy = copyBlocks();\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tif (i != x) {\r\n\t\t\t\tswap(i, 0, i, 1, copy);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Board(copy);\r\n\t}", "void doMakeMove(CheckersMove move) {\n\n boardData.makeMove(move, false);\n\n /* If the move was a jump, it's possible that the player has another\n jump. Check for legal jumps starting from the square that the player\n just moved to. If there are any, the player must jump. The same\n player continues moving. */\n \n if (move.isJump()) {\n legalMoves = boardData.getLegalJumpsFrom(currentPlayer, move.toRow, move.toCol);\n if (legalMoves != null) {\n if (currentPlayer == CheckersData.RED) {\n console(\"RED: You must continue jumping.\");\n } else {\n console(\"BLACK: You must continue jumping.\");\n }\n selectedRow = move.toRow; // Since only one piece can be moved, select it.\n selectedCol = move.toCol;\n refreshBoard();\n return;\n }\n }\n\n /* The current player's turn is ended, so change to the other player.\n Get that player's legal moves. If the player has no legal moves,\n then the game ends. */\n if (currentPlayer == CheckersData.RED) {\n currentPlayer = CheckersData.BLACK;\n legalMoves = boardData.getLegalMoves(currentPlayer);\n if (legalMoves == null) {\n gameOver(\"BLACK has no moves. RED wins.\");\n } else if (legalMoves[0].isJump()) {\n console(\"BLACK: Make your move. You must jump.\");\n } else {\n console(\"BLACK: Make your move.\");\n }\n } else {\n currentPlayer = CheckersData.RED;\n legalMoves = boardData.getLegalMoves(currentPlayer);\n if (legalMoves == null) {\n gameOver(\"RED has no moves. BLACK wins.\");\n } else if (legalMoves[0].isJump()) {\n console(\"RED: Make your move. You must jump.\");\n } else {\n console(\"RED: Make your move.\");\n }\n }\n\n /* Set selectedRow = -1 to record that the player has not yet selected\n a piece to move. */\n selectedRow = -1;\n\n /* As a courtesy to the user, if all legal moves use the same piece, then\n select that piece automatically so the user won't have to click on it\n to select it. */\n if (legalMoves != null) {\n boolean sameStartSquare = true;\n for (int i = 1; i < legalMoves.length; i++) {\n if (legalMoves[i].fromRow != legalMoves[0].fromRow\n || legalMoves[i].fromCol != legalMoves[0].fromCol) {\n sameStartSquare = false;\n break;\n }\n }\n if (sameStartSquare) {\n selectedRow = legalMoves[0].fromRow;\n selectedCol = legalMoves[0].fromCol;\n }\n }\n\n /* Make sure the board is redrawn in its new state. */\n refreshBoard();\n\n }", "public void initBoard() {\n board = new Board();\n\n // initilaisation des groupes\n Group violet = new Group();\n Group bleu = new Group();\n Group orange = new Group();\n Group vert = new Group();\n Group rouge = new Group();\n Group jaune = new Group();\n Group rose = new Group();\n Group marine = new Group();\n Group gare = new Group();\n Group compagnie = new Group();\n\n // ajout des cases\n board.addCaseBoard(new StartCase());\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd Belleville\", 60, 2, 10,30, 90, 160,250, 30,violet, 50));\n board.addCaseBoard(new CaseBoardImpl(\"Caisse de caumunauté\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue lecourbe\", 60, 4,20,60,180,320,450, 30,violet, 50));\n board.addCaseBoard(new CaseBoardImpl(\"Taxes\"));\n board.addCaseBoard(new BuyableCaseImpl(\"Gare Monparnasse\", 200, 2, 100,gare));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue de Vaugirard\", 100, 6,30,90,270,400,550, 50, bleu, 50));\n board.addCaseBoard(new CaseBoardImpl(\"Chance\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue de Courcelles\", 100, 6,30,90,270,400,550, 50, bleu, 50));\n board.addCaseBoard(new BuildingCaseImpl(\"Av de la Republique\", 120, 8,40,100,300,450,600, 60, bleu, 50));\n board.addCaseBoard(new CaseBoardImpl(\"Prison\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd de la villette\", 140, 10,50,150,450,625,750, 70, orange, 100));\n board.addCaseBoard(new BuyableCaseImpl(\"Compagnie de distribution d'electricité\",150, 0, 75, compagnie));\n board.addCaseBoard(new BuildingCaseImpl(\"Av de Neuilly\", 140, 10,50,150,450,625,750, 70, orange, 100));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue de Paradis\", 160, 12,60,180,500,700,900, 80, orange, 100));\n board.addCaseBoard(new BuyableCaseImpl(\"Gare de Lyon\", 200, 2, 100,gare));\n board.addCaseBoard(new BuildingCaseImpl(\"Av de Mozart\", 180, 14,70,200,550,700,900, 90, vert, 100));\n board.addCaseBoard(new CaseBoardImpl(\"Caisse de Communauté\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd Saint Michel\", 180, 14,70,200,550,700,900, 90, vert, 100));\n board.addCaseBoard(new BuildingCaseImpl(\"Place Pigalle\", 200, 16,80,220,600,800,950, 100, vert, 100));\n board.addCaseBoard(new CaseBoardImpl(\"Park Gratuit\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Av Matignon\", 220, 18,90,250,700,875,1050, 110, rouge, 150));\n board.addCaseBoard(new CaseBoardImpl(\"Chance\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd MalesHerbes\", 220, 18,90,250,700,875,1050, 110, rouge, 150));\n board.addCaseBoard(new BuildingCaseImpl(\"Av Henri-Martin\", 240, 20,100,300,750,925,1100, 120, rouge, 150));\n board.addCaseBoard(new BuyableCaseImpl(\"Gare du Nord\", 200, 2, 100,gare));\n board.addCaseBoard(new BuildingCaseImpl(\"Fb Saint Honoré\", 260, 22,110,330,800,975,1150, 130, jaune, 150));\n board.addCaseBoard(new BuildingCaseImpl(\"Place de la Bourse\", 260, 22,110,330,800,975,1150, 130, jaune, 150));\n board.addCaseBoard(new BuyableCaseImpl(\"Compagnie de distribution des eaux\",150, 0, 75, compagnie));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue lafayette\", 280, 24,120,360,850,1025,1200, 140, jaune, 150));\n board.addCaseBoard(new CaseBoardImpl(\"Aller en Prison\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Av de Breteuil\", 300, 26,130,390,900,1100,1275, 150, rose, 200));\n board.addCaseBoard(new BuildingCaseImpl(\"Av Foch\", 300, 26,130,390,900,1100,1275, 150, rose, 200));\n board.addCaseBoard(new CaseBoardImpl(\"Caisse de Communauté\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd des Capucines\", 320, 28,150,450,1000,1200,1400, 160, rose, 200));\n board.addCaseBoard(new BuyableCaseImpl(\"Gare Saint-Lazarre\", 200, 2, 100,gare));\n board.addCaseBoard(new CaseBoardImpl(\"Chance\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Av des Champs Elysées\", 350, 35,175,500,1100,1300,1500, 175, marine, 200));\n board.addCaseBoard(new CaseBoardImpl(\"Caisse de Communauté\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue de la Paix\", 400, 50,200,600,1400,1700,2000, 200, marine, 200));\n }", "private Board nextBoard () {\n while (!hasExhaustedDirections()) {\n getNextMove();\n directions_checked++;\n if (inBounds(move)) {\n return createMovedBoard(free, move);\n }\n }\n return null;\n }", "private BoardState makeMove(ChessGameNode rootNodeCurr, NewMove nextMoveCurr) {\r\n \tTile[][] currentBoard = rootNodeCurr.getBoardState().getBoard();\r\n \tUnit[] unitListcB = rootNodeCurr.getBoardState().getUnitList();\r\n\r\n \tUnit unitThatMoves = nextMoveCurr.getUnit();\r\n \tMoves moveToMake = nextMoveCurr.getMove();\r\n\r\n \tTile oldSquare = currentBoard[unitThatMoves.getX()][unitThatMoves.getY()];\r\n Tile newSquare = chessBoard[moveToMake.getX()][moveToMake.getY()];\r\n\r\n Unit oldUnit = oldSquare.getPiece();\r\n Unit targetUnit = newSquare.getPiece();\r\n\r\n BoardState newBoard;\r\n\r\n if (targetUnit != null) {\r\n for (int i = 0; i < unitListcB.length; i++) {\r\n if (unitListcB[i] == targetUnit) {\r\n unitListcB[i] = null;\r\n }\r\n } \r\n }\r\n\r\n // update the coordinates of the piece\r\n\t\toldUnit.setCoordinates(moveToMake.getX(),moveToMake.getY());\r\n\t\t// doesn;t update the unit in the unitlist i think\r\n oldSquare.setPiece(null);\r\n newSquare.setPiece(oldUnit);\r\n newBoard = new BoardState(currentBoard, unitListcB);\r\n\r\n \treturn newBoard;\r\n }", "@Test\n void RookMoveToFriendlyOccupied() {\n Board board = new Board(8, 8);\n Piece rook1 = new Rook(board, 4, 3, 1);\n Piece rook2 = new Rook(board, 4, 6, 1);\n\n board.getBoard()[4][3] = rook1;\n board.getBoard()[4][6] = rook2;\n\n board.movePiece(rook1, 4, 6);\n\n Assertions.assertEquals(rook1, board.getBoard()[4][3]);\n Assertions.assertEquals(rook2, board.getBoard()[4][6]);\n }", "public void initializeGameboard() {\r\n\t\t\r\n\t\t for (int row=0 ; row<gameBoard.length; row++)\r\n\t\t { \r\n\t\t \t \r\n\t\t \t for(int column=0;column<gameBoard[row].length;column++ )\t \r\n\t\t \t { \r\n\t\t \t\t if( row==0|| row ==1)\r\n\t\t \t\t { \r\n\t\t \t\t\t if (column==0) {gameBoard[row][column]=\"2\";}\r\n\t\t \t\t\t else if (column==1) {gameBoard[row][column]=\"3\";}\t \r\n\t\t \t\t\t else if (column==2) {gameBoard[row][column]=\"4\";} \r\n\t\t \t\t\t else if (column==3) {gameBoard[row][column]=\"5\";} \r\n\t\t \t\t\t else if (column==4) {gameBoard[row][column]=\"6\";} \r\n\t\t \t\t\t else if (column==5) {gameBoard[row][column]=\"7\";}\r\n\t\t \t\t\t else if (column==6) {gameBoard[row][column]=\"8\";} \r\n\t\t \t\t\t else if (column==7) {gameBoard[row][column]=\"9\";}\r\n\t\t \t\t\t else if (column==8) {gameBoard[row][column]=\"10\";} \r\n\t\t \t\t\t else if (column==9) {gameBoard[row][column]=\"11\";} \r\n\t\t \t\t\t else if (column==10) {gameBoard[row][column]=\"12\";} \r\n\t\t \t\t }\r\n\t\t \t\t \r\n\t\t\t \t else if(row ==2 || row==3) \r\n\t\t\t \t {\r\n\t\t\t \t\t if (column==0) {gameBoard[row][column]=\"12\";}\r\n\t\t \t\t\t else if (column==1) {gameBoard[row][column]=\"11\";}\t \r\n\t\t \t\t\t else if (column==2) {gameBoard[row][column]=\"10\";} \r\n\t\t \t\t\t else if (column==3) {gameBoard[row][column]=\"9\";} \r\n\t\t \t\t\t else if (column==4) {gameBoard[row][column]=\"8\";} \r\n\t\t \t\t\t else if (column==5) {gameBoard[row][column]=\"7\";}\r\n\t\t \t\t\t else if (column==6) {gameBoard[row][column]=\"6\";} \r\n\t\t \t\t\t else if (column==7) {gameBoard[row][column]=\"5\";}\r\n\t\t \t\t\t else if (column==8) {gameBoard[row][column]=\"4\";} \r\n\t\t \t\t\t else if (column==9) {gameBoard[row][column]=\"3\";} \r\n\t\t \t\t\t else if (column==10) {gameBoard[row][column]=\"2\";} \r\n\t\t\t \t }\r\n\t\t }\r\n\t\t }\r\n\t }" ]
[ "0.72960573", "0.72553957", "0.7190161", "0.7126501", "0.70239735", "0.70068437", "0.69912004", "0.6948948", "0.6939224", "0.69028866", "0.690127", "0.68998647", "0.68857855", "0.68850577", "0.68456566", "0.6833577", "0.67952216", "0.67749333", "0.6745921", "0.67455846", "0.6743647", "0.67170507", "0.6716165", "0.6697575", "0.66788626", "0.6678697", "0.66589916", "0.6615932", "0.66127217", "0.6606659", "0.6603801", "0.66005594", "0.6587664", "0.658153", "0.6574752", "0.6561407", "0.6559577", "0.6558763", "0.65578747", "0.65570426", "0.65514666", "0.65457064", "0.6543538", "0.653709", "0.65347385", "0.6532128", "0.6520614", "0.6513445", "0.64937246", "0.64920473", "0.6483682", "0.64818174", "0.6480521", "0.64627695", "0.64547294", "0.6440433", "0.64353615", "0.64322525", "0.6428581", "0.6424658", "0.64219725", "0.64180726", "0.6412732", "0.6407597", "0.640726", "0.6407085", "0.64069724", "0.6403707", "0.6384306", "0.6380354", "0.63778186", "0.63752264", "0.6373026", "0.63657546", "0.63642234", "0.63627285", "0.6349569", "0.63493043", "0.634808", "0.63446444", "0.6344055", "0.6331562", "0.6330876", "0.6324093", "0.6323119", "0.63164806", "0.63130426", "0.6301384", "0.63001126", "0.6290631", "0.6288227", "0.62853783", "0.6285218", "0.6284133", "0.6273299", "0.62700796", "0.62672573", "0.62649155", "0.62632436", "0.6260921" ]
0.6386123
68
Sets colour for each player, Yellow for Player 1, Red for Player 2
public void updateBoard(Color color, int i, int y) { if (color == Color.yellow) { board[i][y] = '1'; } else if (color == Color.red) { board[i][y] = '2'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Color getColor() {\n\t\treturn playerColor;\n\t}", "void setTileColor(int a_player)\n {\n if (a_player == 0)\n {\n this.tileColor = \"BLACK\";\n }\n else if (a_player == 1)\n {\n this.tileColor = \"RED\";\n }\n else\n {\n this.tileColor = null;\n }\n }", "protected String playerListColor() {\n return cfg.getString(\"Colors.player\").toUpperCase();\n }", "public void toggle() {\n if (currentPlayer.equals(\"red\")) {\n currentColor = BLUE_COLOUR;\n currentPlayer = \"blue\";\n } else {\n currentColor = RED_COLOUR;\n currentPlayer = \"red\";\n }\n //change color of grid\n changeColor();\n }", "private Color getPlayerColor(int player){\n\t\tColor pColor;\n\t\tswitch (this.groups[player]){ // adjust color based on what group of balls they're hitting\n\t\t\tcase Ball.TYPE_RED: pColor = new Color(200, 7, 23); break;\n\t\t\tcase Ball.TYPE_BLUE: pColor = new Color(10, 7, 200); break;\n\t\t\tcase 3: pColor = new Color(230, 210, 0); break; // color/type for winner (TODO: enum for player group?)\n\t\t\tdefault: pColor = Color.black; break;\n\t\t}\n\t\t// change color based on if they're allowed to place/hit the ball at the moment\n\t\tpColor = (this.turn==player && !this.table.moving) ? pColor : new Color(pColor.getRed(), pColor.getGreen(), pColor.getBlue(), (int)(0.4*255)); \n\t\treturn pColor;\n\t}", "public String getPlayer1Color() {\r\n return this.player1Color;\r\n }", "public GamePlayerManager(int players, int ai){\n playerAmount = players;\n aiAmount = ai;\n colorArray[0] = \"RED\";\n colorArray[1] = \"BLUE\";\n colorArray[2] = \"YELLOW\";\n colorArray[3] = \"GREEN\";\n colorArray[4] = \"WHITE\";\n colorArray[5] = \"BLACK\";\n colorArray[6] = \"CYAN\";\n colorArray[7] = \"ORANGE\";\n colorArray[8] = \"MAGENTA\";\n colorArray[9] = \"PINK\";\n }", "public PlayerColor playerColor() {\n return color;\n }", "public static Color getColorForPlayer(int player) {\n if (player >= playerColors.length) {\n player = 0;\n }\n return playerColors[player];\n }", "private void setRandomColors() {\n for(int i = 0; i< noOfColumns; i++) {\n for (int j = 0; j< noOfRows; j++) {\n if(cards[i][j].getCardState() != CardState.MATCHED){\n int randomNumber = (int) (Math.random()*4);\n cards[i][j].setColor(colors[randomNumber]);\n }\n }\n }\n }", "public String getPlayer2Color() {\r\n return this.player2Color;\r\n }", "public static List<PlayerColor> getPlayerColors() {\n List<PlayerColor> colorList = new ArrayList<>();\n for (PlayerColor color: PlayerColor.values()) {\n colorList.add(color);\n }\n return colorList;\n }", "public void initializePlayers(){\r\n allPlayers = new ArrayList<Player>();\r\n currentPlayerIndex = 0;\r\n Player redPlayer = new Player(1, new Location(2, 2), Color.RED);\r\n Player bluePlayer = new Player(2, new Location(4, 2), Color.BLUE);\r\n Player whitePlayer = new Player(3, new Location(2, 4), Color.WHITE);\r\n Player yellowPlayer = new Player(4, new Location(4, 4), Color.YELLOW);\r\n allPlayers.add(redPlayer);\r\n allPlayers.add(bluePlayer);\r\n allPlayers.add(whitePlayer);\r\n allPlayers.add(yellowPlayer);\r\n }", "private void assignColors() {\n soundQuickStatus.setBackground(drawables[noise]);\n comfortQuickStatus.setBackground(drawables[comfort]);\n lightQuickStatus.setBackground(drawables[light]);\n convenienceQuickStatus.setBackground(drawables[convenience]);\n }", "protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }", "public static void switchPlayers(){\n\t\tif(turn.equals(\"white\")){\n\t\t\tturn = \"black\";\n\t\t}\n\t\telse{\n\t\t\tturn = \"white\";\n\t\t}\n\t}", "private boolean multipleTeams(SettingsClass s){\r\n int a =s.getPlayerColor(0);\r\n for(int i=0;i<s.getNumPlayers();i++){\r\n if(a!=s.getPlayerColor(i)){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public void changePlayer(int index) {\n currentPlayer.setText(\"Aktueller Spieler: \" + index);\n if(index == 1){\n pointsPlayer2.setOpaque(false);\n pointsPlayer1.setBackground(Color.green);\n pointsPlayer1.setOpaque(true);\n this.repaint();\n }\n else{\n pointsPlayer1.setOpaque(false);\n pointsPlayer2.setBackground(Color.green);\n pointsPlayer2.setOpaque(true);\n this.repaint();\n }\n }", "public static void setBlue() {\r\n playerTeam.setColor(blue);\r\n updateMessage(\"Seu time agora é azul\");\r\n }", "public List<ColorId> checkPlayersBasicMode ()\n {\n List<ColorId> players = new ArrayList<>();\n\n for (Player playerIterate : player.playerThatSee(player.getSquare().getGameBoard()))\n {\n if (playerIterate.getSquare() != player.getSquare())\n players.add(playerIterate.getColor());\n }\n return players;\n }", "void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }", "private void createSetOfPlayers(List<ImgPath.Color> colors, boolean auto, AutoplayMode autoMode) {\n int i = 0;\n for (ImgPath.Color c : ImgPath.Color.values()) {\n this.players[i] = new Player(c, auto, autoMode);\n this.players[i].setPIndex(i);\n //System.out.println(\"Player \"+c.name()+\" created.\");\n for(int j=0; j<4; j++){\n this.players[i].setXY(j);\n }\n if (colors.contains(c)) {\n this.players[i].setActive(true);\n this.xPlayers.add(i);\n }\n i++;\n }\n }", "public void setActivePlayer(Piece.COLOR activePlayer) {\n this.activePlayer = activePlayer;\n }", "public void createPlayers() {\n\t\t\n\t\twhite = new Player(Color.WHITE);\n\t\twhite.initilizePieces();\n\t\tcurrentTurn = white;\n\t\t\n\t\tblack = new Player(Color.BLACK);\n\t\tblack.initilizePieces();\n\t}", "private void setupPlayers() {\n\t\tuserData=(UserData) Main.currentStage.getUserData();\n\t\tnumberPlayers=userData.getNumberPlayers();\n\t\tplayerNames=userData.getPlayerNames();\n\t\tcurrentPlayer=userData.getFirstPlayer();\n\t\tlb_currentplayername.setText(playerNames[currentPlayer]);\n\t\tplayers =new Player[4];\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tif(i<numberPlayers) {\n\t\t\t\tplayers[i]=new Player(playerNames[i], false, i) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void rollDices() {\n\t\t\t\t\t\trotatedDice1();\n\t\t\t\t\t\trotatedDice2();\n\t\t\t\t\t\t//waiting for player choose what way to go then handler that choice\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\telse {\n\t\t\t\tplayers[i]=new Player(playerNames[i], true, i) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void rollDices() {\n\t\t\t\t\t\trotatedDice1();\n\t\t\t\t\t\trotatedDice2();\n\t\t\t\t\t\t//randomchoice and next player rolldice\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\tswitch (i) {\n\t\t\t\tcase 0:{\n\t\t\t\t\tplayers[i].setHorseColor(yh0, yh1, yh2, yh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 1:{\n\t\t\t\t\tplayers[i].setHorseColor(bh0, bh1, bh2, bh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 2:{\n\t\t\t\t\tplayers[i].setHorseColor(rh0, rh1, rh2, rh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 3:{\n\t\t\t\t\tplayers[i].setHorseColor(gh0, gh1, gh2, gh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void setColor()\n {\n if(eyeL != null) // only if it's painted already...\n {\n eyeL.changeColor(\"yellow\");\n eyeR.changeColor(\"yellow\");\n nose.changeColor(\"green\");\n mouthM.changeColor(\"red\");\n mouthL.changeColor(\"red\");\n mouthR.changeColor(\"red\");\n }\n }", "@Override\n public boolean equals(Object other) {\n if (!(other instanceof Player)) {\n return false;\n }\n\n return (playerColor().equals(((Player) other).playerColor()));\n }", "public void changeTurnOfPlayer(PlayerState player)\n {\n if(player.getColorOfPlayer() == Color.BLACK)\n {\n this.turnOfPlayer = playerWhite;\n }\n else\n {\n this.turnOfPlayer = playerBlack;\n }\n }", "public void changePlayerTurn()\n {\n if (player_turn == RED)\n player_turn = BLACK;\n else\n player_turn = RED;\n }", "public void initializeNames(Map<PlayerColor, String> playerNames) {\n for (PlayerColor color : PlayerColor.values()){\n if (playerNames.keySet().contains(color)){\n switch (color){\n case RED:\n redName.setText(playerNames.get(color));\n break;\n case GREEN:\n greenName.setText(playerNames.get(color));\n break;\n case BLUE:\n blueName.setText(playerNames.get(color));\n break;\n case YELLOW:\n yellowName.setText(playerNames.get(color));\n break;\n }\n }\n else {\n switch (color){\n case RED:\n redName.setText(\"\");\n for(Text text : redPlayerTrack.values()){\n text.setText(\"\");\n }\n break;\n case GREEN:\n greenName.setText(\"\");\n for(Text text : greenPlayerTrack.values()){\n text.setText(\"\");\n }\n break;\n case BLUE:\n blueName.setText(\"\");\n for(Text text : bluePlayerTrack.values()){\n text.setText(\"\");\n }\n break;\n case YELLOW:\n yellowName.setText(\"\");\n for(Text text : yellowPlayerTrack.values()){\n text.setText(\"\");\n }\n break;\n }\n }\n }\n }", "public void createPlayer() {\n ColorPicker colorPicker = new ColorPicker();\n\n for (Player player : players) {\n if (player.getColor() == color(0, 0, 0) || (player.hasName() == false)) {\n pickColor(player, colorPicker);\n return;\n }\n }\n\n // if (ENABLE_SOUND) {\n // sfx.moveToGame();\n // }\n\n state = GameState.PLAY_GAME;\n\n // Spawn players\n int index = 0;\n for (int i=players.size()-1; i>=0; i--) {\n String dir = directions.get(index); // Need to add players in reverse so that when they respawn, they move in the right direction\n players.get(i).setSpawn(spawns.get(dir)).setDirection(dir);\n index++;\n }\n\n // Update game state only if all players have name and color\n}", "private static Set<Colour> players(Colour... colours) {\r\n\t\treturn new HashSet<>(asList(colours));\r\n\t}", "private void updatePlayersStatus() {\n PlayerModel[] playersInLobby = this.lobbyModel.getPlayersInLobby();\n int i = 0;\n for (; i < playersInLobby.length; i++) {\n final PlayerModel playerInLobby = playersInLobby[i];\n final TextField playerStatus = this.playersStatus[i];\n playerStatus.setColor(playerInLobby.isReady() ? Color.GREEN : Color.RED);\n playerStatus.setText(playerInLobby.getUsername());\n playerInLobby.clearPropertyChangeListeners();\n this.addPropertyChangeListener(playerInLobby, new PropertyChangeListener() {\n @Override\n public void propertyChange(PropertyChangeEvent evt) {\n String propertyName = evt.getPropertyName();\n if (propertyName.equals(\"username\")) {\n playerStatus.setText((String) evt.getNewValue());\n } else if (propertyName.equals(\"ready\")) {\n playerStatus.setColor((boolean) evt.getNewValue() ? Color.GREEN : Color.RED);\n }\n }\n });\n if (i >= 1 && this.host) {\n TextButton kickButton = kickButtons[i - 1];\n kickButton.clearListeners();\n kickButton.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent e, float x, float y) {\n Connection connection = ConnectionManager.getInstance().getConnection();\n if (connection instanceof ServerConnection) {\n UUID playerUUID = playerInLobby.getPlayerUUID();\n ServerSenderReceiver client = ((ServerConnection) connection).getClientByUUID(playerUUID);\n if (client != null) {\n connection.sendPacket(new KickPlayerPacket(playerUUID));\n ((ServerConnection) connection).removeClient(client);\n connection.getPlayer().getLobby().removePlayer(client.getPlayer());\n }\n }\n }\n });\n kickButton.setDisabled(false);\n }\n }\n for (int j = i; j < this.playersStatus.length; j++) {\n final TextField playerStatus = this.playersStatus[j];\n playerStatus.setColor(Color.RED);\n playerStatus.setText(\"\");\n if (j >= 1 && this.host) {\n TextButton kickButton = kickButtons[j - 1];\n kickButton.clearListeners();\n kickButton.setDisabled(true);\n }\n }\n }", "private void assign() throws IOException, ReversiException {\n this.color = fromServer.readInt();\n if(this.color == BLACK){\n opponentColor = WHITE;\n colorLabel.setText(\"YOU ARE BLACK\");\n boardComponent.setEnabled(true);\n setMsgText(\"Game start! It's your turn\");\n }else if (this.color == WHITE){\n opponentColor = BLACK;\n colorLabel.setText(\"YOU ARE WHITE\");\n setMsgText(\"Game start! Waiting for your opponents\");\n }else {\n report(\"Something wrong in the color assign\");\n }\n\n // display text\n setScoreText();\n\n // active the buttons\n setButtons(true);\n\n // after assign, keep listening to the NEWGAME command\n responseToServer();\n }", "private void createSetOfPlayers(List<ImgPath.Color> colors, List<Boolean> auto, List<AutoplayMode> autoMode) {\n int i = 0;\n for (ImgPath.Color c : ImgPath.Color.values()) {\n this.players[i] = new Player(c, auto.get(i), autoMode.get(i));\n this.players[i].setPIndex(i);\n //System.out.println(\"Player \"+c.name()+\" created.\");\n for(int j=0; j<4; j++){\n this.players[i].setXY(j);\n }\n if (colors.contains(c)) {\n this.players[i].setActive(true);\n this.xPlayers.add(i);\n }\n i++;\n }\n }", "public PlayerClass(int color, String name){\n\t\tthis.color=color;\n\t\tthis.name=name;\n\t\tpawns = new PawnClass[4];\n\t\tdiceTossed = false;\n\t}", "public static List<Color> getShuffledPlayerColor(int count) {\n List<Color> validPlayerColors = Config.PLAYER_COLORS;\n\n if (count > validPlayerColors.size()) {\n throw new IllegalStateException(\"Not enough valid Playercolor available\");\n }\n\n List<Color> colorList = new ArrayList<>();\n for (int i = 0; i < count; i++) {\n colorList.add(new Color(validPlayerColors.get(i)));\n }\n\n return colorList;\n }", "private void drawPlayers(Graphics g){\n\t\tg.setColor(Color.BLACK);\n\t\tfor(int i=0; i<grid.length; i++){\n\t\t\tfor(int j=0; j<grid[0].length; j++){\n\t\t\t\tfor(GameMatter itm: grid[i][j].getItems()){\n\t\t\t\t\tif(itm instanceof Bandit){\n\t\t\t\t\t\tif(itm.equals(player))\n\t\t\t\t\t\t\tg.setColor(Color.MAGENTA);\n\t\t\t\t\t\tg.fillRect(j*widthBlock+padding, i*heightBlock+padding, bandit, bandit);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void setColor(ChatColor color);", "private void initColours() {\n colourArray = Utilities.get2dResourceArray(getContext(), \"colour\");\n\n // A means to save colour configuration when screen is rotated between games.\n if (colourSet == null) {\n // Set new colour pairing.\n colourSet = new ColourSet();\n }\n\n // Set View colours\n mGameLoop.setColour(colourSet.primarySet);\n setToolbarColour(colourSet.primaryColourDark);\n mAltBackground.setBackgroundColor(colourSet.primaryColour);\n mTempToolbar.setBackgroundColor(colourSet.primaryColourDark);\n mFab.setBackgroundTintList(ColorStateList.valueOf(colourSet.secondaryColour));\n mWorldScore.setBackgroundColor(colourSet.getPrimaryColour(COLOUR_LOCATION_SCORE));\n }", "public void setRedPlayer(Player redPlayer) {\n\t\tthis.redPlayer = redPlayer;\n\t}", "private void green(){\n\t\tthis.arretes_fG();\n\t\tthis.coins_fG();\n\t\tthis.coins_a1G();\n\t\tthis.coins_a2G();\n\t\tthis.aretes_aG();\n\t\tthis.cube[31] = \"G\";\n\t}", "public PlayerColor getSecondPlayer() {\r\n return this.secondPlayer;\r\n }", "public PlayerColor getFirstPlayer() {\r\n return this.firstPlayer;\r\n }", "public Color getColor()\n {\n return mTeam.getColor();\n }", "public Piece.COLOR getActiveColor() {\n return activePlayer;\n }", "public void timeToChallenger() {\n\n\n String c = null;\n for(PlayerInterface p : onlinePlayers){\n if(p.getNickname().equals(getCurrentTurn().getCurrentPlayer().getNickname())){\n c = p.getWorkerRef().get(0).getColor();\n break;\n }\n }\n notifyCards(getCurrentTurn().getCurrentPlayer().getNickname(), c);\n notifyChoose(cardsChosen, this.getAllGods(), this.getCurrentTurn().getCurrentPlayer().getNickname());\n }", "public static void initial()\n\t{\n\t\tscoreteam1 = 0; scoreteam2 = 0;\n\t\tdelayed = 0;\n\t\tplayers = new Player[5];\n\t\tfor (int i = 0; i < 5; i++) \n\t\t{\n\t\t\tplayers[i] = new Player();\n\t\t}\n\n\t\t// finding how many players there are (2, 3, or 4) and initializing status\n\t\tplayerNum = 0;\n\t\tfor (int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif (Selection.exist[i])\n\t\t\t{\n\t\t\t\tplayerNum++;\n\t\t\t}\n\t\t\tplayers[i].exist = Selection.exist[i]; \n\t\t\tplayers[i].ai = Selection.ai[i];\n\t\t\tplayers[i].name = Selection.name[i];\t\t \n\t\t}\n\n\n\t\tplayers[3].keyDown = KeyEvent.VK_SEMICOLON;\n\t\tplayers[3].keyLeft = KeyEvent.VK_L;\n\t\tplayers[3].keyRight = KeyEvent.VK_QUOTE;\n\t\tplayers[3].keyUp = KeyEvent.VK_P;\n\t\tplayers[2].keyDown = KeyEvent.VK_H;\n\t\tplayers[2].keyLeft = KeyEvent.VK_G;\n\t\tplayers[2].keyRight = KeyEvent.VK_J;\n\t\tplayers[2].keyUp = KeyEvent.VK_Y;\n\t\tplayers[1].keyDown = KeyEvent.VK_S;\n\t\tplayers[1].keyLeft = KeyEvent.VK_A;\n\t\tplayers[1].keyRight = KeyEvent.VK_D;\n\t\tplayers[1].keyUp = KeyEvent.VK_W;\n\t\tplayers[4].keyDown = KeyEvent.VK_DOWN;\n\t\tplayers[4].keyLeft = KeyEvent.VK_LEFT;\n\t\tplayers[4].keyRight = KeyEvent.VK_RIGHT;\n\t\tplayers[4].keyUp = KeyEvent.VK_UP;\n\t\tplayers[1].color = Color.red;\n\t\tplayers[3].color = Color.green;\n\n\t\tif (Selection.team)\n\t\t{\n\t\t\tplayers[2].color = Color.red;\n\t\t\tplayers[4].color = Color.green;\n\t\t} \n\t\telse\n\t\t{\n\t\t\tplayers[2].color = Color.blue;\n\t\t\tplayers[4].color = Color.yellow;\n\t\t}\n\n\t}", "@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tif(match.getMatchStatus() != MatchStatus.ENDED) {\r\n\t\t\t\t\t\t\tmatch.simMatch(); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (p1==match.getWinner()) { \r\n\t\t\t\t\t\t\t\tPlayer1.setForeground(Color.GREEN);\r\n\t\t\t\t\t\t\t\tPlayer2.setForeground(Color.red); \r\n\t\t\t\t\t\t\t}else { \r\n\t\t\t\t\t\t\t\tPlayer2.setForeground(Color.green);\r\n\t\t\t\t\t\t\t\tPlayer1.setForeground(Color.red); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tmatchStatus.setText(\" Ended\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}", "private void initPieceColors(){\n\t\tfor(Piece p : this.pieces)\n\t\t\tpieceColors.put(p, Utils.randomColor());\n\t}", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tif(match.getMatchStatus() != MatchStatus.ENDED) {\r\n\t\t\t\tmatch.simMatch(); \r\n\t\t\t\t\r\n\t\t\t\tif (p1==match.getWinner()) { \r\n\t\t\t\t\tPlayer1.setForeground(Color.GREEN);\r\n\t\t\t\t\tPlayer2.setForeground(Color.red); \r\n\t\t\t\t}else { \r\n\t\t\t\t\tPlayer2.setForeground(Color.green);\r\n\t\t\t\t\tPlayer1.setForeground(Color.red); \r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tmatchStatus.setText(\" Ended\");\r\n\t\t\t\t}\r\n\t\t\t\t}", "private void yellow(){\n\t\tthis.arretes_fY();\n\t\tthis.coins_fY();\n\t\tthis.coins_a1Y();\n\t\tthis.coins_a2Y();\n\t\tthis.aretes_aY();\n\t\tthis.cube[49] = \"Y\";\n\t}", "public void changeWildRouteColor() {\n if (mCardsList.get(0))\n mSelectedRoute.setColor(\"red\");\n else if (mCardsList.get(1))\n mSelectedRoute.setColor(\"blue\");\n else if (mCardsList.get(2))\n mSelectedRoute.setColor(\"yellow\");\n else if (mCardsList.get(3))\n mSelectedRoute.setColor(\"green\");\n else if (mCardsList.get(4))\n mSelectedRoute.setColor(\"black\");\n else if (mCardsList.get(5))\n mSelectedRoute.setColor(\"orange\");\n else if (mCardsList.get(6))\n mSelectedRoute.setColor(\"purple\");\n else if (mCardsList.get(7))\n mSelectedRoute.setColor(\"white\");\n }", "public GameColor getColor();", "public void setColour(Colour colour);", "public static void GameOverEffect(ArrayList<JButton> myGameButton){\n enableButtons(myGameButton);\n for(int i=0; i<myGameButton.size(); ++i){\n myGameButton.get(i).setBackground(Color.red); // set buttons back-ground color\n myGameButton.get(i).setForeground(Color.white); // set buttons fore-ground color\n } \n }", "public void setColor(int value);", "public void setBlackAndWhite()\n {\n if(eyeL != null) // only if it's painted already...\n {\n eyeL.changeColor(\"black\");\n eyeR.changeColor(\"black\");\n nose.changeColor(\"black\");\n mouthM.changeColor(\"black\");\n mouthL.changeColor(\"black\");\n mouthR.changeColor(\"black\");\n }\n }", "public void setTurn(String color){\n this.colorsTurn = color;\n }", "@Override\n public void setCheckers(boolean color, ArrayList<Checker> checkersInUse, int checkerNum) {\n if(color == true) { //player x\n color = true;\n for(int i = 1; i <= 3; i++) { //iterates through three rows\n if(i%2 != 0) {\n for(int j = 1; j<= 7; j+=2) {\n checkersInUse.add(new KingChecker( j, i,true, checkerNum +1));\n checkerNum ++;\n }\n }else {\n for(int j = 2; j<= 8; j+=2) {\n checkersInUse.add(new KingChecker( j, i, true, checkerNum +1));\n checkerNum ++;\n }\n }\n }\n }else{\n color = false;\n for(int i = 6; i <= 8; i++) {\n if(i%2 != 0) {\n for(int j = 1; j<=7; j+=2) {\n checkersInUse.add(new Checker(j, i, false, checkerNum +1));\n checkerNum ++;\n }\n }else {\n for(int j = 2; j<=8; j+=2) {\n checkersInUse.add(new Checker(j, i, false, checkerNum +1));\n checkerNum ++;\n }\n }\n }\n\n }\n }", "public static Color getRemainsColorForPlayer(int player) {\n if (player >= remainsColors.length) {\n player = 0;\n }\n return remainsColors[player];\n }", "private void setColor() {\n cell.setStroke(Color.GRAY);\n\n if (alive) {\n cell.setFill(aliveColor);\n } else {\n cell.setFill(deadColor);\n }\n }", "protected void setSquare(int i, Color playerColor)\n {\n //System.out.println(\"Set \" + i + \" \" + playerColor);\n ticTacToeButtons[i].setBackground(playerColor);\n ticTacToeButtons[i].setContentAreaFilled(true);\n ticTacToeButtons[i].setEnabled(false);\n }", "private void changeTheColor(GObject object, int i) {\r\n\t\tif (i % 4 == 0) {\r\n\t\t\tobject.setColor(Color.BLACK);\r\n\t\t} else if (i % 4 == 1) {\r\n\t\t\tobject.setColor(Color.RED);\r\n\r\n\t\t} else if (i % 4 == 2) {\r\n\t\t\tobject.setColor(Color.BLUE);\r\n\r\n\t\t} else if (i % 4 == 3) {\r\n\t\t\tobject.setColor(Color.YELLOW);\r\n\t\t}\r\n\t}", "public Player(int startR ,int endR , int startC ,int endC , String color) { // constractor\n // startR - start row for creating the pieces , startC - start colomn for creating the pieces\n // endR - End row for creating the pieces , endC - END colomn for creating the pieces\n this.color=color;\n \n for(int i = startR; i <= endR; i++){\n for(int j = startC ; j <= endC ;j++){\n pieces.put(new Integer (j*Board.N+i), new Piece(i,j, color)); // new piece\n teritory.add(j* Board.N +i); // saving index of teritory base \n }\n }\n }", "@Test\n public void testVictoryRed(){\n for (Cell c: modelTest.grid) {\n if (c.getX() == 6)\n c.setColor(Color.RED);\n }\n\n modelTest.researchVictory(1,0);\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(winnerTest,Color.RED);\n }", "public List<Colour> getPlayerList();", "void nextToPlay(StoneColor _nextToPlay);", "void setColor(int r, int g, int b);", "Color playerOnMove() {\n return _playerOnMove;\n }", "public void setColor(int color);", "public void setColor(int color);", "private ArrayList<Colours> setColour(){\n\t\tArrayList<Colours> list = new ArrayList<Colours>();\n\t\tlist.add(Colours.RED);\n\t\tlist.add(Colours.BLUE);\n\t\tlist.add(Colours.YELLOW);\n\t\tlist.add(Colours.PINK);\n\t\tlist.add(Colours.GREEN);\n\t\tlist.add(Colours.PURPLE);\n\t\treturn list;\n\t}", "void testRandColor(Tester t) {\r\n initData();\r\n t.checkExpect(this.game2.randColor(), Color.ORANGE);\r\n t.checkExpect(this.game3.randColor(), Color.RED);\r\n t.checkExpect(this.game5.randColor(), Color.PINK);\r\n }", "public void setColor(int r, int g, int b);", "public PlayerColor getColor( int x, int y )\n {\n Field field = getField( x, y );\n if( field != null )\n return field.getColor();\n else\n return PlayerColor.NONE;\n }", "private void setTeamInfo_Red1() {\n redTeamNumber1.setText(fixNumTeam(redTeamNumber1.getText(), \"Red 1\"));\n\n redTeamNumber1.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.RED,\n FieldAndRobots.ONE, Integer.parseInt(redTeamNumber1.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.RED,\n FieldAndRobots.ONE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }", "public void setColor(int red, int green, int blue){\r\n this.red = red;\r\n this.green = green;\r\n this.blue = blue;\r\n }", "public void changeColor(){\r\n if(color == 1)\r\n color = 2;\r\n else\r\n color = 1;\r\n }", "public static void twoPlayers() {\r\n\t\tint[][] board = createBoard();\r\n\t\tshowBoard(board);\r\n\r\n\t\tSystem.out.println(\"Welcome to the 2-player Checkers Game !\");\r\n\r\n\t\tboolean oppGameOver = false;\r\n\t\twhile (!gameOver(board, RED) & !oppGameOver) {\r\n\t\t\tSystem.out.println(\"\\nRED's turn\");\r\n\t\t\tboard = getPlayerFullMove(board, RED);\r\n\r\n\t\t\toppGameOver = gameOver(board, BLUE);\r\n\t\t\tif (!oppGameOver) {\r\n\t\t\t\tSystem.out.println(\"\\nBLUE's turn\");\r\n\t\t\t\tboard = getPlayerFullMove(board, BLUE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint winner = 0;\r\n\t\tif (playerDiscs(board, RED).length == 0 | playerDiscs(board, BLUE).length == 0)\r\n\t\t\twinner = findTheLeader(board);\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"\\t ************************************\");\r\n\t\tif (winner == RED)\r\n\t\t\tSystem.out.println(\"\\t * The red player is the winner !! *\");\r\n\t\telse if (winner == BLUE)\r\n\t\t\tSystem.out.println(\"\\t * The blue player is the winner !! *\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"\\t * DRAW !! *\");\r\n\t\tSystem.out.println(\"\\t ************************************\");\r\n\t}", "public int check4CollisionsBtnPlayers(Player player)\n {\n int collisions_red = CollisionBetween2RedPlayers(player);\n int collisions_green = CollisionBetween2GreenPlayers(player);\n int collisions_yellow = CollisionBetween2YellowPlayers(player);\n //player.setCollisions(collisions_red);\n if (collisions_red > 0)\n {\n player.setCollisions(collisions_red);\n return collisions_red;\n }\n if (collisions_green > 0)\n {\n player.setCollisions(collisions_green);\n return collisions_green;\n }\n if (collisions_yellow > 0)\n {\n player.setCollisions(collisions_yellow);\n return collisions_yellow;\n }\n return -1;\n }", "public void fillColours() {\n this.colours = new String[4];\n this.colours[0] = \"diamonds\";\n this.colours[1] = \"hearts\";\n this.colours[2] = \"spades\";\n this.colours[3] = \"clubs\";\n }", "void synchronizeGame(PlayerColor[][] field);", "public void changeOddToBlack()\n {\n for (int i = 1; i < sqList.size(); i += 2)\n {\n sqList.get(i).setColor(\"black\");\n }\n }", "public PlayerIndicator (Color color)\n {\n this.color = color;\n setBackground(BACKGROUND_COLOR);\n setPreferredSize(new Dimension(30, 30));\n }", "private void setBlackPlayer(Player player) {\r\n\t\tthis.blackPlayer = player;\r\n\t}", "public void setColour(int teamid) {\n\t\tColours teamcolour = colour.get(index);\n\t\tindex++;\n\t\tindex %= 5;\n\t\tcolours.put(teamid, teamcolour);\n\t}", "private void red(){\n\t\tthis.arretes_fR();\n\t\tthis.coins_fR();\n\t\tthis.coins_a1R();\n\t\tthis.coins_a2R();\n\t\tthis.aretes_aR();\n\t\tthis.cube[13] = \"R\";\n\t}", "@Test\n public void testVictoryBlue(){\n for (Cell c: modelTest.grid) {\n if (c.getY() == 5)\n c.setColor(Color.BLUE);\n }\n\n modelTest.researchVictory(0,1);\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(winnerTest,Color.BLUE);\n }", "void setStatusColour(Color colour);", "@Override\n\tpublic void setColour(float r, float g, float b) {\n\n\t}", "public void setColor(float r, float g, float b, float a);", "public Pawn(String color){\r\n this.color=color; \r\n }", "@Test\n public void testNextPlayer() {\n\n assertEquals(Color.BLACK, game.getPlayerInTurn());\n game.nextTurn();\n assertEquals(Color.RED, game.getPlayerInTurn());\n game.nextTurn();\n assertEquals(Color.BLACK, game.getPlayerInTurn());\n }", "public void changeEvenToBlack(){\r\n for(int i = 0; i<sqList.size(); i++){\r\n if(i % 2==0){\r\n sqList.get(i).setColor(\"black\");\r\n } \r\n }\r\n }", "public void displayWinner(Player player) {\n System.out.println(\"Partie terminée !\");\n System.out.println(player.getPlayerName()+\" remporte la partie avec les billes \"+player.getColor().toString(true));\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n }", "public Player(String nickname, String color) {\n //Creating objects\n this.nickname = nickname;\n this.resources = new Assets();\n this.strengths = new Strengths();\n this.leaderCards = new ArrayList<>();\n this.familyMembers = new ArrayList<>();\n this.pickDiscounts = new HashMap<>();\n this.diceOverride = new HashMap<>();\n this.defaultHarvestBonus = new Assets();\n this.defaultProductionBonus = new Assets();\n this.color = color;\n this.cards = new HashMap<>();\n DEFAULT_TOWERS_COLORS.forEach(towerColor -> this.pickDiscounts.put(towerColor, new Assets()));\n pickDiscounts.put(BLACK_COLOR, new Assets());\n getLog().log(Level.INFO, \"New empty player %s created.\", nickname);\n }", "public static void StartGame(ArrayList<String> names) {\n for (String name : names) {\n Player player = new Player();\n player.Name = name;\n player.Color = new Color(0,0,0);\n players.add(player);\n }\n generateColor();\n // Read XML\n readXML();\n GameRunning = true;\n trackDices=false;\n dicesEqual=0;\n gameboard=new GameBoard();\n gameboard.initGame();\n }", "public void addPlayer(String color){\n if(!this.getPlayer(color).getActive()){\n this.getPlayer(color).reset();\n this.getPlayer(color).setActive(true);\n addXPlayers(this.getPlayer(color).getPIndex());\n turn = this.xPlayers.indexOf(currentPlayer);}\n }", "private static int getNextColor() {\n\t\tboolean[] used = new boolean[ServerStarter.MAX_PLAYERS];\t\t\t\t\t\t//create a boolean with the maximum of players\n\t\tfor(Player players : ServerStarter.getAllPlayers()) {\n\t\t\tused[players.getColorID()] = true;\t\t\t\t\t\t\t\t\t\t\t//go through all players and set their colorID to true if\n\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//it's used\n\t\tfor(int i = 0; i < used.length; i++) {\n\t\t\tif(!used[i]) {\n\t\t\t\treturn i;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//go through the boolean array and return the next unused color\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public void addPlayer(String playerID) {\r\n\t\tplayerCount++;\r\n\t\tString name = guild.getMemberById(playerID).getEffectiveName();\r\n\t\t// Set up each player uniquely\r\n\t\tif (p2 == null) {\r\n\t\t\tp2 = new Player(1,playerID,GlobalVars.pieces.get(\"blue\"));\r\n\t\t\tp2.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[1][0]);\r\n\t\t\tp2.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[1][1]);\r\n\t\t\tplayers.add(p2);\r\n\t\t\tp1.setNextPlayer(p2);\r\n\t\t\tp2.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the BLUE adventurer\").queue();\r\n\t\t} else if (p3 == null) {\r\n\t\t\tp3 = new Player(2,playerID,GlobalVars.pieces.get(\"yellow\"));\r\n\t\t\tp3.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[2][0]);\r\n\t\t\tp3.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[2][1]);\r\n\t\t\tplayers.add(p3);\r\n\t\t\tp2.setNextPlayer(p3);\r\n\t\t\tp3.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the YELLOW adventurer\").queue();\r\n\t\t} else if (p4 == null) {\r\n\t\t\tp4 = new Player(3,playerID,GlobalVars.pieces.get(\"green\"));\r\n\t\t\tp4.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[3][0]);\r\n\t\t\tp4.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[3][1]);\r\n\t\t\tplayers.add(p4);\r\n\t\t\tp3.setNextPlayer(p4);\r\n\t\t\tp4.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the GREEN adventurer\").queue();\r\n\t\t}\r\n\t}" ]
[ "0.7177904", "0.7140471", "0.7054599", "0.68648887", "0.67977166", "0.67971", "0.6732032", "0.6571707", "0.6493206", "0.6423156", "0.64079916", "0.637888", "0.636539", "0.63324887", "0.6325579", "0.63183767", "0.63158727", "0.6256152", "0.6240729", "0.6192678", "0.61809635", "0.6169329", "0.6143073", "0.61197996", "0.61082935", "0.61073124", "0.6030726", "0.60226315", "0.60105383", "0.5996884", "0.59862924", "0.5976233", "0.59728247", "0.5969042", "0.5966885", "0.59654623", "0.59423935", "0.59357005", "0.5932206", "0.59214604", "0.59202623", "0.5913843", "0.59002596", "0.5899476", "0.58979", "0.5862844", "0.5859372", "0.5849769", "0.5848347", "0.5843822", "0.5833573", "0.5813359", "0.5812666", "0.5800276", "0.5793425", "0.5779858", "0.577829", "0.577162", "0.57679814", "0.5766937", "0.5749706", "0.5749328", "0.57360584", "0.5733061", "0.5730072", "0.57293916", "0.5727775", "0.5722861", "0.57112485", "0.5706689", "0.56876504", "0.56876504", "0.56854284", "0.56847286", "0.56813407", "0.5670804", "0.56632155", "0.5658018", "0.56517917", "0.56394666", "0.56325924", "0.5631736", "0.56310654", "0.5625843", "0.5623274", "0.56130326", "0.5604853", "0.5604409", "0.5603048", "0.55982757", "0.5590057", "0.55895936", "0.55894566", "0.5587587", "0.55770576", "0.55725324", "0.5567862", "0.5566874", "0.5564183", "0.5562113", "0.55570203" ]
0.0
-1
Changes turn for player, also if column is full, disables button which corresponds to the column, making it known to users the column is full
public Color turnSwitcher(int i) { if ((counter % 2) == 0) { color = Color.yellow; } else { color = Color.red; } index[i] -= 1; if (index[i] < 1) { buttons[i].setEnabled(false); buttons[i].setBackground(Color.WHITE); } return color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void able()\n {\n // Enable all the buttons one by one\n for (int col = 0; col < COLUMNS; col++ )\n {\n // If the column is full, disable the corresponding button\n if (chessBoard[0][col] != 0)\n {\n drop[col].setEnabled(false);\n }\n // Else enable the button\n else\n {\n drop[col].setEnabled(true);\n }\n }\n }", "public boolean checkColumn() {\n\t\t// conditions fo player X\n\t\tif ((bt[0].getText().equals(\"X\") && bt[3].getText().equals(\"X\") && bt[6].getText().equals(\"X\"))\n\t\t\t\t|| (bt[1].getText().equals(\"X\") && bt[4].getText().equals(\"X\") && bt[7].getText().equals(\"X\"))\n\t\t\t\t|| (bt[2].getText().equals(\"X\") && bt[5].getText().equals(\"X\") && bt[8].getText().equals(\"X\"))) {\n\t\t\tjtf.setText(\" PLAYER X WON!\");\n\t\t\tjtf.setForeground(Color.red);\n\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tbt[i].setEnabled(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t// conditions fo player O\n\t\tif ((bt[0].getText().equals(\"O\") && bt[3].getText().equals(\"O\") && bt[6].getText().equals(\"O\"))\n\t\t\t\t|| (bt[1].getText().equals(\"O\") && bt[4].getText().equals(\"O\") && bt[7].getText().equals(\"O\"))\n\t\t\t\t|| (bt[2].getText().equals(\"O\") && bt[5].getText().equals(\"O\") && bt[8].getText().equals(\"O\"))) {\n\t\t\tjtf.setText(\" PLAYER O WON!\");\n\t\t\tjtf.setForeground(Color.blue);\n\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tbt[i].setEnabled(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public static void setPlayerColumn(int buttonNumber){\n\n int playerColumn; // global in python\n boolean moveFlag; // global in python\n\n if (gameBoard[0][buttonNumber].equals(\"-\")) { // Check if .equals() needs to be implemented\n playerColumn = buttonNumber;\n moveFlag = true;\n System.out.println(\"Player selected column: \" + (playerColumn + 1));\n }\n\n else{\n // Show dialgoue box that column is already full\n System.out.println(\"Column is full\");\n }\n }", "public void changeTurn()\r\n {\r\n isPlayersTurn = !isPlayersTurn;\r\n }", "public void changeTurn(){\r\n model.setCheckPiece(null);\r\n model.swapPlayers();\r\n }", "@Override\n public void disableEndTurnButton() {\n gameboardPanel.disableEndTurnButton();\n }", "@Override\n public void enableEndTurnButton() {\n gameboardPanel.enableEndTurnButton();\n }", "public void update(int row, int column)\n {\n //temporary Toast message\n //Toast.makeText(MainActivity.this,\"update: row is \"+row+\"and column is \"+column, Toast.LENGTH_SHORT).show();\n\n //put an X on the Button that was clicked\n // buttons[row][column].setText(\"X\");\n\n int currentPlayer = game.play(row,column);\n\n if (currentPlayer == 1)\n buttons[row][column].setText(\"X\");\n else if (currentPlayer == 2 )\n buttons[row][column].setText(\"O\");\n\n //check if the game is over\n if (game.isGameOver())\n {\n\n gameStatus.setBackgroundColor(Color.CYAN);\n //disable all the buttons\n enableButtons(false);\n gameStatus.setText(game.result());\n showNewGameDialog();\n }\n }", "public void changeTurn( boolean myTurn ) {\n\t\t// Go through all buttons and reset their visiblity\n\t\t// and specify enables based on who's turn it is.\n\t\tfor ( int row = 0; row < GRID_ROWS; row++ ) {\n\t\t\tfor ( int col = 0; col < GRID_COLS; col++ ) {\n\t\t\t\tletterButton[row][col].setEnabled( myTurn );\n\t\t\t\tletterButton[row][col].setVisible( true );\n\t\t\t}\n\t\t}\n\t\t// Reset word field\n\t\twordField.setText( \"\" );\n\t\tokButton.setEnabled( myTurn );\n\t}", "public void changePlayerTurn()\n {\n if (player_turn == RED)\n player_turn = BLACK;\n else\n player_turn = RED;\n }", "private void setTurn() {\n if (turn == black) {\n turn = white;\n } else {\n turn = black;\n }\n }", "private void changeTurn(){ \r\n\t\tif (currentTurn == 1)\r\n\t\t\tcurrentTurn = 0; \r\n\t\telse\r\n\t\t\tcurrentTurn = 1; \r\n\t}", "public void game(int i) {\n //if it is true it is player 1, other wise it is player 2\n //also changes the colour to indicate who moves next\n if (turn) {\n changeColourButton(new Color(0, 0, 255));\n turn(i, 1, 0);\n } else {\n changeColourButton(new Color(255, 0, 0));\n turn(i, 2, 1);\n }\n\n //prevents additional inputs if the column is full\n killButton();\n }", "public void setButtonVisibility() {\n if (MankomaniaGame.getMankomaniaGame().getLocalClientPlayer().getPlayerIndex() == MankomaniaGame.getMankomaniaGame().getGameData().getCurrentPlayerTurnIndex()) {\n cheatButton.setText(\"Cheat\");\n playerAtTurn.setVisible(true);\n playerNotAtTurn.setVisible(false);\n } else {\n cheatButton.setText(\"Assume Cheating\");\n playerAtTurn.setVisible(false);\n playerNotAtTurn.setVisible(true);\n }\n }", "protected void changeSideClicked(ActionEvent e) {\n blackPlayer = 1 - blackPlayer;\n updateTurnInfo();\n startNewGame();\n }", "public void toggle() {\n if (currentPlayer.equals(\"red\")) {\n currentColor = BLUE_COLOUR;\n currentPlayer = \"blue\";\n } else {\n currentColor = RED_COLOUR;\n currentPlayer = \"red\";\n }\n //change color of grid\n changeColor();\n }", "public boolean checkRow() {\n\t\t// conditions fo player X\n\t\tif ((bt[0].getText().equals(\"X\") && bt[1].getText().equals(\"X\") && bt[2].getText().equals(\"X\"))\n\t\t\t\t|| (bt[3].getText().equals(\"X\") && bt[4].getText().equals(\"X\") && bt[5].getText().equals(\"X\"))\n\t\t\t\t|| (bt[6].getText().equals(\"X\") && bt[7].getText().equals(\"X\") && bt[8].getText().equals(\"X\"))) {\n\t\t\tjtf.setText(\" PLAYER X WON!\");\n\t\t\tjtf.setForeground(Color.red);\n\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tbt[i].setEnabled(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t// conditions fo player O\n\t\tif ((bt[0].getText().equals(\"O\") && bt[1].getText().equals(\"O\") && bt[2].getText().equals(\"O\"))\n\t\t\t\t|| (bt[3].getText().equals(\"O\") && bt[4].getText().equals(\"O\") && bt[5].getText().equals(\"O\"))\n\t\t\t\t|| (bt[6].getText().equals(\"O\") && bt[7].getText().equals(\"O\") && bt[8].getText().equals(\"O\"))) {\n\t\t\tjtf.setText(\" PLAYER O WON!\");\n\t\t\tjtf.setForeground(Color.blue);\n\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tbt[i].setEnabled(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "@Override\n\tprotected void handleMouseClick(int row, int col, int mouseButton) {\n\t\tthis.turn = getTurn();\n\t\tif (activeBoard) {\n\t\t\tif (getBoard().getPieceCount(turn) == 0) {\n\t\t\t\tif(initAvailable){\n\t\t\t\t\tplayer.setMove(init_row, init_col, row, col);\n\t\t\t\t\tinitAvailable = false;\n\t\t\t\t\tdecideMakeManualMove(player);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tinit_row = row;\n\t\t\t\t\tinit_col = col;\n\t\t\t\t\tinitAvailable = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tplayer.setMove(-1, -1, row, col);\n\t\t\t\tdecideMakeManualMove(player);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@Override\n public void run() {\n viewDelegate.setView(cell, 'O');\n isPlayerTurn = true;\n }", "public void changeTurn() {\n\t\t\n\t\tif(currentTurn == white) {\n\t\t\t\n\t\t\tcurrentTurn = black;\n\t\t}\n\t\telse if(currentTurn == black){\n\t\t\t\n\t\t\tcurrentTurn = white;\n\t\t}\n\t}", "private void myTurn()\n\t{\n\t\t\n\t\tif (canPlay())\n\t\t{\n\t\t\tif (isTop())\n\t\t\t{\n\t\t\t\traise();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tequal();\n\t\t\t}\n\t\t}\n\t\ttable.nextPlayer();\n\t\t\n\t}", "public void resetBoard() {\r\n //remove the potential winning cards after winner is picked\r\n cardSix.setText(\"\");\r\n cardSeven.setText(\"\");\r\n cardEight.setText(\"\");\r\n \r\n //change turn count\r\n if (turnCount == 4) {\r\n turnCount = 1;\r\n }\r\n else {\r\n turnCount++; \r\n }\r\n \r\n //if the player isnt the cardmaster, enable their cards\r\n if (turnCount != myNumber) {\r\n cardOne.setEnabled(true);\r\n cardTwo.setEnabled(true);\r\n cardThree.setEnabled(true);\r\n cardFour.setEnabled(true);\r\n cardFive.setEnabled(true); \r\n cardSix.setEnabled(false);\r\n cardSeven.setEnabled(false);\r\n cardEight.setEnabled(false); \r\n }\r\n if (turnCount == myNumber) {\r\n cardSix.setEnabled(true);\r\n cardSeven.setEnabled(true);\r\n cardEight.setEnabled(true);\r\n JOptionPane.showMessageDialog(null, \"You are the CardMaster for this turn.\");\r\n }\r\n }", "public static void switchPlayers(){\n\t\tif(turn.equals(\"white\")){\n\t\t\tturn = \"black\";\n\t\t}\n\t\telse{\n\t\t\tturn = \"white\";\n\t\t}\n\t}", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "private void buttonClicked(int c){\r\n boardRep[currentFilled[c]][c] = blackToPlay ? 1:-1; //adjust board rep\r\n if (blackToPlay){\r\n boardSquares[5-currentFilled[c]][c].setBackground(Color.BLACK);\r\n for (int i = 0; i < 7; i++) {\r\n moveSelect[i].setBackground(Color.RED);\r\n }\r\n int y = 5-currentFilled[c];\r\n \r\n \r\n for (int i = 0; i < 4; i++) { //check horizontal for black win\r\n if ((c-3 + i)>-1 && c-3+i<4){\r\n horizontal4s[y][c-3+i]++;\r\n if (horizontal4s[y][c-3+i] == 4){\r\n winnerText.setText(\"BLACK WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < 4; i++) { //check vertical for black win\r\n if (y-3+i>-1 && y-3+i<3){\r\n vertical4s[y-3+i][c]++;\r\n if (vertical4s[y-3+i][c] == 4){\r\n winnerText.setText(\"BLACK WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < 4; i++) { //check TLBR diag for black win\r\n if (y-3+i>-1 && y-3+i<3 && c-3+i>-1 && c-3+i<4){\r\n diagonalTLBR4s[y-3+i][c-3+i]++;\r\n if (diagonalTLBR4s[y-3+i][c-3+i] == 4){\r\n winnerText.setText(\"BLACK WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < 4; i++) { //check TRBL diag for black win\r\n if (y-3+i>-1 && y-3+i<3 && c+3-i>-1 && c+3-i < 4){\r\n diagonalTRBL4s[y-3+i][c+3-i]++;\r\n if (diagonalTRBL4s[y-3+i][c+3-i] == 4){\r\n winnerText.setText(\"BLACK WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n \r\n \r\n }\r\n else{\r\n boardSquares[5-currentFilled[c]][c].setBackground(Color.RED);\r\n for (int i = 0; i < 7; i++) {\r\n moveSelect[i].setBackground(Color.BLACK);\r\n }\r\n \r\n int y = 5-currentFilled[c];\r\n \r\n \r\n for (int i = 0; i < 4; i++) { //check horizontal for black win\r\n if ((c-3 + i)>-1 && c-3+i<4){\r\n horizontal4s[y][c-3+i]--;\r\n if (horizontal4s[y][c-3+i] == -4){\r\n winnerText.setText(\"RED WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < 4; i++) { //check vertical for black win\r\n if (y-3+i>-1 && y-3+i<3){\r\n vertical4s[y-3+i][c]--;\r\n if (vertical4s[y-3+i][c] == -4){\r\n winnerText.setText(\"RED WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < 4; i++) { //check TLBR diag for black win\r\n if (y-3+i>-1 && y-3+i<3 && c-3+i>-1 && c-3+i<4){\r\n diagonalTLBR4s[y-3+i][c-3+i]--;\r\n if (diagonalTLBR4s[y-3+i][c-3+i] == -4){\r\n winnerText.setText(\"RED WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < 4; i++) { //check TRBL diag for black win\r\n if (y-3+i>-1 && y-3+i<3 && c+3-i>-1 && c+3-i < 4){\r\n diagonalTRBL4s[y-3+i][c+3-i]--;\r\n if (diagonalTRBL4s[y-3+i][c+3-i] == -4){\r\n winnerText.setText(\"RED WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n \r\n }\r\n blackToPlay = !blackToPlay;\r\n currentFilled[c]++;\r\n if(currentFilled[c] == 6)\r\n moveSelect[c].setEnabled(false);\r\n }", "public boolean checkDiagonal() {\n\t\t// conditions fo player X\n\t\tif ((bt[0].getText().equals(\"X\") && bt[4].getText().equals(\"X\") && bt[8].getText().equals(\"X\"))\n\t\t\t\t|| (bt[2].getText().equals(\"X\") && bt[4].getText().equals(\"X\") && bt[6].getText().equals(\"X\"))) {\n\t\t\tjtf.setText(\" PLAYER X WON!\");\n\t\t\tjtf.setForeground(Color.red);\n\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tbt[i].setEnabled(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t// conditions fo player O\n\t\tif ((bt[0].getText().equals(\"O\") && bt[4].getText().equals(\"O\") && bt[8].getText().equals(\"O\"))\n\t\t\t\t|| (bt[2].getText().equals(\"O\") && bt[4].getText().equals(\"O\") && bt[6].getText().equals(\"O\"))) {\n\t\t\tjtf.setText(\" PLAYER O WON!\");\n\t\t\tjtf.setForeground(Color.blue);\n\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tbt[i].setEnabled(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }", "public void restart()\n {\n //resets values \n x = 0; // stores current row of black piece when moving right or right + down\n x3 = 7; // stores current row of black piece when moving right + down\n y = 0; // stores current column of black piece\n x2 = 0; // stores current row of white piece when moving left or left + down\n x4 = 7; // stores current row of white piece when moving left + down\n y2 = 7; // stores current column of black piece\n gameSet = false; // decides if a player has won the game or not\n whiteCount = 0; // counts how many white pieces were taken\n blackCount = 0; // counts how many black pieces were taken\n \n \n //determines which players start first\n turn = Math.random() < 0.5; \n \n //if turn == 0/false \n if(turn == false)\n {\n player.setText(\"<html><strong><font color='red'>Player 1 starts first!</font></strong></html>\");\n }\n \n //if turn == 1/true\n if(turn == true)\n {\n player.setText(\"<html><strong><font color='blue'>Player 2 starts first!</font></strong></html>\");\n }\n \n \n \n //sets icons for the left 16 buttons to the icon black\n for( int rows = 0; rows< gridUnits.length; rows++)\n {\n \n for(int cols = 0;cols <2; cols++)\n {\n gridUnits[rows][cols].setIcon(black);\n }\n }\n \n \n //sets icons for the right 16 buttons to the icon white\n for(int rows = 0; rows< gridUnits.length; rows++)\n {\n \n for(int cols = 6;cols <8; cols++)\n {\n gridUnits[rows][cols].setIcon(white);\n \n }\n \n }\n \n //sets icons for the middle 32 buttons to the icon blank\n for(int rows = 0; rows< gridUnits.length; rows++)\n {\n \n for(int cols = 2;cols <6; cols++)\n {\n gridUnits[rows][cols].setIcon(blank);\n \n }\n \n } \n \n //adds actionListeners to all of the 64 buttons\n for (int rows = 0; rows < gridUnits.length; rows++)\n {\n \n for(int cols = 0; cols < gridUnits.length; cols++)\n {\n gridUnits[rows][cols].addActionListener(this);\n \n }\n \n }\n \n }", "void gameTurn(int move){\n int gameWon = -1;\n boolean gameTie = false;\n //set the board to a move and print it\n if (loggedInUser.myGame.currentLetter.equals(\"X\")){\n gameBoard [move] = 1;\n printMove(move,\"X\");\n }\n else{\n gameBoard[move] = 2;\n printMove(move,\"O\");\n }\n //Update the status of the buttons graying out the ones that were played\n updateButtons();\n\n //checks if the game has been won or not\n gameWon = checkGameWon();\n\n //check of the game has been tied\n gameTie = checkTie();\n\n Game game = new Game(loggedInUser.opponentId);\n game.currentMove = move;\n\n if (loggedInUser.myGame.currentLetter.equals(\"X\")){\n game.currentLetter = \"O\";\n }else {\n game.currentLetter = \"X\";\n }\n\n //if the game hasn't been won and the game hasnt been tied the other playesr turn is made\n if(gameWon != 0 && !gameTie){\n game.gameInProgress = true;\n }\n //if game won\n else if (gameWon != 0){\n //remove all of the buttons\n removeAllButtons();\n game.gameInProgress = false;\n }\n else{\n playerText.setText(\"The game is tie\");\n turn.setText(\"No one wins\");\n game.gameInProgress = false;\n }\n\n //set data\n mDatabaseRef.child(loggedInUser.myId).child(\"myGame\").setValue(game);\n mDatabaseRef.child(loggedInUser.opponentId).child(\"myGame\").setValue(game);\n }", "private void compMode(int col) {\r\n\t\tint colPlayer, rowPlayer, colComp, rowComp;\r\n\t\tColor player = Color.yellow;\r\n\t\tColor comp = Color.red;\r\n\r\n\t\tcolPlayer = col;\r\n\t\trowPlayer = compAI.playerMove(colPlayer);\r\n\t\tsquares[rowPlayer][colPlayer].setBackground(player);\r\n\r\n\t\t/**\r\n\t\t * Automatically places chip for computer (This is where the turn of AI takes place)\r\n\t\t */\r\n\t\tcompAI.compMove();\r\n\t\tcolComp = compAI.getColOfAITurn();\r\n\t\trowComp = compAI.getRowOfAITurn();\r\n\t\tif (!compAI.isColumnFull(colComp)) {\r\n\t\t\tsquares[rowComp][colComp].setBackground(comp);\r\n\t\t}\r\n\t\tif (compAI.isColumnFull(col)) {\r\n\t\t\tbuttons[col].setEnabled(false);\r\n\t\t\tbuttons[col].setBackground(Color.WHITE);\r\n\t\t}\r\n\t}", "public void changeTurnOfPlayer(PlayerState player)\n {\n if(player.getColorOfPlayer() == Color.BLACK)\n {\n this.turnOfPlayer = playerWhite;\n }\n else\n {\n this.turnOfPlayer = playerBlack;\n }\n }", "@Override\n\tpublic void changeTurn() {\n\t\t\n\t}", "public void enableEndTurnButton(){\n this.endTurnButton.setEnabled(true);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n updateJTables();\n if(Controller.flag<3)\n Controller.flag++;\n else{\n Controller.flag=0;\n }\n if(Controller.initialTurnCount>=4){\n \tDice.DiceClick=true;\n if(AdjacencyListRoads.roadKingDeterminer()!=-1){//if there is a road king\n if(Controller.lastRoadKing!=-1){//if last road king exists\n Controller.players[Controller.lastRoadKing].roadKing=false;\n Controller.players[Controller.lastRoadKing].score-=2;\n }\n Controller.lastRoadKing=AdjacencyListRoads.roadKingDeterminer();//set current road king as the last\n Controller.players[AdjacencyListRoads.roadKingDeterminer()].roadKing=true;\n Controller.players[AdjacencyListRoads.roadKingDeterminer()].score+=2;\n }\n }\n for(int i=0;i>4;i++) {\n \tif(Controller.players[i].score>=20) {\n \t\tJOptionPane.showMessageDialog(null, \"Player\"+(i+1)+\"is the winner!\");\n \t}\n }\n turn.setText(\"The current player is: \"+\"Player\"+String.valueOf(Controller.flag+1));\n }", "private void decidesActivateBoard(Piece turn){\n\t\tif(multiview()){\n\t\t\tif(this.LOCAL_PIECE.equals(turn))activateBoard();\n\t\t\telse deActivateBoard();\n\t\t}\n\t\telse activateBoard();\n\t}", "public void updateAIBoard(int row, int column)\r\n {\r\n if(marker.equals(Marker.circle)) {\r\n buttons[row][column].setText(\"X\");\r\n }\r\n else\r\n {\r\n buttons[row][column].setText(\"O\");\r\n }\r\n buttons[row][column].setEnabled(false);\r\n }", "public void setPlayerTurn(boolean playerTurn) {\n this.playerTurn = playerTurn;\n }", "public void disableEndTurnButton(){\n\n this.endTurnButton.setEnabled(false);\n }", "void updateButtons(){\n if (gameBoard[0] != 0){\n buttonGame1.setVisibility(View.INVISIBLE);\n }else {\n buttonGame1.setVisibility(View.VISIBLE);\n }\n if (gameBoard[1] != 0){\n buttonGame2.setVisibility(View.INVISIBLE);\n }else\n {\n buttonGame2.setVisibility(View.VISIBLE);\n }\n\n if (gameBoard[2] != 0){\n buttonGame3.setVisibility(View.INVISIBLE);\n }else {\n buttonGame3.setVisibility(View.VISIBLE);\n }\n\n if (gameBoard[3] != 0){\n buttonGame4.setVisibility(View.INVISIBLE);\n }else{\n buttonGame4.setVisibility(View.VISIBLE);\n }\n\n if (gameBoard[4] != 0){\n buttonGame5.setVisibility(View.INVISIBLE);\n }else{\n buttonGame5.setVisibility(View.VISIBLE);\n }\n\n if (gameBoard[5] != 0){\n buttonGame6.setVisibility(View.INVISIBLE);\n }else{\n buttonGame6.setVisibility(View.VISIBLE);\n }\n\n if (gameBoard[6] != 0){\n buttonGame7.setVisibility(View.INVISIBLE);\n }else{\n buttonGame7.setVisibility(View.VISIBLE);\n }\n\n if (gameBoard[7] != 0){\n buttonGame8.setVisibility(View.INVISIBLE);\n }else{\n buttonGame8.setVisibility(View.VISIBLE);\n }\n if (gameBoard[8] != 0){\n buttonGame9.setVisibility(View.INVISIBLE);\n }else{\n buttonGame9.setVisibility(View.VISIBLE);\n }\n }", "public void changeTurn() {\n if (turn == 1) {\n turn = 2;\n\n } else {\n turn = 1;\n\n }\n setTextBackground();\n }", "void killButton() {\n //goes through all columns\n for (int i = 0; i < 7; i++) {\n //if the not of valid move is true, disable the buttons\n if (!Checker.validMove(currentBoard, i)) {\n Inputbuttons[i].setEnabled(false);\n }\n }\n }", "public void actionPerformed(ActionEvent evt) {\n if ( player == 0 ) { // Player O - blackstone\n if (jButton[j].getIcon().equals(B)) {\n jButton[j].setIcon(O); // value of current button read left to right and then top to bottom\n \n board[j/csize][j%csize] = 0;\n int win = 1;\n win = checkrow(board,j/csize,0);\n if ( win == 0 ) {\n win = checkcol(board,j%csize,0);\n }\n if ( win == 0 ) {\n win = checkdiag(board,0 , j/csize, j%csize);\n }\n player = 1; // switches player\n markers++;\n\n if ( win == 1 ) {\n exitAction(\"Blackstone wins!\\n\");\n }\n if ( markers == gsize ) { // if all blocks have been taken\n exitAction(\"Draw!\\n\");\n }\n } \n } else { // Player X - whitestone = 1\n if (jButton[j].getIcon().equals(B)) {\n jButton[j].setIcon(X);\n board[j/csize][j%csize] = 1;\n int win = 1;\n win = checkrow(board,j/csize,1);\n if ( win == 0 ) {\n win = checkcol(board,j%csize,1);\n }\n if ( win == 0 ) {\n win = checkdiag(board, 1, j/csize, j%csize );\n }\n player = 0;\n markers++;\n\n if ( win == 1 ) {\n exitAction(\"Whitestone wins!\\n\");\n }\n if ( markers == gsize ) {\n exitAction(\"Draw!\\n\");\n }\n } \n }\n }", "public void chooseDirection(){\n Player player=board.getPlayer();\n if(player==null) return;\n if (getXCentrer()>board.getPlayer().getXCentrer()){\n setDirection(3);\n }\n else{\n setDirection(1);\n }\n }", "public void takeTurn(){\r\n //Handled by GameWindow buttons\r\n }", "public void setPlayer(boolean isWhiteTurn) {\n\t\tif (isWhiteTurn == true) setGraphic(new ImageView(whitePiece));\n\t\tif (isWhiteTurn == false) setGraphic(new ImageView(blackPiece));\n\t\tisActiveImageOn = false;\n\t}", "public void setTurned(int index, boolean val){\n if (val == true) {\n if (selectedOption == 1) {\n if(cards.get(index).getNumber() == 1){\n cards.get(index).getPanel().setBorder(BorderFactory.createBevelBorder(1, Color.red, Color.blue));\n }\n cards.get(index).getPanel().setIcon(new ImageIcon(new ImageIcon(getClass().getResource(cards.get(index).getImgAnime())).getImage().getScaledInstance(cards.get(index).getPanel().getWidth(), cards.get(index).getPanel().getHeight(), Image.SCALE_SMOOTH)));\n } else {\n if (cards.get(index).getNumber() == 1) {\n cards.get(index).getPanel().setBorder(BorderFactory.createBevelBorder(1, Color.red, Color.blue));\n cards.get(index).getPanel().setIcon(new ImageIcon(new ImageIcon(getClass().getResource(cards.get(index).getImgAnime())).getImage().getScaledInstance(cards.get(index).getPanel().getWidth(), cards.get(index).getPanel().getHeight(), Image.SCALE_SMOOTH)));\n } else {\n cards.get(index).getPanel().setBackground(cards.get(index).getColor());\n cards.get(index).getPanel().setIcon(null);\n }\n }\n cards.get(index).setTurned(true);\n }\n if (val == false) {\n cards.get(index).getPanel().setIcon(new ImageIcon(new ImageIcon(getClass().getResource(\"img/Memory.png\")).getImage().getScaledInstance(cards.get(index).getPanel().getWidth(), cards.get(index).getPanel().getHeight(), Image.SCALE_SMOOTH)));\n cards.get(index).setTurned(false);\n cards.get(index).getPanel().setBorder(UIManager.getBorder(\"Button.border\"));\n }\n }", "public void playChip(int col, Player player) {\n\t\t// ********************\n\t\t// Aufgabe a)\n\t\t// Klasse muss selber verwalten, wer gerade am Zug war \n\t\tint inputRow = fields.length - fillState[col] - 1;\n\t\t\n\t\tfields[inputRow][col] = first_player ? 1:2;\n\t\t\n\t\tfirst_player = !first_player;\n\t\t\n\t\tfillState[col]++;\n\t\t\n\t\t// ********************\n\t}", "public void playTheGame() {\n\t\tint column;\n\t\ttry {\n\t\t\tboolean gameIsOver = false;\n\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\taConnect4Field.toString());\n\n\t\t\tdo {\n\t\t\t\tfor (int index = 0; index < thePlayers.length; index++) {\n\t\t\t\t\t// thePlayers[index].getView().showOutput(aConnect4Field.toString());\n\t\t\t\t\tif (aConnect4Field.isItaDraw()) {\n\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\"Draw\");\n\t\t\t\t\t\tgameIsOver = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\tthePlayers[index].getName()\n\t\t\t\t\t\t\t\t\t\t+ \" it's Your Turn! play your move\");\n\t\t\t\t\t\tcolumn = thePlayers[index].nextMove();\n\t\t\t\t\t\twhile (!aConnect4Field\n\t\t\t\t\t\t\t\t.checkIfPiecedCanBeDroppedIn(column)) {\n\t\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\t\t\"Invalid Turn Try again\");\n\t\t\t\t\t\t\tcolumn = thePlayers[index].nextMove();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\taConnect4Field.dropPieces(column,\n\t\t\t\t\t\t\t\tthePlayers[index].getGamePiece());\n\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\t\t\t\taConnect4Field.toString());\n\t\t\t\t\t\tif (aConnect4Field.error != \"\") {\n\n\t\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\t\taConnect4Field.error);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (aConnect4Field.didLastMoveWin()) {\n\t\t\t\t\t\t\t\tgameIsOver = true;\n\t\t\t\t\t\t\t\t// all player get to know\n\t\t\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\t\t\t\t\t\t\"The winner is: \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ thePlayers[index]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getName());\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} while (!gameIsOver);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void turn(){ \r\n\t\tif (currentTurn == 0){ \r\n\t\t\tSystem.out.println(\"Computer's Turn\");\r\n\t\t\tnextRowWin();\r\n\t\t\tnextColWin(); \r\n\t\t\tnextDiagWin();\r\n\t\t\t//check if next move is row win\r\n\t\t\tif (!Arrays.equals(rowWin, checkWin)){\r\n\t\t\t\tcounter(rowWin); \r\n\t\t\t}\r\n\t\t\t//check if next move is column win \r\n\t\t\telse if (!Arrays.equals (colWin, checkWin)) {\r\n\t\t\t\tcounter(colWin); \r\n\t\t\t}\r\n\t\t\t//check if next move is diagonal win\r\n\t\t\telse if (!Arrays.equals(diagWin, checkWin)){\r\n\t\t\t\tcounter(diagWin);\r\n\t\t\t}\r\n\t\t\t//computer moves based on priority positions\r\n\t\t\telse\r\n\t\t\t\tcompMove(); \r\n\t\t\tchangeTurn(); \r\n\t\t}\r\n\t\telse { \r\n\t\t\tSystem.out.println(\"Player's Turn\");\r\n\t\t\tint nextCol, nextRow; \r\n\t\t\tScanner in = new Scanner (System.in); \r\n\t\t\tSystem.out.print (\"Please enter row and column to place your piece [Enter as col row]: \");\r\n\t\t\tif (in.hasNext()) { \r\n\t\t\t\tnextCol = in.nextInt(); \r\n\t\t\t\tnextRow = in.nextInt(); \r\n\t\t\t\tif (nextCol == 3 || nextRow == 3)\r\n\t\t\t\t\tSystem.out.println(\"Input of of range. col and row must be between 0-2.\");\r\n\t\t\t\telse if (board[nextCol][nextRow] == '-') {\r\n\t\t\t\t\tboard[nextCol][nextRow] = 'X'; \r\n\t\t\t\t\tchangeTurn(); \r\n\t\t\t\t}\r\n\t\t\t\telse { \r\n\t\t\t\t\tSystem.out.println(\"Invalid Input. There is already a piece in that location.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse { \r\n\t\t\t\tSystem.out.println(\"Invalid Input. Please input integers for col row.\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setYourTurn(Boolean yourTurn) {\n this.yourTurn = yourTurn;\n }", "public void acivatePlayer() {\n\t\tthis.setEnabled(true);\n\t}", "private void updateUserBoard()\r\n {\r\n for(int i = 0; i < 3; i++)\r\n {\r\n for(int j = 0; j < 3; j++) {\r\n if ((buttons[i][j].getText().charAt(0) == ' ') && !(buttons[i][j].isEnabled())) {\r\n if (marker.equals(Marker.cross)) {\r\n buttons[i][j].setText(\"X\");\r\n } else {\r\n buttons[i][j].setText(\"O\");\r\n }\r\n }\r\n }\r\n }\r\n }", "public void play() {\n field.draw();\n userTurn();\n if(! field.isFull()) {\n computerTurn();\n }\n }", "private void endGame(boolean gameWon) {\n if (gameWon) {\n winloseLabel.setText(\"YOU WIN\");\n for (int i = 0;i < btArray.length;i++) {\n for (int j = 0; j < btArray[0].length; j++) {\n // if it's a mine\n if (mainField.getValue(i,j) == -1) {\n // turn the button green\n btArray[i][j].setStyle(\"-fx-background-color: #00FF00;\");\n }\n }\n }\n }\n else {\n winloseLabel.setText(\"YOU LOSE\");\n }\n // disables all of the buttons\n for (Button[] subArray : btArray) {\n for (Button button : subArray) {\n button.setDisable(true);\n }\n }\n }", "public void changeTurn(){\n // this function is used to calculate the turn of a player after every move is played\n int turn = this.turn;\n turn++;\n this.turn = turn%GameConfiguration.NUMBER_OF_PLAYERS;\n }", "void setTurn(int turn);", "public SetPlayerTurnAction() {}", "@Override\n public void enableProductionButtons() {\n gameboardPanel.disableEndTurnButton();\n gameboardPanel.disableEndOfProductionButton();\n gameboardPanel.enableProductionButtons();\n leaderCardsPanel.enableProductionButtons();\n }", "void setPlayerTurn() throws RemoteException;", "private void disableP1Buttons(){\n game_BTN_p1_lightAttack.setEnabled(false);\n game_BTN_p1_strongAttack.setEnabled(false);\n game_BTN_p1_brutalAttack.setEnabled(false);\n }", "private void disableDice() {\n\t\ttogglebtnD1.setDisable(true);\n\t\ttogglebtnD2.setDisable(true);\n\t\ttogglebtnD3.setDisable(true);\n\t\tendTurnButton.setDisable(true);\n\t}", "public void disable()\n {\n // Disable all the buttons one by one\n for (int col = 0; col < COLUMNS; col++ )\n {\n drop[col].setEnabled(false);\n }\n }", "private void updateBoard(int column, int turn) {\n rowHeight = cfBoard.rowHeight(column);\n int color = cfBoard.getColor(rowHeight-1, column-1);\n switch(column) {\n case 1:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c1.setBackground(Color.BLACK);\n break;\n case 2:\n r1c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c1.setBackground(Color.BLACK);\n break;\n case 2:\n r2c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c1.setBackground(Color.BLACK);\n break;\n case 2:\n r3c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c1.setBackground(Color.BLACK);\n break;\n case 2:\n r4c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c1.setBackground(Color.BLACK);\n break;\n case 2:\n r5c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c1.setBackground(Color.BLACK);\n break;\n case 2:\n r6c1.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 2:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c2.setBackground(Color.BLACK);\n break;\n case 2:\n r1c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c2.setBackground(Color.BLACK);\n break;\n case 2:\n r2c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c2.setBackground(Color.BLACK);\n break;\n case 2:\n r3c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c2.setBackground(Color.BLACK);\n break;\n case 2:\n r4c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c2.setBackground(Color.BLACK);\n break;\n case 2:\n r5c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c2.setBackground(Color.BLACK);\n break;\n case 2:\n r6c2.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 3:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c3.setBackground(Color.BLACK);\n break;\n case 2:\n r1c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c3.setBackground(Color.BLACK);\n break;\n case 2:\n r2c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c3.setBackground(Color.BLACK);\n break;\n case 2:\n r3c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c3.setBackground(Color.BLACK);\n break;\n case 2:\n r4c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c3.setBackground(Color.BLACK);\n break;\n case 2:\n r5c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c3.setBackground(Color.BLACK);\n break;\n case 2:\n r6c3.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 4:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c4.setBackground(Color.BLACK);\n break;\n case 2:\n r1c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c4.setBackground(Color.BLACK);\n break;\n case 2:\n r2c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c4.setBackground(Color.BLACK);\n break;\n case 2:\n r3c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c4.setBackground(Color.BLACK);\n break;\n case 2:\n r4c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c4.setBackground(Color.BLACK);\n break;\n case 2:\n r5c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c4.setBackground(Color.BLACK);\n break;\n case 2:\n r6c4.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 5:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c5.setBackground(Color.BLACK);\n break;\n case 2:\n r1c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c5.setBackground(Color.BLACK);\n break;\n case 2:\n r2c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c5.setBackground(Color.BLACK);\n break;\n case 2:\n r3c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c5.setBackground(Color.BLACK);\n break;\n case 2:\n r4c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c5.setBackground(Color.BLACK);\n break;\n case 2:\n r5c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c5.setBackground(Color.BLACK);\n break;\n case 2:\n r6c5.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 6:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c6.setBackground(Color.BLACK);\n break;\n case 2:\n r1c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c6.setBackground(Color.BLACK);\n break;\n case 2:\n r2c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c6.setBackground(Color.BLACK);\n break;\n case 2:\n r3c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c6.setBackground(Color.BLACK);\n break;\n case 2:\n r4c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c6.setBackground(Color.BLACK);\n break;\n case 2:\n r5c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c6.setBackground(Color.BLACK);\n break;\n case 2:\n r6c6.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 7:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c7.setBackground(Color.BLACK);\n break;\n case 2:\n r1c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c7.setBackground(Color.BLACK);\n break;\n case 2:\n r2c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c7.setBackground(Color.BLACK);\n break;\n case 2:\n r3c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c7.setBackground(Color.BLACK);\n break;\n case 2:\n r4c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c7.setBackground(Color.BLACK);\n break;\n case 2:\n r5c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c7.setBackground(Color.BLACK);\n break;\n case 2:\n r6c7.setBackground(Color.RED);\n break;\n }\n }\n break;\n }\n \n if (turn%2 ==1) {\n turnButton.setBackground(Color.RED);\n jTextField1.setText(\"It's Red's turn.\");\n }\n if (turn%2 ==0) {\n turnButton.setBackground(Color.BLACK);\n jTextField1.setText(\"It's Black's turn.\");\n }\n \n }", "@Override\n\tprotected void handleMouseClick(int row, int col, int mouseButton) {\n\t\tif(activeBoard) {\n\t\t\tplayer.setMove(row, col);\n\t\t\tdecideMakeManualMove(player);\n\t\t}\n\t}", "public void setGameDraw() {\n this.gameStarted = false; \n this.winner = 0; \n this.isDraw = true; \n }", "public void setHiddenPiece() {\n for(int j = 0; j < 12; j++) {\n controller.getBoard().setPiece(new Forbidden(), 0, j);\n Cell[0][j] = new JButton();\n }\n for(int j = 0; j < 12; j++) {\n controller.getBoard().setPiece(new Forbidden(), 9, j);\n Cell[9][j] = new JButton();\n }\n for(int j = 0; j < 10; j++) {\n controller.getBoard().setPiece(new Forbidden(), j, 0);\n Cell[j][0] = new JButton();\n }\n for(int j = 0; j < 10; j++) {\n controller.getBoard().setPiece(new Forbidden(), j, 11);\n Cell[j][11] = new JButton();\n }\n }", "public void changeTurn(){\n\t\tif (this.turn ==\"blue\")\n\t\t{\n\t\t\tthis.turn = \"red\";\n\t\t\t\n\t\t}else{\n\t\t\tthis.turn =\"blue\";\n\t\t}\n\t}", "boolean setPlayerOwned(int row, int column, boolean force) {\n return getCell(row, column).setPlayerOwned(force);\n }", "public boolean setPlayerOwned(int row, int column) {\n return setPlayerOwned(row, column, false);\n }", "@Override\n public void disableEndOfProductionButton() {\n gameboardPanel.disableEndOfProductionButton();\n }", "public static void climb(boolean button) {\n\t\tif (!Actuators.getWinchRatchetPneumatic().get() && button) {\n\t\t\tActuators.getWinchRatchetPneumatic().set(true);\n\t\t\tActuators.getArmWinchMotor1().set(Actuators.MAX_MOTOR_SPEED);\n\t\t\tActuators.getArmWinchMotor2().set(-Actuators.MAX_MOTOR_SPEED);\n\t\t} else if (Actuators.getWinchRatchetPneumatic().get() && button) {\n\t\t\tActuators.getArmWinchMotor1().set(Actuators.MAX_MOTOR_SPEED);\n\t\t\tActuators.getArmWinchMotor2().set(-Actuators.MAX_MOTOR_SPEED);\n\t\t} else {\n\t\t\tActuators.getArmWinchMotor1().set(Actuators.STOP_MOTOR);\n\t\t\tActuators.getArmWinchMotor2().set(Actuators.STOP_MOTOR);\n\t\t\tActuators.getWinchRatchetPneumatic().set(false);\n\t\t}\n\t}", "int changeTile(int column, char playerChar) throws ColumnFullException {\n int line;\n if(column == 0 || column > this.columns|| !this.columnIsFree(column)) throw new ColumnFullException(\"Column full\");\n else{\n line = insertOnColumn(column,playerChar);\n }\n\n return line;\n }", "public void clearBoard(boolean eraseWins)\n {\n if(eraseWins)\n {\n computerWins = 0;\n humanWins = 0;\n ties = 0;\n }\n mBoard = new char[]{'1', '2', '3', '4', '5', '6', '7', '8', '9'};\n for(int i = 0; i < BOARD_SIZE; i++) {\n mBoardButtons[i].setText(\"\");\n mBoardButtons[i].setEnabled(true);\n\n }\n }", "public void play(int column);", "@Override\r\n\tpublic void resetBoard() {\r\n\t\tcontroller.resetGame(player);\r\n\t\tclearBoardView();\r\n\t\tif (ready)\r\n\t\t\tcontroller.playerIsNotReady();\r\n\t}", "public void updateButton(boolean done) {\n\t\tdiceBtn.setDisable(done);\n\t\tendTurn.setDisable(!done);\n\t}", "@Override\n\tpublic void changeTurn() {\n\t\tcomputerCall();\n\t\tplayerTurn = 1;\n\t}", "public void makeChanges() { \n for(int i = 1; i < 9; i++) {\n for(int j = 1; j < 11; j++) {\n if(!(controller.getBoard().getPiece(i, j) instanceof Forbidden)) {\n Cell[i][j].setBackground(Color.white);\n if(controller.getBoard().getPiece(i,j) != null) {\n if(controller.getPlayer(controller.getTurn()).getColour() != controller.getBoard().getPiece(i,j).getColour()) {\n if(controller.getTurn() == 1) {\n Cell[i][j].setIcon(new ImageIcon(\"pieces\\\\redHidden.png\"));\n Cell[i][j].setEnabled(false);\n } else {\n Cell[i][j].setIcon(new ImageIcon(\"pieces\\\\blueHidden.png\"));\n Cell[i][j].setEnabled(false);\n }\n } else {\n Cell[i][j].setIcon((controller.getBoard().getPiece(i, j).getIcon()));\n Cell[i][j].setEnabled(true);\n }\n if(controller.getBoard().getPiece(i,j) instanceof Trap || controller.getBoard().getPiece(i,j) instanceof Flag) {\n Cell[i][j].removeActionListener(handler);\n Cell[i][j].setEnabled(false);\n }\n } else {\n Cell[i][j].setBackground(Color.white);\n Cell[i][j].setEnabled(false);\n }\n }\n }\n }\n controller.setTurn(); \n }", "public void desactivatePlayer() {\n\t\tthis.setEnabled(false);\n\t}", "public void setTurn(int a_turn)\n {\n if(a_turn > m_numPlayers)\n {\n m_turn = 1;\n }\n else\n {\n m_turn = a_turn;\n }\n }", "@Override\n public void putCardMode() {\n gameboardPanel.putCardMode();\n leaderCardsPanel.disableProductionButtons();\n }", "private void playerMoveDown()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentY(this.getCurrentY() + 1);\n if (this.getCurrentY() < 11) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentY(this.getCurrentY() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentY(this.getCurrentY() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }", "public void setIsTurn()\n\t{\n\t\tthis.isTurn = true;\n\t}", "public void turn(boolean yours) {\n\t\t_endTurn.setEnabled(yours);\n\t}", "public static void nextTurn(){\n\t\tPlayerButton [][] ary = GameBoard.getPBAry();\n\t\t\n\t\tfor( int x=0; x< ary.length; x++ ){\n\t\t\tfor( int y=0; y<ary[x].length; y++ ){\n\t\t\t\tary[x][y].setMovable( false );\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurr++;\n\t\tif(curr >= players.size())\n\t\t\tcurr=0;\n\n\t\tif(players.get(curr).hasBeenKicked()){\n\t\t\tnextTurn();\n\t\t}\n\t}", "private void setBoardDisabled(boolean disabled) {\r\n\t\tfor(int i = 0; i < 9; i++) {\r\n\t\t\t//If we're enabling the buttons and the button has no text on it (Only enable the unclicked buttons)\r\n\t\t\t//OR if we're disabling the buttons\r\n\t\t\tif(!disabled && buttons[i].getText().equals(\"\") || disabled) {\r\n\t\t\t\tbuttons[i].setDisable(disabled);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void RedWin() {\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 9; col++) {\n buttons[row][col].setClickable(false);\n }\n }\n redPoints++;\n Toast redWins = Toast.makeText(this, \"Red Wins!\", Toast.LENGTH_SHORT);\n redWins.setGravity(Gravity.TOP, 0, 200);\n redWins.show();\n updatePoints();\n reset();\n }", "public void exchangeActivePlayer() {\r\n\t\tif (activePlayer.equals(\"black\")) {\r\n\t\t\tdisablePlayer(\"black\");\r\n\t\t\tenablePlayer(\"white\");\r\n\t\t\tt.setText(\"white turn\");\r\n\t\t} else {\r\n\t\t\tdisablePlayer(\"white\");\r\n\t\t\tenablePlayer(\"black\");\r\n\t\t\tt.setText(\"black turn\");\r\n\t\t}\r\n\t}", "public void checkSetPlayerTurn() // Check and if needed set the players turns so it is their turn.\n\t{\n\t\tswitch (totalPlayers) // Determine how many players there are...\n\t\t{\n\t\tcase 2: // For two players...\n\t\t\tswitch (gameState)\n\t\t\t{\n\t\t\tcase twoPlayersNowPlayerOnesTurn: // Make sure it's player one's turn.\n\t\t\t\tplayers.get(0).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase twoPlayersNowPlayerTwosTurn: // Make sure it's player two's turn.\n\t\t\t\tplayers.get(1).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "public void setTurning(java.lang.Boolean value);", "private void changeTurn() {\n if (turn == RED) {\n turn = YELLOW;\n } else {\n turn = RED;\n }\n }", "public void actionPerformed(ActionEvent event)\n {\n int row, col;\n // Check which button is clicked column by column\n for (col = 0; col < COLUMNS; col++ )\n {\n if (event.getSource() == drop[col])\n {\n // Disable all buttons to prevent the player put another chess\n disable();\n // Send the index of the clicked column to the other client\n theClient.sendInt(col);\n // Find the unoccupied row from bottom to up to put the chess on\n for (row = ROWS - 1; row >= 0; row-- )\n {\n if (chessBoard[row][col] == 0)\n {\n break;\n }\n }\n // Put the chess from the player on the board\n chessBoard[row][col] = player;\n grid[row][col].setIcon(new ImageIcon(playerURL));\n // Check whether the player wins\n // If the other player wins, show the message dialog and tell the\n // player \"You win\".\n // Then exit the system, terminate the game.\n if (win(row, col, player))\n {\n out.println(\"Win.\");\n JOptionPane.showMessageDialog(null, \"You win.\");\n System.exit(0);\n }\n // Else if the chess board is full, tie\n // Show the message dialog and tell the player \"Tie\".\n // Then exit the system, terminate the game.\n else if (full())\n {\n out.println(\"Tie.\");\n JOptionPane.showMessageDialog(null, \"Tie.\");\n System.exit(0);\n }\n // Else continue the game\n else\n {\n out.println(\"Continue.\");\n }\n break;\n }\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n int row = 0, col = 0;\n gridLocationFinder:\n for (row = 0; row < 3; row++) {\n for (col = 0; col < 3; col++) {\n if (e.getSource() == gridButtons[row][col])\n break gridLocationFinder; // break out of outer loop using labelled break\n }\n }\n if (gameModel.setCell(row, col, gameModel.currentPlayer())) // legal\n {\n JButton buttonPressed = (JButton) e.getSource();\n buttonPressed.setText(gameModel.currentPlayer().toString());\n buttonPressed.setEnabled(false); // disable pressing again\n\n // check for gameOver...display game over in statusBar or whose turn it now is\n statusBar.setText(gameModel.currentPlayer().toString());\n }\n\n }", "void playerTurn(Player actualPlayer) {\n aiPlayer.chooseAction(actualPlayer);\n actualPlayer.setTheirTurn(false);\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\tif (e.getSource() == grid[r][c]) {\n\t\t\t\t\t\n\t\t\t\t\t\tif (grid[r][c].getText() == \"\") {\n\t\t\t\t\t\t\tif (turn == 2) {\n\t\t\t\t\t\t\t\tgrid[r][c].setText(\"O\");\n\t\t\t\t\t\t\t\tcheckForWin(r, c, \"O\");\n\n\t\t\t\t\t\t\t\tturn = 1;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tgrid[r][c].setText(\"X\");\n\t\t\t\t\t\t\t\tcheckForWin(r, c, \"X\");\n\n\t\t\t\t\t\t\t\tturn = 2;\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "public void victory() {\n fieldInerface.setPleasedSmile();\n fieldInerface.timestop();\n int result = fieldInerface.timeGet();\n /*try {\n if (result < Integer.parseInt(best.getProperty(type))) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }\n } catch (NullPointerException e) {\n } catch (NumberFormatException e) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }*/\n\n gamestart = true; // new game isn't started yet!\n for (int j = 0; j < heightOfField; j++)\n for (int i = 0; i < widthOfField; i++)\n if (fieldManager.isCellMined(i, j))\n if (!fieldManager.isCellMarked(i, j)) {\n fieldInerface.putMarkToButton(i, j);\n fieldInerface.decrement();\n }\n gameover = true; // game is over!!\n }", "private JFrame playGame(){\r\n \r\n JPanel board = new JPanel();\r\n board.setLayout(new GridLayout(row,column));\r\n \r\n //cell button 2d array\r\n JButton[][] cellButtons = new JButton[row][column];\r\n for (int i = 0; i < row; ++i) {\r\n for (int j = 0; j < column ; ++j) {\r\n cellButtons[i][j] = new JButton();\r\n }\r\n }\r\n \r\n \r\n for (int i = 0; i < row; ++i) {\r\n for (int j = 0; j < column ; ++j) {\r\n int temp_i = i;\r\n int temp_j = j;\r\n \r\n cellButtons[temp_i][temp_j] = new JButton();\r\n ImageIcon imageIcon = new ImageIcon(new ImageIcon(\"src\\\\empty circle.png\").getImage().getScaledInstance(500 / row, 500 / column, 1));\r\n cellButtons[temp_i][temp_j].setIcon(imageIcon);\r\n cellButtons[temp_i][temp_j].setBackground(Color.orange);\r\n \r\n \r\n \r\n cellButtons[temp_i][temp_j].addActionListener(new ActionListener() \r\n {\r\n public void actionPerformed(ActionEvent e) //event handler\r\n {\r\n int computerEntryKey = 0;\r\n if(usable(temp_j) != 0){\r\n if(move%2 == 0){ //sıra user1 de ise seçilen columna oyna\r\n ImageIcon imageIcon = new ImageIcon(new ImageIcon(\"src\\\\blue circle.png\").getImage().getScaledInstance(500 / row, 500 / column, 1));\r\n cellButtons[usable(temp_j)-1][temp_j].setIcon(imageIcon);\r\n cellButtons[usable(temp_j)-1][temp_j].setBackground(Color.orange);\r\n\r\n gameCells[usable(temp_j)-1][temp_j].setCell('X');\r\n ++move;\r\n if (end(cellButtons)) { //oyun sonlandıysa kazandı mesajını bas ve yeniden başlat\r\n if (check(cellButtons) == 1) {\r\n JOptionPane.showMessageDialog(null, \"User 1 Winner\");\r\n }\r\n else {\r\n JOptionPane.showMessageDialog(null, \"The game ended in a draw!\");\r\n }\r\n computerEntryKey = 1;\r\n window.dispose();\r\n String[] arg = new String[10];\r\n arg[0] = \"\";\r\n main(arg);\r\n }\r\n }\r\n else if(move%2 == 1 && gameType == 1){ //oyun modu pvp ise ve sıra user2 iki de ise seçilen columna oyna\r\n ImageIcon imageIcon = new ImageIcon(new ImageIcon(\"src\\\\red circle.png\").getImage().getScaledInstance(500 / row, 500 / column, 1));\r\n cellButtons[usable(temp_j)-1][temp_j].setIcon(imageIcon);\r\n cellButtons[usable(temp_j)-1][temp_j].setBackground(Color.orange);\r\n\r\n gameCells[usable(temp_j)-1][temp_j].setCell('O');\r\n ++move;\r\n if (end(cellButtons)) { //oyun sonlandıysa kazandı mesajını bas ve yeniden başlat\r\n if (check(cellButtons) == 2) {\r\n JOptionPane.showMessageDialog(null, \"User 2 Winner\");\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"The game ended in a draw!\");\r\n }\r\n\r\n window.dispose();\r\n String[] arg = new String[10];\r\n arg[0] = \"\";\r\n main(arg);\r\n }\r\n }\r\n if(move%2 == 1 && gameType == 2 && computerEntryKey == 0){//pvc modunda computerın sırası ise oynar\r\n ImageIcon imageIcon = new ImageIcon(new ImageIcon(\"src\\\\red circle.png\").getImage().getScaledInstance(500 / row, 500 / column, 1));\r\n int tmpcol = attack3();\r\n if(tmpcol<0)\r\n tmpcol = defence3();\r\n if(tmpcol < 0)\r\n tmpcol = attack1();\r\n if(tmpcol < 0)\r\n tmpcol = findEmptyColumn();\r\n \r\n int tmprow = usable(tmpcol)- 1;\r\n \r\n cellButtons[tmprow][tmpcol].setIcon(imageIcon);\r\n cellButtons[tmprow][tmpcol].setBackground(Color.orange);\r\n\r\n gameCells[tmprow][tmpcol].setCell('O');\r\n ++move;\r\n if (end(cellButtons)) {//oyun sonlandıysa kazandı mesajını bas ve yeniden başlat\r\n if (check(cellButtons) == 2) {\r\n JOptionPane.showMessageDialog(null, \"Computer Winner\");\r\n } \r\n else {\r\n JOptionPane.showMessageDialog(null, \"The game ended in a draw!\");\r\n }\r\n\r\n window.dispose();\r\n String[] arg = new String[10];\r\n arg[0] = \"\";\r\n main(arg);\r\n }\r\n }\r\n }\r\n }\r\n });\r\n }\r\n }\r\n //cell button 2d arrayini gridlayout olan board paneline ekler\r\n for (int i = 0; i < row; ++i) {\r\n for (int j = 0; j < column ; ++j) {\r\n board.add(cellButtons[i][j]);\r\n }\r\n }\r\n \r\n window.add(board);\r\n return window;\r\n }", "public void resetOvladani() {\n this.setEnabled(true);\n gameConnectButton.setEnabled(true);\n gameConnectButton.setText(\"Pripoj ke hre\");\n\n newGameButton.setEnabled(true);\n newGameButton.setText(\"Zaloz hru\");\n\n zalozenaHra = false;\n\n }", "private void disableP2Buttons(){\n game_BTN_p2_lightAttack.setEnabled(false);\n game_BTN_p2_strongAttack.setEnabled(false);\n game_BTN_p2_brutalAttack.setEnabled(false);\n }", "public boolean changeTurns(){\n return doesTurnChange;\n }", "public void toggle(int x, int y) {\r\n\r\n //The value at index [y][x] is multiplied by -1, toggling it between -1 and 1, and stored\r\n gameBoard[y][x] *= -1; \r\n }" ]
[ "0.6851779", "0.679509", "0.6711717", "0.67001915", "0.66892314", "0.65540445", "0.64659005", "0.64382315", "0.6365581", "0.6315502", "0.6297601", "0.62920153", "0.62469906", "0.60652846", "0.6054046", "0.6020783", "0.60035366", "0.5982678", "0.59823644", "0.5966572", "0.59514236", "0.59207714", "0.59198415", "0.5918156", "0.5913561", "0.5912022", "0.59024984", "0.58847725", "0.5880888", "0.5874323", "0.58362126", "0.58338165", "0.5821079", "0.5816732", "0.58164364", "0.58143944", "0.57945234", "0.5783419", "0.5781659", "0.57791674", "0.57609564", "0.57597184", "0.5754226", "0.5749434", "0.5745654", "0.5741658", "0.57294744", "0.5726483", "0.57214147", "0.5715342", "0.5706537", "0.57059073", "0.5699322", "0.56983256", "0.569322", "0.5690107", "0.5689813", "0.568162", "0.56741345", "0.56725633", "0.5670683", "0.5668852", "0.5665299", "0.5660135", "0.5650106", "0.5649879", "0.5646389", "0.5637478", "0.56336516", "0.56266785", "0.56196207", "0.56185865", "0.5614994", "0.5609056", "0.56074774", "0.56053257", "0.5604181", "0.5596807", "0.5594302", "0.55902326", "0.55805165", "0.5576649", "0.55714667", "0.55655086", "0.5563491", "0.556243", "0.55596966", "0.5557684", "0.5556232", "0.55559593", "0.5551771", "0.5548263", "0.5545311", "0.55395925", "0.55325866", "0.5525413", "0.5516536", "0.5515216", "0.55148864", "0.5512183", "0.5509181" ]
0.0
-1
States winner and stops game once winner is found
public void winnerFound() { for (int n = 0; n < 6; n++) { for (int m = 0; m < 7; m++) { squares[n][m].setEnabled(false); } } for (int a = 0; a < 7; a++) { buttons[a].setEnabled(false); } if (winnerChip != 67) { int result = JOptionPane.showConfirmDialog(null, " Player " + (winnerChip - 48) + " won! Do you want to start a new game?", null, JOptionPane.YES_NO_OPTION); if (result == JOptionPane.YES_OPTION) { gameReset(); } else if (result == JOptionPane.NO_OPTION) { JOptionPane.showMessageDialog(null, " Click Ok to return to Main Menu"); JFrame backToMenu = new JFrame("Main Menu"); backToMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); backToMenu.getContentPane().add(new MainMenu()); backToMenu.pack(); backToMenu.setSize(750, 650); backToMenu.setVisible(true); } }if (winnerChip == 67) { int result = JOptionPane.showConfirmDialog(null, " You lost! Do you want to start a new game?", null, JOptionPane.YES_NO_OPTION); if (result == JOptionPane.YES_OPTION) { gameReset(); } else if (result == JOptionPane.NO_OPTION) { JOptionPane.showMessageDialog(null, " Click Ok to return to Main Menu"); JFrame backToMenu = new JFrame("Main Menu"); backToMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); backToMenu.getContentPane().add(new MainMenu()); backToMenu.pack(); backToMenu.setSize(750, 650); backToMenu.setVisible(true); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void winGame() {\n this.isWinner = true;\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 }", "private boolean winner() {\n\t\t\n\t\tif(( gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if(gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT] + \n\t\t\t\t gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT] +\n\t\t\t\t gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT] == CAT){\n\t\t\t//cat winner player_1 goes first\n\t\t\twinner = CAT;\n\t\t}else if(gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT] + \n\t\t\t\t gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT] +\n\t\t\t\t gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT] == (CAT + 3)){\n\t\t\t//cat winner player_2 goes first\n\t\t\twinner = CAT;\n\t\t} \n\t\t\n\t\tif(winner > 0){\n\t\t\treturn true;//there is a winner\n\t\t}else{\n\t\t\treturn false;//still no winner yet\n\t\t}\t\n\t}", "public void winner(){\n System.out.println();\n System.out.println(\"You are the winner.!!!CONGRATULATIONS!!!.\");\n System.exit(1); // Close the game\n }", "private void win(int winner)\n {\n switch (winner) {\n case PLAYER_1_FLAG:\n player1.gameOver(RESULT_WIN);\n player2.gameOver(RESULT_LOSS);\n winSend.close();\n break;\n case PLAYER_2_FLAG:\n player1.gameOver(RESULT_LOSS);\n player2.gameOver(RESULT_WIN);\n \n winSend.close();\n break;\n }\n }", "public boolean winner() {\r\n return winner;\r\n }", "public void endsGameAndSetsWinner(Player player) {\n this.winner = player.getId(); \n this.gameStarted = false; \n \n }", "private boolean winGame() {\n if (model.isCompleted()) {\n win.message(\"Winner\");\n return true;\n }\n return false;\n }", "public static void decidedWinner(){\n if(playerOneWon == true ){\n//\n// win.Fill(\"Player One Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else if (playerTwoWon == true){\n// win.Fill(\"Player Two Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else\n {\n// win.Fill(\"Match Has been Tied !\");\n// new WinnerWindow().setVisible(true);\n }\n }", "public void setWinner(boolean winner) {\n\t\tthis.winner = winner;\n\t}", "public void tellPlayerResult(int winner) {\n\t}", "private Boolean win(int counter) {\n \n winner = false;\n //if the counter is greater than 8, recognizes that it is a draw\n if (counter >= 8) {\n announce.setText(\"Draw\");\n turn.setText(\"\"); //game ends and is no ones turn\n }\n //list of all of the winning options\n if ((tBoard[0] == tBoard[1] && tBoard[1] == tBoard[2] && tBoard[0] != 2)\n || (tBoard[0] == tBoard[3] && tBoard[3] == tBoard[6] && tBoard[0] != 2)\n || (tBoard[3] == tBoard[4] && tBoard[4] == tBoard[5] && tBoard[3] != 2)\n || (tBoard[6] == tBoard[7] && tBoard[7] == tBoard[8] && tBoard[6] != 2)\n || (tBoard[1] == tBoard[4] && tBoard[4] == tBoard[7] && tBoard[1] != 2)\n || (tBoard[2] == tBoard[5] && tBoard[5] == tBoard[8] && tBoard[2] != 2)\n || (tBoard[0] == tBoard[4] && tBoard[4] == tBoard[8] && tBoard[0] != 2)\n || (tBoard[2] == tBoard[4] && tBoard[4] == tBoard[6] && tBoard[2] != 2)) {\n //if counter is even then recognizes that it is the person who has the X symbol and knows that X won \n if (counter % 2 == 0) {\n announce.setText(\"X is the Winner\"); //announces that X has won\n turn.setText(\"\"); //no ones turn anymore\n } //if it is not X, O has won the game and recognizes\n else {\n announce.setText(\"O is the Winner\"); //announces that O has won\n turn.setText(\"\"); //no ones turn anymore\n\n }\n //winner is set to true and stops allowing user to press other squares through pressed method\n winner = true;\n\n }\n //returns winner\n return winner;\n\n }", "private boolean checkGameStatus() {\n int res = model.getWinner();\n if (res == Model.DRAW) {\n draw();\n return false;\n } else if (res == Model.WHITE) {\n whiteScore++;\n view.getPrompt().setText(whiteName + \" win!\");\n prepareRestart();\n return false;\n } else if (res == Model.BLACK) {\n blackScore++;\n view.getPrompt().setText(blackName + \" win!\");\n prepareRestart();\n return false;\n }\n return true;\n }", "public void tie() {\r\n\t\tfor (int n = 0; n < 6; n++) {\r\n\t\t\tfor (int m = 0; m < 7; m++) {\r\n\t\t\t\tsquares[n][m].setEnabled(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 7; a++) {\r\n\t\t\tbuttons[a].setEnabled(false);\r\n\t\t}\r\n\t\tint result = JOptionPane.showConfirmDialog(null,\r\n\t\t\t\t\" TIE GAME! No winner Found! Do you want to start a new game?\", null, JOptionPane.YES_NO_OPTION);\r\n\r\n\t\tif (result == JOptionPane.YES_OPTION) {\r\n\t\t\tgameReset();\r\n\t\t} else if (result == JOptionPane.NO_OPTION) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \" Click Ok to return to Main Menu\");\r\n\r\n\t\t\tJFrame backToMenu = new JFrame(\"Main Menu\");\r\n\r\n\t\t\tbackToMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\tbackToMenu.getContentPane().add(new MainMenu());\r\n\t\t\tbackToMenu.pack();\r\n\t\t\tbackToMenu.setSize(750, 650);\r\n\t\t\tbackToMenu.setVisible(true);\r\n\t\t}\r\n\r\n\t}", "void checkWinner() {\n\t}", "private static void winner()\n {\n if ((board[1] == userLetter && board[2] == userLetter && board[3] == userLetter) ||\n (board[4] == userLetter && board[5] == userLetter && board[6] == userLetter) ||\n (board[7] == userLetter && board[8] == userLetter && board[9] == userLetter) ||\n (board[1] == userLetter && board[5] == userLetter && board[9] == userLetter) ||\n (board[3] == userLetter && board[5] == userLetter && board[7] == userLetter))\n {\n showBoard();\n System.out.println(\"Player win the game\");\n System.exit(0);\n }\n }", "public void checkWin(){\n boolean result = false;\n if(game.getTurn() > 3){\n Player currentPlayer = game.getPlayerTurn();\n int playernumber = currentPlayer.getPlayericon();\n result = game.winChecker(game.getBored(),playernumber);\n if(result == true) {\n setWinMsgBox(currentPlayer.getPlayerName() + \" Is victorious :)\",\"WIN\");\n }else if(game.getTurn() == 8 && result == false){\n setWinMsgBox(\"Too bad it is a draw, No one out smarted the other -_-\",\"DRAW\");\n }else{}\n }else{\n result = false;\n }\n }", "public void win()\r\n\t{\r\n\t\tmWon = true;\r\n\t}", "private void computeWinLose() {\n\n if (!id11.getText().isEmpty()) {\n if ((id11.getText().equals(id00.getText()) && id11.getText().equals(id22.getText())) ||\n (id11.getText().equals(id02.getText()) && id11.getText().equals(id20.getText())) ||\n (id11.getText().equals(id10.getText()) && id11.getText().equals(id12.getText())) ||\n (id11.getText().equals(id01.getText()) && id11.getText().equals(id21.getText()))) {\n winner = id11.getText();\n }\n }\n\n if (!id00.getText().isEmpty()) {\n if ((id00.getText().equals(id01.getText()) && id00.getText().equals(id02.getText())) ||\n id00.getText().equals(id10.getText()) && id00.getText().equals(id20.getText())) {\n winner = id00.getText();\n }\n }\n\n if (!id22.getText().isEmpty()) {\n if ((id22.getText().equals(id21.getText()) && id22.getText().equals(id20.getText())) ||\n id22.getText().equals(id12.getText()) && id22.getText().equals(id02.getText())) {\n winner = id22.getText();\n }\n }\n\n // If all the grid entries are filled, it is a draw\n if (!id00.getText().isEmpty() && !id01.getText().isEmpty() && !id02.getText().isEmpty() && !id10.getText().isEmpty() && !id11.getText().isEmpty() && !id12.getText().isEmpty() && !id20.getText().isEmpty() && !id21.getText().isEmpty() && !id22.getText().isEmpty()) {\n winner = \"Draw\";\n }\n\n if (winner != null) {\n if (\"X\".equals(winner)) {\n winner = playerX;\n } else if (\"O\".equals(winner)) {\n winner = playerO;\n } else {\n winner = \"Draw\";\n }\n showWindow(winner);\n }\n }", "public final boolean checkForWin() {\r\n boolean result = false;\r\n String player = \"\";\r\n \r\n for (Rail rail : rails) {\r\n if (rail.isWinner()) {\r\n result = true;\r\n for(Tile tile : rail.getTiles()) {\r\n tile.setBackground(Color.GREEN);\r\n player = tile.getText();\r\n }\r\n if (player.equals(\"X\")) {\r\n winningPlayer = \"X\";\r\n this.xWins++;\r\n } else if (player.equals(\"0\")) {\r\n winningPlayer = \"0\";\r\n this.oWins++;\r\n }\r\n break;\r\n }\r\n }\r\n \r\n return result;\r\n }", "public void setWinner(Player winner) {\n this.winner = winner;\n }", "public boolean winner(){ \r\n\t\tif (rowWin() || colWin() || diagWin()){ \r\n\t\t\tchangeTurn(); \r\n\t\t\tSystem.out.println(\"Winner: \" + playerToString(currentTurn) + \"!\"); \r\n\t\t\treturn true; \r\n\t\t}\r\n\t\telse if (tie()){\r\n\t\t\tSystem.out.println(\"There is a tie.\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse{ \r\n\t\t\tSystem.out.println(\"No winner yet.\\n\"); \r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "public void wonGame(){\n\t\tSystem.out.println(\"Bravo, du hast gewonnen! Möchtest du noch einmal spielen?\");\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 1;\n\t\tpaintMenu();\n\t}", "void update(boolean winner);", "public int winner(){\n getValidMoves();\n if(check(1)!=0) return 1;\n else if(check(-1)!=0) return -1;\n else if(validX.size()==0) return 2;\n else return 0;\n }", "public String winner(){\n\t\tString winner =\"\";\n\t\tif(board.isWin() == \"blue\")\n\t\t\t{\n\t\t\twinner= \"blue\";\n\t\t\t}\n\t\telse if(board.isWin()==\"red\")\n\t\t\t{\n\t\t\twinner= \"red\";\n\t\t\t}\n\t\treturn winner; \n\t}", "public void announceWinner(){\n gameState = GameState.HASWINNER;\n notifyObservers();\n }", "public void setWinner(String winner) {\n this.winner = winner;\n }", "@Override\n public void run() {\n Player winner = game.getWinner();\n String result = winner.getName() + \" won the game!\";\n\n // pass the string referred by \"result\" to make an alert window\n // check the bottom of page 9 of the PA description for the appearance of this alert window\n Alert alert = new Alert(AlertType.CONFIRMATION, result, ButtonType.YES, ButtonType.NO);\n alert.showAndWait();\n if (alert.getResult() == ButtonType.YES)\n {\n Platform.exit();\n }\n }", "void matchEnd(boolean winner);", "public void endGame(int winner){\n this.gameOver = true;\n JLabel statusScreen;\n \n if(winner == 1){\n this.remove(gameGrid);\n statusScreen = new JLabel(new ImageIcon(getClass().getResource(\"/win.jpg\")));\n this.add(statusScreen, BorderLayout.CENTER);\n statusBar.setText(\"You Win !!!\");\n }\n \n else if (winner == 2){\n this.remove(gameGrid);\n statusScreen = new JLabel(new ImageIcon(getClass().getResource(\"/loose.gif\")));\n this.add(statusScreen, BorderLayout.CENTER);\n statusBar.setText(\"You Loose ...\");\n }\n \n else if (winner == 3){\n statusBar.setText(\"Tie\");\n }\n \n else{ \n statusBar.setText(\"Your partner has forfeit!\");\n gameGrid.setEnabled(false);\n }\n }", "private void playGame() {\n do {\n new Round(this);\n } while (!winner.isPresent());\n }", "@Override\n public void setWinner(Player winner)\n {\n for(int i = 0; i < gc.getF().size(); i++)\n {\n if(gc.getF().get(i).readyStart() == 0 || gc.getF().get(i).readyStart() == 1)\n {\n gc.getF().get(gc.getF().size() -1).addPlayer(this.winner);\n sl.save(\"The winner of QuarterFinal ID: \" + this.getGameID() + \" is: \"\n + winner.getName(), \"qfwinners.txt\");\n gc.getGameHistory().add(this); \n System.out.println(winner.getName() + \" has won the round! Player added to the Final!\");\n return;\n }\n }\n //If there are no available spots, make a new game\n Final f = new Final();\n System.out.println(\"created a new Final!\");\n f.addPlayer(winner);\n //Save winner details\n sl.save(\"The winner of QuarterFinal ID: \" + this.getGameID() + \" is: \"\n + winner.getName(), \"qfwinners.txt\");\n \n gc.getF().add(f);\n //Move game to history \n gc.getGameHistory().add(this); \n System.out.println(winner.getName() + \" has won the round! Player added to the Final!\");\n \n }", "private int gameState() {\n\t\t\n\t\tint gameNotOver = 0;\n\t\tint gameOverWinnerX = 1;\n\t\tint gameOverWinnerO = 2;\n\t\tint gameOverTie = 3;\n\t\t\n\t\t\n\t\t\n\t\t//Win Vertically \n\t\t// 0 3 6 , 1 4 7 , 2 5 8\n\t\t\t\t\n\t\t//Win Horizontally\n\t\t//0 1 2 , 3 4 5 , 6 7 8 \n\t\t\t\t\n\t\t//Win Diagonally\n\t\t// 0 4 8 , 2 4 6\n\t\t\t\t\n\t\t//Assuming it's an equal grid\n\t\t\t\t\n\t\tMark winningMark = null;\n\t\t\t\t\n\t\tboolean hasFoundWinner = false;\n\t\t\t\t\n\t\tint row = 0;\n\t\tint column = 0;\n\t\t\t\t\n\t\t//Horizontal Winner Test\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[ROW_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\twhile (column < COLUMN_COUNT) {\n\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\tcolumn ++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcolumn = 0;\n\t\t\trow++;\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t// Vertical Winner Test\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = 0;\n\n\t\twhile (!hasFoundWinner && column < COLUMN_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[ROW_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\trow = 0;\n\t\t\tcolumn++;\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//Diagonal Winner Test \"\\\"\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = 0;\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[COLUMN_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\t\t\t\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tcolumn++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//Diagonal Test \"/\"\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = COLUMN_COUNT - 1;\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[COLUMN_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\t\t\t\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tcolumn--;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If there are no moves left, and there is no winner, game ends inn a tie \n\t\t\n\t\tboolean foundNoMove = false;\n\t\tfor (int i = 0; i < movesArray.length; i++) {\n\t\t\tif (movesArray[i] == NO_MOVE) {\n\t\t\t\tfoundNoMove = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!foundNoMove && !hasFoundWinner) {\n\t\t\treturn gameOverTie;\n\t\t}\n\t\t\n\t\t// If there is no winner and there are still moves left, game is not over\n\t\t\n\t\treturn gameNotOver;\n\t\t\n\t}", "public void gameWon()\n {\n ScoreBoard endGame = new ScoreBoard(\"You Win!\", scoreCounter.getValue());\n addObject(endGame, getWidth()/2, getHeight()/2);\n }", "public void determineWinner() {\n\t\twinner = \"\";\n\t\tif (board[6] > board[13])\n\t\t\twinner = player1.getName();\n\t\telse if (board[6] < board[13])\n\t\t\twinner = player2.getName();\n\t\telse {\n\t\t\tSystem.out.println(\"The game is a tie\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(winner + \" is the winner\");\n\t}", "public static void checkWinCondition() {\n\t\twin = false;\n\t\tif (curPlayer == 1 && arrContains(2, 4))\n\t\t\twin = true;\n\t\telse if (curPlayer == 2 && arrContains(1, 3))\n\t\t\twin = true;\n\t\tif (curPlayer == 2 && !gameLogic.Logic.arrContains(2, 4))\n\t\t\tP2P.gameLost = true;\n\t\telse if (gameLogic.Logic.curPlayer == 1 && !gameLogic.Logic.arrContains(1, 3))\n\t\t\tP2P.gameLost = true;\n\t\tif (P2P.gameLost == true) {\n\t\t\tif (gameLogic.Logic.curPlayer == 1)\n\t\t\t\tEndScreen.infoWindow.setText(\"<html><center><b><font size=25 color=black> Black player won! </font></b></center></html>\");\n\t\t\telse\n\t\t\t\tEndScreen.infoWindow.setText(\"<html><center><b><font size=25 color=black> Red player won! </font></b></center></html>\");\n\t\t}\n\t\telse\n\t\t\twin = false;\n\t}", "boolean isWinner(GameState state, String username) throws GameStateException;", "public int winner() {\n if (player1Wins())\n return 1;\n if (player2Wins())\n return 2;\n return -1; // No one has won\n }", "public boolean winner(){\n\t\treturn goals1 > goals2;\n\t}", "public void win() {\n if (turn == 1) {\n p1.incrementLegs();\n if (p1.getLegs() == 5) {\n p1.incrementSets();\n p1.setLegs(0);\n p2.setSets(0);\n\n }\n if (p1LastScore > p1.getHighout()) {\n p1.setHighout(p1LastScore);\n\n }\n\n if (p1.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p1.getHighout();\n }\n } else if (turn == 2) {\n p2.incrementLegs();\n if (p2.getLegs() == 5) {\n p2.incrementSets();\n p2.setLegs(0);\n p1.setSets(0);\n\n }\n if (p2LastScore > p2.getHighout()) {\n p2.setHighout(p2LastScore);\n }\n\n if (p2.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p2.getHighout();\n }\n\n\n\n }\n changeFirstTurn();\n win = true;\n\n\n\n }", "public boolean gameOver() {\n return winner() != null;\n }", "@Override\n public boolean isWin() {\n for (Observer winner : winners) {\n if (winner.getName().equals(chosenHorse.getName())) {\n return true;\n }\n }\n return false;\n }", "public void checkWinner(){\n \n if ((board[0][0] == 'X' && board[0][1] == 'X' && board[0][2] == 'X')||(board[1][0] == 'X' && board[1][1] == 'X' && board[1][2] == 'X')||(board[2][0] == 'X' && board[2][1] == 'X' && board[2][2] == 'X')){\n winner();\n }\n else if ((board[0][0] == 'X' && board[1][0] == 'X' && board[2][0] == 'X')||(board[0][1] == 'X' && board[1][1] == 'X' && board[2][1] == 'X')||(board[0][2] == 'X' && board[1][2] == 'X' && board[2][2] == 'X')){\n winner();\n }\n else if ((board[0][0] == 'X' && board[1][1] == 'X' && board[2][2] == 'X')||(board[0][2] == 'X' && board[1][1] == 'X' && board[2][0] == 'X')){\n winner();\n }\n else if ((board[0][0] == 'O' && board[0][1] == 'O' && board[0][2] == 'O')||(board[1][0] == 'O' && board[1][1] == 'O' && board[1][2] == 'O')||(board[2][0] == 'O' && board[2][1] == 'O' && board[2][2] == 'O')){\n winner();\n }\n else if ((board[0][0] == 'O' && board[1][0] == 'O' && board[2][0] == 'O')||(board[0][1] == 'O' && board[1][1] == 'O' && board[2][1] == 'O')||(board[0][2] == 'O' && board[1][2] == 'O' && board[2][2] == 'O')){\n winner();\n }\n else if ((board[0][0] == 'O' && board[1][1] == 'O' && board[2][2] == 'O')||(board[0][2] == 'O' && board[1][1] == 'O' && board[2][0] == 'O')){\n winner();\n }\n \n }", "public void playRound() {\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tif (theModel.setActivePlayer(winningPlayer) == true) {\r\n\t\t\t\t// theModel.selectCategory();\r\n\t\t\t\t// so at this point we have returned strings?\r\n\t\t\t\ttheModel.displayTopCard();\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.selectCategory()));\r\n\t\t\t\t\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\t\t\t\t\r\n\t\t\t\tRoundID++;\r\n\t\t\t\t\r\n\t\t\t\tSystem.err.println(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\t\r\n\t\t\t\tlog.writeFile(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\t\r\n\t\t\t\tsql.setRoundDataToSQL(GameID, RoundID, winningPlayer.getName(), theModel.getIsDraw(), theModel.humanIsActivePlayer);\r\n\t\t\t\r\n\t\t\t\t//System.out.println(\"this should be the human having won round\");\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcheckIfHumanPlayerInGame();\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.autoCategory()));\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\t\t\t\t\r\n\t\t\t\tRoundID++;\r\n\t\t\t\t\r\n\t\t\t\tSystem.err.println(\"\\nThe current Round: \" + RoundID);\r\n\t\t\t\tlog.writeFile(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\tsql.setRoundDataToSQL(GameID, RoundID, winningPlayer.getName(), theModel.getIsDraw(), theModel.humanIsActivePlayer);\r\n\r\n\t\t\t\t//System.out.println(\"this should be the ai \" + winningPlayer.getName() + \"who has won the last round\");\r\n\t\t\t\t// return true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public boolean topPlayerWon() {\n return winner == 2;\n }", "public void win() {\n JOptionPane.showConfirmDialog(null, \"You won! You got out with \" + this.player.getGold() + \" gold!\", \"VICTORY!\", JOptionPane.OK_OPTION);\n this.saveScore();\n this.updateScores();\n this.showTitleScreen();\n }", "void playMatch() {\n while (!gameInformation.checkIfSomeoneWonGame() && gameInformation.roundsPlayed() < 3) {\n gameInformation.setMovesToZeroAfterSmallMatch();\n playSmallMatch();\n }\n String winner = gameInformation.getWinner();\n if(winner.equals(\"DRAW!\")){\n System.out.println(messageProvider.provideMessage(\"draw\"));\n }else {\n System.out.println(messageProvider.provideMessage(\"winner\")+\" \"+winner+\"!\");\n }\n }", "public boolean isWinner() {\n\t\treturn winner;\n\t}", "public void setWinner(int num){\r\n \twinner = num;\r\n }", "private void checkWin() {\n // Check if a dialog is already displayed\n if (!this.gameOverDisplayed) {\n // Check left paddle\n if (Objects.equals(this.scoreL.currentScore, this.winCount) && (this.scoreL.currentScore != 0)) {\n if (twoUser) {\n gameOver(GeneralFunctions.TWO_1_WIN);\n } else {\n gameOver(GeneralFunctions.ONE_LOSE);\n }\n // Right paddle\n } else if (Objects.equals(this.scoreR.currentScore, this.winCount) && (this.scoreR.currentScore != 0)) {\n if (twoUser) {\n gameOver(GeneralFunctions.TWO_2_WIN);\n } else {\n gameOver(GeneralFunctions.ONE_WIN);\n }\n }\n }\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}", "public void announceWinner() {\r\n Piece winer;\r\n if (_board.piecesContiguous(_board.turn().opposite())) {\r\n winer = _board.turn().opposite();\r\n } else {\r\n winer = _board.turn();\r\n }\r\n if (winer == WP) {\r\n _command.announce(\"White wins.\", \"Game Over\");\r\n System.out.println(\"White wins.\");\r\n } else {\r\n _command.announce(\"Black wins.\", \"Game Over\");\r\n System.out.println(\"Black wins.\");\r\n }\r\n }", "public PlayerNumber winner() {\n\t\tif (someoneQuit) {\n\t\t\treturn onePlayerLeft;\n\t\t}\n\t\tif (winningPlayer == Game.FIRST_PLAYER) {\n\t\t\treturn Game.FIRST_PLAYER;\n\t\t}\n\t\tif (winningPlayer == Game.SECOND_PLAYER) {\n\t\t\treturn Game.SECOND_PLAYER;\n\t\t}\n\t\tif (movesLeft() > 0) {\n\t\t\treturn Game.GAME_NOT_OVER;\n\t\t}\n\t\treturn Game.DRAW;\n\t}", "public GameState won() {\n if ( (board[0][0] != TileState.BLANK) && (board[0][0] == board[0][1]) && (board[0][0] == board[0][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[1][0] != TileState.BLANK) && (board[1][0] == board[1][1]) && (board[1][0] == board[1][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[2][0] != TileState.BLANK) && (board[2][0] == board[2][1]) && (board[2][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][1]) && (board[0][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ( (board[0][2] != TileState.BLANK) && (board[0][2] == board[1][1]) && (board[0][2] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][0]) && (board[0][0] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][1] != TileState.BLANK) && (board[0][1] == board[1][1]) && (board[0][1] == board[2][1])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][2] != TileState.BLANK) && (board[0][2] == board[1][2]) && (board[0][2] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if (movesPlayed == 9)\n return GameState.DRAW;\n return GameState.IN_PROGRESS;\n }", "private void winCondition(){\n if(cleared==(int)grid.clearedToWin){\n winGame();\n }\n }", "public void game(){\r\n char activePlayer='X';\r\n printBoard();\r\n System.out.println();\r\n while(checkWinner()=='N'){\r\n Scanner scan=new Scanner(System.in);\r\n System.out.println(activePlayer+\": What X Coordinate would you like to go at?\");\r\n int x=scan.nextInt();\r\n System.out.println(activePlayer+\": What Y Coordinate would you like to go at?\");\r\n int y=scan.nextInt();\r\n System.out.println();\r\n if(makeMove(x, y, activePlayer)){\r\n if(activePlayer=='X'){\r\n activePlayer='O';\r\n }\r\n else{\r\n activePlayer='X';\r\n }\r\n }\r\n else{\r\n System.out.println(\"Sorry \"+activePlayer+\" your move was invalid. Try again!\");\r\n }\r\n printBoard();\r\n System.out.println();\r\n }\r\n if(checkWinner()=='T'){\r\n System.out.println(\"It's a Tie!\");\r\n }\r\n else{\r\n System.out.println(checkWinner()+\" Wins!\");\r\n }\r\n \r\n }", "void setWinningTeam(TeamId winner) {\n winningTeam.set(winner);\n }", "private void finaliseGame() {\r\n gameOn = false;\r\n if(bestAnswer==null) {\r\n target.reply(\"Nobody got an answer. The best answer was: \" + CountdownSolver.Solve( sourceNumbers, targetNumber ));\r\n return;\r\n }\r\n if( bestAnswer.getAnswer() == bestPossibleAnswer ) {\r\n String reply = Constants.BOLD + bestAnswer.getUsername() + Constants.BOLD\r\n + \" has won with \" + bestAnswer.getAnswer() + \"!\";\r\n if( bestPossibleAnswer!=targetNumber)\r\n reply+=\" This was the best possible answer.\";\r\n target.reply(reply);\r\n } else {\r\n target.reply( \"The best answer was \" + bestAnswer.getAnswer() + \" by \" + bestAnswer.getUsername() + \".\"\r\n + \" But the best possible answer was: \" + CountdownSolver.Solve( sourceNumbers, targetNumber ));\r\n }\r\n bestAnswer=null;\r\n runner.stop();\r\n }", "private void win() {\r\n Player winner = board.win();\r\n if (winner == null)\r\n return;\r\n\r\n int winner_number;\r\n Label winner_info;\r\n Label loser_info;\r\n if (winner.getId() == 'U') {\r\n winner_info = player1info;\r\n loser_info = player2info;\r\n winner_number = 1;\r\n }\r\n else {\r\n winner_info = player2info;\r\n loser_info = player1info;\r\n winner_number = 2;\r\n }\r\n\r\n winner_info.setFont(new Font(\"Segoe UI Semibold\", 20));\r\n winner_info.setText(\"You Won!!\");\r\n loser_info.setFont(new Font(\"Segoe UI Semibold\", 20));\r\n loser_info.setText(\"You Lost :)\");\r\n\r\n for (int i = 0; i < 17; ++i)\r\n for (int j = 0; j < 17; j++) {\r\n String id = \"#cell\" + ((i < 10) ? \"0\" + i : i) + ((j < 10) ? \"0\" + j : j);\r\n AnchorPane cell = (AnchorPane) (play.getScene().lookup(id));\r\n // remove functionality\r\n cell.setOnMouseClicked(null);\r\n cell.setOnMouseEntered(null);\r\n cell.setOnMouseExited(null);\r\n if (!cup_is_on) {\r\n if (i == 6) {\r\n if (j == 6) {\r\n cell.setStyle(\"-fx-background-color: mediumaquamarine\");\r\n Label label = new Label(\"try\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n else if (j == 8) {\r\n cell.setStyle(\"-fx-background-color: mediumaquamarine\");\r\n Label label = new Label(\"again?\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n }\r\n else if(i == 8) {\r\n if (j == 6) {\r\n cell.setStyle(\"-fx-background-color: limegreen\");\r\n Label label = new Label(\"YES\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n label.setOnMouseClicked(event -> {\r\n try {\r\n gotoNewGame(new Player(board.getPlayer1().getName(), 'U', 10),\r\n new Player(board.getPlayer2().getName(), 'D', 10));\r\n } catch (IOException ioException) { ioException.printStackTrace(); }\r\n });\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n else if (j == 8) {\r\n cell.setStyle(\"-fx-background-color: red\");\r\n Label label = new Label(\"NO\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n label.setOnMouseClicked(event -> {\r\n try { gotoGameModes(); } catch (IOException ioException) {\r\n ioException.printStackTrace();\r\n }\r\n });\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (cup_is_on)\r\n cupOptimizer(winner_number);\r\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 winner(String winningColour){\n\t\t\tthis.disableAll();\n\t\t\tJOptionPane.showMessageDialog(null, \"The winner is \"+winningColour); \n\t\t}", "boolean isWinner() {\n boolean win = true;\n // first method to win\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if ((state[i][j] == 'X' && stateGame[i][j] != '*') || (state[i][j] != 'X' && stateGame[i][j] == '*'))\n win = false;\n }\n }\n if (win)\n return true;\n\n win = true;\n // second method to win\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (state[i][j] == '.' && stateGame[i][j] == '.')\n win = false;\n }\n }\n return win;\n }", "public void playRound(){\n this.gameState = GameController.createGameState(this.game);\n \n // Verifica se o \n if(this.gameState.isEnded()){\n var winner = this.gameState.getPlayerQttCards() == 0 ? this.game.getComputer() : this.game.getPlayer();\n\n this.gameState.setWinner(winner);\n }\n else{\n \n // Mostrando o vira, as manilhas, a quantidade de cartas dos jogadores e as cartas do jogador\n this.view.displayGame(this.gameState);\n\n var playerCardChose = this.getPlayerCardChose();\n var computerCardChose = Utils.generateRandomNumber(getGameState().getComputerQttCards());\n\n try{\n var playerCard = this.game.getPlayer().playCard(playerCardChose);\n var computerCard = this.game.getComputer().playCard(computerCardChose);\n\n var winnerCard = this.verifyBiggerCard(playerCard, computerCard);\n\n // Verificando qual `Player` ganhou e se um ganhou\n\n var hasPlayerWon = winnerCard.equals(playerCard);\n var hasComputerWon = winnerCard.equals(computerCard);\n\n var turnedCard = this.getGameState().getTurnedCard();\n\n // Aqui caso o player tenha ganhado ele recebe a carta do computador e senão ele perde a carta para o computador\n if(hasPlayerWon){\n this.game.getPlayer().earnCard(computerCard);\n this.game.getComputer().loseCard(computerCard);\n }\n else if(hasComputerWon){\n this.game.getComputer().earnCard(playerCard);\n this.game.getPlayer().loseCard(playerCard);\n }\n \n // Na hora de mostrar o vencedor eu verifico se um player venceu, se sim eu mostro vitória ou derrota para o Player\n // Se não eu mostro empate\n \n if(hasComputerWon || hasPlayerWon){\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard, hasPlayerWon);\n }\n else {\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard);\n }\n\n }\n catch(Exception excp){\n this.view.displayMessageError(excp.getMessage());\n\n this.playRound();\n }\n }\n \n }", "@Override\n\tpublic void gameEnded(Player winner) {\n\t\tcurrentPlayerLabel.setText(\"Winner is:\" + winner.name());\n\t}", "public void playRoundOne() {\r\n\t\t\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tif (theModel.chooseFirstActivePlayer() == true) {\r\n\t\t\t\t// theModel.selectCategory();\r\n\t\t\t\t// so at this point we have returned strings?\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.selectCategory()));\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\r\n\t\t\t\tSystem.out.println(\"this should be the human\");\r\n\r\n\t\t\t\tplayRound();\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.autoCategory()));\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\r\n\t\t\t\t// theModel.displayTopCard();\r\n\t\t\t\tSystem.out.println(\"this should be the ai\");\r\n\t\t\t\tplayRound();\r\n\t\t\t\t// return true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (theModel.isGameOver()) {\r\n\t\t\tsql.setGameDataToSQL(GameID, RoundID, winningPlayer.getName(), DrawNum, theModel.humanIsActivePlayer);\r\n\t\t}\r\n\t}", "private void checkForGameOver() {\n\t\t// if 11 rounds are over, calculate winner\n\t\tif (round == 12) {\n\t\t\tif (player1.getPoints() > player2.getPoints()) {\n\t\t\t\ttextAreaInstructions.setText(\"Game Over!! Player 1 wins!!\");\n\t\t\t} else {\n\t\t\t\ttextAreaInstructions.setText(\"Game Over!! Player 2 Wins!!\");\n\t\t\t}\n\t\t\tround = 1;\n\t\t\ttextFieldRound.setText(\"1\");\n\t\t\ttextFieldPlayerOneScore.setText(\"0\");\n\t\t\ttextFieldPlayerTwoScore.setText(\"0\");\n\t\t\tplayer1.setPoints(0);\n\t\t\tplayer2.setPoints(0);\n\t\t}\n\t}", "public void gameOver(boolean won){\r\n\t\tif(won){\r\n\t\t\tgameState = \"Won\";\r\n\t\t}else{\r\n\t\t\tgameState = \"Lost\";\r\n\t\t}\r\n\t\tb1.setVisible(true);\r\n\t\tb2.setText(\"Play Again\");\r\n\t\tb2.setVisible(true);\r\n\t}", "void win() {\n if (_game.isWon()) {\n showMessage(\"Congratulations you win!!\", \"WIN\", \"plain\");\n }\n }", "public int getWinner() {return winner();}", "public void handleEndAuctionRound(String winner);", "public void checkWin() \n {\n if (lWin ==8)\n {\n Greenfoot.playSound(\"finalWin.wav\");\n setLocation(getWorld().getWidth() / 2, getWorld().getHeight() / 2);\n setImage(win);\n Greenfoot.stop();\n \n \n }\n \n if (rWin ==8)\n {\n \n \n Greenfoot.playSound(\"finalWin.wav\");\n setLocation(getWorld().getWidth() / 2, getWorld().getHeight() / 2);\n setImage(win);\n \n Greenfoot.stop();\n \n \n \n \n \n }\n \n }", "private void announceWinner() {\n // FIXME\n if (_board.turn() == Piece.WP) {\n System.out.println(\"Black wins.\");\n } else {\n System.out.println(\"White wins.\");\n }\n }", "private void HandleOnGameOver(Board board, State state, Piece winner){\n\t\tif(state == State.Stopped) {\n\t\t\tthis.setVisible(false);\n\t\t\tthis.dispose();\n\t\t}\n\t}", "public static void win()\n\t{\n\t\tGame.setMoney(Game.getMoney()+bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tif(Game.getMoney()>Game.getHighScore())\n\t\t{\n\t\t\tGame.setHighScore(Game.getMoney());\n\t\t\tlblHighScore.setText(String.valueOf(Game.getHighScore()));\n\t\t}\n\t\tlblUpdate.setText(\"You win!\");\n\n\t}", "public static void declareWinner() {\n\t\t// Make an if statement that runs if the next variable.\n\t\tif(next == 0) {\n\t\t\t// Have the system tell the user that they lost.\n\t\t\tSystem.out.println(\"You lose!\");\n\t\t}\n\t\telse {\n\t\t\t// Have the system tell the user that they won.\n\t\t\tSystem.out.println(\"You win!\");\n\t\t}\n\t}", "protected boolean checkForWin() {\r\n \t\r\n if (squaresRevealed == this.width * this.height - this.mines) {\r\n finishFlags();\r\n finish(GameStateModel.WON);\r\n return true;\r\n } \t\r\n \t\r\n return false;\r\n \t\r\n }", "public void gameOver(int type) {\n \tthis.winner = state;\n \tif( type == -1 )\n \t\tthis.winner = 0;\n \tthis.state = 0;\n }", "public void winner(String tmp){\n if(tmp == \"crosswins\"){\n TextView c = (TextView) findViewById(R.id.CrossWonView);\n c.setVisibility(View.VISIBLE);\n } else if (tmp == \"circlewins\"){\n TextView c = (TextView) findViewById(R.id.CircleWonView);\n c.setVisibility(View.VISIBLE);\n }\n //Disable buttons\n ImageButton b = (ImageButton) findViewById(R.id.imageButton1);\n b.setClickable(false);\n b.setEnabled(false);\n b = (ImageButton) findViewById(R.id.imageButton2);\n b.setClickable(false);\n b.setEnabled(false);\n b = (ImageButton) findViewById(R.id.imageButton3);\n b.setClickable(false);\n b.setEnabled(false);\n b = (ImageButton) findViewById(R.id.imageButton4);\n b.setClickable(false);\n b.setEnabled(false);\n b = (ImageButton) findViewById(R.id.imageButton5);\n b.setClickable(false);\n b.setEnabled(false);\n b = (ImageButton) findViewById(R.id.imageButton6);\n b.setClickable(false);\n b.setEnabled(false);\n b = (ImageButton) findViewById(R.id.imageButton7);\n b.setClickable(false);\n b.setEnabled(false);\n b = (ImageButton) findViewById(R.id.imageButton8);\n b.setClickable(false);\n b.setEnabled(false);\n b = (ImageButton) findViewById(R.id.imageButton9);\n b.setClickable(false);\n b.setEnabled(false);\n //turns on button to reset game\n counter = 0;\n gamereset();\n }", "public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }", "boolean winGame();", "public int winner() {\n if(humanPlayerHits == 17) {\n return 1;\n }\n if(computerPlayerHits == 17){\n return 2;\n }\n return 0;\n }", "public void actionPerformed( ActionEvent event ) {\n \tif(myTurn[0]==false)\n \t{\n \t\treturn;\n \t}\n \t\n \tif(gameStatus==true)\n \t{\n \t\treturn;\n \t}\n \tint buttonId = whichButtonClicked( event ); \n \t boolean marked =markButton( buttonId, myMark );\n \t if(marked==false)\n \t {\n \t\t System.out.println(\"Already you have selected this place\");\n \t }\n \t else\n \t {\n \t\t try \n \t\t {\n \t \t output.writeObject( buttonId + \"/\" + \"\\t\" + \n \t \t\t\t\tInetAddress.getLocalHost( ).getHostName());\n \t \t //Enter the player's turn to movesPlayed Array, used to find winner\n \t \t movesPlayed[buttonId]=myMark;\n \t \t boolean result = getWinner(myMark,buttonId);\n \t \t if(result==true)\n \t \t {\n \t\t\t\t\t//show won\n \t\t\t\t\tshowWon(myMark);\n \t\t\t\t\tsetMyGameStatus(true);\n \t\t\t\t\t//closeAllSocket();\n \t\t\t\t\t//input.close();\n \t\t\t\t\t//output.close();\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t \t \n \t \t /*boolean IsDraw = checkDraw();\n \t \t if(IsDraw == true )\n \t \t {\n \t \t \tJOptionPane.showMessageDialog( null , \"Its a Draw!\" );\t\n \t \t \tcloseAllSocket();\n \t \t }\n \t \t */\n \t \t \n \t \t setMyTurn(false);\n \t \t \t\n \t \t}\n \t \tcatch(Exception e)\n \t \t{\n \t \t\terror(e);\n \t \t}\t\n \t }\n \t\n\t }", "public void win(){\n // If this object is not the current arena state obsolete it.\n if(this != battleState) return;\n if(win) return;\n\n isOver = true;\n setSlowMo(false);\n win = true;\n setSelectedPc(null);\n\n Spell.clear();\n for(Button x : spellButtons){\n x.setActive(false);\n }\n TouchHandler.clear();\n SpellTouchInput.clear();\n battleStateWin();\n }", "public int run() {\r\n // Player 1 plays first, and is X.\r\n while (true) {\r\n if (this.board.gameOver()) {\r\n break;\r\n }\r\n Move m1 = p1.makeMove(this.board.clone());\r\n this.board.makeMove(m1, this.p1.getSide());\r\n \r\n if (this.board.gameOver()) {\r\n break;\r\n }\r\n Move m2 = p2.makeMove(this.board.clone());\r\n this.board.makeMove(m2, this.p2.getSide()); \r\n }\r\n // Done with game.\r\n return this.board.winner();\r\n }", "private void checkForGameEnd() {\n\t\tint checkWin = controller.checkForWinner();\n\t\tif(playerType == null && checkWin == 1 || (playerType != null && playerType == checkWin)) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"VICTORY\");\n\t\t\talert.setHeaderText(\"VICTORY\");\n\t\t\talert.setContentText(\"CONGRATULATIONS! YOU WIN!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t\t\n\t\t}else if (playerType == null && checkWin == 2 || (playerType != null && playerType%2 + 1 == checkWin)) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"DEFEAT\");\n\t\t\talert.setHeaderText(\"DEFEAT\");\n\t\t\talert.setContentText(\"SHAME! YOU LOSE!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t\t\n\t\t}else if (controller.checkForTie()) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"STALEMATE\");\n\t\t\talert.setHeaderText(\"STALEMATE\");\n\t\t\talert.setContentText(\"ALAS! TIE GAME!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t}\n\t\t\n\t\tif(playerType != null && gameFinished) {\n\t\t\tSystem.out.println(\"closing connection\");\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t}catch (Exception e) {\n\t\t\t\tSystem.out.println(\"ERROR CLOSING\");\n\t\t\t}\n\t\t}\n\t}", "void win() {\n\t\t_money += _bet * 2;\n\t\t_wins++;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}", "private void gameWon() {\n\n stopTime();\n //reveal all mines and mark them\n for (int i = 0; i < minefield.getRows(); i++) {\n for (int j = 0; j < minefield.getCols(); j++) {\n if (minefield.getMinefield()[i][j].isMined()) {\n tileLabel[i][j].setIcon(flagIcon);\n tile[i][j].setBackground(Color.green);\n }\n }\n }\n\n JFrame winframe = new JFrame(\"Winner!\");\n JPanel winpanel = new JPanel();\n JLabel label = new JLabel(\"Well done, you beat the game!\");\n JLabel label2 = new JLabel(\" Time taken: \" + time + \" \");\n JButton close = new JButton(\"Close\");\n JButton restart = new JButton(\"Restart\");\n\n close.addActionListener((ActionEvent e) -> {\n winframe.dispose();\n });\n\n restart.addActionListener((ActionEvent e) -> {\n frame.dispose();\n winframe.dispose();\n createNewGame(minefield.getRows(), minefield.getCols(), minefield.getMaxMines());\n });\n\n winpanel.add(label);\n winpanel.add(label2);\n winpanel.add(close);\n winpanel.add(restart);\n winframe.add(winpanel);\n winframe.setLocationRelativeTo(null);\n winframe.setSize(220, 110);\n winframe.setResizable(false);\n winframe.setVisible(true);\n }", "private boolean gameOver()\n {\n \t//lose case\n \tif (guess_number == 0)\n \t{\n \t\twin = false;\n \t\treturn true;\n \t}\n \t//win case\n \tif (mask.compareTo(word) == 0)\n \t{\n \t\twin = true;\n \t\treturn true;\n \t}\n \t\n \treturn false;\n }", "private void playTurn()\n {\n try\n {\n XMLHandler.saveGame(game, GAME_CLONE_PATH);\n }\n catch(IOException | JAXBException | SAXException ex)\n {\n // TODO... ConsoleUtils.message(\"An internal save error has occured, terminating current game\");\n gameEnded = true;\n return;\n }\n \n moveCycle();\n \n if (!game.validateGame()) \n {\n IllegalBoardPenalty();\n }\n \n String gameOverMessage = game.isGameOver();\n if (gameOverMessage != null) \n {\n //TODO: ConsoleUtils.message(gameOverMessage);\n gameEnded = true;\n }\n \n game.switchPlayer();\n }", "public void win() {\n displayErrorMessage(\"You Win!\");\n if(controller.aiGame && !controller.loggedIn()){\n controller.switchToLogin();\n }\n else\n controller.switchToLobby();\n }", "public boolean runRound() {\n gameMove();\n // return/check if gameover condiation is meet\n return isGameOver();\n }", "private static void winnerOrTie()\n\t{\n\t\t//Check each row for winning or tie condition.\n\t\tif(tictactoeBoard[0] == tictactoeBoard[1] && tictactoeBoard[1] == tictactoeBoard[2] && tictactoeBoard[0] != 1)\n\t\t{\n\t\t\tSystem.out.println(\"Winner\");\n\t\t}\n\t\tif(tictactoeBoard[3] == tictactoeBoard[4] && tictactoeBoard[4] == tictactoeBoard[5] && tictactoeBoard[3] != 4)\n\t\t{\n\t\t\tSystem.out.println(\"Winner\");\n\t\t}\n\t\tif(tictactoeBoard[6] == tictactoeBoard[7] && tictactoeBoard[7] == tictactoeBoard[8] && tictactoeBoard[6] != 7)\n\t\t{\n\t\t\tSystem.out.println(\"Winner\");\n\t\t}\n\t\t//Check diagonally for winning or tie condition.\n\t\tif(tictactoeBoard[0] == tictactoeBoard[4] && tictactoeBoard[4] == tictactoeBoard[8] && tictactoeBoard[0] != 1)\n\t\t{\n\t\t\tSystem.out.println(\"Winner\");\n\t\t}\n\t\tif(tictactoeBoard[6] == tictactoeBoard[4] && tictactoeBoard[4] == tictactoeBoard[2] && tictactoeBoard[6] != 7)\n\t\t{\n\t\t\tSystem.out.println(\"Winner\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//nobody has won yet.\n\t\t\t//changeTurn();\n\t\t}\n\t}", "public int checkForWin() \r\n {\r\n \twinner = null;\r\n \tint winrole = -1;\r\n \tif(isBoardFull()){\r\n \t\tint white = 0;\r\n \t\tint black = 0;\r\n\t\t\tfor(int i = 0; i < boardsize; ++i){\r\n\t\t\t\tfor(int j = 0; j<boardsize; ++j){\r\n\t\t\t\t\tif(board[i][j] == 0){\r\n\t\t\t\t\t\twhite++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(board[i][j] == 1){\r\n\t\t\t\t\t\tblack++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(white > black){\r\n\t\t\t\twinrole = 0;\r\n\t\t\t\twinner = agent[winrole];\r\n\t\t\t}\t\r\n\t\t\telse if(black > white){\r\n\t\t\t\twinrole = 1;\r\n\t\t\t\twinner = agent[winrole];\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\twinrole=2;\r\n\t\t\t}\r\n\t\t\treturn winrole;\r\n \t}\r\n \treturn -1;\r\n }", "private void whoIsTheWinner() {\n\t\t// at first we say let the number for winner and the maximal score be 0.\n\t\tint winnerName = 0;\n\t\tint maxScore = 0;\n\t\t// then, for each player, we check if his score is more than maximal\n\t\t// score, and if it is we let that score to be our new maximal score and\n\t\t// we generate the player number by it and we let that player number to\n\t\t// be the winner, in other way maximal scores doen't change.\n\t\tfor (int i = 1; i <= nPlayers; i++) {\n\t\t\tif (totalScore[i] > maxScore) {\n\t\t\t\tmaxScore = totalScore[i];\n\t\t\t\twinnerName = i - 1;\n\t\t\t}\n\t\t}\n\t\t// finally, program displays on screen who is the winner,and what score\n\t\t// he/she/it got.\n\t\tdisplay.printMessage(\"Congratulations, \" + playerNames[winnerName]\n\t\t\t\t+ \", you're the winner with a total score of \" + maxScore + \"!\");\n\t}", "public boolean checkForWin(){\n\t\t\n\t\tPlayer p = Game.getCurrPlayer();\n\t\t// if player made it to win area, player won\n\t\tif(p.won()){\n\t\t\tGame.gameWon = true;\n\t\t\tthis.network.sendWin();\n\t\t\treturn true;\n\t\t}\n\t\t// if player is the last player on the board, player won\n\t\tif(numPlayers == 1 && !p.hasBeenKicked()){\n\t\t\tGame.gameWon = true;\n\t\t\tthis.network.sendWin();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n String playAgain, playerMoveStr, computerMoveStr;\n String winner = \"default\";\n int computerMove;\n int numRounds;\n int playerMove;\n \n Random randGen = new Random();\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Welcome to ROCK, PAPER, SCISSORS!\"); \n \n do { //the entire game goes in this DO-WHILE LOOP; it is here in case the user wants to play again\n \n //initialize variables that need to be reset with each game\n int playerWins = 0;\n int computerWins = 0;\n int draws = 0;\n \n System.out.println(\"\"); //some blank space for aesthetics\n \n //ask player how many rounds to play (1-10)\n numRounds = verifyInput(1 ,10 , \"How many rounds would you like to play? (Enter a number between 1 and 10): \");\n \n for (int i = 1; i <= numRounds; i++) { //in this FOR LOOP, play the requested number of rounds\n \n //ask for player move (1-3)\n playerMove = verifyInput(1, 3, \"\\nEnter your Move! '1' for Rock, '2' for Paper, '3' for Scissors: \");\n \n //randomly generate the computer's move (1-3)\n computerMove = randGen.nextInt(2) + 1;\n \n //convert numeric input to string input\n playerMoveStr = convertChoice(playerMove);\n computerMoveStr = convertChoice(computerMove);\n \n //Determine winner of round\n if (playerMove == computerMove) {\n draws++;\n winner = \"No one\";\n } else if (playerMove == computerMove + 1) {\n playerWins++;\n winner = \"Player\";\n } else if (playerMove == computerMove - 2) {\n playerWins++;\n winner = \"Player\";\n } else if (computerMove == playerMove + 1) {\n computerWins++;\n winner = \"Computer\";\n } else if (computerMove == playerMove - 2) {\n computerWins++;\n winner = \"Computer\";\n }\n \n //print winner statement\n System.out.print(\"You chose \" + playerMoveStr + \". Computer chose \" + computerMoveStr + \". \" + winner + \" wins round \" + i + \"!\");\n }\n \n //print overall results:\n System.out.println(\"\");\n System.out.println(\"\\nHere are the overall results: \");\n System.out.println(\"Your wins \" + playerWins);\n System.out.println(\"Computer wins \" + computerWins);\n System.out.println(\"Draws: \" + draws);\n System.out.println(determineWinner(playerWins, computerWins)); //print statement about who wins\n \n //check if the user wants to play again\n System.out.println(\"\\nDo you want to play again? (y/n) \");\n playAgain = sc.next();\n playAgain = playAgain.substring(0, 1); //only take the first letter, so that \"yes\" or \"y\" are both acceptable options\n \n } while (playAgain.equalsIgnoreCase(\"y\")); //repeat game if user answered \"yes\" to playing again\n \n System.out.print(\"\\nThanks for playing! Come back soon.\");\n }", "public static void outcomes(){\n switch(outcome){\n case 1:\n System.out.println(\"Player 1 is the Winner\");\n System.exit(0);\n break;\n case 2:\n System.out.println(\"Player 2 is the Winner\");\n System.exit(0);\n break;\n case 3:\n System.out.println(\"Tie\");\n System.exit(0);\n break;\n\n }\n }", "private void showWindow(String winner) {\n String message;\n final FXMLLoader loader = new FXMLLoader(getClass().getResource(\"winlose.fxml\"));\n if (\"Draw\".equals(winner)) {\n message = \"It's a draw! Play again.\";\n } else {\n if (single) {\n if (winner.equals(playerO)) {\n message = \"LOSER!!\";\n } else {\n message = \"YOU WON!!\";\n }\n } else {\n message = winner + \" won!\";\n }\n }\n\n loader.setController(new WinLoseController(message, playerX, playerO, single));\n resetValues();\n\n try {\n final Parent root = loader.load();\n final Scene scene = new Scene(root, 250, 150);\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.initStyle(StageStyle.DECORATED);\n stage.setTitle(\"Game Over!\");\n stage.initOwner(label.getScene().getWindow());\n stage.setScene(scene);\n stage.showAndWait();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n // Close present window\n label.getScene().getWindow().hide();\n\n }", "private void DeclareWinner(){\n\t\tTextView tvStatus = (TextView) findViewById(R.id.tvStatus);\n\t\tTextView tvP1Score = (TextView) findViewById(R.id.tvP1Score);\n\t\tTextView tvP2SCore = (TextView) findViewById(R.id.tvP2Score);\n\t\tTextView tvTieScore = (TextView) findViewById(R.id.tvTieScore);\n\t\tswitch(winner){\n\t\t\tcase CAT:\n\t\t\t\ttieScore = tieScore + 1;\n\t\t\t\ttvStatus.setText(\"Tie Cat Wins!\");\n\t\t\t\ttvTieScore.setText(String.valueOf(tieScore));\n\t\t\t\tbreak;\n\t\t\tcase P1_WINNER:\n\t\t\t\tp1Score = p1Score + 1;\n\t\t\t\ttvStatus.setText(\"Player 1 Wins!\");\n\t\t\t\ttvP1Score.setText(String.valueOf(p1Score));\n\t\t\t\tbreak;\n\t\t\tcase P2_WINNER:\n\t\t\t\tp2Score = p2Score + 1;\n\t\t\t\ttvStatus.setText(\"Player 2 Wins!\");\n\t\t\t\ttvP2SCore.setText(String.valueOf(p2Score));\n\t\t\t\tbreak;\n\t\t}\n\t}" ]
[ "0.7716367", "0.75749356", "0.7309261", "0.72946787", "0.72724146", "0.72426313", "0.71246713", "0.71185386", "0.7060603", "0.7026985", "0.70099616", "0.6974738", "0.6942811", "0.6940661", "0.68901974", "0.6864829", "0.68589634", "0.68562824", "0.68181276", "0.6806099", "0.6799597", "0.6798392", "0.67946625", "0.6783579", "0.6762682", "0.6737758", "0.67336214", "0.6726258", "0.6706117", "0.6694356", "0.6677565", "0.66628635", "0.6642164", "0.6638507", "0.6609814", "0.66053736", "0.66043913", "0.660369", "0.65734893", "0.6572392", "0.6571269", "0.6566099", "0.656249", "0.6553245", "0.65442854", "0.6535701", "0.6523334", "0.65106046", "0.65069586", "0.64943135", "0.64938956", "0.6487157", "0.6486917", "0.6484176", "0.6478937", "0.6467997", "0.64415115", "0.6439233", "0.64334065", "0.64290464", "0.64241564", "0.6422942", "0.64206964", "0.6419369", "0.64090216", "0.6408031", "0.6396053", "0.63957816", "0.6377756", "0.6366758", "0.63612455", "0.63612354", "0.6353713", "0.6347413", "0.6321488", "0.63205767", "0.63137066", "0.6305243", "0.6293652", "0.6292265", "0.62908924", "0.62870574", "0.62856346", "0.6267845", "0.62495977", "0.6246242", "0.6235934", "0.62284225", "0.621184", "0.620149", "0.61878103", "0.6186161", "0.618579", "0.6182625", "0.61818415", "0.6174383", "0.61694604", "0.61690897", "0.6159036", "0.6158405" ]
0.7167433
6
Checks for Winner using board which was made above, checks for winner vertically, horizontally and diagonally
public boolean win() { for (int n = 0; n < 3; n++) { for (int m = 0; m < 7; m++) { if (board[n][m] != 'X') { if (board[n + 1][m] == board[n][m] && board[n + 2][m] == board[n][m] && board[n + 3][m] == board[n][m]) { squares[n][m].setText("X"); squares[n + 1][m].setText("X"); squares[n + 2][m].setText("X"); squares[n + 3][m].setText("X"); winnerChip = board[n][m]; return true; } } } } for (int n = 0; n < 6; n++) { for (int m = 0; m < 4; m++) { if (board[n][m] != 'X') { if (board[n][m + 1] == board[n][m] && board[n][m + 2] == board[n][m] && board[n][m + 3] == board[n][m]) { squares[n][m].setText("X"); squares[n][m + 1].setText("X"); squares[n][m + 2].setText("X"); squares[n][m + 3].setText("X"); winnerChip = board[n][m]; return true; } } } } for (int n = 0; n < 3; n++) { for (int m = 0; m < 4; m++) { if (board[n][m] != 'X') { if (board[n + 1][m + 1] == board[n][m] && board[n + 2][m + 2] == board[n][m] && board[n + 3][m + 3] == board[n][m]) { squares[n][m].setText("X"); squares[n + 1][m + 1].setText("X"); squares[n + 2][m + 2].setText("X"); squares[n + 3][m + 3].setText("X"); winnerChip = board[n][m]; return true; } } } } for (int n = 3; n < 6; n++) { for (int m = 0; m < 4; m++) { if (board[n][m] != 'X') { if (board[n - 1][m + 1] == board[n][m] && board[n - 2][m + 2] == board[n][m] && board[n - 3][m + 3] == board[n][m]) { squares[n][m].setText("X"); squares[n - 1][m + 1].setText("X"); squares[n - 2][m + 2].setText("X"); squares[n - 3][m + 3].setText("X"); winnerChip = board[n][m]; return true; } } } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkBoard(){\n\n //check horizontally for a winner\n for(int i = 0; i < 3; i++) {\n if (boardStatus[i][0].equals(boardStatus[i][1]) && boardStatus[i][1].equals(boardStatus[i][2])) {\n if (boardStatus[i][0].equals(\"X\")) {\n winnerResults = playerOne + \" has won the game!\";\n winnerName = playerOne;\n userExists();\n\n break;\n } else {\n winnerResults = playerTwo + \" has won the game!\";\n winnerName = playerTwo;\n userExists();\n\n break;\n\n }\n }\n\n\n }\n\n //check vertically for a winner\n for(int i = 0; i < 3; i++) {\n if (boardStatus[0][i].equals(boardStatus[1][i]) && boardStatus[1][i].equals(boardStatus[2][i])) {\n if (boardStatus[0][i].equals(\"X\")) {\n winnerResults = playerOne + \" has won the game!\";\n winnerName = playerOne;\n userExists();\n\n break;\n } else {\n winnerResults = playerTwo + \" has won the game!\";\n winnerName = playerTwo;\n userExists();\n\n break;\n }\n }\n }\n\n //diagonally\n\n if((boardStatus[0][0].equals(boardStatus[1][1])) && (boardStatus[0][0].equals(boardStatus[2][2]))){\n\n if (boardStatus[0][0].equals(\"X\")) {\n winnerResults = playerOne + \" has won the game!\";\n winnerName = playerOne;\n userExists();\n\n\n }\n else {\n winnerResults = playerTwo + \" has won the game!\";\n winnerName = playerTwo;\n userExists();\n\n\n }\n\n }\n\n //diagonally\n if (boardStatus[0][2].equals(boardStatus[1][1]) && (boardStatus[0][2].equals(boardStatus[2][0]))) {\n\n if (boardStatus[0][2].equals(\"X\")) {\n winnerResults = playerOne + \" has won the game!\";\n winnerName = playerOne;\n userExists();\n\n } else {\n winnerResults = playerTwo + \" has won the game!\";\n winnerName = playerTwo;\n userExists();\n\n }\n }\n\n //If all the locations on the board have been played but no win conditions have been met\n //the game will end without a winner\n if(boardStatus[0][0] != \"a\" && boardStatus[0][1] != \"b\" && boardStatus[0][2] != \"c\" &&\n boardStatus[1][0] != \"d\" && boardStatus[1][1] != \"e\" && boardStatus[1][2] != \"f\" &&\n boardStatus[2][0] != \"g\" && boardStatus[2][1] != \"h\" && boardStatus[2][2] != \"i\"){\n NoWinnerDialog dialog = new NoWinnerDialog();\n dialog.show(getSupportFragmentManager(), \"NoWinner\");\n }\n\n\n\n\n }", "public void checkWinner(){\n \n if ((board[0][0] == 'X' && board[0][1] == 'X' && board[0][2] == 'X')||(board[1][0] == 'X' && board[1][1] == 'X' && board[1][2] == 'X')||(board[2][0] == 'X' && board[2][1] == 'X' && board[2][2] == 'X')){\n winner();\n }\n else if ((board[0][0] == 'X' && board[1][0] == 'X' && board[2][0] == 'X')||(board[0][1] == 'X' && board[1][1] == 'X' && board[2][1] == 'X')||(board[0][2] == 'X' && board[1][2] == 'X' && board[2][2] == 'X')){\n winner();\n }\n else if ((board[0][0] == 'X' && board[1][1] == 'X' && board[2][2] == 'X')||(board[0][2] == 'X' && board[1][1] == 'X' && board[2][0] == 'X')){\n winner();\n }\n else if ((board[0][0] == 'O' && board[0][1] == 'O' && board[0][2] == 'O')||(board[1][0] == 'O' && board[1][1] == 'O' && board[1][2] == 'O')||(board[2][0] == 'O' && board[2][1] == 'O' && board[2][2] == 'O')){\n winner();\n }\n else if ((board[0][0] == 'O' && board[1][0] == 'O' && board[2][0] == 'O')||(board[0][1] == 'O' && board[1][1] == 'O' && board[2][1] == 'O')||(board[0][2] == 'O' && board[1][2] == 'O' && board[2][2] == 'O')){\n winner();\n }\n else if ((board[0][0] == 'O' && board[1][1] == 'O' && board[2][2] == 'O')||(board[0][2] == 'O' && board[1][1] == 'O' && board[2][0] == 'O')){\n winner();\n }\n \n }", "private boolean checkWinner() {\n\t\tboolean frontDiagWin = !myBoard.isEmpty(0, 0);\n\t\tchar frontDiagToken = myBoard.getCell(0, 0);\n\t\tboolean backDiagWin = !myBoard.isEmpty(0, Board.BOARD_SIZE - 1);\n\t\tchar backDiagToken = myBoard.getCell(0, Board.BOARD_SIZE - 1);\n\t\tfor (int i = 0; i < Board.BOARD_SIZE; i++) {\n\t\t\t// check Diagonals\n\t\t\tfrontDiagWin = myBoard.getCell(i, i) == frontDiagToken ? frontDiagWin\n\t\t\t\t\t: false;\n\t\t\tbackDiagWin = myBoard.getCell(i, (Board.BOARD_SIZE - 1) - i) == backDiagToken ? backDiagWin\n\t\t\t\t\t: false;\n\t\t\t// check Rows and Columns\n\t\t\tboolean rowWin = !myBoard.isEmpty(i, 0);\n\t\t\tchar startRowToken = myBoard.getCell(i, 0);\n\t\t\tboolean colWin = !myBoard.isEmpty(0, i);\n\t\t\tchar startColToken = myBoard.getCell(0, i);\n\t\t\tfor (int j = 0; j < Board.BOARD_SIZE; j++) {\n\t\t\t\trowWin = myBoard.getCell(i, j) == startRowToken ? rowWin\n\t\t\t\t\t\t: false;\n\t\t\t\tcolWin = myBoard.getCell(j, i) == startColToken ? colWin\n\t\t\t\t\t\t: false;\n\t\t\t}\n\t\t\tif (rowWin || colWin) {\n\t\t\t\tSystem.out.println(\"\\\"\"\n\t\t\t\t\t\t+ (rowWin ? startRowToken : startColToken)\n\t\t\t\t\t\t+ \"\\\" wins the game!\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tif (frontDiagWin || backDiagWin) {\n\t\t\tSystem.out.println(\"\\\"\"\n\t\t\t\t\t+ (frontDiagWin ? frontDiagToken : backDiagToken)\n\t\t\t\t\t+ \"\\\" wins the game!\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean checkForWinner(String player) {\r\n\t\t\r\n\t\t// check rows\r\n\t\tfor (int row = 0; row < board.length; row++) {\r\n\t\t\tint markCounter = 0;\r\n\t\t\tfor (int col = 0; col < board[row].length; col++) {\r\n\t\t\t\tif (board[row][col].getText().contains(player)) {\r\n\t\t\t\t\tmarkCounter++;\r\n\t\t\t\t}\r\n\t\t\t\telse if(! (board[row][col].getText().contains(player)) ) {\r\n\t\t\t\t\tmarkCounter = 0;\r\n\t\t\t\t}\r\n\t\t\t\tif (markCounter == connectX) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// check columns\r\n\t\tfor (int col = 0; col < 7; col++) {\r\n\t\t\tint markCounter = 0;\r\n\t\t\tfor (int row = board.length - 1; row >= 0; row--) {\r\n\t\t\t\tif(board[row][col].getText().contains(player)) {\r\n\t\t\t\t\tmarkCounter++;\r\n\t\t\t\t}\r\n\t\t\t\telse if(! (board[row][col].getText().contains(player)) ) {\r\n\t\t\t\t\tmarkCounter = 0;\r\n\t\t\t\t}\r\n\t\t\t\tif (markCounter == connectX) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * This algorithm checks the right side of the second diagonal on the board. The while loop iterates four times from bottom \r\n\t\t * to top, right to left. \r\n\t\t * The reason it only iterates four times is because after a certain point, it is impossible for a player to connect four\r\n\t\t * so the code does'nt have to check the corners.\r\n\t\t * \t\tO X X X O O O\r\n\t\t * \t\tO O X X X O O\r\n\t\t * \t\tO O O X X X O\r\n\t\t *\t\tO O O O X X X\r\n\t\t * \t\tO O O O O X X\r\n\t\t * \t\tO O O O O O X\r\n\t\t * \r\n\t\t */\r\n\t\tint diag2Count = 0;\r\n\t\tint row = board.length - 1;\r\n\t\tint col = 6;\r\n\t\tint iteration = 0;\r\n\t\tint rowPlace = row;\r\n\t\twhile (iteration < 4) {\r\n\t\t\trow = rowPlace;\r\n\t\t\tcol = 6;\r\n\t\t\twhile (row >= 0 && col >= 1) {\r\n\t\t\t\tif (board[row][col].getText().contains(currPlayer)) {\r\n\t\t\t\t\tdiag2Count++;\r\n\t\t\t\t}\r\n\t\t\t\tif (!(board[row][col].getText().contains(player))) {\r\n\t\t\t\t\tdiag2Count = 0; //If there is a chip which does not belong to a player in the sequence, the counter is reset.\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (diag2Count == connectX) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trow--;\r\n\t\t\t\tcol--;\r\n\t\t\t}\r\n\t\t\titeration++;\r\n\t\t\trowPlace--;\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Checks the left hand side of the secondary diagonal. Iterates only 3 times.\r\n\t\t * of the board.\r\n\t\t * \t\t\tX O O O O O O\r\n\t\t * \t\t\tX X O O O O O\r\n\t\t * \t\t\tX X X O O O O\r\n\t\t * \t\t\tO X X X O O O\r\n\t\t * \t\t\tO O X X X O O\r\n\t\t * \t\t\tO O O X X X O\r\n\t\t */\r\n\t\trow = board.length - 1;\r\n\t\tcol = 3;\r\n\t\titeration = 0;\r\n\t\tint colPlace = col;\r\n\t\twhile (iteration < 4) {\r\n\t\t\tcol = colPlace;\r\n\t\t\trow = board.length -1;\r\n\t\t\twhile (row >= 0 && col >= 0) {\r\n\t\t\t\tif (board[row][col].getText().contains(currPlayer)) {\r\n\t\t\t\t\tdiag2Count++;\r\n\t\t\t\t}\r\n\t\t\t\tif (!(board[row][col].getText().contains(player))) {\r\n\t\t\t\t\tdiag2Count = 0; //If there is a chip which does not belong to a player in the sequence, the counter is reset.\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (diag2Count == connectX) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trow--;\r\n\t\t\t\tcol--;\r\n\t\t\t}\r\n\t\t\titeration++;\r\n\t\t\tcolPlace++;\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Checks the left hand main Diagonals and iterates 3 times.\r\n\t\t * \t\t\tO O O X X X O\r\n\t\t * \t\t\tO O X X X O O\r\n\t\t * \t\t\tO X X X O O O \r\n\t\t * \t\t\tX X X O O O O\r\n\t\t * \t\t\tX X O O O O O\r\n\t\t * \t\t\tX O O O O O O\r\n\t\t * \r\n\t\t */\r\n\t\trow = 3;\r\n\t\tcol = 0;\r\n\t\trowPlace = row;\r\n\t\titeration = 0;\r\n\t\tint diagMainCounter = 0;\r\n\t\twhile (iteration < 3) {\r\n\t\t\trow = rowPlace;\r\n\t\t\tcol = 0;\r\n\t\t\twhile (row >= 0 && col <= 6) {\r\n\t\t\t\tif (board[row][col].getText().contains(currPlayer)) {\r\n\t\t\t\t\tdiagMainCounter++;\r\n\t\t\t\t}\r\n\t\t\t\tif (!(board[row][col].getText().contains(player))) {\r\n\t\t\t\t\tdiagMainCounter = 0; //If there is a chip which does not belong to a player in the sequence, the counter is reset.\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (diagMainCounter == connectX) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trow--;\r\n\t\t\t\tcol++;\r\n\t\t\t}\r\n\t\t\titeration++;\r\n\t\t\trowPlace++;\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Checks the right hand side of the main diagonal and iterates 4 times.\r\n\t\t * \r\n\t\t *\t\t\tO O O O O O X\r\n\t\t *\t\t\tO O O O O X X\r\n\t\t *\t\t\tO O O O X X X\r\n\t\t *\t\t\tO O O X X X O\r\n\t\t *\t\t\tO O X X X O O\r\n\t\t *\t\t\tO X X X O O O\r\n\t\t */\r\n\t\trow = board.length -1;\r\n\t\tcol = 0;\r\n\t\tcolPlace = col;\r\n\t\titeration = 0;\r\n\t\tdiagMainCounter = 0;\r\n\t\twhile (iteration < 4) {\r\n\t\t\tcol = colPlace;\r\n\t\t\trow = board.length -1;\r\n\t\t\twhile (row >= 0 && col <= 6) {\r\n\t\t\t\tif (board[row][col].getText().contains(currPlayer)) {\r\n\t\t\t\t\tdiagMainCounter++;\r\n\t\t\t\t}\r\n\t\t\t\tif (!(board[row][col].getText().contains(player))) {\r\n\t\t\t\t\tdiagMainCounter = 0; //If there is a chip which does not belong to a player in the sequence, the counter is reset.\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (diagMainCounter == connectX) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trow--;\r\n\t\t\t\tcol++;\r\n\t\t\t}\r\n\t\t\titeration++;\r\n\t\t\tcolPlace++;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private int checkWinner() {\n if (this.turnCount >= 2) {\n int colWin = this.checkColumn();\n if (colWin > 0) {\n return colWin;\n }\n\n int rowWin = this.checkRow();\n if (rowWin > 0) {\n return rowWin;\n }\n\n int diagWin = checkDiagonal();\n if (diagWin > 0) {\n return diagWin;\n }\n }\n return 0;\n }", "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 static boolean checkWinner(){\n \n if(board[0][0] == board[0][1] && board[0][1] == board[0][2] && (board[0][0] == 'x' || board [0][0] == 'o'))\n return true;\n else if(board[1][0] == board[1][1] && board[1][1] == board[1][2] && (board[1][0] == 'x' || board[1][0] == 'o'))\n return true;\n else if(board[2][0] == board[2][1] && board[2][1] == board[2][2] && (board[2][0] == 'x' || board[2][0] == 'o'))\n return true;\n else if(board[0][0] == board[1][0] && board[1][0] == board[2][0] && (board[0][0] == 'x' || board[0][0] == 'o'))\n return true;\n else if(board[0][1] == board[1][1] && board[1][1] == board[2][1] && (board[0][1] == 'x' || board[0][1] == 'o'))\n return true;\n else if(board[0][2] == board[1][2] && board[1][2] == board[2][2] && (board[0][2] == 'x' || board[0][2] == 'o'))\n return true;\n else if(board[0][0] == board[1][1] && board[1][1] == board[2][2] && (board[0][0] == 'x' || board[0][0] == 'o'))\n return true;\n else if(board[0][2] == board[1][1] && board[1][1] == board[2][0] && (board[0][2] == 'x' || board[0][2] == 'o'))\n return true;\n else\n return false;\n \n }", "boolean isWinner() {\n if(checkTopLeftDownDiag('X') || checkTopLeftDownDiag('O')) {\n return true;\n } else if (checkBottomLeftUpDiag('X') || checkBottomLeftUpDiag('O')) {\n return true;\n } else if (checkRows('X') || checkRows('O')){\n return true;\n }\n else if (checkColumns('X') || checkColumns('O')){\n return true;\n }\n\n return false;\n }", "public static void checkWinner() {\n for (int i = 0; i < 3; i++) {\r\n if (winner) {\r\n break;\r\n }\r\n for (int j = 0; j < 3; j++) {\r\n // Check each row\r\n if (output[i][0] == output[i][1] && output[i][0] == output[i][2]) {\r\n if (output[i][0] != ' ') {\r\n System.out.println(output[i][0] + \" wins!\");\r\n System.exit(0);\r\n winner = true;\r\n }\r\n break;\r\n }\r\n // Check each column\r\n else if (output[0][j] == output[1][j] && output[0][j] == output[2][j]) {\r\n if (output[0][j] != ' ') {\r\n System.out.println(output[0][j] + \" wins!\");\r\n System.exit(0);\r\n winner = true;\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n // Check Diagonals\r\n if (output[0][0] == output[1][1] && output[0][0] == output[2][2]) {\r\n if (output[0][0] != ' ') {\r\n System.out.println(output[0][0] + \" wins!\");\r\n System.exit(0);\r\n winner = true;\r\n }\r\n\r\n } else if (output[2][0] == output[1][1] && output[2][0] == output[0][2]) {\r\n if (output[2][0] != ' ') {\r\n System.out.println(output[2][0] + \" wins!\");\r\n System.exit(0);\r\n winner = true;\r\n }\r\n\r\n } else if (winner = false) {\r\n System.out.println(\"Draw\");\r\n System.exit(0);\r\n }\r\n }", "public int checkForWinner() {\n\n // Check horizontal wins\n for (int i = 0; i <= 6; i += 3)\t{\n if (mBoard[i] == HUMAN_PLAYER &&\n mBoard[i+1] == HUMAN_PLAYER &&\n mBoard[i+2]== HUMAN_PLAYER)\n return 2;\n if (mBoard[i] == COMPUTER_PLAYER &&\n mBoard[i+1]== COMPUTER_PLAYER &&\n mBoard[i+2] == COMPUTER_PLAYER)\n return 3;\n }\n\n // Check vertical wins\n for (int i = 0; i <= 2; i++) {\n if (mBoard[i] == HUMAN_PLAYER &&\n mBoard[i+3] == HUMAN_PLAYER &&\n mBoard[i+6]== HUMAN_PLAYER)\n return 2;\n if (mBoard[i] == COMPUTER_PLAYER &&\n mBoard[i+3] == COMPUTER_PLAYER &&\n mBoard[i+6]== COMPUTER_PLAYER)\n return 3;\n }\n\n // Check for diagonal wins\n if ((mBoard[0] == HUMAN_PLAYER &&\n mBoard[4] == HUMAN_PLAYER &&\n mBoard[8] == HUMAN_PLAYER) ||\n (mBoard[2] == HUMAN_PLAYER &&\n mBoard[4] == HUMAN_PLAYER &&\n mBoard[6] == HUMAN_PLAYER))\n return 2;\n if ((mBoard[0] == COMPUTER_PLAYER &&\n mBoard[4] == COMPUTER_PLAYER &&\n mBoard[8] == COMPUTER_PLAYER) ||\n (mBoard[2] == COMPUTER_PLAYER &&\n mBoard[4] == COMPUTER_PLAYER &&\n mBoard[6] == COMPUTER_PLAYER))\n return 3;\n\n // Check for tie\n for (int i = 0; i < BOARD_SIZE; i++) {\n // If we find a number, then no one has won yet\n if (mBoard[i] != HUMAN_PLAYER && mBoard[i] != COMPUTER_PLAYER)\n return 0;\n }\n\n // If we make it through the previous loop, all places are taken, so it's a tie\n return 1;\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 }", "public int checkWin(){\n //check for horizontal and vertical wins\n for(int i=0; i<3; i++){\n if(gameBoard[i][0].equals(\"O\") && gameBoard[i][1].equals(\"O\") && gameBoard[i][2].equals(\"O\")){\n return 1;\n }\n else if(gameBoard[i][0].equals(\"X\") && gameBoard[i][1].equals(\"X\") && gameBoard[i][2].equals(\"X\")){\n return 2;\n }\n else if(gameBoard[0][i].equals(\"O\") && gameBoard[1][i].equals(\"O\") && gameBoard[2][i].equals(\"O\")){\n return 1;\n }\n else if(gameBoard[0][i].equals(\"X\") && gameBoard[1][i].equals(\"X\") && gameBoard[2][i].equals(\"X\")){\n return 2;\n }\n }\n //check for both diagonal cases\n if(gameBoard[0][0].equals(\"O\") && gameBoard[1][1].equals(\"O\") && gameBoard[2][2].equals(\"O\")){\n return 1;\n }\n else if(gameBoard[0][2].equals(\"O\") && gameBoard[1][1].equals(\"O\") && gameBoard[2][0].equals(\"O\")){\n return 1;\n }\n else if(gameBoard[0][0].equals(\"X\") && gameBoard[1][1].equals(\"X\") && gameBoard[2][2].equals(\"X\")){\n return 2;\n }\n else if(gameBoard[0][2].equals(\"X\") && gameBoard[1][1].equals(\"X\") && gameBoard[2][0].equals(\"X\")){\n return 2;\n }\n return 0;\n }", "public boolean hasWinner() {\n\t\tint[][] board = myGameBoard.getBoard();\n\t\t\n\t\t// check for vertical win\n\t\tfor(int i = 0; i < board[0].length; i++) {\n\t\t\tfor(int j = 0; j < board.length - 3; j++) {\n\t\t\t\tint thisSlot = board[j][i];\n\t\t\t\tif(thisSlot == GameBoard.EMPTY) continue;\n\t\t\t\t\n\t\t\t\tif(thisSlot == board[j+1][i]) {\n\t\t\t\t\tif(thisSlot == board[j+2][i]) {\n\t\t\t\t\t\tif(thisSlot == board[j+3][i]) {\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\t\t\t}\n\t\t}\n\t\t\n\t\t// check for horizontal win\n\t\tfor(int i = 0; i < board[0].length - 3; i++) {\n\t\t\tfor(int j = 0; j < board.length; j++) {\n\t\t\t\tint thisSlot = board[j][i];\n\t\t\t\tif(thisSlot == GameBoard.EMPTY) continue;\n\t\t\t\t\n\t\t\t\tif(thisSlot == board[j][i+1]) {\n\t\t\t\t\tif(thisSlot == board[j][i+2]) {\n\t\t\t\t\t\tif(thisSlot == board[j][i+3]) {\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\t\t\t}\n\t\t}\n\t\t\n\t\t// check for diagonal win left to right, upwards\n\t\tfor(int i = 0; i < board[0].length - 3; i++) {\n\t\t\tfor(int j = 3; j < board.length; j++) {\n\t\t\t\tif(board[j][i] != GameBoard.EMPTY) {\n\t\t\t\t\tint thisSlot = board[j][i];\n\t\t\t\t\t\n\t\t\t\t\tif(board[j-1][i+1] == thisSlot) {\n\t\t\t\t\t\tif(board[j-2][i+2] == thisSlot) {\n\t\t\t\t\t\t\tif(board[j-3][i+3] == thisSlot) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// check for diagonal win right to left, upwards\n\t\tfor(int i = 3; i < board[0].length; i++) {\n\t\t\tfor(int j = 3; j < board.length; j++) {\n\t\t\t\tif(board[j][i] != GameBoard.EMPTY) {\n\t\t\t\t\tint thisSlot = board[j][i];\n\t\t\t\t\t\n\t\t\t\t\tif(board[j-1][i-1] == thisSlot) {\n\t\t\t\t\t\tif(board[j-2][i-2] == thisSlot) {\n\t\t\t\t\t\t\tif(board[j-3][i-3] == thisSlot) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "int checkWinner(char mark) {\n\t\tint row, col;\n\t\tint result = 0;\n\n\t\tfor (row = 0; result == 0 && row < 3; row++) {\n\t\t\tint row_result = 1;\n\t\t\tfor (col = 0; row_result == 1 && col < 3; col++)\n\t\t\t\tif (theBoard[row][col] != mark)\n\t\t\t\t\trow_result = 0;\n\t\t\tif (row_result != 0)\n\t\t\t\tresult = 1;\n\t\t}\n\n\t\t\n\t\tfor (col = 0; result == 0 && col < 3; col++) {\n\t\t\tint col_result = 1;\n\t\t\tfor (row = 0; col_result != 0 && row < 3; row++)\n\t\t\t\tif (theBoard[row][col] != mark)\n\t\t\t\t\tcol_result = 0;\n\t\t\tif (col_result != 0)\n\t\t\t\tresult = 1;\n\t\t}\n\n\t\tif (result == 0) {\n\t\t\tint diag1Result = 1;\n\t\t\tfor (row = 0; diag1Result != 0 && row < 3; row++)\n\t\t\t\tif (theBoard[row][row] != mark)\n\t\t\t\t\tdiag1Result = 0;\n\t\t\tif (diag1Result != 0)\n\t\t\t\tresult = 1;\n\t\t}\n\t\tif (result == 0) {\n\t\t\tint diag2Result = 1;\n\t\t\tfor (row = 0; diag2Result != 0 && row < 3; row++)\n\t\t\t\tif (theBoard[row][3 - 1 - row] != mark)\n\t\t\t\t\tdiag2Result = 0;\n\t\t\tif (diag2Result != 0)\n\t\t\t\tresult = 1;\n\t\t}\n\t\treturn result;\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 void checkWinningMove(TicTacToeElement element,int x,int y) {\n int logicalSize = boardProperties.getBoardLength()-1;\r\n // Check column (only the one we just played)\r\n for(int i=0;i<=logicalSize;i++){\r\n if( gameState.getBoard()[x][i] != element.getValue()){\r\n break;\r\n }\r\n // Be sure to be at the last index\r\n if(i == logicalSize){\r\n gameState.setWinner(element);\r\n }\r\n\r\n }\r\n // Check row (only the one we just played)\r\n for(int i=0;i<=logicalSize;i++){\r\n if( gameState.getBoard()[i][y] != element.getValue()){\r\n break;\r\n }\r\n // Be sure to be at the last index\r\n if(i == logicalSize){\r\n gameState.setWinner(element);\r\n }\r\n }\r\n // Check diagonal\r\n // normal diagonal\r\n for(int i= 0;i<=logicalSize;i++){\r\n if( gameState.getBoard()[i][i] != element.getValue()){\r\n break;\r\n }\r\n // Be sure to be at the last index\r\n if(i == logicalSize){\r\n gameState.setWinner(element);\r\n }\r\n }\r\n // anti diagonal\r\n for(int i= 0;i<=logicalSize;i++){\r\n if( gameState.getBoard()[i][logicalSize-i] != element.getValue()){\r\n break;\r\n }\r\n //Be sure to be at the last index\r\n if(i == logicalSize){\r\n gameState.setWinner(element);\r\n }\r\n }\r\n // check draw\r\n if(gameState.getMoveCount() == Math.pow(logicalSize,2)-1){\r\n gameState.setDraw(true);\r\n }\r\n\r\n }", "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 }", "private void checkForWin(int x, int y, String s) {\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tif (grid[x][i].getText() != s)\n\t\t\t\tbreak;\n\t\t\tif (i == 3 - 1) {\n\t\t\t\tgameOver = true;\n\n\t\t\t\tif (grid[x][i].getText() == \"X\")\n\t\t\t\t\twinner = \"Player 1\";\n\t\t\t\telse\n\t\t\t\t\twinner = \"Player 2\";\n\t\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\t\tgrid[r][c].setEnabled(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check row\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tif (grid[i][y].getText() != s)\n\t\t\t\tbreak;\n\t\t\tif (i == 3 - 1) {\n\t\t\t\tgameOver = true;\n\n\t\t\t\tif (grid[i][y].getText() == \"X\")\n\t\t\t\t\twinner = \"Player 1\";\n\t\t\t\telse\n\t\t\t\t\twinner = \"Player 2\";\n\n\t\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\t\tgrid[r][c].setEnabled(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\t// check diag\n\t\tif (x == y) {\n\t\t\t// we're on a diagonal\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tif (grid[i][i].getText() != s)\n\t\t\t\t\tbreak;\n\t\t\t\tif (i == 3 - 1) {\n\t\t\t\t\tgameOver = true;\n\n\t\t\t\t\tif (grid[i][i].getText() == \"X\")\n\t\t\t\t\t\twinner = \"Player 1\";\n\t\t\t\t\telse\n\t\t\t\t\t\twinner = \"Player 2\";\n\t\t\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\t\t\tgrid[r][c].setEnabled(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\t// check anti diag (thanks rampion)\n\t\tif (x + y == 3 - 1) {\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tif (grid[i][(3 - 1) - i].getText() != s)\n\t\t\t\t\tbreak;\n\t\t\t\tif (i == 3 - 1) {\n\t\t\t\t\tgameOver = true;\n\n\t\t\t\t\tif (grid[i][(3 - 1) - i].getText() == \"X\")\n\t\t\t\t\t\twinner = \"Player 1\";\n\t\t\t\t\telse\n\t\t\t\t\t\twinner = \"Player 2\";\n\t\t\t\t\tfor (int r = 0; r < 3; r++) {\n\t\t\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\t\t\tgrid[r][c].setEnabled(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public char checkWinner() {\r\n // Vertical\r\n if (board[0][0] == board[0][1] && board[0][1] == board[0][2] && board[0][0] != '-') {\r\n return board[0][0];\r\n }\r\n else if (board[1][0] == board[1][1] && board[1][1] == board[1][2] && board[1][0] != '-') {\r\n return board[1][0];\r\n }\r\n else if (board[2][0] == board[2][1] && board[2][1] == board[2][2] && board[2][0] != '-') {\r\n return board[2][0];\r\n }\r\n // Horizontal\r\n else if (board[0][0] == board[1][0] && board[1][0] == board[2][0] && board[0][0] != '-') {\r\n return board[0][0];\r\n }\r\n else if (board[0][1] == board[1][1] && board[1][1] == board[2][1] && board[0][1] != '-') {\r\n return board[0][1];\r\n }\r\n else if (board[0][2] == board[1][2] && board[1][2] == board[2][2] && board[0][2] != '-') {\r\n return board[0][2];\r\n }\r\n // Diagonal\r\n else if (board[0][0] == board[1][1] && board[1][1] == board[2][2] && board[0][0] != '-') {\r\n return board[0][0];\r\n }\r\n else if (board[0][2] == board[1][1] && board[1][1] == board[2][0] && board[0][2] != '-') {\r\n return board[0][2];\r\n }\r\n // Tie\r\n else {\r\n for (int y = 0; y < 3; y++) {\r\n for (int x = 0; x < 3; x++) {\r\n if (board[x][y] == '-')\r\n return 'N';\r\n }\r\n }\r\n return 'T';\r\n }\r\n }", "@Override\r\n\t\t\tpublic boolean isWinner() {\r\n\t\t\t\tif(isWinnerInRow() || isWinnerInCol() || isWinnerInDownwardDiag() || isWinnerInUpwardDiag()){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}", "private boolean isWinner(byte player) {\n for (int row = 0; row <= 2; row++) {\n if (board[row][0] == player && board[row][1] == player && board[row][2] == player) {\n return true;\n }\n }\n for (int column = 0; column <= 2; column++) {\n if (board[0][column] == player && board[1][column] == player && board[2][column] == player) {\n return true;\n }\n }\n if (board[0][0] == player && board[1][1] == player && board[2][2] == player) {\n return true;\n } else if (board[0][2] == player && board[1][1] == player && board[2][0] == player) {\n return true;\n } else {\n return false;\n }\n }", "private void getWinner() {\r\n int nWhite = 0, nBlack = 0;\r\n if(nextPlayer.getChecks() == 0 && nextPlayer.getQueens() == 0){\r\n winner = currentPlayer;\r\n }\r\n else if(currentPlayer.getQueens() == nextPlayer.getQueens()){\r\n for (int i = 1; i<8; i++){\r\n for (int x = 0; x<8; x++) {\r\n if (checks[i][x] == 1) nBlack++;\r\n if (checks[7 - i][x] == 2) nWhite++;\r\n }\r\n if (nWhite>nBlack) winner = getPlayer(WHITE);\r\n else if(nBlack>nWhite)winner = getPlayer(BLACK);\r\n nWhite = 0;\r\n nBlack = 0;\r\n }\r\n }\r\n else if (currentPlayer.getQueens() > nextPlayer.getQueens()){ winner = currentPlayer;}\r\n else{winner = nextPlayer; }\r\n }", "@Override\n public int getWinner() {\n /*\n * To please the test as well as the game\n * Temporarily change the turn colour\n */\n int temp;\n if (whoseTurn() == RED) {\n temp = YELLOW;\n } else {\n temp = RED;\n }\n\n //test horizontally\n //set x to 1 as the placed counter will always be correct\n int x = 1;\n int i = 1;\n //to check if zero has been found\n boolean leftZeroFound = false;\n boolean rightZeroFound = false;\n while (!rightZeroFound || !leftZeroFound) {\n //check to right of last placed\n if (!rightZeroFound && inBounds(0, i)\n && board[lastPlacedRow][lastPlacedCol + i] == temp) {\n x++;\n } else {\n rightZeroFound = true;\n }\n\n //check to left of last placed\n if (!leftZeroFound && inBounds(0, -i)\n && board[lastPlacedRow][lastPlacedCol - i] == temp) {\n x++;\n } else {\n leftZeroFound = true;\n }\n\n i++;\n }\n //return the winning colour if a row has been found\n if (x >= NUM_IN_A_ROW_TO_WIN) {\n return temp;\n }\n\n //check vertically\n //reset x to 1 as the placed counter will always be correct\n x = 1;\n i = 1;\n //to check if zero has been found\n boolean zeroFound = false;\n while (!zeroFound) {\n //check below last placed\n if (inBounds(-i, 0) && board[lastPlacedRow - i][lastPlacedCol] == temp) {\n x++;\n } else {\n zeroFound = true;\n }\n\n i++;\n }\n //return the winning colour if a row has been found\n if (x >= NUM_IN_A_ROW_TO_WIN) {\n return temp;\n }\n\n //check top right diagonal\n //reset x to 1 as the placed counter will always be correct\n x = 1;\n i = 1;\n //to check if zero has been found\n leftZeroFound = false;\n rightZeroFound = false;\n while (!rightZeroFound || !leftZeroFound) {\n //check top right diagonal\n if (!rightZeroFound && inBounds(i, i)\n && board[lastPlacedRow + i][lastPlacedCol + i] == temp) {\n x++;\n } else {\n rightZeroFound = true;\n }\n\n //check bottom left\n if (!leftZeroFound && inBounds(-i, -i)\n && board[lastPlacedRow - i][lastPlacedCol - i] == temp) {\n x++;\n } else {\n leftZeroFound = true;\n }\n\n i++;\n }\n if (x >= NUM_IN_A_ROW_TO_WIN) {\n return temp;\n }\n\n //check top left\n //set x to 1 as the placed counter will always be correct\n x = 1;\n i = 1;\n //to check if zero has been found\n leftZeroFound = false;\n rightZeroFound = false;\n while (!rightZeroFound || !leftZeroFound) {\n //check top left\n if (!leftZeroFound && inBounds(i, -i)\n && board[lastPlacedRow + i][lastPlacedCol - i] == temp) {\n x++;\n } else {\n leftZeroFound = true;\n }\n\n //check bottom right\n if (!rightZeroFound && inBounds(-i, i)\n && board[lastPlacedRow - i][lastPlacedCol + i] == temp) {\n x++;\n } else {\n rightZeroFound = true;\n }\n\n i++;\n }\n //return the winning colour if a row has been found\n if (x >= NUM_IN_A_ROW_TO_WIN) {\n return temp;\n }\n\n //return Empty if a winner has not been found\n return EMPTY;\n }", "private static String gameStatus(char[][] board){\n\t\t\n\t\tfor (int i = 0; i < 3; i++){\n\t\t\t// check horizontal lines && vertical lines for player x\n\t\t\tif ((board[i][0] == 'X' && board[i][1] == 'X' && board[i][2] == 'X') || \n\t\t\t\t\t(board[0][i] == 'X' && board[1][i] == 'X' && board[2][i] == 'X')){\n\t\t\t\twinner = 'X';\n\t\t\t\treturn \"true\";\n\t\t\t}\n\t\t}\n\t\t//check diags for x\n\t\tif ((board[0][0] == 'X' && board[1][1] == 'X' && board[2][2] == 'X') || \n\t\t\t\t(board[0][2] == 'X' && board[1][1] == 'X' && board[2][0] == 'X')){\n\t\t\twinner = 'X';\n\t\t\treturn \"true\";\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < 3 ; i++) {\n\t\t\t// check horizontal and vertical lines for player o\n\t\t\tif ((board[i][0] == 'O' && board[i][1] == 'O' && board[i][2] == 'O') || \n\t\t\t\t\t(board[0][i] == 'O' && board[1][i] == 'O' && board[2][i] == 'O')){\n\t\t\t\twinner = 'O';\n\t\t\t\treturn \"true\";\n\t\t\t}\n\t\t}\n\t\t//check diags for o\n\t\tif ((board[0][0] == 'O' && board[1][1] == 'O' && board[2][2] == 'O') || \n\t\t\t\t(board[0][2] == 'O' && board[1][1] == 'O' && board[2][0] == 'O')){\n\t\t\twinner = 'O';\n\t\t\treturn \"true\";\n\t\t}\n\n\t\t// check for tie\n\t\tint emptyCells = 9;\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') emptyCells -= 1;\t\t\n\t\t\t}\n\t\t}\n\t\t// if all cells are filled, game is over with a tie\n\t\tif (emptyCells == 0) return \"tie\";\n\n\t\t// otherwise game is not over and return false\n\t\t//printBoard(board);\n\n\t\treturn \"false\";\n\t}", "private boolean win(int row, int col, int player)\n {\n int check;\n // horizontal line\n // Start checking at a possible and valid leftmost point\n for (int start = Math.max(col - 3, 0); start <= Math.min(col,\n COLUMNS - 4); start++ )\n {\n // Check 4 chess horizontally from left to right\n for (check = 0; check < 4; check++ )\n {\n // The coordinate of column increases 1 every time\n if (chessBoard[row][start + check] != player)\n {\n break;\n }\n }\n // If the checking passed, win\n if (check == 4)\n {\n return true;\n }\n }\n\n // vertical line\n // Start checking at the point inputed if there exists at least 3 rows under\n // it.\n if (row + 3 < ROWS)\n {\n // Check another 3 chess vertically from top to bottom\n for (check = 1; check < 4; check++ )\n {\n // The coordinate of row increases 1 every time\n // Check if the chess all belong to the player\n if (chessBoard[row + check][col] != player)\n {\n break;\n }\n }\n // If the checking passed, win\n if (check == 4)\n {\n return true;\n }\n }\n\n // diagonal line \"\\\"\n // Start checking at a possible and valid leftmost and upmost point\n for (int start = Math.max(Math.max(col - 3, 0), col - row); start <= Math\n .min(Math.min(col, COLUMNS - 4), col + ROWS - row - 4); start++ )\n {\n // Check 4 chess diagonally from left and top to right and bottom\n for (check = 0; check < 4; check++ )\n {\n // The coordinate of row increases 1 every time\n // The coordinate of column increases 1 every time\n // Check if the chess all belong to the player\n if (chessBoard[row - col + start + check][start + check] != player)\n {\n break;\n }\n }\n // If the checking passed, win\n if (check == 4)\n {\n return true;\n }\n }\n\n // diagonal line \"/\"\n // Start checking at a possible and valid leftmost and downmost point\n for (int start = Math.max(Math.max(col - 3, 0),\n col - ROWS + row + 1); start <= Math.min(Math.min(col, COLUMNS - 4),\n col + row - 3); start++ )\n {\n // Check 4 chess diagonally from left and bottom to right and up\n for (check = 0; check < 4; check++ )\n {\n // The coordinate of row decreases 1 every time\n // The coordinate of column increases 1 every time\n // Check if the chess all belong to the player\n if (chessBoard[row + col - start - check][start + check] != player)\n {\n break;\n }\n }\n // If the checking passed, win\n if (check == 4)\n {\n return true;\n }\n }\n // no checking passed, not win\n return false;\n }", "public boolean isWinner(int player) {\n\n\t\tint winnerCounter1 = 0;\n\t\tint winnerCounter2 = 0;\n\t\tint winnerCounter3 = 0;\n\t\tint delta = 0;\n\n//\t\t * grid [size][size] där size = 4;\n//\t\t * for (int x = 0; x < grid.length; x++)\n//\t\t * for (int y = 0; y < grid[x].length; y++)\n//\t\t * Här förklarar jag hur funkar de här två forloop:\n//\t\t * nummert efter siffran är indexet\n//\t\t * X0Y0 X1Y0 X2Y0 X3Y0\n//\t\t * X0Y1 X1Y1 X2Y1 X3Y1\n//\t\t * X0Y2 X1Y2 X2Y2 X3Y2\n//\t\t * X0Y3 X1Y3 X2Y3 X3Y3\n\n\t\tfor (int x = 0; x < getSize(); x++) {\n\t\t\tfor (int y = 0; y < getSize(); y++) {\n\t\t\t\tif (grid[y][x] == player)\n\t\t\t\t\twinnerCounter1++;\n\t\t\t\telse\n\t\t\t\t\twinnerCounter1 = 0;\n\t\t\t\tif (winnerCounter1 >= INROW) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (grid[x][y] == player)\n\t\t\t\t\twinnerCounter2++;\n\t\t\t\telse\n\t\t\t\t\twinnerCounter2 = 0;\n\t\t\t\tif (winnerCounter2 >= INROW) {\n\t\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\twinnerCounter1 = 0;\n\t\t\twinnerCounter2 = 0;\n\t\t}\n\n\t\tfor (int x = 0; x < getSize(); x++) { // diagonally\n\t\t\tfor (int y = 0; y < getSize(); y++) {\n\t\t\t\twhile (x + delta < grid.length - 1 && y + delta < grid.length - 1) {\n\t\t\t\t\tif (grid[x + delta][y + delta] == player) {\n\t\t\t\t\t\twinnerCounter3++;\n\t\t\t\t\t\tdelta++;\n\t\t\t\t\t\tif (winnerCounter3 == INROW) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\twinnerCounter3 = 0;\n\t\t\t\t\t\tdelta++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\twinnerCounter3 = 0;\n\t\t\t\tdelta = 0;\n\t\t\t\twhile (x - delta >= 0 && y + delta < grid.length - 1) {\n\t\t\t\t\tif (grid[x - delta][y + delta] == player) {\n\t\t\t\t\t\twinnerCounter3++;\n\t\t\t\t\t\tdelta++;\n\t\t\t\t\t\tif (winnerCounter3 == INROW) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\twinnerCounter3 = 0;\n\t\t\t\t\t\tdelta++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn false;\n\n\t}", "boolean verticalWin(){\n\t\tint match_counter=1;\n\t\tboolean flag=false;\n\t\tfor(int column=0;column<25;column++){\n\t\t\tfor(int row=8;row>=0;row--){\n\t\t\t\tif(Board[row][column]!='\\u0000'){\n\t\t\t\t\tif(Board[row][column]!='O'){\n\t\t\t\t\t\tif(Board[row][column]==Board[row+1][column])\n\t\t\t\t\t\t\tmatch_counter++;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tflag=false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(match_counter==4){\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\t\t}\n\t\treturn flag;\n\t}", "private boolean winner() {\n\t\t\n\t\tif(( gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if(gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT] + \n\t\t\t\t gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT] +\n\t\t\t\t gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT] == CAT){\n\t\t\t//cat winner player_1 goes first\n\t\t\twinner = CAT;\n\t\t}else if(gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT] + \n\t\t\t\t gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT] +\n\t\t\t\t gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT] == (CAT + 3)){\n\t\t\t//cat winner player_2 goes first\n\t\t\twinner = CAT;\n\t\t} \n\t\t\n\t\tif(winner > 0){\n\t\t\treturn true;//there is a winner\n\t\t}else{\n\t\t\treturn false;//still no winner yet\n\t\t}\t\n\t}", "public boolean isWinTurn() {\n for (int col = 0; col < mColsCount; col++) {\n if (isFourConnected(getCurrentPlayer(), 0, 1, 0, col, 0)\n || isFourConnected(getCurrentPlayer(), 1, 1, 0, col, 0)\n || isFourConnected(getCurrentPlayer(), -1, 1, 0, col, 0)) {\n hasWinner = true;\n return true;\n }\n }\n\n for (int row = 0; row < mRowsCount; row++) {\n if (isFourConnected(getCurrentPlayer(), 1, 0, row, 0, 0)\n || isFourConnected(getCurrentPlayer(), 1, 1, row, 0, 0)\n || isFourConnected(getCurrentPlayer(), -1, 1, row, mColsCount - 1, 0)) {\n hasWinner = true;\n return true;\n }\n }\n\n return false;\n }", "boolean horizontalWin(){\n\t\tint match_counter=1;\n\t\tboolean flag=false;\n\t\tfor(int row=0;row<9;row++){\n\t\t\tfor(int column=0;column<25;column++){\n\t\t\t\tif(Board[row][column]!='\\u0000'){\n\t\t\t\t\tif(Board[row][column]!='O'){\n\t\t\t\t\t\tif (Board[row][column]==Board[row][column+1]){\n\t\t\t\t\t\t\tmatch_counter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(match_counter==4){\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\t\t}\n\t\treturn flag;\n\t}", "private void checkVictory() {\n\t\tboolean currentWin = true;\n\t\t\n\t\t//Vertical win\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tif (gameArray[i][yGuess] != currentPlayer){\n\t\t\t\tcurrentWin = false;\n\t\t\t}\n\t\t}\n\t\tif (currentWin){\n\t\t\tgameWon = true;\n\t\t}\n\t\t\n\t\t//Horizontal win\n\t\tcurrentWin = true;\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tif (gameArray[xGuess][i] != currentPlayer){\n\t\t\t\tcurrentWin = false;\n\t\t\t}\n\t\t}\n\t\tif (currentWin){\n\t\t\tgameWon = true;\n\t\t}\n\t\t\n\t\t//Top left bottom right diagonal win\n\t\tcurrentWin = true;\n\t\tif (xGuess == yGuess){\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tif (gameArray[i][i] != currentPlayer){\n\t\t\t\tcurrentWin = false;\n\t\t\t}\n\t\t}\n\t\tif (currentWin){\n\t\t\tgameWon = true;\n\t\t}\n\t\t}\n\t\t\n\t\t//Bottom left top right diagonal win\n\t\tcurrentWin = true;\n\t\tif (yGuess + xGuess == DIVISIONS - 1){\n\t\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\t\tif (gameArray[i][(DIVISIONS - 1) -i] != currentPlayer){\n\t\t\t\t\tcurrentWin = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currentWin){\n\t\t\t\tgameWon = true;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "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}", "private int gameState() {\n\t\t\n\t\tint gameNotOver = 0;\n\t\tint gameOverWinnerX = 1;\n\t\tint gameOverWinnerO = 2;\n\t\tint gameOverTie = 3;\n\t\t\n\t\t\n\t\t\n\t\t//Win Vertically \n\t\t// 0 3 6 , 1 4 7 , 2 5 8\n\t\t\t\t\n\t\t//Win Horizontally\n\t\t//0 1 2 , 3 4 5 , 6 7 8 \n\t\t\t\t\n\t\t//Win Diagonally\n\t\t// 0 4 8 , 2 4 6\n\t\t\t\t\n\t\t//Assuming it's an equal grid\n\t\t\t\t\n\t\tMark winningMark = null;\n\t\t\t\t\n\t\tboolean hasFoundWinner = false;\n\t\t\t\t\n\t\tint row = 0;\n\t\tint column = 0;\n\t\t\t\t\n\t\t//Horizontal Winner Test\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[ROW_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\twhile (column < COLUMN_COUNT) {\n\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\tcolumn ++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcolumn = 0;\n\t\t\trow++;\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t// Vertical Winner Test\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = 0;\n\n\t\twhile (!hasFoundWinner && column < COLUMN_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[ROW_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\trow = 0;\n\t\t\tcolumn++;\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//Diagonal Winner Test \"\\\"\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = 0;\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[COLUMN_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\t\t\t\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tcolumn++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//Diagonal Test \"/\"\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = COLUMN_COUNT - 1;\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[COLUMN_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\t\t\t\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tcolumn--;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If there are no moves left, and there is no winner, game ends inn a tie \n\t\t\n\t\tboolean foundNoMove = false;\n\t\tfor (int i = 0; i < movesArray.length; i++) {\n\t\t\tif (movesArray[i] == NO_MOVE) {\n\t\t\t\tfoundNoMove = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!foundNoMove && !hasFoundWinner) {\n\t\t\treturn gameOverTie;\n\t\t}\n\t\t\n\t\t// If there is no winner and there are still moves left, game is not over\n\t\t\n\t\treturn gameNotOver;\n\t\t\n\t}", "public static boolean isBlackWin(char[][] board){\r\n for (int r= 0; r < 6; r++ ){\r\n for (int c = 0; c < 7; c++){\r\n if (r < 3){\r\n if (board [r][c] =='b' && board [r + 1][c] =='b' && board [r + 2][c] =='b' && board [r + 3][c] =='b' ){\r\n return true;\r\n }\r\n }\r\n if (c < 4){\r\n if (board [r][c] =='b' && board [r][c + 1] =='b' && board [r ][c + 2] =='b' && board [r][c + 3] =='b' ){\r\n return true;\r\n }\r\n }\r\n\r\n \r\n }\r\n }\r\n \r\n for (int r = 0; r < 3; r++){\r\n for (int c = 0; c < 4; c++){\r\n if (board [r][c] =='b' && board [r + 1][c +1 ] =='b' && board [r + 2][c +2] =='b' && board [r + 3][c +3 ] =='b' ){\r\n return true; }\r\n }\r\n }\r\n\r\n for (int r = 0; r < 3 ; r++){\r\n for (int c = 6; c > 2; c--){\r\n if (board [r][c] =='b' && board [r + 1][c - 1 ] =='b' && board [r + 2][c - 2] =='b' && board [r + 3][c - 3 ] =='b' ){\r\n return true; }\r\n }\r\n }\r\n return false;\r\n }", "public int checkWinner(int player, int row, int col) {\n // Just check for extra 3 count since current board[row][col] is already counted as 1.\n \n // check horizontal\n int count = getConnectedCount(player, row, -1, col, 0) // left\n + getConnectedCount(player, row, 1, col, 0); // right\n if (count == 3) return player;\n\n // check vertical\n count = getConnectedCount(player, row, 0, col, -1) // up\n + getConnectedCount(player, row, 0, col, 1); // down\n if (count == 3) return player;\n\n // check top left to bottom right\n count = getConnectedCount(player, row, -1, col, -1) // top left\n + getConnectedCount(player, row, 1, col, 1); // bottom right\n if (count == 3) return player;\n\n // check top right to bottom left\n count = getConnectedCount(player, row, -1, col, 1) // top right\n + getConnectedCount(player, row, 1, col, -1); // bottom left\n if (count == 3) return player;\n\n return -1;\n }", "private int checkWin(int x) {\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 9; col++) {\n //Black = 1, Red = 0\n\n //Checks Vertically\n if ((buttons[row][col].getText() == \"O\") && (buttons[row][col+1].getText() == \"O\") && (buttons[row][col+2].getText() == \"O\") && (buttons[row][col+3].getText() == \"O\")) {\n return 0;\n }\n if ((buttons[row][col].getText() == \"X\") && (buttons[row][col+1].getText() == \"X\") && (buttons[row][col+2].getText() == \"X\") && (buttons[row][col+3].getText() == \"X\")) {\n return 1;\n }\n\n //Checks Vertically\n if ((buttons[row][col].getText() == \"O\") && (buttons[row+1][col].getText() == \"O\") && (buttons[row+2][col].getText() == \"O\") && (buttons[row+3][col].getText() == \"O\")) {\n return 0;\n }\n\n if ((buttons[row][col].getText() == \"X\") && (buttons[row+1][col].getText() == \"X\") && (buttons[row+2][col].getText() == \"X\") && (buttons[row+3][col].getText() == \"X\")) {\n return 1;\n }\n\n //Diagonal Top left to bottom right checker\n if((buttons[row][col].getText() == \"O\") && (buttons[row+1][col+1].getText() == \"O\") && (buttons[row+2][col+2].getText() == \"O\") && (buttons[row+3][col+3].getText() == \"O\")) {\n return 0;\n }\n if((buttons[row][col].getText() == \"X\") && (buttons[row+1][col+1].getText() == \"X\") && (buttons[row+2][col+2].getText() == \"X\") && (buttons[row+3][col+3].getText() == \"X\")) {\n return 1;\n }\n\n //Diagonal Bottom left to top right checker\n if((buttons[row][col].getText() == \"O\") && (buttons[row-1][col+1].getText() == \"O\") && (buttons[row-2][col+2].getText() == \"O\") && (buttons[row-3][col+3].getText() == \"O\")) {\n return 0;\n }\n if((buttons[row][col].getText() == \"X\") && (buttons[row-1][col+1].getText() == \"X\") && (buttons[row-2][col+2].getText() == \"X\") && (buttons[row-3][col+3].getText() == \"X\")) {\n return 1;\n }\n }\n }\n return 2;\n }", "private static void winner()\n {\n if ((board[1] == userLetter && board[2] == userLetter && board[3] == userLetter) ||\n (board[4] == userLetter && board[5] == userLetter && board[6] == userLetter) ||\n (board[7] == userLetter && board[8] == userLetter && board[9] == userLetter) ||\n (board[1] == userLetter && board[5] == userLetter && board[9] == userLetter) ||\n (board[3] == userLetter && board[5] == userLetter && board[7] == userLetter))\n {\n showBoard();\n System.out.println(\"Player win the game\");\n System.exit(0);\n }\n }", "private boolean isWin() {\n int continueCount = 1; // number of continue ticTacToees\n \t// west direction\n for (int x = xIndex - 1; x >= 0; x--) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(x, yIndex, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n \t// east direction\n for (int x = xIndex + 1; x <= ROWS; x++) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(x, yIndex, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n if (continueCount >= 3) {\n return true;\n } \n else\n continueCount = 1;\n \n \t\n \t// north direction\n for (int y = yIndex - 1; y >= 0; y--) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(xIndex, y, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n \t// south direction\n for (int y = yIndex + 1; y <= ROWS; y++) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(xIndex, y, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n if (continueCount >= 3) {\n return true;\n } \n else\n continueCount = 1;\n \n \t// northeast direction\n for (int x = xIndex + 1, y = yIndex - 1; y >= 0 && x <= COLS; x++, y--) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(x, y, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n \t// southeast direction\n for (int x = xIndex - 1, y = yIndex + 1; y <= ROWS && x >= 0; x--, y++) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(x, y, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n if (continueCount >= 3) {\n return true;\n } \n else\n continueCount = 1;\n \n \t// northwest direction\n for (int x = xIndex - 1, y = yIndex - 1; y >= 0 && x >= 0; x--, y--) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(x, y, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n \t// southwest direction\n for (int x = xIndex + 1, y = yIndex + 1; y <= ROWS && x <= COLS; x++, y++) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(x, y, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n if (continueCount >= 3) {\n return true;\n } \n else\n continueCount = 1;\n \n return false;\n }", "private boolean colWin(){ \r\n\t\tfor (int i=0; i<3; i++){ \r\n\t\t\tif (checkValue (board[0][i], board[1][i], board[2][i]))\r\n\t\t\t\treturn true; \r\n\t\t}\r\n\t\treturn false; \r\n\t}", "private boolean checkWinner(){\n String [][] field = new String[3][3];\n for(int i = 0; i<3; i++){\n for(int j = 0; j<3; j++){\n field[i][j] = buttons[i][j].getText().toString();\n }\n }\n\n //check the vertical is win\n for(int i = 0; i<3; i++){\n if (field[i][0].equals(field[i][1])\n && field[i][0].equals(field[i][2])\n && !field[i][0].equals(\"\")){\n buttons[i][0].setTextColor(Color.parseColor(\"#FFD145\"));\n buttons[i][1].setTextColor(Color.parseColor(\"#FFD145\"));\n buttons[i][2].setTextColor(Color.parseColor(\"#FFD145\"));\n return true;\n }\n }\n\n //check the horizontal is win\n for(int i = 0; i<3; i++){\n if (field[0][i].equals(field[1][i])\n && field[0][i].equals(field[2][i])\n && !field[0][i].equals(\"\")){\n buttons[0][i].setTextColor(Color.parseColor(\"#FFD145\"));\n buttons[1][i].setTextColor(Color.parseColor(\"#FFD145\"));\n buttons[2][i].setTextColor(Color.parseColor(\"#FFD145\"));\n return true;\n }\n }\n\n //check the slash case 1(\"\\\") is win\n for(int i = 0; i<3; i++){\n if (field[0][0].equals(field[1][1])\n && field[0][0].equals(field[2][2])\n && !field[0][0].equals(\"\")){\n buttons[0][0].setTextColor(Color.parseColor(\"#FFD145\"));\n buttons[1][1].setTextColor(Color.parseColor(\"#FFD145\"));\n buttons[2][2].setTextColor(Color.parseColor(\"#FFD145\"));\n return true;\n }\n }\n\n //check the slash case 2(\"/\") is win\n for(int i = 0; i<3; i++){\n if (field[0][2].equals(field[1][1])\n && field[0][2].equals(field[2][0])\n && !field[0][2].equals(\"\")){\n buttons[0][2].setTextColor(Color.parseColor(\"#FFD145\"));\n buttons[1][1].setTextColor(Color.parseColor(\"#FFD145\"));\n buttons[2][0].setTextColor(Color.parseColor(\"#FFD145\"));\n return true;\n }\n }\n return false;\n }", "private static void winnerOrTie()\n\t{\n\t\t//Check each row for winning or tie condition.\n\t\tif(tictactoeBoard[0] == tictactoeBoard[1] && tictactoeBoard[1] == tictactoeBoard[2] && tictactoeBoard[0] != 1)\n\t\t{\n\t\t\tSystem.out.println(\"Winner\");\n\t\t}\n\t\tif(tictactoeBoard[3] == tictactoeBoard[4] && tictactoeBoard[4] == tictactoeBoard[5] && tictactoeBoard[3] != 4)\n\t\t{\n\t\t\tSystem.out.println(\"Winner\");\n\t\t}\n\t\tif(tictactoeBoard[6] == tictactoeBoard[7] && tictactoeBoard[7] == tictactoeBoard[8] && tictactoeBoard[6] != 7)\n\t\t{\n\t\t\tSystem.out.println(\"Winner\");\n\t\t}\n\t\t//Check diagonally for winning or tie condition.\n\t\tif(tictactoeBoard[0] == tictactoeBoard[4] && tictactoeBoard[4] == tictactoeBoard[8] && tictactoeBoard[0] != 1)\n\t\t{\n\t\t\tSystem.out.println(\"Winner\");\n\t\t}\n\t\tif(tictactoeBoard[6] == tictactoeBoard[4] && tictactoeBoard[4] == tictactoeBoard[2] && tictactoeBoard[6] != 7)\n\t\t{\n\t\t\tSystem.out.println(\"Winner\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//nobody has won yet.\n\t\t\t//changeTurn();\n\t\t}\n\t}", "public Player checkWin ()\n {\n //checks rows\n for (int row = 0; row < 3; row++)\n if (getGridElement(row, 0).getPlayer() == getGridElement(row, 1).getPlayer() &&\n getGridElement(row, 1).getPlayer() == getGridElement(row, 2).getPlayer() &&\n getGridElement(row, 0).getPlayer() != Player.NONE)\n return getGridElement(row, 0).getPlayer();\n\n //checks columns\n for (int column = 0; column < 3; column++)\n if (getGridElement(0, column).getPlayer() == getGridElement(1, column).getPlayer() &&\n getGridElement(1, column).getPlayer() == getGridElement(2, column).getPlayer() &&\n getGridElement(0, column).getPlayer() != Player.NONE)\n return getGridElement(0, column).getPlayer();\n\n //checks diagonals\n if (getGridElement(0, 0).getPlayer() == getGridElement(1, 1).getPlayer() &&\n getGridElement(1, 1).getPlayer() == getGridElement(2, 2).getPlayer() &&\n getGridElement(0, 0).getPlayer() != Player.NONE)\n return getGridElement(0, 0).getPlayer();\n if (getGridElement(2, 0).getPlayer() == getGridElement(1, 1).getPlayer() &&\n getGridElement(1, 1).getPlayer() == getGridElement(0, 2).getPlayer() &&\n getGridElement(0, 0).getPlayer() != Player.NONE)\n return getGridElement(2, 0).getPlayer();\n\n return Player.NONE;\n }", "private boolean diagWin(){ \r\n\t\treturn ((checkValue (board[0][0],board[1][1],board[2][2]) == true) || \r\n\t\t\t\t(checkValue (board[0][2], board[1][1], board[2][0]) == true)); \r\n\t}", "public boolean determineWinner(){\n // search top down\n for(int x = 0; x < SIZE; x++){\n if(!stacks[x][0].isEmpty()){\n Point startingPoint = new Point(x, 0);\n ArrayList<Point> visited = new ArrayList<>();\n visited.add(startingPoint);\n TakTree<TakPiece> tree = new TakTree<>();\n tree.addRoot(getTop(startingPoint));\n treeBuilder(tree, startingPoint, visited);\n }\n\n if(whiteWins && blackWins){ // Only exit if we have found that both win\n return true;\n }\n }\n\n for(int y = 1; y < SIZE; y++){\n if(!stacks[0][y].isEmpty()){\n Point startingPoint = new Point(0, y);\n ArrayList<Point> visited = new ArrayList<>();\n visited.add(startingPoint);\n TakTree<TakPiece> tree = new TakTree<>();\n tree.addRoot(getTop(startingPoint));\n treeBuilder(tree, startingPoint, visited);\n }\n\n if(whiteWins && blackWins){ // Only exit if we have found that both win\n return true;\n }\n }\n\n // did we find a winner?\n return whiteWins || blackWins;\n }", "public int checkForWin() \r\n {\r\n \twinner = null;\r\n \tint winrole = -1;\r\n \tif(isBoardFull()){\r\n \t\tint white = 0;\r\n \t\tint black = 0;\r\n\t\t\tfor(int i = 0; i < boardsize; ++i){\r\n\t\t\t\tfor(int j = 0; j<boardsize; ++j){\r\n\t\t\t\t\tif(board[i][j] == 0){\r\n\t\t\t\t\t\twhite++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(board[i][j] == 1){\r\n\t\t\t\t\t\tblack++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(white > black){\r\n\t\t\t\twinrole = 0;\r\n\t\t\t\twinner = agent[winrole];\r\n\t\t\t}\t\r\n\t\t\telse if(black > white){\r\n\t\t\t\twinrole = 1;\r\n\t\t\t\twinner = agent[winrole];\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\twinrole=2;\r\n\t\t\t}\r\n\t\t\treturn winrole;\r\n \t}\r\n \treturn -1;\r\n }", "public static String checkWinner(String[][] f)\n {\n //look for the first type of winning line, a horizontal line\n\n for (int i = 0; i < 6; i++)\n {\n\n for (int j = 0; j < 7; j += 2)\n {\n\n if ((f[i][j+1] != \" \")\n\n && (f[i][j+3] != \" \")\n \n && (f[i][j+5] != \" \")\n\n && (f[i][j+7] != \" \")\n\n && ((f[i][j+1] == f[i][j+3])\n\n && (f[i][j+3] == f[i][j+5])\n\n && (f[i][j+5] == f[i][j+7])))\n\n //If we found a same-colored pattern, we'll return the color so that we will know who won.\n\n return f[i][j+1]; \n }\n\n }\n\n //Now, let's first loop over each odd-numbered column by incrementing with 2\n\n //and check for consecutive boxes in the same column that are the same color\n\n for (int i=1;i<15;i+=2)\n {\n\n for (int j =0;j<3;j++)\n {\n\n if((f[j][i] != \" \")\n\n && (f[j+1][i] != \" \")\n\n && (f[j+2][i] != \" \")\n\n && (f[j+3][i] != \" \")\n\n && ((f[j][i] == f[j+1][i])\n\n && (f[j+1][i] == f[j+2][i])\n\n && (f[j+2][i] == f[j+3][i])))\n\n return f[j][i]; \n } \n\n }\n\n //For the left-up to right-down diagonal line\n\n //We'll have to loop over the 3 uppermost\n\n //rows and then go from left to right column-wise\n\n for (int i = 0; i < 3; i++)\n {\n\n for (int j = 1; j < 9; j += 2)\n\n {\n\n if((f[i][j] != \" \")\n\n && (f[i+1][j+2] != \" \")\n\n && (f[i+2][j+4] != \" \")\n\n && (f[i+3][j+6] != \" \")\n\n && ((f[i][j] == f[i+1][j+2])\n\n && (f[i+1][j+2] == f[i+2][j+4])\n\n && (f[i+2][j+4] == f[i+3][j+6])))\n\n return f[i][j]; \n } \n\n }\n\n //Similar to the method above, but we're just reversing\n\n for (int i = 0; i < 3; i++)\n\n {\n for (int j = 7; j < 15; j += 2)\n\n {\n\n if((f[i][j] != \" \")\n\n && (f[i+1][j-2] != \" \")\n\n && (f[i+2][j-4] != \" \")\n \n && (f[i+3][j-6] != \" \")\n\n && ((f[i][j] == f[i+1][j-2])\n\n && (f[i+1][j-2] == f[i+2][j-4])\n\n && (f[i+2][j-4] == f[i+3][j-6])))\n\n return f[i][j]; \n } \n\n }\n\n //If after going over the table and we didn't find a winning color\n\n return null;\n }", "public final boolean checkForWin() {\r\n boolean result = false;\r\n String player = \"\";\r\n \r\n for (Rail rail : rails) {\r\n if (rail.isWinner()) {\r\n result = true;\r\n for(Tile tile : rail.getTiles()) {\r\n tile.setBackground(Color.GREEN);\r\n player = tile.getText();\r\n }\r\n if (player.equals(\"X\")) {\r\n winningPlayer = \"X\";\r\n this.xWins++;\r\n } else if (player.equals(\"0\")) {\r\n winningPlayer = \"0\";\r\n this.oWins++;\r\n }\r\n break;\r\n }\r\n }\r\n \r\n return result;\r\n }", "private void winConditionCheck()\r\n {\r\n boolean win;\r\n char mark;\r\n for(int row = 0; row < 3; row++)\r\n {\r\n win = true;\r\n mark = buttons[row][0].getText().charAt(0);\r\n if(mark != ' ')\r\n {\r\n for(int column = 0; column < 3; column++)\r\n {\r\n if(mark != buttons[row][column].getText().charAt(0))\r\n {\r\n win = false;\r\n break;\r\n }\r\n }\r\n if(win)\r\n {\r\n gameEnd(mark);\r\n }\r\n }\r\n }\r\n for(int column = 0; column < 3; column++)\r\n {\r\n win = true;\r\n mark = buttons[0][column].getText().charAt(0);\r\n if(mark != ' ')\r\n {\r\n for(int row = 0; row < 3; row++)\r\n {\r\n if(mark != buttons[row][column].getText().charAt(0))\r\n {\r\n win = false;\r\n }\r\n }\r\n if(win)\r\n {\r\n gameEnd(mark);\r\n }\r\n }\r\n }\r\n win = false;\r\n mark = buttons[0][0].getText().charAt(0);\r\n if(mark != ' ')\r\n {\r\n for(int i = 0; i < 3; i++)\r\n {\r\n if(buttons[i][i].getText().charAt(0) != mark)\r\n {\r\n win = false;\r\n break;\r\n }\r\n else\r\n {\r\n win = true;\r\n }\r\n }\r\n if(win)\r\n {\r\n gameEnd(mark);\r\n }\r\n }\r\n mark = buttons[1][1].getText().charAt(0);\r\n if((buttons[0][2].getText().charAt(0) == buttons[1][1].getText().charAt(0)) && (buttons[1][1].getText().charAt(0) == buttons[2][0].getText().charAt(0)) && (buttons[1][1].getText().charAt(0) != ' '))\r\n {\r\n gameEnd(mark);\r\n }\r\n }", "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}", "private int checkWinner(int[] arr) {\n for (int i = 0; i <= 6; i += 3) {\n int sum = arr[i] + arr[i + 1] + arr[i + 2];\n if (sum == 3) {\n return 1;\n } else if (sum == -3) {\n return 2;\n }\n }\n\n // Check verticals\n for (int i = 0; i < 3; i++) {\n int sum = arr[i] + arr[i + 3] + arr[i + 6];\n if (sum == 3) {\n return 1;\n } else if (sum == -3) {\n return 2;\n }\n }\n\n // Check diagonals\n int sum = arr[0] + arr[4] + arr[8];\n if (sum == 3) {\n return 1;\n } else if (sum == -3) {\n return 2;\n }\n\n sum = arr[2] + arr[4] + arr[6];\n if (sum == 3) {\n return 1;\n } else if (sum == -3) {\n return 2;\n }\n\n return 0;\n }", "private boolean checkDiagonalForWinner(String mark,int buttonId)\n {\n \tint rows =3;\n \tint columns = 3;\n \tboolean winStatus=false;\n \tint columnNumber = buttonId%columns;\n \tint rownumber = buttonId/rows;\n \tint rowIndex= 0;\n \tint columnIndex = 0;\n \tint index;\n \tif(columnNumber==rownumber)\n \t{\n \t\t//int index; \n\t \twhile (rowIndex<rows)\n\t \t{\n\t \t\tindex = getIndex(rowIndex,columnIndex,columns);\n\t \t\tif(movesPlayed[index]!=mark|| movesPlayed[index]==\"\")\n\t \t\t{\n\t \t\t\treturn winStatus;\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\trowIndex++;\n\t \t\t\tcolumnIndex++;\n\t \t\t}\n\t \t}\n\t \twinStatus=true;\n\t \treturn winStatus;\n \t}\n \t//Detect right to left diagonal\n \tint sum = columnNumber + rownumber;\n \tif(sum==rows-1)\n \t{\n \t\trowIndex = 0;\n \t\tcolumnIndex = columns-1;\n \t\twhile (rowIndex<rows)\n\t \t{\n\t \t\tindex = getIndex(rowIndex,columnIndex,columns);\n\t \t\tif(movesPlayed[index]!=mark|| movesPlayed[index]==\"\")\n\t \t\t{\n\t \t\t\treturn winStatus;\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\trowIndex++;\n\t \t\t\tcolumnIndex--;\n\t \t\t}\n\t \t}\n\t \twinStatus=true;\n\t \treturn winStatus;\n \t}\n \t\n \treturn false;\n }", "private boolean getWinner(String mark,int buttonId)\n {\n \tint rows =3;\n \tint columns = 3;\n \tint rowNumber = buttonId/rows;\n \tboolean winStatus = false;\n \tif(movesPlayed.length == 0)\n \t{\n \t\treturn winStatus;\n \t}\n \t//1) check row\n \tboolean isRowWin = checkRowForWinner(mark,buttonId);\n \tif(isRowWin==true)\n \t{\n \t\twinStatus = true;\n \t\treturn winStatus;\n \t}\n \tboolean isColumnWin = checkColumnForWinner(mark,buttonId);\n \tif(isColumnWin == true)\n \t{\n \t\twinStatus = true;\n \t\treturn winStatus;\n \t}\n \t\n \tboolean isDiagonalWin = checkDiagonalForWinner(mark,buttonId);\n \tif(isDiagonalWin == true)\n \t{\n \t\twinStatus = true;\n \t\treturn winStatus;\n \t}\n \treturn winStatus;\n }", "public static char checkForWinner(char[][] a){\r\n //check AI 'o' first\r\n for (int b = 0; b<a.length; b++){\r\n for (int j = 0; j<a[b].length; j++){\r\n if (b == j && countDiag1(a,'o')==a.length){\r\n return 'o';\r\n }\r\n if (b+j== a.length-1 && countDiag2(a,'o')==a.length){\r\n return 'o';\r\n } \r\n if (countRow(a[b],'o')==a[b].length || countCol(a, b, 'o')==a.length){\r\n return 'o';\r\n } \r\n }\r\n }\r\n //then check user 'x'\r\n for (int p = 0; p<a.length; p++){\r\n for (int q = 0; q<a[p].length; q++){\r\n if (p == q && countDiag1(a,'x')==a.length){\r\n return 'x';\r\n }\r\n if (p+q== a.length-1 && countDiag2(a,'x')==a.length){\r\n return 'x';\r\n }\r\n if (countRow(a[p],'x')==a[p].length || countCol(a, p, 'x')==a.length){\r\n return 'x';\r\n } \r\n }\r\n } \r\n return ' ';\r\n }", "private boolean winner(int player) {\r\n\t\treturn (board[0][0] == player && board[0][1] == player && board[0][2] == player)\r\n\t\t\t\t|| (board[1][0] == player && board[1][1] == player && board[1][2] == player)\r\n\t\t\t\t|| (board[2][0] == player && board[2][1] == player && board[2][2] == player)\r\n\t\t\t\t|| (board[0][0] == player && board[1][0] == player && board[2][0] == player)\r\n\t\t\t\t|| (board[0][1] == player && board[1][1] == player && board[2][1] == player)\r\n\t\t\t\t|| (board[0][2] == player && board[1][2] == player && board[2][2] == player)\r\n\t\t\t\t|| (board[0][0] == player && board[1][1] == player && board[2][2] == player)\r\n\t\t\t\t|| (board[0][2] == player && board[1][1] == player && board[2][0] == player);\r\n\t}", "boolean diagonalWin(){\n\t\tint match_counter=0;\n\t\tboolean flag=false;\n\t\tfor(int row=8; row>=3;row--){\n\t\t\tfor(int column=0;column<25;column++){\n\t\t\t\tif(Board[row][column]!='\\u0000'){\n\t\t\t\t\tif(Board[row][column]!='O'){\n\t\t\t\t\t\tif(Board[row][column]==Board[row-1][column+1]&& \n\t\t\t\t\t\t Board[row-1][column+1]== Board[row-2][column+2]&&\n\t\t\t\t\t\t Board[row-2][column+2]==Board[row-3][column+3]){\n\t\t\t\t\t\t\tflag=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tflag=false;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\t\t}\n\t\treturn flag;\t\n\t}", "private void computeWinLose() {\n\n if (!id11.getText().isEmpty()) {\n if ((id11.getText().equals(id00.getText()) && id11.getText().equals(id22.getText())) ||\n (id11.getText().equals(id02.getText()) && id11.getText().equals(id20.getText())) ||\n (id11.getText().equals(id10.getText()) && id11.getText().equals(id12.getText())) ||\n (id11.getText().equals(id01.getText()) && id11.getText().equals(id21.getText()))) {\n winner = id11.getText();\n }\n }\n\n if (!id00.getText().isEmpty()) {\n if ((id00.getText().equals(id01.getText()) && id00.getText().equals(id02.getText())) ||\n id00.getText().equals(id10.getText()) && id00.getText().equals(id20.getText())) {\n winner = id00.getText();\n }\n }\n\n if (!id22.getText().isEmpty()) {\n if ((id22.getText().equals(id21.getText()) && id22.getText().equals(id20.getText())) ||\n id22.getText().equals(id12.getText()) && id22.getText().equals(id02.getText())) {\n winner = id22.getText();\n }\n }\n\n // If all the grid entries are filled, it is a draw\n if (!id00.getText().isEmpty() && !id01.getText().isEmpty() && !id02.getText().isEmpty() && !id10.getText().isEmpty() && !id11.getText().isEmpty() && !id12.getText().isEmpty() && !id20.getText().isEmpty() && !id21.getText().isEmpty() && !id22.getText().isEmpty()) {\n winner = \"Draw\";\n }\n\n if (winner != null) {\n if (\"X\".equals(winner)) {\n winner = playerX;\n } else if (\"O\".equals(winner)) {\n winner = playerO;\n } else {\n winner = \"Draw\";\n }\n showWindow(winner);\n }\n }", "public boolean checkWinner(Cell value) {\n\t\tif(turn >63) {\n\t\t\t//\t\t\tSystem.out.println(\"Game is a draw.\");\n\t\t\treturn true;\n\t\t}\n\n\t\tif(check2DRowWinner(value) || check2DColWinner(value) || check2DDimWinner(value) || check2DDiagnolWinner(value) || check3DRowDiagnol(value) || check3DColDiagnol(value) || check3DDiagnolWinner(value)) {\n\t\t\tif (value.equals(Cell.O)) {\n\t\t\t\twinner = \"O\";\n\t\t\t} else {\n\t\t\t\twinner = \"X\";\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\n\t}", "public boolean winner() {\n String result = winType();\n if (result == null || result.equals(\"\"))\n return false;\n if (result.equals(\"horizontal\") || result.equals(\"vertical\") || result.equals(\"diagonal\") || result.equals(\"diagonal2\"))\n return true;\n return false;\n }", "public static boolean diagonalJudge(String playerMarker, int row, int column){\n\n boolean victoryFlag = false;\n\n int subRow = 0;\n int subColumn = 0;\n int victoryCounter = 0;\n\n // Checking first Diagonal\n // North West\n\n subRow = row;\n subColumn = column;\n\n // Store the player's latest move's coordinates\n\n winList.add(subColumn);\n winList.add(subColumn);\n\n while ( subRow >= 0 && subColumn >= 0 && !victoryFlag ){\n\n subRow--;\n subColumn--;\n\n if ( subRow >= 0 && subColumn >= 0 ){\n\n if ( gameBoard[subRow][subColumn].equals(playerMarker) ){\n winList.add(subRow);\n winList.add(subColumn);\n victoryCounter++;\n\n if ( victoryCounter == 3){\n victoryFlag = true;\n }\n }\n\n else{\n break;\n }\n }\n }\n\n // South East\n\n subRow = row;\n subColumn = column;\n\n while ( subRow < 6 && subColumn < 7 && !victoryFlag ){\n\n subRow++;\n subColumn++;\n\n if ( subRow < 6 && subColumn < 7 ){\n\n if ( gameBoard[subRow][subColumn].equals(playerMarker) ){\n winList.add(subRow);\n winList.add(subColumn);\n victoryCounter++;\n\n if ( victoryCounter == 3){\n victoryFlag = true;\n }\n }\n\n else{\n break;\n }\n }\n }\n\n if ( !victoryFlag ){\n winList.clear(); // reset the list, if no one won\n }\n else{\n winDirection = \"Left Diagonal\";\n }\n\n // Checking the other diagonal\n // North East\n\n victoryCounter = 0;\n subRow = row;\n subColumn = column;\n winList.add(subRow);\n winList.add(subColumn);\n\n while ( subRow >= 0 && subColumn < 7 && !victoryFlag ){\n\n subRow--;\n subColumn++;\n\n if ( subRow >= 0 && subColumn < 7 ){\n\n if ( gameBoard[subRow][subColumn].equals(playerMarker) ){\n winList.add(subRow);\n winList.add(subColumn);\n victoryCounter++;\n\n if ( victoryCounter == 3){\n winDirection = \"Right Diagonal\";\n victoryFlag = true;\n }\n }\n\n else{\n break;\n }\n }\n }\n\n // South East\n\n subRow = row;\n subColumn = column;\n\n while ( subRow < 6 && subColumn >= 0 && !victoryFlag ){\n\n subRow++;\n subColumn--;\n\n if ( subRow <= 5 && subColumn >= 0 ){\n\n if ( gameBoard[subRow][subColumn].equals(playerMarker) ){\n winList.add(subRow);\n winList.add(subColumn);\n victoryCounter++;\n\n if ( victoryCounter == 3){\n winDirection = \"Right Diagonal\";\n victoryFlag = true;\n }\n }\n\n else{\n break;\n }\n }\n }\n\n if ( !victoryFlag ){\n winList.clear();\n }\n\n return victoryFlag;\n }", "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 int sides1() {\n for (int row = 0; row < board.length; row++)\n for (int col = 0; col < board.length; col++) {\n // left-border (excluding corners - check 3 sides only)\n if (row != 0 && row != board.length - 1 && col == 0) {\n if (board[row - 1][col] != null && board[row][col + 1] != null && board[row + 1][col] != null\n && board[row][col] != null)\n if (board[row - 1][col].getPlayerNumber() != board[row][col].getPlayerNumber()\n && board[row - 1][col].getPlayerNumber() != board[row][col].getPlayerNumber() &&\n board[row][col + 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n if (playersArray[board[row][col].getPlayerNumber()] != -3)\n return board[row][col].getPlayerNumber();\n\n }\n // right-border (excluding corners - check 3 sides only)\n if (row != 0 && row != board.length - 1 && col == board.length - 1) {\n if (board[row - 1][col] != null && board[row][col - 1] !=\n null && board[row + 1][col] != null&& board[row][col] != null)\n if (board[row - 1][col].getPlayerNumber() != board[row][col].getPlayerNumber()\n && board[row][col].getPlayerNumber() != board[row+1][col] .getPlayerNumber() &&\n board[row][col - 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n if (playersArray[board[row][col].getPlayerNumber()] != -3)\n return board[row][col].getPlayerNumber();\n }\n // above-border (excluding corners - check 3 sides only)\n if (col != 0 && col != board.length - 1 && row == 0) {\n if (board[row][col - 1] != null && board[row][col + 1] !=\n null && board[row + 1][col] != null&& board[row][col] != null)\n if (board[row][col].getPlayerNumber() == board[row][col + 1].getPlayerNumber()\n && board[row + 1][col].getPlayerNumber() != board[row][col].getPlayerNumber() &&\n board[row][col - 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n if (playersArray[board[row][col].getPlayerNumber()] != -3)\n return board[row][col].getPlayerNumber();\n }\n // bottom-border (excluding corners - check 3 sides only)\n if (col != 0 && col != board.length - 1 && row == board.length - 1) {\n if (board[row][col - 1] != null && board[row][col + 1] != null && board[row - 1][col] != null&&\n board[row][col]!= null)\n if (board[row][col].getPlayerNumber() != board[row][col + 1].getPlayerNumber()\n && board[row - 1][col].getPlayerNumber() != board[row][col].getPlayerNumber() &&\n board[row][col - 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n return board[row][col - 1].getPlayerNumber();\n }\n\n }\n return -2;\n\n }", "public static String checkWinner(){\n //list winning conditions\n List topRow = Arrays.asList(1,2,3);\n List middleRow = Arrays.asList(4,5,6);\n List bottomRow = Arrays.asList(7,8,9);\n List leftCol = Arrays.asList(1,4,7);\n List middleCol = Arrays.asList(2,5,8);\n List rightCol = Arrays.asList(3,6,9);\n List crossLR = Arrays.asList(1,5,9);\n List crossRL = Arrays.asList(3,5,7);\n //????Why\n List<List> winningCon = new ArrayList<List>(){\n {\n add(topRow);\n add(middleRow);\n add(bottomRow);\n add(leftCol);\n add(middleCol);\n add(rightCol);\n add(crossLR);\n add(crossRL); \n }\n };\n for(List l: winningCon){\n if(Player0Pos.containsAll(l)){\n player0win++;\n return \"✧*。٩(ˊωˋ*)و✧* The winner of this round goes to Player 0, congrats! \";\n }else if(Player1Pos.containsAll(l)){\n player1win++;\n return \"✧*。٩(ˊωˋ*)و✧* The winner of this round goes to Player 1, congrats!\";\n }else if(Player0Pos.size() +Player1Pos.size()==9){\n return \"Game end, no one wins.\";\n }\n }\n return \"\"; \n }", "private boolean checkPlayerOneWin()\n {\n boolean playerOneWin = false;\n \n if( board[0][0] == \"X\" && board[0][1] == \"X\" && board[0][2] == \"X\" )\n {\n playerOneWin = true;\n }\n else if( board[1][0] == \"X\" && board[1][1] == \"X\" && board[1][2] == \"X\" )\n {\n playerOneWin = true;\n }\n else if( board[2][0] == \"X\" && board[2][1] == \"X\" && board[2][2] == \"X\" )\n {\n playerOneWin = true;\n }\n else if( board[0][0] == \"X\" && board[1][0] == \"X\" && board[2][0] == \"X\" )\n {\n playerOneWin = true;\n }\n else if( board[0][1] == \"X\" && board[1][1] == \"X\" && board[2][1] == \"X\" )\n {\n playerOneWin = true;\n }\n else if( board[2][0] == \"X\" && board[2][1] == \"X\" && board[2][2] == \"X\" )\n {\n playerOneWin = true;\n }\n else if( board[0][0] == \"X\" && board[1][1] == \"X\" && board[2][2] == \"X\" )\n {\n playerOneWin = true;\n }\n else if( board[0][2] == \"X\" && board[1][1] == \"X\" && board[2][0] == \"X\" )\n {\n playerOneWin = true;\n }\n \n return playerOneWin;\n }", "public void checkWin(){\n if(gameBoard[0][0].getText().equals(\"x\") && gameBoard[0][1].getText().equals(\"x\")\n && gameBoard[0][2].getText().equals(\"x\") && gameBoard[0][3].getText().equals(\"o\") \n && gameBoard[0][4].getText().equals(\"o\") && gameBoard[0][5].getText().equals(\"x\")\n && gameBoard[0][6].getText().equals(\"x\") && gameBoard[0][7].getText().equals(\"x\")\n && gameBoard[1][0].getText().equals(\"x\") && gameBoard[1][1].getText().equals(\"o\")\n && gameBoard[1][2].getText().equals(\"x\") && gameBoard[1][3].getText().equals(\"x\")\n && gameBoard[1][4].getText().equals(\"x\") && gameBoard[1][5].getText().equals(\"x\")\n && gameBoard[1][6].getText().equals(\"o\") && gameBoard[1][7].getText().equals(\"x\")\n && gameBoard[2][0].getText().equals(\"o\") && gameBoard[2][1].getText().equals(\"x\")\n && gameBoard[2][2].getText().equals(\"x\") && gameBoard[2][3].getText().equals(\"x\")\n && gameBoard[2][4].getText().equals(\"x\") && gameBoard[2][5].getText().equals(\"x\")\n && gameBoard[2][6].getText().equals(\"x\") && gameBoard[2][7].getText().equals(\"o\")\n && gameBoard[3][0].getText().equals(\"x\") && gameBoard[3][1].getText().equals(\"x\")\n && gameBoard[3][2].getText().equals(\"o\") && gameBoard[3][3].getText().equals(\"x\")\n && gameBoard[3][4].getText().equals(\"x\") && gameBoard[3][5].getText().equals(\"o\")\n && gameBoard[3][6].getText().equals(\"x\") && gameBoard[3][7].getText().equals(\"x\")\n && gameBoard[4][0].getText().equals(\"x\") && gameBoard[4][1].getText().equals(\"x\")\n && gameBoard[4][2].getText().equals(\"x\") && gameBoard[4][3].getText().equals(\"o\")\n && gameBoard[5][0].getText().equals(\"x\") && gameBoard[5][1].getText().equals(\"x\")\n && gameBoard[5][2].getText().equals(\"o\") && gameBoard[5][3].getText().equals(\"x\")\n && gameBoard[6][0].getText().equals(\"x\") && gameBoard[6][1].getText().equals(\"o\")\n && gameBoard[6][2].getText().equals(\"x\") && gameBoard[6][3].getText().equals(\"x\")\n && gameBoard[7][0].getText().equals(\"o\") && gameBoard[7][1].getText().equals(\"x\")\n && gameBoard[7][2].getText().equals(\"x\") && gameBoard[7][3].getText().equals(\"x\")){\n System.out.println(\"Congratulations, you won the game! ! !\");\n System.exit(0);\n } \n }", "private boolean checkWin(Integer playerMove, Location loc)\n\t{\n\t\tboolean isWinAcross = true, isWinDown = true, isWinDiag1 = true, isWinDiag2 = true;\n\t\tfor (int col = 0; col < super.getRows() && isWinAcross; col++) //ends loop after isWinAcross is true\n\t\t\tif (grid[loc.getRow()][col] == null || !grid[loc.getRow()][col].equals(playerMove))\n\t\t\t\tisWinAcross = false;\n\t\tfor (int row = 0; row < super.getCols() && isWinDown; row++) //ends loop after isWinDown is true\n\t\t\tif (grid[row][loc.getCol()] == null || !grid[row][loc.getCol()].equals(playerMove))\n\t\t\t\tisWinDown = false;\n\t\tfor (int diagonal = 0; diagonal < super.getCols() && isWinDiag1; diagonal++) //ends loop after isWinDiag1 is true\n\t\t\tif (grid[diagonal][diagonal] == null || !grid[diagonal][diagonal].equals(playerMove))\n\t\t\t\tisWinDiag1 = false;\n\t\tfor (int diagonal2 = 0; diagonal2 < super.getCols() && isWinDiag2; diagonal2++) //ends loop after isWinDiag2 is true\n\t\t\tif (grid[getCols() - diagonal2 - 1][diagonal2] == null || !grid[getCols() - diagonal2 - 1][diagonal2].equals(playerMove))\n\t\t\t\tisWinDiag2 = false;\n\t\treturn isWinAcross || isWinDown || isWinDiag1 || isWinDiag2;\n\t}", "public boolean CheckVictory()\n {\n\n for (int i = 0; i < 6; i++) {\n if(isFiveAligned(\n getCell(i, 0),\n getCell(i, 1),\n getCell(i, 2),\n getCell(i, 3),\n getCell(i, 4),\n getCell(i, 5) )){\n Winner=getCell(i, 2);\n return true;\n }\n }\n\n for (int i = 0; i < 6; i++) {\n if(isFiveAligned(\n getCell(0,i),\n getCell(1,i),\n getCell(2,i),\n getCell(3,i),\n getCell(4,i),\n getCell(5,i) )){\n Winner=getCell(2, i);\n return true;\n }\n }\n CellType[] arrTypes={getCell(0, 0),getCell(1, 1),getCell(2, 2),getCell(3, 3),\n getCell(4, 4),getCell(5, 5)};\n\n \n if(isFiveAligned(arrTypes))\n {\n Winner=arrTypes[2];\n return true;\n }\n\n CellType[] REVERSE_arrTypes={getCell(0, 5),getCell(1, 4),getCell(2, 3),getCell(3, 2),\n getCell(4, 1),getCell(5, 0)};\n\n \n\n if(isFiveAligned(REVERSE_arrTypes))\n {\n Winner=REVERSE_arrTypes[2]; \n return true;\n }\n\n\n if(isFiveAligned(new CellType[]{getCell(0, 1),\n getCell(1, 2),\n getCell(2, 3),\n getCell(3, 4),\n getCell(4, 5),\n CellType.None\n })) {\n Winner=getCell(3, 4);\n return true;\n }\n \n if(isFiveAligned(new CellType[]{getCell(1, 0),\n getCell(2, 1),\n getCell(3, 2),\n getCell(4, 3),\n getCell(5, 4),\n CellType.None\n })) {\n Winner=getCell(4, 3);\n return true;\n }\n\n if(isFiveAligned(new CellType[]{\n getCell(4, 0),\n getCell(3, 1),\n getCell(2, 2),\n getCell(1, 3),\n getCell(0, 4),\n CellType.None\n \n })){\n Winner=getCell(2, 2);\n return true;}\n\n if(isFiveAligned(new CellType[]{\n getCell(5, 1),\n getCell(4, 2),\n getCell(3, 3),\n getCell(2, 4),\n getCell(1, 5),\n CellType.None\n \n })){\n Winner=getCell(3, 3);\n return true;}\n\n \n \n\n\n \n\n return false;\n }", "public boolean winner(){ \r\n\t\tif (rowWin() || colWin() || diagWin()){ \r\n\t\t\tchangeTurn(); \r\n\t\t\tSystem.out.println(\"Winner: \" + playerToString(currentTurn) + \"!\"); \r\n\t\t\treturn true; \r\n\t\t}\r\n\t\telse if (tie()){\r\n\t\t\tSystem.out.println(\"There is a tie.\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse{ \r\n\t\t\tSystem.out.println(\"No winner yet.\\n\"); \r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "public int winner(){\n getValidMoves();\n if(check(1)!=0) return 1;\n else if(check(-1)!=0) return -1;\n else if(validX.size()==0) return 2;\n else return 0;\n }", "public boolean isGameOver() {\n if (winner == null) {\n Piece[] diagOne = new Piece[this.size];\n Piece[] diagTwo = new Piece[this.size];\n for (int col = 0; col < _board.length; col += 1) {\n diagOne[col] = _board[col][col];\n diagTwo[col] = _board[col][this.size - 1 - col];\n if (isWinning(_board[col])) {\n alternatePlayer(currPlayer);\n winner = currPlayer;\n return true;\n }\n }\n this.transpose();\n for (int row = 0; row < _board[0].length; row += 1) {\n if (isWinning(this._board[row])) {\n this.transpose();\n alternatePlayer(currPlayer);\n winner = currPlayer;\n return true;\n }\n }\n\n this.transpose();\n\n if (isWinning(diagOne) || isWinning(diagTwo)) {\n alternatePlayer(currPlayer);\n winner = currPlayer;\n return true;\n }\n if (checkTie()) {\n return true;\n }\n }\n return false;\n }", "public static boolean checkWin(int[][] board) {\n boolean win = true;\n\n //loops through rows\n for (int i = 0; i < board.length; i++) {\n int checkrow[] = new int[9];\n int checkcol[] = new int[9];\n\n //loops through columns and stores the numbers in that row and in that column\n for (int j = 0; j < board.length; j++) {\n checkrow[j] = board[i][j];\n checkcol[j] = board[j][i];\n }\n\n Arrays.sort(checkrow);//sorts the numbers\n Arrays.sort(checkcol);\n\n //checks the sorted numbers to see if there is a winnner by checking the values of the\n //sorted array. first number in the array with 1, second with 2, third with 3 etc...\n // if the numbers dont match at any point then there was not a winner and the program returns\n //false.\n for (int x = 1; x < board.length; x++) {\n if (checkrow[x] != x + 1 || checkcol[x] != x + 1) {\n win = false;\n return win;\n }\n }\n }\n\n return win;\n }", "public static String checkResult() {\n\n int numWinningRows = 0;\n char winner = ' ';\n int numX = 0;\n int numO = 0;\n\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n if(gameBoard[i][j] == 'X'){\n numX++;\n } else if(gameBoard[i][j] == 'O') {\n numO++;\n }\n }\n }\n// System.out.println(line);\n// System.out.println(Arrays.deepToString(board));\n\n char[] topRow = new char[3];\n char[] midRow = new char[3];\n char[] btmRow = new char[3];\n char[] leftCol = new char[3];\n char[] centerCol = new char[3];\n char[] rightCol = new char[3];\n char[] diagLeft = new char[3];\n char[] diagRight = new char[3];\n\n for (int i = 0; i < 3; i++) {\n topRow[i] = gameBoard[0][i];\n midRow[i] = gameBoard[1][i];\n btmRow[i] = gameBoard[2][i];\n leftCol[i] = gameBoard[i][0];\n centerCol[i] = gameBoard[i][1];\n rightCol[i] = gameBoard[i][2];\n diagLeft[i] = gameBoard[i][i];\n diagRight[i] = gameBoard[2-i][i];\n }\n\n\n// for( char s : line.toCharArray()) {\n// if(s == 'X') {\n// numX++;\n// } else if (s == 'O') {\n// numO++;\n// }\n// }\n//\n// if (numO - numX > 1 || numO - numX < -1) {\n// System.out.println(\"Impossible\");\n// return;\n// } else if (numO < 3 && numX < 3) {\n// System.out.println(\"Game not finished\");\n// return;\n// }\n\n if(rowGood(topRow)){\n numWinningRows++;\n winner = topRow[0];\n// System.out.println(\"top\");\n }\n if(rowGood(midRow)){\n numWinningRows++;\n winner = midRow[0];\n// System.out.println(\"mid\");\n }\n if(rowGood(btmRow)){\n numWinningRows++;\n winner = btmRow[0];\n// System.out.println(\"btm\");\n }\n if(rowGood(leftCol)){\n numWinningRows++;\n winner = leftCol[0];\n }\n if(rowGood(centerCol)){\n numWinningRows++;\n winner = centerCol[0];\n }\n if(rowGood(rightCol)){\n numWinningRows++;\n winner = rightCol[0];\n }\n if(rowGood(diagLeft)){\n numWinningRows++;\n winner = diagLeft[0];\n// System.out.println(\"diagl\");\n }\n if(rowGood(diagRight)){\n numWinningRows++;\n winner = diagRight[0];\n// System.out.println(\"diagr\");\n// System.out.println(diagRight);\n }\n\n System.out.println(numWinningRows);\n\n if(numWinningRows >= 1) {\n String win = Character.toString(winner);\n// System.out.println(win + \" wins\");\n return win + \" wins\";\n } else if (numWinningRows == 0 && numX + numO < 9){\n// System.out.println(\"Game not finished\");\n return \"Game not finished\";\n } else if(numWinningRows == 0 && numO + numX == 9){\n System.out.println(\"Draw\");\n return \"Draw\";\n }\n\n return \"Ok\";\n }", "boolean isWinner() {\n boolean win = true;\n // first method to win\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if ((state[i][j] == 'X' && stateGame[i][j] != '*') || (state[i][j] != 'X' && stateGame[i][j] == '*'))\n win = false;\n }\n }\n if (win)\n return true;\n\n win = true;\n // second method to win\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (state[i][j] == '.' && stateGame[i][j] == '.')\n win = false;\n }\n }\n return win;\n }", "public boolean isWinner(Coordinates guess, String playerSymbol){\n //idea for antidiag win test from\n // https://stackoverflow.com/questions/1056316/algorithm-for-determining-tic-tac-toe-game-over\n for (int i = 0; i < 3; i++) {\n if (board[guess.getRow()][i].getSymbol() != playerSymbol) {\n break;\n }\n if (i == 3 - 1) {\n return true;\n }\n }\n\n for (int j = 0; j < 3; j++) {\n if (board[j][guess.getColumn()].getSymbol() != playerSymbol) {\n break;\n }\n if (j==3-1) {\n return true;\n }\n }\n\n if (guess.getColumn()==guess.getRow()){\n for(int k = 0; k < 3; k++){\n if(board[k][k].getSymbol() != playerSymbol)\n break;\n if(k == 3-1){\n return true;\n }\n }\n }\n\n if (guess.getColumn()+guess.getRow()==3-1){\n for (int l = 0; l < 3; l++) {\n if(board[l][3-1-l].getSymbol()!= playerSymbol){\n break;\n }\n if (l==3-1){\n return true;\n }\n }\n }\n\n return false;\n }", "private boolean checkHorizontalWin(BoardPosition lastPos) {\r\n int i, col, count;\r\n int check = 9;\r\n int row = lastPos.getRow();\r\n\r\n for(i = (xMax-xMax)+2; i < (xMax / 2); i += 2){\r\n count = 0;\r\n for(col = i; col < (i + check); col++){\r\n if(grid[row][col] == lastPos.getPlayer())\r\n count++;\r\n }\r\n if (count == win)\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean haveWinner(int row, int col) {\n\n if (numFreeSquares > 4) return false;\n\n // check row \"row\"\n if (boardData[row][0].equals(boardData[row][1]) && boardData[row][0].equals(boardData[row][2])) return true;\n\n // check column \"col\"\n\n if (boardData[0][col].equals(boardData[1][col]) && boardData[0][col].equals(boardData[2][col])) return true;\n\n // if row=col check one diagonal\n\n if (row == col)\n if (boardData[0][0].equals(boardData[1][1]) && boardData[0][0].equals(boardData[2][2])) return true;\n\n // if row=2-col check other diagonal\n\n if (row == 2 - col)\n if (boardData[0][2].equals(boardData[1][1]) && boardData[0][2].equals(boardData[2][0])) return true;\n // no winner yet\n return false;\n }", "private boolean checkDiagonalWin(BoardPosition lastPos){\r\n int i, j, k, countTop, countBottom;\r\n int check = 5;\r\n\r\n //checking for diagonals from top to bottom\r\n for(i = 0; i < (yMax-yMax)+5; i++){\r\n for(j = 0; j < (xMax / 2); j++){\r\n countTop = 0;\r\n for(k = 0; k < check; k++){\r\n if(grid[i+k][j+(2*k)] == lastPos.getPlayer()) {\r\n countTop++;\r\n }\r\n }\r\n if(countTop == win) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n //checking for diagonals from bottom to top\r\n for(i = yMax-1; i > (yMax-yMax)+3; i--){\r\n for(j = 0; j < (xMax / 2); j++){\r\n countBottom = 0;\r\n for(k = 0; k < check; k++){\r\n if(grid[i-k][j+(2*k)] == lastPos.getPlayer()) {\r\n countBottom++;\r\n }\r\n }\r\n if(countBottom == win) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\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}", "public int checkWin() {\r\n\t int diagSum1 = 0;\r\n\t int diagSum2 = 0;\r\n\t int colSum = 0;\r\n\t int rowSum = 0;\r\n\t int j = 0;\r\n\t String winner = \"\";\r\n\t \r\n\t \r\n\r\n\t diagSum1 = buttons[0][2].getValue() + buttons[1][1].getValue() + buttons[2][0].getValue();\r\n\t diagSum2 = buttons[0][0].getValue() + buttons[1][1].getValue() + buttons[2][2].getValue();\r\n\r\n\t if(diagSum1 == 3 || diagSum2 == 3) {\r\n\t winner = \"computer\";\r\n\t \t message.setText(\"COMPUTER WINS!\");\r\n\t setPanelEnabled(board, false);\r\n\t\t aiscore.setText(Integer.toString(computerscore+=2));\r\n\t\t restart.setVisible(true);\r\n\t\t j=1;\r\n\r\n\t }\r\n\t if(diagSum1 == -3 || diagSum2 == -3) {\r\n\t winner = \"you win\";\r\n\t setPanelEnabled(board, false);\r\n\t \tmessage.setText(\"YOU WIN\");\r\n\t humanscore.setText(Integer.toString(playerscore+=2));\r\n\t restart.setVisible(true);\r\n\t j=1;\r\n\t }\r\n\r\n\t for(int x = 0; x<3; x++) {\r\n\t for(int y = 0; y<3; y++) {\r\n\t rowSum += buttons[x][y].getValue(); \r\n\t colSum += buttons[y][x].getValue();\r\n\t }\r\n\t if(rowSum == 3 || colSum == 3 && winner.equals(\"\")) { \r\n\t setPanelEnabled(board, false);\r\n\t restart.setVisible(true);\r\n\t\t // frame.add(better);\r\n\t winner = \"Computer wins!\";\r\n\t \t message.setText(\"COMPUTER WINS!\");\r\n\t\t\t aiscore.setText(Integer.toString(computerscore+=2));\r\n\t\t\t j=1;\r\n\t }\r\n\t else if(rowSum == -3 || colSum == -3 && winner.equals(\"\")) {\r\n\t setPanelEnabled(board, false);\r\n\t\t // frame.add(restart);\r\n\t winner = \"You win\";\r\n\t \tmessage.setText(\"YOU WIN\");\r\n\t\t humanscore.setText(Integer.toString(playerscore+=2));\r\n\t\t restart.setVisible(true);\r\n\t\t // frame.add(better);\r\n\t\t j=1;\r\n\t }\r\n\t rowSum = 0;\r\n\t colSum = 0;\r\n\t }\r\n\t \r\n\t if(clicks >= 9 && winner.equals(\"\")) {\r\n winner = \"draw\";\r\n\t setPanelEnabled(board, false);\r\n\t restart.setVisible(true);\r\n\t // frame.add(better);\r\n\t message.setText(\"IT'S A DRAW!\");\r\n\t humanscore.setText(Integer.toString(playerscore+=1));\r\n\t\t aiscore.setText(Integer.toString(computerscore+=1));\r\n\t\t j=1;\r\n\t }\r\n\t return j;\r\n\t }", "private boolean checkVerticalWin(BoardPosition lastPos){\r\n int i, row, count;\r\n int check = 5;\r\n int col = lastPos.getColumn();\r\n\r\n for(i = (yMax-yMax)+1; i < (yMax-yMax+5); i++){\r\n count = 0;\r\n for(row = i; row < (i + check); row++){\r\n if(grid[row][col] == lastPos.getPlayer())\r\n count++;\r\n }\r\n if (count == win)\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean check2DDimWinner(Cell play) {\n\t\tfor(int row = 0; row < board.length; row++) {// for row\n\t\t\tfor(int col = 0; col < board.length; col++) {// for col\n\t\t\t\tif(board[0][row][col] == board[1][row][col] && board[1][row][col]==board[2][row][col] && board[2][row][col]==board[3][row][col] && board[3][row][col].equals(play)) \n\t\t\t\t{\n\t\t\t\t\t//\t\t\t\t\tSystem.out.println(\"Dimensional win by \"+play.toString()+ \" at row=\" + row +\" & col= \" + col);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean checkWin(int x, int y, int player)\n {\n int[][] area = new int[REGION_SIZE][REGION_SIZE];\n // Copy region of board to do win checking\n for (int i = REGION_START; i <= REGION_STOP; i++) {\n for (int j = REGION_START; j <= REGION_STOP; j++) {\n area[i - REGION_START][j - REGION_START] = getTile(x + i, y + j);\n }\n }\n \n //Check Horizontal\n int count = 0;\n for (int i = 0; i < REGION_SIZE; i++) {\n if (area[4][i] == player) {\n count++;\n } else {\n count = 0;\n }\n if (count == 5) {\n return true;\n }\n }\n //Check Vertical\n count = 0;\n for (int i = 0; i < REGION_SIZE; i++) {\n if (area[i][4] == player) {\n count++;\n } else {\n count = 0;\n }\n if (count == 5) {\n return true;\n }\n }\n //Check Diagonal '/'\n count = 0;\n for (int i = 0; i < REGION_SIZE; i++) {\n if (area[REGION_SIZE - 1 - i][i] == player) {\n count++;\n } else {\n count = 0;\n }\n if (count == 5) {\n return true;\n }\n }\n //Check Diagonal '\\'\n count = 0;\n for (int i = 0; i < REGION_SIZE; i++) {\n if (area[i][i] == player) {\n count++;\n } else {\n count = 0;\n }\n if (count == 5) {\n return true;\n }\n }\n return false;\n }", "public GameState won() {\n if ( (board[0][0] != TileState.BLANK) && (board[0][0] == board[0][1]) && (board[0][0] == board[0][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[1][0] != TileState.BLANK) && (board[1][0] == board[1][1]) && (board[1][0] == board[1][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[2][0] != TileState.BLANK) && (board[2][0] == board[2][1]) && (board[2][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][1]) && (board[0][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ( (board[0][2] != TileState.BLANK) && (board[0][2] == board[1][1]) && (board[0][2] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][0]) && (board[0][0] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][1] != TileState.BLANK) && (board[0][1] == board[1][1]) && (board[0][1] == board[2][1])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][2] != TileState.BLANK) && (board[0][2] == board[1][2]) && (board[0][2] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if (movesPlayed == 9)\n return GameState.DRAW;\n return GameState.IN_PROGRESS;\n }", "public boolean isWon(int row, int column, char piece) {\n int matches = 0;\n int tempCol = column;\n int tempRow = row;\n //Check below\n if (row < 3) {\n for (int i = 1; board[row + i][column] == piece; i++) {\n if (i == 3) {\n return true;\n }\n }\n }\n //Check horizontal\n while (tempCol > 0 && board[row][tempCol - 1] == piece) {\n matches++;\n tempCol--;\n }\n tempCol = column;\n while (tempCol < 6 && board[row][tempCol + 1] == piece) {\n matches++;\n tempCol++;\n }\n if (matches >= 3) {\n return true;\n }\n matches = 0;\n tempCol = column;\n \n //Check left diagonal\n while(tempRow < 5 && tempCol > 0 && board[tempRow + 1][tempCol - 1] == piece) {\n matches++;\n tempRow++;\n tempCol--;\n }\n tempCol = column;\n tempRow = row;\n while (tempRow > 0 && tempCol < 6 && board[tempRow - 1][tempCol + 1] == piece) {\n matches++;\n tempRow--;\n tempCol++;\n }\n if (matches >= 3) {\n return true;\n }\n matches = 0;\n tempCol = column;\n tempRow = row;\n //Check right diagonal\n while(tempRow < 5 && tempCol < 6 && board[tempRow + 1][tempCol + 1] == piece) {\n matches++;\n tempRow++;\n tempCol++;\n }\n tempCol = column;\n tempRow = row;\n while (tempRow > 0 && tempCol > 0 && board[tempRow - 1][tempCol - 1] == piece) {\n matches++;\n tempRow--;\n tempCol--;\n }\n if (matches >= 3) {\n return true;\n }\n return false;\n\t}", "public boolean checkWin() {\n for (int i = 0; i <= 7; i++) {\n for (int j = 0; j <= 4; j++) {\n if (grid[i][j].equals(\"X\") && grid[i][j + 1].equals(\"X\") && grid[i][j + 2].equals(\"X\") && grid[i][j + 3].equals(\"X\")) {\n return true;\n }\n\n\n }\n\n }\n return false;\n }", "public boolean isWinner(int player) {\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tfor (int j = 0; j < board[i].length; j++) {\n\t\t\t\tif (board[i][j] != player) {\n\t\t\t\t\t// Player has no mark here,\n\t\t\t\t\t// continue with next cell.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (checkHorizontal(player, i, j)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (checkVertical(player, i, j)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (checkSouthEast(player, i, j)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (checkNorthEast(player, i, j)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "private static Evaluation horizontalWin(String board, int diagonalSize) {\n int perfectMatch = 0;\n char reference = '!';\n int rowRemaining = 0;\n for (int cell = 0; cell < board.length(); cell++) {\n final char c = board.charAt(cell);\n if (rowRemaining == 0) {\n rowRemaining = diagonalSize - 1;\n }\n if (reference == '!') {\n if (c == '.') {\n cell += rowRemaining;\n reference = '!';\n perfectMatch = 0;\n rowRemaining = 0;\n continue;\n } else {\n reference = c;\n perfectMatch++;\n }\n } else {\n if (reference == c) {\n perfectMatch++;\n if (perfectMatch == diagonalSize) {\n if (reference == 'x') {\n return Evaluation.Xwins;\n }\n return Evaluation.Owins;\n }\n } else {\n cell += rowRemaining;\n reference = '!';\n perfectMatch = 0;\n rowRemaining = 0;\n continue;\n }\n }\n rowRemaining--;\n }\n return Evaluation.NoWinner;\n }", "public char findWinner() {\n char[] winners = {\n checkRowVictory(getTopRow()),\n checkRowVictory(getMidRow()),\n checkRowVictory(getLowRow()),\n checkRowVictory(getVerticalMidRow()),\n checkRowVictory(getVerticalLeftRow()),\n checkRowVictory(getVerticalRightRow()),\n checkDiagonalVictory()\n };\n\n for (char winner : winners) {\n if (winner != 0) {\n return winner;\n }\n }\n\n return 0;\n }", "int checkGameWon(){\n int sx,sy,ex,ey;\n Point size = new Point();\n //get the size of current window\n Display display = getWindowManager().getDefaultDisplay();\n display.getSize(size);\n int width = size.x;\n int height = size.y;\n\n //win first row\n if (gameBoard[0] != 0 && gameBoard[0] == gameBoard[1] && gameBoard[0] == gameBoard[2]){\n sx = 0;\n sy =(int) (height * .30);\n\n ex = width;\n ey = (int) (height * .30);\n drawLine(sx,sy,ex,ey,imageView10);\n return gameBoard[0];\n }\n //win second row\n else if (gameBoard[3] != 0 && gameBoard[3] == gameBoard[4] && gameBoard[3] == gameBoard[5]){\n sx = 0;\n sy = (int) (height * .54);\n ex = width;\n ey = (int) (height * .54);\n\n drawLine(sx,sy,ex,ey,imageView10);\n return gameBoard[3];\n }\n //win third row\n else if (gameBoard[6] != 0 && gameBoard[6] == gameBoard[7] && gameBoard[6] == gameBoard[8]){\n sx = 0;\n sy = (int) (height * .77);\n\n ex = width;\n ey = (int) (height * .77);\n\n drawLine(sx,sy,ex,ey,imageView10);\n return gameBoard[6];\n }\n //win first colum\n else if (gameBoard[0] != 0 && gameBoard[0] == gameBoard[3] && gameBoard[0] == gameBoard[6]){\n sx = (int) (width *.15);\n sy = (int) (height * .18);\n ex = (int) (width * .15);\n ey=(int) (height * .89);\n\n drawLine(sx,sy,ex,sy,imageView10);\n return gameBoard[0];\n }\n //win second colum\n else if (gameBoard[1] != 0 && gameBoard[1] == gameBoard[4] && gameBoard[1] == gameBoard[7]){\n sx = (int) (width * .50);\n sy = (int) (height * .18);\n\n ex = (int) (width * .50);\n ey = (int) (height * .89);\n\n drawLine(sx,sy,ex,ey,imageView10);\n return gameBoard[1];\n }\n //win third colum\n else if (gameBoard[2] != 0 && gameBoard[2] == gameBoard[5] && gameBoard[2] == gameBoard[8]){\n sx = (int) (width * .85);\n sy = (int) (height * .18);\n\n ex = (int) (width * .85);\n ey = (int) (height * .89);\n\n drawLine(sx,sy,ex,ey,imageView10);\n return gameBoard[2];\n }\n else{\n //game not won\n return 0;\n }\n }", "public static void CheckWin(int matr[][],int posY,int posX){\n\t\t\tint temp;\n\t\t\t\n//************cerco orizzontali*****************ok\n\t\t\tSystem.out.println(posX);\n\t\t\t//se inserisco nella meta sx\n\t\t\tif (posX<4)\n\t\t\t{\n\t\t\t\tfor(int i=0;i<4;i++)\n\t\t\t\t{\n\t\t\t\t\ttemp =matr[posY][i];\n\t\t\t\t\tif(temp==matr[posY][i+1] && temp==matr[posY][i+2] && temp==matr[posY][i+3]){\n\t\t\t\t\t\tChihaVinto(temp);\n\t\t\t\t\t\tif(!win)System.out.println(\"orizzontale da sx verso dx\");\n\t\t\t\t\t\tbreak;}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t//se inserisco nella meta' dx\n\t\t\telse if (posX>=4){\n\t\t\t\tfor(int i=6;i>3;i--){\n\t\t\t\t\ttemp =matr[posY][i];\n\t\t\t\t\tif(temp==matr[posY][i-1] && temp==matr[posY][i-2] && temp==matr[posY][i-3]){\n\t\t\t\t\t\tChihaVinto(temp);\n\t\t\t\t\t\tif(!win)System.out.println(\"orizzontale da dx verso sx\");\n\t\t\t\t\t\tbreak;}}\n\t\t\t}\n\t\t\t\n//**********cerco verticale verso basso(posso fare 4 solo verso il basso)**********ok\n\t\t\tif(posY<=2 && win==true){\n\t\t\ttemp =matr[posY][posX];\n\t\t\t\tif (temp==matr[posY+1][posX] && temp==matr[posY+2][posX] && temp==matr[posY+3][posX]){\n\t\t\t\tChihaVinto(temp);\n\t\t\t\tif(!win){\n\t\t\t\t\tSystem.out.println(\"verticale\");\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\n\t\t\t//****************cazzooooooooooooooooooooo**************diagonali\n\t\t\tfor(int j=0;j<6;j++)\n\t\t\t{ if(!win)break;\n\t\t\t\tfor (int i=0;i<7;i++)\n\t\t\t\t{\n\t\t\t\t\ttemp=matr[j][i];\n\t\t\t\t\tif (temp != 0)\n\t\t\t\t\t{\t//basso sx\n\t\t\t\t\t\tif (j>2 && i<=3){\n\t\t\t\t\t\t\tif(temp==matr[j-1][i+1] && \n\t\t\t\t\t\t\t temp==matr[j-2][i+2] &&\n\t\t\t\t\t\t\t temp==matr[j-3][i+3]){\n\t\t\t\t\t\t\t\tChihaVinto(temp);\n\t\t\t\t\t\t\t\tif (!win)break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}//alto sx\n\t\t\t\t\t\telse if(j<=2 && i<=3){\n\t\t\t\t\t\t\tif (temp==matr[j+1][i+1] &&\n\t\t\t\t\t\t\t\ttemp==matr[j+2][i+2] &&\n\t\t\t\t\t\t\t\ttemp==matr[j+3][i+3]){\n\t\t\t\t\t\t\t\tChihaVinto(temp);\n\t\t\t\t\t\t\t\tif(!win)break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}//alto dx\n\t\t\t\t\t\telse if(j<=2 && i>=3){\n\t\t\t\t\t\t\tif (temp==matr[j+1][i-1] && \n\t\t\t\t\t\t\t\ttemp==matr[j+2][i-2] &&\n\t\t\t\t\t\t\t\ttemp==matr[j+3][i-3]){\n\t\t\t\t\t\t\t\tChihaVinto(temp);\n\t\t\t\t\t\t\t\tif(!win)break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}//basso dx\n\t\t\t\t\t\telse if(j>2 && i>=3){\n\t\t\t\t\t\t\tif (temp==matr[j-1][i-1] &&\n\t\t\t\t\t\t\t\ttemp==matr[j-2][i-2] &&\n\t\t\t\t\t\t\t\ttemp==matr[j-3][i-3]){\n\t\t\t\t\t\t\t\tChihaVinto(temp);\n\t\t\t\t\t\t\t\tif(!win)break;\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\t\n\t\t\t\n\t\t\tSystem.out.flush();\n\t\t}", "private boolean rowWin (){ \r\n\t\tfor (int i=0; i<3; i++){ \r\n\t\t\tif (checkValue (board[i][0], board[i][1], board[i][2])){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false; \r\n\t}", "public static void checkWinCondition() {\n\t\twin = false;\n\t\tif (curPlayer == 1 && arrContains(2, 4))\n\t\t\twin = true;\n\t\telse if (curPlayer == 2 && arrContains(1, 3))\n\t\t\twin = true;\n\t\tif (curPlayer == 2 && !gameLogic.Logic.arrContains(2, 4))\n\t\t\tP2P.gameLost = true;\n\t\telse if (gameLogic.Logic.curPlayer == 1 && !gameLogic.Logic.arrContains(1, 3))\n\t\t\tP2P.gameLost = true;\n\t\tif (P2P.gameLost == true) {\n\t\t\tif (gameLogic.Logic.curPlayer == 1)\n\t\t\t\tEndScreen.infoWindow.setText(\"<html><center><b><font size=25 color=black> Black player won! </font></b></center></html>\");\n\t\t\telse\n\t\t\t\tEndScreen.infoWindow.setText(\"<html><center><b><font size=25 color=black> Red player won! </font></b></center></html>\");\n\t\t}\n\t\telse\n\t\t\twin = false;\n\t}", "public boolean check2DColWinner(Cell play) {\n\t\tfor(int dim = 0; dim < board.length; dim++) { // for dim\n\t\t\tfor(int col = 0; col < board.length; col++) { // for col\n\t\t\t\tif(board[dim][0][col] == board[dim][1][col] && board[dim][1][col]==board[dim][2][col] && board[dim][2][col]==board[dim][3][col] && board[dim][3][col].equals(play)) { \n\t\t\t\t\t//\t\t\t\t\tSystem.out.println(\"Column win by \"+play.toString()+ \" at dim=\" + dim +\" & col= \" + col);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\n\t}", "private boolean winsByDiagonalTopLeftToBottomRight(char symbol){\n int max_diagonal_count = 0;\n\n // Deals with the diagonals below the midpoint in the array. Iterates through diagonals from last row to the\n // first row.\n for (int i = this.boardRows - 1; i > 0; i--) {\n\n // reset counter at each new diagonal\n int count = 0;\n\n // Iterates through the diagonal with origin (top left point) at first element of row i\n for (int j = 0, x = i; x < this.boardRows; j++, x++) {\n\n // If j surpasses the number of available cols we break out the inner for loop. This happens when the\n // num of rows and cols in the array are different\n if (j>=this.boardColumns){\n break;\n }\n // If char symbol is the same as the element in the diagonal, we increment counter by 1 and update\n // max_diagonal_count if possible.\n if(symbol == this.gameBoard[x][j]){\n count+=1;\n\n if (count>max_diagonal_count){\n max_diagonal_count=count;\n }\n }\n //Otherwise, we reset the counter to 0\n else {\n count = 0;\n }\n }\n }\n\n // Deals with the diagonals at and after the midpoint in the array. Iterates through diagonals from first column to the\n // last column\n for (int i = 0; i < this.boardColumns; i++) {\n\n // Resets counter for each new diagonal\n int count = 0;\n\n // Iterates through diagonal values with origin (top left point) at first element of col i\n for (int j = 0, y = i; y < this.boardColumns; j++, y++) {\n\n // If j surpasses the number of available cols we break out the inner for loop. This happens when the\n // num of rows and cols in the array are different\n if (j>=this.boardRows){\n break;\n }\n\n // If char symbol is the same as the element in the diagonal, we increment counter by 1 and update\n // max_diagonal_count if possible.\n if(symbol == this.gameBoard[j][y]){\n count+=1;\n\n if (count>max_diagonal_count){\n max_diagonal_count=count;\n }\n }\n //Otherwise, we reset the counter to 0\n else {\n count = 0;\n }\n }\n }\n\n // If the max_diagonal_count is greater than or equal to tilesNeeded, then we have sufficient tiles in a diagonal\n // for char symbol to win so we return true. Otherwise, we return false.\n if (max_diagonal_count >= this.tilesNeeded){\n return true;\n }\n else {\n return false;\n }\n\n }", "public static boolean horizontalJudge(String playerMarker, int playerRow, int playerColumn){\n\n boolean victoryFlag = false;\n int column = playerColumn;\n\n winList.add(column); // Store the player's latest move's column number\n int victoryCounter = 0;\n\n // Checking West from the point of player's latest move\n\n while ( column >= 0 && !victoryFlag ){\n\n column--;\n\n if ( column >=0 ){\n\n if ( gameBoard[playerRow][column].equals(playerMarker) ){\n winList.add(column); // If there is a same piece on the left of the current piece, store its coordinates\n victoryCounter++;\n\n if ( victoryCounter == 3 ){\n winList.add(playerRow); // Store the row in which the player has won\n victoryFlag = true;\n }\n }\n\n else{\n break;\n }\n }\n }\n\n // Checking East from the point of player's latest move\n\n column = playerColumn;\n\n while ( column < 7 && !victoryFlag ){\n\n column++;\n\n if ( column < 7 ){\n\n if ( gameBoard[playerRow][column].equals(playerMarker) ){\n winList.add(column); // If there is a same piece on the left of the current piece, store its coordinates\n victoryCounter++;\n\n if ( victoryCounter == 3 ){\n winList.add(playerRow); // Store the row in which the player has won\n victoryFlag = true;\n }\n }\n\n else{\n break;\n }\n }\n }\n\n if ( !victoryFlag ){\n winList.clear(); // in python: winList = [] #If no one won, reset the win list\n }\n\n return victoryFlag;\n }", "protected boolean checkForWin() {\r\n \t\r\n if (squaresRevealed == this.width * this.height - this.mines) {\r\n finishFlags();\r\n finish(GameStateModel.WON);\r\n return true;\r\n } \t\r\n \t\r\n return false;\r\n \t\r\n }", "private void checkWinner() {\n if (btn_0.getText() == \"X\" && btn_1.getText() == \"X\" && btn_2.getText() == \"X\") {\n Toast.makeText(MainActivity.this, \"Player One Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_1_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(blue);\n\n\n }\n if (btn_0.getText() == \"O\" && btn_1.getText() == \"O\" && btn_2.getText() == \"O\") {\n Toast.makeText(MainActivity.this, \"Player Two Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_2_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(red);\n }\n\n// Second Row Checker Boxes 3 , 4 , 5\n if (btn_3.getText() == \"X\" && btn_4.getText() == \"X\" && btn_5.getText() == \"X\") {\n Toast.makeText(MainActivity.this, \"Player One Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_1_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(blue);\n\n }\n if (btn_3.getText() == \"O\" && btn_4.getText() == \"O\" && btn_5.getText() == \"O\") {\n Toast.makeText(MainActivity.this, \"Player Two Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_2_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(red);\n }\n\n// Third Row Checker Boxes 6, 7, 8\n if (btn_6.getText() == \"X\" && btn_7.getText() == \"X\" && btn_8.getText() == \"X\") {\n Toast.makeText(MainActivity.this, \"Player One Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_1_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(blue);\n\n }\n if (btn_6.getText() == \"O\" && btn_7.getText() == \"O\" && btn_8.getText() == \"O\") {\n Toast.makeText(MainActivity.this, \"Player Two Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_2_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(red);\n }\n\n// 1st Column Checker Boxes 0, 3, 6\n if (btn_0.getText() == \"X\" && btn_3.getText() == \"X\" && btn_6.getText() == \"X\") {\n Toast.makeText(MainActivity.this, \"Player One Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_1_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(blue);\n }\n if (btn_0.getText() == \"O\" && btn_3.getText() == \"O\" && btn_6.getText() == \"O\") {\n Toast.makeText(MainActivity.this, \"Player Two Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_2_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(red);\n }\n\n// Second Column Checker 1, 4, 7\n if (btn_1.getText() == \"X\" && btn_4.getText() == \"X\" && btn_7.getText() == \"X\") {\n Toast.makeText(MainActivity.this, \"Player One Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_1_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(blue);\n }\n if (btn_1.getText() == \"O\" && btn_4.getText() == \"O\" && btn_7.getText() == \"O\") {\n Toast.makeText(MainActivity.this, \"Player Two Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_2_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(red);\n }\n\n// Third Row Checker 2 , 5 , 8\n if (btn_2.getText() == \"X\" && btn_5.getText() == \"X\" && btn_8.getText() == \"X\") {\n Toast.makeText(MainActivity.this, \"Player One Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_1_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(blue);\n }\n if (btn_2.getText() == \"O\" && btn_5.getText() == \"O\" && btn_8.getText() == \"O\") {\n Toast.makeText(MainActivity.this, \"Player Two Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_2_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(red);\n }\n// First Diagonal Checker 0 , 4, 8\n if (btn_0.getText() == \"X\" && btn_4.getText() == \"X\" && btn_8.getText() == \"X\") {\n Toast.makeText(MainActivity.this, \"Player One Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_1_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(blue);\n }\n if (btn_0.getText() == \"O\" && btn_4.getText() == \"O\" && btn_8.getText() == \"O\") {\n Toast.makeText(MainActivity.this, \"Player Two Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_2_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(red);\n }\n// Second Diagonal Checker 2, 4, 6\n if (btn_2.getText() == \"X\" && btn_4.getText() == \"X\" && btn_6.getText() == \"X\") {\n Toast.makeText(MainActivity.this, \"Player One Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_1_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(blue);\n }\n if (btn_2.getText() == \"O\" && btn_4.getText() == \"O\" && btn_6.getText() == \"O\") {\n Toast.makeText(MainActivity.this, \"Player Two Wins!!\", Toast.LENGTH_SHORT).show();\n disablingALLbuttons();\n player_2_score++;\n View color = this.getWindow().getDecorView();\n color.setBackgroundColor(red);\n }\n }", "public int getResult() {\n whiteTotal = 0;\n blackTotal = 0;\n rest = 0;\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int column = 0; column < BOARD_SIZE; column++) {\n if (board[row][column] == BLACK) {\n blackTotal++;\n } else if (board[row][column] == WHITE) {\n whiteTotal++;\n } else {\n rest++;\n }\n }\n }\n int winner = -1;\n if (rest == 0) {\n if (blackTotal < whiteTotal) {\n winner = 1;\n } else if (blackTotal > whiteTotal) {\n winner = 2;\n } else {\n winner = 0;\n }\n }\n\n if (blackTotal == 0 || whiteTotal == 0) {\n\n if (blackTotal != 0) {\n winner = 2;\n } else if (whiteTotal != 0) {\n winner = 1;\n }\n }\n\n if (getValidateMoveList('W', 'B').isEmpty() && getValidateMoveList('B', 'W').isEmpty()) {\n\n if (blackTotal < whiteTotal) {\n winner = 1;\n } else if (blackTotal > whiteTotal) {\n winner = 2;\n } else {\n winner = 0;\n }\n }\n return winner;\n }", "public Winner whoWins(){\r\n\r\n /* transfer the matrix to an array */\r\n Sign[] flatBoard = flattenBoard();\r\n\r\n /* check if someone has won */\r\n if (CompPlayer.compWon(flatBoard))\r\n return Winner.COMPUTER;\r\n else if (CompPlayer.playerWon(flatBoard))\r\n return Winner.PLAYER;\r\n else\r\n return Winner.NON;\r\n }", "private int[] nextDiagWin(){ \r\n\t\t//left diagonal\r\n\t\tif (board[0][0] == board[1][1] && board[2][2] == '-' && board[0][0] != '-'){\r\n\t\t\tdiagWin[0] = 2; \r\n\t\t\tdiagWin[1] = 2;\r\n\t\t\treturn diagWin;\r\n\t\t}\r\n\t\telse if (board[1][1] == board[2][2] && board[0][0] == '-' && board[1][1] != '-'){\r\n\t\t\tdiagWin[0] = 0; \r\n\t\t\tdiagWin[1] = 0;\r\n\t\t\treturn diagWin;\r\n\t\t}\r\n\t\telse if (board[0][0] == board[2][2] && board[1][1] == '-' && board[0][0] != '-'){\r\n\t\t\tdiagWin[0] = 1; \r\n\t\t\tdiagWin[1] = 1;\r\n\t\t\treturn diagWin;\r\n\t\t}\r\n\t\t//right diagonal\r\n\t\telse if (board[0][2] == board[2][0] && board[1][1] == '-' && board[0][2] != '-'){\r\n\t\t\tdiagWin[0] = 1; \r\n\t\t\tdiagWin[1] = 1;\r\n\t\t\treturn diagWin;\r\n\t\t}\r\n\t\telse if (board[0][2] == board[1][1] && board[2][0] == '-' && board[0][2] != '-'){\r\n\t\t\tdiagWin[0] = 2; \r\n\t\t\tdiagWin[1] = 0;\r\n\t\t\treturn diagWin;\r\n\t\t}\t\t\r\n\t\telse if (board[1][1] == board[2][0] && board[0][2] == '-' && board[1][1] != '-'){\r\n\t\t\tdiagWin[0] = 0; \r\n\t\t\tdiagWin[1] = 2;\r\n\t\t\treturn diagWin;\r\n\t\t}\r\n\t\treturn diagWin;\r\n\t}", "private Boolean win(int counter) {\n \n winner = false;\n //if the counter is greater than 8, recognizes that it is a draw\n if (counter >= 8) {\n announce.setText(\"Draw\");\n turn.setText(\"\"); //game ends and is no ones turn\n }\n //list of all of the winning options\n if ((tBoard[0] == tBoard[1] && tBoard[1] == tBoard[2] && tBoard[0] != 2)\n || (tBoard[0] == tBoard[3] && tBoard[3] == tBoard[6] && tBoard[0] != 2)\n || (tBoard[3] == tBoard[4] && tBoard[4] == tBoard[5] && tBoard[3] != 2)\n || (tBoard[6] == tBoard[7] && tBoard[7] == tBoard[8] && tBoard[6] != 2)\n || (tBoard[1] == tBoard[4] && tBoard[4] == tBoard[7] && tBoard[1] != 2)\n || (tBoard[2] == tBoard[5] && tBoard[5] == tBoard[8] && tBoard[2] != 2)\n || (tBoard[0] == tBoard[4] && tBoard[4] == tBoard[8] && tBoard[0] != 2)\n || (tBoard[2] == tBoard[4] && tBoard[4] == tBoard[6] && tBoard[2] != 2)) {\n //if counter is even then recognizes that it is the person who has the X symbol and knows that X won \n if (counter % 2 == 0) {\n announce.setText(\"X is the Winner\"); //announces that X has won\n turn.setText(\"\"); //no ones turn anymore\n } //if it is not X, O has won the game and recognizes\n else {\n announce.setText(\"O is the Winner\"); //announces that O has won\n turn.setText(\"\"); //no ones turn anymore\n\n }\n //winner is set to true and stops allowing user to press other squares through pressed method\n winner = true;\n\n }\n //returns winner\n return winner;\n\n }" ]
[ "0.8355466", "0.8202147", "0.8124377", "0.80766857", "0.8049892", "0.8047858", "0.8018693", "0.79194015", "0.7919009", "0.7856255", "0.7839731", "0.78164583", "0.7724716", "0.7713505", "0.76954764", "0.7672909", "0.766996", "0.76628447", "0.75997794", "0.75975806", "0.7584625", "0.7568575", "0.7524761", "0.7512525", "0.75080657", "0.7496476", "0.7369813", "0.736761", "0.736313", "0.73521924", "0.7350515", "0.73408353", "0.73303545", "0.73250717", "0.73065555", "0.7295046", "0.7280108", "0.72787493", "0.7277492", "0.72772974", "0.7245405", "0.7241778", "0.71887034", "0.71812004", "0.71684647", "0.7166241", "0.7147944", "0.7145202", "0.7141804", "0.7118521", "0.71179295", "0.7094954", "0.70800143", "0.7055687", "0.70375234", "0.70298314", "0.7029463", "0.6999309", "0.6996784", "0.69947684", "0.6989557", "0.69764596", "0.69760346", "0.6964421", "0.6963007", "0.6959882", "0.6953571", "0.69515246", "0.68923753", "0.6892021", "0.6885147", "0.68824804", "0.68785655", "0.6878072", "0.68742573", "0.6866567", "0.6849541", "0.6845786", "0.683996", "0.6836567", "0.6831766", "0.6828944", "0.68208873", "0.6808611", "0.6807905", "0.67962533", "0.67652684", "0.67572176", "0.67543626", "0.67511666", "0.6747086", "0.67426604", "0.6742653", "0.67400074", "0.6739583", "0.6732321", "0.6730169", "0.67244065", "0.671935", "0.6718535" ]
0.75772953
21
If game is tied, lets players know game is tied and asks user if they want to play again or return back to Main Menu
public void tie() { for (int n = 0; n < 6; n++) { for (int m = 0; m < 7; m++) { squares[n][m].setEnabled(false); } } for (int a = 0; a < 7; a++) { buttons[a].setEnabled(false); } int result = JOptionPane.showConfirmDialog(null, " TIE GAME! No winner Found! Do you want to start a new game?", null, JOptionPane.YES_NO_OPTION); if (result == JOptionPane.YES_OPTION) { gameReset(); } else if (result == JOptionPane.NO_OPTION) { JOptionPane.showMessageDialog(null, " Click Ok to return to Main Menu"); JFrame backToMenu = new JFrame("Main Menu"); backToMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); backToMenu.getContentPane().add(new MainMenu()); backToMenu.pack(); backToMenu.setSize(750, 650); backToMenu.setVisible(true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void continueGame() {\n System.out.println(\"\\n\" + \"Do you want to play more games or quit?\\n\" + \"1. Lotto\\n\" + \"2. Small Lotto\\n\" + \"3. Quit\");\n input = scanner.next();\n changeGame();\n }", "private static void gameOver() {\n\t\tSystem.out.println(\"Would you like to play again?\");\n\t\tinput.nextLine();\n\t\tuserInput = input.nextLine();\n\t\tif(userInput.contains(\"yes\")||userInput.equals(\"y\"))\n\t\t{\n\t\t\tgame();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Stay golden.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void myTurn()\n\t{\n\t\t\n\t\tif (canPlay())\n\t\t{\n\t\t\tif (isTop())\n\t\t\t{\n\t\t\t\traise();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tequal();\n\t\t\t}\n\t\t}\n\t\ttable.nextPlayer();\n\t\t\n\t}", "public void displayMessage()\n{\n // game should continue\n if ( gameStatus == CONTINUE )\n showStatus( \"Roll again.\" );\n\n // game won or lost\n else {\n\n if ( gameStatus == WON )\n showStatus( \"Player wins. \" +\n \"Click Roll Dice to play again.\" );\n else \n showStatus( \"Player loses. \" + \n \"Click Roll Dice to play again.\" );\n \n // next roll is first roll of new game\n firstRoll = true; \n }\n}", "@Override\n public void play() {\n quest();\n if ((int) (Math.random() * 10) % 2 == 0) {\n won = true;\n System.out.println(\"You beat the last quest!\");\n } else {\n System.out.println(\"There are many more adventures for you, young warrior\");\n }\n }", "public void win() {\n JOptionPane.showConfirmDialog(null, \"You won! You got out with \" + this.player.getGold() + \" gold!\", \"VICTORY!\", JOptionPane.OK_OPTION);\n this.saveScore();\n this.updateScores();\n this.showTitleScreen();\n }", "public void surrender() {\n playerCash += playerBet / 2;\n\n //Play dealer's turn\n dealerTurn();\n\n //End the game and change the views\n restartGame();\n }", "private void playGame() {\n\t\t\n\t\t/* take 1$ from the wallet to play game */\n\t\tsetWallet(-1);\n\t\t\n\t\t/* generate 3 random slots */\n\t\tslot1 = getSlot();\n\t\tslot2 = getSlot();\n\t\tslot3 = getSlot();\n\t\tslotBox1 = getSlotBox(slot1);\n\t\tslotBox2 = getSlotBox(slot2);\n\t\tslotBox3 = getSlotBox(slot3);\n\t\t\n\t\t/* draw slots on the screen and compute result*/\n\t\tadd(slotBox1, 100, 100);\n\t\tadd(slotBox2, 250, 100);\n\t\tadd(slotBox3, 400, 100);\n\t\t\n\t\tString result = gameOutcome(slot1, slot2, slot3);\n\t\ttopText = new GLabel(result);\n\t\tmidText = new GLabel(\"You now have \" + getWallet() + \"$.\");\n\t\tbotText = new GLabel(\"Click to play\");\n\t\ttopText.setFont(\"Serif-24\");\n\t\tmidText.setFont(\"Serif-24\");\n\t\tbotText.setFont(\"Serif-24\");\n\t\tadd(topText, 100, 250);\n\t\tadd(midText, 100, 280);\n\t\tadd(botText, 100, 310);\n\n\t}", "private void newGame() \n {\n int input = JOptionPane.showConfirmDialog(null, \"Would you like to play again?\\n\",\"Game has ended\",JOptionPane.YES_NO_OPTION);\n if (input == JOptionPane.NO_OPTION){\n JOptionPane.showMessageDialog(null, \"Thank you for playing! \\n\\nBye Bye!\",\"Game Over\", JOptionPane.PLAIN_MESSAGE);\n System.exit(0);\n }\n else if (input == JOptionPane.YES_OPTION){\n isFirst = false;\n init();\n gameLogic();\n }\n }", "public void round(){\n if (player2.getName().equals(\"Computer\")) {\n battle(JOptionPane.showInputDialog(\"Player 1 enter: paper; rock; or scissors\"),\n new Computer().choice());\n } else {\n battle(JOptionPane.showInputDialog(\"Player 1 enter: paper; rock; or scissors\"),\n JOptionPane.showInputDialog(\"Player 2 enter: paper; rock; or scissors\"));\n }\n }", "public void winDialog() {\n\n\t\tif (JOptionPane.showOptionDialog(null,\n\t\t\t\t\"Player \" + playerTurn\n\t\t\t\t\t\t+ \" created a SAP and wins the game! Congratulations!\\nWould you like to play again?\",\n\t\t\t\t\"Game Over\", 0, JOptionPane.PLAIN_MESSAGE, null, options, options[0]) == JOptionPane.YES_OPTION) {\n\t\t\trestartGame();\n\t\t} else {\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t}", "void askStartGame();", "public static void interactivePlay() {\r\n\t\tint[][] board = createBoard();\r\n\t\tshowBoard(board);\r\n\r\n\t\tSystem.out.println(\"Welcome to the interactive Checkers Game !\");\r\n\r\n\t\tint strategy = getStrategyChoice();\r\n\t\tSystem.out.println(\"You are the first player (RED discs)\");\r\n\r\n\t\tboolean oppGameOver = false;\r\n\t\twhile (!gameOver(board, RED) && !oppGameOver) {\r\n\t\t\tboard = getPlayerFullMove(board, RED);\r\n\r\n\t\t\toppGameOver = gameOver(board, BLUE);\r\n\t\t\tif (!oppGameOver) {\r\n\t\t\t\tEnglishCheckersGUI.sleep(200);\r\n\r\n\t\t\t\tboard = getStrategyFullMove(board, BLUE, strategy);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint winner = 0;\r\n\t\tif (playerDiscs(board, RED).length == 0 | playerDiscs(board, BLUE).length == 0){\r\n\t\t\twinner = findTheLeader(board);\r\n\t\t}\r\n\r\n\t\tif (winner == RED) {\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\"\\t *************************\");\r\n\t\t\tSystem.out.println(\"\\t * You are the winner !! *\");\r\n\t\t\tSystem.out.println(\"\\t *************************\");\r\n\t\t}\r\n\t\telse if (winner == BLUE) {\r\n\t\t\tSystem.out.println(\"\\n======= You lost :( =======\");\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"\\n======= DRAW =======\");\r\n\t}", "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 }", "public void haveGo(int roundsTaken)\n {\n int diceRolls = 0;\n boolean madeChoice = false;\n\n while(diceRolls <= 1){\n ArrayList<Integer> diceRoll = new ArrayList<Integer>();\n boolean firstMove = false;\n boolean secondMove = true;\n\n if(diceRolls == 0){\n //Roll dice cleanly and print related information\n System.out.println(\"\\n\\t--------------------------\\n\\t\" + this.name + \"'s Go!\\n\\t--------------------------\\n\\nRoll One...\");\n diceRoll = dice.cleanRoll();\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n\n }\n else if(diceRolls == 1)\n {\n //Roll dice based on previous preferences\n System.out.println(\"\\nRoll Two...\");\n diceRoll = dice.roll();\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n secondMove = false;\n firstMove = true;\n }\n //Make first action\n while(!firstMove)\n {\n boolean repeat = false;\n //Print Menu\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\\n\\t4) Clean Roll\");\n System.out.println(\"\\t--------------------------\\n\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,5);\n if(choice == 0)\n {\n //Update and send GameFinisher variables to save\n scorecard.update();\n scorer.update();\n gameFinisher.exitSequence(filename,name, diceRoll, saveString,roundsTaken, 1);\n }\n else if(choice == 3)\n {\n //Print Scorecard\n System.out.println(\"\\n*********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n repeat = true;\n }\n\n else if(choice == 4)\n {\n //Cleanly Roll Dice\n diceRolls++;\n firstMove = true;\n }\n else if(choice == 2)\n {\n //Print Possibilities\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n repeat =true;\n }\n else if(choice == 1)\n {\n //Fill a Row\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"\\nRow to Fill...\");\n int category = GameManager.makeValidChoice(-1,14);\n scorer.findPossibilities(diceRoll, scorecard.getFreeCategories());\n //Check category isnt already filled\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n //Set row to be filled and add score\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) \n {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n\n }\n diceRolls = 2;\n firstMove = true;\n secondMove = true;\n madeChoice = true;\n }\n else\n {\n System.out.println(\"Something's gone very wrong, you shouldn't be here...\");\n repeat = true;\n }\n if(repeat){\n if(diceRolls == 0){\n System.out.println(\"Roll One...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"Roll Two...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n }\n }\n\n while(!secondMove)\n {\n boolean repeat = false;\n //Print Menu \n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\\n\\t4) Clean Roll\\n\\t5) Hold and Roll Dice\");\n System.out.println(\"\\t--------------\\n\");\n System.out.println(\"Enter Choice...\");\n\n int choice = GameManager.makeValidChoice(-1,6);\n\n if(choice == 0)\n {\n //Update and send GameFinisher variables to save\n gameFinisher.exitSequence(filename, name, diceRoll, saveString,roundsTaken, 2);\n }\n else if(choice == 3)\n {\n //Print Scorecard\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n repeat = true;\n }\n else if(choice == 5)\n {\n //Get Holdings preferences from Player\n System.out.println(\"\\n\\t--------------------------\");\n System.out.println(\"\\tDice Holder\\n\\t-----\\n\\t[0) Leave [1) Hold\");\n System.out.println(\"\\t--------------------------\\n\");\n System.out.println(diceRoll);\n System.out.println(\"---------------\");\n System.out.print(\"[\" + diceRoll.get(0) + \"]\");\n boolean one = toHold();\n System.out.print(\"[\" + diceRoll.get(1) + \"]\");\n boolean two = toHold();\n System.out.print(\"[\" + diceRoll.get(2) + \"]\");\n boolean three = toHold();\n System.out.print(\"[\" + diceRoll.get(3) + \"]\");\n boolean four = toHold();\n System.out.print(\"[\" + diceRoll.get(4) + \"]\");\n boolean five = toHold();\n //Send Preferences to Dice()\n ArrayList<Boolean> newState = new ArrayList<Boolean>();\n newState.add(one);\n newState.add(two);\n newState.add(three);\n newState.add(four);\n newState.add(five);\n dice.setDiceHoldState(newState);\n System.out.println(\"\\n\\t--------------------------\\n\\tDice Held\\n\\t-----\\n\\tRolling Dice...\\n\\t--------------------------\");\n diceRolls++;\n secondMove = true;\n }\n else if(choice == 4)\n {\n //Cleanly Roll Dice\n diceRolls++;\n secondMove = true;\n madeChoice = false;\n }\n else if(choice == 2)\n {\n //Print Possibilities\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n repeat =true;\n }\n else if(choice == 1)\n {\n //Fill a Row\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"What row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n //Check category isnt already filled\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n //Set row to be filled and add score\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n diceRolls = 2;\n repeat = false;\n secondMove = true;\n madeChoice = true;\n }\n else\n {\n System.out.println(\"Something's gone very wrong, you shouldn't be here...\");\n repeat = true;\n }\n\n if(repeat){\n if(diceRolls == 0){\n System.out.println(\"Roll One...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"Roll Two...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n\n }\n }\n }\n ArrayList<Integer> diceRoll = dice.roll(); \n while(!madeChoice)\n {\n System.out.println(\"\\nFinal Roll...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n //Print Menu\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,4);\n if(choice == 0)\n {\n //Update and send GameFinisher variables to save\n gameFinisher.exitSequence(filename, name, diceRoll, saveString, roundsTaken, 3);\n }\n else if(choice == 3)\n {\n //Print Scorecard\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n }\n\n else if(choice == 2)\n {\n //Print Possibilities\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n }\n else if(choice == 1)\n {\n //Fill a Row\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"What row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n //Check category isnt already filled\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n //Set row to be filled and add score\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n }\n }\n }", "public void playGame()\n\t{\n\t\t// Playing a new round; increase round id\n\t\troundId += 1;\n\n\t\tint diceRoll = 1 + dice.nextInt(6);\n\t\t\n\t\tif(diceRoll <= 3)\n\t\t{\n\t\t\tbranchId = 0;\n\t\t\tresult = 0;\n\t\t\tSystem.out.println(\"Roll = \" + diceRoll + \", result = 0\");\n\t\t\tsendMessage(diceRoll, roundId, branchId, result);\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbranchId = 1;\n\t\t\tresult = 6;\n\t\t\tSystem.out.println(\"Roll = \" + diceRoll + \", result = 6\");\n\t\t\tsendMessage(diceRoll, roundId, branchId, result);\t\t\t\t\n\t\t}\n\t\t\n\t}", "private boolean PlayAgain() {\n int choice = Main.HandleInput(\"Play Again\", 2);\n if (choice == 1){\n ResetGame();\n return true;\n }\n else{\n return false;\n }\n }", "private void doMatch() {\n // Remember how many games in this session\n mGameCounter++;\n\n PebbleDictionary resultDict = new PebbleDictionary();\n\n switch (mChoice) {\n case Keys.CHOICE_ROCK:\n switch(mP2Choice) {\n case Keys.CHOICE_ROCK:\n mInstructionView.setText(\"It's a tie!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_TIE);\n break;\n case Keys.CHOICE_PAPER:\n mInstructionView.setText(\"You lose!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_WIN); // Inform Pebble of opposite result\n break;\n case Keys.CHOICE_SCISSORS:\n mWinCounter++;\n mInstructionView.setText(\"You win! (\" + mWinCounter + \" of \" + mGameCounter + \")\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_LOSE);\n break;\n }\n break;\n case Keys.CHOICE_PAPER:\n switch(mP2Choice) {\n case Keys.CHOICE_ROCK:\n mWinCounter++;\n mInstructionView.setText(\"You win! (\" + mWinCounter + \" of \" + mGameCounter + \")\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_LOSE);\n break;\n case Keys.CHOICE_PAPER:\n mInstructionView.setText(\"It's a tie!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_TIE);\n break;\n case Keys.CHOICE_SCISSORS:\n mInstructionView.setText(\"You lose!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_WIN);\n break;\n }\n break;\n case Keys.CHOICE_SCISSORS:\n switch(mP2Choice) {\n case Keys.CHOICE_ROCK:\n mInstructionView.setText(\"You lose!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_WIN);\n break;\n case Keys.CHOICE_PAPER:\n mWinCounter++;\n mInstructionView.setText(\"You win! (\" + mWinCounter + \" of \" + mGameCounter + \")\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_LOSE);\n break;\n case Keys.CHOICE_SCISSORS:\n mInstructionView.setText(\"It's a tie!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_TIE);\n break;\n }\n break;\n }\n\n // Inform Pebble of result\n PebbleKit.sendDataToPebble(getApplicationContext(), APP_UUID, resultDict);\n\n // Finally reset both\n mChoice = Keys.CHOICE_WAITING;\n mP2Choice = Keys.CHOICE_WAITING;\n\n // Leave announcement for 5 seconds\n mHandler.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n updateUI();\n }\n\n }, 5000);\n }", "public void GameWin () {\n\t\t\n\t\twordDashes.setText(mysteryWord);\n\t\tguessBttn.setVisible(false);\n\t\tguessFullWord.setVisible(false);\n\t\tAnswerBox.setDisable(true); //can no longer use the text box\n\t\tresultMessage.setText(\" Great Job!!\\nYou Guessed the Word!!\");\n\t\tplayAgain.setVisible(true); \n\t\t\n\t}", "public void winGame() {\n this.isWinner = true;\n }", "public void doComputerTurn() {\n Random rand = new Random();\n int randInt;\n\n if (!currentPlayer.isEmployed()) { // player not employed\n // moves (but suppresses popups) at random and update of player panel\n tryMove();\n\n if (!(currentPlayer.getLocation().getName() == \"trailer\")) {\n if (currentPlayer.getLocation().getName() == \"office\") { // in office\n // upgrade (but suppresses popups) at random and update of player panel\n tryUpgrade();\n \n } else { // in regular set\n // take role (but suppresses popups) at random and update of player panel\n tryTakeRole();\n }\n }\n endTurn();\n } else { // player is employed\n randInt = rand.nextInt(2); // get either 0 or 1\n if (randInt == 0) {\n // rehearse\n tryRehearse(); \n } else {\n // act\n tryAct();\n }\n\n endTurn();\n }\n }", "public void playGame() {\n show();\n while (gameStatus) {\n if (canPut(players.get((state.getTurn())))) {\n int choice = -1;\n while (gameStatus) {\n choice = controls.get(state.getTurn()).putCard(currentCard);\n if (validInput(players.get((state.getTurn())), choice)) {\n System.out.println(players.get(state.getTurn()).getCards().get(choice).toString());\n try{Thread.sleep(1000);}catch(InterruptedException ignored){}\n break;\n }\n }\n decide(players.get(state.getTurn()), players.get(state.getTurn()).getCards().get(choice));\n }\n try{Thread.sleep(500);}catch(InterruptedException ignored){}\n checkFinish();\n if (gameStatus) {\n state.nextTurn();\n show();\n }\n }\n }", "void playMatch() {\n while (!gameInformation.checkIfSomeoneWonGame() && gameInformation.roundsPlayed() < 3) {\n gameInformation.setMovesToZeroAfterSmallMatch();\n playSmallMatch();\n }\n String winner = gameInformation.getWinner();\n if(winner.equals(\"DRAW!\")){\n System.out.println(messageProvider.provideMessage(\"draw\"));\n }else {\n System.out.println(messageProvider.provideMessage(\"winner\")+\" \"+winner+\"!\");\n }\n }", "public void play() {\n shuffleAndDeal();\r\n\r\n while (true) {\r\n if (whoseTurn == 'P') {\r\n whoseTurn = takeTurn(false);\r\n\r\n if (player1.findAndRemoveBooks()) {\r\n System.out.println(\"PLAYER 1: Oh, that's a book!\");\r\n showBooks(false);\r\n }\r\n } else if (whoseTurn == 'C') {\r\n whoseTurn = takeTurn(true);\r\n\r\n if (player2.findAndRemoveBooks()) {\r\n System.out.println(\"PLAYER 2: Oh, that's a book!\");\r\n showBooks(true);\r\n }\r\n }\r\n\r\n // the games doesn't end until all 13 books are completed. the player with the\r\n // most books at the end of the game wins.\r\n\r\n if (player1.getBooks().size() + player2.getBooks().size() == 13) {\r\n if (player1.getBooks().size() > player2.getBooks().size()) {\r\n System.out.println(\"\\nCongratulations PLAYER 1, you win!\");\r\n } else {\r\n System.out.println(\"\\nCongratulations PLAYER 2, you win!\");\r\n }\r\n break;\r\n }\r\n }\r\n }", "public static void decidedWinner(){\n if(playerOneWon == true ){\n//\n// win.Fill(\"Player One Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else if (playerTwoWon == true){\n// win.Fill(\"Player Two Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else\n {\n// win.Fill(\"Match Has been Tied !\");\n// new WinnerWindow().setVisible(true);\n }\n }", "private void playerTurns()\r\n\t{\r\n\t\t// Setting up user input\r\n\t\tScanner key = new Scanner(System.in);\r\n\t\tString choice = \"\";\r\n\t\t\r\n\t\t// continues turn until win/loss or player chooses to stand\r\n\t\twhile ( !player1.getStand() && !endGame )\r\n\t\t{\r\n\t\t\t// Promps user for input\r\n\t\t\tSystem.out.println(\"Do you wish to hit or stand? (1 = Hit, 2 = Stand)\");\r\n\t\t\t\r\n\t\t\t// Accepts user input as string\r\n\t\t\tchoice = key.nextLine();\r\n\t\t\t\r\n\t\t\t// Only accepts input of 1 or 2\r\n\t\t\tif (choice.equals(\"1\"))\r\n\t\t\t{\r\n\t\t\t\t// adds card to player1 hand from cardDeck object\r\n\t\t\t\tSystem.out.println(\"Hitting...\");\r\n\t\t\t\tplayer1.hit( cardDeck.draw() );\r\n\t\t\t}\r\n\t\t\telse if (choice.equals(\"2\"))\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Passing...\");\r\n\t\t\t\tplayer1.stand();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"That input was not recognized.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// displays current player hand\r\n\t\t\tdisplayPlayerCards(PLAYER1_ID);\r\n\t\t\t\r\n\t\t\t// evaluates win conditions\r\n\t\t\tevaluateWin(false);\r\n\t\t} // end while\r\n\t}", "private void showTurn()\n {\n if( PlayerOneTurn == true )\n {\n if( messageShown == false )\n {\n JOptionPane.showMessageDialog( null, playerOneName + \"it is your turn.\", \"for playerOne\", JOptionPane.PLAIN_MESSAGE );\n \n }\n }\n else\n {\n if( messageShown == false )\n {\n JOptionPane.showMessageDialog( null, playerTwoName + \"it is your turn.\", \"for playerTwo\", JOptionPane.PLAIN_MESSAGE );\n \n }\n }\n }", "private void promptPlayerTurn(Player player) {\r\n JOptionPane.showMessageDialog(\r\n null,\r\n player.getName() + \", it's your turn!\",\r\n \"Player Confirmation\",\r\n JOptionPane.INFORMATION_MESSAGE);\r\n }", "public void rightGuess()\r\n\t{\r\n\t\tif(userWon())\r\n\t\t{\r\n\t\t\tSystem.out.println(PLAYER_WIN);\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"good job! you've correctly guessed the panel \\n would you like to guess again? if so enter yes, if you would like to add your tile to your code, reply no\\n\\n\");\r\n\t\tString answer = sc.next();\r\n\t\tif(answer.compareTo(\"yes\") == 0 || answer.compareTo(\"Yes\") == 0)\r\n\t\t{\r\n\t\t\tuserTurn(false);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(userRanPan.getValue() == -1)\r\n\t\t\t\tnewGame.getUserHand().addDash(false,userRanPan);\r\n\t\t\telse\r\n\t\t\t\tnewGame.getUserHand().addPanel(userRanPan,false);\r\n\r\n\t\t\tuserGuess.clear();\r\n\t\t\tslide(previousGuess,userRanPan);\r\n\r\n\t\t\tif(userWon() == false)\r\n\t\t\t\tcompTurn(false);\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(PLAYER_WIN);\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//foo.repaint();\r\n\t}", "public void playAgain();", "public void resign(){\n\t\tif(Main.getInstance().getScreen() instanceof GEngine){\r\n\t\t\tPlayer user = getUserPlayer();\r\n\t\t\tPlayer winner = state.players[user.playerId == 0 ? 1 : 0];\r\n\t\t\t\r\n\t\t\tnew Popup(\"Game over\", true,\r\n\t\t\t\tnew Label(String.format(\"Player %s has won the game!\", winner.getDisplayName()), Assets.SKIN), \r\n\t\t\t\tComponentFactory.createButton(\"OK\", new ClickListener() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void clicked(InputEvent event, float x, float y) {\r\n\t\t\t\t\t\tMain.getInstance().setScreen(MainMenu.getInstance());\r\n\t\t\t\t\t\tPopup.getCurrentPopup().close();\r\n\t\t\t\t\t}\r\n\t\t\t\t})).show();\r\n\t\t}\r\n\t\t\r\n\t\tMain.getInstance().games.endGame(this);\r\n\t}", "public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }", "private static void updateGame()\n {\n GameView.gameStatus.setText(\"Score: \" + computerScore + \"-\" + playerScore);\n if (computerScore + playerScore == NUM_CARDS_PER_HAND) {\n if (computerScore > playerScore) {\n GameView.gameText.setText(\"Computer Wins!\");\n Timer.stop = true;\n }\n else if (playerScore > computerScore) {\n GameView.gameText.setText(\"You win!\");\n Timer.stop = true;\n }\n else {\n GameView.gameText.setText(\"Tie game!\"); \n Timer.stop = true;\n }\n }\n }", "static void setCurrentPlayer()\n {\n System.out.println(\"Name yourself, primary player of this humble game (or type \\\"I suck in life\\\") to quit: \");\n\n String text = input.nextLine();\n\n if (text.equalsIgnoreCase(\"I suck in life\"))\n quit();\n else\n Player.current.name = text;\n }", "public void winner(){\n System.out.println();\n System.out.println(\"You are the winner.!!!CONGRATULATIONS!!!.\");\n System.exit(1); // Close the game\n }", "private static void continueGame()\r\n\t{\r\n\t\tString name = \"\";\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tname = scan(\"Write the name of your game: \");\r\n\t\t\t\r\n\t\t\tif(GameManager.instance().players().contains(name)) break;\r\n\t\t}\r\n\t\t\r\n\t\tGameManager.instance().setCurrentPlayer(name);\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tGameManager.instance().loadGame();\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e)\r\n\t\t{\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\t//e.printStackTrace();\r\n\t\t\tSystem.out.println(\"Something happened\");\r\n\t\t}\r\n\t}", "private void gameOver() {\r\n timer.stop();\r\n if (JOptionPane.showConfirmDialog(this, \r\n \"Game Over!\\nDo you want to play again?\",\r\n FORM_TITLE,JOptionPane.YES_NO_OPTION) == \r\n JOptionPane.YES_OPTION) {\r\n startGame();\r\n }\r\n else { \r\n close();\r\n }\r\n }", "public void playGame(Player player) {\n super.player = player;\n\n allTumblers.add(tum1);\n allTumblers.add(tum2);\n allTumblers.add(tum3);\n\n if(!typeOfSlotsChosen) {\n int whichSlots = Display.getIntPrompt(\"Choose 5 Tumblers or 3 Tumblers: \");\n typeOfSlotsChosen = true;\n if (whichSlots == 3) {\n Slots3 slots3 = new Slots3();\n slots3.playGame(player);\n stopPlayingSlots = true;\n }\n }\n /**\n * While loop to repeat the process\n */\n while (!stopPlayingSlots) {\n resetPotandWins();\n betPlaced = false;\n while (!betPlaced) {\n double currentBet = Display.getDoublePrompt(\"How much are you betting?: \");\n if (checkAmountInPurse(player, currentBet)) {\n placeBet(player, currentBet);\n removeMoneyFromPurse(player, currentBet);\n betPlaced = true;\n\n } else {\n Display.showMessage(\"You're broke Nurudeen is escorting you to the ATM\");\n stopPlayingSlots = true;\n typeOfSlotsChosen = false;\n break;\n }\n\n shuffle();\n sendDisplayResultsAll();\n checkToSeeIfPlayerWon();\n checkNumOfPaylines();\n if (numOfPaylines > 0) {\n Display.showMessage(\"You won!! \" + winnings);\n }\n addMoneytoPurse(player, winnings);\n Display.showMessage(\"You have \"+player.getPurse()+\" dollars left in your purse\\n\");\n String choice = Display.getStringPrompt(\"Are you done playing (yes or no)?: \");\n stopPlayingSlots = stopGame(choice);\n }\n }\n }", "public void win() {\n displayErrorMessage(\"You Win!\");\n if(controller.aiGame && !controller.loggedIn()){\n controller.switchToLogin();\n }\n else\n controller.switchToLobby();\n }", "public void lostGame(){\n\t\tSystem.out.println(\"Schade, du hast verloren. Möchtest du es noch einmal versuchen?\");\n\t\tif(!singleplayer){\n\t\t\tif(player.getLifes() == 0){\n\t\t\t\tSystem.out.println(\"Spieler 2 gewinnt!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Spieler 1 gewinnt!\");\n\t\t\t}\n\t\t\n\t\t}\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 0;\n\t\tpaintMenu();\n\t}", "public static String checkPlayFirst() {\r\n\t int randomNumber = (int) Math.floor(Math.random() * 10) % 2;\r\n\t String player = \"\";\r\n\t if ( randomNumber == 0)\r\n\t player = \"Computer\";\r\n\t else\r\n\t player = \"User\";\r\n\r\n\t return player;\r\n\t }", "@Override\n public void RageQuit() {\n //They won't have a score\n timer.stopTimer();\n\n if (view.confirmRageQuit()){\n // Punish them!\n DesktopAudio.getInstance().playPunish();\n grid = game.getSolved();\n for (int i = 0; i < 9; i++){\n for (int j = 0; j < 9; j++){\n view.setGiven(i, j, grid.getNumber(i, j));\n }\n }\n if (view.confirmNewGame()){\n setNextGame();\n }\n }else{\n timer.startTimer();\n }\n }", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "public void wonGame(){\n\t\tSystem.out.println(\"Bravo, du hast gewonnen! Möchtest du noch einmal spielen?\");\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 1;\n\t\tpaintMenu();\n\t}", "void gameResumed();", "public void playRollingADie() {\n\t\tSystem.out.print(\"The pirates ask you to play 'Rolling a Die'. You have to predict what is the outcome. \" + \"\\n\" + \"You can choose between: \");\n\t\tArrayList<String> gameElements2 = new ArrayList<String>(3);\n\t\tgameElements2.add(\"Even\");\n\t\tgameElements2.add(\"Odd\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"(1) Even\");\n\t\t\tSystem.out.println(\"(2) Odd\");\n\t\t\ttry { \n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction <= 2 && selectedAction > 0) {\n\t\t\t\tint decision = game.determineWinnningRollingADie();\n\t\t\t\tint piratesThrows = game.getWhatPiratesThrowRD(decision, gameElements2.get(selectedAction-1));\n\t\t\t\tSystem.out.println(\"The die is showing \" + piratesThrows);\n\t\t\t\tif (decision == 0) {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tint piratesDemand = game.getPiratesDemand();\n\t\t\t\t\tSystem.out.println(\"You lose! Pirates demands: \" + piratesDemand + \" coins\");\n\t\t\t\t\tif (game.checkPirateSatisfaction()) {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tgame.backToMain();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tint money = game.getMoney();\n\t\t\t\t\t\tgame.updateMoney(money * -1);\n\t\t\t\t\t\tgame.gameOver(\"You lose play rock paper scissor game! \\nthe pirate took all of your money and your items in your ship!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tSystem.out.println(\"You Win!! You can Continue your journey to your destination!\");\n\t\t\t\t\tgame.backToMain();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "private void finishGame(boolean again){\r\n\t\tdispose();\r\n\t\tif(again) Util.showNewGameDialog(\"Choose player names:\", cantStop.getGameBoard().getPlayers());\r\n\t}", "public void playAI() {\r\n // An item has been added to the ticket. Fire an event and let everyone know.\r\n System.out.println(\"You're going to lose foolish human!\");\r\n }", "public void advanceGame() {\n\t\tthis.status = Status.Active;\n\t\tthis.currentSuggestion = null;\n\t\tfor(User u : this.players) {\n\t\t\tu.availableActions.remove(ACTION.Wait);\n\t\t\tu.availableActions.remove(ACTION.Disprove);\n\t\t}\n\t\t\n\t\t// Next player can always move\n\t\tUser nextPlayer = null;\n\t\tdo {\n\t\t\tnextPlayer = getFollowingPlayer(this, this.getCurrentPlayer());\n\t\t\tif (nextPlayer.isActive) {\n\t\t\t\tnextPlayer.availableActions.add(ACTION.Move);\n\t\t\t\tif (this.board.getLocation(nextPlayer.character).isRoom) {\n\t\t\t\t\tnextPlayer.availableActions.add(ACTION.Accuse);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrentMove++;\n\t\t} while (!nextPlayer.isActive);\n\t\t\n\t\tif (activeUserCount(this) == 1) {\n\t\t\t// Last player remaining is the winner (by default)\n\t\t\tthis.status = Status.Complete;\n\t\t\tmessages.add(String.format(\"[ %s ] has won the game (by default)!\", nextPlayer.name));\n\t\t}\n\t}", "void askTurn();", "public void playRoundOne() {\r\n\t\t\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tif (theModel.chooseFirstActivePlayer() == true) {\r\n\t\t\t\t// theModel.selectCategory();\r\n\t\t\t\t// so at this point we have returned strings?\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.selectCategory()));\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\r\n\t\t\t\tSystem.out.println(\"this should be the human\");\r\n\r\n\t\t\t\tplayRound();\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.autoCategory()));\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\r\n\t\t\t\t// theModel.displayTopCard();\r\n\t\t\t\tSystem.out.println(\"this should be the ai\");\r\n\t\t\t\tplayRound();\r\n\t\t\t\t// return true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (theModel.isGameOver()) {\r\n\t\t\tsql.setGameDataToSQL(GameID, RoundID, winningPlayer.getName(), DrawNum, theModel.humanIsActivePlayer);\r\n\t\t}\r\n\t}", "public void play()\n {\n if(board.getNumberOfDisks() == (board.size()*board.size()))\n {\n playing = false;\n message.setText(\"It is a Tie!\");\n }\n else\n {\n message.setFont(new Font(message.getName(), Font.BOLD, 28));\n int status = board.getStatus();\n if(status == 1)\n {\n errorSound();\n message.setText(\"Outside of boundaries location, try again.\");\n }\n else if(status == 2)\n {\n errorSound();\n message.setText(\"Coordinate already used, try again.\");\n }\n else if (status == 3)\n {\n message.setText(\"Congratulations Player 1, you won!\");\n playWinSound();\n playing = false;\n }\n else if(status == 4)\n {\n message.setText(\"Congratulations Player 2, you won!\");\n playWinSound();\n playing = false;\n }\n else if(status == 0)\n {\n diskAddedsound();\n if(board.getNumberOfDisks() % 2 == 0) {message.setText(\"Player 1 please choose a new position!\");}\n else if (board.getNumberOfDisks() % 2 == 1) {message.setText(\"Player 2 please choose a new position!\");}\n }\n }\n }", "public void repeatGui(String name){\r\n winCounter.setText(\"User Win Counter: \"+userWins);\r\n \r\n if(playAgain==false){ //if they don't want to play again\r\n if(name.equals(\"AI\")&&fullBoard()==false){\r\n instructions.setText(\"<html> The AI has won the game. \"+\"</br> Better luck next time. </br> Would you like to play again? </html>\");\r\n }\r\n else if(fullBoard()==true){\r\n instructions.setText(\"<html>Wow!, It's a tie! \"+\"</br> Would you like to play again?\");\r\n }\r\n else{\r\n instructions.setText(\"<html>Congratulations! \"+\"</br>\" +name+ \", you have won the game!</br> Would you like to play again? </html>\");\r\n }\r\n \r\n welcome.add(again);\r\n welcome.add(notAgain);\r\n again.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n notAgain.setAlignmentX(Component.CENTER_ALIGNMENT); //adding the buttons that let the user decide whtehr to play again\r\n welcome.remove(input);\r\n }\r\n \r\n if(playAgain==true){ //if they want to play again\r\n super.dispose();\r\n name1=\"\"; \r\n name2 = \"AI\"; \r\n choice = 1; \r\n mode = 1; //resetting all necessary variables and restarting the GUI\r\n whoseTurn = 1; \r\n numTurns = 0; \r\n canGo = false; \r\n randomnum = -1;\r\n AINumber = 3; \r\n erase = 0; \r\n color2=Color.magenta;\r\n AIPlayed = false; \r\n GameWon = false;\r\n playAgain = false;\r\n canPlace = true;\r\n trapBlocked = false;\r\n mustPlace = -1;\r\n \r\n for(int i = 0; i<7; i++){ //resetting everything so that the next time the GUI runs, things are not messed up\r\n shouldNotPlace[i] = -1;\r\n }\r\n \r\n okButton.removeActionListener(this); //removing all the actionlisteners becauase i dont want to have two action listeners when the gui is run again\r\n pvp.removeActionListener(this);\r\n pvai.removeActionListener(this);\r\n black.removeActionListener(this);\r\n red.removeActionListener(this);\r\n yellow.removeActionListener(this);\r\n green.removeActionListener(this);\r\n okayButton.removeActionListener(this);\r\n easyAI.removeActionListener(this);\r\n hardAI.removeActionListener(this);\r\n again.removeActionListener(this);\r\n notAgain.removeActionListener(this);\r\n p1first.removeActionListener(this);\r\n p2first.removeActionListener(this);\r\n hORt.removeActionListener(this);\r\n \r\n instructions.setText(\"Please enter your name\"); //the original thing that it's supposed to say\r\n \r\n for(int i = 0; i<6; i++){\r\n for(int j = 0; j<7; j++){\r\n arrayCircles[i][j].setColor(Color.white);\r\n }\r\n }\r\n \r\n welcome.removeAll();\r\n board.removeAll(); //removing all components from the panels\r\n \r\n remove(board); //removing the panels\r\n remove(welcome);\r\n \r\n Connect4Final frame1 = new Connect4Final(); //restarting the Frame with a new instance\r\n }\r\n }", "public static void game()\n\t{\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tint car = (int)(Math.random() * 3 + 1);\n\t\t\n\t\t//testing\n\t\tSystem.out.println(\"car = \" + car); \n\t\t\n\t\tSystem.out.print(\"Please choose a door (1, 2, or 3) \");\n\t\tint user_pick = keyboard.nextInt();\n\t\t// get rid of the newLine from the buffer\n\t\tkeyboard.nextLine();\n\t\t\n\t\t// testing\n\t\tSystem.out.println(\"You chose door # \" + user_pick);\n\t\t\n\t\tint reveal = doorToReveal(car, user_pick);\n\t\t\n\t\t//testing\n\t\tSystem.out.println(\"Open door #: \" + reveal);\n\t\t\n\t\t//ask the user if they want to switch\n\t\tSystem.out.println(\"Do you want to switch?: \");\n\t\tString answer = keyboard.nextLine();\n\t\t\n\t\t//testing \n\t\tSystem.out.println(\"The user wants to switch \" + answer);\n\t\t\n\t\tif(answer.equals(\"yes\"))\n\t\t{\n\t\t\tuser_pick = doorToReveal1(user_pick, reveal);\n\t\t\n\t\t}\n\t\t\n\t\tif ( car == user_pick )\n\t\t\tSystem.out.print(\"You win!!\");\n\t\telse\n\t\t\tSystem.out.println(\"Sorry! You lose !!!\");\n\t\n\t}", "private void doGameTurn()\n\t{\n\t\tif (!lost && !won)\n\t\t{\n\t\t\trefreshMapAndFrame();\n\t\t\t\n\t\t\tcheckPlayerCondition();\n\t\t\tElementAccess.openExit();\n\t\t\tSystem.out.println(turn);\n\t\t}\n\t\telse if (lost)\n\t\t{\n\t\t\tSound.lost();\n\t\t\trefreshMapAndFrame();\n\n\t\t\tif (playerHasLost())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t}\n\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t\tlost = false;\n\t\t}\n\t\telse if (won)\n\t\t{\n\t\t\tSound.won();\n\t\t\trefreshMapAndFrame();\n\n\t\t\twon = false;\n\t\t\tif (playerNotInLevel())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t}\n\n\t\t\tnextLevel();\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t}\n\t}", "private void tick() {\n\n\t\t//If the player is not dead, has not won, and is has started the game\n\t\tif(!player.dead && !player.win && startScreen.start && !paused) {\n\t\t\tlevel.tick(); //Call level tick method\n\t\t\tplayer.tick(); //Call player tick method\n\t\t}\n\n\t\t//If the player is dead\n\t\tif(player.dead){\n\t\t\t//If the user presses yes\n\t\t\tif(yes) {\n\t\t\t\tplayer.dead = false; //The player is no longer dead\n\t\t\t\tlevel1(); //Load level 1\n\t\t\t}\n\t\t\t//If the user presses no\n\t\t\tif(no) {\n\t\t\t\tSystem.exit(1); //Exit\n\t\t\t}\n\t\t}\n\t\t//If the player won\n\t\tif(player.win) {\n\t\t\t//If the user presses yes\n\t\t\tif(yes) {\n\t\t\t\tplayer.win = false; //The player has no longer won\n\t\t\t\tlevel1(); //Load level 1\n\t\t\t}\n\t\t\t//If the user persses no\n\t\t\tif(no) {\n\t\t\t\tSystem.exit(1); //Exit\n\t\t\t}\n\t\t}\n\t}", "void chooseStarterPlayer() {\n\t\tSystem.out.println(\"\\nWer beginnt?\");\n\t\tSystem.out.println(\"1 - Computer\");\n\t\tSystem.out.println(\"2 - Human\");\n\t}", "public void playGame() {\n\t\t\r\n\t\t\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tplayRoundOne();\r\n\t\t}\r\n\t\t\r\n\t}", "private void checkGame() {\n if (game.checkWin()) {\n rollButton.setDisable(true);\n undoButton.setDisable(true);\n this.dialogFlag = true;\n if (game.isDraw()) {\n showDrawDialog();\n return;\n }\n if (game.getWinner().getName().equals(\"Computer\")) {\n showLoserDialog();\n return;\n }\n showWinnerDialog(player1);\n }\n }", "private static void playGame()\n\t{\n\t\tScanner in = new Scanner(System.in);\n\t\tint userGuess = 0;\n\t\tint length = String.valueOf(userGuess).length();\n\t\tboolean play = true;\n\t\twhile (play)\n\t\t{\t\n\t\t\tint gameNumber = newNumber();\n\t\t\tString randomNumber = String.valueOf(gameNumber);\n\t\t\tSystem.out.println(\">>>MASTERMIND<<<\");\n\t\t\tSystem.out.println(\"Enter your guess of the 4 digit number!\");\n\t\t\tdo\n\t\t\t{\n\t\t\t\tuserGuess = in.nextInt();\n\t\t\t\tlength = String.valueOf(userGuess).length();\n\t\t\t\tif (length != 4)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Please enter a number with a length of 4 digits.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (length != 4);\n\t\t\tString userNumber = String.valueOf(userGuess);\n\t\t\tnumberTester(userNumber, randomNumber);\n\t\t\tSystem.out.printf(\"\\nCongratulations! You guessed the random number %d\\n\", gameNumber);\n\t\t\tSystem.out.println(\"Would you like to play again?\");\n\t\t\tSystem.out.println(\"1.) Yes\");\n\t\t\tSystem.out.println(\"2.) No\");\n\t\t\tif (in.nextInt() == 2)\n\t\t\t{\n\t\t\t\tplay = false;\n\t\t\t}\n\t\t}\n\t}", "public void victory() {\n fieldInerface.setPleasedSmile();\n fieldInerface.timestop();\n int result = fieldInerface.timeGet();\n /*try {\n if (result < Integer.parseInt(best.getProperty(type))) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }\n } catch (NullPointerException e) {\n } catch (NumberFormatException e) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }*/\n\n gamestart = true; // new game isn't started yet!\n for (int j = 0; j < heightOfField; j++)\n for (int i = 0; i < widthOfField; i++)\n if (fieldManager.isCellMined(i, j))\n if (!fieldManager.isCellMarked(i, j)) {\n fieldInerface.putMarkToButton(i, j);\n fieldInerface.decrement();\n }\n gameover = true; // game is over!!\n }", "private void playTurn()\n {\n try\n {\n XMLHandler.saveGame(game, GAME_CLONE_PATH);\n }\n catch(IOException | JAXBException | SAXException ex)\n {\n // TODO... ConsoleUtils.message(\"An internal save error has occured, terminating current game\");\n gameEnded = true;\n return;\n }\n \n moveCycle();\n \n if (!game.validateGame()) \n {\n IllegalBoardPenalty();\n }\n \n String gameOverMessage = game.isGameOver();\n if (gameOverMessage != null) \n {\n //TODO: ConsoleUtils.message(gameOverMessage);\n gameEnded = true;\n }\n \n game.switchPlayer();\n }", "private void finaliseGame() {\r\n gameOn = false;\r\n if(bestAnswer==null) {\r\n target.reply(\"Nobody got an answer. The best answer was: \" + CountdownSolver.Solve( sourceNumbers, targetNumber ));\r\n return;\r\n }\r\n if( bestAnswer.getAnswer() == bestPossibleAnswer ) {\r\n String reply = Constants.BOLD + bestAnswer.getUsername() + Constants.BOLD\r\n + \" has won with \" + bestAnswer.getAnswer() + \"!\";\r\n if( bestPossibleAnswer!=targetNumber)\r\n reply+=\" This was the best possible answer.\";\r\n target.reply(reply);\r\n } else {\r\n target.reply( \"The best answer was \" + bestAnswer.getAnswer() + \" by \" + bestAnswer.getUsername() + \".\"\r\n + \" But the best possible answer was: \" + CountdownSolver.Solve( sourceNumbers, targetNumber ));\r\n }\r\n bestAnswer=null;\r\n runner.stop();\r\n }", "public void play() \n { \n \n createRooms();\n createCharacters();\n createItem();\n printWelcome();\n player = new Player(\"player\");\n Boolean exam;\n exam = false;\n /* player.addItem(necklace_red);\n player.addItem(halberd);\n player.addItem(set_of_forks_and_knives);\n player.addItem(candelar);\n player.addItem(potion6HP);\n player.addItem(bedroomkey);*/\n \n // Step 1 : start in the poolroom //\n Boolean step1Finish;\n Boolean step2Finish;\n Boolean step3Finish;\n Boolean step4Finish;\n Boolean step5Finish;\n Boolean step6Finish;\n Boolean step7Finish;\n Boolean step8Finish;\n Boolean step9Finish;\n Boolean step10Finish;\n Boolean step11Finish;\n step1Finish = false;\n step2Finish = false;\n step3Finish = false;\n step4Finish = false;\n step5Finish = false;\n step6Finish = false;\n step7Finish = false;\n step8Finish = false;\n step9Finish = false;\n step10Finish = false;\n step11Finish = false;\n \n // All the characters are in the poolroom and the exit opens only after speak with all the characters //\n Boolean canSpeak; // player can speak with PNG\n Boolean speak_with_mr_Taylor, speak_with_ms_Taylor, speak_with_ms_Cunningham, speak_with_chambermaid, speak_with_bob_Taylor, speak_with_mr_Cunningham;\n Boolean speak_with_ms_Wellington, speak_with_valet, speak_with_caretaker, speak_with_mr_Wellington, speak_with_nina_Taylor;\n Boolean find_bob_Taylor;\n Boolean toys_not_front_of_door = null;\n Boolean firstEnter;\n firstEnter = true;\n \n canSpeak = false;\n speak_with_mr_Taylor = false;\n speak_with_ms_Taylor = false;\n speak_with_ms_Cunningham = false;\n speak_with_chambermaid = false;\n speak_with_bob_Taylor = false;\n speak_with_mr_Cunningham = false;\n speak_with_ms_Wellington = false;\n speak_with_valet = false;\n speak_with_caretaker = false;\n speak_with_mr_Wellington = false;\n speak_with_nina_Taylor = false;\n\n Boolean can_exam_canvas;\n can_exam_canvas = false;\n Boolean find_bedroom_key;\n find_bedroom_key = false;\n \n int safe_code, essai_code;\n safe_code = 9515;\n \n if (exam)\n {\n System.out.println(\"You are in the poolroom. \\n\"\n + \"Mr Taylor was founded by the Chambermaid this morning when she came to clean the poolroom. Her scream attracted everyone. \\n\"\n + \"You notice that it is missing a pool cue and you find a strange red necklace nearby the pool. \\n\"\n + \"You examine the dead body and you notice a circular wound with the same diameter of a pool cue and some splinters of wood at the bottom of the neck. \\n\"\n + \"Take advantage that everyone is here to question them.\");\n canSpeak = true;\n exam = false;\n System.out.println(\"There are a lot of people in this room. \\n\" \n +\" Nina Taylor the master daughter has long brown hair. Sha has a beautiful blue dress. \\n\"\n +\" Bob Taylor is the little son of Mr Taylor. He seems to be really nice and kind. But he is really sad. \\n\"\n +\" Emma the Chambermaid is an old woman. She has been working for the family for a very long time. She has a black dress and a white pinny.\\n\" \n +\" Mr Cunningham is a grey-haired man with a beige square suit and a lie. \\n\"\n +\" Mr Taylor had dark blond hair and a mustache. He had nice black tuxedo. \\n\"\n +\" Mr Wellinghton is a brown-haired man with a brown square suit and a lie. \\n\"\n +\" Ms Cunnigham is a grey-blond-haired woman with a pink dress. \\n\"\n +\" Ms Taylor seems to be really sad. Sha has dark-brown hair and a long claret dress. \\n\"\n +\" Ms Wellinghton is a redhead-haired woman with a long light green dress. \\n \"\n +\" Alfred the Valet has curly blond hair. He seems to be bother. \\n\"\n +\" Sam the caretaker is a black-haired black man. \");\n }\n if (speak_with_mr_Taylor && speak_with_ms_Taylor && speak_with_ms_Cunningham && speak_with_chambermaid && speak_with_bob_Taylor && speak_with_mr_Cunningham\n && speak_with_ms_Wellington && speak_with_valet && speak_with_caretaker && speak_with_mr_Wellington && speak_with_nina_Taylor && exam)\n {\n canSpeak = false;\n step1Finish = true;\n poolroom.modifyExit(\"east\");\n speak_with_mr_Taylor = false;\n speak_with_ms_Taylor = false;\n speak_with_ms_Cunningham = false;\n speak_with_chambermaid = false;\n speak_with_bob_Taylor = false;\n speak_with_mr_Cunningham = false;\n speak_with_ms_Wellington = false;\n speak_with_valet = false;\n speak_with_caretaker = false;\n speak_with_mr_Wellington = false;\n speak_with_nina_Taylor = false;\n }\n\n // Step 2 : banqueting hall //\n if (step1Finish)\n {\n bob_Taylor.setRoom(cellar);\n nina_Taylor.setRoom(banquetinghall);\n ms_Cunningham.setRoom(dancingroom);\n if (currentRoom == banquetinghall)\n {\n if (firstEnter)\n { \n toys_not_front_of_door = false; //false = toys front of the door // true = toys not front of the door\n find_bob_Taylor = false;\n System.out.println(\" When you opened the poolroom door, you shut on a toy so you lose one HealthPoint\");\n player.setHP(player.getHP() - 1);\n firstEnter = false;\n }\n if (exam)\n {\n System.out.println(\"You cannot open the dancing room door now because there are a lot of toys. \\n\"\n + \"Nina Taylor is next to the toys and you can speak with her. \");\n canSpeak = true;\n exam = false;\n }\n if (speak_with_nina_Taylor)\n {\n nina_Taylor.setText(\"These are my brother toys. Find him to tidy his toys\");\n speak_with_nina_Taylor = false;\n canSpeak = false;\n }\n }\n else if (currentRoom == hall)\n {\n // Step 2 bis : Hall //\n if (exam)\n {\n System.out.println(\" You are in the hall but there is nobody here. \");\n exam = false;\n }\n }\n else if (currentRoom == poolroom)\n {\n if (exam)\n {\n System.out.println(\"You are in the poolroom. Mr Taylor's body was removed. All the peopple are gone. \\n\"\n + \"You do not want to stay in this room. The atmosphere has become bad. You want to leave.\");\n exam = false;\n }\n }\n else if (currentRoom == kitchen)\n {\n if (exam)\n {\n System.out.println(\"This is the kitchen, Bob Taylor is not here. \\n\"\n + \"A set of forks and knives is in one of the cupboards of the kitchen.\");\n exam = false;\n // Recupère arme\n }\n }\n else if (currentRoom == cellar)\n {\n if (exam)\n {\n System.out.println(\"You found Bob Taylor in the back of the cellar\");\n find_bob_Taylor = true;\n exam = false;\n canSpeak = true;\n }\n if (speak_with_bob_Taylor)\n {\n System.out.println(\"You convince Bob to tidy up his toys.\");\n toys_not_front_of_door = true;\n canSpeak = false;\n speak_with_bob_Taylor = false;\n }\n if (toys_not_front_of_door) \n {\n banquetinghall.modifyExit(\"south\");\n step2Finish = true;\n }\n }\n if (step2Finish)\n {\n if (currentRoom == dancingroom)\n {\n if (firstEnter)\n {\n if (exam)\n {\n System.out.println(\"You are in an extraordinary dancing room. You perceive a gramophone on a commode. You see a beautiful candlestick and a gramophone. \\n\"\n + \"Strangely here is no disk on the gramophone. You see Ms Cunningham beside it. She seems to want to talk with you.\");\n exam = false;\n canSpeak = true;\n }\n if (speak_with_ms_Cunningham)\n {\n ms_Cunningham.setText(\"Oh, good morning ! I am happy to see you. Unlike the dark atmosphere of the mansion it is a beautiful weather outside. \\n\"\n + \"I hope your investigation is progressing well. I am scared that the murderer is still at liberty. I cannot sleep properly since the night of the murder. Ah ! I know, you are going to dance with me. It will make me think of something other than this dark situation. \\n\"\n + \"Sorry I will walk on your feet. Do I hurt you not too much ? I can be very clumsy.Oh, good morning ! I am happy to see you. Unlike the dark atmosphere of the mansion it is a beautiful weather outside. \\n\"\n + \"I hope your investigation is progressing well. I am scared that the murderer is still at liberty. I cannot sleep properly since the night of the murder. Ah ! I know, you are going to dance with me. It will make me think of something other than this dark situation. \\n\"\n + \"Sorry I will walk on your feet. Do I hurt you not too much ? I can be very clumsy.\");\n System.out.println(\"You spoke and danced a lot of time with Ms Cunningham. Then you are very tired so you lose one healthpoint\");\n player.setHP(player.getHP() - 1);\n canSpeak = false;\n speak_with_ms_Cunningham = false;\n }\n firstEnter = false;\n } \n if (exam)\n {\n {\n System.out.println(\"You are in an extraordinary dancing room. You perceive a gramophone on a commode. You see a beautiful candlestick and a gramophone. \\n\"\n + \"Strangely here is no disk on the gramophone. You see Ms Cunningham beside it.\");\n exam = false;\n canSpeak = true; \n }\n if (speak_with_ms_Cunningham)\n {\n ms_Cunningham.setText(\"Thank you. I feel better thanks to you.\");\n canSpeak = false;\n speak_with_ms_Cunningham = false;\n }\n }\n }\n else if (currentRoom == livingroom)\n {\n exam = false;\n System.out.println(\"You ride the last step and arrive in the living room. A little green ghost appears in the room. He seems not to be kind. \");\n if (ghost.getHP() <=0) \n {\n livingroom.modifyExit(\"north\");\n livingroom.modifyExit(\"west\");\n exam = true;\n if (exam)\n {\n System.out.println(\"There is no useful object and there is nobody here. \"); \n step3Finish = true;\n }\n }\n }\n \n if (step3Finish)\n {\n if (currentRoom == library)\n {\n if (exam)\n {\n System.out.println(\" A library with a lot of books is behind the door you just pushed. \\n\"\n + \"You see a big painting which depicts the same library where you are. There is just a difference between them. \\n\"\n + \"On the painting, a gramophone is pictured on a sideboard. The gramophone on the painting curiously looks like the gramophone in the dancing room. \\n\"\n + \"When you inspect the sideboard on the real library you see some wear marks as if an object was previously placed on it. \\n\"\n + \"You meet the chambermaid wanting to leave the library. She seems to want to tell you something but do not dare to approach you.\");\n canSpeak = true;\n exam = false;\n }\n if (speak_with_chambermaid)\n {\n chambermaid.setText(\"I saw Nina Taylor go to the gardener hut some nights. I do not know what she is doing there. \");\n canSpeak = false;\n speak_with_chambermaid = false;\n \n }\n }\n \n else if (currentRoom == corridor)\n {\n System.out.println(\"There is a statut with a weapon in this corridor. You can take it weapon if you want. \");\n // recupere arme\n Boolean fight; // this variable will be initialize with the fight\n if (fight)\n {\n if (exam)\n {\n System.out.println(\" You are in a corridor. You see four doors. Only two are opened.\");\n exam = false;\n step4Finish = true;\n }\n }\n }\n if (step4Finish)\n {\n if (currentRoom == bathroom)\n {\n if (exam)\n {\n System.out.println(\" You enter in the bathroom and you see the chambermaid treating the valet's arm. \\n\"\n + \" The wound looks like a rodent bite but it is much bigger than a rat. It is strange because Mr Taylor was allergic to animals. \\n\"\n + \"You notice that there is a potion on the furniture next to the chambermaid. She notices that you are injured. \\n\"\n + \"She signals to you that you can take it. \"); \n //permet de prendre la potion\n exam = false;\n }\n //ajout potion possible pour le joueur\n\n }\n if (currentRoom == guestbedroom)\n {\n if (exam)\n {\n System.out.println(\" You are in the guest bedroom. Today this bedroom is Mr&Ms Cunnigham's bedroom. Mr Cunnigham is in his bedrrom.\");\n mr_Cunningham.setRoom(guestbedroom);\n ms_Cunningham.setText(\"It is strange, last time this canvas was not here.\");\n can_exam_canvas = true;\n if (exam && can_exam_canvas)\n {\n System.out.println(\" You find a key behind the canvas and you take it.\");\n find_bedroom_key = true;\n player.addItem(bedroomkey);\n } \n exam = false;\n }\n }\n \n if (step5Finish)\n {\n if (find_bedroom_key)\n {\n corridor.modifyExit(\"south\");\n }\n if (currentRoom == bedroom)\n {\n if (exam)\n {\n System.out.println(\"You are in the host bedroom. You see a big safe with a four number code. Ms Taylor is in her room.\");\n ms_Taylor.setText(\"Oh no ! I am forgetting the number code ! Please, ask to my daughter, my guests and my employees. I gave to several of them a piece of this code. \");\n \n if (speak_with_ms_Taylor)\n {\n nina_Taylor.setRoom(dancingroom);\n nina_Taylor.setText(\"Bob Taylor has fallen into a 10-meter deep well and is trying to pull it up. \\n \" +\n \"Each day it rises 3 meters and slides 2 meters during the night.\\n\" +\n \"How many days will it take to get to the surface?\");\n ms_Wellington.setRoom(library);\n ms_Wellington.setText(\"In a girl group\\n\" +\n \" 70% wear a blue sweater\\n\" +\n \" 75% wear blue pants\\n\" +\n \" 85% wear a blue hat\\n\" +\n \" 85% wear a blue coat\\n\" +\n \"What is the minimum percentage of girls wearing only blue clothes?\");\n \n bob_Taylor.setRoom(library);\n bob_Taylor.setText(\"I saw my sister and my father arguing before his death.\");\n \n mr_Cunningham.setRoom(poolroom);\n mr_Cunningham.setText(\"David is 10 years old and his younger brother is half his age. \\n\" +\n \"When David will be 10 times older, how old will Franck be?\");\n \n \n }\n }\n }\n if (step6Finish)\n {\n if (currentRoom == bedroom)\n {\n System.out.println(\"Did you find the safe code? \");\n // enter the safe code -- creation int essai_code\n if (essai_code == safe_code)\n {\n System.out.println(\"You find the good number code, the safe door is opened. \\n \" +\n \"The safe contains a disk, a lot of money and a biscuits box.\");\n }\n }\n if (currentRoom == dancingroom\n // && il doit avoir le dique dans son inventaire\n )\n {\n ms_Taylor.setRoom(dancingroom);\n ms_Taylor.setText(\"What does this object do here, it should be in the library\");\n // player has to take the gramophone in his inventory\n }\n if (currentRoom == library \n // && il doit avoir le disque et le gramophone dans son inventaire\n )\n {\n System.out.println(\"You put the gramophone at its place and you insert the disk on it. \\n\"+\n \" You are hearing a loud noise and a door is appearing.\"); \n library.modifyExit(\"north\"); \n }\n if (step7Finish)\n {\n if (currentRoom == laboratory)\n {\n System.out.println(\"When you opened the door, a little green ghost appears and attacked you.\");\n if(fight_win)\n {\n System.out.println(\"The skeleton is dead. You see that one of its bone is strange. This bone seems to be carved as a key\");\n // joueur doit ramasser la clef\n \n if (exam)\n {\n System.out.println(\" You look and the desk and you find some construction plans. It seems that Mr Taylor wanted to dig very deeply at east from the garden. It is the same place than the gardener hut. \");\n }\n corridor.modifyExit(\"up\");\n System.out.println(\"You unblock a new room. A trapdoor appears in the corridor\");\n }\n }\n if (currentRoom == attic)\n {\n if (exam)\n {\n System.out.println(\" You finally discover the attic. It is dark because there is only one window lighting the room. \\n\"\n + \" You decide to look out the window and discover a huge garden hidden by the trees when guests arrive by the entrance. \");\n hall.modifyExit(\"north\");\n }\n }\n if (step8Finish)\n {\n if (currentRoom == garden)\n {\n if (exam)\n {\n System.out.println(\" You see a well at the north but there is a steel grid locked by a padlock.\\n\"\n + \"There is an apple tree next to it with only one apple on the tree. You can maybe pick up the apple and eat it now or later.\\n\"\n + \"\");\n }\n }\n }\n \n \n }\n \n \n \n \n /*player.addItem(necklace_red);\n player.addItem(necklace_red);\n player.addItem(necklace_red);*/\n /* \n \n \n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n \n boolean finished = false;\n while (! finished) {\n Command command = parser.getCommand();\n finished = processCommand(command);\n }\n System.out.println(\"Thank you for playing. Good bye.\");\n */\n }\n }\n }\n }\n }\n }\n \n }", "public void winTheGame(boolean userGuessed) {\n this.setGuessed(true); //updating the isGuessed to true\n //dispalying winning message and the name of the picked movie\n System.out.println(\"Congratulation .. You Win!:)\");\n System.out.println(\"You have Guessed '\" + this.replacedMovie + \"' Correctly.\");\n }", "@Override\n\tpublic boolean doesGuiPauseGame() {\n\t\treturn super.doesGuiPauseGame();\n\t}", "private void promptTurn()\n \t{\n \t\tUserInfo curr;\n\t\tString meow;\n \t\tcurr = players[turnIndex];\n \t\tString[] tokens;\n \t\tint x;\n \t\tint y;\n \t\n// PROTOCOL \t\n \t\tcurr.sendMessage(prtcl.makePacket(\"Please enter a move\", \"message\")); \n\t\tmeow = curr.getMessage();\n\t\ttokens = meow.split(\" \");\n// PROTOCOL\n \t\tx = Integer.parseInt(tokens[0]);\n \t\ty = Integer.parseInt(tokens[1]);\n \t\n \t\t// Should have a method to process the user's input, and provide an error message back to them if necessary. \n \t\tif(game.remove(x, y))\n \t\t{\n \t\t\tplayers[(turnIndex + 1) % 2].sendMessage(prtcl.makePacket(\"Other player took \" + tokens[0] + \" items from row \" + tokens[1] + \".\", \"message\"));\n \t\t\tbroadcast(prtcl.makePacket(game.toString(), \"message\"));\n \t\t\t// This is where the check to see if the game is won occurs. If so, a winner (the person who just moved) is \n \t\t\t// congratulated. \n \t\t\tif(!game.isDone())\n \t\t\t{\n \t\t\t\tturnIndex += 1;\n \t\t\t\tturnIndex %= 2;\n \t\t\t}\n \t\t} else\n \t\t{\n // PROTOCOL\n \t\t\tplayers[turnIndex].sendMessage(prtcl.makePacket(\"Something was wrong with that. Try again.\", \"ERROR\"));\n // PROTOCOL\n \t\t}\t\n \t}", "public void playerTurn(Game game){\n int cardHandNum;\n boolean nextPlayer = false;\n String recentCardDesc;\n if(game.recentCardPlayed() && !(game.playerGetAnotherTurn(this))){\n if(game.getRecentCard() instanceof Mineral){\n recentCardDesc = \"\\nRecent card = Name: \" + game.getRecentCard().getCardName() + \" \" +\n \"Hardness: \" + ((Mineral) game.getRecentCard()).getCardHardness() + \" \" +\n \"Specific Gravity: \" + ((Mineral) game.getRecentCard()).getCardSpecGravity() + \" \" +\n \"Cleavage: \" + ((Mineral) game.getRecentCard()).getCardCleavage() + \" \" +\n \"Crystal Abundance: \" + ((Mineral) game.getRecentCard()).getCardCrystalAbundance() + \" \" +\n \"Economic Value: \" + ((Mineral) game.getRecentCard()).getCardEconomicValue() + \"\\n\"; // The recent card description of the Mineral card\n }\n else{\n recentCardDesc = \"\\nThe recent player play the \" + ((SuperTrumps) game.getRecentCard()).getCardName() + \" card\" + \"\\n\"; // The recent card description of the Supertrumps card\n }\n }\n else if(game.recentCardPlayed() && game.playerGetAnotherTurn(this)){\n System.out.println(\"You are granted to select the trump mode again\");\n recentCardDesc = \"\\nYou may pick the card again as you made all of other players pass\" + \"\\n\";\n gameStart(game); // Allowing the player that is not passed to pick up another trump category\n }\n else {\n recentCardDesc = \"\\nThere are no recent cards that have been played\" + \"\\n\";\n gameStart(game); // Description when there is no cards that is been played (when it is the start of the game)\n }\n while (!nextPlayer){\n // Used for looping until the person did the action (play the card or pass), which allows the next player to move\n String playerChoice;\n System.out.println(\"Game mode: \" + game.getGameModeMessage() + recentCardDesc + showCardInHand() + getPlayerName() + \", enter the card number you want to play or simply enter PASS to pass\");\n System.out.print(\">>>\");\n Scanner options = new Scanner(System.in);\n playerChoice = options.nextLine();\n if (playerChoice.toUpperCase().equals(\"PASS\")){\n drawPlayerCard(game.getCardDeck().drawnCard());\n nextPlayer = true;\n }\n else{\n try {\n cardHandNum = Integer.parseInt(playerChoice); // Changing the input into int from String\n Card cardPlayed = getPlayerCard(cardHandNum); // Used for trying to get the card played\n boolean continueGame = game.gameCard(cardPlayed, this); // Trying to play the card\n if(game.getGameMode().equals(\"CHOICE\")){ // Decision when a player play a special supertrump card to allow player to freely choose the trump mode\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n gameStart(game);\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n else if (game.getGameMode().equals(\"GRAV/MAG\")) {\n if(lookAtWinCard()) { // Check whether or not the player has the winning card, which is Magnetite\n for (Card cardInHand : playerHand) {\n game.putCardToGame(cardInHand);\n playerHand.remove(cardInHand);\n game.setRecentPlayer(this.getPlayerName());\n }\n game.setGameMode(\"SPECGRAV\"); // Change the game mode to Specific Gravity\n nextPlayer = true;\n }\n else {\n game.setGameMode(\"SPECGRAV\"); // Change the game mode to Specific Gravity\n }\n if(continueGame){\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n }\n else {\n if(continueGame){\n // Used for the normal card play\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n }\n }\n catch (Throwable e){\n System.out.println(\"Invalid input!\"); // When the user try to enter the input that does not match the card in the hand\n }\n }\n }\n if (playerHand.size() == 0){\n // Occurs when the player has no more card in the hand\n game.setRecentPlayer(game.getPlayers().get((game.getPlayers().indexOf(this)+1)%game.getPlayers().size()).getPlayerName());\n playerLeft(game);\n }\n }", "private void crossPressed() {\n\t\tif (!talkmode) {\n\t\t\tif (checkLoot() || checkNearbyVillagers() || checkDoors(doors, player.direction) || checkSigns()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tif (question) {\n\t\t\t\texitQuestionDialog();\n\t\t\t}\n\n\t\t\tLoot g = dialog.getGift();\n\t\t\tif (g != null) {\n\t\t\t\tLoad.collectLoot(g);\n\t\t\t}\n\t\t\tString takeName = dialog.getTakeName();\n\t\t\tif (takeName != null) {\n\t\t\t\tint takeAmount = dialog.getTakeAmount();\n\t\t\t\tif (takeName.equals(\"gold\")) {\n\t\t\t\t\tLoad.getPartyItems().addGold(-takeAmount);\n\t\t\t\t} else {\n\t\t\t\t\tLoad.getPartyItems().take(takeName, takeAmount);\n\t\t\t\t}\n\t\t\t}\n\t\t\tHashMap<String, Integer> t = dialog.getBeforeTriggers();\n\t\t\tHashMap<String, Integer> triggerAdds = dialog.getTriggerAdds();\n\t\t\tboolean finished = dialog.isFinished();\n\t\t\tdoTriggers(t);\n\t\t\tif (triggerAdds != null) {\n\t\t\t\tDatabase.incrementStatus(triggerAdds);\n\t\t\t}\n\t\t\tif (finished) {\n\t\t\t\tsetTalking(false);\n\t\t\t\tif (dialog.shouldTrigger()) {\n\t\t\t\t\tt = dialog.getTriggers();\n\t\t\t\t\tdoTriggers(t);\n\t\t\t\t\texecuteTrigger(talkingVillager);\n\t\t\t\t} else {\n\t\t\t\t\tdialog.resetDialog();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (dialog.isQuestion()) {\n\t\t\t\t\tinitQuestionDialog();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void notifyPlayerHasAnotherTurn();", "public void checkWin(){\n boolean result = false;\n if(game.getTurn() > 3){\n Player currentPlayer = game.getPlayerTurn();\n int playernumber = currentPlayer.getPlayericon();\n result = game.winChecker(game.getBored(),playernumber);\n if(result == true) {\n setWinMsgBox(currentPlayer.getPlayerName() + \" Is victorious :)\",\"WIN\");\n }else if(game.getTurn() == 8 && result == false){\n setWinMsgBox(\"Too bad it is a draw, No one out smarted the other -_-\",\"DRAW\");\n }else{}\n }else{\n result = false;\n }\n }", "private boolean checkGameStatus() {\n int res = model.getWinner();\n if (res == Model.DRAW) {\n draw();\n return false;\n } else if (res == Model.WHITE) {\n whiteScore++;\n view.getPrompt().setText(whiteName + \" win!\");\n prepareRestart();\n return false;\n } else if (res == Model.BLACK) {\n blackScore++;\n view.getPrompt().setText(blackName + \" win!\");\n prepareRestart();\n return false;\n }\n return true;\n }", "@Override\r\n\tpublic boolean doesGuiPauseGame() {\r\n\t\treturn false;\r\n\t}", "public static Boolean playBtn() { \n\t\tboolean startGame= false;\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"secondepage\\\"]/center/button[1]\")).click();\n\t\tif (driver.getPageSource().contains(QandA.getQuestion(0))||driver.getPageSource().contains(QandA.getQuestion(1))||driver.getPageSource().contains(QandA.getQuestion(2))){\n\t\t\tstartGame=true;\n\t\t}\n\t\treturn startGame; \n\t}", "public void gameOver(){\n\t\tif(wrongList.size()==8){\r\n\t\t\tSystem.out.println(\"The game is end\");\r\n\t\t\tSystem.exit(0);}\r\n\t\telse if(gameWon()==true){\r\n\t\t\tSystem.out.println(\"You win the Game!\");\r\n\t\t\tSystem.out.println(\"The game is end\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\telse\r\n\t\t\tplayGame();\r\n\t\t\r\n\t}", "public void doShit(int gameState) {\n\t\tif(gameState != 0){\n\t\t\tif (!songs.get(curSong).isPlaying()) {// If the song ends it will play another\n\t\t\t\t//System.out.println(\"Working?\");\n\t\t\t\tchangeSong(gameState);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (gameState != prevGameState) {\n\t\t\t\t\t//System.out.println(\"Working?\");\n\t\t\t\t\tprevGameState = gameState;\n\t\t\t\t\tchangeSong(gameState);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\treset();//if it is at the start screen don't play anything\n\t\t}\n\t}", "public void playRockPaperScissor() {\n\t\tSystem.out.println(\"The pirates ask you to play 'Rock Paper Scissors' in order to against the pirates. Now you have to choose what you want to throw. \" + \"\\n\" + \"You can choose between: \");\n\t\tArrayList<String> gameElements = new ArrayList<String>(3);\n\t\tgameElements.add(\"Rock\");\n\t\tgameElements.add(\"Paper\");\n\t\tgameElements.add(\"Scissors\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"(1) Rock\");\n\t\t\tSystem.out.println(\"(2) Paper\");\n\t\t\tSystem.out.println(\"(3) Scissors\");\n\t\t\tint selectedAction = scanner.nextInt();\n\t\t\ttry { if (selectedAction <= 3 && selectedAction > 0) {\n\t\t\t\tint decision = game.determineWinnningRPSGame();\n\t\t\t\tString piratesThrows = game.getWhatPiratesThrowRPS(decision, gameElements.get(selectedAction-1));\n\t\t\t\tSystem.out.println(\"The pirate throws \" + piratesThrows);\n\t\t\t\tif (decision == 0) {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tint piratesDemand = game.getPiratesDemand();\n\t\t\t\t\tSystem.out.println(\"You lose! Pirates demands: \" + piratesDemand + \" coins\");\n\t\t\t\t\tif (game.checkPirateSatisfaction()) {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tgame.backToMain();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tint money = game.getMoney();\n\t\t\t\t\t\tgame.updateMoney(money * -1);\n\t\t\t\t\t\tgame.gameOver(\"You lose play rock paper scissor game! \\n the pirate took all of your money and your items in your ship!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (decision == 1) {\n\t\t\t\t\tSystem.out.println(\"You need to play again!\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tSystem.out.println(\"You Win!! You can Continue your journey to your destination!\");\n\t\t\t\t\tgame.backToMain();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "boolean winGame();", "private boolean winGame() {\n if (model.isCompleted()) {\n win.message(\"Winner\");\n return true;\n }\n return false;\n }", "static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }", "private void changeGame() {\n switch (input) {\n case \"1\":\n new Lotto().generate();\n break;\n case \"2\":\n new SmallLotto().generate();\n break;\n case \"3\":\n System.out.println(\"Good bye\");\n System.exit(0);\n break;\n default:\n startGame();\n }\n continueGame();\n }", "public void Enter() {\n\t\tEndTimer();\n\t\tif (Question >= 10) {\n\n\t\t\tSystem.out.println(\"This is Game\" + Score);\n\t\t\tIntent TheScore = new Intent(this, Score.class).putExtra(\"Score\",\n\t\t\t\t\tInteger.toString(Score));\n\t\t\tEndTimer();\n\t\t\tstartActivity(TheScore);\n\t\t\tfinish();\n\t\t} else {\n\n\t\t\tEditText editText22 = (EditText) findViewById(R.id.editText1);\n\t\t\tInteger Guess = 0;\n\t\t\ttry {\n\t\t\t\tGuess = Integer.parseInt(editText22.getText().toString());\n\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t}\n\n\t\t\tTextView CorrectOrNot = (TextView) findViewById(R.id.textView1);\n\t\t\t/*\n\t\t\t * If the Hints is on it will allow the user to try each question 4\n\t\t\t * times. Below checks if the Hints is on or off.\n\t\t\t */\n\t\t\tif (Prefs.getHints(this)) {\n\t\t\t\tif (Answer == Guess) {\n\t\t\t\t\tCorrectOrNot.setTextColor(Color.GREEN);\n\t\t\t\t\tCorrectOrNot.setText(\"Correct\");\n\t\t\t\t\tCorrect++;\n\t\t\t\t\t/*\n\t\t\t\t\t * The score is worked out by 100 divided by 10 take away\n\t\t\t\t\t * from how much time was left.\n\t\t\t\t\t */\n\t\t\t\t\tScore = Score + 100 / (10 - TimeLeft);\n\t\t\t\t\tQuestion++;\n\t\t\t\t\treset();\n\t\t\t\t\t/*\n\t\t\t\t\t * Should the user enter the wrong answer it will allow them\n\t\t\t\t\t * to retry as well as tell them if the answer they entered\n\t\t\t\t\t * is greater or less then the actual answer.\n\t\t\t\t\t */\n\t\t\t\t} else if (Tries < 4) {\n\t\t\t\t\tif (Guess > Answer) {\n\t\t\t\t\t\tCorrectOrNot.setTextColor(Color.MAGENTA);\n\t\t\t\t\t\tCorrectOrNot.setText(\"Greater\");\n\t\t\t\t\t\tTries = Tries + 1;\n\t\t\t\t\t\tEndTimer();\n\t\t\t\t\t\tStartTimer();\n\n\t\t\t\t\t}\n\t\t\t\t\tif (Guess < Answer) {\n\t\t\t\t\t\tCorrectOrNot.setTextColor(Color.MAGENTA);\n\t\t\t\t\t\tCorrectOrNot.setText(\"less\");\n\t\t\t\t\t\tTries = Tries + 1;\n\t\t\t\t\t\tEndTimer();\n\t\t\t\t\t\tStartTimer();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t * Once the 4 tries is over, it will check if the last answer is\n\t\t\t\t * correct or not and act accordingly\n\t\t\t\t */\n\t\t\t\tif (Tries >= 4) {\n\t\t\t\t\tif (Answer == Guess) {\n\t\t\t\t\t\tCorrectOrNot.setTextColor(Color.GREEN);\n\t\t\t\t\t\tCorrectOrNot.setText(\"Correct\");\n\t\t\t\t\t\tCorrect++;\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * The score is worked out by 100 divided by 10 take\n\t\t\t\t\t\t * away from how much time was left.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tScore = Score + 100 / (10 - TimeLeft);\n\t\t\t\t\t\tQuestion++;\n\t\t\t\t\t\treset();\n\t\t\t\t\t} else if (Answer != Guess) {\n\t\t\t\t\t\tQuestion++;\n\t\t\t\t\t\tCorrectOrNot.setTextColor(Color.RED);\n\t\t\t\t\t\tCorrectOrNot.setText(\"Incorrect\");\n\t\t\t\t\t\tTries = 0;\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tif (Answer == Guess) {\n\t\t\t\t\tCorrectOrNot.setTextColor(Color.GREEN);\n\t\t\t\t\tCorrectOrNot.setText(\"Correct\");\n\t\t\t\t\tCorrect++;\n\t\t\t\t\t/*\n\t\t\t\t\t * The score is worked out by 100 divided by 10 take away\n\t\t\t\t\t * from how much time was left.\n\t\t\t\t\t */\n\t\t\t\t\tScore = Score + 100 / (10 - TimeLeft);\n\t\t\t\t\tSystem.out.println(Score);\n\t\t\t\t\tQuestion++;\n\t\t\t\t\tSystem.out.println(\"Correct \" + Correct);\n\t\t\t\t\treset();\n\t\t\t\t} else {\n\t\t\t\t\tQuestion++;\n\t\t\t\t\tCorrectOrNot.setTextColor(Color.RED);\n\t\t\t\t\tCorrectOrNot.setText(\"Incorrect\");\n\t\t\t\t\treset();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "public boolean doesGuiPauseGame()\n {\n return false;\n }", "void gameTurn(int move){\n int gameWon = -1;\n boolean gameTie = false;\n //set the board to a move and print it\n if (loggedInUser.myGame.currentLetter.equals(\"X\")){\n gameBoard [move] = 1;\n printMove(move,\"X\");\n }\n else{\n gameBoard[move] = 2;\n printMove(move,\"O\");\n }\n //Update the status of the buttons graying out the ones that were played\n updateButtons();\n\n //checks if the game has been won or not\n gameWon = checkGameWon();\n\n //check of the game has been tied\n gameTie = checkTie();\n\n Game game = new Game(loggedInUser.opponentId);\n game.currentMove = move;\n\n if (loggedInUser.myGame.currentLetter.equals(\"X\")){\n game.currentLetter = \"O\";\n }else {\n game.currentLetter = \"X\";\n }\n\n //if the game hasn't been won and the game hasnt been tied the other playesr turn is made\n if(gameWon != 0 && !gameTie){\n game.gameInProgress = true;\n }\n //if game won\n else if (gameWon != 0){\n //remove all of the buttons\n removeAllButtons();\n game.gameInProgress = false;\n }\n else{\n playerText.setText(\"The game is tie\");\n turn.setText(\"No one wins\");\n game.gameInProgress = false;\n }\n\n //set data\n mDatabaseRef.child(loggedInUser.myId).child(\"myGame\").setValue(game);\n mDatabaseRef.child(loggedInUser.opponentId).child(\"myGame\").setValue(game);\n }", "public void SaveGame(){\n if(gameStarted == false || canLoadGame == true){ return; }\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n int input = JOptionPane.showOptionDialog(null, \"Do you want to save game?\", \"Save Game\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null);\n if(input == JOptionPane.OK_OPTION) {\n SaveCurrentGame();\n animationThread.start();\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"LoadingScreenMusic\");\n }\n musicName = \"LoadingScreenMusic\";\n }else{\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n }\n }", "public void winnerFound() {\r\n\t\tfor (int n = 0; n < 6; n++) {\r\n\t\t\tfor (int m = 0; m < 7; m++) {\r\n\t\t\t\tsquares[n][m].setEnabled(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 7; a++) {\r\n\t\t\tbuttons[a].setEnabled(false);\r\n\t\t}\r\n\t\tif (winnerChip != 67) {\r\n\t\t\tint result = JOptionPane.showConfirmDialog(null,\r\n\t\t\t\t\t\" Player \" + (winnerChip - 48) + \" won! Do you want to start a new game?\", null,\r\n\t\t\t\t\tJOptionPane.YES_NO_OPTION);\r\n\r\n\t\t\tif (result == JOptionPane.YES_OPTION) {\r\n\t\t\t\tgameReset();\r\n\t\t\t} else if (result == JOptionPane.NO_OPTION) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Click Ok to return to Main Menu\");\r\n\r\n\t\t\t\tJFrame backToMenu = new JFrame(\"Main Menu\");\r\n\r\n\t\t\t\tbackToMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tbackToMenu.getContentPane().add(new MainMenu());\r\n\t\t\t\tbackToMenu.pack();\r\n\t\t\t\tbackToMenu.setSize(750, 650);\r\n\t\t\t\tbackToMenu.setVisible(true);\r\n\t\t\t}\r\n\t\t}if (winnerChip == 67) {\r\n\t\t\tint result = JOptionPane.showConfirmDialog(null, \" You lost! Do you want to start a new game?\", null, JOptionPane.YES_NO_OPTION);\r\n\t\t\tif (result == JOptionPane.YES_OPTION) {\r\n\t\t\t\tgameReset();\r\n\t\t\t} else if (result == JOptionPane.NO_OPTION) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Click Ok to return to Main Menu\");\r\n\r\n\t\t\t\tJFrame backToMenu = new JFrame(\"Main Menu\");\r\n\r\n\t\t\t\tbackToMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tbackToMenu.getContentPane().add(new MainMenu());\r\n\t\t\t\tbackToMenu.pack();\r\n\t\t\t\tbackToMenu.setSize(750, 650);\r\n\t\t\t\tbackToMenu.setVisible(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void NextTurn() {\n\t\tTextView tvStatus = (TextView) findViewById(R.id.tvStatus);\n\t\t\n\t\t\tif(player_1){\n\t\t\t\tplayer_1 = false;\n\t\t\t\tif(players == 1){ \n\t\t\t\t\ttvStatus.setText(\"Android Nole's turn\");\n\t\t\t\t\tLog.i(\"TEST\",\"Android turn\");\n\t\t\t\t\tAndroidTurn();\n\t\t\t\t}else{\n\t\t\t\t\ttvStatus.setText(\"Nole's turn\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tplayer_1 = true;\n\t\t\t\ttvStatus.setText(\"Gator's turn\");\n\t\t\t}\n\t\t}", "private void updateUI() {\n if(mChoice == Keys.CHOICE_WAITING) {\n mInstructionView.setText(\"Choose your weapon...\");\n mChoiceView.setImageResource(R.drawable.unknown);\n mRockButton.setEnabled(true);\n mPaperButton.setEnabled(true);\n mScissorsButton.setEnabled(true);\n } else {\n // A mChoice has been made\n mRockButton.setEnabled(false);\n mPaperButton.setEnabled(false);\n mScissorsButton.setEnabled(false);\n\n mInstructionView.setText(\"Waiting for opponent...\");\n\n switch(mChoice) {\n case Keys.CHOICE_ROCK:\n mChoiceView.setImageResource(R.drawable.rock);\n break;\n case Keys.CHOICE_PAPER:\n mChoiceView.setImageResource(R.drawable.paper);\n break;\n case Keys.CHOICE_SCISSORS:\n mChoiceView.setImageResource(R.drawable.scissors);\n break;\n }\n }\n\n // Check Pebble player response has arrived first\n if(mChoice != Keys.CHOICE_WAITING && mP2Choice != Keys.CHOICE_WAITING) {\n doMatch();\n }\n }", "public void playGame() {\t\t\r\n\t\tthis.printWelcomeMessage();\r\n\r\n\t\t// While the game hasn't finished yet. \r\n\t\twhile (!board.isGameWon()) {\r\n\t\t\tthis.printMoveText(\"What piece would you like to move: \", \"\\n-- PLEASE ENTER A VALID PIECE --\", true);\r\n\t\t\tthis.printSeparator();\r\n\t\t\tthis.printMoveText(\"Where would you like to move this piece: \", \"\\n-- PLEASE ENTER A VALID LOCATION --\",\r\n\t\t\t\t\tfalse);\r\n\t\t\tthis.printSeparator();\r\n\t\t}\r\n\t\tSystem.out.println(board.toString());\r\n\t\tSystem.out.println(\"Level Complete - Congratulations!\");\r\n\t}", "public void theGameMenuClicked() {\n System.out.println(\"THE GAME (you just lost it)\");\n }", "public void howToPlay() {\r\n // An item has been added to the ticket. Fire an event and let everyone know.\r\n System.out.println(\"Step 1: Have no life. \\nStep 2: Deal cards\\nStep 3: Cry yourself to sleep.\");\r\n }", "public final void playGame() {\n\t\tSystem.out.println(\"Welcome to \"+nameOfGame+\"!\");\n\t\tsetup(numberOfPlayers);\n\t\tfor(int i = 0; !isGameOver(); i = (i+1) % numberOfPlayers) {\n\t\t\ttakeTurn(i+1);\n\t\t}\n\t\tfinishGame();\n\t}", "private void gameMenu(String name) {\r\n System.out.println(\"Hello \" + name + \". Please choose a game, or -1 to quit: \");\r\n System.out.println(\"1: Lottery\");\r\n System.out.println(\"2: Coin flip\");\r\n System.out.println(\"3: Rock Paper Scissors\");\r\n }", "public static void getBattleChoice() {\n \t\tMainGame.display.disp(\"What do you want to do?:\");\r\n \t\tMainGame.display.Enable(MainGame.display.attack, MainGame.display.defend, MainGame.display.heal);\r\n \t}", "void win() {\n String name = score.getName();\n if (Time.getSecondsPassed() < 1) {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / 1);\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + 1 + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n } else {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / Time.getSecondsPassed());\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n }\n }", "private void checkIfMyTurn(boolean currPlayer) {\n gameService.setMyTurn(currPlayer);\n System.out.println();\n System.out.println(\"My turn now: \" + gameService.isMyTurn());\n\n if (! currPlayer) {\n gameService.setLabelTurnText(\"Wait for your turn.\");\n updateFields(gameService.receiveUpdates());\n } else {\n gameService.setLabelTurnText(\"Your turn!\");\n }\n }", "private void switchToLoadGame(String selected, String gameName) {\n String currentUserUsername = currentUser.getUsername();\n ArrayList<GameToSave> savedGames = savedGamesMap.get(currentUserUsername).get(gameName);\n GameManager gameManager = savedGamesManager.getSelectedGameToSave(selected, savedGames);\n startActivity(gameName, gameManager);\n }", "public boolean doesGuiPauseGame()\r\n\t{\r\n\t\treturn false;\r\n\t}", "void play(boolean fromUser);", "@Override\n\tpublic void play() {\n\t\tSystem.out.println(\"We played Snokker today\");\n\t\t\n\t\t\n\t}" ]
[ "0.6687301", "0.6681147", "0.6638814", "0.66278607", "0.66144353", "0.6611345", "0.6566024", "0.65486044", "0.65363526", "0.65266967", "0.6524209", "0.65062004", "0.64738786", "0.64490753", "0.6444135", "0.643149", "0.6415838", "0.6387773", "0.6387444", "0.6373731", "0.63648313", "0.63623154", "0.6358013", "0.63505584", "0.63373816", "0.63246065", "0.6319997", "0.6312504", "0.63045007", "0.6289893", "0.6288176", "0.62703896", "0.62702215", "0.62539387", "0.6253825", "0.62338036", "0.62269443", "0.62269247", "0.6222625", "0.62197566", "0.6215268", "0.6198892", "0.61847425", "0.6182157", "0.6178315", "0.61729234", "0.61719596", "0.6170955", "0.6169398", "0.61640525", "0.61592364", "0.6157885", "0.6152901", "0.6151676", "0.6141865", "0.61376494", "0.6135646", "0.6127874", "0.6120991", "0.61178136", "0.61100394", "0.61077225", "0.609934", "0.60978293", "0.6092716", "0.60921293", "0.6091875", "0.60896873", "0.6088528", "0.608528", "0.6081993", "0.6070461", "0.6069284", "0.605401", "0.6053626", "0.605265", "0.6050832", "0.6046829", "0.6043455", "0.60403854", "0.6038613", "0.603603", "0.6033947", "0.60259104", "0.60149497", "0.6013131", "0.60124326", "0.6009969", "0.60045147", "0.6003467", "0.5999838", "0.5996685", "0.59920496", "0.5987719", "0.598231", "0.598144", "0.5980074", "0.5977486", "0.5977233", "0.5976863" ]
0.6830547
0
Used for when game is reset again
public void gameReset() { for (int n = 0; n < 6; n++) { for (int m = 0; m < 7; m++) { squares[n][m].setText(""); squares[n][m].setBackground(Color.BLUE); squares[n][m].setEnabled(true); } } for (int a = 0; a < 7; a++) { buttons[a].setEnabled(true); buttons[a].setBackground(Color.BLACK); } if (gameType == 2) { board(); for (int i = 0; i < 7; i++) { index[i] = 6; } } else if (gameType == 1) { compAI.setUpArray(ROW, COL); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void resetAfterGame() {\n }", "public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }", "@Override\n public void resetGame() {\n\n }", "private void resetGame(){\n\n }", "public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}", "@Override\n public void reset(MiniGame game) {\n }", "public void restart() {\n this.getPlayerHand().getHandCards().clear();\n this.dealerHand.getHandCards().clear();\n this.getPlayerHand().setActualValue(0);\n this.getDealerHand().setActualValue(0);\n this.gameOver = false;\n this.playerBet = MIN_BET;\n this.roundCount = 0;\n this.isRunning = true;\n this.startGame();\n }", "void resetGame() {\r\n if (GameInfo.getInstance().isWin()) {\r\n GameInfo.getInstance().resetDots();\r\n MazeMap.getInstance().init();\r\n GameInfo.getInstance().resetFruitDisappearTime();\r\n MazeMap.getInstance().updateMaze(GameInfo.getInstance().getMode());\r\n }\r\n for (PropertyChangeListener pcl : pcs.getPropertyChangeListeners(Constants.PACMAN)) {\r\n pcs.removePropertyChangeListener(Constants.PACMAN, pcl);\r\n }\r\n for (PropertyChangeListener pcl : pcs.getPropertyChangeListeners(Constants.GHOSTS)) {\r\n pcs.removePropertyChangeListener(Constants.GHOSTS, pcl);\r\n }\r\n PacMan pacMan = initPacMan();\r\n initGhosts(pacMan);\r\n }", "protected void onReset() {\n\t\t\n\t}", "public void restart() {\n Board.gameOver = false;\n CollisionUtility.resetScore();\n loadMenu();\n }", "public void resetGame() {\n\t\thandler.setDown(false);\n\t\thandler.setLeft(false);\n\t\thandler.setRight(false);\n\t\thandler.setUp(false);\n\n\t\tclearOnce = 0;\n\t\thp = 100;\n\t\tfromAnotherScreen = true;\n\t\tsetState(1);\n\t}", "public void restart() {\n\n\t\t//Reset the list of Mho locations\n\t\tmhoLocations.clear();\n\n\t\t//Generate a unique map of game elements again\n\t\tgenerateMap();\n\n\t\t//reset gameOver and win variables\n\t\tgameOver = false;\n\t\twin = false;\n\n\t\t//repaint the board\n\t\tboard.repaint();\n\t}", "public void reset(){\n newGame();\n removeAll();\n repaint();\n ended = false;\n }", "void reset() {\n myManager.reset();\n myScore = 0;\n myGameOver = false;\n myGameTicks = myInitialGameTicks;\n myOldGameTicks = myInitialGameTicks;\n repaint();\n }", "protected void restart()\r\n \t{\r\n \t\tspielen();\r\n \t}", "@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 restartGame() {\n orientate(Orientation.DOWN);\n currentAnimation = idleAnimations[getOrientation().ordinal()];\n gameOver = false;\n strengthen(MAX_HP);\n }", "private void softReset() {\n // variables\n lapMap.clear();\n // ui\n sessionTView.setText(\"\");\n positionTView.setText(\"-\");\n currentLapTView.setText(\"--:--:---\");\n lastLapTView.setText(\"--:--:---\");\n bestLapTView.setText(\"--:--:---\");\n currentLapNumberTView.setText(\"-\");\n gapTView.setText(\" -.---\");\n fastestDriver = Float.MAX_VALUE;\n fastestDriverName = null;\n fastestDriverTView.setText(\"--:--:---\");\n fastestDriverNameTView.setText(\"Fastest lap\");\n Log.d(TAG, \"SOFT Reset: between game states\");\n }", "private void resetGame() {\n rockList.clear();\n\n initializeGame();\n }", "@Override\n public void reset() {\n mMoveButtonActive = true;\n mMoveButtonPressed = false;\n mFireButtonPressed = false;\n droidHitPoints = 0;\n totalKillCollectPoints = 0;\n totalCollectNum = 0;\n// mCoinCount = 0;\n// mRubyCount = 0;\n mTotalKillCollectPointsDigits[0] = 0;\n mTotalKillCollectPointsDigits[1] = -1;\n mTotalCollectNumDigits[0] = 0;\n mTotalCollectNumDigits[1] = -1;\n totalKillCollectPointsDigitsChanged = true;\n totalCollectNumDigitsChanged = true;\n// mCoinDigits[0] = 0;\n// mCoinDigits[1] = -1;\n// mRubyDigits[0] = 0;\n// mRubyDigits[1] = -1;\n// mCoinDigitsChanged = true;\n// mRubyDigitsChanged = true;\n \n levelIntro = false;\n// mLevelIntro = false;\n \n mFPS = 0;\n mFPSDigits[0] = 0;\n mFPSDigits[1] = -1;\n mFPSDigitsChanged = true;\n mShowFPS = false;\n for (int x = 0; x < mDigitDrawables.length; x++) {\n mDigitDrawables[x] = null;\n }\n// mXDrawable = null;\n mFadePendingEventType = GameFlowEvent.EVENT_INVALID;\n mFadePendingEventIndex = 0;\n }", "public GameChart resetGame();", "public void playAgain() {\r\n\t\t\r\n\t\tscreen.reset();\r\n\t\t\r\n\t}", "private void gameOver() {\n System.out.println(\"GAME OVER!!\");\n\n reset();\n mGameOver = true;\n mChangeObserver.gameOver();\n }", "public void restartGame() {\n\t\tclearGame();\n\t\tstartGame();\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}", "private void resetGame() {\r\n\t\t\r\n\t\tif(easy.isSelected()) {\r\n\t\t\tGRID_SIZE = 10;\r\n\t\t\tlbPits = 3;\r\n\t\t\tubPits = 5;\t\t\t\r\n\t\t} else if(medium.isSelected()) {\r\n\t\t\tGRID_SIZE = 15;\r\n\t\t\tlbPits = 8;\r\n\t\t\tubPits = 12;\r\n\t\t} else if(hard.isSelected()) {\r\n\t\t\tGRID_SIZE = 20;\r\n\t\t\tlbPits = 35;\r\n\t\t\tubPits = 45;\r\n\t\t} else {\r\n\t\t\tGRID_SIZE = 10;\r\n\t\t\tlbPits = 3;\r\n\t\t\tubPits = 5;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tvisited = new boolean[GRID_SIZE][GRID_SIZE];\r\n\t\tGameMapFactory mf = new GameMapFactory(new Obstacle[GRID_SIZE][GRID_SIZE], new Random(), GRID_SIZE, lbPits, ubPits);\r\n\t\tmf.setupMap();\r\n\t\tgame.resetGame(GRID_SIZE, mf.getGameMap(), visited, mf.getHunterPosition());\r\n\t\t\r\n\t}", "void onReset()\n {\n }", "private void resetGame() {\n game.resetScores();\n this.dialogFlag = false;\n rollButton.setDisable(false);\n undoButton.setDisable(true);\n resetButton.setDisable(true);\n setDefault(\"player\");\n setDefault(\"computer\");\n }", "public void RestartGame()\n {\n \n }", "void gameResumed();", "public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }", "public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer);\n\t\tui.resetCards();\n\t}", "public void restart() {\n\t\tmadeMove = false;\n\t\tcurrentPit = -1;\n\t\tnewGame(player1.getName(), player2.getName(), originalCount); \n\t}", "private void hardReset() {\n softReset();\n // variables\n recordLap = 0; // force first query on database after race restart\n trackName = null;\n // ui\n recordLapTView.setText(\"--:--:---\");\n trackTView.setText(\"Track location\");\n carTView.setText(\"Car\");\n Log.d(TAG, \"HARD Reset: main menu\");\n }", "public abstract void onReset();", "public void resetGame(){\n\t\tlabyrinth.reset();\n\t\tlabyrinth = Labyrinth.getInstance();\n\t\tplayer.setX(0);\n\t\tplayer.setY(0);\n\n\t\tcandies = new HashMap();\n\t\tenemies = new HashMap();\n\t\tbuttons = new HashMap();\n\n\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tdoor.setX(coordX);\n\t\tdoor.setY(coordY);\n\n\t\tgenerateCandies();\n\t\tgenerateEnemies();\n\n\t}", "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}", "private void reset() {\n }", "private void resetBoard() {\n\t\tGameScores.ResetScores();\n\t\tgameTime = SystemClock.elapsedRealtime();\n\t\t\n\t}", "public void resetGame() { \n\t\tInvokeMessage im = new InvokeMessage();\n\t\tim.setMethodName(\"doResetGame\");\n\t\tSheepPhysicsState sps = getSps();\n\t\tnew InvokeCallable(im, sps);\n\t}", "public void reset() {\n playing = true;\n won = false;\n startGame();\n\n // Make sure that this component has the keyboard focus\n requestFocusInWindow();\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/* */ }", "protected void reset(){\n inited = false;\n }", "public void reset(){\r\n \tif (resetdelay<=0){//if he didn't just die\r\n \t\tsetLoc(400,575);\r\n \t\timg = imgs[4];\r\n \t}\r\n }", "protected void onHardReset() {\n\t\tonReset();\n\t}", "public void resetWinRecord()\n{\n gamesWon = 0;\n}", "public void restartGame() {\n game.level = 1;\n game.overallMoves = 0;\n f.score.setText(\"Overall Score: 0\");\n restartLevel();\n }", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "protected void reset() {\n speed = 2.0;\n max_bomb = 1;\n flame = false;\n }", "@Override\n public void restart(){\n balls.reInit();\n majGui();\n }", "public void resetPlayerPassed() {\n d_PlayerPassed = false;\n }", "private void restartHandler() {\n ((ChessPanel) this.getParent()).getGameEngine().reset();\n }", "public void restart(){\n for(Player p: players)\n if(p.getActive())\n p.reset();\n turn = 0;\n currentPlayer = 0;\n diceRoller=true;\n }", "public void finishGame(){\r\n\t\t\t\tgameStarted = false;\r\n\t\t\t}", "private GameStatePresets()\n {\n\n }", "public void reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }", "public void resetGame() {\r\n\r\n\t\tplayerScore = 0;\r\n\t\tframe.setVisible(false);\r\n\t\tgame = new Game();\r\n\r\n\t}", "public void resetGame(){\r\n\t\tSystem.out.println(\"Reset game min:\"+minimum+\" max:\"+maximum);\r\n\t\t//reset the target, set guesses to 1, and newGame flag to true\r\n\t\ttarget.setRandom(minimum, maximum, \"reset game\");\r\n\t\tthis.msg.setMessage(\"\");\r\n\t\tthis.guesses.setValue(1);\r\n\t\t\r\n\t}", "public void restartGame() {\n\t\tplayerTurn = 1;\n\t\tgameStart = true;\n\t\tdispose();\n\t\tplayerMoves.clear();\n\t\tboardSize();\n\t\tnew GameBoard();\n\t}", "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 reset () {}", "public void restart(){\n gameOver = false;\n difficulty = 1;\n gTime = 0;\n enemyFactory.enemies.clear();\n ((MainActivity)context).scoreString = \"You CHOMPED \" + score + \" mascots!\";\n score = 0;\n bottomFragment = (BottomFragment)((MainActivity)context).getSupportFragmentManager().findFragmentById(R.id.bottom_fragment);\n //Update the scores\n bottomFragment.updateScores();\n //Reset the buttons to pressed state for next game.\n bottomFragment.resetButtons();\n canAlberta = false;\n canGrowl = false;\n canTebow = false;\n canvasView.albert.isAlberta = false;\n canvasView.albert.albertaCounter = 0;\n hasStarted = false;\n ((MainActivity)context).runOnUiThread(new Runnable() {\n @Override\n public void run() {\n canvasView.invalidate();\n }\n });\n }", "void reset()\n {\n\n }", "private void gameOver() {\n\t\tgameOver=true;\n\t}", "private void ResetGame(){\n this.deck = new Deck();\n humanPlayer.getHand().clear();\n humanPlayer.setWager(0);\n dealer.getHand().clear();\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}", "private void reset(){\n getPrefs().setEasyHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n getPrefs().setMediumHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n getPrefs().setHardHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n easyData.setText(formatHighScore(getPrefs().getEasyHighScore()));\n mediumData.setText(formatHighScore(getPrefs().getMediumHighScore()));\n hardData.setText(formatHighScore(getPrefs().getHardHighScore()));\n }", "private void resetGame() {\n \tcanvas.reset();\n \tguessesLeft = 8;\n \tcurrentWord = \"\";\n \t\n \tguesses = \"\";\n \tword = pickWord();\n \tlist = new boolean[word.length()];\n \t\n \tfor (int i = 0; i < word.length(); i++) {\n \t\tcurrentWord += \"-\";\n \t}\n }", "public void reset() {\n firstUpdate = true;\n }", "public void resetScreen(){\n\t\tGame_Map_Manager.infoVisible= false;\n\t\tGame_PauseMenu.actorManager.open = false;\n\t\tPlayerGoals.open = false;\n\t\tGame_Shop.actorManager.open = false;\n\t\tTrainDepotUI.actorManager.open = false;\n\t\tGameScreenUI.resourcebarexpanded =false;\n\t\tGoalMenu.open= false;\n\t\t\n\t\t//CARDS\n\t\tGame_CardHand.actorManager.open=false;\n\t\tGame_CardHand.actorManager.cardactors.clear();;\n\t\t\n\t\t//Map\n\t\tGame_StartingSequence.reset();\n\t\tGame_Map_Manager.resetMap();\n\t}", "public void startAgain() {\n setLevel(1);\n setScore(0);\n setPotion(0);\n setBonusKeys(0);\n setCoin(0);\n setHealth(100);\n startGame();\n }", "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}", "protected void reset() {\n\t\t}", "public void reset()\n\t{\n\t\t\n\t\tif (lifeCount > 1)\n\t\t{\n\t\t\tthis.setCollisionOn(false);\n\t\t\tthis.setEingabe(false);\n\t\t\tthis.reduceLifeCount();\n\t\t\timg.setRotation(0);\n\t\t\tthis.posX = startPosX;\n\t\t\tthis.setPosY(startPosY + 105);\n\t\t\tthis.spdX = startSpdX;\n\t\t\tthis.setSpdY(-60);\n\t\t\tcollisionShape.setCenterX(startPosX);\n\t\t\tcollisionShape.setCenterY(startPosY);\n\t\t\tsetRupeesInBag(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/*\n\t\t\t * When Gameover\n\t\t\t */\n\t\t\t\n\t\t\tthis.posX = startPosX;\n\t\t\tthis.setPosY(startPosY);\n\t\t\tcollisionShape.setCenterX(startPosX);\n\t\t\tcollisionShape.setCenterY(startPosY);\n\t\t\tthis.reduceLifeCount();\n\t\t}\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}", "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 resetGame(){\n initBoard(ROWS, COLS, rand);\n }", "public void reset()\n {\n mine = false;\n revealed = false;\n flagged = false;\n repaint();\n }", "public void resetGame() {\n\t\tBrickPanel.resetBallLocation();\n\t\tBrickPanel.repaint();\n\t}", "private void gameOver() {\n\t\t\n\t}", "private void finishReset() {\n DefenceField.fieldActivated = true;\n time.setPaused(false);\n nuiManager.closeScreen(DefenceUris.DEATH_SCREEN);\n }", "public void ResetGame(){\n handComputer.clear();\n handHuman.clear();\n deck.clear();\n\n InitializeDeck();\n InitializeComputerHand();\n InitializeHumanHand();\n\n topCard = deck.get(0);\n }", "void reset() ;", "public void restart() {\n eaten = 0;\n }", "public void reset() {\n\t\tmakeSolutionState();\n\t\twhile (isSolution(this.gameBoard)) {\n\t\t\trandomizeBoard();\n\t\t}\n\t\tlog.clear();\n\t\twon =false;\n\t\twasReset=true;\n\t\t\n\t\tsetChanged();\n\t\tnotifyObservers();\t\t\n\t}", "boolean reset();", "public void reset() {\n\t\tfor (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\ttileArr[x][y].restart();\n\t\t\t}\n\t\t}\n\t\tlost = false;\n\t\tisFinished = false;\n\t\tplaceBombs();\n\t\tsetNumbers();\n\t}", "protected void onReset() {\n // Do nothing.\n }", "private void onRestart() {\n init();\r\n bazar.initialisation();\r\n onJouer();\r\n Reponse.setText(\"\");\r\n bazar.setChance(5);\r\n nbrChance.setText(\"Il vous reste 5 chances\");\r\n Question.setText(\"Veuillez saisir votre réponse ici :\");\r\n\r\n\r\n }", "private void resetGame()\n {\n createRooms();\n createItems();\n createCharacters();\n\n int itemsToAdd = getRandomNumber(10,items.size());\n addRoomItems(itemsToAdd);\n winItem = createWinItem();\n\n moves = 1;\n currentRoom = getRoom(STARTROOM); // Player's start location.\n }", "protected void quitGame() {\n gameOver = true;\n }", "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "public void endGame(){\n updateHighscore();\n reset();\n }", "public static void restartPositions() {\r\n\t\tnew GameStats();\r\n\t\tMain.initPlayers();\r\n\t\tif (CustomizeFrame.getInstance() != null) {\r\n\t\t\t((Player) GameStats.getPlayers().get(0)).setCustomGraphics(64, 64);// set default custom\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// graphics\r\n\t\t}\r\n\t}", "public static void end() {\n\t\tif(firstTime)\r\n\t\t\tfirstTime=false;\r\n\t\tif (over) {\r\n\t\t\treset();\r\n\t\t\tover = false;\r\n\t\t}\r\n\t\tGUI.panel.changeGame();\r\n\t}", "void notifyGameRestored();", "private void onClickResetBtn() throws IOException {\n // Send a packet of byte[3,0] to indicate the Client is done playing, and going to quit the game\n client.sendOnly(client.getSocket(), serverPackage, 3, 0);\n isRed = true;\n turnCircle.setFill(Paint.valueOf(\"Red\"));\n turnDisplay.setText(humanTurn);\n winDisplay.setText(\"\");\n // Set all the circle in the Grid's color back to black\n resetGrid();\n\n client.restartClient();\n // Re-enable the Grid\n grid.setDisable(false);\n System.out.println(\"Client has restarted...Initialize new Game\\n\");\n }", "public void reset(){\r\n barn.setVisited(Boolean.FALSE);\r\n turkeyTalk.setVisited(Boolean.FALSE);\r\n pigginOut.setVisited(Boolean.FALSE);\r\n seeTheLight.setVisited(Boolean.FALSE);\r\n theGobbling.setVisited(Boolean.FALSE);\r\n youDied1.setVisited(Boolean.FALSE);\r\n threeLittlePigs.setVisited(Boolean.FALSE);\r\n forTheGreaterGood.setVisited(Boolean.FALSE);\r\n farmHouseTurkey.setVisited(Boolean.FALSE);\r\n youWin.setVisited(Boolean.FALSE);\r\n }", "@Override\n\tpublic void reset(){\n\t\tstate.reset();\n\t\toldState.reset();\n\t\treturnAction = new boolean[Environment.numberOfButtons]; \n\t\trewardSoFar = 0;\n\t\tcurrentReward = 0;\n\t}", "public void resetPlayer() {\n\t\thealth = 3;\n\t\tplayerSpeed = 5f;\n\t\tmultiBulletIsActive = false;\n\t\tspeedBulletIsActive = false;\n\t\tquickFireBulletIsActive = false;\n\t\tinvincipleTimer = 0;\n\t\txPosition = 230;\n\t}" ]
[ "0.8418852", "0.7844566", "0.7842181", "0.78353494", "0.76381755", "0.7433553", "0.74019456", "0.73240614", "0.731169", "0.72672665", "0.7265495", "0.7212776", "0.7187371", "0.71672845", "0.7149229", "0.7132863", "0.71087724", "0.7102875", "0.706992", "0.70585525", "0.70487833", "0.6996005", "0.69955766", "0.69820803", "0.6974621", "0.6972463", "0.6959076", "0.6931226", "0.692585", "0.6913392", "0.6891837", "0.68873173", "0.68866265", "0.68667734", "0.68667704", "0.68571115", "0.6850453", "0.6840074", "0.68376046", "0.6835508", "0.68343866", "0.68335485", "0.6818368", "0.6817018", "0.68037295", "0.6799407", "0.6797583", "0.6786006", "0.67687696", "0.676601", "0.67589355", "0.6754523", "0.675352", "0.6744456", "0.67438585", "0.67435545", "0.6729634", "0.6723197", "0.6720736", "0.6714363", "0.670641", "0.67055416", "0.6703014", "0.6698627", "0.6695032", "0.66877395", "0.668131", "0.6680131", "0.66753525", "0.667317", "0.6668167", "0.6659255", "0.6653286", "0.6648114", "0.66425395", "0.66386735", "0.6638093", "0.6633144", "0.66314435", "0.662979", "0.6628321", "0.6627847", "0.6625118", "0.6620327", "0.6613141", "0.66110736", "0.6602976", "0.6600331", "0.65987855", "0.6594521", "0.6591191", "0.658798", "0.6587306", "0.6580793", "0.6572751", "0.6571041", "0.65676904", "0.6567485", "0.6565504", "0.6554486" ]
0.6921836
29
/ Generate the secret key
protected static boolean[] generateSecretKey() { //Creating the key generator KeyGenerator gen = null; try { gen = KeyGenerator.getInstance("AES"); } catch (NoSuchAlgorithmException e1) { System.out.println("Algoritmo non supportato"); System.exit(1); } //Generating the secret key gen.init(new SecureRandom()); Key k = gen.generateKey(); byte[] key = k.getEncoded(); String stringKey = Base64.getEncoder().encodeToString(key); JTextArea textarea= new JTextArea(stringKey); textarea.setEditable(false); JOptionPane.showMessageDialog(null, textarea, "This is your SECRET KEY, keep it safe!", JOptionPane.WARNING_MESSAGE); Stego_Model model = new Stego_Model(); boolean[] boolSecretKey = model.bytesToBooleans(key); return boolSecretKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Key generateKey() {\n return new SecretKeySpec(keyValue, ALGO);\n }", "private String generateSecretKey(){\n SecureRandom random = new SecureRandom();\n byte[] bytes = new byte[20];\n\n random.nextBytes(bytes);\n Base32 base32 = new Base32();\n return base32.encodeToString(bytes);\n }", "void generateSecretKey() {\n\n Random rand = new Random();\n \n // randomly generate alphabet chars\n this.secretKey.setCharAt(0, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(1, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(4, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(5, (char) (rand.nextInt(26) + 'a'));\n\n // randomly generate special chars\n // special chars are between 33-47 and 58-64 on ASCII table\n if (rand.nextBoolean()) {\n this.secretKey.setCharAt(3, (char) (rand.nextInt(15) + '!'));\n this.secretKey.setCharAt(8, (char) (rand.nextInt(15) + '!'));\n } else {\n this.secretKey.setCharAt(3, (char) (rand.nextInt(7) + ':'));\n this.secretKey.setCharAt(8, (char) (rand.nextInt(7) + ':'));\n }\n \n // randomly generate int between 2 and 5\n this.secretKey.setCharAt(7, (char) (rand.nextInt(4) + '2'));\n }", "private String key() {\n return \"secret\";\n }", "private SecretKey generateSecretKey() throws NoSuchAlgorithmException {\n final KeyGenerator keygen = KeyGenerator.getInstance(KEYSPEC_ALGORITHM);\n keygen.init(KEY_SIZE, mRandom);\n return keygen.generateKey();\n }", "private int generateSecret() {\n int secret = secretGenerator.nextInt();\n while (secretToNumber.containsKey(secret)) {\n secret = secretGenerator.nextInt();\n }\n return secret;\n }", "public String getSecretKey();", "String getSecret();", "java.lang.String getSecret();", "java.lang.String getServerSecret();", "String getSecretByKey(String key);", "private static String generateSecret(Accessor accessor, Consumer consumer) {\n return generateHash(accessor.getToken() + consumer.getSecret() + System.nanoTime());\n }", "public static SecretKey generateSecretKey() {\r\n\t\t// generate a secret symmetric key\r\n\t\ttry {\r\n\t\t\tKeyGenerator keyGenerator = KeyGenerator.getInstance(symmetricKeyAlgorithm);\r\n\t\t\tkeyGenerator.init(SYMMETRIC_KEY_LENGTH);\r\n\t\t\treturn keyGenerator.generateKey();\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\t// should not happen\r\n\t\t\tthrow new ModelException(\"Internal Error-- unable to generate key\",e);\r\n\t\t}\r\n\t}", "com.google.protobuf.ByteString getSecretBytes();", "protected SecretKey generateRandomAESKey() throws GeneralSecurityException {\n fixPrng();\n // Instantiante KeyGenerator\n KeyGenerator keyGenerator = KeyGenerator.getInstance(AES_INSTANCE);\n // Initialize generator with the desired keylength\n keyGenerator.init(AES_128);\n // Return new key\n return keyGenerator.generateKey();\n }", "public int generateKey() {\n SecureRandom secureRandom = new SecureRandom();\n try {\n secureRandom = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return secureRandom.nextInt(26);\n }", "public String generateClientSecret() {\n return clientSecretGenerator.generate().toString();\n }", "public SecretKey getSecretKey() {\n return secretKey;\n }", "protected String generateKey(){\n Random bi= new Random();\n String returnable= \"\";\n for(int i =0;i<20;i++)\n returnable += bi.nextInt(10);\n return returnable;\n }", "private static Key generateKey(String secretKeyString) throws Exception {\n // generate secret key from string\n Key key = new SecretKeySpec(secretKeyString.getBytes(), \"AES\");\n return key;\n }", "public String generateApiKey() {\r\n\t\t\r\n\t\tString key = \"\";\r\n\t\t\r\n\t\tfor (int i = 0; i < API_LENGTH; i++) {\r\n\t\t\tchar letter = (char) (Math.random() * (90 - 65 + 1) + 65);\r\n\t\t\tkey += letter;\r\n\t\t}\r\n\t\t\r\n\t\treturn key;\r\n\t}", "public static Key generarKey() throws Exception{\n Key key = new SecretKeySpec(keyvalue, instancia); \n return key;\n }", "public String getSecretKey() {\n return secretKey;\n }", "com.google.protobuf.ByteString\n getServerSecretBytes();", "private static Key generateKey() throws NoSuchAlgorithmException {\r\n\t\tif (key == null) {\r\n\t\t\tgenerator = KeyGenerator.getInstance(\"DES\");\r\n\t\t\tgenerator.init(new SecureRandom());\r\n\t\t\tkey = generator.generateKey();\r\n\t\t}\r\n\t\treturn key;\r\n\t}", "public abstract String getSecret();", "public SecretKey generarClaveSecreta() throws NoSuchAlgorithmException {\n KeyGenerator keyGenerator = KeyGenerator.getInstance(\"AES\");\n keyGenerator.init(256);\n SecretKey secretKey = keyGenerator.generateKey();\n return secretKey;\n }", "byte[] get_node_secret();", "public static SecretKey createSecretKey() throws KeyGenerationException {\n\t\treturn cipherKeyProvider.createKey(KEY_LENGTH, GENERATOR_TYPE);\n\t}", "public static HydraKey generateKey() throws NoSuchAlgorithmException {\n // Sets the keygenerator to use blowfish key\n KeyGenerator keygen = KeyGenerator.getInstance(ALGORITHM_DEFAULT);\n keygen.init(128); // set a keylength of 128 bits\n SecretKey secret_key = keygen.generateKey();\n HydraKey hk = new HydraKey(secret_key.getEncoded(), ALGORITHM_DEFAULT);\n return hk;\n }", "private static SecretKeySpec generateKey(final String password) throws NoSuchAlgorithmException, UnsupportedEncodingException {\n final MessageDigest digest = MessageDigest.getInstance(HASH_ALGORITHM);\n byte[] bytes = password.getBytes(\"UTF-8\");\n digest.update(bytes, 0, bytes.length);\n byte[] key = digest.digest();\n\n log(\"SHA-256 key \", key);\n\n SecretKeySpec secretKeySpec = new SecretKeySpec(key, \"AES\");\n return secretKeySpec;\n }", "public Key generateKey2(int l) throws IOException{\n int b = l/32;\r\n int [] unos = new int[b];\r\n for(int i=0;i<b;i++){\r\n unos[i] = 1;\r\n }\r\n byte [] aB = int2byte(unos);\r\n\r\n return new SecretKeySpec(aB, \"AES\");\r\n }", "private static SecretKey createSymmetricKey()\n\t{\n\t\tSecretKey secretKey = null;\n\n\t\ttry\n\t\t{\n\t\t\tKeyGenerator keyGen = KeyGenerator.getInstance(inputAlgorithmForFileEncryption);\n\t\t\tkeyGen.init(128);\n\t\t\tsecretKey = keyGen.generateKey();\n\t\t} catch (NoSuchAlgorithmException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn secretKey;\n\t}", "public void generateKeys() {\r\n try {\r\n SecureRandom random = SecureRandom.getInstance(Constants.SECURE_RANDOM_ALGORITHM);\r\n KeyPairGenerator generator = KeyPairGenerator.getInstance(Constants.ALGORITHM);\r\n generator.initialize(Constants.KEY_BIT_SIZE, random);\r\n \r\n KeyPair keys = generator.genKeyPair();\r\n \r\n persistPrivateKey(keys.getPrivate().getEncoded());\r\n persistPublicKey(keys.getPublic().getEncoded());\r\n logger.log(Level.INFO, \"Done with generating persisting Public and Private Key.\");\r\n \r\n } catch (NoSuchAlgorithmException ex) {\r\n logger.log(Level.SEVERE, \"En error occured while generating the Public and Private Key\");\r\n }\r\n }", "public void generateEphemeralKey(){\n esk = BIG.randomnum(order, rng); //ephemeral secret key, x\n epk = gen.mul(esk); //ephemeral public key, X = x*P\n }", "public String getSecretKey() {\n return properties.getProperty(SECRET_KEY);\n }", "public int getSecret() {\n return secret;\n }", "void genKey(){\n Random rand = new Random();\n int key_length = 16;\n String key_alpha = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n StringBuilder sb = new StringBuilder(key_length);\n for(int i = 0; i < key_length; i++){\n int j = rand.nextInt(key_alpha.length());\n char c = key_alpha.charAt(j);\n sb.append(c);\n }\n this.key = sb.toString();\n }", "public static KeyPair createKeyPair(){\n KeyPair pair = KeyPair.random();\n System.out.println(pair.getSecretSeed());\n System.out.println(pair.getAccountId());\n return pair;\n\n }", "public static String generateHalfKey(){\n return randomChars(HALF_KEY_LENGTH);\n }", "private static byte[] generateSymetricKey(int length) {\n\t\tSecureRandom random = new SecureRandom();\n\t\tbyte[] keyBytes = new byte[length];\n\t\trandom.nextBytes(keyBytes);\n\t\tSecretKeySpec key = new SecretKeySpec(keyBytes, \"AES\");\n\t\treturn key.getEncoded();\n\t}", "public void generateKeyPair() {\n\t\ttry {\n\t\t\tKeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"DSA\", \"SUN\");\n\t\t\tSecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n\t\t\tkeyGen.initialize(1024, random);\n\t\t\tKeyPair pair = keyGen.generateKeyPair();\n\t\t\tprivateKey = pair.getPrivate();\n\t\t\tpublicKey = pair.getPublic();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static Tuple<String, String> generateKey() {\r\n\t\t// Get the KeyGenerator\r\n\t\ttry {\r\n\t\t\tKeyGenerator kgen;\r\n\t\t\tkgen = KeyGenerator.getInstance(\"AES\");\r\n\t\t\tkgen.init(256);\r\n\t\t\t// Generate the secret key specs.\r\n\t\t\tSecretKey skey = kgen.generateKey();\r\n\t\t\tbyte[] raw = skey.getEncoded();\r\n\t\t\tString key = new Base64().encodeAsString(raw);\r\n\r\n\t\t\tSecureRandom randomSecureRandom = SecureRandom\r\n\t\t\t\t\t.getInstance(\"SHA1PRNG\");\r\n\t\t\tCipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\r\n\t\t\tbyte[] iv = new byte[cipher.getBlockSize()];\r\n\t\t\trandomSecureRandom.nextBytes(iv);\r\n\t\t\tString ivStr = new Base64().encodeAsString(iv);\r\n\t\t\treturn new Tuple(key, ivStr);\r\n\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\tLogger.error(\"Error while generating key: %s\",\r\n\t\t\t\t\t\"NoSuchAlgorithmException\");\r\n\t\t} catch (NoSuchPaddingException e) {\r\n\t\t\tLogger.error(\"Error while generating key: %s\",\r\n\t\t\t\t\t\"NoSuchPaddingException\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void generateKey() {\n\twhile(true){\n\t rsaKeyA = (int)(Math.random()*20000 + 26);\n\t if(isPrime(rsaKeyA)){\n\t\tbreak;\n\t }\n\t}\n\twhile(true){\n\t rsaKeyB = (int)(Math.random()* 20000 + 26);\n\t if(isPrime(rsaKeyB)&& rsaKeyB != rsaKeyA){\n\t\tbreak;\n\t }\n\t}\n \n }", "public String generateKey(long duration) throws Exception;", "public String getSecretKey() {\n return getProperty(SECRET_KEY);\n }", "private static byte[] genKeyWithSeed(String seed) throws Exception {\n\t\tKeyGenerator kg = KeyGenerator.getInstance(ALGORITHM);\n\t\tkg.init(256, new SecureRandom(seed.getBytes()));\n\n\t\tSecretKey secretKey = kg.generateKey();\n\t\treturn secretKey.getEncoded();\n\t}", "private KeyPair generateKeyPair() {\n try {\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n keyGen.initialize(2048, random);\n return keyGen.generateKeyPair();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void generateNewSecret() {\r\n \r\n //Get Random Number With Correct Digits\r\n int intRand = randomNumberGenerator.nextInt((int)(Math.pow(10, numDigits) - Math.pow(10, numDigits - 1))) + (int)Math.pow(10, numDigits - 1);\r\n \r\n //Set To String\r\n String strRand = String.valueOf(intRand);\r\n \r\n //Set Value\r\n secretNumber = convertNumToDigitArray(strRand);\r\n \r\n }", "private byte[] getTokenKey() throws InternalSkiException {\n return sysKey(TOKEN_KEY);\n }", "public static byte[] getSecret()\r\n/* 136: */ {\r\n/* 137: */ try\r\n/* 138: */ {\r\n/* 139:122 */ return getPropertyBytes(\"secret\");\r\n/* 140: */ }\r\n/* 141: */ catch (Exception e)\r\n/* 142: */ {\r\n/* 143:124 */ log.warning(\"Error getting secret: \" + e.getMessage());\r\n/* 144: */ }\r\n/* 145:126 */ return new byte[0];\r\n/* 146: */ }", "public String generateId() {\n return Utils.generateKey();\n }", "public short key();", "public static ECKey createFromPassphrase(String secret) {\n byte[] hash = null;\n\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n md.update(secret.getBytes(\"UTF-8\"));\n hash = md.digest();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n ECKey key = new ECKey(new SecureRandom(hash));\n return key;\n }", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "public static byte[] generateSalt() throws GeneralSecurityException { \n return CryptorFunctions.getRandomBytes(SECRETKEY_DERIVATION_SALT_SIZE_BYTE);\n }", "public String encodeKey() {\n byte[] keyByte = secretKey.getEncoded();\n return Base64.getEncoder().encodeToString(keyByte);\n }", "private static byte[] genKey(String algorithm, int keySize) throws NoSuchAlgorithmException {\n KeyGenerator keyGenerator = KeyGenerator.getInstance(algorithm);\n\n keyGenerator.init(keySize);\n\n SecretKey secretKey = keyGenerator.generateKey();\n\n return secretKey.getEncoded();\n }", "static KeyPair generateKeyPair() throws NoSuchAlgorithmException {\n\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(ALGORITHM);\n\n keyGen.initialize(2048);\n\n //Log.e(TAG, \"generateKeyPair: this is public key encoding \" + Arrays.toString(generateKeyPair.getPrivate().getEncoded()));\n\n return keyGen.generateKeyPair();\n }", "protected byte[] engineSharedSecret() throws KeyAgreementException {\n return Util.trim(ZZ);\n }", "public static String generateApiKey(int length) throws NoSuchAlgorithmException {\n\n SecureRandom random = new SecureRandom();\n byte [] bytes = new byte[length/8];\n random.nextBytes(bytes);\n\n return DatatypeConverter.printHexBinary(bytes).toLowerCase();\n }", "private static void genKey(){\n\t\tSystem.out.println(\"Name to use for key?\");\n\t\tScanner in = new Scanner(System.in);\n\t\tkeyname = in.next();\n\t\tin.close();\n\t\t\n\t\tCreateKeyPairRequest createKPReq = new CreateKeyPairRequest();\n\t\tcreateKPReq.withKeyName(keyname);\n\t\tCreateKeyPairResult resultPair = null;\n\t\ttry{\n\t\t\tresultPair = ec2.createKeyPair(createKPReq);\n\t\t}catch(AmazonServiceException e){\n\t\t\tSystem.out.println(\"Key already exists!\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tKeyPair keyPair = new KeyPair();\n\t\tkeyPair = resultPair.getKeyPair();\n\t\tString privateKey = keyPair.getKeyMaterial();\n\t\tFileOutputStream out = null;\n\t\t\n\t\t\n\t\ttry{\n\t\t\tFile f = new File(keyname + \".pem\");\n\t\t\tout = new FileOutputStream(f);\n\t\t\tbyte[] privateKeyByte = privateKey.getBytes();\n\t\t\tout.write(privateKeyByte);\n\t\t\tout.flush();\n\t\t\tout.close();\n\t\t\t\n\t\t\t\n\t\t}catch (IOException e){\n\t\t\tSystem.out.println(\"IO failed!\");\n\t\t\n\t\t}finally{\n\t\t\tif(out != null){\n\t\t\t\ttry {\n\t\t\t\t\tout.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println(\"IO failed!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\tSystem.out.println(\"Key generated: \" + keyname + \".pem\");\n\t}", "public static SecretKey generateSecretKey(byte [] salt, char [] password) {\r\n\t\ttry {\r\n\t\t\t// create a PBE key specification\r\n\t\t\tPBEKeySpec spec = new PBEKeySpec(password, salt, SECRET_KEY_ITERATION, SYMMETRIC_KEY_LENGTH);\t\r\n\t\t\t// get a PBE factory class\r\n\t\t\tSecretKeyFactory factory = SecretKeyFactory.getInstance(secretKeyGenerationAlgorithm);\r\n\t\t\t// get a Password based key to use as key material\r\n\t\t\tbyte [] keyMaterial = factory.generateSecret(spec).getEncoded();\r\n\t\t\t// get an AES key from the material\r\n\t\t\treturn new SecretKeySpec(keyMaterial, symmetricKeyAlgorithm);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// should not happen\r\n\t\t\tthrow new ModelException(\"Internal error generating secret key\",e);\r\n\t\t}\r\n\t}", "public String getSecret(String key) throws ClassicDatabaseException,ClassicNotFoundException;", "private int getUniqueSecretKey () {\n\n int minInt = 100000;\n int maxInt = 999999;\n int candidateNumber = -1;\n Set<Integer> listOfCurrentSecretKeys =\n hashMapOfSecretKeys.keySet();\n boolean numberIsUnique = false;\n while ( !numberIsUnique ) {\n\n candidateNumber = rng.nextInt(maxInt+1);\n // assume unique for a moment\n numberIsUnique = true;\n // verify uniqueness assumption\n for ( int theNum : listOfCurrentSecretKeys) {\n if (candidateNumber == theNum) {\n numberIsUnique = false;\n break;\n }\n } // end for() loop\n\n } // end while() loop\n\n return candidateNumber;\n }", "public final KeyPair generateKeyPair() {\n\t\tif (SECURE_RANDOM == null) {\n\t\t\tSECURE_RANDOM = new SecureRandom();\n\t\t}\n\t\t// for p and q we divide the bits length by 2 , as they create n, \n\t\t// which is the modulus and actual key size is depend on it\n\t\tBigInteger p = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\tBigInteger q;\n\t\tdo {\n\t\t\tq = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\t} while (q.compareTo(p) == 0);\n\n\t\t// lambda = lcm(p-1, q-1) = (p-1)*(q-1)/gcd(p-1, q-1)\n\t\tBigInteger lambda = p.subtract(BigInteger.ONE).multiply(q\n\t\t\t\t.subtract(BigInteger.ONE)).divide(p.subtract(BigInteger.ONE)\n\t\t\t\t.gcd(q.subtract(BigInteger.ONE)));\n\n\t\tBigInteger n = p.multiply(q); // n = p*q\n\t\tBigInteger nsquare = n.multiply(n); // nsquare = n*n\n\t\tBigInteger g;\n\t\tdo {\n\t\t\t// generate g, a random integer in Z*_{n^2}\n\t\t\tdo {\n\t\t\t\tg = new BigInteger(STRENGTH, 64, SECURE_RANDOM);\n\t\t\t} while (g.compareTo(nsquare) >= 0\n\t\t\t\t\t|| g.gcd(nsquare).intValue() != 1);\n\n\t\t\t// verify g, the following must hold: gcd(L(g^lambda mod n^2), n) =\n\t\t\t// 1,\n\t\t\t// where L(u) = (u-1)/n\n\t\t} while (g.modPow(lambda, nsquare).subtract(BigInteger.ONE).divide(n)\n\t\t\t\t.gcd(n).intValue() != 1);\n\n\t\t// mu = (L(g^lambda mod n^2))^{-1} mod n, where L(u) = (u-1)/n\n\t\tBigInteger mu = g.modPow(lambda, nsquare).subtract(BigInteger.ONE)\n\t\t\t\t.divide(n).modInverse(n);\n\n\t\tPaillierPublicKey publicKey = new PaillierPublicKey(n, g, nsquare);\n\t\tPaillierPrivateKey privateKey = new PaillierPrivateKey(lambda, mu,\n\t\t\t\tnsquare, n);\n\n\t\treturn new KeyPair(publicKey, privateKey);\n\t}", "public String getRandomKey() {\n return randomKey;\n }", "public void createSecret(final ArtifactVersion version, final Secret secret);", "public static String generateApiKey(String name) throws EndlosException {\n\t\treturn hash(Utility.generateToken(6) + DateUtility.getCurrentEpoch() + name + Utility.generateToken(8));\n\t}", "@Override\n public String generateKey(int round) {\n return this.key.substring(4 * round, 4 * round + 16);\n }", "public final byte[] secret() {\n try {\n ByteSequence seq = new ByteSequence(this.sequence());\n seq.append(this._domainNameSeq);\n seq.append(this._creatorCert.getEncoded());\n return seq.sequence();\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n }", "private SecretKey generatePukBaseKey(byte[] derivedKeyBytes) {\n // Extract bytes 10-25 as recovery puk base key bytes\n final byte[] recoveryPukBaseKeyBytes = new byte[16];\n System.arraycopy(derivedKeyBytes, 10, recoveryPukBaseKeyBytes, 0, 16);\n return keyConvertor.convertBytesToSharedSecretKey(recoveryPukBaseKeyBytes);\n }", "short generateKeyAndWrap(byte[] applicationParameter, short applicationParameterOffset, byte[] publicKey, short publicKeyOffset, byte[] keyHandle, short keyHandleOffset, byte info);", "protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}", "public RgwAdminBuilder secretKey(String secretKey) {\n this.secretKey = secretKey;\n return this;\n }", "public byte[] generateKey()\n\t{\n\t\tImageKeyGenerate ikg = ImageKeyGenerate.getMD5SHA256();\n\t\tthis.rowKey = MyBytes.toBytes(CommonUtils.byteArrayToHexString(ikg.generate(imageData)));\n\t\treturn this.rowKey;\n\t}", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(RESET_CODE_DIGIT_COUNT);\n }", "public String getAppsecret() {\n return appsecret;\n }", "OpenSSLKey mo134201a();", "public int createSecretKey (AccountLink theAccountLink) {\n\n // should verify that the accountlink contains valid account #s\n // generate a unique secret key\n int aSecretKey = getUniqueSecretKey();\n // store away that secret key in HashMap with theAccountLink\n hashMapOfSecretKeys.put(aSecretKey, theAccountLink);\n\n return aSecretKey;\n }", "private String pswd(){\n try{\n PBEKeySpec spec = new PBEKeySpec(this.Creator.toUpperCase().toCharArray(), this.Time.getBytes(), 100, 512);\n SecretKeyFactory skf = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n //System.out.println(\"pswd=\"+this.toHex(skf.generateSecret(spec).getEncoded()));\n return this.toHex(skf.generateSecret(spec).getEncoded());\n }catch(InvalidKeySpecException | NoSuchAlgorithmException e){\n e.printStackTrace();\n }\n return null;\n }", "java.lang.String getPublicEciesKey();", "public String getAppSecret() {\r\n return appSecret;\r\n }", "static void generate() throws Exception {\n\t\t\n\t\tKeyPairGenerator keyGenerator = KeyPairGenerator.getInstance(\"RSA\");\n\t\tkeyGenerator.initialize(2048);\n\t\tKeyPair kp = keyGenerator.genKeyPair();\n\t\tRSAPublicKey publicKey = (RSAPublicKey)kp.getPublic();\n\t\tRSAPrivateKey privateKey = (RSAPrivateKey)kp.getPrivate();\n\t\t\n\t\tSystem.out.println(\"RSA_public_key=\"+Base64.getEncoder().encodeToString(publicKey.getEncoded()));\n\t\tSystem.out.println(\"RSA_private_key=\"+Base64.getEncoder().encodeToString(privateKey.getEncoded()));\n\t\tSystem.out.println(\"RSA_public_key_exponent=\"+ Base64.getEncoder().encodeToString(BigIntegerUtils.toBytesUnsigned(publicKey.getPublicExponent())));\n\t\tSystem.out.println(\"RSA_private_key_exponent=\"+Base64.getEncoder().encodeToString(BigIntegerUtils.toBytesUnsigned(privateKey.getPrivateExponent())));\n\t}", "@Override\n\tprotected SessionKey generateSessionKey() {\n\n\t\tSessionKey sk = new SessionKey();\n\t\t\n\t\tSecureRandom random = null;\n\t\ttry {\n\t\t\trandom = SecureRandom.getInstance(\"SHA1PRNG\");\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tbyte bytes[] = new byte[16];\n\t\trandom.nextBytes(bytes);\n\n\t\tbyte transformation[] = \"AES/CBC/PKCS5Padding\".getBytes();\n\t\tsk.setTransformationName(transformation);\n\t\tsk.setKey(bytes); // 128 Bits\n\t\trandom.nextBytes(bytes);\n\t\tsk.setIV(bytes); // 128 Bits\n\n\t\t\n\t\treturn sk;\n\t}", "public void generateKeys() {\n\t\t// p and q Length pairs: (1024,160), (2048,224), (2048,256), and (3072,256).\n\t\t// q must be a prime; choosing 160 Bit for q\n\t\tSystem.out.print(\"Calculating q: \");\n\t\tq = lib.generatePrime(160);\n\t\tSystem.out.println(q + \" - Bitlength: \" + q.bitLength());\n\t\t\n\t\t// p must be a prime\n\t\tSystem.out.print(\"Calculating p \");\n\t\tp = calculateP(q);\n\t System.out.println(\"\\np: \" + p + \" - Bitlength: \" + p.bitLength());\n\t System.out.println(\"Test-Division: ((p-1)/q) - Rest: \" + p.subtract(one).mod(q));\n\t \n\t // choose an h with (1 < h < p−1) and try again if g comes out as 1.\n \t// Most choices of h will lead to a usable g; commonly h=2 is used.\n\t System.out.print(\"Calculating g: \");\n\t BigInteger h = BigInteger.valueOf(2);\n\t BigInteger pMinusOne = p.subtract(one);\n\t do {\n\t \tg = h.modPow(pMinusOne.divide(q), p);\n\t \tSystem.out.print(\".\");\n\t }\n\t while (g == one);\n\t System.out.println(\" \"+g);\n\t \n\t // Choose x by some random method, where 0 < x < q\n\t // this is going to be the private key\n\t do {\n\t \tx = new BigInteger(q.bitCount(), lib.getRandom());\n }\n\t while (x.compareTo(zero) == -1);\n\t \n\t // Calculate y = g^x mod p\n\t y = g.modPow(x, p);\n\t \n System.out.println(\"y: \" + y);\n System.out.println(\"-------------------\");\n System.out.println(\"Private key (x): \" + x);\n\t}", "@Override\r\n protected String appSecret() {\r\n return \"\";\r\n }", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(SHORT_DEF_COUNT);\n }", "@PostMapping(\"/createKeyPair\")\n public String createKeyPair() {\n \n AWSKMS kmsClient = AWSKMSClientBuilder.standard().build();\n \n return \"Private uid: \"+ priuid +\"\\nPublic uid: \" + pubuid +\"\\n\";\n }", "public static byte[] getEncryptRawKey() {\n\n try {\n /*byte[] bytes64Key = App.RealmEncryptionKey.getBytes(\"UTF-8\");\n KeyGenerator kgen = KeyGenerator.getInstance(\"AES\");\n SecureRandom sr = SecureRandom.getInstance(\"SHA1PRNG\");\n sr.setSeed(bytes64Key);\n kgen.init(128, sr);\n SecretKey skey = kgen.generateKey();\n byte[] raw = skey.getEncoded();*/\n\n byte[] key = new BigInteger(App.RealmEncryptionKey, 16).toByteArray();\n return key;\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "T getRandomKey();", "public static String getApiKey() {\n String sep = \"-\";\n String a = BuildConfig.GUARD_A;\n String b = BuildConfig.GUARD_B;\n String c = BuildConfig.GUARD_C;\n String d = BuildConfig.GUARD_D;\n String e = BuildConfig.GUARD_E;\n return b+sep+a+sep+d+sep+c+sep+e;\n }", "String newKey();", "private static String m5297cj() {\n try {\n KeyGenerator instance = KeyGenerator.getInstance(\"AES\");\n instance.init(128);\n return Base64.encodeToString(instance.generateKey().getEncoded(), 0);\n } catch (Throwable unused) {\n return null;\n }\n }", "byte[] get_secure_random_bytes();", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "void addSecretKey(InputStream secretKey) throws IOException, PGPException;", "public StringBuilder generateNewKey(int length) {\n\t\tStringBuilder k = new StringBuilder();\n\t\tif (length < 64) {\n\t\t\tlength = 64;\n\t\t}\n\t\tint pv = -1;\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint v = pv;\n\t\t\twhile (v == pv) {\n\t\t\t\tv = ZRandomize.getRandomInt(0,99999999);\n\t\t\t}\n\t\t\tk.append(v);\n\t\t\tif (k.length()>=length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (k.length()>length) {\n\t\t\tk.delete(length,k.length());\n\t\t}\n\t\treturn k;\n\t}", "public RSAKeyContents generateKeys() {\r\n\t\tlock.lock();\r\n\t\ttry {\r\n\t\t\tButtermilkRSAKeyPairGenerator kpGen = new ButtermilkRSAKeyPairGenerator();\r\n\t\t\tkpGen.init(new RSAKeyGenerationParameters(DEFAULT_PUBLIC_EXPONENT, rand, KEY_STRENGTH, CERTAINTY));\r\n\t\t\treturn kpGen.generateKeys();\r\n\t\t} finally {\r\n\t\t\tlock.unlock();\r\n\t\t}\r\n\t}" ]
[ "0.8041232", "0.79331064", "0.78231084", "0.7667926", "0.7323153", "0.7259364", "0.7235901", "0.7212482", "0.7192791", "0.7166261", "0.71282345", "0.71155006", "0.7091924", "0.7080933", "0.7064051", "0.6982996", "0.6917923", "0.68090385", "0.6749135", "0.6745038", "0.67417485", "0.67337126", "0.6731219", "0.67214537", "0.67055583", "0.6705315", "0.6678315", "0.66416794", "0.66406965", "0.66283214", "0.6567964", "0.6563324", "0.65550923", "0.65435874", "0.65388674", "0.64895767", "0.648808", "0.64793396", "0.6463741", "0.6442958", "0.64359325", "0.6369468", "0.6368659", "0.63525945", "0.6308331", "0.62992674", "0.62965524", "0.62960136", "0.6284246", "0.6283795", "0.6241747", "0.6211065", "0.6206482", "0.6200577", "0.6197659", "0.6197659", "0.6185229", "0.61835617", "0.6172092", "0.6136189", "0.6118568", "0.61169404", "0.6107476", "0.6102052", "0.6101895", "0.60981756", "0.60894686", "0.6087791", "0.60858124", "0.6084325", "0.6082029", "0.60599446", "0.60593194", "0.6006022", "0.597867", "0.5969452", "0.5960223", "0.5949407", "0.5934569", "0.5934384", "0.5919345", "0.5916814", "0.59110236", "0.5910831", "0.5900843", "0.589513", "0.58934546", "0.5893307", "0.5887019", "0.58804107", "0.58796895", "0.58597934", "0.58507127", "0.5849746", "0.5842686", "0.5816327", "0.57968944", "0.5790194", "0.57850236", "0.57780534" ]
0.6738668
21
Set the test timeout
public static int getTimeOut() { TIME_OUT = 10; return TIME_OUT; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testSetTimeout() {\r\n // Not required\r\n }", "T setStartTimeout(Integer timeout);", "public void setTimeout(double timeout){\n this.timeout = timeout;\n }", "void setStartTimeout(int startTimeout);", "public void setTimeout(int timeout) {\r\n this.timeout = timeout;\r\n }", "public void setTimeOut(int value) {\n this.timeOut = value;\n }", "public void setTimeout( int timeout ) {\n this.timeout = timeout;\n }", "public void setTimeout(int timeout) {\n this.timeout = timeout;\n }", "public void setTimeout(Integer timeout) {\n\t\tthis.timeout = timeout;\n\t}", "private void setTimedOut() {\n\t\tthis.timedOut.set(true);\n\t}", "public void setTimeout(int timeout) {\r\n\t\tthis.TIMEOUT = timeout;\r\n\t}", "public void setTimeout(long t) {\n StepTimeout = t;\n }", "public void setTimeout(long timeout) {\n this.timeout = timeout;\n }", "public void setTimeout(long timeout) {\n this.timeout = timeout;\n }", "public void setTimeout(int timeout);", "public TestTimeout getTimeout() {\n return timeout;\n }", "public void setTimeout(int newTimeout) {\n this.timeout = newTimeout;\n }", "public void setTimeout(long timeout)\r\n\t{\r\n\t\tthis.timeout = timeout;\r\n\t}", "@Test\n @Timeout(1)\n void testTimeout() throws InterruptedException {\n TimeUnit.SECONDS.sleep(10);\n }", "public void setTimeout(long timeout) {\n\t\tthis.timeout = timeout;\n\t}", "public void setTimeout(final String timeout);", "protected void setTimeout() {\r\n\t\tTimeout timeout = new Timeout();\r\n\t\tt.schedule(timeout, TIMEOUT);\r\n\t}", "public void setTimeOut(long timeOut) {\n _timeOut = timeOut;\n }", "public void setTimeout(final int timeout) {\n this.timeout = timeout;\n }", "public void setNortpTimeout(int seconds);", "public void setTimeout(int _timeout) {\n if (timeout < 0)\n return;\n timeout = _timeout;\n }", "@Test\n public void testSetTimeout() throws Exception {\n MockPIFrame frame = startSession();\n int timeout = 4000;\n\n // 1. driver requests setTimeout, server replies \"OK\" without contacting the browser\n sendCommand(\"setTimeout\", \"100\", \"\").expectResult(\"OK\");\n // 2. driver requests open\n DriverRequest open = sendCommand(\"open\", \"blah.html\", \"\", timeout);\n // 3. original frame receives open request; replies \"OK\"\n frame.expectCommand(\"open\", \"blah.html\", \"\");\n frame.sendResult(\"OK\");\n // 4. normally, a new frame instance would come into existence, and\n // send back a \"START\". But instead, too much time passes.\n sleepForAtLeast(timeout);\n // 5. server replies to driver with an error message\n String result = open.getResult();\n boolean hasTimeoutMessage = result.contains(\"timed out waiting for window\");\n assertTrue(\"wrong error message on timeout\", hasTimeoutMessage);\n }", "public long timeout(long timeout);", "public void setTimeout(Long value) {\r\n timeout = value;\r\n incompatibleWithSpawn |= timeout != null;\r\n }", "public void setTimeout(final long timeout);", "void setOperationTimeout(int timeout) throws RemoteException;", "@Test\r\n void timeoutNotExceeded() {\n assertTimeout(ofMinutes(2), () -> {\r\n // Perform task that takes less than 2 minutes.\r\n });\r\n }", "public void setTimeout(org.apache.axis.types.UnsignedInt timeout) {\n this.timeout = timeout;\n }", "@Test\n public void orgApacheFelixEventadminTimeoutTest() {\n // TODO: test orgApacheFelixEventadminTimeout\n }", "@Override\n\tpublic void onTestFailedWithTimeout(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedWithTimeout(ITestResult result) {\n\t\t\n\t}", "void setTimeout(long timeout) {\n if(timeout < 0) {\n throw new RuntimeException(buildMessage(\"Timeout value must be positive, not \" + timeout));\n }\n this.timeout = timeout;\n }", "public void onTestFailedWithTimeout(ITestResult result) {\n\t\t\n\t}", "public void setTestTime(Integer testTime) {\n this.testTime = testTime;\n }", "@Override\n\tpublic void onTestFailedWithTimeout(ITestResult result) {\n\t}", "public void setTimeout(int timeout) {\r\n\t\tconnTimeout = timeout;\r\n\t}", "@BeforeAll\n public static void setUp() {\n StepVerifier.setDefaultTimeout(TIMEOUT);\n }", "void setStopTimeout(int stopTimeout);", "@Test\n public void testLongTimeout() throws Exception {\n final int expectedTimeoutInSeconds = ((30 * 24) * 60) * 60;// 30 days.\n\n final long expectedLongValue = expectedTimeoutInSeconds * 1000L;\n Capture<Integer> capturedInt = new Capture<Integer>();\n // use a capture to make sure the setter is doing the right thing.\n mockSession.setMaxInactiveInterval(captureInt(capturedInt));\n expect(mockSession.getMaxInactiveInterval()).andReturn(expectedTimeoutInSeconds);\n replay(mockSession);\n HttpServletSession servletSession = new HttpServletSession(mockSession, null);\n servletSession.setTimeout(expectedLongValue);\n long timeoutInMilliseconds = servletSession.getTimeout();\n Assert.assertEquals(expectedLongValue, timeoutInMilliseconds);\n Assert.assertEquals(expectedTimeoutInSeconds, capturedInt.getValue().intValue());\n }", "long getTimeout();", "void setTimeout(@Nullable Duration timeout);", "public void resetTimeout(){\n this.timeout = this.timeoutMax;\n }", "public void setTimeout(final int timeout) {\r\n clock.setTimeout(timeout);\r\n }", "private void setEndTimer() {\n vertx.setTimer(10, id -> testComplete());\n }", "public int getTimeout();", "void setTimeout(long timeoutInNanos);", "public void setTimeout (double seconds) {\n multiPathTimeout = seconds;\n }", "public long getTimeout() { return timeout; }", "void setTransactionTimeout(int seconds) throws SystemException;", "public interface SetTimeout {\n /**\n * Mark next #wait to timeoutInNanos.\n *\n * @param timeoutInNanos\n */\n void setTimeout(long timeoutInNanos);\n}", "public void setDelayedTimeout(int seconds);", "@Override\n\tpublic void setOpTimeout(long arg0) {\n\n\t}", "public void setTimeoutLength(int timeout) {\n\t\tmyTimeoutLength = timeout;\n\t\tif (myPort == null) {\n\t\t\treturn;\n\t\t}\n\t\tmyPort.setTimeoutLength(timeout);\n\t}", "public SetIdleTimeoutCommand(int timeout) {\n this.timeout = timeout;\n }", "public void setTimeout (int timeout) {\n\tif (timeout >= 0)\n\t call.setTimeout (new Integer (timeout));\n }", "public LWTRTPdu timeout() throws IncorrectTransitionException;", "int getTimeout();", "@Test\n public void setScriptTimeout(){\n driver.manage().timeouts().setScriptTimeout(10, TimeUnit.SECONDS);\n ((JavascriptExecutor) driver).executeScript(\"alert('hello world');\");\n ((JavascriptExecutor) driver).executeAsyncScript(\"window.setTimeout(arguments[arguments.length - 1], 500);\");\n\n }", "public void onTimeout();", "private void checkTimeout() {\n val timeout = config.getInt(\"timeout\");\n\n checkArgument(timeout >= 1000, \"timeout is less than 1000!\");\n }", "@Override\n public void onTimeout(TimeValue timeout) {\n run();\n }", "public void setDefaultTimeout(int defaultTimeout) {\n this.defaultTimeout = defaultTimeout;\n }", "Builder withHardTimeout(int timeout);", "public long GetTimeout() { return timeout; }", "public void setLoginTimeout(int paramLoginTimeout) {\n\tiLoginTimeout = paramLoginTimeout ;\n }", "@Test\r\n void timeoutNotExceededWithResult() {\n String actualResult = assertTimeout(ofMinutes(2), () -> {\r\n return \"a result\";\r\n });\r\n assertEquals(\"a result\", actualResult);\r\n }", "@Override\r\n public void setTimeouts()\r\n {\n\r\n }", "@Test\n public void orgApacheFelixEventadminIgnoreTimeoutTest() {\n // TODO: test orgApacheFelixEventadminIgnoreTimeout\n }", "public int getTimeout() {\r\n return timeout;\r\n }", "private void webDriverTimeout(){\n try {\n Thread.sleep(TIMEOUT_SHORT);\n } catch (InterruptedException e){\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void setConnectTimeout(long arg0) {\n\n\t}", "@Override\n public void setQueryTimeout( int x ) throws SQLException {\n timeout = x;\n }", "public void setHttpClientTimeout(int timeout) {\n this.connectTimeout = timeout;\n this.customized = true;\n }", "public int getTimeout() {\n return timeout;\n }", "int hardTimeout();", "public void setResponseTimeOut(int timeOut)\n {\n fResponseTimeOut = timeOut;\n }", "public void setLogOnTimeout(String timeout) {\n\t\tsetProperty(LOGON_TIMEOUT_PROP, timeout);\n\t}", "@Test\r\n public void test_customTimeOutValues() throws InterruptedException {\r\n //\r\n // keep track of each task started, along with the timeout it was given\r\n // and time it started\r\n //\r\n final Map<String, Pair<Long, Long>> timeoutAndStartTimeByMessage = new ConcurrentHashMap<String, Pair<Long, Long>>();\r\n\r\n //\r\n // store all errors in a list, as we shouldn't make our assertions in a\r\n // separate thread\r\n //\r\n final List<String> errors = new ArrayList<String>();\r\n\r\n //\r\n // As all the tasks will timeout, keep a latch to ensure they've all\r\n // been processed\r\n // so as not to end the test too soon. This should be preferable to\r\n // simply sleeping\r\n // for a given amount of time\r\n //\r\n final int numberOfTasksToStart = 5;\r\n final CountDownLatch numberOfTasksLatch = new CountDownLatch(numberOfTasksToStart);\r\n\r\n //\r\n // each task will be started with a different timeout value, which will\r\n // be in increments of this value\r\n //\r\n final long timeoutInterval = 50;\r\n\r\n //\r\n // we will assert each timeout does not occur before it's timeout, but\r\n // also no later than a given margin for error. This is done because\r\n // this test would also pass if all tasks were given the same large\r\n // expiry value (i.e. if we start tasks to expire at 10, 20 and 30\r\n // milliseconds, they would all have expired by 1 second, but that isn't\r\n // what would be expected).\r\n //\r\n // The margin for error is given to be the same as the timeout interval\r\n //\r\n final long marginForError = timeoutInterval / 2;\r\n\r\n //\r\n // the callback will populate the errors collection (potentially)\r\n //\r\n final IExpiryAction<String> timeoutAction = new IExpiryAction<String>() {\r\n\r\n @Override\r\n public void onTimeout(final String payload) {\r\n final long now = System.currentTimeMillis();\r\n numberOfTasksLatch.countDown();\r\n\r\n final Pair<Long, Long> value = timeoutAndStartTimeByMessage.get(payload);\r\n if (value == null) {\r\n errors.add(\"No value found for \" + payload);\r\n } else {\r\n final Long timeExpiry = value.getFirst();\r\n final Long timeStarted = value.getSecond();\r\n\r\n final long duration = now - timeStarted.longValue();\r\n\r\n //\r\n // assert the duration is within an expected period\r\n //\r\n final long minExpected = timeExpiry.longValue() - marginForError;\r\n final long maxExpected = timeExpiry.longValue() + marginForError;\r\n\r\n if (duration < minExpected) {\r\n errors.add(String.format(\"%s expired after %d ms\", payload, Long.valueOf(duration)));\r\n } else {\r\n if (duration > maxExpected) {\r\n errors.add(String.format(\"%s took too long to expire after %d ms\", payload,\r\n Long.valueOf(duration)));\r\n }\r\n }\r\n }\r\n }\r\n };\r\n final ExpiryViceroy<String> taskDelegate = ExpiryViceroy.start(timeoutAction, 1, TimeUnit.SECONDS);\r\n\r\n for (int taskCount = numberOfTasksToStart; taskCount >= 1; taskCount--) {\r\n final long timeout = taskCount * timeoutInterval;\r\n final String message = \"interval \" + timeout;\r\n\r\n //\r\n // no tasks will be acknowledged as complete, so they should all\r\n // time out\r\n //\r\n taskDelegate.onStartTask(message, timeout, TimeUnit.MILLISECONDS);\r\n\r\n final Pair<Long, Long> value = new Pair<Long, Long>(Long.valueOf(timeout), Long.valueOf(System\r\n .currentTimeMillis()));\r\n timeoutAndStartTimeByMessage.put(message, value);\r\n }\r\n\r\n //\r\n // ensure all tasks have completed\r\n //\r\n numberOfTasksLatch.await(1, TimeUnit.MINUTES);\r\n taskDelegate.stop();\r\n\r\n //\r\n // assert no infractions have occurred within the callback\r\n //\r\n // TODO\r\n // Assert.assertTrue(Lists.toString(Consts.NEW_LINE, errors), errors.isEmpty());\r\n }", "public abstract void onTimeout();", "public void setCheckTimeout(long checkTimeout) {\n this.checkTimeout = checkTimeout;\n }", "protected void onTimeout() {\n }", "public TerminalPropertiesBuilder setExpectationTimeout(final long expectationTimeout) {\n this.expectationTimeout = expectationTimeout;\n return this;\n }", "private static void timeout(String user, int time) { sendMessage(\"/timeout \" + user + \" \" + time); }", "@WithName(\"export.timeout\")\n @WithDefault(\"30s\")\n Duration exportTimeout();", "void timedOut();", "@Test\n public void testTimelyTest() {\n }", "@Override\n public ConfigurationImpl setNetworkCheckTimeout(int timeout) {\n this.networkCheckTimeout = timeout;\n return this;\n }", "private int determineTimeout(TestCandidate c) {\n // initial value\n int timeout = this.timeoutOverride;\n \n // Class-override.\n Timeout timeoutAnn = c.method.getDeclaringClass().getAnnotation(Timeout.class);\n if (timeoutAnn != null) {\n timeout = timeoutAnn.millis();\n }\n \n // @Test annotation timeout value.\n long junitTimeout = c.method.getAnnotation(Test.class).timeout(); \n if (junitTimeout > 0) {\n timeout = (int) Math.min(Integer.MAX_VALUE, junitTimeout);\n }\n \n // Method-override.\n timeoutAnn = c.method.getAnnotation(Timeout.class);\n if (timeoutAnn != null) {\n timeout = timeoutAnn.millis();\n }\n \n return timeout;\n }", "public Builder timeout(long timeout) {\r\n configurationBuilder.timeout(timeout);\r\n return this;\r\n }", "Future timeoutIn(long timeout, TimeUnit timeUnit);", "public long getTimeout() {\n return timeout;\n }", "public long getTimeout() {\n return timeout;\n }", "public long getTimeout() {\n return timeout;\n }", "@BeforeClass\n\tpublic static void setUp() throws Exception {\n\n//\t\t// prop.setProperty(\"script_timeout\", \"ada\");\n//\t\tMap<String, String> props = new HashMap<String, String>();\n//\t\tprops.put(\"script_timeout\", \"adaaaaaaa\");\n//\t\tConfigureHelper.writeProperty(\"config.qp\", props);\n//\t\t\n\t\ttry {\n\t\t\tPropertiesConfiguration conf = new PropertiesConfiguration(\"config/config.qp\");\n\t\t\tconf.setProperty(\"script_timeout\", \"11111111111111\");\n\t\t\tconf.save();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void setIncTimeout(int seconds);", "private void setDeviceScreenTimeout() throws DeviceNotAvailableException {\n // Set device screen_off_timeout as svc power can be set to false in the Wi-Fi test\n String command = (\"sqlite3 /data/data/com.android.providers.settings/databases/settings.db \"\n + \"\\\"UPDATE system SET value=\\'600000\\' WHERE name=\\'screen_off_timeout\\';\\\"\");\n CLog.d(\"Command to set screen timeout value to 10 minutes: %s\", command);\n mTestDevice.executeShellCommand(command);\n\n // reboot to allow the setting to take effect, post setup will be taken care by the reboot\n mTestDevice.reboot();\n }" ]
[ "0.81088036", "0.76302725", "0.7369949", "0.7284293", "0.7271122", "0.7259394", "0.7251105", "0.72254366", "0.7212869", "0.7190016", "0.7163259", "0.7144909", "0.71201825", "0.71201825", "0.7098879", "0.7070421", "0.7030108", "0.7022309", "0.70182294", "0.69941604", "0.6962989", "0.6928759", "0.69203043", "0.69196945", "0.6898397", "0.6873034", "0.6837546", "0.6835982", "0.6791422", "0.6786786", "0.67354923", "0.6729184", "0.6712919", "0.66985697", "0.6696091", "0.6696091", "0.66556656", "0.66524553", "0.6651185", "0.66389626", "0.66089433", "0.6582189", "0.65795153", "0.6549936", "0.6542275", "0.65203774", "0.6490396", "0.64857715", "0.6410271", "0.63850796", "0.63845843", "0.6373851", "0.63606846", "0.6327813", "0.63211626", "0.63161033", "0.63156927", "0.6315234", "0.6294555", "0.62890345", "0.6282526", "0.62750906", "0.6270583", "0.6267086", "0.62528795", "0.624981", "0.6249511", "0.6242614", "0.62212414", "0.6177326", "0.61648947", "0.61599135", "0.615186", "0.6149346", "0.6141729", "0.6136752", "0.6122102", "0.6118986", "0.61174184", "0.61137223", "0.61074257", "0.60871077", "0.6083289", "0.6075111", "0.60610574", "0.6060302", "0.6055092", "0.5986709", "0.59769696", "0.59660125", "0.5957182", "0.5955384", "0.5950402", "0.5946035", "0.5940166", "0.59345216", "0.59345216", "0.59345216", "0.59333926", "0.5926101", "0.5922991" ]
0.0
-1
set the defaultGCHeadless to user the Google Chrome Headless set the defaultGC to user the Google Chrome
public static String getDefaultPlatformName() { PLATFORM_NAME = "defaultGC"; return PLATFORM_NAME; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setBrowser() {\n\t\t browser=\"Chrome\";\n\t }", "public void chromeLaunch() {\n\t\tSystem.setProperty(key, value);\n\t\ts=new ChromeDriver();\n\t\ts.manage().window().maximize();\n\t\ts.navigate().to(url);\n\t}", "@Given(\"I set up my Chrome Driver\")\n\tpublic void i_am_on_Magalu_HomePage() {\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--start-maximized\");\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Users/gocruz/eclipse-workspace/portal.compras/chromedriver.exe\");\n\t\tdriver = new ChromeDriver(options);\n\n\t}", "@BeforeSuite\n\t\n\tpublic void setUp()\n\t{\n\t\t\n\t\tSystem.out.println(\" set system property for chrome\");\n\t}", "public static ChromeOptions setChromeOptions() {\n\t\t\tChromeOptions cOptions = new ChromeOptions();\n\t\t\tcOptions.addArguments(\"disable-infobars\");\n\t\t\t//cOptions.addArguments(\"--headless\", \"window-size=1920,1080\");\n\t\t\tcOptions.addArguments(\"--disable-notifications\");\n\t\t\treturn cOptions;\n\t\t}", "public void initiateBrowser(String browser) {\n\t\tString os = System.getProperty(\"os.name\").toLowerCase();\n\t\tString current_dir = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(os);\n\t\tSystem.out.println(current_dir);\n\t\tswitch (browser) {\n\t\tcase \"ie\":\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", current_dir + \"/drivers/IEDriverServer.exe\");\n\t\t\tdriver = new InternetExplorerDriver();\n\t\t\tbreak;\n\t\tcase \"chrome\":\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\tif (os.contains(\"linux\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/linuxdrivers/chromedriver\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\n\t\t\t\toptions.setBinary(\"/usr/bin/google-chrome\");\n\t\t\t\toptions.addArguments(\"--headless\");\n\t\t\t} else if (os.contains(\"windows\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/chromedriver.exe\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\t\t\t}\n\t\t\toptions.addArguments(\"test-type\");\n\t\t\toptions.addArguments(\"disable-popup-blocking\");\n\t\t\tdriver = new ChromeDriver(options);\n\n\t\t\tdriver.manage().window().maximize();\n\t\t\tbreak;\n\t\tcase \"firefox\":\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tbreak;\n\t\t}\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t}", "private void setChromeDriver() throws Exception {\n\t\t// boolean headless = false;\n\t\tHashMap<String, Object> chromePrefs = new HashMap<String, Object>();\n\t\tchromePrefs.put(\"profile.default_content_settings.popups\", 0);\n\t\tchromePrefs.put(\"download.default_directory\", BasePage.myTempDownloadsFolder);\n\t\tchromeOptions.setExperimentalOption(\"prefs\", chromePrefs);\n\t\t// TODO: Using \"C:\" will not work for Linux or OS X\n\t\tFile dir = new File(BasePage.myTempDownloadsFolder);\n\t\tif (!dir.exists()) {\n\t\t\tdir.mkdir();\n\t\t}\n\n\t\tchromeOptions.addArguments(\"disable-popup-blocking\");\n\t\tchromeOptions.addArguments(\"--disable-extensions\");\n\t\tchromeOptions.addArguments(\"start-maximized\");\n\n\t\t/*\n\t\t * To set headless mode for chrome. Would need to make it conditional\n\t\t * from browser parameter Does not currently work for all tests.\n\t\t */\n\t\t// chromeOptions.setHeadless(true);\n\n\t\tif (runLocation.toLowerCase().equals(\"smartbear\")) {\n\t\t\tReporter.log(\"-- SMARTBEAR: standard capabilities. Not ChromeOptions\", true);\n\t\t\tcapabilities = new DesiredCapabilities();\n\t\t} else {\n\t\t\tcapabilities = DesiredCapabilities.chrome();\n\t\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);\n\t\t}\n\n\t\tWebDriver myDriver = null;\n\t\tRemoteWebDriver rcDriver;\n\n\t\tswitch (runLocation.toLowerCase()) {\n\t\tcase \"local\":\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\tcase \"grid\":\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"testingbot\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\t// capabilities.setCapability(\"name\", testName); // TODO: set a test\n\t\t\t// name (suite name maybe) or combined with env\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"smartbear\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\t \n\t\t\t//capabilities.setCapability(\"name\", testMethod.get());\n\t\t\tcapabilities.setCapability(\"build\", testProperties.getString(TEST_ENV)+\" Chrome-\"+platformOS);\n\t\t\tcapabilities.setCapability(\"max_duration\", smartBearDefaultTimeout);\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\tcapabilities.setCapability(\"screenResolution\", smartBearScreenRes);\n\t\t\tcapabilities.setCapability(\"record_video\", \"true\"); Reporter.log(\n\t\t\t\t\t \"BROWSER: \" + browser, true); Reporter.log(\"BROWSER Version: \" +\n\t\t\t\t\t\t\t browserVersion, true); Reporter.log(\"PLATFORM: \" + platformOS, true);\n\t\t\tReporter.log(\"URL '\" + serverURL + \"'\", true); rcDriver = new\n\t\t\tRemoteWebDriver(new URL(serverURL), capabilities); myDriver = new\n\t\t\tAugmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\t}\n\t\tdriver.set(myDriver);\n\t}", "@Given(\"^Open the Chrome and open google site$\")\t\t\t\t\n public void Open_the_Chrome_and_open_google_site() throws Throwable\t\t\t\t\t\t\t\n {\t\t\n \tdriver = new ChromeDriver();\n \tdriver.get(\"https://accounts.google.com/SignUp\");\n }", "public static WebDriver chrome()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\Chrome\\\\chromedriver.exe\");\r\n\t\tgk = new ChromeDriver();\r\n\t\treturn gk;\r\n\t}", "public void setChromeDriver(){\n System.setProperty(\"webdriver.chrome.driver\", browserDriverPath);\n seleniumDriver = new ChromeDriver();\n }", "@Given(\"^Initialize the browser with Chrome$\")\r\n\tpublic void initialize_the_browser_with_Chrome() throws Throwable {\n\t\tdriver = DriverManager.getDriverInstance(\"chrome\", 20);\r\n\t\tSystem.out.println(\"Launched Chrome\");\r\n\t}", "public static void setChromeDriverProperty() {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\automation_new_code\\\\onfs.alip.accounting\\\\BrowserDriver/chromedriver.exe\");\n\t\t}", "public static WebDriver init_driver_crome(String browser) {\n\t\t\tif(browser.equals(\"chrome\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"G:\\\\software\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Browser is initialised\" +browser);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Browser is not initialised\" +browser);\n\t\t\t}\n\t\t\treturn getDriverChrome();\n\t\t}", "@Given(\"^launch an chrome browser$\")\r\n\tpublic void launch_an_chrome_browser() throws Throwable {\n\t sign.url();\r\n\t\t\r\n\t}", "public static void openBrowser() {\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n // === Google Chrome Browsers === //\n CHOSEN_BROWSER = CHROME;\n driver.manage().window().maximize();\n }", "@Test\r\n\tpublic void launch_browser()\r\n\t{ \r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C://TESTING TOOLS - SOFTWARES/chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"https://www.javatpoint.com/\");\r\n\t\t// remove all cookies\r\n\t\t//driver.manage().deleteAllCookies();\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\t\r\n\t}", "@Before\n public synchronized static WebDriver openBrowser() {\n String browser = System.getProperty(\"BROWSER\");\n\n\n if (driver == null) {\n try {\n //Kiem tra BROWSER = null -> gan = chrome\n if (browser == null) {\n browser = System.getenv(\"BROWSER\");\n if (browser == null) {\n browser = \"chrome\";\n }\n }\n switch (browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n break;\n case \"chrome_headless\":\n WebDriverManager.chromedriver().setup();\n ChromeOptions options = new ChromeOptions();\n options.addArguments(\"headless\");\n options.addArguments(\"window-size=1366x768\");\n driver = new ChromeDriver(options);\n break;\n default:\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n }\n } catch (UnreachableBrowserException e) {\n driver = new ChromeDriver();\n } catch (WebDriverException e) {\n driver = new ChromeDriver();\n } finally {\n Runtime.getRuntime().addShutdownHook(new Thread(new BrowserCleanup()));\n }\n driver.get(\"http://demo.guru99.com/v4/\");\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n log.info(\"----------- START BRWOSER -----------\");\n\n }\n return driver;\n }", "@BeforeMethod\n\tpublic void setUp() {\n\t\tString driverByOS = \"\";\n\t\tif (System.getProperty(\"os.name\").equals(\"Windows 10\")) {\n\t\t\tdriverByOS = \"Drivers/chromedriver.exe\";\n\t\t} \n\t\telse {\n\t\t\tdriverByOS = \"Drivers/chromedriver\";\n\t\t}\n\t\t//para saber en qué sistema Operativo estamos corriendo el proyecto.\n\t\tSystem.out.println(System.getProperty(\"os.name\"));\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverByOS);\n\t\t//Utilizando headless browser HB\n\t\t/*-HB\n\t\tChromeOptions chromeOptions = new ChromeOptions();\n\t\tchromeOptions.addArguments(\"--headless\");\n\t\tdriver = new ChromeDriver(chromeOptions);\n\t\tHB-*/\n\t\tdriver = new ChromeDriver();\n\t\t//driver.manage().window().maximize(); //esto es para maximizar la ventana del navegador\n\t\t//driver.manage().window().fullscreen(); //esto es para poner en fullscreen la ventana del navegador\n\t\t/*driver.manage().window().setSize(new Dimension(200,200));\n\t\tfor (int i = 0; i <= 800; i++) {\n\t\t\tdriver.manage().window().setPosition(new Point(i,i));\n\t\t}*/\n\t\t//driver.manage().window().setPosition(new Point(800,200)); //posicionando la ventana del navegador\n\t\tdriver.navigate().to(\"http://newtours.demoaut.com/\");\n\t\t//Este codigo de abajo permite abrir otra ventana en el navegador\n\t\t//JavascriptExecutor javaScriptExecutor = (JavascriptExecutor)driver;\n\t\t//String googleWindow = \"window.open('http://www.google.com')\";\n\t\t//javaScriptExecutor.executeScript(googleWindow);\n\t\t//tabs = new ArrayList<String> (driver.getWindowHandles());\n\t\t/*try {\n\t\t\tThread.sleep(5000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t//Helpers helper = new Helpers();\n\t\t//helper.sleepSeconds(4);\n\t}", "private static void initialiseBrowser() {\n\t\tif (System.getProperty(\"proxyname\") != null) {\n\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\t\t\tprofile.setPreference(\"network.proxy.type\", 1);\n\t\t\tprofile.setPreference(\"network.proxy.http\", System.getProperty(\"proxyname\"));\n\t\t\tprofile.setPreference(\"network.proxy.http_port\", 3128);\n\n\t\t\tdriver = new FirefoxDriver(profile);\n\t\t\tsetDriver(driver);\n\t\t}\n\t\telse{\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tsetDriver(driver);\n\t\t}\n\t}", "@Given(\"^the user launch the chrome application$\")\r\n\tpublic void the_user_launch_the_chrome_application() throws Throwable {\n\t\tlaunchBrowser(\"chrome\");\r\n\t\t register= new Para_Registartion_page(driver);\r\n\t}", "public GoogleAutomation() {\n\t\t\n\t\t//The setProperty() method of Java system class sets the property of the system which is indicated by a key.\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"driver//chromedriver.exe\");\n\t\t\n\t\t//initilize webDriver \n\t\twebDriver = new ChromeDriver();\n\t}", "public void browser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src/test/resources/Driver/chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.manage().window().maximize();// maximize the window\n\t\tdriver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);\n\n\t}", "@Before\r\n\tpublic void OpenChrome() {\n\t\tconfig = new ConfigReader();\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",config.getChromePath());\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\texPages = new ExpediaPages(driver);\r\n\t}", "@BeforeTest\n public void setup() {\n\n String browser = Environment.getProperties().browser().toString().toLowerCase();\n\n switch (browser) {\n \n case \"firefox\":\n FirefoxOptions options = new FirefoxOptions(); \n if(Environment.getProperties().headless()){\n options.addArguments(\"--headless\");\n }\n driver = new FirefoxDriver();\n break;\n \n default:\n ChromeOptions optionsChrome = new ChromeOptions();\n if(Environment.getProperties().headless()){\n optionsChrome.addArguments(\"--headless\");\n } \n driver = new ChromeDriver(optionsChrome);\n break;\n } \n\n driver.manage().window().maximize();\n }", "void setBrowser(String browser);", "@Test \n public void executSessionThree(){\n System.out.println(\"open the browser: chrome III\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }", "@Test \n public void executSessionOne(){\n\t System.out.println(\"open the browser: chrome\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }", "public static void startChromeDriver() {\r\n\t\tswitch (operatingSystem.toLowerCase().split(\" \")[0]) {\r\n\t\tcase \"windows\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriver.exe\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"linux\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriverLinux\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"mac\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriverMac\");\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Operating system not supported.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public static void setSystemPropertyChromeWebDriverOriginal() {\n\t\tString fullPath = getFullPathToSrcTestResourceFolder();\n\t\t\n\t\tString os = getOperationalSystemName();\n\t\t\n\t\tString chromeDriver = CHROME_DRIVER_WINDOWS;\n\t\tif ( os.equals(OS_MAC_OS_X) ) {\n\t\t\tchromeDriver = CHROME_DRIVER_MAC;\n\t\t}\n\t\t\n\t\tSystem.setProperty(\n\t\t\tWEBDRIVER_CHROME_DRIVER, \n\t\t\tfullPath + chromeDriver);\n\t}", "@DISPID(1611005956) //= 0x60060004. The runtime will prefer the VTID if present\n @VTID(32)\n void newWithGS(\n boolean oGSCreated);", "public static ChromeOptions chromeoptions() {\r\n\t\tHashMap<String, Object> chromePrefs = new HashMap<String, Object>();\r\n\t\tchromePrefs.put(\"profile.default_content_settings.popups\", 0);\r\n\t\tchromePrefs.put(\"download.default_directory\", testAdminReportPath);\r\n\t\tChromeOptions options = new ChromeOptions();\r\n\t\toptions.setExperimentalOption(\"prefs\", chromePrefs);\r\n\t\toptions.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);\r\n\t\toptions.setCapability(ChromeOptions.CAPABILITY, options);\r\n\t\toptions.setCapability(\"locationContextEnabled\", false);\r\n\t\treturn options;\r\n\t}", "public void initialization()\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Mrunal\\\\chromedriver.exe\");\n\t\n\t\tif(prop.getProperty(\"browser\").contains(\"chrome\"))\n\t\t driver = new ChromeDriver();\n\t\t \n\t\t driver.manage().deleteAllCookies();\n\t\t driver.manage().timeouts().pageLoadTimeout(2000, TimeUnit.MILLISECONDS);\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n\n\t\t driver.get(prop.getProperty(\"url\"));\n\t\t driver.manage().window().maximize();\n\t\t driver.manage().timeouts().implicitlyWait(8, TimeUnit.SECONDS);\n\t\t \n\t}", "public static String getBrowser() {\n if (System.getProperty(\"browser\") == null) {\n return \"chrome\";\n } else {\n return System.getProperty(\"browser\").toLowerCase();\n }\n }", "@BeforeTest\r\n public void launchBrowser() {\n System.setProperty(\"webdriver.chrome.driver\", ChromePath);\r\n driver= new ChromeDriver();\r\n driver.manage().window().maximize();\r\n driver.get(titulo);\r\n }", "public static void initializer() \n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\HP-PC\\\\Downloads\\\\Kahoot\\\\chromedriver.exe\" );\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"https://www.sathya.in/\");\n\t}", "private void initGATracker() {\n\t\t/* get analytics singleton */\n\t\ttracker = GoogleAnalyticsTracker.getInstance();\n\n\t\t/* start tracker. Dispatch every 30 seconds. */\n\t\ttracker.startNewSession(\"UA-20341887-1\", 30, getApplicationContext());\n\t\t\n /* debug GA */\n tracker.setDebug(false);\n tracker.setDryRun(false);\n \n // Determine the screen orientation and set it in a custom variable.\n String orientation = \"unknown\";\n switch (this.getResources().getConfiguration().orientation) {\n case Configuration.ORIENTATION_LANDSCAPE:\n orientation = \"landscape\";\n break;\n case Configuration.ORIENTATION_PORTRAIT:\n orientation = \"portrait\";\n break;\n }\n tracker.setCustomVar(3, \"Screen Orientation\", orientation, 2);\n\t}", "public static void main(String[] args) {\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"D:/workspace/chromedriver\");\r\n\t\t //System.setProperty(\"webdriver.chrome.driver\", ...);\r\n\t\t \r\n\t\t System.setProperty(\"selenide.browser\", \"Chrome\");\r\n\t\t Configuration.browser=\"chrome\";\r\n\t\t open(\"http://google.com\");\r\n\t\t //$(By.id(\"registerLink\")).pressEnter();\r\n\t\t }", "@Test\n public void testReturnsDefaultBrowser() {\n String defaultBrowser = BROWSER_INSTALLED_SUPPORTING_WEBAPKS;\n mockInstallBrowsers(sInstalledBrowsers, defaultBrowser);\n setHostBrowserInMetadata(null);\n // Simulates that there isn't any host browser stored in the SharedPreference.\n setHostBrowserInSharedPreferences(null);\n\n String hostBrowser = WebApkUtils.getHostBrowserPackageName(mContext);\n Assert.assertEquals(defaultBrowser, hostBrowser);\n }", "PointerByReference wkhtmltoimage_create_global_settings();", "@BeforeClass\n public void BeforeTest(){\n Configuration.browser = \"Chrome\";\n\n }", "public void tener_acceso_a_la_plataforma() {\n\t\tbaseState.setUrl(\"http://km.choucairtesting.com/login/index.php\");\t\n\t\tbaseState.setBrowserType(BrowserType.GoogleChrome);\n\t\tbaseState.execute(desktop);\t\n\t\tSerenity.takeScreenshot();\n\t\t\n\t}", "@BeforeSuite\r\n\tpublic void before_suite() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"G:\\\\chromedriver.exe\");\r\n\t}", "@Given(\"^the user launch chrome application$\")\r\n\tpublic void the_user_launch_chrome_application() throws Throwable {\n\t w.browser();\r\n\t}", "public static ChromeOptions chromeCfg()\n {\n Map<String, Object> prefs = new HashMap<String, Object>();\n ChromeOptions cOptions = new ChromeOptions();\n\n // Settings\n prefs.put(\"profile.default_content_setting_values.cookies\", 2);\n prefs.put(\"network.cookie.cookieBehavior\", 2);\n prefs.put(\"profile.block_third_party_cookies\", true);\n\n // Create ChromeOptions to disable Cookies pop-up\n cOptions.setExperimentalOption(\"prefs\", prefs);\n\n return cOptions;\n }", "public void initDriver() {\n if (getBrowser().equals(\"firefox\")) {\n WebDriverManager.firefoxdriver().setup();\n if (System.getProperty(\"headless\") != null) {\n FirefoxOptions firefoxOptions = new FirefoxOptions();\n firefoxOptions.setHeadless(true);\n driver = new FirefoxDriver(firefoxOptions);\n } else {\n driver = new FirefoxDriver();\n }\n } else {\n WebDriverManager.chromedriver().setup();\n if (System.getProperty(\"headless\") != null) {\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.setHeadless(true);\n driver = new ChromeDriver(chromeOptions);\n } else {\n driver = new ChromeDriver();\n }\n }\n }", "@BeforeMethod(alwaysRun = true)\n public void browserSetup(){\n driver = new ChromeDriver();\n }", "public static void startGeckoDriver() {\r\n\t\tswitch (operatingSystem.toLowerCase().split(\" \")[0]) {\r\n\t\tcase \"windows\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"src//main//resources//drivers//geckodriver.exe\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"linux\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"src//main//resources//drivers//geckodriverLinux\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"mac os x\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"src/main//resources//drivers//geckodriverMac\");\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Operating system not supported.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"./browser/chromedriver.exe\");\r\n\t\t//DesiredCapabilities cap=new DesiredCapabilities();\r\n\t\t\r\n\t\tChromeOptions co=new ChromeOptions();\r\n\t\tco.addArguments(\"--disable-infobars\");\r\n\t\t//co.addArguments(\"--headless\");\r\n\t\tWebDriver driver=new ChromeDriver(co);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.close();\r\n\r\n\t}", "int wkhtmltoimage_set_global_setting(PointerByReference settings, Pointer name, Pointer value);", "@Before\n public void Setup() { //this is done before every test, chrome driver is saved in a specific location\n\n System.setProperty(\"webdriver.chrome.driver\",\n Constant.CROMEDRIVER);\n\n driver = new ChromeDriver();\n }", "static void setDefaults() {\n \n setDefault(FEATURE_POLICY_PERSISTENCE_PROPERTY, true);\n setDefault(FEATURE_ENRICHER_PERSISTENCE_PROPERTY, true);\n setDefault(FEATURE_FEED_PERSISTENCE_PROPERTY, true);\n setDefault(FEATURE_FEED_REGISTRATION_PROPERTY, false);\n setDefault(FEATURE_CATALOG_PERSISTENCE_PROPERTY, true);\n setDefault(FEATURE_DEFAULT_STANDBY_IS_HOT_PROPERTY, false);\n setDefault(FEATURE_USE_BROOKLYN_LIVE_OBJECTS_DATAGRID_STORAGE, false);\n setDefault(FEATURE_RENAME_THREADS, false);\n setDefault(FEATURE_BACKWARDS_COMPATIBILITY_INFER_CATALOG_ITEM_ON_REBIND, true);\n setDefault(FEATURE_AUTO_FIX_CATALOG_REF_ON_REBIND, false);\n setDefault(FEATURE_SSH_ASYNC_EXEC, false);\n setDefault(FEATURE_VALIDATE_LOCATION_SSH_KEYS, true);\n }", "@Before\n public void start() {\n\n driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n //driver.manage().window().maximize();\n wait = new WebDriverWait(driver, 10);\n }", "@BeforeTest //special type of testng method which alway run before.\r\n\t\t\tpublic void openBrowser() {\r\n\t\t\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\t\t\t\tdriver.get(\"https://locator.chase.com/\");\r\n\t\t\t}", "public void mo61199x() {\n this.f2489d.setWebViewClient(new C4752a(this.f2510k));\n this.f2489d.setWebChromeClient(new WebChromeClient() {\n public boolean onConsoleMessage(ConsoleMessage consoleMessage) {\n String str = \"MraidMode\";\n try {\n if (consoleMessage.messageLevel() == MessageLevel.ERROR) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"WebChromeClient console error: \");\n sb.append(consoleMessage.message());\n C5155g.m3807a(str, 6, sb.toString());\n if (consoleMessage.message().contains(\"mraid\")) {\n C5017f.m3256a(C4748d.this.mo61159b(), C5015d.EXCEPTION, \"MraidMode.ConsoleError\", consoleMessage.message(), \"\");\n }\n } else {\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"WebChromeClient console log: \");\n sb2.append(consoleMessage.message());\n C5155g.m3807a(str, 3, sb2.toString());\n }\n } catch (Exception e) {\n StringBuilder sb3 = new StringBuilder();\n sb3.append(\"WebChromeClient onConsoleMessage Exception: \");\n sb3.append(e.getMessage());\n C5155g.m3807a(str, 6, sb3.toString());\n }\n return super.onConsoleMessage(consoleMessage);\n }\n });\n }", "private void setLocalWebdriver() {\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setJavascriptEnabled(true);\n capabilities.setCapability(\"handlesAlerts\", true);\n switch (getBrowserId(browser)) {\n case 0:\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n driver.set(new InternetExplorerDriver(capabilities));\n break;\n case 1:\n driver.set(new FirefoxDriver(capabilities));\n break;\n case 2:\n driver.set(new SafariDriver(capabilities));\n break;\n case 3:\n driver.set(new ChromeDriver(capabilities));\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n }", "@Given(\"^Open URL in chrome browser$\")\r\n\tpublic void open_URL_in_chrome_browser() {\n\t nop.Launch(\"chrome\", \"http://automationpractice.com/index.php\");\r\n\t}", "public static void initialization() {\n\t\tSystem.out.println(\"**Open initialization**\");\r\n\t\tString browserName = props.getProperty(\"browser\");\r\n\t\tSystem.out.println(\"Browser User = \" + browserName + \" URL = \" + props.getProperty(\"url\"));\r\n\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"D:/Selenium Automation/chromedriver/chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\r\n\t\tdriver.get(props.getProperty(\"url\"));\r\n\t\tSystem.out.println(\"**Close initialization**\");\r\n\t}", "private void setSauceWebdriver() {\n\n switch (getBrowserId(browser)) {\n case 0:\n capabilities = DesiredCapabilities.internetExplorer();\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n break;\n case 1:\n capabilities = DesiredCapabilities.firefox();\n break;\n case 2:\n capabilities = DesiredCapabilities.safari();\n break;\n case 3:\n capabilities = DesiredCapabilities.chrome();\n break;\n case 4:\n capabilities = DesiredCapabilities.iphone();\n capabilities.setCapability(\"deviceName\",\"iPhone Simulator\");\n capabilities.setCapability(\"device-orientation\", \"portrait\");\n break;\n case 5:\n capabilities = DesiredCapabilities.iphone();\n capabilities.setCapability(\"deviceName\",\"iPad Simulator\");\n capabilities.setCapability(\"device-orientation\", \"portrait\");\n break;\n case 6:\n capabilities = DesiredCapabilities.android();\n capabilities.setCapability(\"deviceName\",\"Android Emulator\");\n capabilities.setCapability(\"device-orientation\", \"portrait\");\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n capabilities.merge(extraCapabilities);\n capabilities.setCapability(\"javascriptEnabled\", true);\n capabilities.setCapability(\"platform\", platform);\n capabilities.setCapability(\"version\", version);\n\n try {\n this.driver.set(new RemoteWebDriver(new URL(System\n .getProperty(\"SAUCE_KEY\")), capabilities));\n } catch (MalformedURLException e) {\n LOGGER.log(Level.INFO,\n \"MalformedURLException in setSauceWebdriver() method\", e);\n }\n }", "@BeforeTest\r\n\tpublic void launch()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Yogini\\\\chromedriver\\\\chromedriver.exe\"); //location of browser in local drive\r\n\t\tWebDriver driver = new ChromeDriver(); \r\n\t\tdriver.get(tobj.url);\r\n\t\tSystem.out.println(\"Before test, browser is launched\");\r\n\t}", "int wkhtmltoimage_set_global_setting(PointerByReference settings, String name, String value);", "@Test\n @Given(\"I launch browser\")\n public void s01_BrowserMaximizeLaunch() {\n System.setProperty(\"webdriver.chrome.driver\", \"src/ChromeDriver.exe\");\n// Init new instance of ChromeDriver.\n driver = new ChromeDriver();\n// Maximise browser window\n driver.manage().window().maximize();\n System.out.println(\"Step01 PASSED\");\n }", "@Test\n\t@BeforeSuite\n\tpublic void OpenBrowser() throws InterruptedException {\n\t\t\n\t\tdriver = new FirefoxDriver();\n\t\tdriver.get(\"https://www.gmail.com\");\n\t\tmanageInit();\n\t\n\t}", "private WebDriver createChromeDriver() {\n\t\tsetDriverPropertyIfRequired(\"webdriver.chrome.driver\", \"chromedriver.exe\");\n\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"disable-plugins\");\n\t\toptions.addArguments(\"disable-extensions\");\n\t\toptions.addArguments(\"test-type\");\n\n\t\t\n\t\t_driver = new ChromeDriver(options);\n\t\treturn _driver;\n\t}", "public static WebDriver setUp() {\n\t\n \t\n \tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\"); //if it doesn't work we can check with user.dir...\n \tdriver = new ChromeDriver(); //launch the Browser it opens empty page\n \tdriver.manage().window().maximize();\n \tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); //to wait globally\n \tdriver.get(\"http://166.62.36.207/humanresources/symfony/web/index.php/auth/login\");\n \t \n \treturn driver; //return object of the driver \t\n}", "public abstract GraphicsDevice getDefaultScreenDevice();", "@DISPID(1611005956) //= 0x60060004. The runtime will prefer the VTID if present\n @VTID(31)\n boolean newWithGS();", "public static void setGlobalsToDefaults(){\r\n\t\tGlobals.globalvars.put(\"gamestage\", \"none\");\r\n\t\tGlobals.globalvars.put(\"cleft\", 0);\r\n\t\t\r\n\t\tInteger[] prematch = {64, 20};\r\n \tGlobals.cdpresets.put(\"pregame\", prematch);\r\n \tInteger[] getready = {5, 1200};\r\n \tGlobals.cdpresets.put(\"prepare\", getready);\r\n \tInteger[] battle = {10, 1200};\r\n \tGlobals.cdpresets.put(\"fight\", battle);\r\n \t\r\n \tGlobals.countdowns.clear();\r\n \tGlobals.lobby.clear();\r\n\t}", "@Override\n public void changeGpu(String newGpu) {\n gpu = newGpu;\n }", "public static void main(String[] args) {\nString browser=\"ff\";\nif (browser.equals(\"chrome\")) {\n\tWebDriverManager.chromedriver().setup();\n\t// System.setProperty(\"webdriver.chrome.driver\", \"/Users/user/Downloads/chromedriver\");\n\tdriver=new ChromeDriver();\n}\nelse if (browser.equals(\"ff\")) {\n\tWebDriverManager.firefoxdriver().setup();\n\tdriver=new FirefoxDriver();\n}\nelse\n\tif (browser.equals(\"IE\")) {\n\t\tWebDriverManager.iedriver().setup();\n\t\tdriver=new InternetExplorerDriver();\n\t}\n\telse\n\t\tif (browser.equals(\"opera\")) {\n\t\t\tWebDriverManager.operadriver().setup();\n\t\t\tdriver=new OperaDriver();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"no defined driver\");\n\t\t}\n\n\ndriver.get(\"https://google.com\");\n\n\n\n\t\n\n\n\n\n\n\n\n\n\n\n\n\t}", "public static void main(String[] args) {\n\t\tString proppath = System.getProperty(\"user.dir\");\n\t\tSystem.setProperty(\"webdriver.crome.driver\", proppath + \"\\\\chromedriver.exe\");\n\t\t\n\t\t//Desiredcapabilities (General ChromeOptions)\n\t\tDesiredCapabilities dc = new DesiredCapabilities();\n\t\tdc.acceptInsecureCerts(); // to handle ssl certificates\n\t\t//or\n\t\tdc.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);\n\t\tdc.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);\n\t\t\n\t\t//ChromeOptions (Local browser options)\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.merge(dc);\n\t\toptions.setPageLoadStrategy(PageLoadStrategy.EAGER);\n\t\toptions.addArguments(\"--disable-notifications\");\n\t\t\n\t\t//Webdriver with ChromeOptions & DesiredCapabilities\n\t\tWebDriver driver = new ChromeDriver(options);\n\t\tdriver.manage().deleteAllCookies();\n\t\tdriver.manage().window().maximize();\n\n\t\tdriver.get(\"https://www.google.com/\");\n\t\tSystem.out.println(\"Before Processing >>>>\" + driver.getTitle());\n\t}", "@Test\n public void testReturnsNullWhenDefaultBrowserDoesNotSupportWebApks() {\n mockInstallBrowsers(sInstalledBrowsers, BROWSER_INSTALLED_NOT_SUPPORTING_WEBAPKS);\n setHostBrowserInMetadata(null);\n setHostBrowserInSharedPreferences(null);\n\n String hostBrowser = WebApkUtils.getHostBrowserPackageName(mContext);\n Assert.assertNull(hostBrowser);\n }", "public void Open_Browser() \r\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\");\r\n\t\t//Brower initiation\r\n\t\tdriver=new ChromeDriver();\r\n\t\t//maximize browser window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\r\n\t}", "@Override\n\tabstract public void setDefaultHTMLUserAgentSheet();", "private void initDriver(){\r\n String browserToBeUsed = (String) jsonConfig.get(\"browserToBeUsed\");\r\n switch (browserToBeUsed) {\r\n case \"FF\":\r\n System.setProperty(\"webdriver.gecko.driver\", (String) jsonConfig.get(\"fireFoxDriverPath\"));\r\n FirefoxProfile ffProfile = new FirefoxProfile();\r\n // ffProfile.setPreference(\"javascript.enabled\", false);\r\n ffProfile.setPreference(\"intl.accept_languages\", \"en-GB\");\r\n\r\n FirefoxOptions ffOptions = new FirefoxOptions();\r\n ffOptions.setProfile(ffProfile);\r\n driver = new FirefoxDriver(ffOptions);\r\n break;\r\n case \"CH\":\r\n String driverPath = (String) jsonConfig.get(\"chromeDriverPath\");\r\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\r\n\r\n Map<String, Object> prefs = new HashMap<String, Object>();\r\n prefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n\r\n ChromeOptions options = new ChromeOptions();\r\n options.setExperimentalOption(\"prefs\", prefs);\r\n options.addArguments(\"--lang=en-GB\");\r\n driver = new ChromeDriver(options);\r\n break;\r\n case \"IE\":\r\n System.setProperty(\"webdriver.ie.driver\", (String) jsonConfig.get(\"ieDriverPath\"));\r\n\r\n InternetExplorerOptions ieOptions = new InternetExplorerOptions();\r\n ieOptions.disableNativeEvents();\r\n ieOptions.requireWindowFocus();\r\n ieOptions.introduceFlakinessByIgnoringSecurityDomains();\r\n driver = new InternetExplorerDriver(ieOptions);\r\n }\r\n\r\n driver.manage().window().maximize();\r\n }", "protected void setJAIDefaultOptions() {\r\n\r\n\t\tthis.updateDynamicWelcomeText(\"Setting default JAI options...\");\r\n\r\n\t\tfinal long memCapacity = 1024L * 1024 * 1024; // 1024MByte\r\n\t\t// final long memCapacity = 0L; // 256MByte\r\n\t\t// final long tileCapacity = 1000L;\r\n\t\tJAI.getDefaultInstance().setTileCache(JAI.createTileCache(memCapacity));\r\n\t\tJAI.getDefaultInstance().setRenderingHint(\r\n\t\t\t\tJAI.KEY_CACHED_TILE_RECYCLING_ENABLED, Boolean.FALSE);\r\n\t\tTileScheduler ts = JAI.createTileScheduler();\r\n\t\tts.setPriority(Thread.MAX_PRIORITY);\r\n\t\t// ts.setParallelism(2); //default 2\r\n\t\tJAI.getDefaultInstance().setTileScheduler(ts);\r\n\r\n\t}", "boolean getIsGoogleCn();", "public static void chromeTest() throws Exception{\n driver = BrowserFactory.getDriver(\"chrome\");\n Thread.sleep(2000);\n\n driver.get(\"http://google.com\");\n Thread.sleep(3000);\n String title = driver.getTitle();\n driver.navigate().to(\"https://etsy.com\");\n Thread.sleep(2000);\n String title2 = driver.getTitle();\n driver.navigate().back();\n title = driver.getTitle();\n Thread.sleep(2000);\n driver.navigate().to(\"https://etsy.com\");\n title2 = driver.getTitle();\n driver.quit();\n }", "@BeforeClass(description = \"Before class: start the Chrome browser\")\n public void setUpBrowser()\n {\n reports = new ExtentReports(\"C:\\\\Dev\\\\ToDoMVCTEST\\\\HTML_Report\\\\Report.html\", true);\n HTMLReport htmlReport = new HTMLReport();\n htmlReport.log(\"STARTING BeforeClass\");\n htmlReport.logINFO(\"Initialization of browser's driver\");\n driver = getDriver();\n htmlReport.logINFO(\"Maximize the window of browser\");\n driver.manage().window().maximize();\n htmlReport.logINFO(\"Setting timeouts in seconds\");\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n }", "private static WebDriver launchChrome()\n\t{\n\t\tif (REMOTE_URL != null && !REMOTE_URL.equals(\"\")) {\n\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\t\ttry {\n\n\t\t\t\treturn new RemoteWebDriver(new URL(System.getProperty(\"RemoteUrl\")), capabilities);\n\t\t\t}\n\n\n\t\t\tcatch (MalformedURLException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\telse\n\t\t{\n\t\tURL chromeDriverURL = BrowserDriver.class.getResource(\"/drivers/chromedriver.exe\");\n\t\tFile file = new File(chromeDriverURL.getFile()); \n\t\tSystem.setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY, file.getAbsolutePath());\n\t\t\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--start-maximized\");\n\t\toptions.addArguments(\"--ignore-certificate-errors\");\n\t\t\n\t\treturn new ChromeDriver(options);\n\t\t}\n\t}", "@Test\n\tpublic void switchWindows() throws InterruptedException{\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", System.getProperty(\"user.dir\")+\"/chromedriver\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\n\t\tdriver.get(\"https://www.google.com/\");\n\t\tdriver.manage().window().maximize();\n\t\tdriver.findElement(By.xpath(\"(//input[@class='gLFyf gsfi'])[1]\")).sendKeys(\"cricbuzz\");\n\t\tdriver.findElement(By.xpath(\"(//input[@aria-label='Google Search'])[1]\")).click();;\n\t\tThread.sleep(3000);\n\n}", "public void setup(){\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"//Users//bpat12//Downloads//chromedriver\");\n\t\tdriver = new ChromeDriver();\n\t\tSystem.out.println(\"launch browser\");\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tdriver.get(url);\n\t}", "public void setGdi(boolean value);", "@BeforeClass\n public static void setup() {\n String driverPath = \"\";\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\n driver = new ChromeDriver();\n driver.manage().window().maximize();\n }", "public static WebDriver startChrome() {\n\t\treturn new ChromeDriver();\n\t}", "protected DesiredCapabilities getCapabilitiesForChrome(ExtentTest currentTest, ExtentReportGenerator extentReportGenerator){ //local physical device support for android still pending\n\t\tDesiredCapabilities desCap = new DesiredCapabilities();\n\t\t//desired caps go here\n\t\treturn desCap;\n\t}", "public static void setup(String browser) throws Exception{\n if(browser.equalsIgnoreCase(\"firefox\")){\n \tFile pathToBinary = new File(\"C:\\\\Program Files (x86)\\\\Mozilla Firefox 41\\\\firefox.exe\");\n \tFirefoxBinary binary = new FirefoxBinary(pathToBinary);\n \tFirefoxDriver driver = new FirefoxDriver(binary, new FirefoxProfile());\n \t\n \t//System.setProperty(\"webdriver.firefox.driver\",\"C:\\\\Program Files (x86)\\\\Mozilla Firefox\\\\firefox.exe\");\n \t/*DesiredCapabilities capabilies = DesiredCapabilities.firefox();\t\t\t\n capabilies.getBrowserName();\n capabilies.getVersion();*/\n \t\t\t\n \t//create Firefox instance\t \n //driver = new FirefoxDriver(); \n System.out.println(\"Browser Used: \"+browser);\n }\t \n //Check if parameter passed is 'Chrome'\n // https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/chrome/ChromeOptions.html\n // http://www.programcreek.com/java-api-examples/index.php?api=org.openqa.selenium.remote.DesiredCapabilities (Singleton)\n else if(browser.equalsIgnoreCase(\"chrome\")){\t \t \n System.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n ChromeOptions opt = new ChromeOptions();\n opt.setBinary(\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n opt.setExperimentalOption(\"Browser\", \"Chrome\");\n opt.getExperimentalOption(\"version\");\n \n// DesiredCapabilities capabilies = DesiredCapabilities.chrome();\n// capabilies.setBrowserName(\"chrome\");\n// capabilies.setPlatform(Platform.WINDOWS);\n// capabilies.setVersion(\"38\");\n// DesiredCapabilities capabilities = new DesiredCapabilities();\n \n //Create Chrome instance\n driver = new ChromeDriver(opt);\t \n }\n \n //Check if parameter passed is 'Safari'\t\n else if(browser.equalsIgnoreCase(\"safari\")){\t \t \n \tSystem.setProperty(\"webdriver.safari.driver\",\"C:/safaridriver.exe\");\n \t\n \t//System.setProperty(\"webdriver.safari.noinstall\", \"true\");\n \tdriver = new SafariDriver();\n \t\n /*\tSafariOptions options = new SafariOptions();\n \tSafariDriver driver = new SafariDriver(options);\n \tDesiredCapabilities capabilities = DesiredCapabilities.safari();\n \tcapabilities.setCapability(SafariOptions.CAPABILITY, options);*/\n }\n \n //Check if parameter passed is 'IE'\t \n else if(browser.equalsIgnoreCase(\"ie\")){\n \t//String IE32 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_32.exe\"; //IE 32 bit\n\t\t\tString IE64 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_64.exe\"; //IE 64 bit\n \tSystem.setProperty(\"webdriver.ie.driver\",IE64);\n \t\n /* \tDesiredCapabilities capabilies = DesiredCapabilities.internetExplorer();\n \tcapabilies.setBrowserName(\"ie\");\n capabilies.getBrowserName();\n capabilies.getPlatform();\n capabilies.getVersion();*/\n \n \t//Create IE instance\n \tdriver = new InternetExplorerDriver();\n }\t \n else{\t \n //If no browser passed throw exception\t \n throw new Exception(\"Browser is not correct\");\t \n }\t \n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\n\t}", "@Before\n\tpublic void setup() throws InterruptedException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"G:\\\\bahubali2\\\\chromedriver.exe\");\n\t\tdrv = new ChromeDriver();\n\t\t// launching gmail.com on the browser\n\t\tdrv.get(\"https://accounts.google.com/signin/v2/identifier?continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&service=mail&sacu=1&rip=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin\");\n\t\t// maximized the browser window\n\t\t//drv.manage().deleteAllCookies();\n\t\t\n\t\tdrv.manage().window().maximize();\n\t\tdrv.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t}", "private void tweakPlatformDefaults() {\n if (PlatformUtils.isAppCode()) {\n SHOW_MAIN_TOOLBAR = false;\n SHOW_ICONS_IN_MENUS = false;\n SHOW_MEMORY_INDICATOR = false;\n }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\r\n\t\tWebDriver driver =new ChromeDriver();\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void set_UseDefaults(boolean y) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaUseDefaultsCmd,\n \t\t (y) ? (byte) 1 : (byte) 0);\n UmlCom.check();\n }", "@BeforeClass\n\tpublic void initializebrowser() throws InterruptedException {\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", Chrome);\n\t\t// driver = new ChromeDriver(); \n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--disable-extensions\");\n\t\toptions.addArguments(\"test-type\");\n\t\toptions.addArguments(\"--disable-popup-blocking\");\n\t\tdriver = new ChromeDriver(options);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(common.URL);\n\t\tThread.sleep(3000);\n\n\t\t\n\t\t/*DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();\n\t\t \n\t\t //Method and Description - void setCapability(java.lang.String capabilityName, boolean value)\n\t\t capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);\n\t\t \n\t\t //Among the facilities provided by the System class are standard input, standard output, and error output streams; access to externally defined \"properties\"; a means of loading files and libraries; and a utility method for quickly copying a portion of an array.\n\t\t System.setProperty(\"webdriver.ie.driver\", common.IE);\n\t\t \n\t\t //InternetExplorerDriver(Capabilities capabilities)\n\t\t WebDriver driver = new InternetExplorerDriver(capabilities);\n\t\t \n\t\t driver.manage().window().maximize();\n\t\t driver.get(common.URL);\n\t\t Thread.sleep(3000);*/\n\t\t\n\t}", "int wkhtmltoimage_get_global_setting(PointerByReference settings, Pointer name, Pointer value, int vs);", "@Given(\"^user visit homepage$\")\n\tpublic void user_visit_homepage() throws Throwable {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Program Files\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t\t//\"key\",\"value\"\n\t\t//\"driver name\",\"path of driver\"\n\t\tdriver= new ChromeDriver();\n\t\t\n\t\t//driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);\n\t\t\n\t\t\n\t\t//open URL\n\t\tdriver.get(\"https://demo.oscommerce.com/\");\n\t\t\n\t\t//driver.get(\"https://www.amazon.com/\");\n\t\t}", "private void initChromeDriver(String appUrl) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"Drivers\\\\chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(appUrl);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t}", "public void setMonochrome(boolean monochrome) {\n this.monochrome = monochrome;\n }", "@BeforeClass\r\n public void beforeClass() {\n \tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\Tuan\\\\Downloads\\\\chromedriver.exe\");\r\n \tdriver = new ChromeDriver();\r\n \tdriver.get(\"http://daominhdam.890m.com/\");\r\n\t}", "@Override\n \tpublic void validateParam(Object obj) throws Exception {\n \t\t\n \t\tif(getChrome().isSelected() && !this.extension.getProxy().isChromeAvail()){\n \t\t\tgetFirefox().setSelected(true);\t\n \t\t\tlogger.info(\"ChromeDriver is not available, switching to the default browser.\");\n \t\t\tthis.extension.showChromeAlert();\n \t\t}\n \t}", "@Override\n @SuppressFBWarnings(\"DM_EXIT\")\n protected void initializeBrowserProcess() {\n try {\n LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER)\n .ensureInitialized(getApplicationContext());\n } catch (ProcessInitException e) {\n Log.e(TAG, \"Cannot load content_browsertests.\", e);\n System.exit(-1);\n }\n BrowserStartupController.get(getApplicationContext(), LibraryProcessType.PROCESS_BROWSER)\n .initChromiumBrowserProcessForTests();\n\n setContentView(getTestActivityViewId());\n mShellManager = (ShellManager) findViewById(getShellManagerViewId());\n mWindowAndroid = new ActivityWindowAndroid(this);\n mShellManager.setWindow(mWindowAndroid);\n\n Window wind = this.getWindow();\n wind.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);\n wind.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);\n wind.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);\n }", "@BeforeMethod\n\tpublic void setUp()\n\t{\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\Samsung\\\\Downloads\\\\chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\t \n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().deleteAllCookies();\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tdriver.manage().timeouts().pageLoadTimeout(50, TimeUnit.SECONDS);\n\t\t\n\t\tdriver.get(\"http://www.demo.guru99.com/V4/\");\n\t\t\n\t\t//To get login page Title\n\t\tString loginPageTitle = driver.getTitle();\n\t\tSystem.out.println(loginPageTitle);\n\t}", "public void mo6082b() {\n if (m14898d()) {\n C3720a.this.StartBrowser();\n }\n }" ]
[ "0.6337951", "0.5742156", "0.5717275", "0.5687143", "0.566238", "0.55908257", "0.55735373", "0.54669523", "0.5462612", "0.53578794", "0.5350454", "0.5348024", "0.53443956", "0.53422207", "0.5331029", "0.53234166", "0.53195405", "0.5305694", "0.52891755", "0.52825725", "0.5281975", "0.5274571", "0.52592033", "0.52476835", "0.523472", "0.5211488", "0.52018434", "0.5192791", "0.51687264", "0.51490283", "0.5147908", "0.5146615", "0.5137011", "0.51338375", "0.51330143", "0.51236904", "0.510858", "0.51079893", "0.50981414", "0.5096088", "0.5090798", "0.50565076", "0.5042517", "0.5041297", "0.5023692", "0.50039375", "0.49882954", "0.4979778", "0.49784312", "0.4963232", "0.4962453", "0.4956863", "0.4956754", "0.49456066", "0.49424714", "0.4930849", "0.4906095", "0.49053568", "0.4903265", "0.48992667", "0.48954692", "0.48837447", "0.48811036", "0.4878044", "0.4869567", "0.48656043", "0.48650575", "0.48518577", "0.4840925", "0.48383307", "0.48376226", "0.48355418", "0.48347613", "0.48256394", "0.48133695", "0.48081094", "0.48036605", "0.48023805", "0.4798472", "0.47977218", "0.47893244", "0.478697", "0.4785038", "0.47828084", "0.47805107", "0.47749096", "0.47743285", "0.47590718", "0.4756241", "0.4743716", "0.47377986", "0.47325316", "0.471864", "0.47125325", "0.47107235", "0.4709974", "0.47085398", "0.46996903", "0.4696035", "0.46866673" ]
0.48711714
64
if(new SymmetricTree().isSymmetric(null)) System.out.println("true"); else System.out.println("false");
public static void main(String[] args ) { char[] c = {'a','b','c'}; System.out.println(c.toString()); System.out.println(String.valueOf(c)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean Symmetric(Node t)\n {\n return isMirror(t,t);\n }", "public static void main(String[] args) {\n\t\tTreeNode root = new TreeNode(1,new TreeNode(2),new TreeNode(3));\n//\t\troot.left = new TreeNode(2,null,new TreeNode(4));\n//\t\troot.right = new TreeNode(2,null,new TreeNode(3));\n\t\tboolean res = new SymmetricTree101().isSymmetric(root);\n\t\tSystem.out.println(res);\n\t}", "public boolean isSymmetric(TreeNode root) {\n if(root == null)\n return true;\n else\n return checkSym(root.left, root.right);\n }", "public static void main(String[] args) {\n\t\tBinaryTree btree1 = new BinaryTree(1);\n\t\tbtree1.left = new BinaryTree(2);\n\t\tbtree1.right = new BinaryTree(2);\n\t\tSystem.out.println(isSymmetric(btree1));\n\t\t\n\t\t/*\t\n\t\t * 1\n\t\t \t/ \\\n\t\t 2 2\n\t\t \t\\\n\t\t \t 3\n\t\t \t \n\t\t */\n\t\tBinaryTree btree2 = new BinaryTree(1);\n\t\tbtree2.left = new BinaryTree(2);\n\t\tbtree2.right = new BinaryTree(2);\n\t\tbtree2.left.right = new BinaryTree(3);\n\t\tSystem.out.println(isSymmetric(btree2));\n\t\t\n\t\t/*\t \n\t\t * 1\n\t \t/ \\\n\t 2 2\n\t / \\ / \\\n\t 4 3 3 4\n\t \n\t */\n\t\tBinaryTree btree3 = new BinaryTree(1);\n\t\tbtree3.left = new BinaryTree(2);\n\t\tbtree3.right = new BinaryTree(2);\n\t\tbtree3.left.left = new BinaryTree(4);\n\t\tbtree3.left.right = new BinaryTree(3);\n\t\tbtree3.right.left = new BinaryTree(3);\n\t\tbtree3.right.right = new BinaryTree(4);\n\t\tSystem.out.println(isSymmetric(btree3));\n\t\t\n\t\t/*\n\t\t * \t 1\n\t \t/ \\\n\t 2 2 \n\t / \\ / \\\n\t 3 4 3 4\n\t \n\t */\n\t\tBinaryTree btree4 = new BinaryTree(1);\n\t\tbtree4.left = new BinaryTree(2);\n\t\tbtree4.right = new BinaryTree(2);\n\t\tbtree4.left.left = new BinaryTree(3);\n\t\tbtree4.left.right = new BinaryTree(4);\n\t\tbtree4.right.left = new BinaryTree(3);\n\t\tbtree4.right.right = new BinaryTree(4);\n\t\tSystem.out.println(isSymmetric(btree4));\n\t\t\n\t\t/*\t\t\n\t\t * \t 1\n\t \t/ \\\n\t 2 2\n\t / \\\n\t 3 3\n\t \n\t */\n\t\tBinaryTree btree5 = new BinaryTree(1);\n\t\tbtree5.left = new BinaryTree(2);\n\t\tbtree5.right = new BinaryTree(2);\n\t\tbtree5.left.left = new BinaryTree(3);\n\t\tbtree5.right.right = new BinaryTree(3);\n\t\tSystem.out.println(isSymmetric(btree5));\n\t\t\n\t}", "public boolean isSymmetric(TreeNode root) {\n if (root == null) {\n return true;\n }\n\n List<TreeNode> stack = new ArrayList<>(Arrays.asList(root.left, root.right));\n\n while (!stack.isEmpty()) {\n TreeNode L = stack.remove(stack.size() - 1);\n TreeNode R = stack.remove(stack.size() - 1);\n\n if (L == null && R == null) {\n continue;\n } else if (L == null || R == null || L.val != R.val) {\n return false;\n }\n\n stack.add(L.left);\n stack.add(R.right);\n\n stack.add(L.right);\n stack.add(R.left);\n }\n\n return true;\n }", "public static void test03() {\n TreeNode n1 = new TreeNode(7);\n TreeNode n2 = new TreeNode(7);\n TreeNode n3 = new TreeNode(7);\n TreeNode n4 = new TreeNode(7);\n TreeNode n5 = new TreeNode(7);\n TreeNode n6 = new TreeNode(7);\n\n assemble(n1, n2, n3);\n assemble(n2, n4, n5);\n assemble(n3, n6, null);\n System.out.println(isSymmetrical(n1));\n }", "public boolean isSymmetric1(TreeNode root) {\n if (root == null) return true;\n return compare(root.left, root.right);\n }", "public static boolean IsSymmetric(Node node) {\n return areMirror2(node,node);\n\n }", "public static void main(String[] args) {\n\t\tTreeNode a = new TreeNode(1);\n\t\tTreeNode b = new TreeNode(2);\n\t\tTreeNode c = new TreeNode(3);\n\t\tTreeNode d = new TreeNode(4);\n\t\tTreeNode e = new TreeNode(4);\n\t\tTreeNode f = new TreeNode(3);\n\t\tTreeNode g = new TreeNode(2);\n\t\tTreeNode n = new TreeNode(1);\n\t\tn.left = new TreeNode(2);\n\t\tn.right = new TreeNode(2);\n\t\tn.left.right = new TreeNode(3);\n\t\tn.right.right = new TreeNode(3);\n\t\ta.left =b;\n\t\ta.right = g;\n\t\tb.left =c;\n\t\tb.right = d;\n\t\tg.left = e;\n\t\tg.right = f;\n\t\tSystem.out.println(isSymmetric(a));\n\t\tSystem.out.println(isSymmetric(n));\n\t}", "public boolean isSymmetric(TreeNode root) {\n if (root == null) return true;\n Queue<TreeNode> ql = new LinkedList<>();\n Queue<TreeNode> qr = new LinkedList<>();\n ql.add(root.left);\n qr.add(root.right);\n while (!ql.isEmpty() && !qr.isEmpty()) {\n TreeNode l = ql.remove();\n TreeNode r = qr.remove();\n if (l == null && r == null) continue;\n if (l == null || r == null) return false;\n if (l.val != r.val) return false;\n ql.add(l.left);\n ql.add(l.right);\n qr.add(r.right);\n qr.add(r.left);\n }\n return true;\n }", "public static boolean isSymmetric(TreeNode root) {\n\t\tif (null == root) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn isSymmetric(root.left, root.right);\n\t}", "public static boolean IsSymmetric(Node node) {\r\n boolean res = areMirror(node, node);\r\n return res;\r\n }", "public static boolean isSymmetricX(TreeNode t1, TreeNode t2){\n\t\tif(t1 == null && t2 == null){\n\t\t\treturn true;\n\t\t}\n\t\telse if(t1 != null && t2 == null || t1 == null && t2 != null){\n\t\t\treturn false;\n\t\t}\n\t\telse if(t1.val != t2.val){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\treturn isSymmetricX(t1.left, t2.right) && isSymmetricX(t1.right, t2.left);\n\t\t}\n\t}", "public static boolean IsSymmetric(Node node) {\n return areMirror(node,node);\n }", "public static void test01() {\n TreeNode n1 = new TreeNode(1);\n TreeNode n2 = new TreeNode(2);\n TreeNode n3 = new TreeNode(2);\n TreeNode n4 = new TreeNode(4);\n TreeNode n5 = new TreeNode(6);\n TreeNode n6 = new TreeNode(6);\n TreeNode n7 = new TreeNode(4);\n TreeNode n8 = new TreeNode(8);\n TreeNode n9 = new TreeNode(9);\n TreeNode n10 = new TreeNode(10);\n TreeNode n11 = new TreeNode(11);\n TreeNode n12 = new TreeNode(11);\n TreeNode n13 = new TreeNode(10);\n TreeNode n14 = new TreeNode(9);\n TreeNode n15 = new TreeNode(8);\n assemble(n1, n2, n3);\n assemble(n2, n4, n5);\n assemble(n3, n6, n7);\n assemble(n4, n8, n9);\n assemble(n5, n10, n11);\n assemble(n6, n12, n13);\n assemble(n7, n14, n15);\n assemble(n8, null, null);\n assemble(n9, null, null);\n assemble(n10, null, null);\n assemble(n11, null, null);\n assemble(n12, null, null);\n assemble(n13, null, null);\n assemble(n14, null, null);\n assemble(n15, null, null);\n System.out.println(isSymmetrical(n1));\n }", "public static boolean isSymmetric(TreeNode left, TreeNode right) {\n\t\tif (left == null && right == null) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (left == null || right == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn left.val == right.val && isSymmetric(left.left, right.right)\n\t\t\t\t&& isSymmetric(left.right, right.left);\n\t}", "public static void test02() {\n TreeNode n1 = new TreeNode(1);\n TreeNode n2 = new TreeNode(2);\n TreeNode n3 = new TreeNode(2);\n TreeNode n4 = new TreeNode(4);\n TreeNode n5 = new TreeNode(5);\n TreeNode n6 = new TreeNode(6);\n TreeNode n7 = new TreeNode(4);\n TreeNode n8 = new TreeNode(8);\n TreeNode n9 = new TreeNode(9);\n TreeNode n10 = new TreeNode(10);\n TreeNode n11 = new TreeNode(11);\n TreeNode n12 = new TreeNode(11);\n TreeNode n13 = new TreeNode(10);\n TreeNode n14 = new TreeNode(9);\n TreeNode n15 = new TreeNode(8);\n assemble(n1, n2, n3);\n assemble(n2, n4, n5);\n assemble(n3, n6, n7);\n assemble(n4, n8, n9);\n assemble(n5, n10, n11);\n assemble(n6, n12, n13);\n assemble(n7, n14, n15);\n assemble(n8, null, null);\n assemble(n9, null, null);\n assemble(n10, null, null);\n assemble(n11, null, null);\n assemble(n12, null, null);\n assemble(n13, null, null);\n assemble(n14, null, null);\n assemble(n15, null, null);\n System.out.println(isSymmetrical(n1));\n }", "boolean hasIsCentralNode();", "public boolean isSymbolic() throws PDFNetException {\n/* 583 */ return IsSymbolic(this.a);\n/* */ }", "public boolean IsTree() {\r\n\t\treturn this.IsConnected() && !this.IsCyclic();\r\n\t}", "public boolean isSymmetric() {\n int nr = data.length, nc = data[0].length;\n if (nr != nc)\n return false;\n\n for (int i = 0; i < nc; i++) {\n for (int j = 0; j < i; j++) {\n if (data[i][j] != data[j][i])\n return false;\n }\n }\n return true;\n }", "public boolean isRealNode();", "public boolean isRealNode();", "public static void main(String[] args) {\n\t\t\r\n\t\tint[] arr1 = {1,2,3};\r\n\r\n\t\tSolution sl = new Solution();\r\n\t\tTreeNode root1 = new TreeNode(arr1[0]);\r\n\t\troot1 = createTree(root1, arr1, 0);\r\n\r\n\t\tinOrder(root1);\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tSystem.out.println(sl.isSymmetric(root1));\r\n\t\tSystem.out.print(\" \");\r\n\t}", "@Override\r\n\tpublic boolean isSymmetricLink(Entity source, Entity target)\r\n\t{\r\n\t\treturn (directedGraph.findEdge(source, target) != null)\r\n\t\t\t\t&& (directedGraph.findEdge(target, source) != null);\r\n\t}", "public boolean isCanonical() {\n/* 244 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "boolean isMirror();", "boolean getRecursiveNull();", "private boolean check() {\n if (!isBST()) System.out.println(\"Not in symmetric order\");\n if (!isSizeConsistent()) System.out.println(\"Subtree counts not consistent\");\n if (!isRankConsistent()) System.out.println(\"Ranks not consistent\");\n return isBST() && isSizeConsistent() && isRankConsistent();\n }", "boolean isDirected();", "public boolean isTree() {\n\t\tif (vertices.size() == 0 || vertices.size() == 1) return true;\n\t\tSet<String> visited = new HashSet<String>();\n\t\treturn !isCyclicUtil(vertices.iterator().next(), visited, null) && visited.size() == vertices.size();\n\t}", "boolean hasNode()\n/* */ {\n/* 473 */ if ((this.bn == null) && (this.mn == null)) return false;\n/* 474 */ if (this.jt == null) return false;\n/* 475 */ return true;\n/* */ }", "public static boolean isSymmetric(int num) {\n\t\tboolean isSym = true;\n\t\t\n\t\t/* Convert the primitive type int to String */\n\t\tString numString = \"\" + num;\n\t\t\n\t\t/* Find the middle */\n\t\tint numLength = numString.length() / 2;\n\t\t\n\t\tfor (int i = 0, j = numString.length()-1; i <= numLength; i++, j--) {\n\t\t\tif(numString.charAt(i) == numString.charAt(j)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/* The 2 numbers defining if a number is symmetrical are not equal. Quitting the loop */\n\t\t\tisSym = false;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn isSym;\n\t}", "private static boolean isMirrorImage(Tree left, Tree right){\n if(left==null || right == null){\n return (left==null && right==null);\n }\n\n return left.data==right.data && isMirrorImage(left.left,right.right) && isMirrorImage(left.right,right.left);\n}", "boolean hasIsNodeOf();", "boolean isUnary() {\r\n\t\treturn (n2==null) && (t2==null);\r\n\t}", "boolean isCommutative();", "public boolean isRealNode()\r\n\t\t{\r\n\t\t\tif (this.key == -1)\r\n\t\t\t\treturn false;\r\n\t\t\treturn true; \r\n\t\t}", "boolean hasNarratorChain();", "public boolean isDirected();", "public boolean isDirected();", "boolean hasNode();", "boolean hasNode();", "public boolean isHierarchical() {\n/* 2889 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean isLeaf()\r\n {\r\n return this.getLeft()==null&&this.getRight()==null;\r\n }", "public Boolean isLeaf(){\r\n\t\tif(getLeft()==null&&getRight()==null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isTree() {\r\n\t\tif (isConnected() && !isCyclic())\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean isLeaf() {\n\t\treturn (left==null)&&(right==null);\r\n\t}", "@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}", "boolean isLeaf();", "boolean isLeaf();", "boolean isLeaf();", "boolean isLeaf();", "public boolean isLeaf(){\n\t\t// return right == null && left == null && middle == null\n\t\treturn right==null && left == null && middle == null;\n\t}", "public boolean isLeaf()\n\t{\n\t\treturn left == null && right == null;\n\t}", "private boolean isBST() {\r\n return isBST(root, null, null);\r\n }", "boolean hasSameAs();", "private boolean isBST() {\n return isBST(root, null, null);\n }", "boolean hasS2();", "boolean isNilExchange();", "boolean hasSide();", "public boolean percolates(){\n\t\tif(isPathological)\n\t\t\treturn isOpen(1,1);\n\t\t//System.out.println(\"Root top: \"+ quickUnion.find(N+2));\n\t\t\n\t\treturn (quickUnion.find(N*N+1) == quickUnion.find(0)); \t\n\t}", "public Sym getSym(){\n return null;\n }", "public abstract boolean deterministic () ;", "public boolean isNeedMirrorSelfie() {\n return true;\n }", "boolean isNilIsManaged();", "Collection<? extends Boolean> getIsCentralNode();", "public boolean isDirect()\r\n/* 76: */ {\r\n/* 77:111 */ return false;\r\n/* 78: */ }", "boolean isOp();", "@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }", "public boolean hasData(int aSym);", "private boolean ifLeaf(Node myT) {\r\n return myT != null && myT.left == null && myT.right == null;\r\n }", "boolean isTransitive();", "private boolean isLeafNode() {\r\n return (this.left == null && this.right == null);\r\n }", "boolean hasIsVertexOf();", "@Override\n\tpublic boolean isConnected() {\n\t\tif(this.GA.nodeSize() ==1 || this.GA.nodeSize()==0) return true;\n\t\tgraph copied = this.copy();\n\t\ttagZero(copied);\n\t\tCollection<node_data> s = copied.getV();\n\t\tIterator it = s.iterator();\n\t\tnode_data temp = (node_data) it.next();\n\t\tDFSUtil(copied,temp);\n\t\tfor (node_data node : s) {\n\t\t\tif (node.getTag() == 0) return false;\n\t\t}\n\t\ttransPose(copied);\n\t\ttagZero(copied);\n\t Collection<node_data> s1 = copied.getV();\n\t\tIterator it1 = s1.iterator();\n\t\tnode_data temp1 = (node_data) it1.next();\n\t\tDFSUtil(copied,temp1);\n\t\tfor (node_data node1 : s1) {\n\t\t\tif (node1.getTag() == 0) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "boolean hasHasNodeID();", "boolean hasRecursive();", "public boolean wantAnyTreeFloats() {\n return true;\n }", "public boolean hasSymbolicLinksEnabled(SrvSession sess, TreeConnection tree) {\n\n // Access the associated database interface to check if it supports symbolic links\n \n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n if ( dbCtx.getDBInterface().supportsFeature( DBInterface.FeatureSymLinks)) {\n \n // Database interface supports symbolic links\n\n return true;\n }\n \n // Symbolic links not supported\n \n return false;\n }", "boolean hasAstRoot();", "abstract boolean isLeaf();", "boolean hasIdentity();", "public boolean isRootContextNode();", "public boolean isRealNode() {\n\t\t\tif (this.getHeight() != -1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public static void main(String[] args) {\n TreeNode root = new TreeNode(3);//true\n root.left = new TreeNode(9);\n root.right = new TreeNode(20);\n root.right.left = new TreeNode(15);\n root.right.right = new TreeNode(7);\n\n // 1\n // / \\\n // 2 2\n // / \\\n // 3 3\n // / /\n // 4 4\n TreeNode root2 = new TreeNode(1);//false\n root2.left = new TreeNode(2);\n root2.right = new TreeNode(2);\n root2.left.left = new TreeNode(3);\n root2.right.right = new TreeNode(3);\n root2.left.left.left = new TreeNode(4);\n root2.right.right.left = new TreeNode(4);\n System.out.println(new Solution().isBalanced(root2));\n }", "public boolean isLeaf()\n\t{\n\t\t//if left is null right must also be null, and vice versa\n\t\t//only have to check one case\n\t\tif (null == left)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "boolean hasSig();", "public static <N, E extends Edge<N>> boolean isSimple(final Graph<N, E> graph)\n\t{\n\t\tif( graph instanceof ConnectionismOptimizedGraph )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn ((ConnectionismOptimizedGraph)graph).isSimple();\n\t\t\t}\n\t\t\tcatch(UnsupportedOperationException caught)\n\t\t\t{\n\t\t\t\t// if it is not supported, lets handle it as if it was not\n\t\t\t\t// optimized\n\t\t\t}\n\t\t}\n\n\t\tfor(final N currentNode : graph.getNodes())\n\t\t{\n\t\t\tfinal List<N> neighbors = graph.getAdjacentNodes(currentNode);\n\t\t\tfinal Set<N> uniqueNeighbors = new HashSet<N>(neighbors);\n\t\t\tif( neighbors.size() > uniqueNeighbors.size() )\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean isNilConstraints();", "public boolean isLeafContextNode();", "boolean hasBasis();", "boolean hasRt();", "public boolean isDirect();", "@Test\n\tpublic void testSymmetry() {\n\t\tPosition first = new Position(1,2);\n\t\tPosition second = new Position(4, 1);\n\n\t\tint firstDistance = euclideanSquaredMetric.calculateCost(first, second);\n\t\tint secondDistance = euclideanSquaredMetric.calculateCost(second, first);\n\n\t\tassertTrue(firstDistance == secondDistance);\n\t}", "public boolean isSymmetricRtp()\n { return symmetric_rtp;\n }", "boolean hasIsMidNode();", "boolean hasDepth();", "boolean hasDepth();", "boolean isSolid();", "public abstract boolean isBinarySearchTree();" ]
[ "0.781837", "0.7712545", "0.7430719", "0.7402568", "0.70720106", "0.70686024", "0.70469344", "0.70223445", "0.7022028", "0.7005673", "0.69940406", "0.69309294", "0.689961", "0.68905014", "0.6591731", "0.6590204", "0.6561773", "0.6313953", "0.6298852", "0.62712735", "0.61985064", "0.60915613", "0.60915613", "0.60908276", "0.60812885", "0.5972656", "0.5945816", "0.5922096", "0.5845508", "0.58433115", "0.5832204", "0.58112544", "0.57854146", "0.57847065", "0.5783636", "0.5769662", "0.57649744", "0.57543784", "0.57461435", "0.57328725", "0.57328725", "0.57163876", "0.57163876", "0.5706208", "0.5703919", "0.5693584", "0.5692562", "0.5660914", "0.56412745", "0.5635345", "0.5635345", "0.5635345", "0.5635345", "0.56129247", "0.5608169", "0.5606431", "0.55937254", "0.5593008", "0.55910355", "0.5584092", "0.5577399", "0.5554903", "0.5552454", "0.55482554", "0.55028045", "0.5494757", "0.5493261", "0.5488967", "0.54745245", "0.54735047", "0.54696083", "0.5460921", "0.54498005", "0.5448005", "0.54176664", "0.5413735", "0.5406507", "0.5401238", "0.5396017", "0.5394766", "0.53919494", "0.53866816", "0.53845304", "0.5378423", "0.5377159", "0.5374951", "0.5355653", "0.5353241", "0.53504914", "0.5346135", "0.53441244", "0.53395945", "0.53375417", "0.53353906", "0.5329414", "0.53212243", "0.53209364", "0.531927", "0.531927", "0.53172183", "0.53137493" ]
0.0
-1
Create a new instance.
public MinecraftUpdater(MinecraftInstall instance) { this.instance = instance; this.environment = instance.getEnvironment(); File temporaryDir = instance.getProfile().getTemporaryDir(); installer = new InstallerRuntime(executor, environment); installer.setTemporaryDir(temporaryDir); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Instance createInstance();", "public void create(){}", "public Instance() {\n }", "private Instantiation(){}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "void create(T instance) throws IOException;", "Reproducible newInstance();", "public void create() {\n\t\t\n\t}", "public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}", "public T newInstance();", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "T create();", "T create();", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public CMObject newInstance();", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "@Override\n\tpublic void create() {\n\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "public abstract void create();", "@Override\n\tpublic void create () {\n\n\t}", "public Instance() {\n super(Routing.NAMESPACE, \"instance\");\n }", "InstanceModel createInstanceOfInstanceModel();", "public static void createInstance()\n {\n if (instance == null) {\n // Create the instance\n instance = new SalesOrderDataSingleton();\n }\n }", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "private synchronized static void createInstance() {\n if (INSTANCE == null) { \n INSTANCE = new DataConnection();\n }\n }", "public Factory() {\n\t\tsuper();\n\t}", "@SuppressWarnings(\"unchecked\")\n public T newInstance()\n throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n if (constructor_ == null) {\n constructor_ = getRawClass().getConstructor();\n }\n\n return (T)constructor_.newInstance();\n }", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "public static void createInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}", "public abstract boolean create(T newInstance);", "<T> T newInstance(URI description) throws EnvironmentException;", "public Taginstance() {\n\t\tthis(\"taginstance\", null);\n\t}", "private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "public Idea create() {\n \t\t\tIdea idea = new Idea();\n \n \t\t\treturn idea;\n \t\t}", "public static void createInstance(Model model, Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}", "@Override\r\n public void instantiate() {\r\n }", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "protected abstract void construct();", "public ApplicationCreator() {\n }", "public SingleRequest<?> create() {\n return new SingleRequest<>();\n }", "public ObjectFactory() {\n super(grammarInfo);\n }", "@Override\n\tpublic LightTank create() {\n\t\treturn new LightTank(GameContext.getGameContext());\n\t}", "T create() throws PersistException;", "public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}", "public Factory() {\n this(getInternalClient());\n }", "public ObjectFactory() {\n\t}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public Open() {\n //creates a new open instance\n }", "public ObjectFactory() {\r\n\t}", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "For createFor();", "private static void createInstance() {\n if (mApiInterface == null) {\n synchronized(APIClient.class) {\n if (mApiInterface == null) {\n mApiInterface = buildApiClient();\n }\n }\n }\n }", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "Snapshot create();", "public void test_ctor() {\n assertNotNull(\"instance should be created.\", instance);\n }", "@Override\n\tpublic ModIndexedInstance createNewInstance() {\n\t\tModIndexedInstance newInst = new ModIndexedInstance(); // create the new instance\n\t\tnewInst.setRegComp(this); // set component type of new instance\n\t\taddInstanceOf(newInst); // add instance to list for this comp\n\t\treturn newInst;\n\t}", "void create( State state );", "public Produto() {}", "public static void main(String[] args) throws IOException {\n \n CreateInstance createInstance = new CreateInstance();\n\n try {\n createInstance.init(args);\n Flavor flavor = createInstance.getFlavor();\n createInstance.createInstance(flavor);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n createInstance.close();\n }\n }", "public static Book createEntity() {\n Book book = new Book()\n .idBook(DEFAULT_ID_BOOK)\n .isbn(DEFAULT_ISBN)\n .title(DEFAULT_TITLE)\n .author(DEFAULT_AUTHOR)\n .year(DEFAULT_YEAR)\n .publisher(DEFAULT_PUBLISHER)\n .url_s(DEFAULT_URL_S)\n .url_m(DEFAULT_URL_M)\n .url_l(DEFAULT_URL_L);\n return book;\n }", "public static synchronized void constructInstance()\n {\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, false );\n\n if ( ourInstance != null )\n {\n throw new IllegalStateException( myName + \" Already Constructed\" );\n }\n ourInstance = new ElbowSubsystem();\n\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, true );\n }", "Klassenstufe createKlassenstufe();", "DynamicInstance createDynamicInstance();", "public void testConstructor() {\r\n assertNotNull(\"unable to create instance\", instance);\r\n }", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "void create(T t);", "public static IPCGCallDetailCreator instance()\r\n {\r\n if (instance == null)\r\n {\r\n instance = new IPCGCallDetailCreator();\r\n }\r\n return instance;\r\n }", "public Activator() {\r\n\t}", "@Override\r\n\tpublic ItemInstance createItemInstance() {\n\t\treturn new HpInstance();\r\n\t}", "T newInstance(Object... args);", "public T safeNewInstance() {\n try {\n return newInstance();\n } catch (NoSuchMethodException e) {\n throw new IllegalArgumentException(e);\n } catch (IllegalAccessException e) {\n throw new IllegalArgumentException(e);\n } catch (InvocationTargetException e) {\n throw new IllegalArgumentException(e);\n } catch (InstantiationException e) {\n throw new IllegalArgumentException(e);\n }\n }", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "public Model() {\n\t}", "public Model() {\n\t}", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.7856344", "0.7297506", "0.7190777", "0.7127816", "0.70360863", "0.69051784", "0.6813679", "0.67574406", "0.6720743", "0.67055887", "0.66634166", "0.66509396", "0.66509396", "0.66497475", "0.6614444", "0.656769", "0.6566887", "0.652523", "0.6489371", "0.64792", "0.6469803", "0.64636576", "0.64393514", "0.6321882", "0.6275043", "0.62730247", "0.6260265", "0.6240543", "0.6209885", "0.61780596", "0.61729485", "0.616454", "0.6157075", "0.61501217", "0.6111954", "0.60838616", "0.6040035", "0.6025259", "0.6012407", "0.5999213", "0.5979572", "0.59750104", "0.5967036", "0.5955364", "0.5955364", "0.5955364", "0.5947893", "0.5933223", "0.59014374", "0.59010714", "0.5900167", "0.5899628", "0.5898611", "0.58976215", "0.58948785", "0.58926153", "0.58899117", "0.58886194", "0.5879765", "0.58792996", "0.58736473", "0.58511376", "0.58511376", "0.5848479", "0.58465594", "0.5842973", "0.5839303", "0.5833458", "0.5830305", "0.58247954", "0.5808021", "0.58075076", "0.5807484", "0.5806005", "0.5803778", "0.58007973", "0.5791398", "0.5790655", "0.5789477", "0.5787487", "0.5780606", "0.5769286", "0.5762539", "0.5762539", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392", "0.5754392" ]
0.0
-1
Get the URL of the JSON file that tells information about the desired version.
private URL getManifestUrl() { return new URL(VERSION_MANIFEST_URL.replace("%s", "1.7.2")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getVersionInfo(String pmaCoreURL) {\n\t\tif (pmaCoreURL == null) {\n\t\t\tpmaCoreURL = pmaCoreLiteURL;\n\t\t}\n\t\tString url = PMA.join(pmaCoreURL, \"api/json/GetVersionInfo\");\n\t\tString version = null;\n\t\tif (PMA.debug) {\n\t\t\tSystem.out.println(url);\n\t\t}\n\t\ttry {\n\t\t\tURL urlResource = new URL(url);\n\t\t\tHttpURLConnection con;\n\t\t\tif (url.startsWith(\"https\")) {\n\t\t\t\tcon = (HttpsURLConnection) urlResource.openConnection();\n\t\t\t} else {\n\t\t\t\tcon = (HttpURLConnection) urlResource.openConnection();\n\t\t\t}\n\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\tString jsonString = PMA.getJSONAsStringBuffer(con).toString();\n\t\t\tif (PMA.isJSONObject(jsonString)) {\n\t\t\t\tJSONObject jsonResponse = PMA.getJSONObjectResponse(jsonString);\n\t\t\t\tif (jsonResponse.has(\"Code\")) {\n\t\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\t\tPMA.logger.severe(\"getVersionInfo failed : \" + jsonResponse.get(\"Message\"));\n\t\t\t\t\t}\n\t\t\t\t\tthrow new Exception(\"getVersionInfo failed : \" + jsonResponse.get(\"Message\"));\n\t\t\t\t} else if (jsonResponse.has(\"d\")) {\n\t\t\t\t\tversion = jsonResponse.getString(\"d\");\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tversion = jsonString.replaceAll(\"\\\"$|^\\\"\", \"\");\n\t\t\t}\n\n\t\t\tif (version.startsWith(\"3.0\")){\n\t\t\t\tString revision = getBuildRevision(pmaCoreURL);\n\t\t\t\tif (!revision.isEmpty()){\n\t\t\t\t\tversion += \".\" + revision;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn version;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "public static URL buildUrl() {\n Uri builtUri = Uri.parse(CONTENT_JSON_URL).buildUpon()\n .build();\n\n URL url = null;\n try {\n url = new URL(builtUri.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n return url;\n }", "public URL getCveJsonUrlModified() {\n return cveJsonUrlModified;\n }", "@Nullable public URL getUpdateURL(final PluginVersion version) {\n final Pair<URL, String> p = downloadInfo.get(version);\n if (p == null) {\n return null;\n }\n return p.getFirst();\n }", "String getSpecUrl();", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "public static String getVersionInfo() {\n return getCommonManifestEntry(getJarPathFromClassPath(getAppJarName()),null);\n }", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "public String getURL(Version version) {\n return getUrl() + version.getDocument().getDocumentURL();\n }", "@RequestMapping(value = { \"/\", \"/version\" }, method = RequestMethod.GET)\n\tpublic @ResponseBody Map<String, String> version() {\n\t\tMap<String, String> message = new HashMap<String, String>();\n\n\t\tmessage.put(\"name\", props.getProperty(\"build.artifact\"));\n\t\tmessage.put(\"version\", props.getProperty(\"build.version\"));\n\t\tmessage.put(\"timestamp\", props.getProperty(\"build.time\"));\n\n\t\treturn message;\n\t}", "public URL getCveJsonUrlBase() {\n return cveJsonUrlBase;\n }", "public static String getVersion() {\n\n try {\n //Open file\n ClassLoader classLoader = new ResourceLoader().getClass().getClassLoader();\n File file = new File(classLoader.getResource(RELEASE_NOTES).getFile());\n //Read File Content\n String content = new String(Files.readAllBytes(file.toPath()));\n content = content.split(\"VERSION \")[1]; //version number comes after VERSION\n content = content.split(\"\\n\")[0]; //and before the next new line\n return content;\n } catch (IOException ex) {\n Logger.getLogger(ResourceLoader.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n\n }", "public String toString() {\n return path + RegistryConstants.URL_SEPARATOR + \"version:\" + version;\n }", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "private String getRevision() {\r\n Properties p = new Properties();\r\n try{\r\n String toolsdir = System.getProperty(Main.TOOLSDIR);\r\n File sourceProp;\r\n if (toolsdir == null || toolsdir.length() == 0) {\r\n sourceProp = new File(SdkConstants.FN_SOURCE_PROP);\r\n } else {\r\n sourceProp = new File(toolsdir, SdkConstants.FN_SOURCE_PROP);\r\n }\r\n FileInputStream fis = null;\r\n try {\r\n fis = new FileInputStream(sourceProp);\r\n p.load(fis);\r\n } finally {\r\n if (fis != null) {\r\n try {\r\n fis.close();\r\n } catch (IOException ignore) {\r\n }\r\n }\r\n }\r\n\r\n String revision = p.getProperty(PkgProps.PKG_REVISION);\r\n if (revision != null) {\r\n return revision;\r\n }\r\n } catch (FileNotFoundException e) {\r\n // couldn't find the file? don't ping.\r\n } catch (IOException e) {\r\n // couldn't find the file? don't ping.\r\n }\r\n\r\n return \"?\";\r\n }", "String offerVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "@GET\n @Produces({\"application/xml\", \"application/json\"})\n @Path(\"/{version}\")\n public String query(@PathParam(\"version\") String version) {\n if (version.equals(NPSGlobalState.getTopologyManager().getTopologyOntHeadModelVersion())) {\n return \"LATEST\";\n }\n return \"OUTDATED\";\n }", "java.lang.String getArtifactUrl();", "private static String getVersion() throws IOException {\n URL res = Main.class.getResource(\"/META-INF/MANIFEST.MF\");\n if(res!=null) {\n Manifest manifest = new Manifest(res.openStream());\n String v = manifest.getMainAttributes().getValue(\"Implementation-Version\");\n if(v!=null)\n return v;\n }\n return \"?\";\n }", "private static String getInfoLink(JSONObject volumeInfo) throws JSONException {\n return volumeInfo.getString(\"infoLink\");\n }", "public String getPackageDownloadUrl();", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "default String getVersion()\n {\n return getString( \"version\", \"Unknown Version\");\n }", "private static String getSourceFile() {\n\t\tFileChooser fileChooser = new FileChooser(System.getProperty(\"user.home\"),\n\t\t\t\t\"Chose json file containing satellite data!\", \"json\");\n\t\tFile file = fileChooser.getFile();\n\t\tif (file == null) {\n\t\t\tSystem.exit(-42);\n\t\t}\n\t\treturn file.getAbsolutePath();\n\t}", "java.lang.String getManifestUrl();", "Uri getJurisdiction();", "public String getVersion(){\r\n return version;\r\n }", "public String getApiVersion();", "public static String getAppVersion(){\r\n return getProperty(\"version\");\r\n }", "public static String getVersion() {\n\t\t String data = \"\";\n\t\ttry {\n\t\t File myObj = new File(rootdir+\"/version.txt\");\n\t Scanner myReader = new Scanner(myObj);\n\t while (myReader.hasNextLine()) {\n\t data = myReader.nextLine();\n\t break;\n\t }\n\t myReader.close();\n\t return data;\n\t } catch (FileNotFoundException e) {\n\t \tSystem.out.println(\"An error occurred.\");\n\t \te.printStackTrace();\n\t }\n\t\treturn null;\n\t}", "public CachetVersion getVersion() {\n JsonNode rootNode = get(\"version\");\n CachetVersion version = CachetVersion.parseRootNode(rootNode);\n\nSystem.out.println(\"SSDEDBUG: version = \" + version.getVersion() + \" (latest=\" + version.isLatest() + \")\");\n return version;\n }", "String getJSON();", "@Api(1.2)\n @NonNull\n public String url() {\n return mRequest.buildOkRequest().url().toString();\n }", "protected static void getLatestPack() {\n\t\tSystem.out.println(\"Getting Latest Pack Version Link...\");\n\t\ttempPackURL = ConfigHandler.packLatestLink;\n\t\tSystem.out.println(\"Link Found!\");\n\t}", "java.lang.String getApiUrl();", "public String getMetadataURL();", "@JsonProperty(\"url\")\n public String getUrl() {\n return url;\n }", "public String getVersionNumber ();", "public OnshapeVersion version() throws OnshapeException {\n return call(\"GET\", \"/build\", null, new HashMap<>(), new HashMap<>(), OnshapeVersion.class);\n }", "public URL getInfoURL() throws MalformedURLException{\n\t\treturn new URL(\"http://www.opensha.org/glossary-attenuationRelation-SHAKE_MAP_2003\");\n\t}", "public static final String getVersion() { return version; }", "public static final String getVersion() { return version; }", "public Version getVersion();", "public String getUrl()\n\t\t{\n\t\t\treturn \"https://developer.zohoapis.eu\";\n\t\t}", "public static String getCurrentProgramVersionInfo() {\n String versionText = \"V15.08\";\n String versionFilename = \"version.txt\";\n URL versionUrl = ExplodeTcpMonMessages.class.getResource(versionFilename);\n InputStream versionInputStream = null;\n if ( versionUrl != null ) {\n try {\n versionInputStream = versionUrl.openStream();\n int count;\n int bufferSize = 256;\n byte data[] = new byte[bufferSize];\n while ((count = versionInputStream.read(data, 0, bufferSize)) != -1) {\n String value = new String(data,0,count);\n if ( value != null && !\"\".equals(value) ) {\n int iPos = value.indexOf(\"\\n\");\n if ( iPos > 0 ) {\n value = value.substring(0, iPos).trim();\n }\n iPos = value.indexOf(\"\\r\");\n if ( iPos > 0 ) {\n value = value.substring(0, iPos).trim();\n }\n iPos = value.indexOf(\".\");\n if ( iPos == 4 ) {\n versionText = \"V\" + value.substring(2).trim();\n } else if ( iPos > 0 ) {\n versionText = \"V\" + value.trim();\n }\n }\n }\n versionInputStream.close();\n } catch ( Exception ce ) {\n ce.printStackTrace();\n return versionText; // Version cannot be loaded\n }\n }\n return versionText;\n }", "public UTF8String getVersionPath() {\n return this.versionPath;\n }", "private String getRemoteVersion(String address) {\n\t\ttry {\n\t URL url = new URL(address);\n\t \n\t BufferedReader br = new BufferedReader(\n new InputStreamReader(url.openStream()));\n\t String inputLine;\n\t StringBuilder sb = new StringBuilder();\n\t while ((inputLine = br.readLine()) != null) {\n\t\t\t\tsb.append(inputLine);\n\t\t\t}\n\t br.close();\n\t return sb.toString();\n\t\t} catch (IOException ex) {\n\t\t\tLOG.error(\"Problem with accessing address {}\", address);\n\t\t\tLOG.error(\"exc\", ex);\n\t\t\treturn null;\n\t\t}\n }", "private static String getVersionFromManifest() {\n return ChronicleMapBuilder.class.getPackage().getImplementationVersion();\n }", "public void getData(Context context) {\n try{\n // Datos locales\n PackageInfo pckginfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\n currentVersionCode = pckginfo.versionCode;\n currentVersionName = pckginfo.versionName;\n\n // Datos remotos\n String data = downloadHttp(new URL(INFO_FILE));\n JSONObject json = new JSONObject(data);\n latestVersionCode = json.getInt(\"versionCode\");\n latestVersionName = json.getString(\"versionName\");\n downloadURL = json.getString(\"downloadURL\");\n Log.d ( \"AutoUpdate\" , \"Data obtained successfully\" );\n } catch (JSONException e) {\n Log.e ( \"AutoUpdate\" , \"There was an error with JSON\" , e);\n } catch (NameNotFoundException e) {\n Log.e ( \"AutoUpdate\" , \"There was an error with Packete: S\" , e);\n } catch (IOException e) {\n Log.e ( \"AutoUpdate\" , \"There was an error downloading\" , e);\n }\n }", "@GetMapping()\n public String getServerVersion() {\n return versionProperties.getVersion();\n }", "public static void showVersion() {\r\n String apiTitle = ImdbApi.class.getPackage().getSpecificationTitle();\r\n \r\n if (StringUtils.isNotBlank(apiTitle)) {\r\n String apiVersion = ImdbApi.class.getPackage().getSpecificationVersion();\r\n String apiRevision = ImdbApi.class.getPackage().getImplementationVersion();\r\n StringBuilder sv = new StringBuilder();\r\n sv.append(apiTitle).append(\" \");\r\n sv.append(apiVersion).append(\" r\");\r\n sv.append(apiRevision);\r\n LOGGER.debug(sv.toString());\r\n } else {\r\n LOGGER.debug(\"API-IMDB version/revision information not available\");\r\n }\r\n }", "public static String getFilenameExtension() {return \"json\";}", "String apiVersion();", "@JsonProperty(\"url\")\n public String getUrl() {\n return url;\n }", "@JsonProperty(\"url\")\n public String getUrl() {\n return url;\n }", "public static String getVersion() {\n return version;\n }", "public static String getVersion() {\n return version;\n }", "public static String getVersion() {\n\t\treturn version;\n\t}", "public String version() throws Exception {\n\t\ttry {\n\t\t\tClient c = getHttpClient();\n\t\t\tWebResource r = c.resource(url + \"/version\");\n\t\t\treturn r.get(String.class);\n\t\t} catch (UniformInterfaceException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new Exception(e.getMessage() + \" (\" + e.getResponse().getEntity(String.class) + \")\");\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t}\n\t}", "public static String getVersion() {\n\t\treturn version;\r\n\t}", "public String getVersionNum();", "public String setUrl() throws JSONException {\n url = baseUrl + searchName;\n for(int i = 0; i < typesCheckList.size(); i++) {\n if(typesObj.has(typesCheckList.get(i))){\n url += typesObj.getString(typesCheckList.get(i));\n }\n }\n if(V)System.out.println(url);\n return url;\n }", "public static String getStringVersion() throws IOException {\n return \"0.0.1\";//attr.getValue(\"Implementation-Version\");\n }", "private JSONObject getAssetJson(String filename) {\n return new JSONObject(\n resourceHandler.getResourceFileAsString(ResourceHandler.VALORANT_BASE_PATH + \"Data/\" + filename)\n );\n }", "private void getVersion(RoutingContext routingContext) {\n response(routingContext, 200, new JsonObject().put(\"version\", \"0.1\"));\n }", "@ApiModelProperty(example = \"1.0.0\", value = \"The raw version for this package.\")\n public String getVersion() {\n return version;\n }", "public String getAppVersion() { return appVersion; }", "public String getVersion () {\r\n return version;\r\n }", "String repoUrl();", "@NotNull\n @JsonProperty(\"version\")\n public Long getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "@Override\n public String getVersionString() {\n return versionString;\n }", "public String getBuildVersion() {\n try {\n Properties versionFileProperties = new Properties();\n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(\"version.properties\");\n if (inputStream != null) {\n versionFileProperties.load(inputStream);\n return versionFileProperties.getProperty(\"version\", \"\") + \" \" + versionFileProperties.getProperty(\"timestamp\", \"\");\n }\n } catch (IOException e) {\n Logger.getLogger(OnStartup.class.getName()).log(Level.SEVERE, null, e);\n }\n return \"\";\n }", "public static JSONObject getVersionInfoPmaControl(String pmaControlURL) {\n\t\t// Get version info from PMA.control instance running at pmacontrolURL\n\t\t// why? because GetVersionInfo can be invoked WITHOUT a valid SessionID;\n\t\t// _pma_api_url() takes session information into account\n\t\tString url = PMA.join(pmaControlURL, \"api/version\");\n\t\ttry {\n\t\t\tURL urlResource = new URL(url);\n\t\t\tHttpURLConnection con;\n\t\t\tif (url.startsWith(\"https\")) {\n\t\t\t\tcon = (HttpsURLConnection) urlResource.openConnection();\n\t\t\t} else {\n\t\t\t\tcon = (HttpURLConnection) urlResource.openConnection();\n\t\t\t}\n\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"application/json\");\n\t\t\tString jsonString = PMA.getJSONAsStringBuffer(con).toString();\n\t\t\tJSONObject jsonResponse = PMA.getJSONResponse(jsonString);\n\t\t\treturn jsonResponse;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.print(e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\r\n public String getURL() {\n return url;\r\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }" ]
[ "0.62375987", "0.6096757", "0.60116374", "0.5909994", "0.58694804", "0.58196974", "0.57698065", "0.57588935", "0.57588935", "0.57588935", "0.57588935", "0.57588935", "0.57588935", "0.57588935", "0.57588935", "0.57588935", "0.57588935", "0.57588935", "0.5753517", "0.57448936", "0.57181436", "0.571081", "0.5697641", "0.56792575", "0.56792575", "0.56792575", "0.56792575", "0.5666871", "0.56654936", "0.5649972", "0.5649972", "0.5649972", "0.5649972", "0.5649972", "0.5649972", "0.5649972", "0.5649972", "0.561106", "0.56017196", "0.5594296", "0.55781704", "0.55771595", "0.5574896", "0.5573454", "0.5559346", "0.5545299", "0.5540812", "0.5537051", "0.5530686", "0.5527682", "0.5524663", "0.55149263", "0.5513759", "0.5511204", "0.5505901", "0.5502527", "0.548999", "0.54887724", "0.54714173", "0.5468527", "0.54663247", "0.5464076", "0.5464076", "0.5460995", "0.5444586", "0.544426", "0.54410475", "0.54403543", "0.5435358", "0.5434608", "0.5430835", "0.54205155", "0.5420386", "0.5417955", "0.5407285", "0.5407285", "0.54054296", "0.54054296", "0.54030573", "0.5397662", "0.5385426", "0.53734976", "0.53654987", "0.5361301", "0.5358707", "0.5356256", "0.53515756", "0.5348106", "0.5344706", "0.5332011", "0.5321891", "0.5320242", "0.5320242", "0.5320242", "0.53200674", "0.5319771", "0.5317666", "0.5315918", "0.53157383", "0.53157383" ]
0.6277287
0
Get the URL where assets can be found.
private URL getAssetsUrl(String marker) { if (marker.length() == 0) { return getAssetsUrl(); } else { return url(ASSETS_URL + "?" + form().add("marker", marker).toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private URL getAssetsUrl() {\n\t\treturn url(ASSETS_URL);\n\t}", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "java.lang.String getArtifactUrl();", "public URL getURL()\n {\n if( url == null )\n {\n // Check if the file is online or inside the JAR:\n if( filename.matches( SoundSystemConfig.PREFIX_URL ) )\n {\n // Online\n try\n {\n url = new URL( filename );\n }\n catch( Exception e )\n {\n errorMessage( \"Unable to access online URL in \" +\n \"method 'getURL'\" );\n printStackTrace( e );\n return null;\n }\n }\n else\n {\n // Inside the JAR\n url = getClass().getClassLoader().getResource(\n SoundSystemConfig.getSoundFilesPackage() + filename );\n }\n }\n return url;\n }", "java.lang.String getResourceUri();", "Uri getUrl();", "java.lang.String getManifestUrl();", "public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}", "public String getSourceDownloadUrl();", "public static String getRelativeUrl() {\n return url;\n }", "public String getBaseStaticUrl() {\n return (String) get(\"base_static_url\");\n }", "public final String getUrl() {\n return properties.get(URL_PROPERTY);\n }", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "String getBaseCDNPathForDocument(Document document);", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "public URL getResourceLocation( String name );", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public URL getURL()\n/* */ {\n/* 135 */ return ResourceUtils.getResourceAsURL(this, this);\n/* */ }", "URL getUrl();", "String getServerBaseURL();", "public String getURL();", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "public String getResourceurl() {\n return resourceurl;\n }", "String getServerUrl();", "public String url() {\n return server.baseUri().toString();\n }", "public URL resourceUrl() {\n return SigarLibraries.class.getResource(SIGAR_LIB_PATH);\n }", "public java.lang.String getAssetPath() {\n return instance.getAssetPath();\n }", "String url();", "public abstract String getBaseURL();", "public String getResourceUrl() {\n\t\treturn resourceUrl;\n\t}", "public String getSecureBaseStaticUrl() {\n return (String) get(\"secure_base_static_url\");\n }", "public URL getURL() throws IOException {\r\n\t\tthrow new FileNotFoundException(getDescription() + \" cannot be resolved to URL\");\r\n\t}", "protected abstract String getUrl();", "java.net.URL getUrl();", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "public String getResourceUrl() {\n return this.resourceUrl;\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "public java.lang.String getUrl() {\n return url;\n }", "String getSpecUrl();", "public abstract String getUrl();", "public java.lang.String getUrl () {\r\n\t\treturn url;\r\n\t}", "public String getPackageDownloadUrl();", "public java.lang.String getAssetPath() {\n return assetPath_;\n }", "public String getBaseUrl()\r\n {\r\n return this.url;\r\n }", "public String getUrl() { /* (readonly) */\n return mUrl;\n }", "@Nullable\n public abstract String url();", "String getSourceUsageURL();", "public abstract String getOutputUrl();", "public String getUrl() {\n\t\tif (prop.getProperty(\"url\") == null)\n\t\t\treturn \"\";\n\t\treturn prop.getProperty(\"url\");\n\t}", "public URL getURL() {\r\n try {\r\n return new URL(\"http://www.bluej.org/doc/writingextensions.html\");\r\n } catch (Exception eee) {\r\n // The link is either dead or otherwise unreachable\r\n System.out.println(\"Simple extension: getURL: Exception=\" + eee.getMessage());\r\n return null;\r\n }\r\n }", "public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}", "String fallbackBaseUrl() {\n return settings.get(FALLBACK_BASE_URL);\n }", "public static URL buildUrl() {\n Uri builtUri = Uri.parse(CONTENT_JSON_URL).buildUpon()\n .build();\n\n URL url = null;\n try {\n url = new URL(builtUri.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n return url;\n }", "public String getBaseUrl() {\n return (String) get(\"base_url\");\n }", "public String getAssetDirectory() {\n return String.format(\"plugin-webapp/%s\", getId());\n }", "private String getUrlPlanet() {\n return this.url + this.resource;\n }", "Uri getJurisdiction();", "public String getThisApplicationUrl() {\n\t\tString tempFileDest = getProperties().getProperty(\"temp.file.dest\").trim();\n\t\tString thisApplicationUrl = null;\n\t\tif(tempFileDest != null && tempFileDest.contains(\"mysunflower\")){\n\t\t\tthisApplicationUrl = getPortalApplicationUrl();\n\t\t}else{\n\t\t\tthisApplicationUrl = getApplicationUrl();\n\t\t}\n\t\treturn thisApplicationUrl;\n\t}", "public abstract String getResUri();", "public static String getBaseUrl() {\n return baseUrl;\n }", "protected String getStaticFilesLocation(PortletRequest request) {\n // TODO allow overriding on portlet level?\n String staticFileLocation = getPortalProperty(\n Constants.PORTAL_PARAMETER_VAADIN_RESOURCE_PATH,\n request.getPortalContext());\n if (staticFileLocation != null) {\n // remove trailing slash if any\n while (staticFileLocation.endsWith(\".\")) {\n staticFileLocation = staticFileLocation.substring(0,\n staticFileLocation.length() - 1);\n }\n return staticFileLocation;\n } else {\n // default for Liferay\n return \"/html\";\n }\n }", "public String getServerUrl() {\n return props.getProperty(\"url\");\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "java.lang.String getPackageImageURL();", "private URL getURL(String filename) {\n\t\tURL url = null;\r\n\t\ttry { \r\n\t\t\turl = this.getClass().getResource(filename);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn url;\r\n\t}", "@AutoEscape\n\tpublic String getFileUrl();", "public abstract String getURL();", "@Nonnull public String getURL() {\n return url;\n }", "String getBaseUri();", "public String getURL() {\n\t\treturn prop.getProperty(\"URL\");\n\t}", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }" ]
[ "0.79898274", "0.68091387", "0.6521101", "0.6430868", "0.6418212", "0.63795453", "0.6372363", "0.637032", "0.6369403", "0.63539577", "0.6348158", "0.6300542", "0.62926143", "0.62926143", "0.62926143", "0.62926143", "0.62926143", "0.62926143", "0.62703735", "0.6261602", "0.6261602", "0.6261602", "0.6261602", "0.6261602", "0.624061", "0.6216056", "0.6216056", "0.6216056", "0.6216056", "0.61734414", "0.6125626", "0.61244434", "0.6102121", "0.6067355", "0.60606664", "0.60064065", "0.59560823", "0.5946985", "0.5943333", "0.5924813", "0.5924085", "0.5884447", "0.58606654", "0.58505434", "0.58495784", "0.5830306", "0.5821662", "0.5821662", "0.5808688", "0.58013946", "0.58013946", "0.5789804", "0.5772667", "0.57720596", "0.57687867", "0.5761593", "0.57467234", "0.5742618", "0.57414824", "0.57350296", "0.5734172", "0.57284945", "0.5728031", "0.5727791", "0.5724692", "0.57133484", "0.57120764", "0.57119054", "0.57069", "0.56980765", "0.56868047", "0.5685004", "0.56845087", "0.5681024", "0.5677665", "0.567291", "0.567189", "0.567189", "0.567189", "0.567189", "0.567189", "0.567189", "0.567189", "0.56675845", "0.56601715", "0.5659132", "0.5653144", "0.56481963", "0.56436896", "0.56426644", "0.5640941", "0.5640941", "0.5640941", "0.5640941", "0.5640941", "0.5640941", "0.5640941", "0.5640941", "0.5640941", "0.5640941" ]
0.6916429
1
Get the base URL where assets can be found.
private URL getAssetsUrl() { return url(ASSETS_URL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getBaseUrl() {\n return (String) get(\"base_url\");\n }", "public String getBaseStaticUrl() {\n return (String) get(\"base_static_url\");\n }", "public String getBaseUrl() {\n return builder.getBaseUrl();\n }", "public static String getBaseURL()\r\n {\r\n String savedUrl = P.getChoreoServicesUrl();\r\n return savedUrl.length() > 0 ? savedUrl : Config.DEFAULT_SERVER_URL;\r\n }", "public String getBaseURL() {\n return baseURL;\n }", "public String getBaseURL() {\n return baseURL;\n }", "String getServerBaseURL();", "public String appBaseUrl() {\n int amtToTrim = request.getServletPath().length() + request.getPathInfo().length();\n String appBase = requestURL.substring(0, requestURL.length()-amtToTrim);\n return appBase;\n }", "public static String getBaseUrl() {\r\n if (baseUrl == null) {\r\n baseUrl = Constants.HTTP_PROTOCOL + \"://\" + getBaseHost() + \":\" + getBasePort();\r\n }\r\n return baseUrl;\r\n }", "public static String getBaseUrl() {\n return baseUrl;\n }", "public abstract String getBaseURL();", "String getRootServerBaseUrl();", "public String getBaseURL() {\n\n\t\treturn baseURL;\n\n\t}", "public String getBaseUrl() {\r\n return baseUrl;\r\n }", "private static String getBaseUrl() {\n StringBuilder url = new StringBuilder();\n url.append(getProtocol());\n url.append(getHost());\n url.append(getPort());\n url.append(getVersion());\n url.append(getService());\n Log.d(TAG, \"url_base: \" + url.toString());\n return url.toString();\n }", "public String getBaseUrl()\r\n {\r\n return this.url;\r\n }", "@Override\n\tpublic URL getBaseURL() {\n\t\tURL url = null;\n\t\tString buri = getBaseURI();\n\t\tif (buri != null) {\n\t\t\ttry {\n\t\t\t\turl = new URL(buri);\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\ttry {\n\t\t\t\t\tString docuri = document.getDocumentURI();\n\t\t\t\t\tif (docuri != null) {\n\t\t\t\t\t\tURL context = new URL(docuri);\n\t\t\t\t\t\turl = new URL(context, buri);\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e1) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn url;\n\t}", "public String getBaseUrl() {\n return baseUrl;\n }", "public String getBaseUrl() {\n return baseUrl;\n }", "String fallbackBaseUrl() {\n return settings.get(FALLBACK_BASE_URL);\n }", "public String getBaseUrl()\n {\n return baseUrl;\n }", "public String getBaseUrl()\n\t{\n\t\treturn baseUrl;\n\t}", "@Override\n\tprotected String getHttpBaseUrl() {\n\t\treturn this.properties.getHttpUrlBase();\n\t}", "public String getBaseUrl() {\n return preferences.getString(PREFERENCES_BACKEND_BASE_URL, \"http://naamataulu-backend.herokuapp.com/api/v1/\");\n }", "public static String getModuleBaseUrl(HttpServletRequest request) {\n\t String requestedUri = request.getRequestURI();\n\t int contextEnd = request.getContextPath().length();\n\t int folderEnd = requestedUri.lastIndexOf('/') + 1;\n\t return requestedUri.substring(contextEnd, folderEnd);\n\t }", "public java.lang.String getBaseUrl() {\n return bugQuery.getBaseUrl();\n }", "protected String getBaseUrl(HttpServletRequest request) {\n\t\tString retVal = \"\";\n\t\tif (request != null && request.getRequestURL() != null) {\n\t\t\tStringBuffer url = request.getRequestURL();\n\t\t\tString uri = request.getRequestURI();\n\t\t\t\n\t\t\tretVal = url.substring(0, url.length() - uri.length());\n\t\t}\n\t\t\n\t\treturn retVal;\n\t}", "public static String getdevBaseUrl(){\n\n return DEV_BASE_URL;\n }", "public URL getBaseHref() {\n return baseHref;\n }", "public String getBaseLinkUrl() {\n return (String) get(\"base_link_url\");\n }", "public String baseUrl() {\n return baseUrl;\n }", "public String getBaseUri() {\n\t\treturn baseUri;\n\t}", "public static String getBaseURL() {\n\t\t\n\t\treturn (ZmailURI.getBaseURI().toString());\n\t\t\n\t}", "protected String getBaseUrl() {\n return requestBaseUrl;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Set the baseurl for assets.\")\n @JsonProperty(JSON_PROPERTY_BASEURL)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getBaseurl() {\n return baseurl;\n }", "public String getBaseUrl() {\n StringBuffer buf = new StringBuffer();\n buf.append(getScheme());\n buf.append(\"://\");\n buf.append(getServerName());\n if ((isSecure() && getServerPort() != 443) ||\n getServerPort() != 80) {\n buf.append(\":\");\n buf.append(getServerPort());\n }\n return buf.toString();\n }", "String getBaseUri();", "public static String getServerBaseUrl() {\n if (isProductionMode()) {\n return getConfiguration().productionModeServerBaseUrl();\n }\n return getConfiguration().developmentModeServerBaseUrl();\n }", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public String getDocumentBase() {\n return getServerBase() + getContextPath() + \"/\";\n }", "private String baseUrl() {\n return \"http://\" + xosServerAddress + \":\" +\n Integer.toString(xosServerPort) + XOSLIB + baseUri;\n }", "public String getBaseMediaUrl() {\n return (String) get(\"base_media_url\");\n }", "public static String getRelativeUrl() {\n return url;\n }", "public String url() {\n return server.baseUri().toString();\n }", "public static String getPrefBaseUrl(Context context){\n String key = context.getString(R.string.pref_base_url_key);\n return PreferenceManager.getDefaultSharedPreferences(context).getString(key,null);\n }", "public String getSecureBaseStaticUrl() {\n return (String) get(\"secure_base_static_url\");\n }", "String getBaseCDNPathForDocument(Document document);", "public String getApplicationURL()\n\t{\n\t\tString url=pro.getProperty(\"baseURL\");\n\t\treturn url;\n\t}", "public String getBaseURI(){\r\n\t\t \r\n\t\t String uri = properties.getProperty(\"baseuri\");\r\n\t\t if(uri != null) return uri;\r\n\t\t else throw new RuntimeException(\"baseuri not specified in the configuration.properties file.\");\r\n\t }", "private String getUrlBaseForLocalServer() {\n\t HttpServletRequest request = ((ServletRequestAttributes) \n\t\t\t RequestContextHolder.getRequestAttributes()).getRequest();\n\t String base = \"http://\" + request.getServerName() + ( \n\t (request.getServerPort() != 80) \n\t \t\t ? \":\" + request.getServerPort() \n\t\t\t\t : \"\");\n\t return base;\n\t}", "String basePath();", "public URI getBaseURI() {\n Map<String, String> map = new LinkedHashMap<>();\n map.put(\"xml\", XML_NAMESPACE);\n return getLink(\"/*/@xml:base\", map);\n }", "static String getBase(HttpServletRequest request) {\n String fullPath = request.getRequestURI();\n int baseEnd = getDividingIndex(fullPath);\n return fullPath.substring(0, baseEnd + 1);\n }", "public URL makeBase(URL startingURL);", "private String getBaseUri() {\n\t\treturn null;\n\t}", "public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}", "public static String UrlToHit(){\n\t\treturn BaseURL;\n\t}", "private String getBaseURL(Document dom) {\n String baseURLValue = null;\n \n //get the root element\n Element element = dom.getDocumentElement();\n \n //get a nodelist of elements\n \n NodeList nl = element.getElementsByTagName(\"baseURL\");\n if(nl != null && nl.getLength() > 0) {\n for(int i = 0 ; i < nl.getLength();i++) {\n //get the list element\n Element baseURL = (Element)nl.item(i);\n baseURLValue = baseURL.getTextContent();\n }\n }\n \n return baseURLValue;\n }", "public String getSecureBaseUrl() {\n return (String) get(\"secure_base_url\");\n }", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "FullUriTemplateString baseUri();", "public static String getBaseUrl(HttpServletRequest request) {\n\t\tif ((request.getServerPort() == 80) || (request.getServerPort() == 443))\n\t\t{\n\t\t\treturn request.getScheme() + \"://\" + request.getServerName();\t\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\treturn request.getScheme() + \"://\" + request.getServerName() + \":\" + request.getServerPort();\n\t\t}\n\t}", "public String getLocalBasePath() {\n\t\treturn DataManager.getLocalBasePath();\n\t}", "public static void setBaseURL() {\n\n\t\tRestAssured.baseURI = DataReader.dataReader(\"baseURL\");\n\t}", "static String getBasePath(URL url) {\n\t\tString file = url.getFile().replaceAll(\"\\\\*\", \"\");\n\n\t\ttry {\n\t\t\treturn url.getPath().replaceAll(file, \"\");\n\t\t} catch (PatternSyntaxException pe) {\n\t\t\tLOG.error(pe.getMessage());\n\t\t\treturn \"\";\n\t\t}\n\n\t}", "public String getBaseURL() {\n\t\treturn \"http://www.apple.com/itunes/charts\";\r\n\t}", "public void determineBaseUrl() {\n if (Environment.isLatest()) {\n baseUrl = \"api-latest.wdpro.starwave.com\";\n } else if (Environment.isStage()) {\n baseUrl = \"api-stage.wdpro.starwave.com\";\n } else if (Environment.isENV4()) {\n baseUrl = \"api-latest.wdpro.starwave.com\";\n } else if (Environment.isENV2()) {\n // baseUrl = \"api-qa.wdpro.disney.go.com:8088\";\n baseUrl = \"api-env2.wdpro.starwave.com\";\n } else if (Environment.isSoftLaunch()) {\n baseUrl = \"api.wdpro.disney.go.com\";\n } else if (Environment.isShadow()) {\n baseUrl = \"api-shadow.wdpro.starwave.com\";\n } else if (Environment.isProduction()) {\n baseUrl = \"api.wdpro.disney.go.com\";\n } else {\n baseUrl = \"api.wdpro.disney.go.com\";\n }\n }", "private URL getAssetsUrl(String marker) {\n\t\tif (marker.length() == 0) {\n\t\t\treturn getAssetsUrl();\n\t\t} else {\n\t\t\treturn url(ASSETS_URL + \"?\" + form().add(\"marker\", marker).toString());\n\t\t}\n\t}", "public static String getBaseURI() {\n\t\treturn getIP() + \":\" + getPort();\r\n//\t\tURIBuilder builder = new URIBuilder();\r\n//\t\tbuilder.setScheme(\"http\");\r\n//\t\tbuilder.setHost(getIP());\r\n//\t\tbuilder.setPort(Integer.valueOf(getPort()));\r\n//\t\tbuilder.setPath(\"/\"+getVersion());\r\n//\t\treturn builder.toString();\r\n//\t\treturn \"http://\" + getIP() + \":\" + getPort()\r\n//\t\t\t\t+ \"/\"+getVersion();\r\n\t}", "private static URI getBaseURI() {\n\t\treturn UriBuilder.fromUri(\"https://api.myjson.com/bins/aeka0\").build();\n\t}", "@Override\n public String getBaseUri() {\n return null;\n }", "public String getBaseRepositoryUrl() {\n\t\treturn baseRepositoryUrl;\n\t}", "private String getCodebase(HttpServletRequest request)\n {\n String urlprefix = getUrlPrefix(request);\n String respath = request.getRequestURI();\n if (respath == null)\n \trespath = \"\";\n String codebaseParam = getRequestParam(request, CODEBASE, null);\n int idx = respath.lastIndexOf('/');\n if (codebaseParam != null)\n if (respath.indexOf(codebaseParam) != -1)\n idx = respath.indexOf(codebaseParam) + codebaseParam.length() - 1;\n String codebase = respath.substring(0, idx + 1); // Include /\n codebase = urlprefix + request.getContextPath() + codebase;\n return codebase;\n }", "public URL getDocumentBase() {\n/* 158 */ return this.stub.getDocumentBase();\n/* */ }", "RaptureURI getBaseURI();", "public static String GetBaseAddress() {\n\t\t// Load Projects Settings XML file\n\t\tDocument doc = Utilities.LoadDocumentFromFilePath(IDE.projectFolderPath + \"\\\\ProjectSettings.xml\");\n\t\tString baseAddress = \"\";\n\t\tif (doc != null) {\n\t\t\t// Get all \"files\"\n\t\t\tNodeList baseAddressNode = doc.getDocumentElement().getElementsByTagName(\"baseAddress\");\n\t\t\t// Handle result\n\t\t\tif (baseAddressNode.getLength() > 0) {\n\t\t\t\tbaseAddress = Utilities.getXmlNodeAttribute(baseAddressNode.item(0), \"value\");\n\t\t\t}\n\t\t}\n\t\treturn baseAddress;\n\t}", "public String getApiBaseUrl() {\n return this.apiBaseUrl;\n }", "public String getBasePath(){\r\n\t\t \r\n\t\t String basePath = properties.getProperty(\"getPath\");\r\n\t\t if(basePath != null) return basePath;\r\n\t\t else throw new RuntimeException(\"getPath not specified in the configuration.properties file.\");\r\n\t }", "public String getShBaseURL() {\n\n\t\treturn shBaseURL;\n\n\t}", "public URL getCveJsonUrlBase() {\n return cveJsonUrlBase;\n }", "public static String getBaseURL(URL url) throws MalformedURLException {\n return new URL(url.getProtocol(), url.getHost(), url.getPort(), \"/\").toString();\n }", "public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn 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 null;\r\n\t}", "java.lang.String getArtifactUrl();", "@Override\r\n\t\tpublic String getBaseURI()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "String getServerUrl();", "public UrlBuilder compileBaseUrl(HttpServletRequest request, String repositoryId) {\n String baseUrl = (String) request.getAttribute(Dispatcher.BASE_URL_ATTRIBUTE);\n if (baseUrl != null) {\n int repIdPos = baseUrl.indexOf(REPOSITORY_PLACEHOLDER);\n if (repIdPos < 0) {\n return new UrlBuilder(baseUrl);\n } else {\n return new UrlBuilder(baseUrl.substring(0, repIdPos) + repositoryId\n + baseUrl.substring(repIdPos + REPOSITORY_PLACEHOLDER.length()));\n }\n }\n\n UrlBuilder url = new UrlBuilder(request.getScheme(), request.getServerName(), request.getServerPort(), null);\n\n url.addPath(request.getContextPath());\n url.addPath(request.getServletPath());\n\n if (repositoryId != null) {\n url.addPathSegment(repositoryId);\n }\n\n return url;\n }", "public java.lang.String getAssetPath() {\n return instance.getAssetPath();\n }", "@SuppressFBWarnings(\"UPM_UNCALLED_PRIVATE_METHOD\")\n public static String getRegistryRepoBaseUrl() {\n return registryRepoBaseUrl;\n }", "@Test\n\tpublic void testGetBaseUrl() {\n\t\tString result = helper.getBaseUrl(\"http://www.bobbylough.com/test/index.html\");\n\t\tassertEquals(\"http://www.bobbylough.com/test\", result);\n\t}", "public String getAssetDirectory() {\n return String.format(\"plugin-webapp/%s\", getId());\n }", "public String getHandleServiceBaseUrl();", "@Override\n public String getUrl() {\n StringBuilder sb = new StringBuilder(baseUrl);\n if (mUrlParams.size() > 0) {\n sb.append(\"?\");\n for (String key : mUrlParams.keySet()) {\n sb.append(key);\n sb.append(\"=\");\n sb.append(mUrlParams.get(key));\n sb.append(\"&\");\n }\n }\n String result = sb.substring(0, sb.length() - 1);\n return result;\n }", "public String getServerUrl() {\r\n return this.fedoraBaseUrl;\r\n }", "public String getThisApplicationUrl() {\n\t\tString tempFileDest = getProperties().getProperty(\"temp.file.dest\").trim();\n\t\tString thisApplicationUrl = null;\n\t\tif(tempFileDest != null && tempFileDest.contains(\"mysunflower\")){\n\t\t\tthisApplicationUrl = getPortalApplicationUrl();\n\t\t}else{\n\t\t\tthisApplicationUrl = getApplicationUrl();\n\t\t}\n\t\treturn thisApplicationUrl;\n\t}", "public void setBaseURL(String val) {\n\n\t\tbaseURL = val;\n\n\t}", "private String getRootUrl() {\n\t\treturn \"http://localhost:\" + port;\n\t}", "private String getRootUrl() {\n\t\treturn \"http://localhost:\" + port;\n\t}", "public String getServerBase() {\n HttpServletRequest request = FxJsfUtils.getRequest().getRequest();\n return \"http\" + (request.isSecure() ? \"s://\" : \"://\") + FxRequestUtils.getExternalServerName(request);\n }", "public String getBaseURI() {\n return node.get_BaseURI();\n }" ]
[ "0.76296544", "0.75561845", "0.7412026", "0.73586696", "0.7326504", "0.7326504", "0.7312827", "0.73069507", "0.72786784", "0.7222895", "0.7212126", "0.7131041", "0.7099986", "0.70569015", "0.70506954", "0.70433915", "0.70272374", "0.70233464", "0.70233464", "0.7018835", "0.7014439", "0.7004956", "0.7003852", "0.69908386", "0.687959", "0.6860052", "0.6818228", "0.6814086", "0.6809341", "0.6771327", "0.67370766", "0.6727368", "0.6723715", "0.6710097", "0.67081565", "0.6699519", "0.66856194", "0.6681592", "0.66656065", "0.66656065", "0.6627804", "0.66163456", "0.6569569", "0.6536134", "0.65105855", "0.6494113", "0.6493812", "0.6464665", "0.643822", "0.64166987", "0.6396611", "0.6370367", "0.63591856", "0.63447505", "0.633488", "0.63320404", "0.63124096", "0.6293348", "0.6288988", "0.62843865", "0.6271784", "0.6250328", "0.6206355", "0.6190432", "0.6141378", "0.61192834", "0.61069196", "0.60934854", "0.60858357", "0.60665435", "0.60497963", "0.601812", "0.6009624", "0.60023737", "0.59569114", "0.59545064", "0.595399", "0.59539443", "0.5948007", "0.5938011", "0.59311044", "0.5916411", "0.5892065", "0.5859696", "0.5854633", "0.58005565", "0.5770828", "0.5755313", "0.57532126", "0.5751207", "0.57483095", "0.57425827", "0.57364094", "0.5717336", "0.5709823", "0.570964", "0.5706641", "0.5706641", "0.57006425", "0.5694597" ]
0.75640297
1
Add shared Minecraft assets to the installer.
protected void installAssets(WorkUnit workUnit) throws IOException, InterruptedException { logger.log(Level.INFO, "Checking for asset downloads..."); File assetsDir = instance.getAssetsDir(); String marker = ""; while (marker != null) { URL bucketUrl = getAssetsUrl(marker); workUnit.push(0, _("minecraftUpdate.checkingAssets", bucketUrl.toString())); logger.log(Level.INFO, "Enumerating assets from {0}...", bucketUrl); checkInterrupted(); // Obtain the assets manifest AWSBucket bucket = HttpRequest .get(bucketUrl) .execute() .returnContent() .asXml(AWSBucket.class); // Install all the missing assets for (AWSBucket.Item item : bucket.getContents()) { String key = item.getKey(); String hash = item.getEtag(); if (item.isDirectory()) { continue; // skip directories } URL url = item.getUrl(getAssetsUrl()); File file = new File(assetsDir, key); if (!file.exists() || !getFileETag(file).equals(hash)) { logger.log(Level.INFO, "Need to get {0}", key); String id = hash + file.toString(); installer.copyTo(new HttpResource(url).withId(id), file); } marker = item.getKey(); } // If the last bucket list is not truncated, then we're done if (!bucket.isTruncated()) { marker = null; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void copyAssets(String dist) {\n copyFile(dist, \"pointer.png\");\n copyFile(dist, \"WebElementRecorder.js\");\n }", "public void copyAssets(View view) {\n log(\"copy assets to fon\");\n try {\n String [] list = getApplicationContext().getAssets().list(\"\");\n if (list.length > 0) {\n for (String file : list) {\n copyAssetFile(file, getApplicationContext());\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n log(\"copy finished\");\n log(\"deploy assets start\");\n executeCommand(\"deploy.sh\");\n log(\"deploy assets finished\");\n }", "public static void addRecipes() {\n\t\tModLoader.addRecipe(new ItemStack(blockWirelessR, 1), new Object[] {\n\t\t\t\t\"IRI\", \"RLR\", \"IRI\", Character.valueOf('I'), Item.ingotIron,\n\t\t\t\tCharacter.valueOf('R'), Item.redstone, Character.valueOf('L'),\n\t\t\t\tBlock.lever });\n\t\tModLoader.addRecipe(new ItemStack(blockWirelessT, 1), new Object[] {\n\t\t\t\t\"IRI\", \"RTR\", \"IRI\", Character.valueOf('I'), Item.ingotIron,\n\t\t\t\tCharacter.valueOf('R'), Item.redstone, Character.valueOf('T'),\n\t\t\t\tBlock.torchRedstoneActive });\n\t}", "private boolean psDoAddAsset(String assetPath, String localAssetPath) {\n downloadedProjectAssets.put(assetPath, localAssetPath);\n if (DEBUG) {\n System.out.println(\"Adding asset \" + assetPath);\n }\n final String assetName = assetNameFromAssetPath(assetPath);\n return psPushAssetToPhone(assetName, localAssetPath, false);\n }", "public static void addSongs(String path) {\n try {\n InputStream stream = plugin.getResource(path);\n byte[] bytes = new byte[0];\n if (stream != null) {\n bytes = new byte[stream.available()];\n stream.read(bytes);\n File file = new File(\"plugins/GuitarPlugin/\" + path);\n OutputStream out = new FileOutputStream(file);\n out.write(bytes);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private Assets (){}", "public void addFromJAR() {\n btAddFromJAR().push();\n }", "protected void initMergedResources()\n {\n // Tell fiftyfive-wicket-js where to find custom JS libs for this app\n // (i.e. those that can be referenced via //= require <lib>).\n // This corresponds to src/main/resources/.../scripts.\n JavaScriptDependencySettings.get().addLibraryPath(\n WicketApplication.class, \"scripts\"\n );\n \n // Mount merged JS\n new MergedJavaScriptBuilder()\n .setPath(\"/scripts/all.js\")\n .addJQueryUI()\n .addLibrary(\"cookies\")\n .addLibrary(\"strftime\")\n .addLibrary(\"55_utils\")\n .addLibrary(\"jquery.55_utils\")\n .addAssociatedScript(BasePage.class)\n .addWicketAjaxLibraries()\n .build(this);\n }", "public static void copyJarsToServer(ContextualLogger logger, Path instanceServerInstallPath, Set<Path> extraJarPaths) throws IOException {\n Path pluginsLibDirectory = instanceServerInstallPath.resolve(\"server\").resolve(\"plugins\").resolve(\"lib\");\n // This needs to be a directory.\n Assert.assertTrue(Files.isDirectory(pluginsLibDirectory));\n for (Path sourcePath : extraJarPaths) {\n // This file must exist.\n if (!Files.isRegularFile(sourcePath)) {\n throw new IllegalArgumentException(\"JAR path is not a file: \" + sourcePath);\n }\n Path targetPath = pluginsLibDirectory.resolve(sourcePath.getFileName());\n // This must not exist.\n logger.output(\"Installing JAR: \" + targetPath + \"...\");\n Assert.assertFalse(targetPath.toFile().exists());\n Files.copy(sourcePath, targetPath);\n logger.output(\"Done\");\n }\n }", "private void psPushAssetsToPhone() {\n if (DEBUG) {\n System.out.println(\"Pushing assets to phone...\");\n }\n for (ConcurrentMap.Entry<String, String> entry : downloadedProjectAssets.entrySet()) {\n String assetPath = entry.getKey();\n String localAssetPath = entry.getValue();\n final String assetName = assetNameFromAssetPath(assetPath);\n psPushAssetToPhone(assetName, localAssetPath, true /*ignore connect status*/);\n }\n if (DEBUG) {\n System.out.println(\"...finished pushing assets to phone.\");\n }\n }", "public void addExternalFilesCP(File f) { externalFilesCP.add(f); }", "public static void setupResourcePack() {\n try {\n FileWriter writer = new FileWriter(Paths.get(FMLPaths.CONFIGDIR.get().toAbsolutePath().toString(),WingTech.MODID, \"resources\", \"pack.mcmeta\").toFile());\n writer.write(\"{\\\"pack\\\":{\\\"pack_format\\\":6,\\\"description\\\":\\\"WingTech resource pack used for lang purposes for the user to add lang for teas.\\\"}}\");\n writer.close();\n }\n catch (Exception e){\n WingTech.LOGGER.error(\"Error creating pack.mcmeta\", e);\n }\n Minecraft.getInstance().getResourcePackRepository().addPackFinder((consumer, factory) -> {\n final ResourcePackInfo packInfo = ResourcePackInfo.create(\n WingTech.MODID,\n true,\n () -> new FolderPack(Paths.get(FMLPaths.CONFIGDIR.get().toAbsolutePath().toString(),WingTech.MODID, \"resources\").toFile()) {\n @Override\n public boolean isHidden() {\n return true;\n }\n },\n factory,\n ResourcePackInfo.Priority.TOP,\n IPackNameDecorator.BUILT_IN\n );\n if (packInfo == null) {\n WingTech.LOGGER.error(\"Failed to load tea resource pack!\");\n return;\n }\n consumer.accept(packInfo);\n });\n }", "void addToMyAssets(String userId,\n String assetGUID) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;", "private static void deployStaticHEResources(String targetDir, boolean bootstrappingEnabled) throws URISyntaxException, IOException{\r\n \t\r\n\t\tClassLoader loader = ServiceGenerator.class.getClassLoader();\r\n\t\tURI jniInterfaceFilePath = loader.getResource(Constants.HE_SERVICE_RESOURCES_FOLDER \r\n\t\t\t\t+ Constants.SERVICE_JNI_INTERFACE_FILE_NAME).toURI();\r\n\t\tURI jniInterfaceHeaderFilePath = loader.getResource(Constants.HE_SERVICE_RESOURCES_FOLDER \r\n\t\t\t\t+ Constants.SERVICE_JNI_INTERFACE_HEADER_FILE_NAME).toURI();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tFile origJniInterfaceFile = new File(jniInterfaceFilePath);\r\n\t\tFile newJniInterfaceFile = new File(targetDir + origJniInterfaceFile.getName());\r\n\t\t\r\n\t\tFile origJniInterfaceHeaderFile = new File(jniInterfaceHeaderFilePath);\r\n\t\tFile newJniInterfaceHeaderFile = new File(targetDir + origJniInterfaceHeaderFile.getName());\r\n\t\t\t\t\t\t\r\n\t\t \t\t\r\n\t\tUtils.deployStaticResource(origJniInterfaceFile, newJniInterfaceFile);\r\n\t\tUtils.deployStaticResource(origJniInterfaceHeaderFile, newJniInterfaceHeaderFile);\r\n }", "public interface CommonClientBundle extends ClientBundle {\n public static final CommonClientBundle INSTANCE = GWT.create(CommonClientBundle.class);\n\n @Source(\"sign.png\")\n ImageResource sign();\n\n @Source(\"woodburry.png\")\n ImageResource logo();\n}", "private void copyFiles() {\n if( !USE_EXTERNAL_FILES_DIR ) return;\n boolean ret = mFileUtil.copyFilesAssetToExternalFilesDir( FILE_EXT );\n if(ret) {\n showList();\n showToast(\"copy successful\");\n } else {\n showToast(\"copy faild\");\n }\n}", "public void clientModSetup(){\n\t\tRenderingRegistry.registerEntityRenderingHandler(Content.mercEntityType.get(), RenderMercenary::new );\n\t\tScreenManager.registerFactory(Content.mercContainerType.get(), GUIContainerMercenary::new);\n\t}", "public void indexAssets() {\n\t\tString json = null;\n\t\tString assetUrl = minecraftVersion.getAssetIndex().getUrl().toString();\n\t\ttry {\n\t\t\tjson = JsonUtil.loadJSON(assetUrl);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tassetsList = (AssetIndex) JsonUtil.getGson().fromJson(json, AssetIndex.class);\n\t\t}\n\t}", "private void writeManifest(HttpServletRequest request,\n HttpServletResponse response) throws IOException {\n setNoCache(response);\n if (!isManifestEnabled(request)) {\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n return;\n }\n if (errorParam.get(request) != null) {\n addManifestErrorCookie(response);\n response.setStatus(HttpServletResponse.SC_NO_CONTENT);\n return;\n }\n \n try {\n setPreloads();\n \n String originalPath = (String)request.getAttribute(AuraResourceServlet.ORIG_REQUEST_URI);\n if(originalPath != null){\n String currentManifestUrl = AuraServlet.getManifest();\n if (!originalPath.equals(currentManifestUrl)) {\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n deleteManifestCookie(response);\n return;\n }\n }\n \n String serverLastMod = Long.toString(getManifestLastMod());\n Cookie cookie = getManifestCookie(request);\n if(cookie != null){\n if (MANIFEST_ERROR.equals(cookie.getValue())) {\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n deleteManifestCookie(response);\n return;\n }\n }\n \n Map<String, Object> attribs = Maps.newHashMap();\n attribs.put(\"lastMod\", serverLastMod);\n StringWriter sw = new StringWriter();\n for(String s:AuraServlet.getStyles()){\n sw.write(s);\n sw.write('\\n');\n }\n for(String s:AuraServlet.getScripts()){\n sw.write(s);\n sw.write('\\n');\n }\n attribs.put(\"resourceURLs\", sw.toString());\n DefinitionService definitionService = Aura.getDefinitionService();\n InstanceService instanceService = Aura.getInstanceService();\n DefDescriptor<ComponentDef> tmplDesc = definitionService.getDefDescriptor(\"ui:manifest\", ComponentDef.class);\n Component tmpl = instanceService.getInstance(tmplDesc, attribs);\n Aura.getRenderingService().render(tmpl, response.getWriter());\n } catch (Exception e) {\n Aura.getExceptionAdapter().handleException(e);\n // Can't throw exception here: to set manifest OBSOLETE\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n }\n }", "@Override\n\t\tpublic void add(File explodedAar) {\n if (!isShared(explodedAar))\n files.addAll(getJars(explodedAar));\n\t\t}", "public static void install() {\n for (String s : RESOURCES) INSTANCE.ensureResourceExists(s);\n }", "public static void copyInContentsOfJar(JarFile jar, JarOutputStream jarOutputStream, String name) throws IOException\n\t{\n\t\t// Copy contents of Go Bible JAR into new JAR\n\t\tfor (Enumeration e = jar.entries(); e.hasMoreElements(); )\n\t\t{\n\t\t\tJarEntry jarEntry = (JarEntry) e.nextElement();\n\t\t\t\n\t\t\t//System.out.println(\"Reading entry from GoBible.jar: \" + jarEntry.getName());\n\t\t\t\n\t\t\tString entryName = jarEntry.getName();\n\t\t\tString sFilepath = \"\";\n\t\t\t// Ignore existing manifest, and ui.properties file if\n\t\t\t// the Collections file has specified UI properties\n\t\t\tif (!entryName.startsWith(\"META-INF\") && !entryName.equals(UI_PROPERTIES_FILE_NAME) && (name == null || entryName.startsWith(name)))\n\t\t\t{\n boolean bNewIcon = false;\n if (entryName.equals(\"Icon.png\") && phoneIconFilepath != null)\n {\n //check for file existance first\n File oFile = new File(baseSourceDirectory, phoneIconFilepath);\n if (oFile.exists())\n {\n bNewIcon = true;\n sFilepath = oFile.getPath();\n }\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Icon file doesn't exist <\"+phoneIconFilepath+\">.\");\n\n }\n \n InputStream inputStream;\n if (!bNewIcon)\n {\n // Add entry to new JAR file\n jarOutputStream.putNextEntry(jarEntry);\n //copy over the resource from the jar\n inputStream = new BufferedInputStream(jar.getInputStream(jarEntry));\n // Read all of the bytes from the Go Bible JAR file and write them to the new JAR file\n byte[] buffer = new byte [100000];\n int length;\n\n while ((length = inputStream.read(buffer)) != -1)\n {\n jarOutputStream.write(buffer, 0, length);\n }\n\n // Close the input stream\n inputStream.close();\n }\n else\n {\n //add in the replacement icon\n byte[] buffer = new byte[100000]; \n FileInputStream fi = new FileInputStream(sFilepath); \n inputStream = new BufferedInputStream(fi, 100000) ; \n ZipEntry entry = new ZipEntry(\"Icon.png\"); \n jarOutputStream.putNextEntry ( entry ) ; \n\n int count; \n while ((count=inputStream.read(buffer, 0, 100000)) != -1 )\n { \n jarOutputStream.write ( buffer, 0, count ) ; \n } \n inputStream.close(); \n }\n }\n\t\t}\t\t\n\t}", "private static void loadStaticRuntimeOverlays(ArrayList<ApkAssets> outApkAssets) throws IOException {\n BufferedReader br;\n Throwable th;\n Throwable th2;\n try {\n FileInputStream fis = new FileInputStream(\"/data/resource-cache/overlays.list\");\n try {\n br = new BufferedReader(new InputStreamReader(fis));\n FileLock flock = fis.getChannel().lock(0, Long.MAX_VALUE, true);\n while (true) {\n String readLine = br.readLine();\n String line = readLine;\n if (readLine == null) {\n break;\n }\n String[] lineArray = line.split(\" \");\n if (lineArray != null) {\n if (lineArray.length >= 2) {\n outApkAssets.add(ApkAssets.loadOverlayFromPath(lineArray[1], true));\n }\n }\n }\n if (flock != null) {\n $closeResource(th, flock);\n }\n throw th2;\n } catch (Throwable th3) {\n IoUtils.closeQuietly(fis);\n throw th3;\n }\n } catch (FileNotFoundException e) {\n Log.i(TAG, \"no overlays.list file found\");\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jProgressBar1 = new javax.swing.JProgressBar();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Minecrunch Mod Launcher\");\n\n jButton1.setText(\"Run Minecrunch Mod\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Exit\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton5.setText(\"Install or Update Minecrunch Mod\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n jProgressBar1.setStringPainted(true);\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()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, 281, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton5)\n .addGap(18, 18, 18)\n .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton1)\n .addGap(18, 18, 18)\n .addComponent(jButton3)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jButton1, jButton3, jButton5});\n\n pack();\n }", "public void gatherAssets(AssetDirectory directory) {\r\n\r\n\t\tassets = directory;\r\n\t\tavatarTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Idle\",Texture.class));\r\n\t\tcombinedTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_stand\",Texture.class));\r\n\r\n\t\t// Tiles\r\n\t\tlightTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_light\", Texture.class ));\r\n\t\tdarkTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_dark\", Texture.class ));\r\n\t\tallTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_all\", Texture.class ));\r\n\t\trainLightTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_light\", Texture.class ));\r\n\t\trainDarkTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_dark\", Texture.class ));\r\n\t\trainAllTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_all\", Texture.class ));\r\n\t\tlightningLightTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_light\", Texture.class ));\r\n\t\tlightningDarkTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_dark\", Texture.class ));\r\n\t\tlightningAllTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_all\", Texture.class ));\r\n\t\tcrumbleLightTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_light\", Texture.class ));\r\n\t\tcrumbleDarkTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_dark\", Texture.class ));\r\n\t\tcrumbleAllTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_all\", Texture.class ));\r\n\r\n\t\trainLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_light_reduced\", Texture.class ));\r\n\t\trainDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_dark_reduced\", Texture.class ));\r\n\t\trainAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_all_reduced\", Texture.class ));\r\n\t\tlightningLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_light_reduced\", Texture.class ));\r\n\t\tlightningDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_dark_reduced\", Texture.class ));\r\n\t\tlightningAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_all_reduced\", Texture.class ));\r\n\t\tcrumbleLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_light_reduced\", Texture.class ));\r\n\t\tcrumbleDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_dark_reduced\", Texture.class ));\r\n\t\tcrumbleAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_all_reduced\", Texture.class ));\r\n\r\n\t\t// Tutorial\r\n\t\ttutorial_signs = new TextureRegion[]{\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:camera_pan\", Texture.class)), //0\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_dash\", Texture.class)), //1\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_jump\", Texture.class)), //2\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_propel\", Texture.class)), //3\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_walk\", Texture.class)), //4\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_dash\", Texture.class)), //5\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_jump\", Texture.class)), //6\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_propel\", Texture.class)), //7\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_walk\", Texture.class)), //8\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_switch\", Texture.class)), //9\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_separate\", Texture.class)), //10\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_unify\", Texture.class)), //11\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:dash_catch\", Texture.class)),\t //12\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:propel_dash_vertical\", Texture.class))\t //13\r\n\r\n\t\t};\r\n\r\n\t\t// Base models\r\n\t\tsomniTexture = new TextureRegion(directory.getEntry(\"platform:somni_stand\",Texture.class));\r\n\t\tsomniIdleTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Idle\",Texture.class));\r\n\t\tsomniWalkTexture = new TextureRegion(directory.getEntry(\"platform:somni_walk_cycle\",Texture.class));\r\n\t\tsomniDashSideTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Jump_Dash\",Texture.class));\r\n\t\tsomniDashUpTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Falling\",Texture.class));\r\n\t\tsomniFallTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Falling\", Texture.class));\r\n\r\n\t\tphobiaTexture = new TextureRegion(directory.getEntry(\"platform:phobia_stand\",Texture.class));\r\n\t\tphobiaIdleTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Idle\",Texture.class));\r\n\t\tphobiaWalkTexture = new TextureRegion(directory.getEntry(\"platform:phobia_walk_cycle\",Texture.class));\r\n\t\tphobiaDashSideTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Jump_Dash\",Texture.class));\r\n\t\tphobiaDashUpTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Falling\",Texture.class));\r\n\t\tphobiaFallTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Falling\", Texture.class));\r\n\r\n\r\n\t\t// Combined models\r\n\t\tsomniPhobiaTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_stand\",Texture.class));\r\n\t\tsomniPhobiaWalkTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_walk\",Texture.class));\r\n\t\tsomniPhobiaDashSideTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_dash_side\",Texture.class));\r\n\t\tsomniPhobiaDashUpTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_dash_up\",Texture.class));\r\n\t\tphobiaSomniTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_stand\",Texture.class));\r\n\t\tphobiaSomniWalkTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_walk\",Texture.class));\r\n\t\tphobiaSomniDashSideTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_dash_side\",Texture.class));\r\n\t\tphobiaSomniDashUpTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_dash_up\",Texture.class));\r\n\r\n\t\tsomniPhobiaHandsTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_hands\",Texture.class));\r\n\t\tphobiaSomniHandsTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_hands\",Texture.class));\r\n\t\tblueRingBigTexture = new TextureRegion(directory.getEntry(\"platform:blue_ring_big\",Texture.class));\r\n\t\tyellowRingBigTexture = new TextureRegion(directory.getEntry(\"platform:yellow_ring_big\",Texture.class));\r\n\t\tblueRingSmallTexture = new TextureRegion(directory.getEntry(\"platform:blue_ring_small\",Texture.class));\r\n\t\tyellowRingSmallTexture = new TextureRegion(directory.getEntry(\"platform:yellow_ring_small\",Texture.class));\r\n\t\tsomniHandFrontTexture = new TextureRegion(directory.getEntry(\"platform:somni_hand_front\",Texture.class));\r\n\t\tsomniHandBackTexture = new TextureRegion(directory.getEntry(\"platform:somni_hand_back\",Texture.class));\r\n\t\tphobiaHandFrontTexture = new TextureRegion(directory.getEntry(\"platform:phobia_hand_front\",Texture.class));\r\n\t\tphobiaHandBackTexture = new TextureRegion(directory.getEntry(\"platform:phobia_hand_back\",Texture.class));\r\n\r\n\t\tbackgrounds = new TextureRegion[] {\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_forest\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_forest\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_gear\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_gear\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_dreams\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_dreams\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_house\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_house\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_statues\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_statues\", Texture.class)),\r\n\r\n\t\t};\r\n\r\n\r\n\t\tTextureRegion [] somnis = {somniIdleTexture,somniWalkTexture,somniDashSideTexture,somniDashUpTexture, somniFallTexture, somniDashUpTexture};\r\n\t\tsomnisTexture = somnis;\r\n\t\tTextureRegion [] phobias = {phobiaIdleTexture,phobiaWalkTexture,phobiaDashSideTexture,phobiaDashUpTexture, phobiaFallTexture, phobiaDashUpTexture};\r\n\t\tphobiasTexture = phobias;\r\n\t\tTextureRegion [] somniphobias = {somniPhobiaTexture,somniPhobiaWalkTexture,somniPhobiaDashSideTexture,somniPhobiaDashUpTexture, somniPhobiaDashUpTexture};\r\n\t\tsomniphobiasTexture = somniphobias;\r\n\t\tTextureRegion [] phobiasomnis = {phobiaSomniTexture,phobiaSomniWalkTexture,phobiaSomniDashSideTexture,phobiaSomniDashUpTexture, phobiaSomniDashUpTexture};\r\n\t\tphobiasomnisTexture = phobiasomnis;\r\n\t\tTextureRegion [] somniHands = {somniHandFrontTexture, somniHandBackTexture, somniPhobiaHandsTexture};\r\n\t\tsomniHandsTextures = somniHands;\r\n\t\tTextureRegion [] phobiaHands = {phobiaHandFrontTexture, phobiaHandBackTexture, phobiaSomniHandsTexture};\r\n\t\tphobiaHandsTextures = phobiaHands;\r\n\r\n\t\tanimationSpeed = new float[]{0.1f, 0.5f, 0.1f, 0.1f, 0.1f, 0.1f};\r\n\t\tframePixelWidth = new double[]{32, 64, 32, 32, 32, 32};\r\n\t\toffsetsX = new float[]{12, 19, 0, 0, 15, 0};\r\n\t\toffsetsY = new float[]{0, 0, 0, 0, 0, 0};\r\n\t\tsecOffsetsX = new float[]{-20, -16, 52, 60, -18, 35, -18};\r\n\t\tsecOffsetsY = new float[]{0, 0, -80, -60, 0, -70, 0};\r\n\t\tthirdOffsetsX = new float[]{0, -18, -22, -22, 0, -22, 10, -15, 0, 0, 5, 0, 0, -20, 0, 0, -2, 0};\r\n\t\tthirdOffsetsY = new float[]{0, 0, 0, 0, 0, 0};\r\n\t\tdashAngles = new float[] {0, 0, -1.55f, 0, 0, 3.14f};\r\n\t\tpropelAngles = new float[] {0, 0, 0, 1.55f, 0, -1.55f};\r\n\r\n\r\n\t\t// Setup masking\r\n\t\tcircle_mask = new TextureRegion(directory.getEntry(\"circle_mask\",Texture.class));\r\n\t\tVector2 mask_size = new Vector2(circle_mask.getRegionWidth(), circle_mask.getRegionHeight());\r\n\t\tMIN_MASK_DIMENSIONS = new Vector2(mask_size).scl(mask_shrink_factor);\r\n\t\tmaskWidth = MIN_MASK_DIMENSIONS.x;\r\n\t\tmaskHeight = MIN_MASK_DIMENSIONS.y;\r\n\r\n\t\tsliderBarTexture = directory.getEntry( \"platform:sliderbar\", Texture.class);\r\n\t\tsliderKnobTexture = directory.getEntry( \"platform:sliderknob\", Texture.class);\r\n\r\n\t\tjumpSound = directory.getEntry( \"platform:jump\", SoundBuffer.class );\r\n\t\tfireSound = directory.getEntry( \"platform:pew\", SoundBuffer.class );\r\n\t\tplopSound = directory.getEntry( \"platform:plop\", SoundBuffer.class );\r\n\r\n\t\tconstants = directory.getEntry( \"constants\", JsonValue.class );\r\n\r\n\r\n\r\n\r\n\r\n//Gather sound assets\r\n\t\twinTrack = directory.getEntry(\"winTrack\", SoundBuffer.class);\r\n\t\tSoundController.getInstance().setWinTrack(winTrack);\r\n\r\n\t\tfailTrack = directory.getEntry(\"failTrack\", SoundBuffer.class);\r\n\t\tSoundController.getInstance().setFailTrack(failTrack);\r\n\r\n\r\n\r\n//\t\tsomniTrack = directory.getEntry(\"somniTrack\", SoundBuffer.class);\r\n//\t\tphobiaTrackPath = directory.getEntry(\"phobiaTrack\", SoundBuffer.class);\r\n//\t\tcombinedTrackPath = directory.getEntry(\"combinedTrack\", SoundBuffer.class);\r\n\r\n\r\n//\t\tmenu drawables\r\n\t\torangeUnderline = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pausemenu_underline_red\", Texture.class));\r\n\t\tblueUnderline = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pausemenu_underline\", Texture.class));\r\n\t\tblueRectangle = new TextureRegionDrawable(directory.getEntry(\"pause_menu:bluerectangle\", Texture.class));\r\n\t\tblueExit = new TextureRegionDrawable(directory.getEntry(\"pause_menu:exit_blue\", Texture.class));\r\n\t\tblueResume = new TextureRegionDrawable(directory.getEntry(\"pause_menu:resume_blue\", Texture.class));\r\n\t\tblueRestart = new TextureRegionDrawable(directory.getEntry(\"pause_menu:restart_blue\", Texture.class));\r\n\t\torangeRectangle = new TextureRegionDrawable(directory.getEntry(\"pause_menu:orangerectangle\", Texture.class));\r\n\t\torangeExit = new TextureRegionDrawable(directory.getEntry(\"pause_menu:exit_orange\", Texture.class));\r\n\t\torangeResume = new TextureRegionDrawable(directory.getEntry(\"pause_menu:resume_orange\", Texture.class));\r\n\t\torangeRestart = new TextureRegionDrawable(directory.getEntry(\"pause_menu:restart_orange\", Texture.class));\r\n\t\t//\t\tSliders\r\n\t\torangeSlider = new TextureRegionDrawable(directory.getEntry(\"pause_menu:slider_orange\", Texture.class));\r\n\t\tblueSlider = new TextureRegionDrawable(directory.getEntry(\"pause_menu:slider_blue\", Texture.class));\r\n\t\torangeKnob = new TextureRegionDrawable(directory.getEntry(\"pause_menu:knob_orange\", Texture.class));\r\n\t\tblueKnob = new TextureRegionDrawable(directory.getEntry(\"pause_menu:knob_blue\", Texture.class));\r\n\t\torangeSound = new TextureRegionDrawable(directory.getEntry(\"pause_menu:sound_orange\", Texture.class));\r\n\t\tblueSound = new TextureRegionDrawable(directory.getEntry(\"pause_menu:sound_blue\", Texture.class));\r\n\t\tblueMusicNote = new TextureRegionDrawable(directory.getEntry(\"pause_menu:musicnote_blue\", Texture.class));\r\n\t\torangeMusicNote = new TextureRegionDrawable(directory.getEntry(\"pause_menu:musicnote_orange\", Texture.class));\r\n\r\n\t\tblueNext = new TextureRegionDrawable(directory.getEntry(\"pause_menu:nextblue\", Texture.class));\r\n\t\torangeNext = new TextureRegionDrawable(directory.getEntry(\"pause_menu:nextorange\", Texture.class));\r\n\r\n\t\tbluePauseButton = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pause_button_blue\", Texture.class));\r\n\t\torangePauseButton = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pause_button_red\", Texture.class));\r\n\t\tblurBackground = new TextureRegion(directory.getEntry(\"pause_menu:blur\", Texture.class));\r\n\r\n\r\n\t\tsuper.gatherAssets(directory);\r\n\r\n\r\n\t}", "static void addFileToShared() {\n\t\ttry {\n\t\t\tint fileMatchNumber = 0;\n\n\t\t\t// Get the current path of the user's not-shared files\n\t\t\tFile notSharedPath = new File(\"users/\" + username +\"/not-shared\");\n\t\t\t// Get the contents of the directory and store it in an array\n\t\t\tFile[] notSharedFiles = notSharedPath.listFiles();\n\n\t\t\tSystem.out.println(\"Non-Shared Files: \");\n\t\t\t// If the user has no non-shared files, let them know.\n\t\t\tif (notSharedFiles.length == 0) {\n\t\t\t\tSystem.out.println(\"\\t --- \" + username + \" has no non-shared files. ---\");\n System.out.println();\n\t\t\t\t// This has been added in order to allow the user to review the results before going back to the main menu\n\t\t\t\t// Upon pressing Enter, the main menu will come back up again and ready for a new menu option to be selected\n try {\n System.out.println(\"Press any key to return\");\n input.readLine();\n } catch (Exception e) {\n System.out.println(\"Error! \" + e.getMessage());\n }\n return;\n\t\t\t}\n\n\t\t\t// If the directory has files in it, print them on the screen to help the user with selection\n\t\t\tfor(File file : notSharedFiles) {\n\t\t\t\tSystem.out.println(\"\\t + \" + file.getName());\n\t\t\t}\n\t\t\t// Let the user enter which file they would like to share\n System.out.println();\n\t\t\tSystem.out.println(\"Enter the name of the file you wish to share followed by Enter\");\n\t\t\tSystem.out.print(\"Your Entry: \");\n\n\t\t\tString fileToShare = input.readLine();\n\n\t\t\t// If the filename the user has entered is in the directory, then set the fileMatchNumber to be 1\n\t\t\tfor (int i = 0; i < notSharedFiles.length; i++) {\n\t\t\t\tif (fileToShare.equals(notSharedFiles[i].getName())) {\n\t\t\t\t\tfileMatchNumber = 1;\n\t\t\t\t}\n\t\t\t}\n System.out.println();\n\t\t\t// If the fileMatchNumber is equal to 1, then pass the request to the database via the CORBA server to register the file as available for sharing\n\t\t\tif (fileMatchNumber == 1) {\n\t\t\t\tSystem.out.println(server.startFileShare(username, fileToShare));\n\n\t\t\t\t// Now, copy the file to the shared directory and remove it from the user's not-shared directory\n\t\t\t\tFile nonSharedFileToMove = new File(\"users/\" + username +\"/not-shared/\" + fileToShare);\n\t\t\t\tif(nonSharedFileToMove.renameTo(new File(\"users/\" + username +\"/shared/\" + fileToShare))) {\n\t\t\t\t\tnonSharedFileToMove.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Otherwise, the user entered an invalid filename\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------\");\n\t\t\t\tSystem.out.println(\"You have entered an invalid file name.\");\n\t\t\t}\n\t\t}\n\t\t// Catch any errors and terminate the function\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Error! : \" + e.getMessage());\n\t\t\treturn;\n\t\t}\n System.out.println();\n\t\t// This has been added in order to allow the user to review the results before going back to the main menu\n\t\t// Upon pressing Enter, the main menu will come back up again and ready for a new menu option to be selected\n try {\n System.out.println(\"Press any key to return\");\n input.readLine();\n } catch (Exception e) {\n System.out.println(\"Error! \" + e.getMessage());\n }\n\t}", "@Override\n\tprotected NSArray<String> additionalJavascriptFiles() {\n\t\treturn new NSMutableArray<String>( new String[] { \"modalbox.js\" } );\n\t}", "private final void init() {\n\t\tam = new nativeAssetManager();\n\t\tam.addDefaultAssets();\n\t}", "static public void addImage(AppImage image) {\n boolean already_exists = false;\n for (AppImage cached_image : images) {\n String reposited_path = cached_image.file.getAbsolutePath();\n String image_path = image.file.getAbsolutePath();\n if (reposited_path.equals(image_path)) {\n already_exists = true;\n }\n }\n if (!already_exists) images.add(0, image);\n }", "static private void addBundleResources( final Bundle bundle, final Collection<? extends Resource> resources ) {\n resources.stream()\n .map( r -> new Bundle.BundleEntryComponent().setResource( r ) )\n .forEach( bundle::addEntry );\n }", "void publishPlugin(byte[] jarFile);", "public JPanel setUpOtherPlayerAssets(Player player) {\n playerToOfferTo = player;\n return setUpDealMakerPanel(player);\n }", "private void share() {\n try {\n File imagesFolder = new File(getCacheDir(), \"images\");\n if (!imagesFolder.exists()) {\n if (!imagesFolder.mkdirs()) {\n Log.e(\"Pixelart\", \"Could not create directory\");\n }\n }\n File cacheFile = new File(imagesFolder, \"shared_image.png\");\n FileOutputStream fos = new FileOutputStream(cacheFile);\n sprite.compress(Bitmap.CompressFormat.PNG, 100, fos);\n fos.flush();\n fos.close();\n Uri uri = FileProvider.getUriForFile(this,\n \"com.funguscow.fileprovider\",\n cacheFile);\n Intent shareIntent = new Intent();\n shareIntent.setAction(Intent.ACTION_SEND);\n shareIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n shareIntent.putExtra(Intent.EXTRA_STREAM, uri);\n shareIntent.setDataAndType(uri, \"image/png\");\n startActivity(Intent.createChooser(shareIntent, \"Share\"));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void installArtifacts(ApplicationDescription desc) throws IOException {\n try {\n Tools.copyDirectory(appFile(desc.name(), M2_PREFIX), m2Dir);\n } catch (NoSuchFileException e) {\n log.debug(\"Application {} has no M2 artifacts\", desc.name());\n }\n }", "public void moveBundles(AssetManager assetManager) {\n\n String[] files = null;\n\n //Get cpu_abi for SDK versions above API 21\n String cpu_abi = Build.CPU_ABI;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n String[] abis = Build.SUPPORTED_ABIS;\n for (String ab : abis) {\n try {\n files = assetManager.list(\"celix_bundles/\" + ab);\n if (files.length > 0) {\n cpu_abi = ab;\n break;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n } else {\n //Get cpu_abi for SDK version below API 21\n try {\n files = assetManager.list(\"celix_bundles/\" + Build.CPU_ABI);\n if (files.length == 0) {\n files = assetManager.list(\"celix_bundles/\" + Build.CPU_ABI2);\n cpu_abi = Build.CPU_ABI2;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n Log.e(\"Bundles\", \"Using \" + cpu_abi + \" bundles\");\n this.cpu_abi = cpu_abi;\n\n if (files != null) {\n //Move bundles from assets to internal storage (/data/data/com.inaetics.demonstrator/celix_bundles\n for (String fileName : files) {\n File bundleFile = new File(bundleLocation + \"/\" + fileName);\n try {\n InputStream in = assetManager.open(\"celix_bundles/\" + cpu_abi + \"/\" + fileName);\n moveBundle(in,bundleFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n bundlesMoved = true;\n } else {\n Log.e(\"Zips\", \"No zips for supported abis found!\");\n }\n }", "@Override\n\tpublic void addRecipes() \n\t{\n GameRegistry.addRecipe(new ItemStack(this), \"xxx\", \"xyx\", \"xxx\",\t\t\t\t\t\t\n 'x', Items.fireworks, \n 'y', Items.string\n ); \n \n // Bundle of rockets back to 8 rockets\n GameRegistry.addShapelessRecipe(new ItemStack(Items.fireworks, 8), new ItemStack(this));\n\t}", "public static void register(Recipe recipe){\n Bukkit.getServer().addRecipe(recipe);\n }", "public void addJARFolder() {\n btAddJARFolder().push();\n }", "public static void sideloadInstall(Context ctx, String assetFilename) {\n try {\n // Read .pbw from assets\n Intent intent = new Intent(Intent.ACTION_VIEW);\n File file = new File(ctx.getExternalFilesDir(null), assetFilename);\n InputStream is = ctx.getResources().getAssets().open(assetFilename);\n OutputStream os = new FileOutputStream(file);\n byte[] pbw = new byte[is.available()];\n is.read(pbw);\n os.write(pbw);\n is.close();\n os.close();\n\n // Install via Pebble Android app\n intent.setDataAndType(Uri.fromFile(file), \"application/pbw\");\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n ctx.startActivity(intent);\n } catch (Exception e) {\n Toast.makeText(ctx, \"App install failed: \" + e.getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n }", "public static void init () {\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.sea_lantern), \"XYX\", \"YYY\", \"XYX\", 'X', ModItems.prismarine_shard, 'Y', ModItems.prismarine_crystals);\r\n\t\t//Prismarine\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.prismarine, 1, 0), \" \", \"XX \", \"XX \", 'X', ModItems.prismarine_shard);\r\n\t\t//Prismarine Bricks\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.prismarine, 1, 1), \"XXX\", \"XXX\", \"XXX\", 'X', ModItems.prismarine_shard);\r\n\t\t//Dark Prismarine\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.prismarine, 1, 2), \"XXX\", \"XYX\", \"XXX\", 'X', ModItems.prismarine_shard, 'Y', Item.getItemById(351));\r\n\t\t//Cooked mutton\r\n\t\tGameRegistry.addSmelting(new ItemStack(ModItems.mutton_raw), new ItemStack(ModItems.mutton_cooked), 0.35f);\r\n\t\t//Iron trapdoor\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.iron_trapdoor), \"XX \", \"XX \", \" \", 'X', Blocks.iron_bars);\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.iron_trapdoor), \" XX\", \" XX\", \" \", 'X', Blocks.iron_bars);\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.iron_trapdoor), \" \", \"XX \", \"XX \", 'X', Blocks.iron_bars);\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.iron_trapdoor), \" \", \" XX\", \" XX\", 'X', Blocks.iron_bars);\r\n\t}", "private void addSystemDirFilesToImage() throws IOException {\n File sourceSystemDir = new File(builderContext.sourceTbOptionsDir, \"system.v2\");\n if (!isValidCSMSource(sourceSystemDir)) {\n // Fall back to the system default, ~/Amplio/ACM/system.v2\n sourceSystemDir = new File(AmplioHome.getAppSoftwareDir(), \"system.v2\");\n }\n\n File targetSystemDir = new File(imageDir, \"system\");\n\n // The csm_data.txt file. Control file for the TB.\n File csmData = new File(sourceSystemDir, \"csm_data.txt\");\n FileUtils.copyFileToDirectory(csmData, targetSystemDir);\n\n // Optionally, the source for csm_data.txt file. \n File controlDefFile = new File(sourceSystemDir, \"control_def.txt\");\n if (controlDefFile.exists()) {\n FileUtils.copyFileToDirectory(controlDefFile, targetSystemDir);\n }\n\n // If UF is hidden in the deployment, copy the appropriate 'uf.der' file to 'system/'\n if (deploymentInfo.isUfHidden()) {\n UfKeyHelper ufKeyHelper = new UfKeyHelper(builderContext.project);\n byte[] publicKey = ufKeyHelper.getPublicKeyFor(builderContext.deploymentNo);\n File derFile = new File(targetSystemDir, \"uf.der\");\n try (FileOutputStream fos = new FileOutputStream(derFile);\n DataOutputStream dos = new DataOutputStream(fos)){\n dos.write(publicKey);\n }\n }\n }", "void installApp(String appPath);", "private void installWwwFolder() {\n if (hcpInternalPrefs.isWwwFolderInstalled()) {\n hcpInternalPrefs.setWwwFolderInstalled(false);\n hcpInternalPrefsStorage.storeInPreference(hcpInternalPrefs);\n }\n\n AssetsHelper.copyAssetDirectoryToAppDirectory(context.getAssets(), WWW_FOLDER, fileStructure.getWwwFolder());\n }", "@Override\n\tpublic void addRecipes() {\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_BROWN), \"coralBrown\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_RED), \"coralRed\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_YELLOW), \"coralYellow\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.LIGHT_BLUE), \"coralLightBlue\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.MAGENTA), \"coralMagenta\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.ORANGE), \"coralOrange\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.PINK), \"coralPink\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.PURPLE), \"coralPurple\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.GREY), \"coralGray\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.LIGHT_GREY), \"coralLightGray\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_WHITE), \"coralWhite\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_GREEN), \"plantKelp\", true);\n\t\t\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_BLUE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_BRAIN), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_CANDYCANE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_CUCUMBER), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_ORANGE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_PINK), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_PURPLE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_RED), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_GREY), new ItemStack(coral, 1, CoralMeta.CORAL_LIGHT_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_LIGHT_GREY), new ItemStack(coral, 1, CoralMeta.CORAL_WHITE), 5);\n\t\t\n\t\t//Kelp Wrap Recipe\n\t\tRecipeHelper.add9x9Recipe(new ItemStack(Core.food, 1, FoodMeta.KELP_WRAP), \"plantKelp\");\n\t\t\n\t\taddOceanChestLoot();\n\t}", "@Override\r\n public void pack() {\r\n super.pack();\r\n JkFileTree.of(this.classDir()).exclude(\"**/*.jar\").zip().to(packer().jarFile(\"lean\"));\r\n distrib();\r\n }", "public void installAllAddons(String installDir, String instanceRoot){\n \n String addonJar = \"\";\n //Properties registry = new Properties();\n Registry registry = null;\n FileInputStream in = null;\n FileOutputStream out = null;\n try {\n String addonDir = installDir + File.separator + AddonConstants.LIB + File.separator + AddonConstants.ADDONS;\n String domainConfigRoot = instanceRoot + File.separator + AddonConstants.CONFIG;\n //Logger.getAnonymousLogger().log(Level.FINE, \"domainConfigRoot===\"+domainConfigRoot);\n String domainRegistry = domainConfigRoot + File.separator + AddonConstants.DOMAIN_REGISTRY;\n File registryFile = new File(domainRegistry);\n registry = new Registry();\n registry.load(registryFile);\n File libAddonDirectory = new File(addonDir);\n File[] fileArray = libAddonDirectory.listFiles();\n \n for(int i = 0;i<fileArray.length;i++) {\n addonJar = fileArray[i].getName();\n String jarExtension = \"\";\n int dotLastIndex = addonJar.lastIndexOf(\".\");\n String jarNameWithoutExtension = addonJar;\n if(dotLastIndex != -1) {\n jarExtension = addonJar.substring(dotLastIndex + 1);\n jarNameWithoutExtension = addonJar.substring(0, dotLastIndex);\n }\n if(jarExtension.equalsIgnoreCase(\"jar\")) {\n //Logger.getAnonymousLogger().log(Level.INFO, \"fileArray[i].getName()=\"+fileArray[i].getName());\n //String key = domainName + \".\" + fileArray[i].getName() + \".\" + \"installed\";\n String key = jarNameWithoutExtension + \".\" + \"enabled\";\n String installed = registry.getProperty(key);\n if(installed != null && installed.equals(\"true\")) {\n Logger.getAnonymousLogger().log(Level.FINE, \"Addon \"+addonJar+\" is already installed\");\n continue;\n }\n Addon addon = new Addon(fileArray[i]);\n boolean install = addon.install(installDir,instanceRoot);\n if(install)\n registry.setProperty(key, \"true\");\n \n }\n }\n registry.store();\n \n }catch(Exception ex) {\n Logger.getAnonymousLogger().log(Level.WARNING, \"Error while installing the addon \"+addonJar, ex);\n }finally {\n try {\n if(registry != null)\n registry.close();\n }catch(Exception e) {\n \n }\n }\n \n }", "void syncPlugins() throws IOException;", "private void copyFromAssets(AssetManager manager, String asset,\n File fileLocation, boolean overwrite) {\n // Only write to file if it does not exist already\n if (fileLocation.exists() && !overwrite) {\n return;\n }\n\n // Create necessary directory structure\n if (!fileLocation.getParentFile().exists() && !fileLocation.getParentFile().mkdirs()) {\n throw new IllegalArgumentException(\"Could not create directory: \" + fileLocation.getParentFile().getPath());\n }\n Log.d(this.getClass().getSimpleName(), \"Writing asset file: \" + asset + \" to \"\n + fileLocation.getAbsolutePath());\n InputStream inStream;\n try {\n inStream = new BufferedInputStream(manager.open(asset,\n AssetManager.ACCESS_STREAMING));\n } catch (IOException e) {\n Log.w(this.getClass().getSimpleName(), \"Could not read asset file: \" + asset);\n // don't throw - it is ok to miss a file in the app bundle (asset manager used with\n // different file configurations), just don't install in that case\n return;\n }\n try {\n OutputStream outStream = new BufferedOutputStream(new FileOutputStream(fileLocation));\n byte[] buffer = new byte[10240]; // 10KB\n int length = 0;\n while ((length = inStream.read(buffer)) >= 0) {\n outStream.write(buffer, 0, length);\n }\n outStream.close();\n inStream.close();\n } catch (IOException e) {\n throw new IllegalArgumentException(\"Could not write file to \" + fileLocation, e);\n }\n }", "public synchronized void addExtraCP(File f) { extraCP.add(f); }", "private void addLibrary(ZipOutputStream out, File file) throws IOException\n\t{\n\t\tString groupId = DEFAULT_LIBRARY_GROUPID; // FIXME\n\t\tString version = DEFAULT_LIBRARY_VERSION; // FIXME\n\t\tString artifactId = file.getName().substring(0, file.getName().lastIndexOf(\".\")); // remove file extension\n\t\t\n\t\tString fileName = \"/localrepo/\" + groupId + \"/\" + artifactId + \"/\" + version + \"/\" + artifactId + \"-\" + version + \".jar\";\n\n\t\tcreateZipEntry(out, fileName, Files.readAllBytes(Paths.get(file.getAbsolutePath())));\n\t}", "public void execute() throws MojoExecutionException {\n\n // 1. Create and set up directories\n getLog().info(\"Creating and setting up the bundle directories\");\n buildDirectory.mkdirs();\n\n File bundleDir = new File(buildDirectory, bundleName + \".app\");\n bundleDir.mkdirs();\n\n File contentsDir = new File(bundleDir, \"Contents\");\n contentsDir.mkdirs();\n\n File resourcesDir = new File(contentsDir, \"Resources\");\n resourcesDir.mkdirs();\n\n File javaDirectory = new File(contentsDir, \"Java\");\n javaDirectory.mkdirs();\n\n File macOSDirectory = new File(contentsDir, \"MacOS\");\n macOSDirectory.mkdirs();\n\n // 2. Copy in the native java application stub\n getLog().info(\"Copying the native Java Application Stub\");\n File launcher = new File(macOSDirectory, javaLauncherName);\n launcher.setExecutable(true);\n\n FileOutputStream launcherStream = null;\n try {\n launcherStream = new FileOutputStream(launcher);\n } catch (FileNotFoundException ex) {\n throw new MojoExecutionException(\"Could not copy file to directory \" + launcher, ex);\n }\n\n InputStream launcherResourceStream = this.getClass().getResourceAsStream(javaLauncherName);\n try {\n IOUtil.copy(launcherResourceStream, launcherStream);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could not copy file \" + javaLauncherName + \" to directory \" + macOSDirectory, ex);\n }\n\n // 3.Copy icon file to the bundle if specified\n if (iconFile != null) {\n File f = searchFile(iconFile, project.getBasedir());\n\n if (f != null && f.exists() && f.isFile()) {\n getLog().info(\"Copying the Icon File\");\n try {\n FileUtils.copyFileToDirectory(f, resourcesDir);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying file \" + iconFile + \" to \" + resourcesDir, ex);\n }\n } else {\n throw new MojoExecutionException(String.format(\"Could not locate iconFile '%s'\", iconFile));\n }\n }\n\n // 4. Resolve and copy in all dependencies from the pom\n getLog().info(\"Copying dependencies\");\n List<String> files = copyDependencies(javaDirectory);\n if (additionalBundledClasspathResources != null && !additionalBundledClasspathResources.isEmpty()) {\n files.addAll(copyAdditionalBundledClasspathResources(javaDirectory, \"lib\", additionalBundledClasspathResources));\n }\n\n // 5. Check if JRE should be embedded. Check JRE path. Copy JRE\n if (jrePath != null) {\n File f = new File(jrePath);\n if (f.exists() && f.isDirectory()) {\n // Check if the source folder is a jdk-home\n File pluginsDirectory = new File(contentsDir, \"PlugIns/JRE/Contents/Home/jre\");\n pluginsDirectory.mkdirs();\n\n File sourceFolder = new File(jrePath, \"Contents/Home\");\n if (new File(jrePath, \"Contents/Home/jre\").exists()) {\n sourceFolder = new File(jrePath, \"Contents/Home/jre\");\n }\n\n try {\n getLog().info(\"Copying the JRE Folder from : [\" + sourceFolder + \"] to PlugIn folder: [\" + pluginsDirectory + \"]\");\n FileUtils.copyDirectoryStructure(sourceFolder, pluginsDirectory);\n File binFolder = new File(pluginsDirectory, \"bin\");\n //Setting execute permissions on executables in JRE\n for (String filename : binFolder.list()) {\n new File(binFolder, filename).setExecutable(true, false);\n }\n\n new File (pluginsDirectory, \"lib/jspawnhelper\").setExecutable(true,false);\n embeddJre = true;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying folder \" + f + \" to \" + pluginsDirectory, ex);\n }\n } else {\n getLog().warn(\"JRE not found check jrePath setting in pom.xml\");\n }\n } else if (jreFullPath != null){\n getLog().info(\"JRE Full path is used [\" + jreFullPath + \"]\");\n embeddJre = true;\n }\n\n // 6. Create and write the Info.plist file\n getLog().info(\"Writing the Info.plist file\");\n File infoPlist = new File(bundleDir, \"Contents\" + File.separator + \"Info.plist\");\n this.writeInfoPlist(infoPlist, files);\n\n // 7. Copy specified additional resources into the top level directory\n getLog().info(\"Copying additional resources\");\n if (additionalResources != null && !additionalResources.isEmpty()) {\n this.copyResources(buildDirectory, additionalResources);\n }\n\n // 7. Make the stub executable\n if (!SystemUtils.IS_OS_WINDOWS) {\n getLog().info(\"Making stub executable\");\n Commandline chmod = new Commandline();\n try {\n chmod.setExecutable(\"chmod\");\n chmod.createArgument().setValue(\"755\");\n chmod.createArgument().setValue(launcher.getAbsolutePath());\n\n chmod.execute();\n } catch (CommandLineException e) {\n throw new MojoExecutionException(\"Error executing \" + chmod + \" \", e);\n }\n } else {\n getLog().warn(\"The stub was created without executable file permissions for UNIX systems\");\n }\n\n // 8. Create the DMG file\n if (generateDiskImageFile) {\n if (SystemUtils.IS_OS_MAC_OSX || SystemUtils.IS_OS_MAC) {\n getLog().info(\"Generating the Disk Image file\");\n Commandline dmg = new Commandline();\n try {\n // user wants /Applications symlink in the resulting disk image\n if (includeApplicationsSymlink) {\n createApplicationsSymlink();\n }\n dmg.setExecutable(\"hdiutil\");\n dmg.createArgument().setValue(\"create\");\n dmg.createArgument().setValue(\"-srcfolder\");\n dmg.createArgument().setValue(buildDirectory.getAbsolutePath());\n dmg.createArgument().setValue(diskImageFile.getAbsolutePath());\n\n try {\n dmg.execute().waitFor();\n } catch (InterruptedException ex) {\n throw new MojoExecutionException(\"Thread was interrupted while creating DMG \" + diskImageFile, ex);\n } finally {\n if (includeApplicationsSymlink) {\n removeApplicationsSymlink();\n }\n }\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error creating disk image \" + diskImageFile, ex);\n }\n\n if (diskImageInternetEnable) {\n getLog().info(\"Enabling the Disk Image file for internet\");\n try {\n Commandline internetEnableCommand = new Commandline();\n\n internetEnableCommand.setExecutable(\"hdiutil\");\n internetEnableCommand.createArgument().setValue(\"internet-enable\");\n internetEnableCommand.createArgument().setValue(\"-yes\");\n internetEnableCommand.createArgument().setValue(diskImageFile.getAbsolutePath());\n\n internetEnableCommand.execute();\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error internet enabling disk image: \" + diskImageFile, ex);\n }\n }\n projectHelper.attachArtifact(project, \"dmg\", null, diskImageFile);\n }\n if (SystemUtils.IS_OS_LINUX) {\n getLog().info(\"Generating the Disk Image file\");\n Commandline linux_dmg = new Commandline();\n try {\n linux_dmg.setExecutable(\"genisoimage\");\n linux_dmg.createArgument().setValue(\"-V\");\n linux_dmg.createArgument().setValue(bundleName);\n linux_dmg.createArgument().setValue(\"-D\");\n linux_dmg.createArgument().setValue(\"-R\");\n linux_dmg.createArgument().setValue(\"-apple\");\n linux_dmg.createArgument().setValue(\"-no-pad\");\n linux_dmg.createArgument().setValue(\"-o\");\n linux_dmg.createArgument().setValue(diskImageFile.getAbsolutePath());\n linux_dmg.createArgument().setValue(buildDirectory.getAbsolutePath());\n\n try {\n linux_dmg.execute().waitFor();\n } catch (InterruptedException ex) {\n throw new MojoExecutionException(\"Thread was interrupted while creating DMG \" + diskImageFile,\n ex);\n }\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error creating disk image \" + diskImageFile + \" genisoimage probably missing\", ex);\n }\n projectHelper.attachArtifact(project, \"dmg\", null, diskImageFile);\n\n } else {\n getLog().warn(\"Disk Image file cannot be generated in non Mac OS X and Linux environments\");\n }\n }\n\n getLog().info(\"App Bundle generation finished\");\n }", "public static void premain(String agentArgs, Instrumentation inst) {\n log(\"Loaded as agent!\");\n\n (Installer.instance = new Installer(false)).loadWindow();\n\n Installer.instance.autoHide.setState(false);\n Installer.instance.autoHide.setVisible(false);\n\n Installer.instance.downloadStatus.setVisible(true);\n Installer.instance.progressBar.setVisible(true);\n\n /* Used to retrieve the game folder, contained in the jvm launched by MC client*/\n String args = System.getProperty(\"sun.java.command\");\n String split[] = args.split(\"--gameDir \");\n String gameDir = split[1].split(\"--\")[0].trim();\n\n log(String.format(\"Found gameDir: %s . Working on it to setup all the mods correctly...\", gameDir));\n\n\n //TODO: Check if this is effectively useuful\n\n// File modsFolder = new File(gameDir, \"mods\");\n// FileUtils.checkDirectory(modsFolder);\n\n /* Launches the update & download process */\n download(new File(gameDir), manifest_url, false);\n\n /* Removes the progress bar after everything has been downloaded */\n Installer.instance.frame.setSize(Installer.instance.frame.getWidth(), Installer.instance.frame.getHeight() - 69);\n\n if (Installer.instance.autoHide.getState()) {\n Installer.instance.frame.setVisible(false);\n }\n\n log(\"Finished setup.\");\n }", "@Override\n public void register(@Nonnull IModRegistry registry)\n {\n registry.addRecipes(WorldTransmutations.getWorldTransmutations(), WorldTransmuteRecipeCategory.UID);\n registry.getRecipeTransferRegistry().addRecipeTransferHandler(PhilosStoneContainer.class, VanillaRecipeCategoryUid.CRAFTING, 1, 9, 10, 36);\n }", "private static void registerCustomRecipes() {\n if(Configs.isEnabled(BloodContainerConfig.class) && Configs.isEnabled(DarkTankConfig.class)) {\n for(int i = 0; i < BloodContainerConfig.getContainerLevels(); i++) {\n \tItemStack input = new ItemStack(BloodContainer.getInstance(), 1, i);\n if(!BloodContainer.getInstance().isCreativeItem(input)) {\n \tfinal int capacity = BloodContainer.getInstance().getCapacity(input);\n \tItemStack result = new ItemStack(DarkTank.getInstance());\n GameRegistry.addRecipe(new ObservableShapelessRecipe(result,\n new Object[]{\n \t\t\tinput,\n \t\t},\n new IRecipeOutputObserver() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic ItemStack getRecipeOutput(\n\t\t\t\t\t\t\t\t\t\tInventoryCrafting grid,\n\t\t\t\t\t\t\t\t\t\tItemStack output) {\n\t\t\t\t\t\t\t\t\tItemBlockFluidContainer container = (ItemBlockFluidContainer) output.getItem();\n\t\t\t\t \tcontainer.setCapacity(output, capacity);\n\t\t\t\t \tItemStack input = null;\n\t\t\t\t \tfor(int j = 0; j < grid.getSizeInventory(); j++) {\n\t\t\t\t \t\t\tItemStack element = grid.getStackInSlot(j);\n\t\t\t\t \t\t\tif(element != null && element.getItem() == BloodContainer.getInstance()) {\n\t\t\t\t \t\t\t\tinput = element;\n\t\t\t\t \t\t\t}\n\t\t\t\t \t}\n\t\t\t\t \tif(input == null) {\n\t\t\t\t \t\treturn null;\n\t\t\t\t \t}\n\t\t\t\t \tFluidStack resource = BloodContainer.getInstance().getFluid(input);\n\t\t\t\t \tif(resource != null && resource.amount > 0) {\n\t\t\t\t \t\tcontainer.fill(output, resource, true);\n\t\t\t\t \t}\n\t\t\t\t\t\t\t\t\treturn output;\n\t\t\t\t\t\t\t\t}\n \t\n }\n ));\n }\n }\n }\n\n // Entangled Chalice unique id\n if(Configs.isEnabled(EntangledChaliceConfig.class)\n && Configs.isEnabled(DarkGemConfig.class)\n && Configs.isEnabled(CorruptedTearConfig.class)) {\n Item tear = CorruptedTearConfig._instance.getItemInstance();\n GameRegistry.addRecipe(new ObservableShapedRecipe(3, 3, new ItemStack[]{\n new ItemStack(Items.gold_ingot), new ItemStack(tear), new ItemStack(Items.gold_ingot),\n new ItemStack(DarkGem.getInstance()), new ItemStack(Items.gold_ingot), new ItemStack(DarkGem.getInstance()),\n new ItemStack(Items.gold_ingot), new ItemStack(Items.gold_ingot), new ItemStack(Items.gold_ingot)\n }, new ItemStack(Item.getItemFromBlock(EntangledChalice.getInstance()), 2), new IRecipeOutputObserver() {\n @Override\n public ItemStack getRecipeOutput(InventoryCrafting craftingGrid, ItemStack output) {\n ItemStack newStack = output.copy();\n EntangledChaliceItem item = (EntangledChaliceItem) Item.getItemFromBlock(EntangledChalice.getInstance());\n item.setNextTankID(newStack);\n return newStack;\n }\n }));\n\n GameRegistry.addRecipe(new ObservableShapedRecipe(3, 3, new ItemStack[]{\n new ItemStack(Items.gold_ingot), new ItemStack(tear), new ItemStack(Items.gold_ingot),\n new ItemStack(DarkGem.getInstance()), new ItemStack(Item.getItemFromBlock(EntangledChalice.getInstance()), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(DarkGem.getInstance()),\n new ItemStack(Items.gold_ingot), new ItemStack(Items.gold_ingot), new ItemStack(Items.gold_ingot)\n }, new ItemStack(Item.getItemFromBlock(EntangledChalice.getInstance()), 2), new IRecipeOutputObserver() {\n @Override\n public ItemStack getRecipeOutput(InventoryCrafting craftingGrid, ItemStack output) {\n ItemStack newStack = output.copy();\n EntangledChaliceItem item = (EntangledChaliceItem) Item.getItemFromBlock(EntangledChalice.getInstance());\n String tankID = item.getTankID(craftingGrid.getStackInSlot(4));\n item.setTankID(newStack, tankID);\n return newStack;\n }\n }));\n }\n \n // Dark tank upgrades\n if(Configs.isEnabled(DarkTankConfig.class)) {\n \tfor(int i = 1; i < 9; i++) {\n \t\tItemBlockFluidContainer tankItem = (ItemBlockFluidContainer) Item.getItemFromBlock(DarkTank.getInstance());\n\t \tGameRegistry.addRecipe(new ItemBlockFluidContainerCombinationRecipe(i, tankItem));\n \t}\n }\n\n // Blood Extractor upgrades\n if(Configs.isEnabled(BloodExtractorConfig.class) && Configs.isEnabled(DarkTankConfig.class)) {\n for(int i = 1; i < 9; i++) {\n GameRegistry.addRecipe(new BloodExtractorCombinationRecipe(i));\n }\n }\n \t\n if (Configs.isEnabled(EnvironmentalAccumulatorConfig.class)) {\n ItemStack outputStack = null;\n String recipeName = null;\n \n // Add the different weather container recipes\n if (Configs.isEnabled(WeatherContainerConfig.class)) {\n\t ItemStack emptyContainer = WeatherContainer.createItemStack(WeatherContainerTypes.EMPTY, 1);\n\t WeatherType[] weatherInputs = {WeatherType.CLEAR, WeatherType.LIGHTNING, WeatherType.RAIN};\n\t WeatherType[] weatherOutputs = {WeatherType.RAIN, WeatherType.RAIN, WeatherType.CLEAR};\n\t \n\t for (int i=0; i < weatherInputs.length; ++i) {\n recipeName = \"WeatherContainer\" + weatherInputs[i].getClass().getSimpleName();\n outputStack = WeatherContainer.createItemStack(\n WeatherContainerTypes.getWeatherContainerType(weatherInputs[i]), 1);\n\n EnvironmentalAccumulator.getInstance().getRecipeRegistry().registerRecipe(\n recipeName,\n new EnvironmentalAccumulatorRecipeComponent(\n emptyContainer,\n weatherInputs[i]\n ),\n new EnvironmentalAccumulatorRecipeComponent(\n outputStack,\n weatherOutputs[i]\n ),\n new EnvironmentalAccumulatorRecipeProperties()\n );\n\t }\n }\n\n // Add biome extract recipes\n if(Configs.isEnabled(BiomeExtractConfig.class) && BiomeExtractConfig.hasRecipes) {\n ItemStack emptyContainer = new ItemStack(BiomeExtract.getInstance());\n ItemStack filledContainer = BiomeExtract.getInstance().createItemStack(null, 1); // Still dummy!\n filledContainer.setItemDamage(OreDictionary.WILDCARD_VALUE);\n EnvironmentalAccumulator.getInstance().getRecipeRegistry().registerRecipe(\n recipeName,\n new EnvironmentalAccumulatorRecipeComponent(\n emptyContainer,\n WeatherType.ANY\n ),\n new EnvironmentalAccumulatorRecipeComponent(\n filledContainer,\n WeatherType.ANY\n ),\n new EnvironmentalAccumulatorRecipeProperties(1000, BiomeExtractConfig.envirAccCooldownTime, -1.0D, null, new EnvironmentalAccumulatorRecipeProperties.IEAResultOverride() {\n @Override\n public ItemStack getResult(IBlockAccess world, int x, int y, int z, ItemStack originalResult) {\n World worldSafe = (World) world;\n BiomeGenBase biome = worldSafe.getBiomeGenForCoords(x, z);\n if(BiomeExtractConfig._instance.isCraftingBlacklisted(biome.biomeID)) {\n return BiomeExtract.getInstance().createItemStack(null, 1);\n } else {\n return BiomeExtract.getInstance().createItemStack(biome, 1);\n }\n }\n })\n );\n }\n }\n }", "private native void setDefaultRealmFileDirectory(String fileDir, AssetManager assets);", "public Assets() {\n\t\tinit();\n\t}", "public DownloadExtraAssets(JSONArray urls, String hostUrl, Context context) {\n DownloadExtraAssets.hostUrl = hostUrl;\n String packageName = context.getPackageName();\n\n // Get path to where assets need to be stored\n // QA/Prod: data/data/com.mustangcustomizer2.alpha/files/www/assets/cars/mustang2015/geometry/Geometry_305_v6_fb_coupe_frontlightbulb1_a001.b3d.dflr\";\n // /data/user/0/com.mustangcustomizer2.alpha/files/\n // /data/user/0/com.mustangcustomizer2.alpha/files/\n this.assetFolderPath = Environment.getDataDirectory().getAbsolutePath() + File.separator + \"user\"\n + File.separator + \"0\"\n + File.separator + packageName + File.separator + \"files\"\n + File.separator + \"www\" + File.separator + \"assets\";\n\n this.localRemoteResources = createLocalRemoteUris(urls);\n this.assetsThatFailedToDownload = new JSONArray();\n\n }", "public static void main(String args[]) {\n (Installer.instance = new Installer(true)).loadWindow();\n\n //TODO: Save autohide status on file before implementing\n Installer.instance.autoHide.setState(false);\n Installer.instance.autoHide.setVisible(false);\n\n String gameDir = FileUtils.getWorkingDirectory().getAbsolutePath();\n\n /* Forces the forge installer download, enables the progress bar */\n Rectangle oldBounds = Installer.instance.frame.getBounds();\n Installer.instance.frame.setBounds(oldBounds.x, oldBounds.y, oldBounds.width, oldBounds.height + 50);\n\n download(new File(gameDir), manifest_url, true, \"forge\");\n\n /* Removes the progress bar & download status after finishing download */\n Installer.instance.frame.setBounds(oldBounds);\n Installer.instance.downloadStatus.setVisible(false);\n\n log(\"Download completed\");\n }", "void installMarathonApps();", "public boolean addAsset(final String assetPath, final String localAssetPath) {\n Callable<Boolean> addAssetCallable = new Callable<Boolean>() {\n @Override\n public Boolean call() {\n return psDoAddAsset(assetPath, localAssetPath);\n }\n };\n try {\n return phoneSynchronizer.sendNow(addAssetCallable);\n } catch (PhoneCommunicationException e) {\n e.printStackTrace();\n return false;\n }\n }", "private void copyExampleWorkouts() {\n\t\ttry {\n\t\t\tString[] exampleWorkouts = mContext.getAssets().list(\n\t\t\t\t\tIDataProvider.EXAMPLE_WORKOUT_FOLDER);\n\t\t\tfor (String file : exampleWorkouts) {\n\t\t\t\tInputStream in = null;\n\t\t\t\tOutputStream out = null;\n\t\t\t\ttry {\n\t\t\t\t\tin = mContext.getAssets().open(IDataProvider.EXAMPLE_WORKOUT_FOLDER + \"/\" + file);\n\t\t\t\t\tout = new FileOutputStream(mContext.getFilesDir().toString() + \"/\" + file);\n\n\t\t\t\t\t// copy file\n\t\t\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\t\tint read;\n\t\t\t\t\twhile ((read = in.read(buffer)) != -1) {\n\t\t\t\t\t\tout.write(buffer, 0, read);\n\t\t\t\t\t}\n\n\t\t\t\t\tin.close();\n\t\t\t\t\tin = null;\n\t\t\t\t\tout.flush();\n\t\t\t\t\tout.close();\n\t\t\t\t\tout = null;\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tLog.e(\"tag\", \"Failed to copy asset file: \" + file, e);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tLog.e(TAG, \"Copying example workouts failed\", e);\n\t\t}\n\t}", "public static void updateRepositoryList() {\n \t\tassetLoader.removeAllRepositories();\n \t\tfor (String repo : MapTool.getCampaign().getRemoteRepositoryList()) {\n \t\t\tassetLoader.addRepository(repo);\n \t\t}\n \t}", "private void stageSelfContainedJar(InputStream stream, ApplicationDescription desc)\n throws IOException {\n // First extract the bundle coordinates\n String coords = getSelfContainedBundleCoordinates(desc);\n if (coords == null) {\n return;\n }\n\n // Split the coordinates into segments and build the file name.\n String[] f = coords.substring(4).split(\"/\");\n String base = \"m2/\" + f[0].replace('.', '/') + \"/\" + f[1] + \"/\" + f[2] + \"/\" + f[1] + \"-\" + f[2];\n String jarName = base + (f.length < 4 ? \"\" : \"-\" + f[3]) + \".jar\";\n String featuresName = base + \"-features.xml\";\n\n // Create the file directory structure and copy the file there.\n File jar = appFile(desc.name(), jarName);\n boolean ok = jar.getParentFile().exists() || jar.getParentFile().mkdirs();\n if (ok) {\n Files.write(toByteArray(stream), jar);\n Files.copy(appFile(desc.name(), FEATURES_XML), appFile(desc.name(), featuresName));\n if (!appFile(desc.name(), FEATURES_XML).delete()) {\n log.warn(\"Unable to delete self-contained application {} features.xml\", desc.name());\n }\n } else {\n throw new IOException(\"Unable to save self-contained application \" + desc.name());\n }\n }", "@Override\r\n public boolean includeManifest() {\r\n return true;\r\n }", "public static void mountWicketResourcesMerged(final String mountPrefix, final WebApplication application) {\n\t\tmountWicketResourcesMerged(mountPrefix, application, new ResourceMount().setDefaultAggressiveCacheDuration());\n\t}", "public static void setServer(final MinecraftServer server) {\n synchronize();\n dataDirectory = server.func_240776_a_(BLOBS_FOLDER_NAME);\n try {\n Files.createDirectories(dataDirectory);\n } catch (final IOException e) {\n LOGGER.error(e);\n }\n }", "public static void registerMachineRecipes()\n {\n ThermalExpansionHelper.addTransposerFill(10000, new ItemStack(BlockFrame.instance, 1, 0), new ItemStack(BlockFrame.instance, 1, BlockFrame.REDSTONE_INTERFACE), new FluidStack(FluidRegistry.getFluidID(\"redstone\"), 200), false);\n ThermalExpansionHelper.addTransposerFill(10000, new ItemStack(ItemBlankUpgrade.instance, 1, 0), new ItemStack(ItemUpgrade.instance, 1, 0), new FluidStack(FluidRegistry.getFluidID(\"redstone\"), 200), false);\n\n ThermalExpansionHelper.addTransposerFill(15000, new ItemStack(BlockFrame.instance, 1, 0), new ItemStack(BlockFrame.instance, 1, BlockFrame.NETWORK_INTERFACE), new FluidStack(FluidRegistry.getFluidID(\"ender\"), 125), false);\n ThermalExpansionHelper.addTransposerFill(15000, new ItemStack(ItemBlankUpgrade.instance, 1, 1), new ItemStack(ItemUpgrade.instance, 1, 1), new FluidStack(FluidRegistry.getFluidID(\"ender\"), 125), false);\n\n ThermalExpansionHelper.addTransposerFill(25000, new ItemStack(BlockStabilizerEmpty.instance, 1, 0), new ItemStack(BlockStabilizer.instance, 1, 0), new FluidStack(FluidRegistry.getFluidID(\"ender\"), 150), false);\n }", "public void saveAssets() {\r\n int size = Main.materialList.size();\r\n for (int i=0; i<size; i++) {\r\n RawMaterial m = Main.materialList.get(i);\r\n if (materials.containsKey(m)) {\r\n myMaterials.add(m);\r\n materialAmounts.add(materials.get(m));\r\n }\r\n }\r\n size = Main.currencyList.size();\r\n for (int i=0; i<size; i++) {\r\n Currency c = Main.currencyList.get(i);\r\n if (currencies.containsKey(c)) {\r\n myCurrencies.add(c);\r\n currencyAmounts.add(currencies.get(c));\r\n }\r\n }\r\n }", "public void addJarsToThisLocator(List<String> jarFullPaths, String[] groups) throws IOException {\n addJarsToThisLocator(getDeployedBy(), Instant.now().toString(), jarFullPaths, groups);\n }", "public void setupSettings() throws IOException {\t\t\n\t\tString home = System.getProperty(\"user.home\");\n\t\n\t\t// Set image icon\n\t\tURL myurl = this.getClass().getResource(\"Resources/icon.png\");\n\t\tImageIcon img = new ImageIcon(this.getToolkit().getImage(myurl));\n\t\tsetIconImage(img.getImage());\n\t\t\n\t\tFile settingsDir = new File(home, \"sirc\");\n\t\tFile configDest = new File(settingsDir, \"config.ini\");\t\t\n\t\tFile serversDest = new File(settingsDir, \"servers.ini\");\n\t\t\n\t\tif(settingsDir.exists() == false) {\t// Make sure we have %User%/sIRC/\n\t if(!settingsDir.mkdir())\n\t throw new IllegalStateException(settingsDir.toString());\n\t\t}\n\t\t\n\t\tif(configDest.exists() == false) // There is no config-file in %User%/sIRC/. Copy from jar\n\t\t\tHelpers.copyFile(getClass().getResourceAsStream(\"Resources/config.ini\"), home + \"/sIRC/config.ini\");\n\t\t\n\t\tif(serversDest.exists() == false) // There is no servers-file in %User%/sIRC/. Copy from jar\n\t\t\tHelpers.copyFile(getClass().getResourceAsStream(\"Resources/servers.ini\"), home + \"/sIRC/servers.ini\");\n\t}", "public void initialise(GameContainer gc) {\n assetManager.queueAssets();\n }", "protected void installComponents() {\n }", "protected void addedToWorld(World world) \n {\n createImages();\n }", "private void initSharedPre() {\n\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tmyAssetInstaller.copyAll();\n\n\t\t\t\t\tringProgressDialog.dismiss();\n\t\t\t\t}", "public void addAssetAsync(final String assetPath, final String localAssetPath) {\n Runnable addAssetRunnable = new Runnable() {\n @Override\n public void run() {\n psDoAddAsset(assetPath, localAssetPath);\n }\n };\n try {\n phoneSynchronizer.sendEventually(addAssetRunnable);\n } catch (PhoneCommunicationException e) {\n e.printStackTrace();\n }\n }", "private URL getAssetsUrl() {\n\t\treturn url(ASSETS_URL);\n\t}", "protected void install() {\n\t\t//\n\t}", "private void makeBinariesExecutable() throws IOException {\n\t\tif (!isWindows()) {\n\t\t\tBundle bundle = Platform.getBundle(Activator.PLUGIN_ID);\n\t\t\tFile binDir = new File(FileLocator.toFileURL(FileLocator.find(bundle, new Path(\"bin\"), null)).getPath());\n\t\t\tnew File(binDir, \"align-it\").setExecutable(true);\n\t\t\tnew File(binDir, \"filter-it\").setExecutable(true);\n\t\t\tnew File(binDir, \"strip-it\").setExecutable(true);\n\t\t\tnew File(binDir, \"shape-it\").setExecutable(true);\n\t\t}\n\t}", "@Override\n\tpublic void addJarOrCandy(Component jarOrLeaf) {\n\t\t// Do nothing in a Leaf.\t\t\n\t}", "private void addImage(ImageRegistry reg, String imagePath) {\n \n final Bundle bundle = Platform.getBundle(ID);\n \n final Path attachImgPath = new Path(imagePath);\n final ImageDescriptor attachImg = ImageDescriptor.createFromURL(\n FileLocator.find(bundle, attachImgPath, null));\n reg.put(imagePath, attachImg);\n \n }", "@Override\n\tprotected NSArray<String> additionalCSSFiles() {\n\t\treturn new NSMutableArray<String>( new String[] { \"modalbox.css\" } );\n\t}", "@Override\n\tprotected void addAction(HashSet<String> addSet){\n\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).addNewDeploymentNodeBySet(addSet);\n\t}", "protected void installComponents() {\n\t}", "private void initModuleLibraries() {\r\n // local path in the temporarily directory for this module\r\n String localTmpPath = \"soundModule\";\r\n\r\n // path to jar\r\n String jarPath = System.getProperty(\"user.dir\") + File.separator\r\n + \"modules\" + File.separator + \"soundModule.jar\";\r\n\r\n // extract the jar files for sound module\r\n try {\r\n JarUtil.extractFileFromJar(jarPath, localTmpPath, \"lib\", \"jl1.0.jar\");\r\n JarUtil.extractFileFromJar(jarPath, localTmpPath, \"lib\",\r\n \"mp3spi1.9.4.jar\");\r\n JarUtil.extractFileFromJar(jarPath, localTmpPath, \"lib\",\r\n \"tritonus_share-0.3.6.jar\");\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\n // add this path in the library path...\r\n JarUtil.setLibraryPath(localTmpPath);\r\n\r\n // load jars from that temporarily directory (sound required jars)\r\n JarUtil.loadJar(localTmpPath, \"tritonus_share-0.3.6.jar\");\r\n JarUtil.loadJar(localTmpPath, \"mp3spi1.9.4.jar\");\r\n JarUtil.loadJar(localTmpPath, \"jl1.0.jar\");\r\n }", "private void importImages() {\n\n\t\t// Create array of the images. Each image pixel map contains\n\t\t// multiple images of the animate at different time steps\n\n\t\t// Eclipse will look for <path/to/project>/bin/<relative path specified>\n\t\tString img_file_base = \"Game_Sprites/\";\n\t\tString ext = \".png\";\n\n\t\t// Load background\n\t\tbackground = createImage(img_file_base + \"Underwater\" + ext);\n\t}", "public static String requestAsset(String file) {\n\t\tString newFile = GEN_FOLDER + file;\n\t\tif (assetExists(newFile)){\n\t\t\treturn newFile;\n\t\t}\n\t\tif (!assetExists(file)){\n\t\t\tLog.warn(\"Error requesting asset (maybe its internal):\"+file);\n\t\t\treturn file;\n\t\t}\n\t\t\t\n\t\tif (!CRJavaUtils.isRelease()) {\n\t\t\tif (!assetExists(newFile)) {\n\t\t\t\tcopyAsset(file, newFile);\n\t\t\t}\n\t\t}\n\t\treturn newFile;\n\t}", "public void addScriptPath(String path) throws IOException {\r\n File file = new File(path);\r\n if (file.isDirectory()) {\r\n loader = new DirectoryScriptLoader(loader, file);\r\n } else if (file.isFile()) {\r\n String lowercase = path.toLowerCase();\r\n if (lowercase.endsWith(\".jar\") || lowercase.endsWith(\".zip\")) \r\n loader = new JarScriptLoader(loader, file);\r\n } else {\r\n throw new IOException(\"Cannot add scriptpath : \"+path);\r\n }\r\n }", "public static void reloadClientScripts() {\n clientizenScripts.clear();\n for (File file : CoreUtilities.listDScriptFiles(clientizenFolder)) {\n String name = CoreUtilities.toLowerCase(file.getName());\n if (clientizenScripts.containsKey(name)) {\n Debug.echoError(\"Multiple script files named '\" + name + \"' found in client-scripts folder!\");\n continue;\n }\n try (FileInputStream stream = new FileInputStream(file)) {\n // TODO: clear comments server-side\n clientizenScripts.put(name, ScriptHelper.convertStreamToString(stream));\n if (CoreConfiguration.debugLoadingInfo) {\n Debug.log(\"Loaded client script: \" + name);\n }\n }\n catch (Exception e) {\n Debug.echoError(\"Failed to load client script file '\" + name + \"', see below stack trace:\");\n Debug.echoError(e);\n }\n }\n scriptsPacket = new SetScriptsPacketOut(clientizenScripts);\n }", "public void preLoadContent(AssetManager manager) {\n\t\tif (worldAssetState != AssetState.EMPTY) {\n\t\t\treturn;\n\t\t}\n\n\t\tworldAssetState = AssetState.LOADING;\n\n\t\tmanager.load(KOI_TEXTURE, Texture.class);\n\t\tassets.add(KOI_TEXTURE);\n\n\t\tmanager.load(ENEMY_TEXTURE, Texture.class);\n\t\tassets.add(ENEMY_TEXTURE);\n\n\t\tmanager.load(LILY_TEXTURE, Texture.class);\n\t\tassets.add(LILY_TEXTURE);\n\t\t\n\t\tmanager.load(LILY_TEXTURE_N, Texture.class);\n\t\tassets.add(LILY_TEXTURE_N);\n\t\t\n\t\tmanager.load(LILY_TEXTURE_S, Texture.class);\n\t\tassets.add(LILY_TEXTURE_S);\n\n\t\tmanager.load(LANTERN_TEXTURE, Texture.class);\n\t\tassets.add(LANTERN_TEXTURE);\n\n\t\tmanager.load(LIGHTING_TEXTURE, Texture.class);\n\t\tassets.add(LIGHTING_TEXTURE);\n\n\t\tmanager.load(SHADOW_TEXTURE, Texture.class);\n\t\tassets.add(SHADOW_TEXTURE);\n\n\t\tmanager.load(GOAL_TEXTURE, Texture.class);\n\t\tassets.add(GOAL_TEXTURE);\n\n\t\tmanager.load(EARTH_FILE,Texture.class);\n\t\tassets.add(EARTH_FILE);\n\n\t\tmanager.load(EARTH_FILE_D,Texture.class);\n\t\tassets.add(EARTH_FILE_D);\n\t\tmanager.load(EARTH_FILE_N,Texture.class);\n\t\tassets.add(EARTH_FILE_N);\n\t\tmanager.load(EARTH_FILE_S,Texture.class);\n\t\tassets.add(EARTH_FILE_S);\n\t\tmanager.load(SHORE_FILE,Texture.class);\n\t\tassets.add(SHORE_FILE);\n\n\t\tmanager.load(ROCK_FILE_D,Texture.class);\n\t\tassets.add(ROCK_FILE_D);\n\t\tmanager.load(ROCK_FILE_N,Texture.class);\n\t\tassets.add(ROCK_FILE_N);\n\t\tmanager.load(ROCK_FILE_S,Texture.class);\n\t\tassets.add(ROCK_FILE_S);\n\n\t\tmanager.load(WHIRLPOOL_TEXTURE, Texture.class);\n\t\tassets.add(WHIRLPOOL_TEXTURE);\n\t\t\n\t\tmanager.load(ENERGYBAR_TEXTURE, Texture.class);\n\t\tassets.add(ENERGYBAR_TEXTURE);\n\n\t\tmanager.load(UI_FLOWER, Texture.class);\n\t\tassets.add(UI_FLOWER);\n\n\t\tmanager.load(OVERLAY, Texture.class);\n\t\tassets.add(OVERLAY);\n\n\t\tmanager.load(BACKGROUND_FILE_N, Texture.class);\n\t\tassets.add(BACKGROUND_FILE_N);\n\n\t\tmanager.load(BACKGROUND_FILE_D, Texture.class);\n\t\tassets.add(BACKGROUND_FILE_D);\n\n\t\tmanager.load(BACKGROUND_FILE_S, Texture.class);\n\t\tassets.add(BACKGROUND_FILE_S);\n\t\t\n\t\t\n\n\t\tmanager.load(OVERLAY_FILE, Texture.class);\n\t\tassets.add(OVERLAY_FILE);\n\n\t\tmanager.load(KOI_ARROW, Texture.class);\n\t\tassets.add(KOI_ARROW);\n\t\tmanager.load(WHIRL_ARROW, Texture.class);\n\t\tassets.add(WHIRL_ARROW);\n\t\t\n\t\tmanager.load(TUTORIAL_TEXTURE1, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE1);\n\t\tmanager.load(TUTORIAL_TEXTURE2, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE2);\n\t\tmanager.load(TUTORIAL_TEXTURE3, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE3);\n\t\tmanager.load(TUTORIAL_TEXTURE4, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE4);\n\t\tmanager.load(TUTORIAL_TEXTURE5, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE5);\n\t\tmanager.load(TUTORIAL_TEXTURE6, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE6);\n\t\t\n\t\tmanager.load(HELP_TEXTURE, Texture.class);\n\t\tassets.add(HELP_TEXTURE);\n\t\t\n\n\t\treferenceC.a = 0f;\n\n\t\t// Load the font\n\t\tFreetypeFontLoader.FreeTypeFontLoaderParameter size2Params = new FreetypeFontLoader.FreeTypeFontLoaderParameter();\n\t\tsize2Params.fontFileName = FONT_FILE;\n\t\tsize2Params.fontParameters.size = FONT_SIZE;\n\t\tmanager.load(FONT_FILE, BitmapFont.class, size2Params);\n\t\tassets.add(FONT_FILE);\n\n\t\tFreetypeFontLoader.FreeTypeFontLoaderParameter size3Params = new FreetypeFontLoader.FreeTypeFontLoaderParameter();\n\t\tsize3Params.fontFileName = FONT_FILE2;\n\t\tsize3Params.fontParameters.size = FONT_SIZE2;\n\t\tmanager.load(FONT_FILE2, BitmapFont.class, size3Params);\n\t\tassets.add(FONT_FILE2);\n\t\t\n\t\t\n\t}", "public String getAssetDirectory() {\n return String.format(\"plugin-webapp/%s\", getId());\n }", "@SafeVarargs\n\[email protected]\n\tpublic final void addRecipe(String recipePath, IIngredient input, int energy, IItemStack mainOutput, Percentaged<IItemStack>... additionalOutputs)\n\t{\n\t\tfinal ResourceLocation resourceLocation = new ResourceLocation(\"crafttweaker\", recipePath);\n\n\t\tfinal ItemStack result = mainOutput.getInternal();\n\t\tfinal Ingredient ingredient = input.asVanillaIngredient();\n\t\tfinal CrusherRecipe recipe = IEServerConfig.MACHINES.crusherConfig.apply(\n\t\t\t\tnew CrusherRecipe(resourceLocation, of(result), ingredient, energy)\n\t\t);\n\n\t\tfor(Percentaged<IItemStack> additionalOutput : additionalOutputs)\n\t\t{\n\t\t\tfinal StackWithChance stackWithChance = CrTIngredientUtil.getStackWithChance(additionalOutput);\n\t\t\trecipe.addToSecondaryOutput(stackWithChance);\n\t\t}\n\n\t\tCraftTweakerAPI.apply(new ActionAddRecipe<>(this, recipe, null));\n\t}", "private void createDesktopIcon(String linkName) {\n File icoFile = new File(pladipusFolder, \"pladipus.ico\");\r\n try (OutputStream out = new FileOutputStream(icoFile); InputStream in = getClass().getClassLoader().getResourceAsStream(\"images/pladipus.ico\")) {\r\n if (in != null) {\r\n IOUtils.copy(in, out);\r\n //set this icon as the ico\r\n String iconFileLocation = icoFile.getAbsolutePath();\r\n JShellLink link = new JShellLink();\r\n link.setFolder(JShellLink.getDirectory(\"desktop\"));\r\n link.setName(linkName);\r\n link.setIconLocation(iconFileLocation);\r\n link.setPath(jarFilePath);\r\n link.save();\r\n }\r\n } catch (IOException e) {\r\n\r\n LOGGER.error(e);\r\n System.out.println(\"An error occurred when trying to create a desktop shortcut...\");\r\n }\r\n }", "@NotNull\n public AsynchResult<Server> addServer(AddServerRequestV1 request) {\n // TODO \n // We need first to probe the server to find out some server properties to decide what kind of client to use.\n var client = new HuaweiServerHardwareClient(request.address, request.username, request.password);\n var basicInfo = client.getServerBasicInfo();\n var currentServer = serverRepository.findFirstByAssetInfoSerialNumber(basicInfo.assetInfo.serialNumber);\n if (currentServer != null) {\n throw new ResourceAlreadyExistException();\n }\n var initializedServer = Server.initialize(basicInfo);\n initializedServer = serverRepository.save(initializedServer);\n var context = new AddServerContext();\n return context.run();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\tJarLevel jar = gui.saveJarLevel();\n\t\t\tif(jar != null) AddonManager.addJarLevel(jar.getFile());\n\t\t}", "public void registerRecipe() {\n\t ItemStack itemStackDroidParts = new ItemStack(SuperDopeJediMod.entityManager.droidParts);\n\t ItemStack itemStackQuadaniumSteelIngot = new ItemStack(SuperDopeJediMod.quadaniumSteelIngot); \n\t ItemStack itemStackThis = new ItemStack(this);\n\t \n\t GameRegistry.addRecipe(itemStackThis, \"xxx\", \"xyx\", \"xxx\", 'x', itemStackDroidParts,\n\t \t\t\t'y', itemStackQuadaniumSteelIngot);\t\n\t}", "default void buildMainGenerateCustomRuntimeImage() {\n if (!bach().project().settings().tools().enabled(\"jlink\")) return;\n say(\"Assemble custom runtime image\");\n var image = bach().folders().workspace(\"image\");\n Paths.deleteDirectories(image);\n bach().run(buildMainJLink(image));\n }", "@Override\n\tpublic boolean addItem(ItemStack item, Player player) {\n\t\tif (!canAddItem(item, player)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (item == null) {\n\t\t\treturn true;\n\t\t}\n\t\t//Backup contents\n\t\tItemStack[] backup = getContents().clone();\n\t\tItemStack backupItem = new ItemStack(item.getTypeId(), item.getAmount(), item.getDurability());\n\t\t\n\t\tint max = MinecartManiaWorld.getMaxStackSize(item);\n\t\t\n\t\t//First attempt to merge the itemstack with existing item stacks that aren't full (< 64)\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tif (getItem(i) != null) {\n\t\t\t\tif (getItem(i).getTypeId() == item.getTypeId() && getItem(i).getDurability() == item.getDurability()) {\n\t\t\t\t\tif (getItem(i).getAmount() + item.getAmount() <= max) {\n\t\t\t\t\t\tsetItem(i, new ItemStack(item.getTypeId(), getItem(i).getAmount() + item.getAmount(), item.getDurability()));\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tint diff = getItem(i).getAmount() + item.getAmount() - max;\n\t\t\t\t\t\tsetItem(i, new ItemStack(item.getTypeId(), max, item.getDurability()));\n\t\t\t\t\t\titem = new ItemStack(item.getTypeId(), diff, item.getDurability());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Attempt to add the item to an empty slot\n\t\tint emptySlot = firstEmpty();\n\t\tif (emptySlot > -1) {\n\t\t\tsetItem(emptySlot, item);\n\t\t\tupdate();\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\t//Try to merge the itemstack with the neighbor chest, if we have one\n\t\tMinecartManiaChest neighbor = getNeighborChest();\n\t\tif (neighbor != null) {\n\t\t\t//flag to prevent infinite recursion\n\t\t\tif (getDataValue(\"neighbor\") == null) {\n\t\t\t\tneighbor.setDataValue(\"neighbor\", Boolean.TRUE);\n\t\t\t\tif (getNeighborChest().addItem(item)) {\n\t\t\t\t\tupdate();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//reset flag\n\t\t\t\tsetDataValue(\"neighbor\", null);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t//if we fail, reset the inventory and item back to previous values\n\t\tgetChest().getInventory().setContents(backup);\n\t\titem = backupItem;\n\t\treturn false;\n\t}", "@Override\n public IRecipe addRecipe() {\n return RecipeRegistry.addShapedRecipe(new ItemStack(this),\n \"igi\",\n \"gog\",\n \"igi\",\n 'o', \"obsidian\", 'i', \"ingotIron\", 'g', \"blockGlass\");\n }", "private void findAndAddChecksumFiles(FileInfo fileInfo) throws IOException {\n Set<ChecksumInfo> checksums = fileInfo.getChecksumsInfo().getChecksums();\n for (ChecksumType checksumType : ChecksumType.BASE_CHECKSUM_TYPES) {\n String checksumValue = repoChecksumPolicy.getChecksum(checksumType, checksums);\n if (StringUtils.isNotBlank(checksumValue)) {\n // if we got something, write it\n writeArtifactChecksum(checksumValue, checksumType, fileInfo.getRepoPath(), checksumValue.length());\n }\n }\n }" ]
[ "0.5596328", "0.54706514", "0.5392592", "0.529016", "0.5245065", "0.5232691", "0.5197894", "0.51935756", "0.5153163", "0.51326966", "0.50692713", "0.5037862", "0.50210875", "0.5008062", "0.50045675", "0.49898812", "0.49550575", "0.49407965", "0.4910413", "0.4896934", "0.48937955", "0.48578247", "0.48211837", "0.4817541", "0.4815581", "0.4782877", "0.4764304", "0.47640955", "0.47582874", "0.47558483", "0.47468993", "0.47195238", "0.47045586", "0.46965232", "0.46867526", "0.46856138", "0.46809247", "0.46489218", "0.46477714", "0.4644338", "0.4637567", "0.46238235", "0.4600165", "0.4597886", "0.45898217", "0.45722744", "0.456263", "0.45520714", "0.45280883", "0.4494543", "0.44886595", "0.44880435", "0.4472834", "0.4466964", "0.4463361", "0.44550422", "0.4450381", "0.44401467", "0.4440022", "0.44392863", "0.44360757", "0.44332537", "0.4428969", "0.44271997", "0.44256654", "0.44243857", "0.43997777", "0.4392872", "0.43868783", "0.43800983", "0.43684015", "0.43566313", "0.43531004", "0.4349068", "0.43391165", "0.43364018", "0.4331921", "0.43242803", "0.43192545", "0.43191314", "0.43123958", "0.4312127", "0.43073577", "0.42900103", "0.42863765", "0.42860308", "0.42793965", "0.42783698", "0.42781243", "0.42771143", "0.42769456", "0.42759234", "0.4275509", "0.42705727", "0.426888", "0.42649022", "0.42575833", "0.4254633", "0.42522818", "0.4249091" ]
0.5624915
0
Generate the Etag hash string that is returned by the assets location.
protected String getFileETag(File file) { FileInputStream is = null; try { is = new FileInputStream(file); return "\"" + DigestUtils.md5Hex(is) + "\""; } catch (IOException e) { return ""; } finally { closeQuietly(is); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "String getHash();", "String getHash();", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", tagId=\").append(tagId);\n sb.append(\", tagName=\").append(tagName);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", index=\").append(index);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\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 }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "com.google.protobuf.ByteString getFileHash();", "com.google.protobuf.ByteString getFileHash();", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "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}", "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 }", "java.lang.String getHashData();", "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 String getHash(List<ExtenderResource> extenderResources) throws ExtenderClientException {\n MessageDigest md = ExtenderClientCache.getHasher();\n getHash(extenderResources, md);\n return hashToString(md.digest());\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", id=\").append(id);\n sb.append(\", uuid=\").append(uuid);\n sb.append(\", definedName=\").append(definedName);\n sb.append(\", fileName=\").append(fileName);\n sb.append(\", diskFileName=\").append(diskFileName);\n sb.append(\", fileType=\").append(fileType);\n sb.append(\", filePath=\").append(filePath);\n sb.append(\", contentUuid=\").append(contentUuid);\n sb.append(\", uploadTime=\").append(uploadTime);\n sb.append(\", createBy=\").append(createBy);\n sb.append(\", createDate=\").append(createDate);\n sb.append(\", updateBy=\").append(updateBy);\n sb.append(\", updateDate=\").append(updateDate);\n sb.append(\", isDelete=\").append(isDelete);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "public String getHash(ExtenderResource extenderResource) throws ExtenderClientException {\n String path = extenderResource.getAbsPath();\n Long fileTimestamp = extenderResource.getLastModified();\n Long timestamp = this.timestamps.get(path);\n\n if (timestamp != null && fileTimestamp.equals(timestamp) ) {\n String hash = this.hashes.get(path);\n if (hash != null) {\n return hash;\n }\n }\n\n // Create a new hash\n String hash = ExtenderClientCache.hash(extenderResource);\n this.timestamps.put(path, fileTimestamp);\n this.hashes.put(path, hash);\n return hash;\n }", "java.lang.String getManifestHashAlgorithm();", "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 }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", id=\").append(id);\n sb.append(\", imgId=\").append(imgId);\n sb.append(\", imgName=\").append(imgName);\n sb.append(\", containerId=\").append(containerId);\n sb.append(\", containerName=\").append(containerName);\n sb.append(\", containerIp=\").append(containerIp);\n sb.append(\", containerPort=\").append(containerPort);\n sb.append(\", containerUser=\").append(containerUser);\n sb.append(\", containerPasswd=\").append(containerPasswd);\n sb.append(\", containerVolumes=\").append(containerVolumes);\n sb.append(\", containerDb=\").append(containerDb);\n sb.append(\", containerEnv=\").append(containerEnv);\n sb.append(\", remark=\").append(remark);\n sb.append(\", createdAt=\").append(createdAt);\n sb.append(\", updatedAt=\").append(updatedAt);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "private int computeHash(URI location) {\n \t\treturn location.hashCode();\n \t}", "String getSaltedHash();", "private int getHash() {\n return (name + FluentIterable.from(getDimensions()).transform(new Function<CloudConfigurationDimension, String>() {\n @Override\n public String apply(CloudConfigurationDimension dimension) {\n return getStringRepresentation(dimension);\n }\n }).toString()).hashCode();\n }", "@Override\r\n public String toString() {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(getClass().getSimpleName());\r\n sb.append(\" [\");\r\n sb.append(\"Hash = \").append(hashCode());\r\n sb.append(\", appId=\").append(appId);\r\n sb.append(\", code=\").append(code);\r\n sb.append(\", name=\").append(name);\r\n sb.append(\", appSecret=\").append(appSecret);\r\n sb.append(\", appToken=\").append(appToken);\r\n sb.append(\", appAeskey=\").append(appAeskey);\r\n sb.append(\", refreshToken=\").append(refreshToken);\r\n sb.append(\", rawId=\").append(rawId);\r\n sb.append(\", logo=\").append(logo);\r\n sb.append(\", appQr=\").append(appQr);\r\n sb.append(\", serviceType=\").append(serviceType);\r\n sb.append(\", verifyType=\").append(verifyType);\r\n sb.append(\", atTime=\").append(atTime);\r\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\r\n sb.append(\"]\");\r\n return sb.toString();\r\n }", "POGOProtos.Rpc.AssetDigestEntryProto getDigest();", "String etag();", "String etag();", "String etag();", "org.apache.xmlbeans.XmlAnyURI xgetManifestHashAlgorithm();", "public String getHash() {\n return hash;\n }", "public String getHash()\n {\n return hash;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", guideServiceId=\").append(guideServiceId);\n sb.append(\", guideId=\").append(guideId);\n sb.append(\", langCodes=\").append(langCodes);\n sb.append(\", expfamily=\").append(expfamily);\n sb.append(\", expbusiness=\").append(expbusiness);\n sb.append(\", expcross=\").append(expcross);\n sb.append(\", style=\").append(style);\n sb.append(\", expspot=\").append(expspot);\n sb.append(\", expschool=\").append(expschool);\n sb.append(\", expshopping=\").append(expshopping);\n sb.append(\", exphistory=\").append(exphistory);\n sb.append(\", exptraffic=\").append(exptraffic);\n sb.append(\", expfood=\").append(expfood);\n sb.append(\", explaw=\").append(explaw);\n sb.append(\", expculture=\").append(expculture);\n sb.append(\", exphotel=\").append(exphotel);\n sb.append(\", exppoi=\").append(exppoi);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public int generateHashCode() {\n int code = getClass().hashCode();\n boolean temp_fromSource = isFromSource();\n code ^= temp_fromSource ? 1231 : 1237;\n IRId temp_name = getName();\n code ^= temp_name.hashCode();\n List<IRId> temp_params = getParams();\n code ^= temp_params.hashCode();\n List<IRStmt> temp_args = getArgs();\n code ^= temp_args.hashCode();\n List<IRFunDecl> temp_fds = getFds();\n code ^= temp_fds.hashCode();\n List<IRVarStmt> temp_vds = getVds();\n code ^= temp_vds.hashCode();\n List<IRStmt> temp_body = getBody();\n code ^= temp_body.hashCode();\n return code;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public POGOProtos.Rpc.AssetDigestEntryProto getDigest() {\n if (digestBuilder_ == null) {\n return digest_ == null ? POGOProtos.Rpc.AssetDigestEntryProto.getDefaultInstance() : digest_;\n } else {\n return digestBuilder_.getMessage();\n }\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", id=\").append(id);\n sb.append(\", title=\").append(title);\n sb.append(\", url=\").append(url);\n sb.append(\", avatar=\").append(avatar);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", pObjObjectGid=\").append(pObjObjectGid);\n sb.append(\", layoutName=\").append(layoutName);\n sb.append(\", layoutType=\").append(layoutType);\n sb.append(\", df=\").append(df);\n sb.append(\", fields=\").append(fields);\n sb.append(\", jsondata=\").append(jsondata);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "private String hash(){\r\n return Utility.SHA512(this.simplify());\r\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "public String getHash() {\n\t\treturn hash;\n\t}", "int getHash();", "@Override\n public int hashCode() {\n if (hash == 0)\n hash = MD5.getHash(owner.getLogin() + description).hashCode();\n return hash;\n }", "public String toString() {\n\t\treturn hashString;\n\t}", "public String getMD5() {\n return hash;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "String getHashAlgorithm();", "@Override\n public String toString() {\n return encodedHash.get();\n }", "private String getHash(String text) {\n\t\ttry {\n\t\t\tString salt = new StringBuffer(this.email).reverse().toString();\n\t\t\ttext += salt;\n\t\t\tMessageDigest m = MessageDigest.getInstance(\"MD5\");\n\t\t\tm.reset();\n\t\t\tm.update(text.getBytes());\n\t\t\tbyte[] digest = m.digest();\n\t\t\tBigInteger bigInt = new BigInteger(1, digest);\n\t\t\tString hashedText = bigInt.toString(16);\n\t\t\twhile (hashedText.length() < 32) {\n\t\t\t\thashedText = \"0\" + hashedText;\n\t\t\t}\n\t\t\treturn hashedText;\n\t\t} catch (Exception e) {\n\t\t\te.getStackTrace();\n\t\t\treturn text;\n\t\t}\n\t}", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "@Override\r\n public String toString() {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(getClass().getSimpleName());\r\n sb.append(\" [\");\r\n sb.append(\"Hash = \").append(hashCode());\r\n sb.append(\", id=\").append(id);\r\n sb.append(\", companyCode=\").append(companyCode);\r\n sb.append(\", companyName=\").append(companyName);\r\n sb.append(\", briefName=\").append(briefName);\r\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\r\n sb.append(\"]\");\r\n return sb.toString();\r\n }", "public int generateHashCode() {\n int code = getClass().hashCode();\n ASTSpanInfo temp_info = getInfo();\n code ^= temp_info.hashCode();\n LHS temp_obj = getObj();\n code ^= temp_obj.hashCode();\n Expr temp_index = getIndex();\n code ^= temp_index.hashCode();\n return code;\n }", "public String getHash() {\n\t\treturn _hash;\n\t}", "public String getHashCode();", "@Override\r\n public String toString() {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(getClass().getSimpleName());\r\n sb.append(\" [\");\r\n sb.append(\"Hash = \").append(hashCode());\r\n sb.append(\", name=\").append(name);\r\n sb.append(\", className=\").append(className);\r\n sb.append(\", groupName=\").append(groupName);\r\n sb.append(\", description=\").append(description);\r\n sb.append(\"]\");\r\n return sb.toString();\r\n }", "@Override\n public String getSaltedHash() {\n Object ref = saltedHash_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n saltedHash_ = s;\n return s;\n }\n }", "public java.lang.String getEtag() {\n java.lang.Object ref = etag_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n etag_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "com.google.protobuf.ByteString getEtagBytes();", "com.google.protobuf.ByteString getEtagBytes();", "public java.lang.String getEtag() {\n java.lang.Object ref = etag_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n etag_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "static String etag(Path path) throws IOException {\n String name = path.getFileName().toString();\n long size = Files.size(path);\n long lastModified = Files.getLastModifiedTime(path).toMillis();\n return etag(name, size, lastModified);\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 String getSaltedHash() {\n Object ref = saltedHash_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n saltedHash_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public java.lang.String getEtag() {\n java.lang.Object ref = etag_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n etag_ = s;\n }\n return s;\n }\n }", "@Override\n public int hashCode() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"6ebbad60-c086-483f-99f5-ae1b69cbca99\");\n return getName().hashCode();\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", id=\").append(id);\n sb.append(\", name=\").append(name);\n sb.append(\", addressId=\").append(addressId);\n sb.append(\", marketGroupId=\").append(marketGroupId);\n sb.append(\", managerName=\").append(managerName);\n sb.append(\", managerPhone=\").append(managerPhone);\n sb.append(\"]\");\n return sb.toString();\n }", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public abstract int getHash();", "public String getMD5() {\n return m_module.getConfiguration().getMD5();\n }", "public com.google.protobuf.ByteString getEtagBytes() {\n java.lang.Object ref = etag_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n etag_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getEtagBytes() {\n java.lang.Object ref = etag_;\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 etag_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getEtagBytes() {\n java.lang.Object ref = etag_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n etag_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getAssetPathBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(assetPath_);\n }", "public String identityHash() {\n return Integer.toHexString(System.identityHashCode(this));\n }", "@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(getClass().getSimpleName());\n\t\tsb.append(\" [\");\n\t\tsb.append(\"Hash = \").append(hashCode());\n\t\tsb.append(\", id=\").append(id);\n\t\tsb.append(\", parentid=\").append(parentid);\n\t\tsb.append(\", name=\").append(name);\n\t\tsb.append(\", url=\").append(url);\n\t\tsb.append(\", type=\").append(type);\n\t\tsb.append(\", describe=\").append(describe);\n\t\tsb.append(\", weight=\").append(weight);\n\t\tsb.append(\", status=\").append(status);\n\t\tsb.append(\", createtime=\").append(createtime);\n\t\tsb.append(\", updatetime=\").append(updatetime);\n\t\tsb.append(\"]\");\n\t\treturn sb.toString();\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", roleId=\").append(roleId);\n sb.append(\", roleName=\").append(roleName);\n sb.append(\", compId=\").append(compId);\n sb.append(\", roleDesc=\").append(roleDesc);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "java.lang.String getEtag();", "java.lang.String getEtag();", "@java.lang.Override\n public POGOProtos.Rpc.AssetDigestEntryProto getDigest() {\n return digest_ == null ? POGOProtos.Rpc.AssetDigestEntryProto.getDefaultInstance() : digest_;\n }", "public byte[] getHash() {\n\t\treturn _hash.getDataID();\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", jId=\").append(jId);\n sb.append(\", jEndtime=\").append(jEndtime);\n sb.append(\", pId=\").append(pId);\n sb.append(\", uId=\").append(uId);\n sb.append(\", jScore=\").append(jScore);\n sb.append(\", jComment=\").append(jComment);\n sb.append(\"]\");\n return sb.toString();\n }", "public com.google.protobuf.ByteString\n getAssetPathBytes() {\n return instance.getAssetPathBytes();\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", id=\").append(id);\n sb.append(\", name=\").append(name);\n sb.append(\", remark=\").append(remark);\n sb.append(\"]\");\n return sb.toString();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getEtagBytes() {\n java.lang.Object ref = etag_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n etag_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", id=\").append(id);\n sb.append(\", name=\").append(name);\n sb.append(\", price=\").append(price);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public int hashCode()\n {\n return 37 * 17 + this.EAS_event_ID;\n }", "protected int computeHashCode() {\n return flags * 17\n + (var != null ? var.hashCode() : 0)\n + (num != null ? num.hashCode() : 0)\n + (str != null ? str.hashCode() : 0)\n + (object_labels != null ? object_labels.hashCode() : 0)\n + (getters != null ? getters.hashCode() : 0)\n + (setters != null ? setters.hashCode() : 0)\n + (excluded_strings != null ? excluded_strings.hashCode() : 0)\n + (included_strings != null ? included_strings.hashCode() : 0)\n + (functionPartitions != null ? functionPartitions.hashCode() : 0)\n + (functionTypeSignatures != null ? functionTypeSignatures.hashCode() : 0);\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", id=\").append(id);\n sb.append(\", eid=\").append(eid);\n sb.append(\", title=\").append(title);\n sb.append(\", m_price=\").append(m_price);\n sb.append(\", o_price=\").append(o_price);\n sb.append(\", ship_address=\").append(ship_address);\n sb.append(\", min_order=\").append(min_order);\n sb.append(\", brand=\").append(brand);\n sb.append(\", p_type=\").append(p_type);\n sb.append(\", after_sale=\").append(after_sale);\n sb.append(\", invoice=\").append(invoice);\n sb.append(\", stock=\").append(stock);\n sb.append(\", stock_num=\").append(stock_num);\n sb.append(\", stock_price=\").append(stock_price);\n sb.append(\", lower_warn=\").append(lower_warn);\n sb.append(\", img_0=\").append(img_0);\n sb.append(\", img_1=\").append(img_1);\n sb.append(\", img_2=\").append(img_2);\n sb.append(\", img_3=\").append(img_3);\n sb.append(\", img_4=\").append(img_4);\n sb.append(\", detail=\").append(detail);\n sb.append(\", stock_update=\").append(stock_update);\n sb.append(\", period=\").append(period);\n sb.append(\", publish=\").append(publish);\n sb.append(\", publish_tm=\").append(publish_tm);\n sb.append(\", sale_num=\").append(sale_num);\n sb.append(\", is_delete=\").append(is_delete);\n sb.append(\", cid=\").append(cid);\n sb.append(\", ent_cid=\").append(ent_cid);\n sb.append(\"]\");\n return sb.toString();\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", cLsh=\").append(cLsh);\n sb.append(\", cUserid=\").append(cUserid);\n sb.append(\", cJsyy=\").append(cJsyy);\n sb.append(\", dJssj=\").append(dJssj);\n sb.append(\", nJssl=\").append(nJssl);\n sb.append(\", cBz=\").append(cBz);\n sb.append(\", cZt=\").append(cZt);\n sb.append(\", cCjuser=\").append(cCjuser);\n sb.append(\", dCjsj=\").append(dCjsj);\n sb.append(\", cXguser=\").append(cXguser);\n sb.append(\", dXgsj=\").append(dXgsj);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "public int hashCode() {\n if (myhash == -1) {\n myhash = timestamp.hashCode() + signerCertPath.hashCode();\n }\n return myhash;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", guideaccountdetailid=\").append(guideaccountdetailid);\n sb.append(\", guideaccountsn=\").append(guideaccountsn);\n sb.append(\", guideid=\").append(guideid);\n sb.append(\", orderid=\").append(orderid);\n sb.append(\", ordersn=\").append(ordersn);\n sb.append(\", guidefinanceid=\").append(guidefinanceid);\n sb.append(\", biztype=\").append(biztype);\n sb.append(\", content=\").append(content);\n sb.append(\", price=\").append(price);\n sb.append(\", paytype=\").append(paytype);\n sb.append(\", bizstatus=\").append(bizstatus);\n sb.append(\", bizcomment=\").append(bizcomment);\n sb.append(\", guidedrawid=\").append(guidedrawid);\n sb.append(\", updatedAt=\").append(updatedAt);\n sb.append(\", createdAt=\").append(createdAt);\n sb.append(\"]\");\n return sb.toString();\n }", "private static String hexlify() throws Exception {\n byte[] data = new byte[4 + SCRIPT.length() + (16 - (4 + SCRIPT.length()) % 16)];\n data[0] = 77;\n data[1] = 80;\n data[2] = (byte) (SCRIPT.length() & 0xff);\n data[3] = (byte) ((SCRIPT.length() >> 8) & 0xff);\n for (int i = 0; i < SCRIPT.length(); ++i) {\n data[4 + i] = (byte) SCRIPT.charAt(i);\n }\n\n if (data.length > MAX_SIZE) {\n throw new Exception(\"Script is too long\");\n }\n int addr = 0x3e000;\n byte[] chunk = new byte[5 + 16];\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\":020000040003F7\")\n .append(\"\\n\");\n for (int i = 0; i < data.length; i += 16) {\n chunk[0] = 16;\n chunk[1] = (byte) ((addr >> 8) & 0xff);\n chunk[2] = (byte) (addr & 0xff);\n chunk[3] = 0;\n for (int j = 0; j < 16; j++) {\n chunk[4 + j] = data[i + j];\n }\n byte checksum = 0;\n for (int j = 0; j < 4 + 16; j++) {\n checksum += chunk[j];\n }\n chunk[4 + 16] = (byte) ((-checksum) & 0xff);\n stringBuilder.append(':')\n .append(hexlify(chunk).toUpperCase())\n .append(\"\\n\");\n addr += 16;\n }\n return stringBuilder.toString();\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}" ]
[ "0.61759114", "0.60778517", "0.60778517", "0.6033163", "0.5907306", "0.5884412", "0.58420604", "0.57715726", "0.574358", "0.574358", "0.5736654", "0.5736654", "0.56894106", "0.56749386", "0.56538093", "0.5644214", "0.5580992", "0.5579677", "0.5559485", "0.55425525", "0.552793", "0.54815954", "0.54796255", "0.5465129", "0.545713", "0.5457031", "0.5428872", "0.5406092", "0.5389977", "0.5389977", "0.5389977", "0.5352611", "0.53456986", "0.53346276", "0.53333443", "0.53297997", "0.532924", "0.532924", "0.532924", "0.5323221", "0.53177565", "0.5316775", "0.5316775", "0.5312917", "0.5309869", "0.52945757", "0.52945757", "0.5291579", "0.5289861", "0.5286131", "0.5281581", "0.5281215", "0.5276495", "0.5271525", "0.5264841", "0.5254438", "0.52524424", "0.5251982", "0.52413106", "0.52389675", "0.52372235", "0.5234679", "0.5227753", "0.5221885", "0.52196485", "0.52196485", "0.5210661", "0.5204025", "0.51971346", "0.51754", "0.5164566", "0.51581216", "0.5150057", "0.5141578", "0.51306665", "0.5123209", "0.512136", "0.51118773", "0.51091367", "0.5106991", "0.51046294", "0.5102595", "0.510157", "0.50965357", "0.50965357", "0.50913924", "0.5087989", "0.50878036", "0.5076168", "0.5074517", "0.5071566", "0.50632167", "0.5045158", "0.50433046", "0.5042494", "0.5040392", "0.5039998", "0.5034443", "0.503312", "0.50318086" ]
0.5670076
14
Sanitizes user input to prevent bad queries to the database.
public static String sanitizeInput(String input) { StringBuffer sb = new StringBuffer(); for (int i = 0 ; i < input.length(); i++) { char c = input.charAt(i); if (c >= 48 && c <= 57) { sb.append(c); } else if (c >= 65 && c <= 90) { sb.append(c); } else if (c >= 97 && c <= 122) { sb.append(c); } } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String sanitizeQuery(String query) {\n if (query.length() >= MAX_ALLOWED_SQL_CHARACTERS) {\n throw new TooLongQueryError(query.length());\n }\n return query;\n }", "public interface Sanitizer {\n String sanitize(String input);\n }", "public static String sanitize(String input){\n\t\tinput.replaceAll(\"&\", \"&amp;\");\n\t\tinput.replaceAll(\"<\", \"&lt;\");\n\t\tinput.replaceAll(\">\", \"&gt;\");\n\t\tinput.replaceAll(\"/\", \"&frasl;\");\n\t\treturn input;\n\t}", "private static String sanitize(String input) {\n input = input.replaceAll(\"[^A-Za-z0-9_]\", \"\").toLowerCase();\n if (input.matches(\"[0-9]+\") || input.startsWith(\"href\")) {\n return \"\";\n }\n return input;\n }", "public static String sanitize(String inputString) {\n\t\tif(inputString == null) {\n\t\t\treturn new String();\n\t\t}\n\t\treturn inputString.toLowerCase()\n\t\t\t\t.replaceAll(\"[#%&*'\\\"/\\\\+\\\\-\\\\.]\",\" \")\n\t\t\t\t.replaceAll(\"[^a-z0-9 ]\", \"\")\n\t\t\t\t.replaceAll(\"\\\\s+\",\" \").trim();\n\t}", "private String sanitizeString(String string) {\n if (string == null) {\n return \"\";\n }\n return string.toLowerCase().trim();\n }", "protected static String sanitise(final String name) {\n // Replace illegal chars with\n return name.replaceAll(\"[^\\\\w\\\\.\\\\s\\\\-#&_]\", \"_\");\n }", "private String clean(String in) {\n return (in == null ? \"\" : in.replaceAll(\"'\", \"\\\\'\"));\n }", "private String cleanXSS(String unsafe) {\n String safe = Jsoup.clean(unsafe, Whitelist.basic());\n return safe;\n }", "private void prepareUserFields(String fieldInput) throws AutomicException {\n String[] fields = fieldInput.split(\",\");\n userInputFields = new ArrayList<String>(fields.length);\n uniqueFields = new HashSet<String>(fields.length);\n for (String field : fields) {\n String temp = field.trim();\n if (CommonUtil.checkNotEmpty(temp)) {\n userInputFields.add(temp);\n uniqueFields.add(temp.toLowerCase());\n }\n }\n if (uniqueFields.isEmpty()) {\n throw new AutomicException(String.format(\"Invalid Fields have been provided [%s] \", fieldInput));\n }\n }", "public static String sanitizeSafely(String filename) {\r\n return sanitization(filename,true,false);\r\n }", "public static void editSanitationRequest(SanitationRequest request) {\n\n // Get updated data from request\n int requestID = request.getRequestID();\n String status = request.getStatus().name();\n User servicer = request.getServicer();\n Timestamp claimedTime = request.getClaimedTime();\n Timestamp completedTime = request.getCompletedTime();\n\n try {\n\n // Attempt to remove request from database\n PreparedStatement statement = Database.getDatabase().getConnection().prepareStatement(\n \"UPDATE \" + Constants.SANITATION_TABLE +\n \" SET status=?, servicerID=?, claimedTime=?, completedTime=? WHERE requestID=?\"\n );\n statement.setString(1, status);\n if (servicer == null) statement.setNull(2, Types.INTEGER);\n else statement.setInt(2, servicer.getUserID());\n statement.setTimestamp(3, claimedTime);\n statement.setTimestamp(4, completedTime);\n statement.setInt(5, requestID);\n statement.execute();\n\n } catch (SQLException exception) {\n\n // Print an exception message\n System.out.println(\"Sanitation Request Removal Exception:\");\n exception.printStackTrace();\n System.out.println();\n\n }\n }", "private String sanitizeSpecialChars(String value) {\n return value.replaceAll(\"[^a-zA-Z0-9_]\", \"_\");\n }", "static public boolean isSanitaryName(String name) {\n return sanitizeName(name).equals(name);\n }", "@Override\n\tpublic String clean(String input) {\n\t\tinput = input.replaceAll(removeCommonWords.toString(), \" \");\n\t\t//input = input.replaceAll(removeSingleCharacterOrOnlyDigits.toString(), \" \");\n\t\t//input = input.replaceAll(removeTime.toString(), \" \");\n\t\t//input = input.replaceAll(\"(\\\\s+>+\\\\s+)+\", \" \");\n\t\treturn input;\n\t}", "public static String sanitizeForMRS(String in) {\r\n\t\treturn in.replaceAll(\"[\\\"\\u2018\\u2019\\u201c\\u201d]\", \"'\").replaceAll(\"[\\u2026\\u22ef]\", \"...\").replaceAll(\"[\\u2010\\u2011\\u2012\\u2013\\u2014\\u2015]\", \"-\").replaceAll(\"[&+]\", \"and\");\r\n\t}", "public String cleanupUserStrings(String userSubmittedString, boolean cleanupHtml) {\n // this just returns it back, so tests for malicious strings won't be caught\n return userSubmittedString;\n }", "public void validate() {\n DBQueryHandler handler = new DBQueryHandler();\n ActionHelper helper = new ActionHelper();\n \n if( ratingValue.equals(\"0\") )\n {\n rating = 0;\n }\n else if( ratingValue.equals(\"1\") )\n {\n rating = 1;\n }\n else if( ratingValue.equals(\"2\") )\n {\n rating = 2;\n }\n else if( ratingValue.equals(\"3\") )\n {\n rating = 3;\n }\n else if( ratingValue.equals(\"4\") )\n {\n rating = 4;\n }\n else if( ratingValue.equals(\"5\") )\n {\n rating = 5;\n }\n else if( ratingText.length() != 0 || ratingText != null )\n {\n ratingText = helper.injectionReplace(ratingText);\n }\n else\n {\n ratingDate = new Date();\n }\n\n }", "public String prepareStringToSQL(String input_string) {\n\t\tif (isEmpty(input_string) || \"null\".equalsIgnoreCase(input_string)) {\r\n\t\t\treturn \"\";\r\n\t\t} else {\r\n\t\t\tinput_string = input_string.replaceAll(\"_NR_\", \"\\\\\\n\");\r\n\t\t\tinput_string = input_string.replaceAll(\"'\", \"''\");\r\n\t\t\treturn input_string;\r\n\t\t}\r\n\t}", "public String sanitize(String amount) {\n return amount.replaceAll(\"[^\\\\d.,]\", \"\");\n }", "protected String cleanQuery(String query,ArrayList<String> specialCharacters){ \r\n //convert qiery to a bag of keywords\r\n for(int i = 0 ; i < specialCharacters.size() ; i++){\r\n query = query.replace(specialCharacters.get(i), \" \");\r\n }\r\n //replace all sequences os spaces tabs etc with just one space\r\n query = query.replaceAll(\"\\\\s+\", \" \");\r\n \r\n return query; \r\n }", "protected void handleInput(String input) {}", "public void cleanSalts() {\n this.id = this.id.replaceAll(\"\\n\",\"\");\n this.nick = this.nick.replaceAll(\"\\n\",\"\");\n this.role = this.role.replaceAll(\"\\n\",\"\");\n this.teamId = this.teamId.replaceAll(\"\\n\",\"\");\n }", "public void cleanSalts() {\n this.id = this.id.replaceAll(\"\\n\",\"\");\n this.local = this.local.replaceAll(\"\\n\",\"\");\n this.visitor = this.visitor.replaceAll(\"\\n\",\"\");\n this.team1Id = this.team1Id.replaceAll(\"\\n\",\"\");\n this.team2Id = this.team2Id.replaceAll(\"\\n\",\"\");\n this.local_goals = this.local_goals.replaceAll(\"\\n\",\"\");\n this.visitor_goals = this.visitor_goals.replaceAll(\"\\n\", \"\");\n this.winner = this.winner.replaceAll(\"\\n\",\"\");\n }", "public static String preprocessForFormating(String inputText){\n\t\tif (inputText != null) {\n\t\t\treturn inputText.replace(\"''\", \"'\").replace(\"'\", \"''\");\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "public static String sanitize(String filename) {\r\n return sanitization(filename,false,false);\r\n }", "public void setInputUser(String inputUser) {\n this.inputUser = inputUser == null ? null : inputUser.trim();\n }", "private void validation() {\n Pattern pattern = validationfilterStringData();\n if (pattern.matcher(txtDrug.getText().trim()).matches() && pattern.matcher(txtGenericName.getText().trim()).matches()) {\n try {\n TblTreatmentadvise treatmentadvise = new TblTreatmentadvise();\n treatmentadvise.setDrugname(txtDrug.getText());\n treatmentadvise.setGenericname(txtGenericName.getText());\n treatmentadvise.setTiming(cmbDosestiming.getSelectedItem().toString());\n cmbtiming.setSelectedItem(cmbDosestiming);\n treatmentadvise.setDoses(loadcomboDoses());\n treatmentadvise.setDuration(loadcomboDuration());\n PatientService.saveEntity(treatmentadvise);\n JOptionPane.showMessageDialog(this, \"SAVE SUCCESSFULLY\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, \"STARTUP THE DATABASE CONNECTION\");\n }\n } else {\n JOptionPane.showMessageDialog(this, \"WRONG DATA ENTERED.\");\n }\n }", "private void checkUserInput() {\n }", "public String getInputBoundsQuery(String splitByCol, String sanitizedQuery) {\n return null;\n }", "public void rejects(String input) {\n\t\trejects(input, false);\n\t}", "@Override\n\tpublic void setSanitizeKeys(boolean arg0) {\n\n\t}", "@Override\n\tpublic boolean isSanitizeKeys() {\n\t\treturn false;\n\t}", "private void prepareInput() {\n\t\tif(input.charAt(0) == '-') input = \"0\" + input;\n\t\tfor(int i = 0; i < input.length() - 1; i++) {\n\t\t\tif(input.charAt(i) == '(' && input.charAt(i+1) == '-') input = input.substring(0, i+1) + \"0\" + input.substring(i+1); \n\t\t}\n\t}", "private String sanitizePath(String path)\r\n\t{\r\n\t\tif (path == null)\r\n\t\t\treturn \"\";\r\n\t\telse if (path.startsWith(\"/\"))\r\n\t\t\tpath = path.substring(1);\r\n\r\n\t\treturn path.endsWith(\"/\") ? path : path + \"/\";\r\n\t}", "public User sanitizeUser(User u) {\n\t\t\n\t\tu.setU_pass(null);\n\t\tif(u.u_id != null) {\n\t\t\tu.u_id = null;\n\t\t}\n\t\tu.setU_curToken(null);\n\t\t\n\t\treturn u;\n\t}", "String cleanStandardInput( String reference ) {\n return new String( reference.replace(\"$\", \"\").replace(\"(\", \"\").replace(\")\", \"\").trim() );\n }", "public static String cleanRequest(String city){\n if(hasSpecialCharacters(city)){\n //if it has special characters return invalid\n return \"invalid\";\n }\n //return the un-altered version if no special characters\n return city;\n }", "String escapeReservedWords(String query);", "private void validateInputParameters(){\n\n }", "public static String sanitizePrettily(String filename) {\r\n return sanitization(filename,true,true);\r\n }", "String normalizeString(String s) {\n if (s == null) {\n return null;\n } else if (caseInsensitive) {\n return s.toLowerCase(Locale.getDefault());\n } else {\n return s;\n }\n }", "public static String makeSafe(String s) {\n return (s == null) ? \"\" : s;\n }", "static String validate(String username_or_password) {\r\n if (username_or_password.indexOf('\\'') != -1) {\r\n throw new IllegalArgumentException(\"invalid input: \" + username_or_password);\r\n }\r\n return username_or_password;\r\n }", "public void correctStrings() {\n this.content = StringUtils.correctWhiteSpaces(content);\n }", "private boolean isValidContextValue(String value) {\n\t\t// At the moment accept context values just composed by letters, numbers, space and dash (for UUID)\n\t\t// this is mainly to avoid the usage of strange characters (like semicolon or quotes) opening the door for SQL injection\n\t\tfinal String sanitize = \"^[A-Za-z0-9\\\\s\\\\-]+$\";\n\t\treturn Pattern.matches(sanitize, value);\n\t}", "@Test\n\tpublic void badQueryTest() {\n\t\texception.expect(IllegalArgumentException.class);\n\t\t\n\t\t// numbers not allowed\n\t\tqueryTest.query(\"lfhgkljaflkgjlkjlkj9f8difj3j98ouijsflkedfj90\");\n\t\t// unbalanced brackets\n\t\tqueryTest.query(\"( hello & goodbye | goodbye ( or hello )\");\n\t\t// & ) not legal\n\t\tqueryTest.query(\"A hello & goodbye | goodbye ( or hello &)\");\n\t\t// unbalanced quote\n\t\tqueryTest.query(\"kdf ksdfj (\\\") kjdf\");\n\t\t// empty quotes\n\t\tqueryTest.query(\"kdf ksdfj (\\\"\\\") kjdf\");\n\t\t// invalid text in quotes\n\t\tqueryTest.query(\"kdf ksdfj \\\"()\\\" kjdf\");\n\t\t// double negation invalid (decision)\n\t\tqueryTest.query(\"!!and\");\n\t\t\n\t\t// gibberish\n\t\tqueryTest.query(\"kjlkfgj! ! ! !!! ! !\");\n\t\tqueryTest.query(\"klkjgi & df & | herllo\");\n\t\tqueryTest.query(\"kjdfkj &\");\n\t\t\n\t\t// single negation\n\t\tqueryTest.query(\"( ! )\");\n\t\tqueryTest.query(\"!\");\n\t\t\n\t\t// quotes and parenthesis interspersed\n\t\tqueryTest.query(\"our lives | coulda ( \\\" been so ) \\\" but momma had to \\\" it all up wow\\\"\");\n\t}", "public String sanitizeChars(String chars) {\n String cleanchars = chars.replaceAll(\"\\\\s+\", \"\");\n if (checkDuplicates(chars)) {\n throw new EnigmaException(\"Alpha.sanitizeChars: Duplicate chars.\");\n }\n return cleanchars;\n }", "private static char normalize(char input) {\n if (input == ' ') {\n return input;\n }\n\n if (input < 'a') {\n return 'a';\n }\n if (input > 'z') {\n return 'z';\n }\n\n return input;\n }", "public static boolean deleteSanitationRequest(SanitationRequest request) {\n int requestID = request.getRequestID();\n try {\n PreparedStatement statement = Database.getDatabase().getConnection().prepareStatement(\n \"DELETE FROM \" + Constants.SANITATION_TABLE + \" WHERE requestID=?\");\n statement.setInt(1, requestID);\n return statement.execute();\n } catch (SQLException exception) {\n System.out.println(\"Failed to delete sanitation request with ID: \" + requestID);\n exception.printStackTrace();\n return false;\n }\n }", "private int sanitizeCharacter(char value)\n\t{\n\t\tint returnValue = -1;\n\n\t\t// make sure only 'A' through 'Z' are acceptable.\n\t\tif (((value >= 'A') && (value <= 'Z')) || ((value >= 'a') && (value <= 'z')))\n\t\t{\n\t\t\treturnValue = Character.toUpperCase(value);\n\t\t}\n\n\t\treturn returnValue;\n\t}", "@Nullable\r\n protected abstract Prompt acceptValidatedInput(@NotNull ConversationContext context, @NotNull String input);", "public String cleanTheString(String input) {\n String result = \"\";\n if (input != null && !input.isEmpty()) {\n\n for (int k = 0; k < input.length(); k++) {\n if (!(input.charAt(k) == '0'\n || // unallowed characters\n input.charAt(k) == '1' || input.charAt(k) == '2' || input.charAt(k) == '3'\n || input.charAt(k) == '4' || input.charAt(k) == '5' || input.charAt(k) == '6'\n || input.charAt(k) == '7' || input.charAt(k) == '8' || input.charAt(k) == '9'\n || input.charAt(k) == 'A' || input.charAt(k) == 'B' || input.charAt(k) == 'C'\n || input.charAt(k) == 'D' || input.charAt(k) == 'E' || input.charAt(k) == 'F')) {\n } else\n result = result + Character.toString(input.charAt(k));\n\n }\n\n }\n\n return result;\n }", "String getSafeSql(String name);", "private String clean_fields(String data) {\n\t\treturn data.replace(\"<\", \"\").replace(\">\", \"\");\n\t}", "public static String normalizeQuery(String txt) {\n if (txt == null) {\n return null;\n }\n\n return normalize(txt)\n .replaceAll(\" or \", \" OR \")\n .replaceAll(\" and \", \" AND \");\n }", "public static boolean isValidinput(String query){\r\n\t\tPattern regex = Pattern.compile(\"[$&+,:;=@#|]\");\r\n\t\tMatcher matcher = regex.matcher(query);\r\n\t\tif (matcher.find()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t}", "private boolean isValidInput() {\n\t\treturn true;\n\t}", "public static List<String> check(String input){\n\t\treturn SQLInputValidation.traps.stream()\n\t\t\t\t\t\t.filter(input::contains)\n\t\t\t\t\t\t.collect(toList());\n\t}", "default String escapeString(final String input) {\n return noQuestion(GedRenderer.escapeString(input)).trim();\n }", "static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }", "static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }", "static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }", "private static String[] checkInput(String input) throws Exception{\n String[] in = input.trim().split(\" \");\n\n if(in.length == 0){\n throw new CommandException(ExceptionEnum.INCORRECT_COMMAND_EXCEPTION);\n }\n\n if(CommandEnum.getCommandEnumFrom(in[0]) == null){\n throw new CommandException(ExceptionEnum.INCORRECT_COMMAND_EXCEPTION);\n }\n\n if(isSpecificCommandENum(in[0],BYE)){\n return in;\n }\n if(isSpecificCommandENum(in[0],TERMINATE)){\n return in;\n }\n\n if(in.length < MIN_PARAM){\n throw new CommandException(ExceptionEnum.LESS_INPUT_EXCEPTION);\n }\n\n if(in.length > MAX_PARAM){\n throw new CommandException(ExceptionEnum.EXTRA_INPUT_EXCEPTION);\n }\n\n //check input value\n for(int i = 1; i < in.length; i++){\n try{\n Integer.parseInt(in[i]);\n }catch(NumberFormatException e){\n throw new CommandException(ExceptionEnum.INVALID_INPUT_EXCEPTION);\n }\n }\n\n return in;\n }", "private void validateData(String input) {\n String[] inputStringArray = input.split(\" \");\n\n for (String s : inputStringArray) {\n try {\n Integer.parseInt(s);\n } catch (NumberFormatException e) {\n throw new NumberFormatException(\n \"Looks like your input - \" + s + \", is not a number. Try again\");\n }\n }\n }", "public static boolean addSanitationRequest(SanitationRequest request) {\n\n // Get data from request\n String nodeID = request.getLocation().getNodeID();\n String priority = request.getPriority().name();\n String status = request.getStatus().name();\n String description = request.getDescription();\n Integer requesterID = request.getRequesterID();\n Timestamp requestTime = request.getRequestTime();\n Integer servicerID = request.getServicerID();\n Timestamp claimedTime = request.getClaimedTime();\n Timestamp completedTime = request.getCompletedTime();\n \n try {\n // Attempt to add request to database\n PreparedStatement statement = Database.getDatabase().getConnection().prepareStatement(\n \"INSERT INTO \" + Constants.SANITATION_TABLE +\n \" (nodeID, priority, status, description, requesterID, requestTime, servicerID, claimedTime, completedTime)\" +\n \" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\"\n );\n statement.setString(1, nodeID);\n statement.setString(2, priority);\n statement.setString(3, status);\n statement.setString(4, description);\n statement.setInt(5, requesterID);\n statement.setTimestamp(6, requestTime);\n if (servicerID == null) statement.setNull(7, Types.INTEGER);\n else statement.setInt(7, servicerID);\n if (claimedTime == null) statement.setNull(8, Types.TIMESTAMP);\n else statement.setTimestamp(8, claimedTime);\n if (completedTime == null) statement.setNull(9, Types.TIMESTAMP);\n else statement.setTimestamp(9, completedTime);\n return statement.execute();\n\n } catch (SQLException exception) {\n\n // Print an exception message\n System.out.println(\"Sanitation Request (\" + description + \") could not be added.\");\n exception.printStackTrace();\n System.out.println();\n return false;\n }\n }", "static public String normalize(String s){\n\t\treturn s;\n\t}", "@Override\n protected void evaluateSingleValue(Object value)\n {\n String checkValue = null;\n try\n {\n checkValue = DefaultTypeConverter.INSTANCE.convert(String.class, value);\n }\n catch (TypeConversionException e)\n {\n throw new ConstraintException(ERR_NON_STRING, value);\n }\n \n AuthorityType type = AuthorityType.getAuthorityType(checkValue);\n if((type != AuthorityType.USER) && (type != AuthorityType.GUEST))\n {\n throw new ConstraintException(ERR_INVALID_USERNAME, value, type);\n }\n }", "private static String validateInputStr() {\n String str = \"\";\n Scanner genericString = new Scanner(System.in);\n if (!genericString.hasNextInt()) {\n str = genericString.nextLine();\n return str;\n }\n else {\n validateInputStr();\n }\n return str;\n }", "private static String checkAddress(String raw) \n\t{\n\t\t// Check to see if the length is greater than the maxLength of user input.\n\t\tif(raw.length() > maxLength) \n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\treturn raw;\n\t}", "protected void validateInput()\r\n\t{\r\n\t\tString errorMessage = null;\r\n\t\tif ( validator != null ) {\r\n\t\t\terrorMessage = validator.isValid(text.getText());\r\n\t\t}\r\n\t\t// Bug 16256: important not to treat \"\" (blank error) the same as null\r\n\t\t// (no error)\r\n\t\tsetErrorMessage(errorMessage);\r\n\t}", "public final void validateRetrieveInputs() throws Exception {\n if (getDBTable() == null) throw new Exception(\"getDBTable missing\");\n if (getColumnForPrimaryKey() == null) throw new Exception(\"WHERE ID missing\");\n }", "private static String repairString(String s) {\n return s != null ? s.replaceAll(\"\\'\", \"\\'\\'\") : null;\n }", "public void stinException(String nameField, Editable stringAnalize, int max) throws Exceptions {\n if(stringAnalize.toString().isEmpty()){\n throw new Exceptions(\"You need to insert the \"+nameField);\n }\n if(stringAnalize.length()>max){\n throw new Exceptions(\"You need to insert less than \"+max+\" characters\");\n }\n try{\n if(Double.parseDouble(stringAnalize.toString())!=321312.123) {\n throw new Exceptions(\"The \" + nameField + \" could not be a number\");\n }\n }catch(Exceptions fs){\n throw new Exceptions(\"The \" + nameField + \" could not be a number\");\n }catch(Exception e){\n }\n }", "@Test\r\n public final void rawInputNamesShouldNotHaveSpaces() {\r\n \tString actual = proc.preprocessRawInputName(\" AndThis String\");\r\n \tassertEquals(\"AndThisString\", actual);\r\n }", "@Override\n\t\tprotected String[] handleIrregulars(String s) {\n\t\t\treturn null;\n\t\t}", "public static String stringValidation() {\n\t\tString input = \"\";\n\t\tinput = in.nextLine().trim();\n\t\treturn input;\n\t}", "@Override\n\tprotected void isValid(String input) throws DataInputException\n\t{\n\t}", "public void validateInput(Information information) {\n information.validateFirstName();\n information.validateLastName();\n information.validateZipcode();\n information.validateEmployeeID();\n }", "protected abstract String getValidationQuery();", "@Override\n\t\tprotected boolean handleIrregulars(String s) {\n\t\t\treturn false;\n\t\t}", "protected abstract boolean isInputValid(@NotNull ConversationContext context, @NotNull String input);", "protected void validateParams(String nxql, Collection<String> inputProperties,\n Collection<String> outputProperties) {\n if (StringUtils.isBlank(nxql) || inputProperties == null || inputProperties.isEmpty()\n || outputProperties == null || outputProperties.isEmpty()) {\n throw new IllegalArgumentException(\"nxql and properties are required parameters\");\n }\n if (!nxql.toUpperCase().contains(\"WHERE\")) {\n throw new IllegalArgumentException(\"You cannot use an unbounded nxql query, please add a WHERE clause.\");\n }\n }", "@Override\n\tpublic boolean checkInput() {\n\t\treturn true;\n\t}", "public static String normalizeText(String text) {\r\n if (text.equals(\"\")) {\r\n throw new IllegalArgumentException(\"Please enter some text\");\r\n } else {\r\n return text.replaceAll(\"[?.\\\\s\\\"()!]\", \"\").toUpperCase();\r\n }\r\n }", "@When(\"^user enters an invalid \\\"([^\\\"]*)\\\"$\")\n public void userEntersAnInvalid(String arg0, DataTable args) throws Throwable {\n }", "public String stripInput(String input) {\n return input.replaceAll(\"[.#$\\\\[\\\\]]\", \"\").replaceAll(\"/\", \" \");\n }", "private String sanitize(String str) {\n\t\tstr = str.replace(COMPLETION_LEFT_SEP, \n\t\t\t\tCOMPLETION_LEFT_SEP + COMPLETION_LEFT_SEP);\n\t\tstr = str.replace(COMPLETION_RIGHT_SEP, \n\t\t\t\tCOMPLETION_RIGHT_SEP + COMPLETION_RIGHT_SEP);\n\t\treturn str;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tStringUtils.removeInvalidCharacteres(\"alzheimer\\\\\");\n\t}", "private String prepare(String originStr)\r\n {\r\n String result=originStr.toLowerCase();\r\n result = result.replace('ä','a');\r\n result = result.replace('ö','o');\r\n result = result.replace('ü','u');\r\n// result = result.replace(':',' ');\r\n// result = result.replace(';',' ');\r\n// result = result.replace('<',' ');\r\n// result = result.replace('>',' ');\r\n// result = result.replace('=',' ');\r\n// result = result.replace('?',' ');\r\n// result = result.replace('[',' ');\r\n// result = result.replace(']',' ');\r\n// result = result.replace('/',' ');\r\n return result;\r\n }", "private void takeInUserInput(){\n\t\t// only take in input when it is in the ANSWERING phase\n\t\tif(spellList.status == QuizState.Answering){\n\t\t\tspellList.setAnswer(getAndClrInput());\n\t\t\tspellList.status = QuizState.Answered;\n\t\t\tansChecker=spellList.getAnswerChecker();\n\t\t\tansChecker.execute();\n\t\t}\t\n\n\t}", "private boolean isInputValid() {\n return true;\n }", "public String getData() {\r\n Scanner sc = new Scanner(System.in);\r\n String s = sc.nextLine();\r\n while ((s.startsWith(\"\") && s.endsWith(\" \")) || (s.length() == 0) || (s.startsWith(\" \"))) {\r\n System.out.print(\"A space record, or a space at the beginning is not acceptable. \\n\"\r\n + \"Please try again: \");\r\n s = sc.nextLine();\r\n }\r\n return s;\r\n }", "private static boolean isBadInput(String s) {\n\t\tString[] split = s.split(\"\\\\s+\");\n\t\tif (split.length != 3) {\n\t\t\tSystem.err.printf(\"Unknow length: %d\\n\", split.length);\n\t\t\treturn true;\n\t\t}\n\t\ttry {\n\t\t\tInteger.parseInt(split[0]);\n\t\t\tInteger.parseInt(split[2]);\n\t\t} catch (NumberFormatException e) {\n\t\t\tSystem.err.printf(\"Input numbers only.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (split[1].length() != 1) {\n\t\t\tSystem.err.printf(\"Operator should be one character.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic String process(String input) {\n\t\treturn filter.process((String)input);\n\t}", "@Override\n public void unSafeQueryInterceptors() throws SQLException {\n }", "@Override\n public void afterTextChanged(Editable s)\n {\n String userInput = filter(s.toString());\n\n // Then searches database and return result\n searchDatabase(userInput);\n }", "private boolean validateInput(EditText titleInput, EditText descriptionInput, EditText priceInput) {\n String title = titleInput.getText().toString();\n String description = descriptionInput.getText().toString();\n int price = (TextUtils.isEmpty(priceInput.getText().toString()))? -1 : Integer.parseInt(priceInput.getText().toString());\n if (TextUtils.isEmpty(title) || TextUtils.isEmpty(description) || price < 0) {\n Toast.makeText(this.getActivity(),\n \"Please, fill in all fields.\",\n Toast.LENGTH_LONG).show();\n return false;\n }\n if (photoURI == null) {\n Toast.makeText(this.getActivity(),\n \"Please, add a picture to this item before submitting it.\",\n Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\n }", "public static String prepareTextMinimum(String s)\n {\n /*\n * We would like to filter user entered text that might be\n * dynamically added, using javascript for example. But we do not\n * want to filter all the above chars, so we will just disallow\n * <.\n */\n return StringUtils.replace(s, \"<\", \"&lt;\");\n }", "private void checkSafety() {\n\t\tSet<VariableTerm> bindingVariables = new HashSet<>();\n\t\tSet<VariableTerm> nonbindingVariables = new HashSet<>();\n\n\t\t// Check that all negative variables occur in the positive body.\n\t\tfor (Atom posAtom : bodyAtomsPositive) {\n\t\t\tbindingVariables.addAll(posAtom.getBindingVariables());\n\t\t\tnonbindingVariables.addAll(posAtom.getNonBindingVariables());\n\t\t}\n\n\t\tfor (Atom negAtom : bodyAtomsNegative) {\n\t\t\t// No variables in a negated atom are binding.\n\t\t\tnonbindingVariables.addAll(negAtom.getBindingVariables());\n\t\t\tnonbindingVariables.addAll(negAtom.getNonBindingVariables());\n\t\t}\n\n\t\t// Rule heads must be safe, i.e., all their variables must be bound by the body.\n\t\tif (!isConstraint()) {\n\t\t\tnonbindingVariables.addAll(headAtom.getBindingVariables());\n\t\t\tnonbindingVariables.addAll(headAtom.getNonBindingVariables());\n\t\t}\n\n\t\t// Check that all non-binding variables are bound in this rule.\n\t\tnonbindingVariables.removeAll(bindingVariables);\n\n\t\tif (nonbindingVariables.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new RuntimeException(\"Encountered unsafe variable \" + nonbindingVariables.iterator().next().toString() + \" in rule: \" + toString()\n\t\t\t\t+ System.lineSeparator() + \"Notice: A rule is considered safe if all variables occurring in negative literals, builtin atoms, and the head of the rule also occur in some positive literal.\");\n\t}" ]
[ "0.6666882", "0.6464073", "0.63747656", "0.6293119", "0.62021303", "0.61673903", "0.59742576", "0.59587723", "0.5848652", "0.54928154", "0.54821736", "0.54064333", "0.5394157", "0.5348553", "0.53365177", "0.5284555", "0.5276467", "0.52700716", "0.52692264", "0.52553904", "0.52393466", "0.523214", "0.520938", "0.5154673", "0.5137941", "0.5112967", "0.51129425", "0.510784", "0.5104744", "0.50961614", "0.5045476", "0.5032229", "0.5020561", "0.50059813", "0.49950364", "0.4971236", "0.4970808", "0.49681944", "0.49435732", "0.49281496", "0.49104303", "0.49025717", "0.48977286", "0.48847288", "0.48801094", "0.48760206", "0.4848028", "0.484703", "0.48433286", "0.48254392", "0.48204115", "0.4815349", "0.48093018", "0.4801228", "0.4791143", "0.47656295", "0.4756793", "0.47566742", "0.4745202", "0.47345826", "0.47135687", "0.47135687", "0.47135687", "0.47091365", "0.470475", "0.46863744", "0.4672656", "0.4670422", "0.46686193", "0.4662047", "0.46536723", "0.46478754", "0.46391538", "0.46338353", "0.46226424", "0.46209735", "0.46026683", "0.4600944", "0.45748365", "0.45660612", "0.4564806", "0.45617238", "0.4559862", "0.45560354", "0.4551686", "0.45469153", "0.45459944", "0.4543464", "0.4530744", "0.4521839", "0.45199797", "0.45153993", "0.45112145", "0.4509974", "0.45092028", "0.4508597", "0.45014393", "0.44995198", "0.44983315", "0.4491916" ]
0.61118025
6
This interface provides all the methods needed to create,delete, retrieve, modify code level constructs (CodeUnits, Macros, Fragments, and Modules).
public interface Listing { /** * The name of the default tree in the display. * * @see #removeTree(String) */ public static final String DEFAULT_TREE_NAME = "Program Tree"; /** * get the code unit that starts at the given address. * * @param addr the address to look for a codeUnit. * @return the codeUnit that begins at the given address */ public CodeUnit getCodeUnitAt(Address addr); /** * get the code unit that contains the given address. * * @param addr the address to look for a codeUnit. * @return the codeUnit that contains the given address */ public CodeUnit getCodeUnitContaining(Address addr); /** * get the next code unit that starts an an address that is greater than the * given address. The search will include instructions, defined data, and * undefined data. * * @param addr the address from which to search forward. * @return the next CodeUnit found while searching forward from addr or null * if none found. */ public CodeUnit getCodeUnitAfter(Address addr); /** * get the next code unit that starts at an address that is less than the * given address. The search will include instructions, defined data, and * undefined data. * * @param addr the address from which to search backwards. * @return The first codeUnit found while searching backwards from addr or * null if none found. */ public CodeUnit getCodeUnitBefore(Address addr); /** * Get an iterator that contains all code units in the program which have * the specified property type defined. Standard property types are defined * in the CodeUnit class. The property types are: EOL_COMMENT, PRE_COMMENT, * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE, VALUE_REFERENCE. * Property types can also be user defined. * * @param property the name of the property type. * @param forward true means get iterator in forward direction * @return a CodeUnitIterator that returns all code units from the indicated * start address that have the specified property type defined. */ public CodeUnitIterator getCodeUnitIterator(String property, boolean forward); /** * Get an iterator that contains the code units which have the specified * property type defined. Only code units at an address greater than or * equal to the specified start address will be returned by the iterator. If * the start address is null then check the entire program. Standard * property types are defined in the CodeUnit class. The property types are: * EOL_COMMENT, PRE_COMMENT, POST_COMMENT, USER_REFERENCE, * MNEMONIC_REFERENCE, VALUE_REFERENCE. Property types can also be user * defined. * * @param property the name of the property type. (EOL_COMMENT, PRE_COMMENT, * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE, * VALUE_REFERENCE) * @param addr the start address * @param forward true means get iterator in forward direction * @return a CodeUnitIterator that returns all code units from the indicated * start address that have the specified property type defined. */ public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward); /** * Get an iterator that contains the code units which have the specified * property type defined. Only code units starting within the address set * will be returned by the iterator. If the address set is null then check * the entire program. Standard property types are defined in the CodeUnit * class. * * @param property the name of the property type. * @param addrSet the address set * @param forward true means get iterator in forward direction * @return a CodeUnitIterator that returns all code units from the indicated * address set that have the specified property type defined. */ public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet, boolean forward); /** * Get a forward code unit iterator over code units that have the specified * comment type. * * @param commentType type defined in CodeUnit * @param addrSet address set * @return a CodeUnitIterator that returns all code units from the indicated * address set that have the specified comment type defined */ public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet); /** * Get a forward iterator over addresses that have the specified comment * type. * * @param commentType type defined in CodeUnit * @param addrSet address set * @param forward true to iterator from lowest address to highest, false * highest to lowest * @return an AddressIterator that returns all addresses from the indicated * address set that have the specified comment type defined */ public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet, boolean forward); /** * Get a forward iterator over addresses that have any type of comment. * * @param addrSet address set * @param forward true to iterator from lowest address to highest, false * highest to lowest * @return an AddressIterator that returns all addresses from the indicated * address set that have any type of comment. */ public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward); /** * Get the comment for the given type at the specified address. * * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT, * PLATE_COMMENT, or REPEATABLE_COMMENT * @param address the address of the comment. * @return the comment string of the appropriate type or null if no comment * of that type exists for this code unit * @throws IllegalArgumentException if type is not one of the types of * comments supported */ public String getComment(int commentType, Address address); /** * Set the comment for the given comment type at the specified address. * * @param address the address of the comment. * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT, * PLATE_COMMENT, or REPEATABLE_COMMENT * @param comment comment to set at the address * @throws IllegalArgumentException if type is not one of the types of * comments supported */ public void setComment(Address address, int commentType, String comment); /** * get a CodeUnit iterator that will iterate over the entire address space. * * @param forward true means get iterator in forward direction * @return a CodeUnitIterator in forward direction */ public CodeUnitIterator getCodeUnits(boolean forward); /** * Returns an iterator of the code units in this listing (in proper * sequence), starting at the specified address. The specified address * indicates the first code unit that would be returned by an initial call * to the <code>next</code> method. An initial call to the <code>previous</code> * method would return the code unit with an address less than the specified * address. * <p> * * @param addr the start address of the iterator. * @param forward true means get iterator in forward direction * @return a CodeUnitIterator positioned just before addr. */ public CodeUnitIterator getCodeUnits(Address addr, boolean forward); /** * Get an iterator over the address range(s). Only code units whose start * addresses are contained in the given address set will be returned by the * iterator. * * @param addrSet the AddressRangeSet to iterate over (required). * @param forward true means get iterator in forward direction * @return a CodeUnitIterator that is restricted to the give * AddressRangeSet. */ public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward); /** * get the Instruction that starts at the given address. If no Instruction * has been defined to start at that address, return null. * * @param addr the address to check for the start of an instruction * @return the Instruction object that starts at addr; or null if no * Instructions starts at addr. */ public Instruction getInstructionAt(Address addr); /** * get the Instruction that contains the given address. If an Instruction is * defined that contains that address, it will be returned. Otherwise, null * will be returned. * * @param addr the address to check for containment in an Instruction. * @return the Instruction object that contains addr; or null if no * Instructions contain addr. */ public Instruction getInstructionContaining(Address addr); /** * get the closest Instruction that starts at an address that is greater * than the given address. * * @param addr The address at which to begin the forward search. * @return the next Instruction whose starting address is greater than addr. */ public Instruction getInstructionAfter(Address addr); /** * get the closest Instruction that starts at an address that is less than * the given address. * * @param addr The address at which to begin the backward search. * @return the closest Instruction whose starting address is less than addr. */ public Instruction getInstructionBefore(Address addr); /** * get an Instruction iterator that will iterate over the entire address * space. * * @param forward true means get iterator in forward direction * @return an InstructionIterator that iterates over all instructions in the * program. */ public InstructionIterator getInstructions(boolean forward); /** * Returns an iterator of the instructions in this listing (in proper * sequence), starting at the specified address. The specified address * indicates the first instruction that would be returned by an initial call * to the <code>next</code> method. An initial call to the <code>previous</code> * method would return the instruction with an address less than the * specified address. * <p> * * @param addr the initial position of the iterator * @param forward true means get iterator in forward direction * @return an InstructionIterator that iterates over all Instruction objects * in the given address range set. */ public InstructionIterator getInstructions(Address addr, boolean forward); /** * Get an Instruction iterator over the address range(s). Only instructions * whose start addresses are contained in the given address set will be * returned by the iterator. * * @param addrSet the address range set to iterate over. * @param forward true means get iterator in forward direction * @return a DataIterator that iterates over all defined and undefined Data * objects in the given address range set. */ public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward); /** * get the Data (Defined or Undefined) that starts at the given address. * * @param addr the address to check for a Data object. * @return the Data object that starts at addr; or null if no Data * objects(defined or undefined) start at addr. */ public Data getDataAt(Address addr); /** * Gets the data object that is at or contains the given address or null if * the address in not in memory or is in an instruction. * * @param addr the address for which to find its containing data element. * @return the Data object containing the given address or null if there is * no data that contains the address. */ public Data getDataContaining(Address addr); /** * get the closest Data object that starts at an address that is greater * than the given address. * * @param addr the address at which to begin the forward search. * @return the next Data object whose starting address is greater than addr. */ public Data getDataAfter(Address addr); /** * get the closest Data object that starts at an address that is less than * the given address. * * @param addr The address at which to begin the backward search. * @return the closest Data object whose starting address is less than addr. */ public Data getDataBefore(Address addr); /** * get a Data iterator that will iterate over the entire address space; * returning both defined and undefined Data objects. * * @param forward true means get iterator in forward direction * @return a DataIterator that iterates over all defined and undefined Data * object in the program. */ public DataIterator getData(boolean forward); /** * Returns an iterator of the data in this listing (in proper sequence), * starting at the specified address. The specified address indicates the * first Data that would be returned by an initial call to the <code>next</code> * method. An initial call to the <code>previous</code> method would return the * Data with an address less than the specified address. * <p> * * @param addr the initial position of the iterator * @param forward true means get iterator in forward direction * @return a DataIterator that iterates over all Data objects in the given * address range set. */ public DataIterator getData(Address addr, boolean forward); /** * Get an iterator over the address range(s). Only data whose start * addresses are contained in the given address set will be returned by the * iterator. * * @param addrSet the address range set to iterate over. * @param forward true means get iterator in forward direction * @return a DataIterator that iterates over all defined and undefined Data * objects in the given address range set. */ public DataIterator getData(AddressSetView addrSet, boolean forward); /** * get the Data (defined) object that starts at the given address. If no * Data object is defined at that address, then return null. * * @param addr The address to check for defined Data. * @return a Data object that starts at addr, or null if no Data object has * been defined to start at addr. */ public Data getDefinedDataAt(Address addr); /** * get the Data object that starts at the given address. If no Data objects * have been defined that contain that address, then return null. * * @param addr the address to check for containment in a defined Data * object. * @return the defined Data object containing addr. */ public Data getDefinedDataContaining(Address addr); /** * * get the defined Data object that starts at an address that is greater * than the given address. * * @param addr the address at which to begin the forward search. * @return the next defined Data object whose starting address is greater * than addr. */ public Data getDefinedDataAfter(Address addr); /** * get the closest defined Data object that starts at an address that is * less than the given address. * * @param addr The address at which to begin the backward search. * @return the closest defined Data object whose starting address is less * than addr. */ public Data getDefinedDataBefore(Address addr); /** * get a Data iterator that will iterate over the entire address space; * returning only defined Data objects. * * @param forward true means get iterator in forward direction * @return a DataIterator that iterates over all defined Data objects in the * program. */ public DataIterator getDefinedData(boolean forward); /** * Returns an iterator of the defined data in this listing (in proper * sequence), starting at the specified address. The specified address * indicates the first defined Data that would be returned by an initial * call to the <code>next</code> method. An initial call to the * <code>previous</code> method would return the defined Data with an address * less than the specified address. * <p> * * @param addr the initial position of the iterator * @param forward true means get iterator in forward direction * @return a DataIterator that iterates over all defined Data objects in the * given address range set. */ public DataIterator getDefinedData(Address addr, boolean forward); /** * Get an iterator over the address range(s). Only defined data whose start * addresses are contained in the given address set will be returned by the * iterator. * * @param addrSet the address range set to iterate over. * @param forward true means get iterator in forward direction * @return a DataIterator that iterates over all defined Data objects in the * given address range set. */ public DataIterator getDefinedData(AddressSetView addrSet, boolean forward); /** * get the Data (undefined) object that starts at the given address. * * @param addr The address to check for undefined data. * @return a default DataObject if bytes exist at addr and nothing has been * defined to exist there. Otherwise returns null. */ public Data getUndefinedDataAt(Address addr); /** * Get the undefined Data object that starts at an address that is greater * than the given address. This operation can be slow for large programs so * a TaskMonitor is required. * * @param addr the address at which to begin the forward search. * @param monitor a task monitor allowing this operation to be cancelled * @return the next undefined Data object whose starting address is greater * than addr. */ public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor); /** * Get the undefined Data object that falls within the set. This operation * can be slow for large programs so a TaskMonitor is required. * * @param set the addressSet at which to find the first undefined address. * @param monitor a task monitor allowing this operation to be cancelled * * @return the next undefined Data object whose starting address falls * within the addresSet. */ public Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor); /** * get the closest undefined Data object that starts at an address that is * less than the given address. This operation can be slow for large * programs so a TaskMonitor is required. * * @param addr The address at which to begin the backward search. * @param monitor a task monitor allowing this operation to be cancelled * @return the closest undefined Data object whose starting address is less * than addr. */ public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor); /** * Get the address set which corresponds to all undefined code units within * the specified set of address. * * @param set set of addresses to search * @param initializedMemoryOnly if true set will be constrained to * initialized memory areas, if false set will be constrained to * all defined memory blocks. * @param monitor task monitor * @return address set corresponding to undefined code units * @throws CancelledException if monitor cancelled */ public AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly, TaskMonitor monitor) throws CancelledException; /** * Returns the next instruction or defined data after the given address; * * @param addr the address at which to begin the search * @return the next instruction or defined data at an address higher than * the given address. */ public CodeUnit getDefinedCodeUnitAfter(Address addr); /** * Returns the closest instruction or defined data that starts before the * given address. * * @param addr the address at which to begin the search * @return the closest instruction or defined data at an address below the * given address. */ public CodeUnit getDefinedCodeUnitBefore(Address addr); /** * Get an iterator over all the composite data objects (Arrays, Structures, * and Union) in the program. * * @param forward true means get iterator that starts at the minimum address * and iterates forward. Otherwise it starts at the maximum * address and iterates backwards. * @return an iterator over all the composite data objects. */ public DataIterator getCompositeData(boolean forward); /** * Get an iterator over all the composite data objects (Arrays, Structures, * and Union) in the program at or after the given Address. * * @param start start of the iterator * @param forward true means get iterator in forward direction * @return an iterator over all the composite data objects starting with the * given address. */ public DataIterator getCompositeData(Address start, boolean forward); /** * Get an iterator over all the composite data objects (Arrays, Structures, * and Union) within the specified address set in the program. * * @param addrSet the address set * @param forward true means get iterator in forward direction * @return an iterator over all the composite data objects in the given * address set. */ public DataIterator getCompositeData(AddressSetView addrSet, boolean forward); /** * Returns an iterator over all user defined property names. * * @return an iterator over all user defined property names. */ public Iterator<String> getUserDefinedProperties(); /** * Removes the entire property from the program * * @param propertyName the name of the property to remove. */ public void removeUserDefinedProperty(String propertyName); /** * Returns the PropertyMap associated with the given name * * @param propertyName the property name * @return PropertyMap the propertyMap object. */ public PropertyMap getPropertyMap(String propertyName); /** * Creates a new Instruction object at the given address. The specified * context is only used to create the associated prototype. It is critical * that the context be written immediately after creation of the instruction * and must be done with a single set operation on the program context. Once * a set context is done on the instruction address, any subsequent context * changes will result in a <code>ContextChangeException</code> * * @param addr the address at which to create an instruction * @param prototype the InstructionPrototype that describes the type of instruction to create. * @param memBuf buffer that provides the bytes that make up the instruction. * @param context the processor context at this location. * @param length instruction byte-length (must be in the range 0..prototype.getLength()). * If smaller than the prototype length it must have a value no greater than 7, otherwise * an error will be thrown. A value of 0 or greater-than-or-equal the prototype length * will be ignored and not impose and override length. The length value must be a multiple * of the {@link Language#getInstructionAlignment() instruction alignment} . * @return the newly created instruction. * @throws CodeUnitInsertionException thrown if the new Instruction would overlap and * existing {@link CodeUnit} or the specified {@code length} is unsupported. * @throws IllegalArgumentException if a negative {@code length} is specified. */ public Instruction createInstruction(Address addr, InstructionPrototype prototype, MemBuffer memBuf, ProcessorContextView context, int length) throws CodeUnitInsertionException; /** * Creates a complete set of instructions. A preliminary pass will be made * checking for code unit conflicts which will be marked within the * instructionSet causing dependent blocks to get pruned. * * @param instructionSet the set of instructions to be added. All code unit * conflicts will be marked within the instructionSet and * associated blocks. * @param overwrite if true, overwrites existing code units. * @throws CodeUnitInsertionException if the instruction set is incompatible * with the program memory * @return the set of addresses over which instructions were actually added * to the program. This may differ from the InstructionSet address * set if conflict errors occurred. Such conflict errors will be * recorded within the InstructionSet and its InstructionBlocks. */ public AddressSetView addInstructions(InstructionSet instructionSet, boolean overwrite) throws CodeUnitInsertionException; /** * Creates a new defined Data object of a given length at the given address. * This ignores the bytes that are present * * @param addr the address at which to create a new Data object. * @param dataType the Data Type that describes the type of Data object to * create. * @param length the length of the datatype. * @return newly created data unit * @exception CodeUnitInsertionException thrown if the new Instruction would * overlap and existing Instruction or defined data. */ public Data createData(Address addr, DataType dataType, int length) throws CodeUnitInsertionException; /** * Creates a new defined Data object at the given address. This ignores the * bytes that are present * * @param addr the address at which to create a new Data object. * @param dataType the Data Type that describes the type of Data object to * create. * @return newly created data unit * @exception CodeUnitInsertionException thrown if the new Instruction would * overlap and existing Instruction or defined data. */ public Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException; /** * Clears any code units in the given range returning everything to "db"s, * and removing any references in the affected area. Note that the module * and fragment structure is unaffected. If part of a code unit is contained * in the given address range then the whole code unit will be cleared. * * @param startAddr the start address of the area to be cleared. * @param endAddr the end address of the area to be cleared. * @param clearContext clear context register values if true */ public void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext); /** * Clears any code units in the given range returning everything to "db"s, * and removing any references in the affected area. Note that the module * and fragment structure is unaffected. If part of a code unit is contained * in the given address range then the whole code unit will be cleared. * * @param startAddr the start address of the area to be cleared. * @param endAddr the end address of the area to be cleared. * @param clearContext clear context register values if true * @param monitor monitor that can be used to cancel the clear operation * @throws CancelledException if the operation was cancelled. */ public void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext, TaskMonitor monitor) throws CancelledException; /** * Checks if the given ranges consists entirely of undefined data. * * @param start The start address of the range to check. * @param end The end address of the range to check. * @return boolean true if the given range is in memory and has no * instructions or defined data. */ public boolean isUndefined(Address start, Address end); /** * Clears the comments in the given range. * * @param startAddr the start address of the range to be cleared * @param endAddr the end address of the range to be cleared */ public void clearComments(Address startAddr, Address endAddr); /** * Clears the properties in the given range. * * @param startAddr the start address of the range to be cleared * @param endAddr the end address of the range to be cleared * @param monitor task monitor for cancelling operation. * @throws CancelledException if the operation was cancelled. */ public void clearProperties(Address startAddr, Address endAddr, TaskMonitor monitor) throws CancelledException; /** * Removes all CodeUnits, comments, properties, and references from the * listing. * * @param clearContext if true, also clear any instruction context that has * been laid down from previous disassembly. * @param monitor used for tracking progress and cancelling the clear * operation. */ public void clearAll(boolean clearContext, TaskMonitor monitor); /** * Returns the fragment containing the given address. * <P> * * @param treeName name of the tree to search * @param addr the address that is contained within a fragment. * * @return will return null if the address is not in the program. */ public ProgramFragment getFragment(String treeName, Address addr); /** * Returns the module with the given name. * <P> * * @param treeName name of the tree to search * @param name the name of the module to find. * * @return will return null if there is no module with the given name. */ public ProgramModule getModule(String treeName, String name); /** * Returns the fragment with the given name. * <P> * * @param treeName name of the tree to search * @param name the name of the fragment to find. * * @return will return null if there is no fragment with the given name. */ public ProgramFragment getFragment(String treeName, String name); /** * Create a new tree that will be identified by the given name. By default, * the new root module is populated with fragments based on memory blocks. * Note that the root module's name is not the same as its tree name. The * root module name defaults to the name of the program. * * @param treeName name of the tree to search * @return root module * @throws DuplicateNameException if a tree with the given name already * exists */ public ProgramModule createRootModule(String treeName) throws DuplicateNameException; /** * Gets the root module for a tree in this listing. * * @param treeName name of tree * * @return the root module for the listing; returns null if there is no tree * rooted at a module with the given name. */ public ProgramModule getRootModule(String treeName); /** * Returns the root module of the program tree with the given name; * * @param treeID id of the program tree * @return the root module of the specified tree. */ public ProgramModule getRootModule(long treeID); /** * Returns the root module for the default program tree. This would be the * program tree that has existed the longest. * * @return the root module for the oldest existing program tree. */ public ProgramModule getDefaultRootModule(); /** * Get the names of all the trees defined in this listing. * * @return the names of all program trees defined in the program. */ public String[] getTreeNames(); /** * Remove the tree rooted at the given name. * * @param treeName the name of the tree to remove. * @return true if the tree was removed; return false if this is the last * tree for the program; cannot delete the last tree. */ public boolean removeTree(String treeName); /** * Rename the tree. This method does not change the root module's name only * the identifier for the tree. * * @param oldName old name of the tree * @param newName new name of the tree. * @throws DuplicateNameException if newName already exists for a root * module */ public void renameTree(String oldName, String newName) throws DuplicateNameException; /** * gets the total number of CodeUnits (Instructions, defined Data, and * undefined Data) * * @return the total number of CodeUnits in the listing. */ public long getNumCodeUnits(); /** * gets the total number of defined Data objects in the listing. * * @return the total number of defined Data objects in the listing. */ public long getNumDefinedData(); /** * gets the total number of Instructions in the listing. * * @return number of Instructions */ public long getNumInstructions(); /** * Get the data type manager for the program. * * @return the datatype manager for the program. */ public DataTypeManager getDataTypeManager(); /** * Create a function with an entry point and a body of addresses. * * @param name the name of the function to create * @param entryPoint the entry point for the function * @param body the address set that makes up the functions body * @param source the source of this function * @return the created function * @throws InvalidInputException if the name contains invalid characters * @throws OverlappingFunctionException if the given body overlaps with an * existing function. */ public Function createFunction(String name, Address entryPoint, AddressSetView body, SourceType source) throws InvalidInputException, OverlappingFunctionException; /** * Create a function in the specified namespace with an entry point and a * body of addresses. * * @param name the name of the function to create * @param nameSpace the namespace in which to create the function * @param entryPoint the entry point for the function * @param body the address set that makes up the functions body * @param source the source of this function * @return the created function * @throws InvalidInputException if the name contains invalid characters * @throws OverlappingFunctionException if the given body overlaps with an * existing function. */ public Function createFunction(String name, Namespace nameSpace, Address entryPoint, AddressSetView body, SourceType source) throws InvalidInputException, OverlappingFunctionException; /** * Remove a function a given entry point. * * @param entryPoint entry point of function to be removed. */ public void removeFunction(Address entryPoint); /** * Get a function with a given entry point. * * @param entryPoint entry point of the function * @return function at the entry point */ public Function getFunctionAt(Address entryPoint); /** * Returns a list of all global functions with the given name. * * @param name the name of the functions to retrieve. * @return a list of all global functions with the given name. */ public List<Function> getGlobalFunctions(String name); /** * Returns a list of all functions with the given name in the given * namespace. * * @param namespace the namespace to search for functions of the given name. * Can be null, in which case it will search the global * namespace. * @param name the name of the functions to retrieve. * @return a list of all global functions with the given name. */ public List<Function> getFunctions(String namespace, String name); /** * Get a function containing an address. * * @param addr the address to search. * @return function containing this address, null otherwise */ public Function getFunctionContaining(Address addr); /** * Get an iterator over all external functions * * @return an iterator over all currently defined external functions. */ public FunctionIterator getExternalFunctions(); /** * Get an iterator over all functions * * @param forward if true functions are return in address order, otherwise * backwards address order * @return an iterator over all currently defined functions. */ public FunctionIterator getFunctions(boolean forward); /** * Get an iterator over all functions starting at address * * @param start the address to start iterating at. * @param forward if true functions are return in address order, otherwise * backwards address order * @return an iterator over functions */ public FunctionIterator getFunctions(Address start, boolean forward); /** * Get an iterator over all functions with entry points in the address set. * * @param asv the set of addresses to iterator function entry points over. * @param forward if true functions are return in address order, otherwise * backwards address order * @return an iterator over functions */ public FunctionIterator getFunctions(AddressSetView asv, boolean forward); /** * Check if an address is contained in a function * * @param addr address to test * @return true if this address is in one or more functions */ public boolean isInFunction(Address addr); /** * Get the comment history for comments at the given address. * * @param addr address for comments * @param commentType comment type defined in CodeUnit * @return array of comment history records */ public CommentHistory[] getCommentHistory(Address addr, int commentType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Ast {\n /**\n * Method for generating abstract syntactic structure for the source code\n * written in a programming language(Java or Python for example)\n */\n void genAst();\n\n}", "public interface JavaCode {\n\n /**\n * Get an unique identification code for an object\n * TODO: This method is not reliable as hash codes are not unique, should use an UUID generator singleton instead.\n *\n * @param obj the object\n * @return the unique identification code\n */\n static int getUniqueID(Object obj) {\n return obj.hashCode();\n }\n\n /**\n * Compiles this code. If an object implements both {@link JavaCode}\n * and {@link JavaExpression}, only one of this method and\n * {@link JavaExpression#compileExpression(Subroutine, JavaScope)} should be called.\n *\n * @param subroutine the subroutine which this code belongs to\n * @param parent the parent scope of this code\n * @throws JTAException if an error occurs\n */\n void compileCode(Subroutine subroutine, JavaScope parent) throws JTAException;\n}", "public interface CodeService {\n\n\n /**\n * 获取 codesTable 通过 schema\n * @param schema\n * @return\n */\n public List<CodeTable> getCodeTablesBySchema(CodeSchema schema);\n\n /**\n * 构建代码库\n * @param codeSchema\n * @return\n */\n String generateCode(CodeSchema codeSchema) throws Exception;\n}", "CodeType createCodeType();", "public interface NewLine extends ClouBausteinElement {\n\n static NewLine create(CodePosition codePosition){\n return new NewLineImpl(codePosition);\n }\n\n}", "CodeBlock createCodeBlock();", "public interface Code {\r\n \r\n /**\r\n * Called to execute the \"next\" line of code in this\r\n * virtual hardware component.\r\n * \r\n * This can be any action (or sequence of actions) as desired by\r\n * the implementation to simulate hardware functions.\r\n * \r\n * @return true when this \"process\" wants to exit.\r\n */\r\n public boolean executeNext();\r\n \r\n /**\r\n * Called when this instruction set should terminate execution permanently.\r\n * This method SHOULD NOT modify the process Identifier or CPU. It should\r\n * only shut down any processing needs and reset internal data if this\r\n * process is executed again.\r\n */\r\n public void shutdown();\r\n\r\n /**\r\n * Get the program name.\r\n */\r\n public String getName();\r\n \r\n // </editor-fold>\r\n }", "public interface IJSCmdBase {\r\n\r\n public abstract void run();\r\n\r\n /** \\brief unMarshall\r\n * \r\n * \\details\r\n *\r\n * \\return Object\r\n *\r\n * @param pobjFile\r\n * @return */\r\n public abstract Object unMarshal(File pobjFile); // private Object\r\n // unMarshall\r\n\r\n /** \\brief marshal\r\n * \r\n * \\details\r\n *\r\n * \\return Object\r\n *\r\n * @param objO\r\n * @param objF */\r\n public abstract Object marshal(Object objO, File objF); // private\r\n // SchedulerObjectFactoryOptions\r\n // marshal\r\n\r\n public abstract String toXMLString(Object objO); // private\r\n // SchedulerObjectFactoryOptions\r\n // marshal\r\n\r\n public abstract String toXMLString(); // private\r\n // SchedulerObjectFactoryOptions\r\n // marshal\r\n\r\n}", "public interface CustomConstruct extends AgnosticStatement, QueryCondition {\n}", "public interface MarkupLanguage extends Component {\n\n String ROLE = \"org.apache.cocoon.components.language.markup.MarkupLanguage\";\n /**\n * Return the input document's encoding or <code>null</code> if it is the\n * platform's default encoding.\n * This method should be called after <code>generateCode<code> method.\n *\n * @return The input document's encoding\n */\n String getEncoding();\n\n /**\n * Generate source code from the input source for the target\n * <code>ProgrammingLanguage</code>.\n *\n * @param input The input source document\n * @param filename The input document's original filename\n * @param programmingLanguage The target programming language\n * @return The generated source code\n * @exception Exception If an error occurs during code generation\n */\n String generateCode(\n InputSource input, String filename,\n ProgrammingLanguage programmingLanguage,\n SourceResolver resolver\n ) throws Exception;\n}", "public interface CodeFormatter\n{\n}", "public interface ModuleInterface\n{\n //~ Methods ////////////////////////////////////////////////////////////////\n\n void characterData(CMLStack xpath, char[] ch, int start, int length);\n\n void endDocument();\n\n void endElement(CMLStack xpath, String uri, String local, String raw);\n\n void inherit(ModuleInterface conv);\n\n CDOInterface returnCDO();\n\n void startDocument();\n\n void startElement(CMLStack xpath, String uri, String local, String raw,\n Attributes atts);\n}", "interface CodeList149 {\n}", "private CodeRef() {\n }", "public interface Code {\n //运行结果编号\n Integer getCode();\n //运行结果描述\n String getDescription();\n String toString();\n\n}", "public Code() {\n\t}", "@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}", "public interface Program {\n\n\t/**\n\t * The name of the string class\n\t */\n\tpublic static final String STRING_CLASS = \"String\";\n\n\t/**\n\t * The name of the object class\n\t */\n\tpublic static final String OBJECT_CLASS = \"Object\";\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllCodeMembers();\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze, excluding ones from the String and Object classes.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllSubmittedCodeMembers();\n}", "ISModifyComponent createISModifyComponent();", "public interface ICodesDAO\n{\n /**\n * Check whether the cached code category exists.\n *\n * @param id the Universally Unique Identifier (UUID) used to uniquely identify the cached code\n * category\n *\n * @return <code>true</code> if the cached code category exists or <code>false</code> otherwise\n */\n boolean cachedCodeCategoryExists(UUID id)\n throws DAOException;\n\n /**\n * Check whether the code category exists.\n *\n * @param id the Universally Unique Identifier (UUID) used to uniquely identify the code category\n *\n * @return <code>true</code> if the code category exists or <code>false</code> otherwise\n */\n boolean codeCategoryExists(UUID id)\n throws DAOException;\n\n /**\n * Create the new cached code.\n *\n * @param code the <code>Code</code> instance containing the information for the new cached code\n */\n void createCachedCode(Code code)\n throws DAOException;\n\n /**\n * Create the new cached code category.\n *\n * @param cachedCodeCategory the <code>CachedCodeCategory</code> instance containing the\n * information for the new code category\n */\n void createCachedCodeCategory(CachedCodeCategory cachedCodeCategory)\n throws DAOException;\n\n /**\n * Create the new code.\n *\n * @param code the <code>Code</code> instance containing the information for the new code\n */\n void createCode(Code code)\n throws DAOException;\n\n /**\n * Create the new code category.\n *\n * @param codeCategory the <code>CodeCategory</code> instance containing the information for the\n * new code category\n */\n void createCodeCategory(CodeCategory codeCategory)\n throws DAOException;\n\n /**\n * Delete the cached code category.\n *\n * @param id the Universally Unique Identifier (UUID) used to uniquely identify the cached code\n * category\n */\n void deleteCachedCodeCategory(UUID id)\n throws DAOException;\n\n /**\n * Delete the code.\n *\n * @param codeCategoryId the Universally Unique Identifier (UUID) used to uniquely identify the\n * code category\n * @param id the ID uniquely identifying the code\n */\n void deleteCode(UUID codeCategoryId, String id)\n throws DAOException;\n\n /**\n * Delete the code category.\n *\n * @param id the Universally Unique Identifier (UUID) used to uniquely identify the code category\n */\n void deleteCodeCategory(UUID id)\n throws DAOException;\n\n /**\n * Retrieve the cached code category.\n *\n * @param id the Universally Unique Identifier (UUID) used to uniquely identify the cached code\n * category\n *\n * @return the cached code category or <code>null</code> if the cached code category could not be\n * found\n */\n CachedCodeCategory getCachedCodeCategory(UUID id)\n throws DAOException;\n\n /**\n * Returns all the cached codes for the cached code category.\n *\n * @param id the Universally Unique Identifier (UUID) used to uniquely identify the cached code\n * category\n *\n * @return all the cached codes for the cached code category\n */\n List<Code> getCachedCodesForCachedCodeCategory(UUID id)\n throws DAOException;\n\n /**\n * Retrieve the code.\n *\n * @param codeCategoryId the Universally Unique Identifier (UUID) used to uniquely identify the\n * code category\n * @param id the ID uniquely identifying the code\n *\n * @return the code or <code>null</code> if the code could not be found\n */\n Code getCode(UUID codeCategoryId, String id)\n throws DAOException;\n\n /**\n * Returns all the code categories.\n *\n * @param retrieveCodes retrieve the codes and/or code data for the code categories\n *\n * @return all the code categories\n */\n List<CodeCategory> getCodeCategories(boolean retrieveCodes)\n throws DAOException;\n\n /**\n * Retrieve the code category.\n *\n * @param id the Universally Unique Identifier (UUID) used to uniquely identify the code category\n *\n * @return the code category or <code>null</code> if the code category could not be found\n */\n CodeCategory getCodeCategory(UUID id)\n throws DAOException;\n\n /**\n * Returns all the codes for the code category.\n *\n * @param id the Universally Unique Identifier (UUID) used to uniquely identify the code category\n *\n * @return all the codes for the code category\n */\n List<Code> getCodesForCodeCategory(UUID id)\n throws DAOException;\n\n /**\n * Returns the number of code categories.\n *\n * @return the number of code categories\n */\n int getNumberOfCodeCategories()\n throws DAOException;\n\n /**\n * Returns the number of codes for the code category.\n *\n * @param id the Universally Unique Identifier (UUID) used to uniquely identify the code category\n *\n * @return the number of codes for the code category\n */\n int getNumberOfCodesForCodeCategory(UUID id)\n throws DAOException;\n\n /**\n * Is the cached code category current?\n *\n * @param id the Universally Unique Identifier (UUID) used to uniquely identify the cached code\n * category\n *\n * @return <code>true</code> if the cached code category is current or <code>false</code>\n * otherwise\n */\n boolean isCachedCodeCategoryCurrent(UUID id)\n throws DAOException;\n\n /**\n * Update the existing code.\n *\n * @param code the <code>Code</code> instance containing the updated information for the code\n *\n * @return the updated code\n */\n Code updateCode(Code code)\n throws DAOException;\n\n /**\n * Update the existing code category.\n *\n * @param codeCategory the <code>CodeCategory</code> instance containing the updated information\n * for the code category\n *\n * @return the updated code category\n */\n CodeCategory updateCodeCategory(CodeCategory codeCategory)\n throws DAOException;\n}", "public interface C0054a {\n a build();\n }", "CD withCode();", "public void translateImplementation( Code code );", "public interface Backend {\n\n\t/**\n\t * The predefined size of a program's working memory array.\n\t */\n\tpublic int MEM_SIZE = 9001;\n\n\t/**\n\t * Performs code generation for the AST specified.\n\t * \n\t * @param root of AST\n\t */\n\tpublic void work(RootNode root) throws Exception;\n}", "public interface DataType extends CodeItem {\n}", "public interface AdditionalOperations extends Statements {\n}", "public void genCode(CodeFile code) {\n\t\t\n\t}", "public interface C0939c {\n }", "public interface Mustache extends Code {\n /**\n * Append text to the mustache output.\n * \n * @param text the text to append\n */\n void append(String text);\n\n /**\n * Deep clone of the mustache object.\n *\n * @return the clone\n */\n Object clone();\n\n /**\n * Execute the mustache object with a given writer and a single scope context.\n *\n * @param writer write the output of the executed template here\n * @param scope the root object to use\n * @return the new writer\n */\n default Writer execute(Writer writer, Object scope) {\n return execute(writer, makeList(scope));\n }\n\n // Support the previous behavior for users\n default Writer execute(Writer writer, Object[] scopes) {\n List<Object> newscopes = new InternalArrayList<>();\n addAll(newscopes, scopes);\n return execute(writer, newscopes);\n }\n\n /**\n * Execute the mustache with a given writer and an array of scope objects. The\n * scopes are searched right-to-left for references.\n *\n * @param writer write the output of the executed template here\n * @param scopes an ordered list of scopes for variable resolution\n * @return the new writer\n */\n Writer execute(Writer writer, List<Object> scopes);\n\n /**\n * Get the underlying code objects.\n *\n * @return the array of child codes\n */\n Code[] getCodes();\n\n /**\n * Execute the mustache to output itself.\n *\n * @param writer write the output of the executed template here\n */\n void identity(Writer writer);\n\n /**\n * Initialize the mustache before executing. This is must be called at least once\n * and is normally called already by the time you have a mustache instance.\n */\n void init();\n\n /**\n * Change the underlying codes of the mustache implementation.\n * \n * @param codes set the children of this code \n */\n void setCodes(Code[] codes);\n\n /**\n * Only executes the codes. Does not append the text.\n *\n * @param writer write the output of the executed template here\n * @param scopes the array of scopes to execute\n * @return the replacement writer\n */\n Writer run(Writer writer, List<Object> scopes);\n\n /**\n * Invert this mustache given output text.\n *\n * @param text the text to parse\n * @return a tree of nodes representing the variables that when passed as a scope would reproduce the text\n */\n Node invert(String text);\n\n}", "public interface Constants {\r\n\r\n /** The factory. */\r\n FieldFactory FACTORY = new FieldFactoryImpl();\r\n\r\n /** The 64 K chunk size */\r\n int _64K = 40 * 40 * 40;\r\n\r\n /** The Aligned 64 compiler */\r\n Aligned64Compiler ALIGNED64 = new Aligned64Compiler();\r\n\r\n /** Number of Elements to be READ */\r\n int ELEMENTS_READ = _64K;\r\n\r\n /** Number of Elements to be Written */\r\n int ELEMENTS_WRITTEN = _64K;\r\n\r\n /** The packed compiler*/\r\n CompilerBase PACKED = new PackedCompiler();\r\n\r\n /** The * iterations. */\r\n int _ITERATIONS = 20;\r\n\r\n /** The read iterations. */\r\n int READ_ITERATIONS = _ITERATIONS;\r\n\r\n /** The read union iterations. */\r\n int READ_ITERATIONS_UNION = _ITERATIONS;\r\n\r\n /** The write iterations non-transactional. */\r\n int WRITE_ITERATIONS_NON_TRANSACTIONAL = _ITERATIONS;\r\n\r\n /** The write iterations transactional. */\r\n int WRITE_ITERATIONS_TRANSACTIONAL = _ITERATIONS;\r\n\r\n /** The write union iterations non-transactional. */\r\n int WRITE_ITERATIONS_UNION_NON_TRANSACTIONAL = _ITERATIONS;\r\n\r\n /** The write union iterations transactional. */\r\n int WRITE_ITERATIONS_UNION_TRANSACTIONAL = _ITERATIONS;\r\n\r\n}", "@Override\n\tpublic void Coding() {\n\t\tBefore();\n\t\tcoder.Coding();\n\t\tEnd();\n\t}", "@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }", "public abstract JCodeModel owner();", "public interface Program extends AstItem {\n}", "public interface C0385a {\n }", "public abstract void scopeCorrectness() throws CodeException;", "public interface IProgram {\n\n\t/**\n\t * Returns filename of the program. This is name of file that was\n\t * initially added to the database.\n\t * @return filename of the program.\n\t */\n\tpublic String getFilename();\n\n\t/**\n\t * Returns a sequence of bytes that forms source file in UTF-8 encoding. \n\t * @return a sequence of bytes that forms source file in UTF-8 encoding. \n\t */\n\tpublic byte[] getSource();\n\n\t/**\n\t * Returns list of tokens (unmodifiable).\n\t * \n\t * @return list of tokens (unmodifiable).\n\t */\n\tpublic List<IToken> getTokens();\n\n\t/**\n\t * Returns author of the program.\n\t * \n\t * @return author of the program.\n\t */\n\tpublic IAuthor getAuthor();\n\n}", "public static void generateCode()\n {\n \n }", "TraceCodeUnitsView codeUnits();", "public interface C11910c {\n}", "public static void __init() {\r\n\t\t__name__ = new str(\"code\");\r\n\r\n\t\t/**\r\n\t\t copyright Sean McCarthy, license GPL v2 or later\r\n\t\t*/\r\n\t\tdefault_0 = null;\r\n\t\tcl_Code = new class_(\"Code\");\r\n\t}", "ISModifyInterface createISModifyInterface();", "public interface C1803l extends C1813t {\n /* renamed from: b */\n C1803l mo7382b(C2778au auVar);\n\n /* renamed from: f */\n List<C1700ar> mo7233f();\n\n /* renamed from: g */\n C2841w mo7234g();\n\n /* renamed from: q */\n C1800i mo7384q();\n}", "public interface IRControlFlowGraph {\n\t\n\tCollection<? extends IREdge<? extends IRBasicBlock>> getEdges();\n \n /** Get the initial node. The initial node has no predecessors and no statements. */\n IRBasicBlock getEntry();\n\n /** Get the exit node. The exit node has no successors and no statements. */\n IRBasicBlock getExit();\n\n /** Get all the nodes in the CFG representation. */\n Set<? extends IRBasicBlock> getBlocks();\n\n /** Get the predecessors for the given <code>block</code>. */\n Set<? extends IRBasicBlock> getPredecessors(IRBasicBlock block);\n\n /** Get the successors for the given <code>block</code>. */\n Set<? extends IRBasicBlock> getSuccessors(IRBasicBlock block);\n\n /** Get the list of incoming edges. */\n Collection<? extends IREdge<? extends IRBasicBlock>> getIncomingEdges(\n IRBasicBlock block);\n\n /** Get the list of outgoing edges. */\n Collection<? extends IREdge<? extends IRBasicBlock>> getOutgoingEdges(\n IRBasicBlock block);\n\n Scope getScope();\n\n /** Get the source node of the declaration for this CFG. */\n Node getSourceNode();\n\n /** Get the source location of the declaration for this CFG. */\n Location getLocation();\n \n /** Get the name of this CFG (e.g., the name of the procedure). */\n String getName();\n\n /** Pretty-print the CFG to the given <code>Printer</code>. */\n void format(Printer printer);\n\n\tvoid removeBlock(IRBasicBlock block);\n\n\tvoid removeEdge(IREdge<?> edge);\n\n\tvoid addEdge(IREdge<?> edge);\n\n\tvoid addEdge(IRBasicBlock currentBlock, IRBasicBlock succ);\n\n\tvoid addEdge(IRBasicBlock source, IRBooleanExpression guard, IRBasicBlock target);\n\n\tvoid setEntry(IRBasicBlock newEntry);\n\t\n\tvoid setExit(IRBasicBlock newExit);\n\n\tList<IRBasicBlock> topologicalSeq(IRBasicBlock startBlock);\n\n\tIRControlFlowGraph clone();\n\n\tvoid addBlock(IRBasicBlock source);\n\n\tList<IRBasicBlock> topologicalRevSeq(IRBasicBlock endBlock);\n}", "DefineBlock createDefineBlock();", "public void createCode(){\n\t\tsc = animationScript.newSourceCode(new Coordinates(10, 60), \"sourceCode\",\r\n\t\t\t\t\t\t null, AnimProps.SC_PROPS);\r\n\t\t \r\n\t\t// Add the lines to the SourceCode object.\r\n\t\t// Line, name, indentation, display dealy\r\n\t\tsc.addCodeLine(\"1. Berechne für jede (aktive) Zeile und Spalte der Kostenmatrix\", null, 0, null); // 0\r\n\t\tsc.addCodeLine(\" die Differenz aus dem kleinsten (blau) und zweit-kleinsten (lila)\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Element der entsprechenden Zeile/ Spalte.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"2. Wähle die Zeile oder Spalte (grün) aus bei der sich die größte\", null, 0, null); \r\n\t\tsc.addCodeLine(\" Differenz (blau) ergab.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"3. Das kleinste Element der entsprechenden Spalte\", null, 0, null); \r\n\t\tsc.addCodeLine(\" (bzw. Zeile) gibt nun die Stelle an, welche im\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Transporttableau berechnet wird (blau).\", null, 0, null);\r\n\t\tsc.addCodeLine(\"4. Nun wird der kleinere Wert von Angebots- und\", null, 0, null); // 4\r\n\t\tsc.addCodeLine(\" Nachfragevektor im Tableau eingetragen.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"5. Anschließend wird der eingetragene Wert von den Rändern\", null, 0, null); // 5\r\n\t\tsc.addCodeLine(\" abgezogen (mindestens einer muss 0 werden). \", null, 0, null);\r\n\t\tsc.addCodeLine(\"6. Ist nun der Wert im Nachfragevektor Null so markiere\", null, 0, null); // 6\r\n\t\tsc.addCodeLine(\" die entsprechende Spalte in der Kostenmatrix. Diese\", null, 0, null);\r\n\t\tsc.addCodeLine(\" wird nun nicht mehr beachtet (rot). Ist der Wert des\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Angebotsvektors Null markiere die Zeile der Kostenmatrix.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"7. Der Algorithmus wird beendet, falls lediglich eine Zeile oder\", null, 0, null); // 8\r\n\t\tsc.addCodeLine(\" Spalte der Kostenmatrix unmarkiert ist (eines reicht aus).\", null, 0, null);\r\n\t\tsc.addCodeLine(\"8 . Der entsprechenden Zeile bzw. Spalte im Transporttableau werden\", null, 0, null); // 9\t\t \r\n\t\tsc.addCodeLine(\" die restlichen Angebots- und Nachfragemengen zugeordnet.\", null, 0, null);\r\n\t\t\r\n\t}", "public interface InterpolationMethodBaseType extends CodeType {\r\n}", "CodeSetType createCodeSetType();", "public interface C21597a {\n }", "public interface C13719g {\n}", "public interface IBibliotheque {\n\t// Start of user code (user defined attributes for IBibliotheque)\n\n\t// End of user code\n\n\t/**\n\t * Description of the method listeDesEmpruntsEnCours.\n\t */\n\tpublic void listeDesEmpruntsEnCours();\n\n\t// Start of user code (user defined methods for IBibliotheque)\n\n\t// End of user code\n\n}", "interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVault, DefinitionStages.WithProperties, DefinitionStages.WithCreate {\n }", "public interface IBranchFunctionDef {\n /**\n * Verifies that the branch function is valid\n * @return If the usage of the branch function is valid\n */\n boolean verify(@Nullable IBranchFunctionDef parent, ISkriptFunctionDef function, ICodeDef codeDef);\n\n /**\n * Gets the variables of the def\n * @return Def's variables\n */\n List<IVariableDef> getVariables();\n\n /**\n * Sets up the variables of the def\n * @param factory Variable factory\n */\n void setupVariables(IVariableFactory factory);\n}", "public void masterDeclaration();", "public abstract void compile();", "public SourceCode() {\n }", "public interface AbstractC0386gl {\n}", "public interface CodeCursor {\n /**\n * Gets the cursor. The cursor is the offset in code units from\n * the start of the input of the next code unit to be read or\n * written, where the input generally consists of the code for a\n * single method.\n */\n public int cursor();\n\n /**\n * Gets the base address associated with the current cursor. This\n * differs from the cursor value when explicitly set (by {@link\n * #setBaseAddress}). This is used, in particular, to convey base\n * addresses to switch data payload instructions, whose relative\n * addresses are relative to the address of a dependant switch\n * instruction.\n */\n public int baseAddressForCursor();\n\n /**\n * Sets the base address for the given target address to be as indicated.\n *\n * @see #baseAddressForCursor\n */\n public void setBaseAddress(int targetAddress, int baseAddress);\n}", "public interface StatusCodePropertiesEditionPart {\n\n\t/**\n\t * @return the number\n\t * \n\t */\n\tpublic String getNumber();\n\n\t/**\n\t * Defines a new number\n\t * @param newValue the new number to set\n\t * \n\t */\n\tpublic void setNumber(String newValue);\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t * \n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}", "private SourcecodePackage() {}", "interface Definition extends DefinitionStages.Blank, DefinitionStages.WithJobAgent, DefinitionStages.WithMembers, DefinitionStages.WithCreate {\n }", "public interface ICHRIntermediateFormBuilder<Result> extends IBuilder<Result> {\r\n\tpublic void beginEndPackage( String pkg ) throws BuilderException;\r\n\t\r\n public void beginClassDeclarations() throws BuilderException;\r\n \r\n \tpublic void importClass(String id) throws BuilderException;\r\n \r\n public void importPackage(String id) throws BuilderException;\r\n \t\r\n public void endClassDeclarations() throws BuilderException;\r\n \r\n public void beginHandler(String name) throws BuilderException;\r\n \r\n \tpublic void beginTypeParameters() throws BuilderException;\r\n \t\r\n \t\tpublic void beginTypeParameter(String name) throws BuilderException;\r\n \t\t\t\r\n \t\t\tpublic void beginUpperBound(String name) throws BuilderException;\r\n \t\t\t\r\n \t\t\tpublic void endUpperBound() throws BuilderException;\r\n \t\t\r\n \t\tpublic void endTypeParameter() throws BuilderException;\r\n \t\r\n \tpublic void endTypeParameters() throws BuilderException;\r\n\t \r\n\t public void beginSolverDeclarations() throws BuilderException;\r\n\t \r\n \t public void beginSolverDeclaration(String solverInterface) throws BuilderException;\r\n \t \t\r\n \t \tpublic void beginTypeArguments() throws BuilderException; \r\n \t \r\n \t \t\tpublic void beginTypeArgument(String type) throws BuilderException;\r\n \t \t\t\r\n \t \t\tpublic void endTypeArgument() throws BuilderException;\r\n \t \t\t\r\n \t \tpublic void endTypeArguments() throws BuilderException;\r\n \t \t\r\n \t \tpublic void buildSolverName(String name) throws BuilderException;\r\n \t \t\r\n \t public void endSolverDeclaration() throws BuilderException;\r\n\t \r\n\t public void endSolverDeclarations() throws BuilderException;\r\n\t \r\n\t public void beginConstraintDeclarations() throws BuilderException;\r\n\t \r\n\t \tpublic void beginConstraintDeclaration(String id) throws BuilderException;\r\n\t \t\r\n public void buildInfixIdentifier(String infix) throws BuilderException;\r\n \r\n\t \t\tpublic void beginConstraintArgument() throws BuilderException;\r\n \r\n public void beginConstraintArgumentType(String type, boolean fixed) throws BuilderException;\r\n\r\n /* typeParameters */\r\n \r\n public void endConstraintArgumentType() throws BuilderException;\r\n \r\n\t \t\t\tpublic void buildConstraintArgumentName(String name) throws BuilderException;\r\n\t \t\t\r\n\t \t\tpublic void endConstraintArgument() throws BuilderException;\r\n\t \t\r\n\t \tpublic void endConstraintDeclaration();\r\n\t \r\n\t public void endConstraintDeclarations() throws BuilderException;\r\n\t \r\n\t public void beginRules() throws BuilderException;\r\n\t \r\n\t \tpublic void beginVariableDeclarations() throws BuilderException;\t \t\r\n\t \t\t\r\n public void beginVariableType(String type, boolean fixed) throws BuilderException;\r\n\t \t\t \r\n /* typeParameters */\r\n \r\n public void endVariableType() throws BuilderException;\r\n\t \r\n\t \t\tpublic void declareVariable(String id) throws BuilderException;\r\n\t \t\r\n\t \tpublic void endVariableDeclarations() throws BuilderException;\r\n \r\n public void beginRule() throws BuilderException;\r\n \r\n \t \tpublic void beginRuleDefinition(RuleType type) throws BuilderException;\r\n \t \t\r\n \t \tpublic void beginRuleDefinition(String id, RuleType type) throws BuilderException ;\r\n \t \t\t// begin van een strategie...\r\n \t \t\tpublic void beginHead() throws BuilderException;\r\n \t \t\t\tpublic void beginKeptOccurrences() throws BuilderException;\r\n \t \t\t\tpublic void beginRemovedOccurrences() throws BuilderException;\r\n \t \t\t\t\t\r\n \t \t\t\t\t\t// etc etc\r\n \r\n public void buildOccurrenceId(String id) throws BuilderException;\r\n \t\t\t\r\n \t\t\t\tpublic void endKeptOccurrences() throws BuilderException;\r\n \t\t \tpublic void endRemovedOccurrences() throws BuilderException;\r\n \t\t \tpublic void endHead() throws BuilderException;\r\n \r\n \t \t\tpublic void beginGuard() throws BuilderException;\r\n \t \t\tpublic void beginBody() throws BuilderException;\r\n \r\n public void addFieldAccessConjunct(String id) throws BuilderException;\r\n \r\n public void addFailureConjunct() throws BuilderException;\r\n \t \t\t\t\r\n \t \t\t\tpublic void beginIdentifiedConjunct(String id) throws BuilderException;\r\n \r\n public void beginComposedIdConjunct(String id) throws BuilderException;\t \t\t\r\n \t\t \t\tpublic void beginMarkedBuiltInConstraint(String id) throws BuilderException;\r\n \t\t \t\tpublic void beginMethodInvocationConjunct(String id) throws BuilderException;\r\n \r\n public void beginSimpleIdConjunct(String id) throws BuilderException;\r\n public void beginBuiltInConstraint(String id) throws BuilderException;\r\n public void beginUserDefinedConstraint(String id) throws BuilderException;\r\n \r\n \t\t \t\t\tpublic void beginArguments() throws BuilderException;\r\n \t\t \t\t\t\r\n \t\t \t\t\t\tpublic void addIdentifiedArgument(String id) throws BuilderException;\r\n \t\t \t\t\t\t\r\n \t\t \t\t\t\tpublic void addConstantArgument(boolean value) throws BuilderException;\r\n \t\t \t\t\t\tpublic void addConstantArgument(byte value) throws BuilderException;\r\n \t\t \t\t\t\tpublic void addConstantArgument(short value) throws BuilderException;\r\n \t\t \t\t\t\tpublic void addConstantArgument(int value) throws BuilderException;\r\n \t\t \t\t\t\tpublic void addConstantArgument(char value) throws BuilderException;\r\n \t\t \t\t\t\tpublic void addConstantArgument(long value) throws BuilderException;\r\n \t\t \t\t\t\tpublic void addConstantArgument(float value) throws BuilderException;\r\n \t\t \t\t\t\tpublic void addConstantArgument(double value) throws BuilderException;\r\n \t\t \t\t\t\tpublic void addConstantArgument(String value) throws BuilderException;\r\n \t\t \t\t\t\tpublic void addConstantArgument(/* null */) throws BuilderException;\r\n \t\t \t\t\t\t\r\n public void addFieldAccessArgument(String id) throws BuilderException; \r\n \r\n \t\t \t\t\t\tpublic void beginMethodInvocationArgument(String id) throws BuilderException;\r\n public void beginConstructorInvocationArgument(String id) throws BuilderException;\r\n \t\t \t\t\t\t\r\n \t\t \t\t\t\t\t// beginArguments etc etc\r\n \t\t \t\t\t\t\r\n \t\t \t\t\t\tpublic void endMethodInvocationArgument() throws BuilderException;\r\n public void endConstructorInvocationArgument() throws BuilderException;\r\n \t\t \t\t\t\r\n \t\t \t\t\tpublic void endArguments() throws BuilderException;\r\n \t\t \t\t\r\n \t\t \t\t\tpublic void endIdentifiedConjunct() throws BuilderException;\r\n \t\t \t\t\t\r\n \t\t \t\t\tpublic void endComposedIdConjunct() throws BuilderException;\t \t\t\r\n \t\t\t \t\tpublic void endMarkedBuiltInConstraint() throws BuilderException;\r\n \t\t\t \t\tpublic void endMethodInvocationConjunct() throws BuilderException;\r\n \t\t\t \t\t\r\n \t\t\t \t\tpublic void endSimpleIdConjunct() throws BuilderException;\r\n \t\t\t \t\tpublic void endBuiltInConstraint() throws BuilderException;\r\n \t\t\t \t\tpublic void endUserDefinedConstraint() throws BuilderException;\r\n \r\n public void beginInfixConstraint() throws BuilderException;\r\n \r\n // add argument 1\r\n \r\n public void buildInfix(String infix) throws BuilderException;\r\n public void buildMarkedInfix(String infix) throws BuilderException;\r\n public void buildBuiltInInfix(String infix) throws BuilderException;\r\n public void buildUserDefinedInfix(String infix) throws BuilderException;\r\n \r\n // add argument 2\r\n \r\n public void endInfixConstraint() throws BuilderException;\r\n \r\n \t\t \tpublic void endGuard() throws BuilderException;\r\n \t\t \tpublic void endBody() throws BuilderException;\r\n\t \t\t\r\n \t\t public void endRuleDefinition() throws BuilderException;\r\n \r\n public void beginPragmas() throws BuilderException;\r\n \r\n public void addPassivePragma(String id) throws BuilderException;\r\n \r\n public void endPragmas() throws BuilderException;\r\n \r\n\t\t public void endRule() throws BuilderException;\r\n\t \r\n\t public void endRules() throws BuilderException;\r\n \r\n public void endHandler() throws BuilderException;\r\n}", "interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate {\n }", "public interface AbstractC7729o0ooOoo {\n void OooO00o();\n}", "public interface C46409a {\n}", "public interface ILexComponent {\n\n\t/**\n\t * Sets the parent attribute of the ILexComponent object\n\t * \n\t * @param parent\n\t * The new parent value\n\t */\n\tpublic void setParent(ILexComponent parent);\n\n\t/**\n\t * Gets the parent attribute of the ILexComponent object\n\t * \n\t * @return The parent value\n\t */\n\tpublic ILexComponent getParent();\n\n\t/**\n\t * Sets the parentId attribute of the LexComponent object\n\t * \n\t * @param parentId\n\t * The new parentId value\n\t */\n\tpublic void setParentId(java.lang.Integer parentId);\n\n\t/**\n\t * Gets the parent attribute of the LexComponent object\n\t * \n\t * @return The parent value\n\t */\n\n\t/**\n\t * Gets the parentId attribute of the LexComponent object\n\t * \n\t * @return The parentId value\n\t */\n\tpublic java.lang.Integer getParentId();\n\n\t/**\n\t * Gets the label attribute of the ILexComponent object\n\t * \n\t * @return The label value\n\t * @since\n\t */\n\tpublic java.lang.String getLabel();\n\n\t/**\n\t * Gets the metaId attribute of the ILexComponent object\n\t * \n\t * @return The metaId value\n\t * @since\n\t */\n\tpublic java.lang.Integer getMetaId();\n\n\t/**\n\t * Sets the metaId attribute of the ILexComponent object\n\t * \n\t * @param metaId\n\t * The new metaId value\n\t * @since\n\t */\n\tpublic void setMetaId(java.lang.Integer metaId);\n\n\t/**\n\t * Gets the translations attribute of the ILexComponent object\n\t * \n\t * @return The translations value\n\t * @since\n\t */\n\t// public java.util.Set getTranslations();\n\n\t/**\n\t * Sets the translations attribute of the ILexComponent object\n\t * \n\t * @return The deleted value\n\t * @since\n\t */\n\t//public void setTranslations( java.util.Set translations );\n\n\t/**\n\t * Gets the deleted attribute of the ILexComponent object\n\t * \n\t * @return The deleted value\n\t * @since\n\t */\n\tpublic java.lang.Boolean getDeleted();\n\n\t/**\n\t * Sets the deleted attribute of the ILexComponent object\n\t * \n\t * @param deleted\n\t * The new deleted value\n\t * @since\n\t */\n\tpublic void setDeleted(java.lang.Boolean deleted);\n\n\t/**\n\t * Gets the analyticalNotes attribute of the ILexComponent object\n\t * \n\t * @return The analyticalNotes value\n\t * @since\n\t */\n\tpublic java.util.List getAnalyticalNotes();\n\n\t/**\n\t * Sets the analyticalNotes attribute of the ILexComponent object\n\t * \n\t * @param analyticalNotes\n\t * The new analyticalNotes value\n\t * @since\n\t */\n\tpublic void setAnalyticalNotes(java.util.List analyticalNotes);\n\n\t/**\n\t * Gets the meta attribute of the ILexComponent object\n\t * \n\t * @return The meta value\n\t * @since\n\t */\n\tpublic org.thdl.lex.component.Meta getMeta();\n\n\t/**\n\t * Sets the meta attribute of the ILexComponent object\n\t * \n\t * @param meta\n\t * The new meta value\n\t * @since\n\t */\n\tpublic void setMeta(org.thdl.lex.component.Meta meta);\n\n\t/**\n\t * Description of the Method\n\t * \n\t * @param properties\n\t * Description of Parameter\n\t * @exception LexComponentException\n\t * Description of Exception\n\t * @since\n\t */\n\tpublic void populate(java.util.Map properties) throws LexComponentException;\n\n\t/**\n\t * Description of the Method\n\t * \n\t * @param component\n\t * Description of the Parameter\n\t * @exception LexComponentException\n\t * Description of the Exception\n\t */\n\tpublic void populate(ILexComponent component) throws LexComponentException;\n\n\t/**\n\t * Adds a feature to the SiblingList attribute of the LexComponentNode\n\t * object\n\t * \n\t * @param component\n\t * The feature to be added to the SiblingList attribute\n\t * @param list\n\t * The feature to be added to the SiblingList attribute\n\t * @param parent\n\t * The feature to be added to the SiblingList attribute\n\t * @exception LexComponentException\n\t * Description of the Exception\n\t */\n\tpublic void addSiblingList(ILexComponent parent, ILexComponent component,\n\t\t\tList list) throws LexComponentException;\n}", "interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCluster, DefinitionStages.WithNodeCount, DefinitionStages.WithStdOutErrPathPrefix, DefinitionStages.WithCreate {\n }", "interface WithCreate\n extends DefinitionStages.WithRepoUrl,\n DefinitionStages.WithBranch,\n DefinitionStages.WithFolderPath,\n DefinitionStages.WithAutoSync,\n DefinitionStages.WithPublishRunbook,\n DefinitionStages.WithSourceType,\n DefinitionStages.WithSecurityToken,\n DefinitionStages.WithDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n SourceControl create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n SourceControl create(Context context);\n }", "public Classification codeOf(Object code) {\n throw new IllegalStateException(\"Unknown definition: \" + this); // basically unreachable\n }", "public interface ComponentDAO {\r\n /**\r\n * Retrieves all coverage components\r\n *\r\n * @param record input record\r\n * @param recordLoadProcessor an instance of the load processor to set page entitlements\r\n * @return\r\n */\r\n RecordSet loadAllComponents(Record record, RecordLoadProcessor recordLoadProcessor);\r\n\r\n /**\r\n * Retrieves all pending prior act coverage components\r\n *\r\n * @param record input record\r\n * @param recordLoadProcessor an instance of the load processor to set page entitlements\r\n * @return\r\n */\r\n RecordSet loadAllPendPriorActComp(Record record, RecordLoadProcessor recordLoadProcessor);\r\n\r\n /**\r\n * Save all input component records with the Pm_Nb_End.Save_Covg_Component stored procedure.\r\n * Set the rowStatus field to NEW for records that are newly added in this request.\r\n * Set the rowStatus field to MODIFIED for records that have already been saved in this WIP transaction,\r\n * and are just being updated.\r\n *\r\n * @param inputRecords a set of Records, each with the PolicyHeader, PolicyIdentifier,\r\n * and Component Detail info matching the fields returned from the loadAllComponents method.\r\n * @return the number of rows updated.\r\n */\r\n int addAllComponents(RecordSet inputRecords);\r\n\r\n /**\r\n * Update all given input records with the Pm_Endorse.Change_Covg_Component stored procedure.\r\n *\r\n * @param inputRecords a set of Records, each with the PolicyHeader, PolicyIdentifier,\r\n * and Component Detail info matching the fields returned from the loadAllComponents method.\r\n * @return the number of rows updated.\r\n */\r\n int updateAllComponents(RecordSet inputRecords);\r\n\r\n /**\r\n * Delete all given input records with the Pm_Nb_Del.Del_Covg_Component stored procedure.\r\n *\r\n * @param inputRecords a set of Records, each with the PolicyHeader, PolicyIdentifier,\r\n * and Component Detail info matching the fields returned from the loadAllComponents method.\r\n * @return the number of rows updated.\r\n */\r\n int deleteAllComponents(RecordSet inputRecords);\r\n\r\n /**\r\n * Get the Cancel WIP rule\r\n *\r\n * @param record\r\n * @return\r\n */\r\n public Record getCancelWipRule(Record record);\r\n\r\n /**\r\n * Get the component cycle years\r\n *\r\n * @param record\r\n * @return\r\n */\r\n public int getCycleYearsForComponent(Record record);\r\n\r\n /**\r\n * Get the component num days\r\n *\r\n * @param record\r\n * @return\r\n */\r\n public int getNumDaysForComponent(Record record);\r\n\r\n /**\r\n * To load all dependent components\r\n *\r\n * @param record\r\n * @param recordLoadProcessor\r\n * @return\r\n */\r\n public RecordSet loadAllAvailableComponent(Record record, RecordLoadProcessor recordLoadProcessor);\r\n\r\n /**\r\n * Get the earliest contiguous coverage effective date with the function Pm_Dates.Nb_Covg_Startdt(coverage_fk, check_dt)\r\n *\r\n * @param record\r\n * @return\r\n */\r\n public Record getCoverageContiguousEffectiveDate(Record record);\r\n\r\n /**\r\n * Get component PK and base record FK\r\n *\r\n * @param record\r\n * @return\r\n */\r\n public Record getComponentIdAndBaseId(Record record);\r\n\r\n /**\r\n * Load Cycle Detail\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllCycleDetail(Record inputRecord);\r\n\r\n /**\r\n * Load Surcharge Points\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllSurchargePoint(Record inputRecord);\r\n\r\n /**\r\n * Save all surcharge points data.\r\n *\r\n * @param inputRecords intput record\r\n * @return the number of row updateds\r\n */\r\n public int saveAllSurchargePoint(RecordSet inputRecords);\r\n\r\n /**\r\n * validate component copy\r\n * @param inputRecord\r\n * @return validate status code statusCode\r\n */\r\n String validateCopyAllComponent(Record inputRecord);\r\n\r\n /**\r\n * delete all component from coverage for delete risk all\r\n * @param compRs\r\n */\r\n void deleteAllCopiedComponent(RecordSet compRs);\r\n\r\n /**\r\n * Load all processing event.\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllProcessingEvent(Record inputRecord, RecordLoadProcessor entitlementRLP);\r\n\r\n /**\r\n * Load all processing detail.\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllProcessingDetail(Record inputRecord);\r\n\r\n /**\r\n * Save all processing event.\r\n *\r\n * @param inputRecords\r\n * @return the number of row updated\r\n */\r\n public int saveAllProcessingEvent(RecordSet inputRecords);\r\n\r\n /**\r\n * Set RMT Classification indicator.\r\n *\r\n * @param inputRecord\r\n */\r\n public void setRMTIndicator(Record inputRecord);\r\n\r\n /**\r\n * Process RM Discount\r\n *\r\n * @param inputRecord\r\n * @return Record\r\n */\r\n public Record processRmDiscount(Record inputRecord);\r\n\r\n /**\r\n * Load all Corp/Org discount member.\r\n *\r\n * @param inputRecord\r\n * @param entitlementRLP\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllCorpOrgDiscountMember(Record inputRecord, RecordLoadProcessor entitlementRLP);\r\n\r\n /**\r\n * Process Corp/Org discount\r\n *\r\n * @param inputRecord\r\n * @return Record\r\n */\r\n public Record processCorpOrgDiscount(Record inputRecord);\r\n\r\n /**\r\n * Load all processing event history\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllProcessEventHistory(Record inputRecord);\r\n\r\n /**\r\n * Load all processing detail history\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllProcessDetailHistory(Record inputRecord);\r\n\r\n /**\r\n * Apply the component\r\n *\r\n * @param inputRecord\r\n * @return Record\r\n */\r\n public Record applyMassComponet(Record inputRecord);\r\n\r\n /**\r\n * Check if it is a problem policy\r\n *\r\n * @param inputRecord\r\n * @return String\r\n */\r\n public String isProblemPolicy(Record inputRecord);\r\n\r\n /**\r\n * Check if add component allowed\r\n *\r\n * @param inputRecord\r\n * @return\r\n */\r\n String isAddComponentAllowed(Record inputRecord);\r\n\r\n /**\r\n * Get short term component's effective from and effective to date\r\n *\r\n * @param inputRecord Input record containing risk and coverage level details\r\n * @return Record that contains component effective from date and effective to date.\r\n */\r\n Record getShortTermCompEffAndExpDates(Record inputRecord);\r\n\r\n /**\r\n * Check if the official component record has a temp record exists for the specific transaction.\r\n *\r\n * @param inputRecord include component base record id and transaction id\r\n * @return true if component temp record exists\r\n * false if component temp record does not exist\r\n */\r\n boolean isComponentTempRecordExist(Record inputRecord);\r\n\r\n /**\r\n * Check if changing component expiring date in OOSE is allowed\r\n *\r\n * @param inputRecord\r\n * @return\r\n */\r\n String isOoseChangeDateAllowed(Record inputRecord);\r\n\r\n /**\r\n * Load effective to date with PM_Dates.NB_Covg_ExpDt stored procedure.\r\n * <p/>\r\n *\r\n * @param inputRecord a Record with information to load the effective to date.\r\n * @return Coverage effective to date.\r\n */\r\n String getCoverageExpirationDate(Record inputRecord);\r\n\r\n /**\r\n * Validate component duplicate.\r\n * @param inputRecord\r\n * @return\r\n */\r\n Record validateComponentDuplicate(Record inputRecord);\r\n\r\n /**\r\n * Check if the NDD expiration date is configured for the component.\r\n *\r\n * @param inputRecord include component base record id and transaction id\r\n * @return true if configured\r\n * false if not configured\r\n */\r\n boolean getNddSkipValidateB(Record inputRecord);\r\n\r\n /**\r\n * Load experience discount history information.\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadExpHistoryInfo(Record inputRecord);\r\n\r\n /**\r\n * Load claim information for a specific period of the risk.\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadClaimInfo(Record inputRecord);\r\n}", "interface Definition\n extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {\n }", "interface Definition\n extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {\n }", "public interface AST {\n \n /**\n * Returns the label or tag for this AST node.\n */\n public int getNodeLabel ();\n \n /**\n * Returns the textual value of this AST node.\n */\n public String getNodeValue ();\n \n /**\n * Returns a list of child nodes, or null if there are no child nodes. The value returned is a shallow copy\n * which can be manipulated by the caller.\n */\n public List<AST> getChildNodes ();\n \n /**\n * Returns the position of the node in the original source(s).\n */\n public CodePosition getCodePosition ();\n \n}", "public interface C0425p {\n}", "public interface AstFactory\n{\n\tIdNode IdNode(Token t, String text);\n\tExtIdNode ExtIdNode(Token t, String text);\n\n\tAmbigNameNode AmbigNameNode(Token t, String text);\t // Deprecate? Never need to make ambigname \"manually\" via af? (constructed only by ScribbleParser)\n\tDataParamNode DataParamNode(Token t, String text);\n\tOpNode OpNode(Token t, String text);\n\tRecVarNode RecVarNode(Token t, String text);\n\tRoleNode RoleNode(Token t, String text);\n\tSigParamNode SigParamNode(Token t, String text);\n\n\tDataNameNode DataNameNode(Token t, List<IdNode> elems);\n\tGProtoNameNode GProtoNameNode(Token t, List<IdNode> elems);\n\tLProtoNameNode LProtoNameNode(Token t, List<IdNode> elems);\n\tModuleNameNode ModuleNameNode(Token t, List<IdNode> elems);\n\tSigNameNode SigNameNode(Token t, List<IdNode> elems);\n\t\n\tModule Module(Token t, ModuleDecl mdecl,\n\t\t\tList<? extends ImportDecl<?>> imports,\n\t\t\tList<? extends NonProtoDecl<?>> nonprotos,\n\t\t\tList<? extends ProtoDecl<?>> protos);\n\n\tModuleDecl ModuleDecl(Token t, ModuleNameNode fullname);\n\tImportModule ImportModule(Token t, ModuleNameNode modname,\n\t\t\tModuleNameNode alias); // alias == null for no alias (child not added)\n\n\tDataDecl DataDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, DataNameNode name);\n\tSigDecl SigDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, SigNameNode name);\n\tGProtoDecl GProtoDecl(Token t, ProtoModList mods, GProtoHeader header,\n\t\t\tGProtoDef def);\n\n\t// TODO: refactor to use ProtoModList, etc.\n\tProtoModList ProtoModList(Token t, List<ProtoModNode> mods);\n\tAuxMod AuxMod(Token t);\n\tExplicitMod ExplicitMod(Token t);\n\n\tGProtoHeader GProtocolHeader(Token t, GProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tRoleDeclList RoleDeclList(Token t, List<RoleDecl> ds);\n\tRoleDecl RoleDecl(Token t, RoleNode r);\n\tNonRoleParamDeclList NonRoleParamDeclList(Token t, \n\t\t\tList<NonRoleParamDecl<? extends NonRoleParamKind>> ds);\n\tDataParamDecl DataParamDecl(Token t, DataParamNode p);\n\tSigParamDecl SigParamDecl(Token t, SigParamNode p);\n\n\tGProtoDef GProtoDef(Token t, GProtoBlock block);\n\tGProtoBlock GProtoBlock(Token t, GInteractionSeq seq);\n\tGInteractionSeq GInteractionSeq(Token t, List<GSessionNode> elems); // CHECKME: ? extends GSessionNode ? -- and similar others?\n\n\tSigLitNode SigLitNode(Token t, OpNode op, PayElemList pay);\n\tPayElemList PayElemList(Token t, List<PayElem<?>> elems);\n\t<K extends PayElemKind> UnaryPayElem<K> UnaryPayElem(Token t, \n\t\t\tPayElemNameNode<K> name);\n\tGDelegPayElem GDelegPayElem(Token t, GProtoNameNode name, RoleNode r);\n\n\tGMsgTransfer GMsgTransfer(Token t, RoleNode src, MsgNode msg,\n\t\t\tList<RoleNode> dsts);\n\tGConnect GConnect(Token t, RoleNode src, MsgNode msg, RoleNode dst);\n\tGDisconnect GDisconnect(Token t, RoleNode left, RoleNode right);\n\tGWrap GWrap(Token t, RoleNode client, RoleNode server);\n\n\tGContinue GContinue(Token t, RecVarNode rv);\n\tGDo GDo(Token t, GProtoNameNode proto, NonRoleArgList args, RoleArgList rs);\n\n\tRoleArgList RoleArgList(Token t, List<RoleArg> rs);\n\tRoleArg RoleArg(Token t, RoleNode r);\n\tNonRoleArgList NonRoleArgList(Token t, List<NonRoleArg> args);\n\tNonRoleArg NonRoleArg(Token t, NonRoleArgNode arg);\n\n\tGChoice GChoice(Token t, RoleNode subj, List<GProtoBlock> blocks);\n\tGRecursion GRecursion(Token t, RecVarNode rv, GProtoBlock block);\n\n\t/*LProtoDecl LProtoDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def); // Not currently used -- local protos not yet parsed, only projected*/\n\n\tLProjectionDecl LProjectionDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def, GProtoNameNode fullname,\n\t\t\tRoleNode self); // del extends that of LProtoDecl\n\n\tLProtoHeader LProtoHeader(Token t, LProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tLSelfDecl LSelfDecl(Token t, RoleNode r);\n\n\tLProtoDef LProtoDef(Token t, LProtoBlock block);\n\tLProtoBlock LProtoBlock(Token t, LInteractionSeq seq);\n\tLInteractionSeq LInteractionSeq(Token t, List<LSessionNode> elems);\n\n\t// Following take \"self\" param in case of parsed Token (not actually supported yet)\n\tLSend LSend(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLRecv LRecv(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLAcc LAcc(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLReq LReq(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLDisconnect LDisconnect(Token t, RoleNode self, RoleNode peer); \n\tLClientWrap LClientWrap(Token t, RoleNode client, RoleNode server);\n\tLServerWrap LServerWrap(Token t, RoleNode client, RoleNode server);\n\n\tLContinue LContinue(Token t, RecVarNode rv); \n\tLDo LDo(Token t, LProtoNameNode proto, NonRoleArgList as, RoleArgList rs);\n\n\tLChoice LChoice(Token t, RoleNode subj, List<LProtoBlock> blocks);\n\tLRecursion LRecursion(Token t, RecVarNode rv, LProtoBlock block);\n}", "interface DefinitionStages {\n /** The first stage of the SourceControl definition. */\n interface Blank extends WithParentResource {\n }\n /** The stage of the SourceControl definition allowing to specify parent resource. */\n interface WithParentResource {\n /**\n * Specifies resourceGroupName, automationAccountName.\n *\n * @param resourceGroupName Name of an Azure Resource group.\n * @param automationAccountName The name of the automation account.\n * @return the next definition stage.\n */\n WithCreate withExistingAutomationAccount(String resourceGroupName, String automationAccountName);\n }\n /**\n * The stage of the SourceControl definition which contains all the minimum required properties for the resource\n * to be created, but also allows for any other optional properties to be specified.\n */\n interface WithCreate\n extends DefinitionStages.WithRepoUrl,\n DefinitionStages.WithBranch,\n DefinitionStages.WithFolderPath,\n DefinitionStages.WithAutoSync,\n DefinitionStages.WithPublishRunbook,\n DefinitionStages.WithSourceType,\n DefinitionStages.WithSecurityToken,\n DefinitionStages.WithDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n SourceControl create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n SourceControl create(Context context);\n }\n /** The stage of the SourceControl definition allowing to specify repoUrl. */\n interface WithRepoUrl {\n /**\n * Specifies the repoUrl property: The repo url of the source control..\n *\n * @param repoUrl The repo url of the source control.\n * @return the next definition stage.\n */\n WithCreate withRepoUrl(String repoUrl);\n }\n /** The stage of the SourceControl definition allowing to specify branch. */\n interface WithBranch {\n /**\n * Specifies the branch property: The repo branch of the source control. Include branch as empty string for\n * VsoTfvc..\n *\n * @param branch The repo branch of the source control. Include branch as empty string for VsoTfvc.\n * @return the next definition stage.\n */\n WithCreate withBranch(String branch);\n }\n /** The stage of the SourceControl definition allowing to specify folderPath. */\n interface WithFolderPath {\n /**\n * Specifies the folderPath property: The folder path of the source control. Path must be relative..\n *\n * @param folderPath The folder path of the source control. Path must be relative.\n * @return the next definition stage.\n */\n WithCreate withFolderPath(String folderPath);\n }\n /** The stage of the SourceControl definition allowing to specify autoSync. */\n interface WithAutoSync {\n /**\n * Specifies the autoSync property: The auto async of the source control. Default is false..\n *\n * @param autoSync The auto async of the source control. Default is false.\n * @return the next definition stage.\n */\n WithCreate withAutoSync(Boolean autoSync);\n }\n /** The stage of the SourceControl definition allowing to specify publishRunbook. */\n interface WithPublishRunbook {\n /**\n * Specifies the publishRunbook property: The auto publish of the source control. Default is true..\n *\n * @param publishRunbook The auto publish of the source control. Default is true.\n * @return the next definition stage.\n */\n WithCreate withPublishRunbook(Boolean publishRunbook);\n }\n /** The stage of the SourceControl definition allowing to specify sourceType. */\n interface WithSourceType {\n /**\n * Specifies the sourceType property: The source type. Must be one of VsoGit, VsoTfvc, GitHub, case\n * sensitive..\n *\n * @param sourceType The source type. Must be one of VsoGit, VsoTfvc, GitHub, case sensitive.\n * @return the next definition stage.\n */\n WithCreate withSourceType(SourceType sourceType);\n }\n /** The stage of the SourceControl definition allowing to specify securityToken. */\n interface WithSecurityToken {\n /**\n * Specifies the securityToken property: The authorization token for the repo of the source control..\n *\n * @param securityToken The authorization token for the repo of the source control.\n * @return the next definition stage.\n */\n WithCreate withSecurityToken(SourceControlSecurityTokenProperties securityToken);\n }\n /** The stage of the SourceControl definition allowing to specify description. */\n interface WithDescription {\n /**\n * Specifies the description property: The user description of the source control..\n *\n * @param description The user description of the source control.\n * @return the next definition stage.\n */\n WithCreate withDescription(String description);\n }\n }", "public interface CMLEditor {\n\n\tvoid executeCommand(CMLElement cmlIn);\n\n}", "public interface AbstractC03680oI {\n}", "CodegenFactory getCodegenFactory();", "public Instructions() {\n\n\t\t// String code = codeIn.trim();\n\t\t// code = code.replaceAll(\"\\\\s+\", \"\");\n\t\t// System.out.println(\"Code In:\\n\" + code);\n\t\t//\n\t\t// int len = code.length();\n\t\t// int chunkLength = 2; // the length of each chunk of code\n\t\t// int i = 0;\n\n\t\t// Create new Memory Array\n\t\tMA = new MemoryArray();\n\n\t\t// traverse entered code and split into 2 digit chunks\n\t\t// for (i = 0; i < len; i += chunkLength) {\n\t\t//\n\t\t// String chunk = code.substring(i, Math.min(len, i + chunkLength));\n\t\t// System.out.println(\"code chunk no. \" + (i / 2) + \" \" + chunk);\n\t\t//\n\t\t// opCode(chunk); // TODO - need to call this from the memory class I\n\t\t// think\n\n\t\tmem = new Memory();\n\n\t\tmemDispalyString();\n\n\t\tproc = new ProcessorLoop();\n\n\t\t// set the memory address and OpCode\n\t\t// mem.setAddress(addr);\n\t\t// // convert to decimal\n\t\t// mem.setOpCode(Integer.parseInt(chunk, 16));\n\t\t// System.out.println(\"oc = \" + (Integer.parseInt(chunk, 16)));\n\t\t//\n\t\t// // add the memory object to the memory array\n\t\t// MA.addMemoryObjects(addr, mem);\n\t\t// System.out.println(\"New memory = \" + mem.getAddress() + \" \"\n\t\t// + mem.getOpCode());\n\t\t// addr++;\n\t\t// }\n\n\t}", "public void addCodeBase(ICodeBase codeBase);", "public interface C32115a {\n}", "interface Definition\n extends DefinitionStages.Blank,\n DefinitionStages.WithResourceGroup,\n DefinitionStages.WithLevel,\n DefinitionStages.WithCreate {\n }", "public interface StructureDefinition {\n}", "public CodeFileAttributions(){\r\n // For marshaling\r\n }", "public interface Source {\n /**\n * A listener for changes.\n */\n public interface SourceListener {\n public void added(Source source,\n JavaProject javaProject, String name);\n\n public void removed(Source source,\n JavaProject javaProject, String name);\n\n public void changed(Source source,\n JavaProject javaProject, String name);\n }\n\n public void addListener(SourceListener listener);\n\n public void removeListener(SourceListener listener);\n\n /**\n * Find and return all custom contexts; usually called just before calling\n * addListener(this).\n * \n * @param javaProject the java context to find custom module contexts for\n */\n public Set<String> get(JavaProject javaProject, ProgressMonitor progressMonitor);\n \n public abstract boolean isListeningForChanges();\n \n public abstract void listenForChanges(boolean listenForChanges);\n}", "public interface C0136c {\n }", "ISModifyDataType createISModifyDataType();", "public interface Igual extends ComplexInstruction\n{\n}", "public interface TechnologyModuleGUIFactory {\n\n\t/**\n\t * Create a new Browser element for the specified TechnologyModelObject. <br>\n\t * Can return null if no specific element exists.\n\t * \n\t * @param object\n\t * @param browser\n\t * @param parent\n\t * @return the created Browser Element, or null.\n\t */\n\tpublic <T extends TechnologyModelObject> TechnologyModuleBrowserElement<T> createBrowserElement(T object, ProjectBrowser browser,\n\t\t\tBrowserElement parent);\n\n\t/**\n\t * Create a new model view for the specified TechnologyModelObject. <br>\n\t * Can return null if no specific view exists.\n\t * \n\t * @param object\n\t * @param controller\n\t * @param codeGenerationPerspective\n\t * @return the created view or null.\n\t */\n\tpublic <T extends TechnologyModelObject> ModuleView<T> createModelView(T object, SGController controller,\n\t\t\tCodeGenerationPerspective codeGenerationPerspective);\n\n\t/**\n\t * Called at SG Module actions initialization. Used to record all Technology Module specific actions.\n\t * \n\t * @param actionInitializer\n\t */\n\tpublic void initializeActions(SGControllerActionInitializer actionInitializer);\n}", "public interface C3183a {\n}", "public interface InitializerDef extends CodeDef, MemberDef\n{\n InitializerInstance asInstance();\n}", "public interface C31889b {\n }", "public interface C41547q {\n void initialize();\n}", "interface WithDescription {\n /**\n * Specifies the description property: The user description of the source control..\n *\n * @param description The user description of the source control.\n * @return the next definition stage.\n */\n WithCreate withDescription(String description);\n }", "public interface C8482e {\n}", "public interface CompileContext extends UserDataHolder {\n /**\n * Allows to add a message to be shown in Compiler message view.\n * If correct url, line and column numbers are supplied, the navigation to the specified file is available from the view.\n *\n * @param category the category of a message (information, error, warning).\n * @param message the text of the message.\n * @param url a url to the file to which the message applies, null if not available.\n * @param lineNum a line number, -1 if not available.\n * @param columnNum a column number, -1 if not available.\n */\n default void addMessage(@NotNull CompilerMessageCategory category, @Nls(capitalization = Nls.Capitalization.Sentence) String message, @Nullable String url, int lineNum, int columnNum) {\n addMessage(category, message, url, lineNum, columnNum, null);\n }\n\n /**\n * Allows to add a message to be shown in Compiler message view, with a specified Navigatable\n * that is used to navigate to the error location.\n *\n * @param category the category of a message (information, error, warning).\n * @param message the text of the message.\n * @param url a url to the file to which the message applies, null if not available.\n * @param lineNum a line number, -1 if not available.\n * @param columnNum a column number, -1 if not available.\n * @param navigatable the navigatable pointing to the error location.\n */\n default void addMessage(@NotNull CompilerMessageCategory category,\n @Nls(capitalization = Nls.Capitalization.Sentence) String message,\n @Nullable String url, int lineNum, int columnNum, @Nullable Navigatable navigatable) {\n addMessage(category, message, url, lineNum, columnNum, navigatable, Collections.emptyList());\n }\n\n /**\n * Allows to add a message to be shown in Compiler message view, with a specified Navigatable\n * that is used to navigate to the error location.\n * @param category the category of a message (information, error, warning).\n * @param message the text of the message.\n * @param url a url to the file to which the message applies, null if not available.\n * @param lineNum a line number, -1 if not available.\n * @param columnNum a column number, -1 if not available.\n * @param navigatable optional the navigatable pointing to the error location or null. If not specified, navigation will attempt to set cursor (line:column) position, if available.\n * @param moduleNames module name describing the context for the message (e.g. the module where the error occurred).\n * If a module cycle is compiled, the argument will contain names of modules that form the dependency cycle.\n */\n void addMessage(@NotNull CompilerMessageCategory category,\n @Nls(capitalization = Nls.Capitalization.Sentence) String message,\n @Nullable String url, int lineNum, int columnNum, @Nullable Navigatable navigatable, Collection<String> moduleNames);\n\n /**\n * Returns all messages of the specified category added during the current compile session.\n *\n * @param category the category for which messages are requested.\n * @return all compiler messages of the specified category\n */\n CompilerMessage @NotNull [] getMessages(@NotNull CompilerMessageCategory category);\n\n /**\n * Returns the count of messages of the specified category added during the current compile session.\n *\n * @param category the category for which messages are requested.\n * @return the number of messages of the specified category\n */\n int getMessageCount(@Nullable CompilerMessageCategory category);\n\n /**\n * Returns the progress indicator of the compilation process.\n *\n * @return the progress indicator instance.\n */\n @NotNull\n ProgressIndicator getProgressIndicator();\n\n /**\n * Returns the current compile scope.\n *\n * @return current compile scope\n */\n CompileScope getCompileScope();\n\n /**\n * Returns the compile scope which would be used if the entire project was rebuilt.\n * {@link #getCompileScope()} may return the scope, that is more narrow than ProjectCompileScope.\n *\n * @return project-wide compile scope.\n */\n CompileScope getProjectCompileScope();\n\n /**\n * A compiler may call this method in order to request complete project rebuild.\n * This may be necessary, for example, when compiler caches are corrupted.\n */\n void requestRebuildNextTime(String message);\n\n boolean isRebuildRequested();\n\n @Nullable\n String getRebuildReason();\n\n /**\n * Returns the module to which the specified file belongs. This method is aware of the file->module mapping\n * for generated files.\n *\n * @param file the file to check.\n * @return the module to which the file belongs\n */\n Module getModuleByFile(@NotNull VirtualFile file);\n\n /**\n * Returns the output directory for the specified module.\n *\n * @param module the module to check.\n * @return the output directory for the module specified, null if corresponding VirtualFile is not valid or directory not specified\n */\n @Nullable\n VirtualFile getModuleOutputDirectory(@NotNull Module module);\n\n /**\n * Returns the test output directory for the specified module.\n *\n * @param module the module to check.\n * @return the tests output directory the module specified, null if corresponding VirtualFile is not valid. If in Paths settings\n * output directory for tests is not configured explicitly, but the output path is present, the output path will be returned.\n */\n @Nullable\n VirtualFile getModuleOutputDirectoryForTests(Module module);\n\n /**\n * Checks if the compilation is incremental, i.e. triggered by one of \"Make\" actions.\n *\n * @return true if compilation is incremental. \n */\n boolean isMake();\n\n boolean isAutomake();\n\n boolean isRebuild();\n\n @NotNull\n Project getProject();\n\n boolean isAnnotationProcessorsEnabled();\n}", "public interface SequenceBuilder {\n\t\n\tString getString(String codeItemID, String aDeptCode);\n\t\n\tLong getLong(String codeItemID, String aDeptCode);\n\n}", "interface Definition\n extends DefinitionStages.Blank,\n DefinitionStages.WithParentResource,\n DefinitionStages.WithIdProvider,\n DefinitionStages.WithCreate {\n }", "public interface C5906u {\n String getName();\n\n String getValue();\n}" ]
[ "0.61788046", "0.6147468", "0.59850174", "0.5953441", "0.5931783", "0.5863028", "0.5853796", "0.5849771", "0.5686926", "0.5686167", "0.56782", "0.5673287", "0.561346", "0.5597512", "0.5588353", "0.55746126", "0.55542004", "0.5514735", "0.54991806", "0.5496126", "0.5475635", "0.5472213", "0.5456767", "0.545046", "0.5430248", "0.54201096", "0.53788495", "0.53738165", "0.53695303", "0.5365433", "0.53638476", "0.5354923", "0.53523874", "0.53482014", "0.5342475", "0.5336529", "0.53273726", "0.53259414", "0.5310153", "0.53045183", "0.52837837", "0.5272045", "0.5252269", "0.52514076", "0.5251346", "0.52469826", "0.5243249", "0.5242836", "0.5240867", "0.52345455", "0.5228442", "0.52216756", "0.52211964", "0.52198726", "0.5219852", "0.52075815", "0.52063316", "0.52060145", "0.5204567", "0.51971316", "0.5195315", "0.51784366", "0.5175443", "0.517077", "0.51622576", "0.5149606", "0.51420677", "0.51379216", "0.51358443", "0.5134399", "0.5130234", "0.5130234", "0.51233757", "0.5123017", "0.511527", "0.5114988", "0.5114503", "0.51127416", "0.510684", "0.5105164", "0.51023495", "0.5096493", "0.50934166", "0.50901705", "0.50824285", "0.5076513", "0.5076502", "0.50749743", "0.50732476", "0.5070502", "0.5068473", "0.50623846", "0.5051947", "0.50518423", "0.5048956", "0.50443375", "0.50397813", "0.50382996", "0.5023878", "0.50191444" ]
0.5144626
66
get the code unit that starts at the given address.
public CodeUnit getCodeUnitAt(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeUnit getCodeUnitContaining(Address addr);", "public CodeUnit getCodeUnitBefore(Address addr);", "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "public CodeUnit getCodeUnitAfter(Address addr);", "public CodeUnit getDefinedCodeUnitAfter(Address addr);", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public Instruction getInstructionContaining(Address addr);", "SimpleString getPrefix(SimpleString address);", "public static String getStart(String town){\n\t\treturn Character.toString(town.charAt(0));\n\t}", "private SimInstruction getInstruction(Addr address) {\n var inst = decodedInstructions.get(address);\n\n if (inst != null) {\n return inst;\n }\n\n // Try to decode instruction\n var rawInstruction = program.get(address);\n\n // System.out.println(\"INSTRUC: \" + instructions);\n SpecsCheck.checkNotNull(rawInstruction,\n () -> \"No program instruction found at address \" + address.toNumber() + \" (\" +\n address + \")\");\n\n var microCodeInstruction = decoder.decode(rawInstruction, this);\n decodedInstructions.put(address, microCodeInstruction);\n\n return microCodeInstruction;\n }", "String getStartAddress();", "public Instruction getInstructionAt(Address addr);", "public Instruction getInstructionBefore(Address addr);", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "CodePosition getCodePosition();", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public CodePosition getCodePosition ();", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Loc getLoc();", "String getBegin();", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public Function getFunctionContaining(Address addr);", "public Instruction getInstruction(long index){\n\t\tInstruction instruction = null;\n\t\tint effectiveAddress = (int) (index-Constants.START_ADDRESS);\n\t\tif(effectiveAddress>0)\n\t\t{\n\t\t\teffectiveAddress = effectiveAddress/4;\t\t\t\n\t\t}\n\t\tif(instructions.size()>effectiveAddress)\n\t\t\tinstruction = instructions.get(effectiveAddress);\n\t\treturn instruction;\n\t}", "public Instruction getInstructionAfter(Address addr);", "private int loadProgram(Program program, int start) throws MemoryFault {\n int address = start;\n for (int i : program.getCode()) {\n machine.memory.store(address++, i);\n }\n return address;\n }", "Code getCode();", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "Optional<MemoryAddress> lookup(String name);", "private static int firstPassParse(String line, int offset)\r\n {\r\n String[] tokens = line.split(\"[\\\\s,]+\");\r\n\r\n if(tokens.length <= 0)\r\n {\r\n return offset;\r\n }\r\n \r\n if(!isOpcode(tokens[0]) && !tokens[0].startsWith(\".\"))\r\n {\r\n int address = beginningAddress + offset;\r\n \r\n if(isHex(tokens[0]))\r\n {\r\n throw new AssemblerException(\"Invalid label on line: \" + line);\r\n }\r\n else\r\n {\r\n symbolTable.put(tokens[0], address);\r\n }\r\n }\r\n\r\n return offset + ADDRESS_OFFSET;\r\n }", "public String getLocationCode() {\n\t\treturn locationCode.get(this.unitID.substring(0, 2));\n\t}", "String getCode();", "String getCode();", "String getCode();", "String getCode();", "String getCode();", "public int getStartPC() {\n\t\treturn startPC & 0xffff;\n\t}", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }", "private String getLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return \"(\" + symbols[key] + \")\";\n }\n return \"\";\n }", "@Test\n public void testAddress()\n {\n System.out.println(\"address\");\n int addr = 16893;\n System.out.println(N2TCode.address(addr));\n System.out.println(Integer.toBinaryString(addr));\n }", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "public Address getStartAddress() {\n\t\treturn baseAddress;\n\t}", "public byte get(int addr) throws ProgramException {\n return getSegment(addr, true).get(addr);\n }", "private String getDeasLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return symbols[key] + \": \";\n }\n return \"\";\n }", "String getMapCode();", "public Unit getUnitAt(Position p);", "org.hl7.fhir.Integer getStart();", "Constant getStartOffsetConstant();", "java.lang.String getCode();", "java.lang.String getCode();", "public com.apatar.cdyne.ws.demographix.PlaceInfo getPlaceIDbyAddress(java.lang.String addressLine1, java.lang.String city, java.lang.String stateAbbrev, java.lang.String zipCode, java.lang.String licenseKey) throws java.rmi.RemoteException;", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "String getAddress(int type);", "public String getCode() {\n return _toBaseUnit._code;\n }", "public int getReturnAddressOffset();", "public int getStart() {\r\n\t\treturn this.offset;\r\n\t}", "public Data getDataContaining(Address addr);", "int getCode();", "int getCode();", "int getCode();", "MasterZipcode getByZipcodeCode(String zipcodeCode);", "public Label\ngetStartLabel();", "public int load(int offset){\n return runStack.load(offset);\n }", "public byte get(int addr) {\n return data[addr - start];\n }", "public Variable getVariableContaining(int offset);", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "public Data getDataBefore(Address addr);", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "public String _get_codebase() {\n org.omg.CORBA.portable.Delegate delegate = _get_delegate();\n if (delegate instanceof Delegate)\n return ((Delegate) delegate).get_codebase(this);\n return null;\n }", "public interface CodeCursor {\n /**\n * Gets the cursor. The cursor is the offset in code units from\n * the start of the input of the next code unit to be read or\n * written, where the input generally consists of the code for a\n * single method.\n */\n public int cursor();\n\n /**\n * Gets the base address associated with the current cursor. This\n * differs from the cursor value when explicitly set (by {@link\n * #setBaseAddress}). This is used, in particular, to convey base\n * addresses to switch data payload instructions, whose relative\n * addresses are relative to the address of a dependant switch\n * instruction.\n */\n public int baseAddressForCursor();\n\n /**\n * Sets the base address for the given target address to be as indicated.\n *\n * @see #baseAddressForCursor\n */\n public void setBaseAddress(int targetAddress, int baseAddress);\n}", "public abstract Address getBootHeapStart();", "public int startOffset();", "private String countryCode(String address) {\n\t\tint j = address.lastIndexOf('.') + 1;\n\t\tString cc = address.substring(j);\n\t\treturn cc.toLowerCase();\n\t}", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "public final int getLine()\n\t{\n\t\treturn address >>> 8 & 0x0F;\n\t}", "Integer getCode();", "String getAddress( String filename, String generator);", "public com.a9.spec.opensearch.x11.QueryType.StartIndex xgetStartIndex()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.StartIndex target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.StartIndex)get_store().find_attribute_user(STARTINDEX$10);\n return target;\n }\n }", "public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}", "String getFirstIndex();", "public char getStart(){\n return start_c;\n }", "public byte getCode();", "private Segment getSegment(int addr, boolean get) throws ProgramException {\n Set<Segment> found = memory.get(addr);\n if (found.isEmpty()) {\n throw new ProgramException(get ? ErrorType.ADDRL : ErrorType.ADDRS);\n }\n return found.iterator().next();\n }", "int getDeclarationSourceStart();", "public ProgramFragment getFragment(String treeName, Address addr);", "LocationModel findLocation(final String code);", "public char consensus_nucleotide (int offset) {\n return current_contig.consensus.sequence.charAt(offset - 1);\r\n }", "public Data getDefinedDataContaining(Address addr);", "GameCode getGameCode(String gameCode);", "protected int getStartAddress() {\r\n return (readByte(RESET_VECTOR) & 0xff) + ((readByte(RESET_VECTOR + 1) & 0xff) << 8);\r\n }", "public void run(Number startAddress) {\n setStartAddress(startAddress);\n\n while (!hasStopped()) {\n // while (true) {\n var instruction = nextInstruction();\n // System.out.println(\"EXEC: \" + instruction.getAddress());\n instruction.execute();\n\n // if (counter > max) {\n // System.out.println(\"BREAKING!\");\n // break;\n // }\n //\n // counter++;\n }\n\n }", "List<Account> findByAddressStartingWith(String startAddress);", "Long getStartAt();", "public int sourceStart()\n\t{\n\t\treturn sourceStart;\n\t}", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "Character getCode();", "public int findCodon(String codon, int geneStart, int startAt)\n {\n return findCodon(codon.split(\"\"), geneStart, startAt);\n }", "int getStartLineNumber();", "public java.lang.String getFromAddress() {\n\t\treturn fromAddress;\n\t}" ]
[ "0.781148", "0.7556192", "0.7423115", "0.72473806", "0.7160237", "0.59112525", "0.58466244", "0.5818443", "0.5773168", "0.57506734", "0.57031393", "0.56168354", "0.5575156", "0.55742335", "0.54734373", "0.54401356", "0.54399496", "0.53027314", "0.52971715", "0.5273124", "0.52407706", "0.52155024", "0.51979697", "0.5109984", "0.50729626", "0.5071675", "0.5038179", "0.5023401", "0.50017196", "0.4990446", "0.49898276", "0.49612927", "0.49612927", "0.49612927", "0.49612927", "0.49612927", "0.49528298", "0.49507743", "0.4931504", "0.49310535", "0.49245775", "0.49229878", "0.49043667", "0.48964262", "0.48877102", "0.4877918", "0.4877234", "0.4860705", "0.48500237", "0.48482242", "0.48482242", "0.48274472", "0.48248112", "0.4801352", "0.4800911", "0.47989053", "0.479611", "0.47846127", "0.47754347", "0.47754347", "0.47754347", "0.47560358", "0.47517604", "0.4747915", "0.47458854", "0.47334307", "0.47330067", "0.47281462", "0.47240078", "0.47124937", "0.47090048", "0.47088903", "0.47012693", "0.46958017", "0.46871924", "0.46720782", "0.46673515", "0.4663585", "0.4660957", "0.46597433", "0.46583828", "0.4651874", "0.46467134", "0.46425766", "0.4642295", "0.46299106", "0.4627382", "0.46252474", "0.4624842", "0.4616588", "0.46123996", "0.46100858", "0.46041664", "0.46023598", "0.45980912", "0.459572", "0.4594721", "0.45936048", "0.4590593", "0.45827147" ]
0.80124456
0
get the code unit that contains the given address.
public CodeUnit getCodeUnitContaining(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeUnit getCodeUnitAt(Address addr);", "public CodeUnit getDefinedCodeUnitAfter(Address addr);", "public CodeUnit getCodeUnitAfter(Address addr);", "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "public CodeUnit getCodeUnitBefore(Address addr);", "private SimInstruction getInstruction(Addr address) {\n var inst = decodedInstructions.get(address);\n\n if (inst != null) {\n return inst;\n }\n\n // Try to decode instruction\n var rawInstruction = program.get(address);\n\n // System.out.println(\"INSTRUC: \" + instructions);\n SpecsCheck.checkNotNull(rawInstruction,\n () -> \"No program instruction found at address \" + address.toNumber() + \" (\" +\n address + \")\");\n\n var microCodeInstruction = decoder.decode(rawInstruction, this);\n decodedInstructions.put(address, microCodeInstruction);\n\n return microCodeInstruction;\n }", "public Instruction getInstructionContaining(Address addr);", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "Optional<MemoryAddress> lookup(String name);", "Code getCode();", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "public String getCode() {\n return _toBaseUnit._code;\n }", "public String getLocationCode() {\n\t\treturn locationCode.get(this.unitID.substring(0, 2));\n\t}", "public Instruction getInstructionAt(Address addr);", "String getCode();", "String getCode();", "String getCode();", "String getCode();", "String getCode();", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "String getAddress(int type);", "java.lang.String getCode();", "java.lang.String getCode();", "public CodePosition getCodePosition ();", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }", "public Function getFunctionContaining(Address addr);", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public org.hl7.fhir.CodeableConcept getCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.CodeableConcept target = null;\n target = (org.hl7.fhir.CodeableConcept)get_store().find_element_user(CODE$6, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "private String getLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return \"(\" + symbols[key] + \")\";\n }\n return \"\";\n }", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Loc getLoc();", "public Data getDataContaining(Address addr);", "CodePosition getCodePosition();", "@Test\n public void testAddress()\n {\n System.out.println(\"address\");\n int addr = 16893;\n System.out.println(N2TCode.address(addr));\n System.out.println(Integer.toBinaryString(addr));\n }", "private String getDeasLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return symbols[key] + \": \";\n }\n return \"\";\n }", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Unit getUnitAt(Position p);", "String getMapCode();", "public byte get(int addr) throws ProgramException {\n return getSegment(addr, true).get(addr);\n }", "private String countryCode(String address) {\n\t\tint j = address.lastIndexOf('.') + 1;\n\t\tString cc = address.substring(j);\n\t\treturn cc.toLowerCase();\n\t}", "public byte getCode();", "GameCode getGameCode(String gameCode);", "Integer getCode();", "public String _get_codebase() {\n org.omg.CORBA.portable.Delegate delegate = _get_delegate();\n if (delegate instanceof Delegate)\n return ((Delegate) delegate).get_codebase(this);\n return null;\n }", "public com.apatar.cdyne.ws.demographix.PlaceInfo getPlaceIDbyAddress(java.lang.String addressLine1, java.lang.String city, java.lang.String stateAbbrev, java.lang.String zipCode, java.lang.String licenseKey) throws java.rmi.RemoteException;", "public Data getDefinedDataContaining(Address addr);", "int getCode();", "int getCode();", "int getCode();", "LocationModel findLocation(final String code);", "public String getCode();", "public String getCode();", "SimpleString getPrefix(SimpleString address);", "AddressI getAddress();", "MasterZipcode getByZipcodeCode(String zipcodeCode);", "long getCodeId();", "long getCodeId();", "long getCodeId();", "public static ST getCodeSystem(final ANY value) {\n\n if (value instanceof CD) {\n final CD cd = (CD) value;\n final ST codesys = cd.codeSystem();\n return codesys;\n } else {\n return null;\n }\n }", "Character getCode();", "public Place getUSStateByCode(String code) {\n return US_STATES.get(code.toUpperCase());\n }", "java.lang.String getCodeName();", "public int getCode();", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public java.lang.String CC_GetLocationSinhala(java.lang.String accountNumber) throws java.rmi.RemoteException;", "public String getLocationCode() {\n return normalizedBic.substring(LOCATION_CODE_INDEX, LOCATION_CODE_INDEX + LOCATION_CODE_LENGTH);\n }", "public abstract String getFullCode();", "public static long getThreadIdFromAddress(Context context, String address) {\r\n \t\tif (address == null)\r\n \t\t\treturn 0;\r\n \r\n \t\tString THREAD_RECIPIENT_QUERY = \"recipient\";\r\n \r\n \t\tUri.Builder uriBuilder = THREAD_ID_CONTENT_URI.buildUpon();\r\n \t\turiBuilder.appendQueryParameter(THREAD_RECIPIENT_QUERY, address);\r\n \r\n \t\tlong threadId = 0;\r\n \r\n \t\tCursor cursor = context.getContentResolver().query(uriBuilder.build(), new String[] { SMS_ID }, null, null,\r\n \t\t\t\tnull);\r\n \t\tif (cursor != null) {\r\n \t\t\ttry {\r\n \t\t\t\tif (cursor.moveToFirst()) {\r\n \t\t\t\t\tthreadId = cursor.getLong(0);\r\n \t\t\t\t}\r\n \t\t\t} finally {\r\n \t\t\t\tcursor.close();\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn threadId;\r\n \t}", "private void getLocationFromAddress(Context context, String address) {\n Geocoder coder = new Geocoder(context);\n List<Address> coderResults;\n\n LatLng result = null;\n try {\n coderResults = coder.getFromLocationName(address, 2);\n if (coderResults == null) {\n Log.d(TAG, \"Failed to convert address to LatLng.\");\n Log.d(TAG, \"Address: \" + address);\n return;\n }\n\n Address location = coderResults.get(0);\n initialiseMap(\n new LatLng(location.getLatitude(), location.getLongitude()),\n address\n );\n } catch (IOException e) {\n //\n }\n }", "@When(\"^I send the request to Address Management API 'GET AddressUnitId' endpoint$\")\n public void getAddressUnitId() {\n RequestSpecBuilder request = (RequestSpecBuilder) scenarioSession.getData(SessionKey.REQUEST);\n\n //send the request and get the response\n Response response = addressManagementApi.getAddressUnitId(request);\n\n //store the response for use in later steps\n scenarioSession.putData(SessionKey.LATEST_RESPONSE, response);\n }", "@Array({21}) \n\t@Field(20) \n\tpublic Pointer<Byte > BusinessUnit() {\n\t\treturn this.io.getPointerField(this, 20);\n\t}", "public Instruction getInstructionAfter(Address addr);", "public byte get(int address) {\n try {\n return direct_read(address);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "int getCodeValue();", "public static ILookupProfile getLookupItem(String className, String code) {\r\n\t\tif (code == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// Instantiate a ServiceLocator instance.\r\n\t\tServiceLocator svcLocator = ServiceLocator.getInstance();\r\n\r\n\t\t// Get an instance of lookup facade from service locator.\r\n\t\tLookupFacade lookupFacade = (LookupFacade) svcLocator.getBean(\"lookupFacade\");\r\n\r\n\t\t// Retrieve the result by calling the lookupfacade's lookup list.\r\n\t\tLookupFacadeResult lookupResult = lookupFacade.getLookupList(className);\r\n\t\tList<ILookupProfile> lookupItemList = lookupResult.getLookupList();\r\n\t\tfor (ILookupProfile lookupItem : lookupItemList) {\r\n\t\t\tif (code.equalsIgnoreCase(lookupItem.getCode())) {\r\n\t\t\t\treturn lookupItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public long getCode () {\r\n\t\treturn code;\r\n\t}", "public static RegisterModuleType codeOf(Object code) {\n if (code == null) { return null; }\n if (code instanceof RegisterModuleType) { return (RegisterModuleType)code; }\n return _codeValueMap.get(code.toString().toLowerCase());\n }", "long getAddress(ByteBuffer buffer);", "public static ST getCode(final ANY value) {\n\n if (value instanceof CD) {\n final CD cd = (CD) value;\n final ST code = cd.code();\n return code;\n } else {\n return null;\n }\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "public net.opengis.xls.GeocodingQOSType getGeocodeMatchCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n net.opengis.xls.GeocodingQOSType target = null;\n target = (net.opengis.xls.GeocodingQOSType)get_store().find_element_user(GEOCODEMATCHCODE$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public AccountInterface getAccount(String _address) {\n\t\tfor (AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(_address))\n\t\t\t\treturn account;\n\t\t}\n\t\treturn null;\t\t\n\t}", "public Map getLocationByAddress(String address) throws Exception {\n\t\tfinal HttpHeaders header = new HttpHeaders();\n\t\theader.add(\"Authorization\", \"KakaoAK \" + apiKey);\n\n\t\tfinal Map<String, Object> param = new HashMap<>();\n\t\tparam.put(\"address\", address);\n\t\tfinal ResponseEntity<String> response = restTemplate.exchange(locationByAddressBuildUrl(param), HttpMethod.GET, new HttpEntity(header), String.class);\n\t\tlogger.debug(\"response: {}\",response);\n\n\t\treturn getLocationMap(response.getBody());\n\t}", "public Data getDataAt(Address addr);", "public Nationality findByCode(String code) {\r\n EntityManager entityManager = getEntityManager(); \r\n \r\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\r\n CriteriaQuery<Nationality> criteria = criteriaBuilder.createQuery(Nationality.class);\r\n Root<Nationality> root = criteria.from(Nationality.class);\r\n criteria.select(root);\r\n criteria.where(\r\n criteriaBuilder.equal(root.get(Nationality_.code), code)\r\n );\r\n \r\n return getSingleResult(entityManager.createQuery(criteria));\r\n }", "String getAddress();", "String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "public byte get(int addr) {\n return data[addr - start];\n }", "public java.lang.String getSwiftCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SWIFTCODE$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public long getCode() {\n return code;\n }", "public String getCodeByGlbmcode(String tab, String strvalue) {\n\t\tif (allcode.isEmpty()) {\r\n\t\t\tinit();\r\n\t\t}\r\n\r\n\t\tList list = (List) allcode.get(tab.toUpperCase());\r\n\t\tString result = \"\";\r\n\t\tCode code = new Code();\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tcode = (Code) list.get(i);\r\n\t\t\tString glbmcode = code.getGlbmcode();\r\n\t\t\tif (glbmcode.equals(strvalue)) {\r\n\t\t\t\tresult = code.getCode();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static Service retrieve(String code) {\n \treturn find.ref(code); \n }" ]
[ "0.86251", "0.7461995", "0.74513894", "0.709205", "0.7088478", "0.6275304", "0.58358014", "0.5634228", "0.5591616", "0.55771184", "0.5473292", "0.546267", "0.54598725", "0.54459864", "0.53786534", "0.53786534", "0.53786534", "0.53786534", "0.53786534", "0.5377261", "0.53586215", "0.5356198", "0.5356198", "0.53305453", "0.5295086", "0.52821416", "0.5278541", "0.5239075", "0.52239436", "0.5222898", "0.52120477", "0.5204307", "0.52040637", "0.52024215", "0.51921123", "0.5188055", "0.5175981", "0.5171609", "0.5153156", "0.5130034", "0.51297396", "0.51289225", "0.5107617", "0.50872785", "0.50793207", "0.5048267", "0.5019115", "0.5019115", "0.5019115", "0.49796215", "0.49752522", "0.49752522", "0.4973794", "0.49584812", "0.49490246", "0.49188307", "0.49188307", "0.49188307", "0.48970854", "0.4895309", "0.48927534", "0.48770928", "0.48739475", "0.4868415", "0.48410365", "0.48243615", "0.48209783", "0.48193604", "0.4800556", "0.4793653", "0.4784825", "0.47827697", "0.47822925", "0.4780418", "0.47622192", "0.4758998", "0.47449163", "0.47392306", "0.4734498", "0.47342372", "0.47277942", "0.47243494", "0.47097874", "0.47090417", "0.47090247", "0.46998242", "0.4694983", "0.46906692", "0.46906692", "0.46845603", "0.46845603", "0.46845603", "0.46845603", "0.46845603", "0.46845603", "0.46749562", "0.46710548", "0.46683532", "0.466415", "0.4659859" ]
0.84495956
1
get the next code unit that starts an an address that is greater than the given address. The search will include instructions, defined data, and undefined data.
public CodeUnit getCodeUnitAfter(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public CodeUnit getDefinedCodeUnitAfter(Address addr);", "public CodeUnit getCodeUnitBefore(Address addr);", "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "public CodeUnit getCodeUnitContaining(Address addr);", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "public Instruction getInstructionAfter(Address addr);", "public CodeUnit getCodeUnitAt(Address addr);", "public Instruction getInstructionContaining(Address addr);", "public long getNextBlock(long address){\n int marker = readMarkerLowerBits(address - 1);\n int blocksize;\n if(marker == 0){\n blocksize = readLengthField(address, 1);\n return address + blocksize + 1;\n } else if(marker == 15){\n return address + 1;\n } else {\n if (isBlockUsed(address)) marker -= 8;\n blocksize = readLengthField(address, marker);\n if (isBlockUsed(address)) {\n return address + blocksize + 2 * (marker - 8) + 1;\n }\n return address + blocksize + 1;\n }\n }", "public Instruction getInstructionBefore(Address addr);", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public Data getDataAfter(Address addr);", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "static int findraslot(Memory mem, int addr) {\r\n\t\t// afbf0020 sw [sp +32] = ra\r\n\t\tfor (int n = 0; n < 8; n++) {\r\n\t\t\tint isn = mem.load_word(addr + (n * 4));\r\n\t\t\tif ((isn & 0xffff0000) == 0xafbf0000) {\r\n\t\t\t\tshort imm = (short) isn;\r\n\t\t\t\treturn imm;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "private String getLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return \"(\" + symbols[key] + \")\";\n }\n return \"\";\n }", "public Data getDefinedDataAfter(Address addr);", "Optional<MemoryAddress> lookup(String name);", "private int findBlock(long addr) {\n\t\t// find cache by splitting addr into multiple segs\n\t\tint setIndex = (int) ((addr & 0x7FC0) >>> 6);\n\t\tlong tag = (addr & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t// search for the set to check for existence\n\t\tfor (int j = 0; j < 8; j++) {\n\t\t\tif (cache[setIndex][j] == tag) {\n\t\t\t\tpolicies[setIndex].updateAt(j);\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t}\n\t\tif(usePrefetch){\n\t\t\t//fetch from memory; preftecher will fetch many other relevant addresses\n\t\t\tArrayList<Long> address = pf.getPrefetchedAddress(addr);\n\t\t\tfor(long add : address) {\n\t\t\t\tsetIndex = (int) ((add & 0x7FC0) >>> 6);\n\t\t\t\ttag = (add & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\t\tcache[setIndex][index] = tag;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\tcache[setIndex][index] = tag;\n\t\t}\n\t\t// after all, we need to update the entry\n\t\treturn 4;\n\t}", "private String getDeasLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return symbols[key] + \": \";\n }\n return \"\";\n }", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "private void getNextInSet() throws CancelledException {\n\t\t// find next address that has a valid block;\n\t\tAddress addr = getNextAddress(nextAddr);\n\n\t\t// if the instruction's start address is in our set\n\t\t// then we have our block\n\t\tif (addr != null && addrSet.contains(addr)) {\n\t\t\tnextBlock = model.getCodeBlockAt(addr, monitor);\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// otherwise we're out of our current address range in\n\t\t// our address range set so we find the next address range\n\t\t// with a min address >= the instructions address and\n\t\t// look for a block there\n\t\t//nextAddr = instr.getMaxAddress();\n\t\twhile (rangeIter.hasNext()) {\n\t\t\tAddressRange range = rangeIter.next();\n\n\t\t\tif (nextAddr.compareTo(range.getMinAddress()) >= 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnextBlock = getFirstInRange(range);\n\t\t\t// if we find a block we're done\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if we find no block then there's no block in the\n\t\t\t// current range and we can move on to the next one\n\t\t}\n\t\tnextBlock = null;\n\t}", "public Data getDataBefore(Address addr);", "protected static int advanceUntil(CharBuffer array, int pos, int length, char min) {\n int lower = pos + 1;\n\n // special handling for a possibly common sequential case\n if (lower >= length || (array.get(lower)) >= (min)) {\n return lower;\n }\n\n int spansize = 1; // could set larger\n // bootstrap an upper limit\n\n while (lower + spansize < length\n && (array.get(lower + spansize)) < (min)) {\n spansize *= 2; // hoping for compiler will reduce to\n }\n // shift\n int upper = (lower + spansize < length) ? lower + spansize : length - 1;\n\n // maybe we are lucky (could be common case when the seek ahead\n // expected\n // to be small and sequential will otherwise make us look bad)\n if (array.get(upper) == min) {\n return upper;\n }\n\n if ((array.get(upper)) < (min)) {// means\n // array\n // has no\n // item\n // >= min\n // pos = array.length;\n return length;\n }\n\n // we know that the next-smallest span was too small\n lower += (spansize >>> 1);\n\n // else begin binary search\n // invariant: array[lower]<min && array[upper]>min\n while (lower + 1 != upper) {\n int mid = (lower + upper) >>> 1;\n char arraymid = array.get(mid);\n if (arraymid == min) {\n return mid;\n } else if ((arraymid) < (min)) {\n lower = mid;\n } else {\n upper = mid;\n }\n }\n return upper;\n\n }", "public Instruction getInstructionAt(Address addr);", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}", "public Data getDefinedDataBefore(Address addr);", "void findNextGreaterOnRight(int a[]) {\n\t\tStack<Integer> stack = new Stack<>();\n\t\tstack.push(a[0]);\n\t\tfor(int i = 1; i < a.length; i++) {\n\t\t\twhile(stack.size() > 0 && a[i] > stack.peek()) {\n\t\t\t\tSystem.out.println(stack.pop() + \" -> \" + a[i]);\n\t\t\t}\n\t\t\tstack.push(a[i]);\n\t\t}\n\t\twhile(stack.size() != 0) {\n\t\t\tSystem.out.println(stack.pop() + \" -> -1\");\n\t\t}\n\t}", "public Function getFunctionContaining(Address addr);", "private int getWakeupSrcIndex(java.lang.String r8) {\n /*\n r7 = this;\n int r0 = r8.hashCode()\n r1 = 5\n r2 = 4\n r3 = 3\n r4 = 2\n r5 = 1\n r6 = -1\n switch(r0) {\n case -952838356: goto L_0x004d;\n case -392237989: goto L_0x0043;\n case -190005216: goto L_0x0038;\n case -135250500: goto L_0x002e;\n case 692591870: goto L_0x0024;\n case 693992349: goto L_0x0019;\n case 1315079558: goto L_0x000e;\n default: goto L_0x000d;\n }\n L_0x000d:\n goto L_0x0058\n L_0x000e:\n java.lang.String r0 = \"keyguard_screenon_notification\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = r4\n goto L_0x0059\n L_0x0019:\n java.lang.String r0 = \"lid switch open\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = 6\n goto L_0x0059\n L_0x0024:\n java.lang.String r0 = \"android.policy:LID\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = r1\n goto L_0x0059\n L_0x002e:\n java.lang.String r0 = \"android.policy:POWER\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = 0\n goto L_0x0059\n L_0x0038:\n java.lang.String r0 = \"miui.policy:FINGERPRINT_DPAD_CENTER\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = r5\n goto L_0x0059\n L_0x0043:\n java.lang.String r0 = \"android.policy:FINGERPRINT\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = r2\n goto L_0x0059\n L_0x004d:\n java.lang.String r0 = \"keyguard_screenon_finger_pass\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = r3\n goto L_0x0059\n L_0x0058:\n r0 = r6\n L_0x0059:\n switch(r0) {\n case 0: goto L_0x0061;\n case 1: goto L_0x0060;\n case 2: goto L_0x005f;\n case 3: goto L_0x005e;\n case 4: goto L_0x005e;\n case 5: goto L_0x005d;\n case 6: goto L_0x005d;\n default: goto L_0x005c;\n }\n L_0x005c:\n return r6\n L_0x005d:\n return r1\n L_0x005e:\n return r2\n L_0x005f:\n return r3\n L_0x0060:\n return r4\n L_0x0061:\n return r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.server.ScreenOnMonitor.getWakeupSrcIndex(java.lang.String):int\");\n }", "public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }", "private int getOperandAddress(final CPU6502Instruction instruction) {\r\n // switch address mode\r\n switch (instruction.addressMode) {\r\n case CPU6502Instruction.ZERO:\r\n return this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n case CPU6502Instruction.ZERO_X:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n case CPU6502Instruction.ZERO_Y:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.y) & 0xff;\r\n case CPU6502Instruction.INDIRECT: {\r\n final int lowAddress = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n final int highAddress = (this.memory[this.currentInstructionAddress + 2] & 0xff) << 8;\r\n\r\n return (readByte(highAddress + lowAddress) & 0xff) + ((readByte(highAddress + ((lowAddress + 1) & 0xff)) & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_X: {\r\n final int p = ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n\r\n return (this.memory[p] & 0xff) + ((this.memory[(p + 1) & 0xff] & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_Y: {\r\n // this is the address on the zero page where we read from\r\n final int p = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n\r\n // if over page boundary then do another access => one more cycle\r\n final int lowAddress = (this.memory[p] & 0xff) + this.y;\r\n\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[(p + 1) & 0xff] & 0xff) << 8)) & 0xffff;\r\n }\r\n case CPU6502Instruction.RELATIVE: {\r\n // calculate relative address\r\n final int address = this.memory[this.currentInstructionAddress + 1] + this.pc;\r\n\r\n // add two cycles if crossing page boundary, otherwise one\r\n this.cycles += ((this.pc) & 0xff00) != (address & 0xff00) ? 2 : 1;\r\n return address;\r\n }\r\n case CPU6502Instruction.ABSOLUTE:\r\n return (this.memory[this.currentInstructionAddress + 1] & 0xff) + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8);\r\n case CPU6502Instruction.ABSOLUTE_X:\r\n case CPU6502Instruction.ABSOLUTE_Y: {\r\n // read low-byte of the address\r\n final int lowAddress = (this.memory[this.currentInstructionAddress + 1] & 0xff) + (instruction.addressMode == CPU6502Instruction.ABSOLUTE_Y ? this.y : this.x);\r\n\r\n // if over page boundary then do another access => one more cycle\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8)) & 0xffff;\r\n }\r\n\r\n default:\r\n throw new RuntimeException(\"Illegal address mode for instruction \" + instruction.toString() + \" ($\" + Integer.toHexString(instruction.opCode) + \")\");\r\n }\r\n }", "private void findNewNextInStack() {\n if (stack.empty()) {\n next = Chunk.NONE;\n return;\n }\n next = stack.pop();\n long valueReference = INVALID_VALUE_REFERENCE;\n if (next != Chunk.NONE) {\n valueReference = getEntryFieldLong(next, OFFSET.VALUE_REFERENCE);\n }\n while (next != Chunk.NONE && valueReference == INVALID_VALUE_REFERENCE) {\n if (!stack.empty()) {\n next = stack.pop();\n if (next != Chunk.NONE) {\n valueReference = getEntryFieldLong(next, OFFSET.VALUE_REFERENCE);\n }\n } else {\n next = Chunk.NONE;\n return;\n }\n }\n }", "static int findframesize(Memory mem, int addr) {\r\n\t\t// 27bdffc0 addiu sp = sp * -64\r\n\t\tfor (int n = 0; n < 8; n++) {\r\n\t\t\tint isn = mem.load_word(addr + (n * 4));\r\n\t\t\tif ((isn & 0xffff0000) == 0x27bd0000) {\r\n\t\t\t\tshort imm = (short) -isn;\r\n\t\t\t\treturn imm;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// happens for hlt\r\n\t\t//opt.println(\"address but no frame for %s\", f);\r\n\t\treturn -1;\r\n\t}", "public int read(int address){\n switch (address){\r\n /*\r\n case 0: {\r\n return registers_w[CONTROL_REGISTER_1];\r\n }\r\n\r\n case 3: {\r\n return spriteMemoryCounter;\r\n }\r\n case 5:{\r\n return registers_w[SCROLL_OFFSET];\r\n }\r\n case 6:{\r\n return horizontalTileCounter | (verticalTileCounter << 5) | (horizontalNameCounter << 10) | (verticalNameCounter << 11);\r\n }\r\n */\r\n\t\t\tcase 0: {\r\n\t\t\t\t\t\treturn scanLine;\r\n\t\t\t\t\t\t// hack\r\n\t\t\t}\r\n case 1: {\r\n return registers_w[CONTROL_REGISTER_2];\r\n }\r\n case STATUS_REGISTER:{ // 2\r\n int returnVal = registers_r[STATUS_REGISTER];\r\n registers_r[STATUS_REGISTER] = getBitsUnset(registers_r[STATUS_REGISTER], STATUS_VBLANK); //| STATUS_SPRITE0_HIT);\r\n isFirstWriteToScroll = true;\r\n lastPPUAddressWasHigh = false;\r\n //logger.info(\"Status is: \" + Integer.toHexString(returnVal));\r\n return returnVal;\r\n }\r\n case SPRITE_MEMORY_DATA:{ // 4\r\n return readFromSpriteMemory();\r\n }\r\n case PPU_MEMORY_DATA:{ // 7\r\n int returnVal = 0xFF & registers_r[PPU_MEMORY_DATA]; // buffered read\r\n \r\n //int returnVal = 0xFF & memory.read(ppuMemoryAddress);\r\n\t\t\tint readAddress = horizontalTileCounter \r\n\t\t\t\t\t\t\t\t| (verticalTileCounter << 5)\r\n\t\t\t\t\t\t\t\t| (horizontalNameCounter << 10)\r\n\t\t\t\t\t\t\t\t| (verticalNameCounter << 11)\r\n\t\t\t\t\t\t\t\t| ((fineVerticalCounter & 0x3) << 12);\r\n\r\n\t\t\tif (readAddress == 0x3F10 || readAddress == 0x3F14 || readAddress == 0x3F18 || readAddress == 0x3F1C) {\r\n\t\t\t\treadAddress = readAddress & 0x3F0F;\r\n\t\t\t}\r\n registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(readAddress);\r\n // registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(ppuMemoryAddress);\r\n incrementCounters();\r\n /*\r\n if ((registers_w[CONTROL_REGISTER_1] & CR1_VERTICAL_WRITE) == 0){\r\n ppuMemoryAddress++;\r\n }\r\n else {\r\n ppuMemoryAddress = (ppuMemoryAddress + 32);\r\n }\r\n */\r\n return returnVal;\r\n }\r\n\r\n default: throw new RuntimeException(\"Invalid read attempt: \" + Integer.toHexString(address));\r\n }\r\n }", "private void nextCode(int code) {\n int r1;\n int r2;\n int r3;\n int label;\n char c;\n String s;\n int constant;\n int length;\n\n // Each case corresponds to a different instruction\n switch (code) {\n case 0:\n break;\n case 1:\n // 1: Clears the contents of r1\n r1 = checkRegister(memory[++pc]);\n register[r1] = 0;\n break;\n case 2:\n // 2: Clears the memory location specified by r1\n r1 = checkRegister(memory[++pc]);\n int memLoc = register[r1];\n checkMemLocation(memLoc);\n memory[memLoc] = 0;\n break;\n case 3:\n // 3: Clears the memory location specified by label\n label = checkMemLocation(memory[++pc]);\n memory[label] = 0;\n break;\n case 4:\n // 4: Clear a block of memory. The starting location is specified by r1, the count is in r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n checkMemLocation(register[1] + register[r2] - 1);\n for (int i = register[r1]; i < register[r2]; i++) {\n memory[i] = 0;\n }\n break;\n case 5:\n // 5: Move the specified constant to register r1\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] = constant;\n break;\n case 6:\n // 6: Move the contents of register r1 to r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] = register[r1];\n break;\n case 7:\n // 7: Move the contents of register r1 to the memory location specified by label;\n r1 = checkRegister(memory[++pc]);\n label = checkMemLocation(memory[++pc]);\n memory[label] = register[r1];\n break;\n case 8:\n // 8: Move the contents of memory location label to register r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] = memory[label];\n break;\n case 9:\n // 9: Move the memory location specified by r1 to r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] = memory[register[r1]];\n break;\n case 10:\n // 10: Move the address of label to register r1\n\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] = label;\n break;\n case 11:\n // 11: Move a block of memory. The source is specified by r1, the destination by r2, the count is in r3\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n r3 = checkRegister(memory[++pc]);\n // check mem locations of first and last elements to be copied\n checkMemLocation(register[r1]);\n checkMemLocation(register[1] + register[r3] - 1);\n int toMove[] = new int[register[r3]];\n int movIndex = 0;\n for (int i = register[r1]; i < toMove.length; i++) {\n toMove[movIndex] = memory[i];\n movIndex++;\n }\n movIndex = 0;\n for (int i = register[r2]; i < toMove.length; i++) {\n memory[i] = toMove[movIndex];\n movIndex++;\n }\n break;\n case 12:\n // 12: add constant 123 to r1\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] += constant;\n\n break;\n case 13:\n // 13: Add the contents of register r1 to r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] += register[r1];\n break;\n case 14:\n // 14: Add the contents of memory location label to r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] += memory[label];\n break;\n case 15:\n // 15: Add the contents of the memory location specified by r1 to r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n register[r2] += memory[register[r1]];\n break;\n case 16:\n // 16: Subtract the constant 123 from r1;\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] -= constant;\n break;\n case 17:\n // 17: Subtract the contents of register r1 from r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] -= register[r1];\n break;\n case 18:\n // 18: Subtract the contents of memory location label from r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] -= memory[label];\n break;\n case 19:\n // 19: Subtract the contents of the memory location specified by r1 from r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n register[r2] -= memory[register[r1]];\n break;\n case 20:\n // 20: Multiply the constant 123 into r1;\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] *= constant;\n break;\n case 21:\n // 21: Multiply the contents of register r1 into r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] *= register[r1];\n break;\n case 22:\n // 22: Multiply the contents of memory location label into r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] *= memory[label];\n break;\n case 23:\n // 23: Multiply the contents of the memory location specified by r1 into r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n register[r2] *= memory[register[r1]];\n break;\n case 24:\n // 24: Divide the constant 123 into r1;\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] /= constant;\n break;\n case 25:\n // 25: Divide the contents of register r1 into r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] /= register[r1];\n break;\n case 26:\n // 26: Divide the contents of memory location label into r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] /= memory[label];\n break;\n case 27:\n // 27: Divide the contents of the memory location specified by r1 into r2\n\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n register[r2] /= memory[register[r1]];\n break;\n case 28:\n // 28: Jump to memory location label\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n break;\n case 29:\n // 29: Subtract one from register r1. Jump to label if result is 0\n r1 = checkRegister(memory[++pc]);\n register[r1]--;\n if (register[r1] == 0) {\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 30:\n // 30: Subtract one from register r1. Jump to label if result is not equal 0\n r1 = checkRegister(memory[++pc]);\n register[r1]--;\n if (register[r1] != 0) {\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 31:\n // 31: Add one to register r1. Jump to label if result is 0\n r1 = checkRegister(memory[++pc]);\n register[r1]++;\n if (register[r1] == 0) {\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 32:\n // 32: Add one to register r1. Jump to label if result is not equal 0\n r1 = checkRegister(memory[++pc]);\n register[r1]++;\n if (register[r1] != 0) {\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 33:\n // 33: Compares constant to r1. Set status flags\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n compareRegister = constant - register[r1];\n break;\n case 34:\n // 34: Compares r1 to r2. Set status flags\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n compareRegister = register[r1] - register[r2];\n break;\n case 35:\n // 35: Compares memory location label to r1. Set status flags\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n compareRegister = memory[label] - register[r1];\n break;\n case 36:\n // 36: Jump to label if last compare was negative\n label = checkMemLocation(memory[++pc]);\n if (compareRegister < 0) {\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 37:\n // 37: Jump to label if last compare was zero\n label = checkMemLocation(memory[++pc]);\n if (compareRegister == 0) {\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 38:\n // 38: Jump to label if last compare was positive\n label = checkMemLocation(memory[++pc]);\n if (compareRegister > 0) {\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 39:\n // 39: Jump to subroutine label. The contents of registers r5 - r9 are pushed onto the stack\n label = checkMemLocation(memory[++pc]);\n for (int i = 5; i <= 9; i++) {\n stack.push(register[i]);\n }\n stack.push(pc);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n break;\n case 40:\n // 40: return from subroutine. The contents of registers r5 - r9 are popped from the stack\n pc = stack.pop();\n for (int i = 9; i >= 5; i--) {\n register[i] = stack.pop();\n }\n break;\n case 41:\n // 41: Push r1 onto the stack\n r1 = checkRegister(memory[++pc]);\n stack.push(register[r1]);\n break;\n case 42:\n // 42: Pop the stack onto r1\n r1 = checkRegister(memory[++pc]);\n register[r1] = stack.pop();\n break;\n case 43:\n // 43: Puts stack condition into register r1. 0 - Okay, 1 - Full, 2 - Empty\n if (stack.isEmpty()) {\n stackRegister = STACK_EMPTY;\n } else if (stack.isFull()) {\n stackRegister = STACK_FULL;\n } else {\n stackRegister = STACK_OK;\n }\n r1 = checkRegister(memory[++pc]);\n register[r1] = stackRegister;\n break;\n case 44:\n // 44: Output the character 123 to the console\n c = (char) memory[++pc];\n print(\"\" + c);\n break;\n case 45:\n // 45: Output the character in r1 to the console\n r1 = checkRegister(memory[++pc]);\n c = (char) register[r1];\n print(\"\" + c);\n break;\n case 46:\n // 46: Output the character whose memory location is indicated by r1 to the console\n r1 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n c = (char) memory[register[r1]];\n print(\"\" + c);\n break;\n case 47:\n // 47: Output a block of characters. The starts is indicated by r1, the count by r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n checkMemLocation(register[r1] + register[r2] - 1);\n length = register[r2];\n s = \"\";\n for (int i = register[r1]; i < length; i++) {\n s += (char) memory[i];\n }\n print(s);\n break;\n case 48:\n // 48: read an integer from the console to r1, error code in r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n try {\n register[r1] = nextInt();\n register[r2] = NO_SCAN_ERROR_FOUND;\n } catch (InputMismatchException e) {\n register[r2] = SCAN_ERROR_FOUND;\n }\n break;\n case 49:\n // 49: Print the integer in r1 to the console\n r1 = checkRegister(memory[++pc]);\n print(\"\" + register[r1]);\n break;\n case 50:\n // 50: Read a character from console to r1;\n r1 = checkRegister(memory[++pc]);\n register[r1] = next().charAt(0);\n break;\n case 51:\n // 51: Read a line of text to the memory location starting at label. The count is placed in r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n s = nextLine();\n checkMemLocation(label + s.length() - 1);\n for (int i = 0; i < s.length(); i++) {\n memory[label] = s.charAt(i);\n label++;\n }\n register[r1] = s.length();\n break;\n case 52:\n // 52: Break into debugger\n debug();\n break;\n case 53:\n // 53: Move the contents of register r1 into the memory location specified by r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r2]);\n memory[register[r2]] = register[r1];\n break;\n case 54:\n // 54: Move the contents of the memory location specified by r1\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n checkMemLocation(register[r2]);\n memory[register[r2]] = memory[register[r1]];\n break;\n case 55:\n // 55: Output a string stored in label\n label = checkMemLocation(memory[++pc]);\n length = memory[label];\n s = \"\";\n for (int i = 1; i < length + 1; i++) {\n s += (char) memory[label + i];\n }\n print(s);\n break;\n case 56:\n\n // nop: No operation. Does nothing\n break;\n case 57:\n // 57: jump if compare was not equal\n label = checkMemLocation(memory[++pc]);\n if (compareRegister != 0) {\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n }\n }", "public PlanNode findAtOrBelow( Type typeToFind ) {\n return findAtOrBelow(EnumSet.of(typeToFind));\n }", "private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }", "public int findMemory( int size )\n {\n // represents the smallest available freeBlock within out freeBlock list\n // that will accommodate the size of the entry.\n int smallestFreeBlock = poolSize + 1;\n int position = -1;\n freeBlockList.moveToStart();\n freeBlockList.next();\n while ( !freeBlockList.isAtEnd() )\n {\n Object[] keyArray =\n freeBlockList.getCurrentElement().keySet().toArray();\n Integer key = (Integer)keyArray[0];\n\n if ( ( freeBlockList.getCurrentElement().get( key ) < smallestFreeBlock )\n && ( freeBlockList.getCurrentElement().get( key ) >= size ) )\n {\n position = key;\n smallestFreeBlock = freeBlockList.getCurrentElement().get( key );\n }\n freeBlockList.next();\n }\n\n return position;\n\n }", "static int check_for_label(String instruction){\n\t\tif(instruction.length()<=4)//For memory values\n\t\t\treturn 0;\n\t\tString first_code = instruction.split(\" \")[0];\n\t\tint len = -1;\n\t\tfor(int i=0;i<possible_codes.length;i++)\n\t\t\tif(possible_codes[i].equals(first_code))\n\t\t\t\tlen = 0;\n\t\tif(len!=0){\n\t\t\tlabels.put(first_code,address);\n\t\t\tlen = first_code.length()+1;\n\t\t}\n\t\treturn len;\n\t}", "public long get_next_index(long number) {\n return ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].getLong((int) (number * POINTER_LENGTH % ptr_parts_size[0] + 13));\n }", "TrackingToken lowerBound();", "private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }", "TrackingToken upperBound();", "private Addr nextPC() {\n if (inDelaySlotQueue()) {\n // Next address\n return currentAddr.inc();\n }\n\n // If there is a jump scheduled, return it\n if (jump != null) {\n var jumpAddr = jump;\n jump = null;\n return jumpAddr;\n }\n\n // Next address\n return currentAddr.inc();\n }", "public Data getDefinedDataContaining(Address addr);", "public Boolean boundaryCheck(int addr) {\r\n\t\t// Make sure address is less than LIMIT and SP, and greater than base\r\n\t\tif (addr < getLIM() && addr < getSP() && addr >= getBASE()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tm_TH.interruptIllegalMemoryAccess(addr);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public Data getDataContaining(Address addr);", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Criteria andAddressGreaterThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"address > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "private static int firstPassParse(String line, int offset)\r\n {\r\n String[] tokens = line.split(\"[\\\\s,]+\");\r\n\r\n if(tokens.length <= 0)\r\n {\r\n return offset;\r\n }\r\n \r\n if(!isOpcode(tokens[0]) && !tokens[0].startsWith(\".\"))\r\n {\r\n int address = beginningAddress + offset;\r\n \r\n if(isHex(tokens[0]))\r\n {\r\n throw new AssemblerException(\"Invalid label on line: \" + line);\r\n }\r\n else\r\n {\r\n symbolTable.put(tokens[0], address);\r\n }\r\n }\r\n\r\n return offset + ADDRESS_OFFSET;\r\n }", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\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\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "private static boolean above_limit(String a)\n {\n int sum = 0;\n for(int x = 0; x < a.length(); x++)\n {\n sum += (find_cost(\"\"+a.charAt(x)));\n }\n if(sum >= library.return_capacity() || sum <= library.return_lowercost())\n return false;\n return true;\n }", "public int rva2offset(Address address) {\n\t\tint offset = -1;\n\t\tfor(IMAGE_SECTION_HEADER section:peFileSections) {\n\t\t\tif(address.getAddr32() >= section.getVirtualAddress()\n\t\t\t&& address.getAddr32() < section.getVirtualAddress() + section.getVirtualSize()) {\n\t\t\t\toffset = address.getAddr32() - section.getVirtualAddress() + section.getPointerToRawData();\n\t\t\t\treturn offset;\n\t\t\t}\n\t\t}\n\t\tif(address.getAddr32() < peOptionalHeader.getSizeOfHeaders())\n\t\t\treturn address.getAddr32();\n\t\treturn offset;\n\t}", "public static int offset_offset_cmp() {\n return (168 / 8);\n }", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "public boolean containsAddress(String address) {\n\t\treturn tseqnums.containsKey(address);\n\t}", "public PlanNode findAtOrBelow( Traversal order,\n Type typeToFind ) {\n return findAtOrBelow(order, EnumSet.of(typeToFind));\n }", "public int hitOrMiss(String addressTag){\n\t\tif(blocks[0].getHexTag() == null)\n\t\t\treturn -1;\n\t\tfor(i = 0; i < blocksPerSet; i++){\n\t\t\tif(blocks[i].getValid() == false)\n\t\t\t\t\treturn -1;\n\t\t\tif((blocks[i].getHexTag()).equals(addressTag))\n\t\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}", "private SimInstruction getInstruction(Addr address) {\n var inst = decodedInstructions.get(address);\n\n if (inst != null) {\n return inst;\n }\n\n // Try to decode instruction\n var rawInstruction = program.get(address);\n\n // System.out.println(\"INSTRUC: \" + instructions);\n SpecsCheck.checkNotNull(rawInstruction,\n () -> \"No program instruction found at address \" + address.toNumber() + \" (\" +\n address + \")\");\n\n var microCodeInstruction = decoder.decode(rawInstruction, this);\n decodedInstructions.put(address, microCodeInstruction);\n\n return microCodeInstruction;\n }", "public static int backwardScanBit(long map, int start)\n {\n if ( start >= 0 )\n {\n start = Math.min(start, 63);\n long bit = 1L << start;\n\n for (int i = start; i >= 0; i--, bit >>= 1)\n {\n if ((map & bit) != 0) return i;\n }\n }\n return -1;\n }", "public Integer getNextHopAddress(Integer LL3PNetworknumber) {\n\t\tIterator<RouteTableEntry> tableIterator=table.iterator();\n\t\tRouteTableEntry tmp=null;\n\t\t//boolean found=false;\n\t\tInteger nextHop=null;\n\t\twhile(tableIterator.hasNext()){\n\t\t\ttmp=tableIterator.next();\n\t\t\tif (tmp.getNetworkDistancePair().getNetworkNumber().equals(LL3PNetworknumber)){\n\t\t\t\tnextHop=tmp.getNextHOP();\n\t\t\t}\n\t\t}\n\t\treturn nextHop;\n\t }", "public PlanNode findAtOrBelow( Set<Type> typesToFind ) {\n return findAtOrBelow(Traversal.PRE_ORDER, typesToFind);\n }", "private int checkMemLocation(int location) {\n if (location < memory.length && location >= 0) {\n return location;\n }\n throw new MemoryOutOfBounds(memory.length, location);\n }", "int freecabInd(int dest) {\n int index = 0;\n int min = 0;\n int minIndex = 0;\n\n for(int i=0;i<freeCab.length;i++){\n\n int matLandmark = matchingLandmark(freeCab[index][0], freeCab[index][1]);\n\n int dis = distance.dijkstra(adjancy, matLandmark, dest);\n\n if (dis < min) {\n min = dis;\n minIndex = index;\n }\n index++;\n\n }\n\n return minIndex;\n\n }", "public int getALocationToPlaceBlock(){\n int lruIndex=-1,lruVal=-1;\n for(int i=0;i<this.localCache.length;i++){\n if(!this.localCache[i].isOccupied)// checks if the block is occupied\n return i;\n \n if(lruVal<this.localCache[i].lastUsed){// checks the last used of each block\n lruIndex=i;\n lruVal=this.localCache[i].lastUsed;\n }\n }\n \n return lruIndex;\n }", "private int indexOfTop(int stackNum) {\n\t\tint offset = stackNum * stackCapacity;\r\n\t\tint size = sizes[stackNum];\r\n\t\treturn offset+size-1;\r\n\t}", "public static int offsetBits_offset_cmp() {\n return 168;\n }", "public int findBranch(int fromBusNdx, int toBusNdx)\n\t{\n\t\tint end = _list[fromBusNdx];\n\t\twhile (end >= 0)\n\t\t{\n\t\t\tint far = _far[end];\n\t\t\tif (far == toBusNdx) return end / 2;\n\t\t\tend = _next[end];\n\t\t}\n\t\treturn -1;\n\t}", "public int nextLessThan(int range) {\n return (0x7fffffff & this.nextInt()) % range;\n }", "public int search (String name) {\n int result = -1;\n int offset = 0;\n\n for (int i=9; i>-1; i--)\n {\n qLock[i].lock ();\n result = q[i].indexOf (name);\n if (result == -1)\n offset += q[i].size ();\n qLock[i].unlock ();\n if (result != -1)\n break;\n }\n\n if (result == -1)\n return result;\n\n return result + offset;\n }", "public static int binarySearch(int value, int length) {\n\t\tint low = 1;\n\t\tint high = length;\n\t\t\n\t\twhile (low < high) {\n\t\t\tint mid = (low + high) / 2;\n\t\t\tif (value > A[M[mid]])\n\t\t\t\tlow = mid + 1;\n\t\t\telse\n\t\t\t\thigh = mid - 1;\n\t\t}\n\t\t\n\t\tif (value <= A[M[low]])\n\t\t\treturn low;\n\t\telse\n\t\t\treturn low + 1;\n\t}", "static int memory_address_hl(){\n\t\tint hl_address = hexa_to_deci(registers.get('H')+registers.get('L'));\n\t\treturn hl_address;\n\t}", "public boolean hasMemoryAddress()\r\n/* 138: */ {\r\n/* 139:167 */ return false;\r\n/* 140: */ }", "public long memoryAddress()\r\n/* 143: */ {\r\n/* 144:172 */ throw new UnsupportedOperationException();\r\n/* 145: */ }", "public byte[] searchReturnData(short addressInDataBlock) {\n //take initial and size binary from memory\n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //if 0 no have data\n if (initial == 0 && sizeData == 0) {\n return null;\n }\n\n //return data\n byte[] toReturn = new byte[sizeData];\n \n int j = 0;\n for (short i = initial; i < initial + sizeData; i++) {\n toReturn[j] = serialize[i];\n j++;\n }\n\n return toReturn;\n }", "public static void main(String[] args) {\n\n int num = 12354;\n\n System.out.println(nextGreater(num));\n }", "public static int findNextHigherIndex(int[] a, int k) {\n\t\tint start = 0, end = a.length - 1; \n\t \n int ans = -1; \n while (start <= end) { \n int mid = (start + end) / 2; \n \n // Move to right side if target is \n // greater. \n if (a[mid] <= k) { \n start = mid + 1; \n } \n \n // Move left side. \n else { \n ans = mid; \n end = mid - 1; \n } \n } \n return ans;\n\t}", "public int NextMbAddress(int n) {\n\t\tint PicSizeInMapUnits= (sps0.pic_width_in_mbs_minus_1+1)*(sps0.pic_height_in_map_units_minus_1+1);\n\t\t// int FrameHeightInMbs = (2-(sps0.frame_mbs_only_flag ? 1:0))*(sps0.pic_height_in_map_units_minus_1+1);\n \t\t// int PicHeightInMbs = FrameHeightInMbs / (1+(field_pic_flag ? 1:0));\n\n \t\tint PicSizeInMbs = (sps0.pic_width_in_mbs_minus_1+1) * (PicHeightInMbs);\n\t\t// (7-34)\n\t\tint MapUnitsInSliceGroup0 = Math.min(((pps0.slice_group_change_rate_minus1 + 1) * slice_group_change_cycle), \n\t\t\t(PicSizeInMapUnits));\n\t\t// System.out.println(MapUnitsInSliceGroup0);\n\t\tint sizeOfUpperLeftGroup;\n\t\tif(pps0.num_slice_groups_minus1==1&&(pps0.slice_group_map_type==4||pps0.slice_group_map_type==5)){\n\n\t\t\tsizeOfUpperLeftGroup=(pps0.slice_group_change_direction_flag ? (PicSizeInMapUnits - MapUnitsInSliceGroup0)\n\t\t\t\t: MapUnitsInSliceGroup0);\n\t\t}\n\t\tint [] mapUnitToSliceGroupMap=new int[PicSizeInMapUnits];\n\t\tif(pps0.num_slice_groups_minus1==0){\n\t\t\t// System.out.println(\"zero \");\n\t\t\tfor(int i=0;i<pps0.pic_size_in_map_units_minus1+1;i++){\n\t\t\t\tmapUnitToSliceGroupMap[i]=0;\n\t\t\t}\t\t\t\n\t\t}\n\n\t\telse if(pps0.num_slice_groups_minus1!=0){\n\t\t\tif(pps0.slice_group_map_type==0){\n\t\t\t\t// 8.2.2.1\n\t\t\t}\n\t\t\telse if(pps0.slice_group_map_type==1){\n\t\t\t\t// 8.2.2.2\n\t\t\t}else if(pps0.slice_group_map_type==2){\n\t\t\t\t// 8.2.2.3\n\t\t\t}else if(pps0.slice_group_map_type==3){\n\t\t\t\t// 8.2.2.4\n\t\t\t}else if(pps0.slice_group_map_type==4){\n\t\t\t\t// 8.2.2.5\n\t\t\t}\n\t\t\telse if(pps0.slice_group_map_type==5){\n\t\t\t\t// 8.2.2.6\n\t\t\t}\n\t\t\telse if(pps0.slice_group_map_type==6){\n\t\t\t\t// 8.2.2.7\n\t\t\t}\n\t\t}\n\n\n\t\t\t\t\t\t\t\t\t/* 8.2.2.8 */\n \t\tint[] MbToSliceGroupMap=new int[PicSizeInMbs];\n \t\tfor(int i=0;i<PicSizeInMbs;i++){\n \t\t\tif(sps0.frame_mbs_only_flag==true||field_pic_flag==true){\n \t\t\t\t// System.out.println(PicSizeInMbs+\" \"+PicSizeInMapUnits);\n \t\t\t\tMbToSliceGroupMap[i]=mapUnitToSliceGroupMap[i];\n \t\t\t} else if(MbaffFrameFlag){\n \t\t\t\tMbToSliceGroupMap[i]=mapUnitToSliceGroupMap[(int)i/2];\n\n \t\t\t}else if(sps0.frame_mbs_only_flag==false&&sps0.mb_adaptive_frame_field_flag==false&&field_pic_flag==false){\n \t\t\t\tMbToSliceGroupMap[i]=mapUnitToSliceGroupMap[(int)(i/(2*sps0.pic_width_in_mbs_minus_1+1))\n \t\t\t\t*sps0.pic_width_in_mbs_minus_1+1+(i%sps0.pic_width_in_mbs_minus_1+1)];\n \t\t\t}\n\n \t\t}\n\t\t// i = n + 1 \n\t\t// while( i < PicSizeInMbs && MbToSliceGroupMap[ i ] != MbToSliceGroupMap[ n ] )\n\t\t // i++; \n\t\t// nextMbAddress = i\n\t\tint i = n + 1;\n\t\t// int nextMbAddress = i;\n\n\t\twhile(i<PicSizeInMbs &&( MbToSliceGroupMap[i]!=MbToSliceGroupMap[n])) {\n\t\t\ti++;\n\t\t\t// System.out.println(\"here mb address\");\n\t\t\t// nextMbAddress = i;\n\t\t}\n\t\t// System.out.println(\"nextMbAddress \"+i);\n\t\treturn i;\n\t}", "public Boolean captureCodeFragment06(int[] a) {\r\n for (int i = 0; i < a.length - 1; i++) {\r\n if (a[i] > a[i + 1]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public int findTargetBB(String label) {\n\t\tString targetLB = null;\n\t\tfor (int i = 1; i <= BasicBlocks.size(); i++) {\n\t\t\ttargetLB = BasicBlocks.get(i).get(0);\n\t\t\tint lbLen = 0;\n\t\t\tint j = 0;\n\t\t\twhile (targetLB.charAt(j) != ' ') {\n\t\t\t\tlbLen++;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ttargetLB = targetLB.substring(0, lbLen);\n\t\t\tif (targetLB.equals(label)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "protected static int branchyUnsignedBinarySearch(final CharBuffer array, final int begin,\n final int end, final char k) {\n if ((end > 0) && ((array.get(end - 1)) < (int) (k))) {\n return -end - 1;\n }\n int low = begin;\n int high = end - 1;\n while (low <= high) {\n final int middleIndex = (low + high) >>> 1;\n final int middleValue = (array.get(middleIndex));\n\n if (middleValue < (int) (k)) {\n low = middleIndex + 1;\n } else if (middleValue > (int) (k)) {\n high = middleIndex - 1;\n } else {\n return middleIndex;\n }\n }\n return -(low + 1);\n }", "public int getReturnAddressOffset();", "@Test\n public void testAddress()\n {\n System.out.println(\"address\");\n int addr = 16893;\n System.out.println(N2TCode.address(addr));\n System.out.println(Integer.toBinaryString(addr));\n }", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "public static int findNextHigher(int[] a, int k) {\n\t int low = 0; \n\t int high = a.length - 1;\n\t \n\t int result = Integer.MAX_VALUE;\n\t while (low <= high) {\n\t int mid = (low + high) / 2;\n\t \n\t if (a[mid] > k) {\n\t result = a[mid]; /*update the result and continue*/\n\t high = mid - 1;\n\t } else {\n\t low = mid + 1;\n\t }\n\t } \n\t \n\t return result;\n\t}", "private WALPointer tailPointer(WALPointer from) throws IgniteCheckedException {\n WALIterator it = cctx.wal().replay(from);\n\n try {\n while (it.hasNextX()) {\n IgniteBiTuple<WALPointer, WALRecord> rec = it.nextX();\n\n if (rec == null)\n break;\n }\n }\n finally {\n it.close();\n }\n\n return it.lastRead().map(WALPointer::next).orElse(null);\n }", "public static void useBinarySearch1() {\n int[] numbers = {-3, 2, 8, 12, 17, 29, 44, 58, 79};\n int index = Arrays.binarySearch(numbers, 29);\n System.out.println(\"29 is found at index \" + index);\n }", "private Block findFreeBlock(int size) {\n\n // iteration is ordered min ~ max\n for (Block b : freeSpace) {\n if (b.length >= size) \n return b;\n }\n return null;\n }", "public static final UIntRange m2229untilKr8caGY(byte $this$until, byte to) {\n if (Intrinsics.compare((int) to & 255, 0) <= 0) {\n return UIntRange.Companion.getEMPTY();\n }\n return new UIntRange(UInt.m1374constructorimpl($this$until & 255), UInt.m1374constructorimpl(UInt.m1374constructorimpl(to & 255) - 1), (DefaultConstructorMarker) null);\n }", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "private int searchNext(JmtCell prev) {\r\n \t\tRectangle boundspadre = GraphConstants.getBounds((prev).getAttributes()).getBounds();\r\n \t\tObject[] listEdges = null;\r\n \t\tGraphModel graphmodel = graph.getModel();\r\n \t\tList<Object> next = new ArrayList<Object>();\r\n \r\n \t\tif (flag1 == false && prev.seen == false) {\r\n \r\n \t\t\t// Rectangle bounds =\r\n \t\t\t// GraphConstants.getBounds(((JmtCell)prev).getAttributes()).getBounds();\r\n \t\t\tif (!flag2) {\r\n \t\t\t\tboundspadre.setLocation(x, y + ((e + 1) * (42 + heightMax)) - (int) (boundspadre.getHeight() / 2) + 30);\r\n \t\t\t} else {\r\n \t\t\t\tboundspadre.setLocation(x - (int) (boundspadre.getWidth() / 2), y + ((e + 1) * (42 + heightMax))\r\n \t\t\t\t\t\t- (int) (boundspadre.getHeight() / 2) + 30);\r\n \t\t\t}\r\n \r\n \t\t\tGraphConstants.setBounds(prev.getAttributes(), boundspadre);\r\n \t\t\tx = (int) boundspadre.getCenterX() + widthMax + 50;\r\n \t\t\tprev.seen = true;\r\n \t\t\tflag2 = true;\r\n \t\t}\r\n \r\n \t\t// inserisco tutti gli archi uscenti e entranti di min.get(j) in\r\n \t\t// listEdges\r\n \t\tlistEdges = DefaultGraphModel.getOutgoingEdges(graphmodel, prev);\r\n \t\tVector<Object> listEdgestmp = new Vector<Object>();\r\n \t\tfor (Object listEdge : listEdges) {\r\n \t\t\tJmtCell qq = (JmtCell) (graphmodel.getParent(graphmodel.getTarget(listEdge)));\r\n \t\t\tif (!(qq).seen) {\r\n \t\t\t\tlistEdgestmp.add(listEdge);\r\n \t\t\t}\r\n \t\t}\r\n \t\tlistEdges = listEdgestmp.toArray();\r\n \r\n \t\tint numTarget = listEdges.length;\r\n \t\tif (numTarget == 0) {\r\n \t\t\treturn 1;\r\n \t\t}\r\n \r\n \t\tfor (int k = 0; k < numTarget; k++) {\r\n \t\t\tnext.add((graphmodel.getParent(graphmodel.getTarget(listEdges[k]))));\r\n \t\t}\r\n \r\n \t\tint j = 1;\r\n \t\tif (inRepositionSons == false && ((JmtCell) next.get(0)).seen == false) {\r\n \t\t\tj = searchNext((JmtCell) next.get(0));\r\n \t\t} else if (inRepositionSons == true && ((JmtCell) next.get(0)).seen == false) {\r\n \r\n \t\t\tRectangle bounds = GraphConstants.getBounds(((JmtCell) next.get(0)).getAttributes()).getBounds();\r\n \t\t\tbounds.setLocation((int) (boundspadre.getCenterX()) + widthMax + 50 - (int) (bounds.getWidth() / 2), (int) boundspadre.getCenterY()\r\n \t\t\t\t\t- (int) (bounds.getHeight() / 2));\r\n \t\t\tGraphConstants.setBounds(((JmtCell) next.get(0)).getAttributes(), bounds);\r\n \r\n \t\t\t((JmtCell) next.get(0)).seen = true;\r\n \t\t\tj = searchNext((JmtCell) next.get(0));\r\n \t\t}\r\n \r\n \t\tif (numTarget > 0) {\r\n \t\t\tif (!flag) {\r\n \t\t\t\trepositionSons(prev, next, j - 1, 1);\r\n \t\t\t} else {\r\n \t\t\t\trepositionSons(prev, next, -1, 0);\r\n \t\t\t}\r\n \t\t\tflag = false;\r\n \t\t}\r\n \r\n \t\t(prev).sons = 0;\r\n \t\tfor (int w = 0; w < numTarget; w++) {\r\n \t\t\tprev.sons += ((JmtCell) next.get(w)).sons;\r\n \t\t}\r\n \r\n \t\treturn prev.sons;\r\n \t}", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "private int binarySearchToFindClosest(String overflowName, int bottomRecord, int topRecord) {\n // Base condition for only having two records left to choose from\n if (topRecord - bottomRecord == 1) {\n String topRecordName = getRecordCompanyName(\"normal\", topRecord);\n\n // If the name of the overflow company comes after the company name of the top record, then the top record is the closest\n if (overflowName.compareTo(topRecordName) >= 1) {\n return topRecord;\n // Otherwise, either the top and bottom records are equal length away, or the bottom record is closer, so return the bottom record\n } else {\n return bottomRecord;\n }\n // Base condition for having only 1 record left means that that record is the closest\n } else if (topRecord == bottomRecord) {\n return topRecord;\n }\n\n int middle = (topRecord + bottomRecord) / 2;\n String nameOfNormalRecord = getRecordCompanyName(\"normal\", middle);\n int alphabeticalOrder = overflowName.compareTo(nameOfNormalRecord);\n if (alphabeticalOrder == 0) {\n return middle;\n } else if (alphabeticalOrder < 0) {\n return binarySearchToFindClosest(overflowName, bottomRecord, middle);\n } else {\n return binarySearchToFindClosest(overflowName, middle + 1, topRecord);\n } \n }", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "@Test\n public void testMatchUntilFixpoint() throws Exception {\n\n HepProgramBuilder programBuilder = HepProgram.builder();\n programBuilder.addMatchLimit( HepProgram.MATCH_UNTIL_FIXPOINT );\n programBuilder.addRuleInstance( UnionToDistinctRule.INSTANCE );\n\n checkPlanning( programBuilder.build(), UNION_TREE );\n }", "private void updateNegativeFlagOnComp(int register, int address){\r\n\t\tif(sim40.memory[register] <= sim40.memory[address]){\r\n\t\t\tswitchOnFlag(1);\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tswitchOffFlag(1);\r\n\t\t}\r\n\t}", "int compFunction(int code) {\r\n int value = code % tableSize;\r\n if (value < 0) {\r\n return value + tableSize;\r\n }\r\n return value;\r\n }" ]
[ "0.63314724", "0.62417984", "0.59782714", "0.59601843", "0.59508437", "0.57027525", "0.56024086", "0.5548727", "0.5359083", "0.52102345", "0.5164567", "0.5051395", "0.4992066", "0.49585283", "0.48084453", "0.47980404", "0.47786736", "0.47398356", "0.47335127", "0.46729982", "0.4641153", "0.46340087", "0.46241385", "0.45983666", "0.4585947", "0.45849806", "0.45773506", "0.45574185", "0.45358688", "0.45316616", "0.45305455", "0.45251378", "0.45031267", "0.44982982", "0.4493383", "0.4482843", "0.44761908", "0.44698277", "0.44437143", "0.44366276", "0.44347227", "0.44321343", "0.4398943", "0.4382825", "0.43716726", "0.43707305", "0.4358224", "0.4356705", "0.4330705", "0.43201604", "0.4315297", "0.43071917", "0.42973107", "0.42837822", "0.42767155", "0.42756742", "0.42723885", "0.42589325", "0.42547843", "0.42468336", "0.4230987", "0.42208135", "0.42028198", "0.41999322", "0.4198874", "0.41973913", "0.41824058", "0.4181729", "0.41805145", "0.41755933", "0.4175153", "0.417353", "0.4172733", "0.41675258", "0.41580498", "0.41484344", "0.41447547", "0.41430923", "0.4137621", "0.41333896", "0.41333812", "0.41251218", "0.4122573", "0.41178048", "0.41175508", "0.41119805", "0.4111203", "0.41013882", "0.4092362", "0.40887737", "0.40878826", "0.40847585", "0.40846962", "0.408209", "0.40777913", "0.4076791", "0.4074182", "0.40675813", "0.40580696", "0.4055333" ]
0.6358997
0
get the next code unit that starts at an address that is less than the given address. The search will include instructions, defined data, and undefined data.
public CodeUnit getCodeUnitBefore(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public Instruction getInstructionBefore(Address addr);", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "public CodeUnit getCodeUnitContaining(Address addr);", "public CodeUnit getCodeUnitAfter(Address addr);", "public CodeUnit getDefinedCodeUnitAfter(Address addr);", "public Instruction getInstructionContaining(Address addr);", "public CodeUnit getCodeUnitAt(Address addr);", "public int nextLessThan(int range) {\n return (0x7fffffff & this.nextInt()) % range;\n }", "public Data getDataBefore(Address addr);", "public Instruction getInstructionAfter(Address addr);", "public long getNextBlock(long address){\n int marker = readMarkerLowerBits(address - 1);\n int blocksize;\n if(marker == 0){\n blocksize = readLengthField(address, 1);\n return address + blocksize + 1;\n } else if(marker == 15){\n return address + 1;\n } else {\n if (isBlockUsed(address)) marker -= 8;\n blocksize = readLengthField(address, marker);\n if (isBlockUsed(address)) {\n return address + blocksize + 2 * (marker - 8) + 1;\n }\n return address + blocksize + 1;\n }\n }", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "protected static int advanceUntil(CharBuffer array, int pos, int length, char min) {\n int lower = pos + 1;\n\n // special handling for a possibly common sequential case\n if (lower >= length || (array.get(lower)) >= (min)) {\n return lower;\n }\n\n int spansize = 1; // could set larger\n // bootstrap an upper limit\n\n while (lower + spansize < length\n && (array.get(lower + spansize)) < (min)) {\n spansize *= 2; // hoping for compiler will reduce to\n }\n // shift\n int upper = (lower + spansize < length) ? lower + spansize : length - 1;\n\n // maybe we are lucky (could be common case when the seek ahead\n // expected\n // to be small and sequential will otherwise make us look bad)\n if (array.get(upper) == min) {\n return upper;\n }\n\n if ((array.get(upper)) < (min)) {// means\n // array\n // has no\n // item\n // >= min\n // pos = array.length;\n return length;\n }\n\n // we know that the next-smallest span was too small\n lower += (spansize >>> 1);\n\n // else begin binary search\n // invariant: array[lower]<min && array[upper]>min\n while (lower + 1 != upper) {\n int mid = (lower + upper) >>> 1;\n char arraymid = array.get(mid);\n if (arraymid == min) {\n return mid;\n } else if ((arraymid) < (min)) {\n lower = mid;\n } else {\n upper = mid;\n }\n }\n return upper;\n\n }", "public Data getDefinedDataBefore(Address addr);", "public int getSourceLine(int pos) {\n unpack();\n int l = 0, r = line_number_table_length - 1;\n if (// array is empty\n r < 0)\n return -1;\n int min_index = -1, min = -1;\n /* Do a binary search since the array is ordered.\n */\n do {\n int i = (l + r) / 2;\n int j = line_number_table[i].getStartPC();\n if (j == pos)\n return line_number_table[i].getLineNumber();\n else if (// else constrain search area\n pos < j)\n r = i - 1;\n else\n // pos > j\n l = i + 1;\n /* If exact match can't be found (which is the most common case)\n * return the line number that corresponds to the greatest index less\n * than pos.\n */\n if (j < pos && j > min) {\n min = j;\n min_index = i;\n }\n } while (l <= r);\n /* It's possible that we did not find any valid entry for the bytecode\n * offset we were looking for.\n */\n if (min_index < 0)\n return -1;\n return line_number_table[min_index].getLineNumber();\n }", "public Instruction getInstructionAt(Address addr);", "private static int firstPassParse(String line, int offset)\r\n {\r\n String[] tokens = line.split(\"[\\\\s,]+\");\r\n\r\n if(tokens.length <= 0)\r\n {\r\n return offset;\r\n }\r\n \r\n if(!isOpcode(tokens[0]) && !tokens[0].startsWith(\".\"))\r\n {\r\n int address = beginningAddress + offset;\r\n \r\n if(isHex(tokens[0]))\r\n {\r\n throw new AssemblerException(\"Invalid label on line: \" + line);\r\n }\r\n else\r\n {\r\n symbolTable.put(tokens[0], address);\r\n }\r\n }\r\n\r\n return offset + ADDRESS_OFFSET;\r\n }", "Constant getStartOffsetConstant();", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "private void nextCode(int code) {\n int r1;\n int r2;\n int r3;\n int label;\n char c;\n String s;\n int constant;\n int length;\n\n // Each case corresponds to a different instruction\n switch (code) {\n case 0:\n break;\n case 1:\n // 1: Clears the contents of r1\n r1 = checkRegister(memory[++pc]);\n register[r1] = 0;\n break;\n case 2:\n // 2: Clears the memory location specified by r1\n r1 = checkRegister(memory[++pc]);\n int memLoc = register[r1];\n checkMemLocation(memLoc);\n memory[memLoc] = 0;\n break;\n case 3:\n // 3: Clears the memory location specified by label\n label = checkMemLocation(memory[++pc]);\n memory[label] = 0;\n break;\n case 4:\n // 4: Clear a block of memory. The starting location is specified by r1, the count is in r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n checkMemLocation(register[1] + register[r2] - 1);\n for (int i = register[r1]; i < register[r2]; i++) {\n memory[i] = 0;\n }\n break;\n case 5:\n // 5: Move the specified constant to register r1\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] = constant;\n break;\n case 6:\n // 6: Move the contents of register r1 to r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] = register[r1];\n break;\n case 7:\n // 7: Move the contents of register r1 to the memory location specified by label;\n r1 = checkRegister(memory[++pc]);\n label = checkMemLocation(memory[++pc]);\n memory[label] = register[r1];\n break;\n case 8:\n // 8: Move the contents of memory location label to register r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] = memory[label];\n break;\n case 9:\n // 9: Move the memory location specified by r1 to r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] = memory[register[r1]];\n break;\n case 10:\n // 10: Move the address of label to register r1\n\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] = label;\n break;\n case 11:\n // 11: Move a block of memory. The source is specified by r1, the destination by r2, the count is in r3\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n r3 = checkRegister(memory[++pc]);\n // check mem locations of first and last elements to be copied\n checkMemLocation(register[r1]);\n checkMemLocation(register[1] + register[r3] - 1);\n int toMove[] = new int[register[r3]];\n int movIndex = 0;\n for (int i = register[r1]; i < toMove.length; i++) {\n toMove[movIndex] = memory[i];\n movIndex++;\n }\n movIndex = 0;\n for (int i = register[r2]; i < toMove.length; i++) {\n memory[i] = toMove[movIndex];\n movIndex++;\n }\n break;\n case 12:\n // 12: add constant 123 to r1\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] += constant;\n\n break;\n case 13:\n // 13: Add the contents of register r1 to r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] += register[r1];\n break;\n case 14:\n // 14: Add the contents of memory location label to r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] += memory[label];\n break;\n case 15:\n // 15: Add the contents of the memory location specified by r1 to r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n register[r2] += memory[register[r1]];\n break;\n case 16:\n // 16: Subtract the constant 123 from r1;\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] -= constant;\n break;\n case 17:\n // 17: Subtract the contents of register r1 from r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] -= register[r1];\n break;\n case 18:\n // 18: Subtract the contents of memory location label from r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] -= memory[label];\n break;\n case 19:\n // 19: Subtract the contents of the memory location specified by r1 from r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n register[r2] -= memory[register[r1]];\n break;\n case 20:\n // 20: Multiply the constant 123 into r1;\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] *= constant;\n break;\n case 21:\n // 21: Multiply the contents of register r1 into r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] *= register[r1];\n break;\n case 22:\n // 22: Multiply the contents of memory location label into r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] *= memory[label];\n break;\n case 23:\n // 23: Multiply the contents of the memory location specified by r1 into r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n register[r2] *= memory[register[r1]];\n break;\n case 24:\n // 24: Divide the constant 123 into r1;\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] /= constant;\n break;\n case 25:\n // 25: Divide the contents of register r1 into r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] /= register[r1];\n break;\n case 26:\n // 26: Divide the contents of memory location label into r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] /= memory[label];\n break;\n case 27:\n // 27: Divide the contents of the memory location specified by r1 into r2\n\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n register[r2] /= memory[register[r1]];\n break;\n case 28:\n // 28: Jump to memory location label\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n break;\n case 29:\n // 29: Subtract one from register r1. Jump to label if result is 0\n r1 = checkRegister(memory[++pc]);\n register[r1]--;\n if (register[r1] == 0) {\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 30:\n // 30: Subtract one from register r1. Jump to label if result is not equal 0\n r1 = checkRegister(memory[++pc]);\n register[r1]--;\n if (register[r1] != 0) {\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 31:\n // 31: Add one to register r1. Jump to label if result is 0\n r1 = checkRegister(memory[++pc]);\n register[r1]++;\n if (register[r1] == 0) {\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 32:\n // 32: Add one to register r1. Jump to label if result is not equal 0\n r1 = checkRegister(memory[++pc]);\n register[r1]++;\n if (register[r1] != 0) {\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 33:\n // 33: Compares constant to r1. Set status flags\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n compareRegister = constant - register[r1];\n break;\n case 34:\n // 34: Compares r1 to r2. Set status flags\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n compareRegister = register[r1] - register[r2];\n break;\n case 35:\n // 35: Compares memory location label to r1. Set status flags\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n compareRegister = memory[label] - register[r1];\n break;\n case 36:\n // 36: Jump to label if last compare was negative\n label = checkMemLocation(memory[++pc]);\n if (compareRegister < 0) {\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 37:\n // 37: Jump to label if last compare was zero\n label = checkMemLocation(memory[++pc]);\n if (compareRegister == 0) {\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 38:\n // 38: Jump to label if last compare was positive\n label = checkMemLocation(memory[++pc]);\n if (compareRegister > 0) {\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 39:\n // 39: Jump to subroutine label. The contents of registers r5 - r9 are pushed onto the stack\n label = checkMemLocation(memory[++pc]);\n for (int i = 5; i <= 9; i++) {\n stack.push(register[i]);\n }\n stack.push(pc);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n break;\n case 40:\n // 40: return from subroutine. The contents of registers r5 - r9 are popped from the stack\n pc = stack.pop();\n for (int i = 9; i >= 5; i--) {\n register[i] = stack.pop();\n }\n break;\n case 41:\n // 41: Push r1 onto the stack\n r1 = checkRegister(memory[++pc]);\n stack.push(register[r1]);\n break;\n case 42:\n // 42: Pop the stack onto r1\n r1 = checkRegister(memory[++pc]);\n register[r1] = stack.pop();\n break;\n case 43:\n // 43: Puts stack condition into register r1. 0 - Okay, 1 - Full, 2 - Empty\n if (stack.isEmpty()) {\n stackRegister = STACK_EMPTY;\n } else if (stack.isFull()) {\n stackRegister = STACK_FULL;\n } else {\n stackRegister = STACK_OK;\n }\n r1 = checkRegister(memory[++pc]);\n register[r1] = stackRegister;\n break;\n case 44:\n // 44: Output the character 123 to the console\n c = (char) memory[++pc];\n print(\"\" + c);\n break;\n case 45:\n // 45: Output the character in r1 to the console\n r1 = checkRegister(memory[++pc]);\n c = (char) register[r1];\n print(\"\" + c);\n break;\n case 46:\n // 46: Output the character whose memory location is indicated by r1 to the console\n r1 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n c = (char) memory[register[r1]];\n print(\"\" + c);\n break;\n case 47:\n // 47: Output a block of characters. The starts is indicated by r1, the count by r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n checkMemLocation(register[r1] + register[r2] - 1);\n length = register[r2];\n s = \"\";\n for (int i = register[r1]; i < length; i++) {\n s += (char) memory[i];\n }\n print(s);\n break;\n case 48:\n // 48: read an integer from the console to r1, error code in r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n try {\n register[r1] = nextInt();\n register[r2] = NO_SCAN_ERROR_FOUND;\n } catch (InputMismatchException e) {\n register[r2] = SCAN_ERROR_FOUND;\n }\n break;\n case 49:\n // 49: Print the integer in r1 to the console\n r1 = checkRegister(memory[++pc]);\n print(\"\" + register[r1]);\n break;\n case 50:\n // 50: Read a character from console to r1;\n r1 = checkRegister(memory[++pc]);\n register[r1] = next().charAt(0);\n break;\n case 51:\n // 51: Read a line of text to the memory location starting at label. The count is placed in r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n s = nextLine();\n checkMemLocation(label + s.length() - 1);\n for (int i = 0; i < s.length(); i++) {\n memory[label] = s.charAt(i);\n label++;\n }\n register[r1] = s.length();\n break;\n case 52:\n // 52: Break into debugger\n debug();\n break;\n case 53:\n // 53: Move the contents of register r1 into the memory location specified by r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r2]);\n memory[register[r2]] = register[r1];\n break;\n case 54:\n // 54: Move the contents of the memory location specified by r1\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n checkMemLocation(register[r2]);\n memory[register[r2]] = memory[register[r1]];\n break;\n case 55:\n // 55: Output a string stored in label\n label = checkMemLocation(memory[++pc]);\n length = memory[label];\n s = \"\";\n for (int i = 1; i < length + 1; i++) {\n s += (char) memory[label + i];\n }\n print(s);\n break;\n case 56:\n\n // nop: No operation. Does nothing\n break;\n case 57:\n // 57: jump if compare was not equal\n label = checkMemLocation(memory[++pc]);\n if (compareRegister != 0) {\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n }\n }", "public int rva2offset(Address address) {\n\t\tint offset = -1;\n\t\tfor(IMAGE_SECTION_HEADER section:peFileSections) {\n\t\t\tif(address.getAddr32() >= section.getVirtualAddress()\n\t\t\t&& address.getAddr32() < section.getVirtualAddress() + section.getVirtualSize()) {\n\t\t\t\toffset = address.getAddr32() - section.getVirtualAddress() + section.getPointerToRawData();\n\t\t\t\treturn offset;\n\t\t\t}\n\t\t}\n\t\tif(address.getAddr32() < peOptionalHeader.getSizeOfHeaders())\n\t\t\treturn address.getAddr32();\n\t\treturn offset;\n\t}", "private int getWakeupSrcIndex(java.lang.String r8) {\n /*\n r7 = this;\n int r0 = r8.hashCode()\n r1 = 5\n r2 = 4\n r3 = 3\n r4 = 2\n r5 = 1\n r6 = -1\n switch(r0) {\n case -952838356: goto L_0x004d;\n case -392237989: goto L_0x0043;\n case -190005216: goto L_0x0038;\n case -135250500: goto L_0x002e;\n case 692591870: goto L_0x0024;\n case 693992349: goto L_0x0019;\n case 1315079558: goto L_0x000e;\n default: goto L_0x000d;\n }\n L_0x000d:\n goto L_0x0058\n L_0x000e:\n java.lang.String r0 = \"keyguard_screenon_notification\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = r4\n goto L_0x0059\n L_0x0019:\n java.lang.String r0 = \"lid switch open\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = 6\n goto L_0x0059\n L_0x0024:\n java.lang.String r0 = \"android.policy:LID\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = r1\n goto L_0x0059\n L_0x002e:\n java.lang.String r0 = \"android.policy:POWER\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = 0\n goto L_0x0059\n L_0x0038:\n java.lang.String r0 = \"miui.policy:FINGERPRINT_DPAD_CENTER\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = r5\n goto L_0x0059\n L_0x0043:\n java.lang.String r0 = \"android.policy:FINGERPRINT\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = r2\n goto L_0x0059\n L_0x004d:\n java.lang.String r0 = \"keyguard_screenon_finger_pass\"\n boolean r0 = r8.equals(r0)\n if (r0 == 0) goto L_0x000d\n r0 = r3\n goto L_0x0059\n L_0x0058:\n r0 = r6\n L_0x0059:\n switch(r0) {\n case 0: goto L_0x0061;\n case 1: goto L_0x0060;\n case 2: goto L_0x005f;\n case 3: goto L_0x005e;\n case 4: goto L_0x005e;\n case 5: goto L_0x005d;\n case 6: goto L_0x005d;\n default: goto L_0x005c;\n }\n L_0x005c:\n return r6\n L_0x005d:\n return r1\n L_0x005e:\n return r2\n L_0x005f:\n return r3\n L_0x0060:\n return r4\n L_0x0061:\n return r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.server.ScreenOnMonitor.getWakeupSrcIndex(java.lang.String):int\");\n }", "private Addr nextPC() {\n if (inDelaySlotQueue()) {\n // Next address\n return currentAddr.inc();\n }\n\n // If there is a jump scheduled, return it\n if (jump != null) {\n var jumpAddr = jump;\n jump = null;\n return jumpAddr;\n }\n\n // Next address\n return currentAddr.inc();\n }", "private void getNextInSet() throws CancelledException {\n\t\t// find next address that has a valid block;\n\t\tAddress addr = getNextAddress(nextAddr);\n\n\t\t// if the instruction's start address is in our set\n\t\t// then we have our block\n\t\tif (addr != null && addrSet.contains(addr)) {\n\t\t\tnextBlock = model.getCodeBlockAt(addr, monitor);\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// otherwise we're out of our current address range in\n\t\t// our address range set so we find the next address range\n\t\t// with a min address >= the instructions address and\n\t\t// look for a block there\n\t\t//nextAddr = instr.getMaxAddress();\n\t\twhile (rangeIter.hasNext()) {\n\t\t\tAddressRange range = rangeIter.next();\n\n\t\t\tif (nextAddr.compareTo(range.getMinAddress()) >= 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnextBlock = getFirstInRange(range);\n\t\t\t// if we find a block we're done\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if we find no block then there's no block in the\n\t\t\t// current range and we can move on to the next one\n\t\t}\n\t\tnextBlock = null;\n\t}", "public long get_next_index(long number) {\n return ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].getLong((int) (number * POINTER_LENGTH % ptr_parts_size[0] + 13));\n }", "static int findraslot(Memory mem, int addr) {\r\n\t\t// afbf0020 sw [sp +32] = ra\r\n\t\tfor (int n = 0; n < 8; n++) {\r\n\t\t\tint isn = mem.load_word(addr + (n * 4));\r\n\t\t\tif ((isn & 0xffff0000) == 0xafbf0000) {\r\n\t\t\t\tshort imm = (short) isn;\r\n\t\t\t\treturn imm;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }", "TrackingToken lowerBound();", "public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}", "private SimInstruction getInstruction(Addr address) {\n var inst = decodedInstructions.get(address);\n\n if (inst != null) {\n return inst;\n }\n\n // Try to decode instruction\n var rawInstruction = program.get(address);\n\n // System.out.println(\"INSTRUC: \" + instructions);\n SpecsCheck.checkNotNull(rawInstruction,\n () -> \"No program instruction found at address \" + address.toNumber() + \" (\" +\n address + \")\");\n\n var microCodeInstruction = decoder.decode(rawInstruction, this);\n decodedInstructions.put(address, microCodeInstruction);\n\n return microCodeInstruction;\n }", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "private int findBlock(long addr) {\n\t\t// find cache by splitting addr into multiple segs\n\t\tint setIndex = (int) ((addr & 0x7FC0) >>> 6);\n\t\tlong tag = (addr & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t// search for the set to check for existence\n\t\tfor (int j = 0; j < 8; j++) {\n\t\t\tif (cache[setIndex][j] == tag) {\n\t\t\t\tpolicies[setIndex].updateAt(j);\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t}\n\t\tif(usePrefetch){\n\t\t\t//fetch from memory; preftecher will fetch many other relevant addresses\n\t\t\tArrayList<Long> address = pf.getPrefetchedAddress(addr);\n\t\t\tfor(long add : address) {\n\t\t\t\tsetIndex = (int) ((add & 0x7FC0) >>> 6);\n\t\t\t\ttag = (add & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\t\tcache[setIndex][index] = tag;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\tcache[setIndex][index] = tag;\n\t\t}\n\t\t// after all, we need to update the entry\n\t\treturn 4;\n\t}", "private String getLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return \"(\" + symbols[key] + \")\";\n }\n return \"\";\n }", "public static int iterateUntil(CharBuffer array, int pos, int length, int min) {\n while (pos < length && (array.get(pos)) < min) {\n pos++;\n }\n return pos;\n }", "private int getOperandAddress(final CPU6502Instruction instruction) {\r\n // switch address mode\r\n switch (instruction.addressMode) {\r\n case CPU6502Instruction.ZERO:\r\n return this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n case CPU6502Instruction.ZERO_X:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n case CPU6502Instruction.ZERO_Y:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.y) & 0xff;\r\n case CPU6502Instruction.INDIRECT: {\r\n final int lowAddress = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n final int highAddress = (this.memory[this.currentInstructionAddress + 2] & 0xff) << 8;\r\n\r\n return (readByte(highAddress + lowAddress) & 0xff) + ((readByte(highAddress + ((lowAddress + 1) & 0xff)) & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_X: {\r\n final int p = ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n\r\n return (this.memory[p] & 0xff) + ((this.memory[(p + 1) & 0xff] & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_Y: {\r\n // this is the address on the zero page where we read from\r\n final int p = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n\r\n // if over page boundary then do another access => one more cycle\r\n final int lowAddress = (this.memory[p] & 0xff) + this.y;\r\n\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[(p + 1) & 0xff] & 0xff) << 8)) & 0xffff;\r\n }\r\n case CPU6502Instruction.RELATIVE: {\r\n // calculate relative address\r\n final int address = this.memory[this.currentInstructionAddress + 1] + this.pc;\r\n\r\n // add two cycles if crossing page boundary, otherwise one\r\n this.cycles += ((this.pc) & 0xff00) != (address & 0xff00) ? 2 : 1;\r\n return address;\r\n }\r\n case CPU6502Instruction.ABSOLUTE:\r\n return (this.memory[this.currentInstructionAddress + 1] & 0xff) + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8);\r\n case CPU6502Instruction.ABSOLUTE_X:\r\n case CPU6502Instruction.ABSOLUTE_Y: {\r\n // read low-byte of the address\r\n final int lowAddress = (this.memory[this.currentInstructionAddress + 1] & 0xff) + (instruction.addressMode == CPU6502Instruction.ABSOLUTE_Y ? this.y : this.x);\r\n\r\n // if over page boundary then do another access => one more cycle\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8)) & 0xffff;\r\n }\r\n\r\n default:\r\n throw new RuntimeException(\"Illegal address mode for instruction \" + instruction.toString() + \" ($\" + Integer.toHexString(instruction.opCode) + \")\");\r\n }\r\n }", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "public final int getLine()\n\t{\n\t\treturn address >>> 8 & 0x0F;\n\t}", "public List<DexlibAbstractInstruction> instructionsBefore(DexlibAbstractInstruction instruction) {\n int i = instructions.indexOf(instruction);\n if (i == -1) {\n throw new IllegalArgumentException(\"Instruction \" + instruction + \" not part of this body.\");\n }\n\n List<DexlibAbstractInstruction> l = new ArrayList<DexlibAbstractInstruction>();\n l.addAll(instructions.subList(0, i));\n Collections.reverse(l);\n return l;\n }", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "public int read(int address){\n switch (address){\r\n /*\r\n case 0: {\r\n return registers_w[CONTROL_REGISTER_1];\r\n }\r\n\r\n case 3: {\r\n return spriteMemoryCounter;\r\n }\r\n case 5:{\r\n return registers_w[SCROLL_OFFSET];\r\n }\r\n case 6:{\r\n return horizontalTileCounter | (verticalTileCounter << 5) | (horizontalNameCounter << 10) | (verticalNameCounter << 11);\r\n }\r\n */\r\n\t\t\tcase 0: {\r\n\t\t\t\t\t\treturn scanLine;\r\n\t\t\t\t\t\t// hack\r\n\t\t\t}\r\n case 1: {\r\n return registers_w[CONTROL_REGISTER_2];\r\n }\r\n case STATUS_REGISTER:{ // 2\r\n int returnVal = registers_r[STATUS_REGISTER];\r\n registers_r[STATUS_REGISTER] = getBitsUnset(registers_r[STATUS_REGISTER], STATUS_VBLANK); //| STATUS_SPRITE0_HIT);\r\n isFirstWriteToScroll = true;\r\n lastPPUAddressWasHigh = false;\r\n //logger.info(\"Status is: \" + Integer.toHexString(returnVal));\r\n return returnVal;\r\n }\r\n case SPRITE_MEMORY_DATA:{ // 4\r\n return readFromSpriteMemory();\r\n }\r\n case PPU_MEMORY_DATA:{ // 7\r\n int returnVal = 0xFF & registers_r[PPU_MEMORY_DATA]; // buffered read\r\n \r\n //int returnVal = 0xFF & memory.read(ppuMemoryAddress);\r\n\t\t\tint readAddress = horizontalTileCounter \r\n\t\t\t\t\t\t\t\t| (verticalTileCounter << 5)\r\n\t\t\t\t\t\t\t\t| (horizontalNameCounter << 10)\r\n\t\t\t\t\t\t\t\t| (verticalNameCounter << 11)\r\n\t\t\t\t\t\t\t\t| ((fineVerticalCounter & 0x3) << 12);\r\n\r\n\t\t\tif (readAddress == 0x3F10 || readAddress == 0x3F14 || readAddress == 0x3F18 || readAddress == 0x3F1C) {\r\n\t\t\t\treadAddress = readAddress & 0x3F0F;\r\n\t\t\t}\r\n registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(readAddress);\r\n // registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(ppuMemoryAddress);\r\n incrementCounters();\r\n /*\r\n if ((registers_w[CONTROL_REGISTER_1] & CR1_VERTICAL_WRITE) == 0){\r\n ppuMemoryAddress++;\r\n }\r\n else {\r\n ppuMemoryAddress = (ppuMemoryAddress + 32);\r\n }\r\n */\r\n return returnVal;\r\n }\r\n\r\n default: throw new RuntimeException(\"Invalid read attempt: \" + Integer.toHexString(address));\r\n }\r\n }", "private static int minimumPosition(int[] a, int from)\n {\n int minPos = from;\n for (int i = from + 1; i < a.length; i++) \n {\n if (a[i] < a[minPos]) { minPos = i; }\n }\n return minPos;\n }", "private int minPosition(int from) throws InterruptedException{\n\t\tint minPos = from;\n\t\tfor (int i = from + 1; i < a.length; i++){\n\t\t\tsortStateLock.lock();\n\t\t\ttry{\n\t\t\t\tif (a[i] < a[minPos]) minPos = i;\n\t\t\t // For animation\n\t\t\t markedPosition = i;\n\t\t }\n\t\t\tfinally\n\t\t {\n\t\t\t\tsortStateLock.unlock();\n\t\t }\n\t\t pause(2);\n\t }\n\t return minPos;\n }", "int compFunction(int code) {\r\n int value = code % tableSize;\r\n if (value < 0) {\r\n return value + tableSize;\r\n }\r\n return value;\r\n }", "int freecabInd(int dest) {\n int index = 0;\n int min = 0;\n int minIndex = 0;\n\n for(int i=0;i<freeCab.length;i++){\n\n int matLandmark = matchingLandmark(freeCab[index][0], freeCab[index][1]);\n\n int dis = distance.dijkstra(adjancy, matLandmark, dest);\n\n if (dis < min) {\n min = dis;\n minIndex = index;\n }\n index++;\n\n }\n\n return minIndex;\n\n }", "Optional<MemoryAddress> lookup(String name);", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public Function getFunctionContaining(Address addr);", "public Instruction getInstruction(long index){\n\t\tInstruction instruction = null;\n\t\tint effectiveAddress = (int) (index-Constants.START_ADDRESS);\n\t\tif(effectiveAddress>0)\n\t\t{\n\t\t\teffectiveAddress = effectiveAddress/4;\t\t\t\n\t\t}\n\t\tif(instructions.size()>effectiveAddress)\n\t\t\tinstruction = instructions.get(effectiveAddress);\n\t\treturn instruction;\n\t}", "public static int advanceUntil(int[] array, int pos, int length, int min) {\n\t\tint lower = pos+1;\n\t\t\n\t\t// special handling for a possibly common sequential case\n\t\tif (lower >= length || array[lower] >= min) {\n\t\t return lower;\n\t\t}\n\n\t\tint spansize=1; // could set larger\n\t\t// bootstrap an upper limit\n\t \n\t\twhile (lower+spansize < length && array[lower+spansize] < min) \n\t\t spansize *= 2; // hoping for compiler will reduce to shift\n\t\tint upper = (lower+spansize < length) ? lower+spansize : length-1;\n\t\t\n\t\t// maybe we are lucky (could be common case when the seek ahead expected to be small and sequential will otherwise make us look bad)\n\t\tif (array[upper] == min) {\n\t\t return upper;\n\t\t}\n\t\t\n\t\tif (array[upper] < min) {// means array has no item >= min\n\t\t //pos = array.length;\n\t\t return length;\n\t\t}\n\n\t\t// we know that the next-smallest span was too small\n\t\tlower += (spansize/2);\n\n\t\t// else begin binary search\n\t\t// invariant: array[lower]<min && array[upper]>min\n\t\tint mid=0;\n\t\twhile (lower+1 != upper) {\n\t\t mid = (lower+upper)/2;\n\t\t if (array[mid] == min) {\n\t\t\treturn mid;\n\t\t } else\n\t\t\tif (array[mid] < min) \n\t\t\t lower = mid;\n\t\t\telse\n\t\t\t upper = mid;\n\t\t}\n\t\treturn upper;\n\n\t}", "public RTWLocation firstN(int n);", "public static int getMin(ArrayList<QuoteShort> data, int begin, int end) {\n\t\tint min = 999999999;\r\n\t\tint minIndex = -1;\r\n\t\tif (begin<=0) begin = 0;\r\n\t\tfor (int i=begin;i<=end;i++){\r\n\t\t\tif (data.get(i).getHigh5()<=min){\r\n\t\t\t\tmin = data.get(i).getLow5();\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn minIndex;\r\n\t}", "public static int offset_min() {\n return (56 / 8);\n }", "private void findStartOfBlock () {\n int index = 0;\n blockEnded = false;\n blockStarted = false;\n while ((! blockStarted) && (! endOfText())) {\n String line = getNextLine();\n if (line.equals (getBlockStart())) {\n blockStarted = true;\n } // end if line contains block start string\n } // end while looking for start of block\n lineHasLabel = false;\n while ((! lineHasLabel) && (! endOfText())) {\n getNextLine();\n }\n }", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }", "private static long getFirstOffset(long currentOffset, int limit) {\n\t\tlong firstOffset = currentOffset;\n\n\t\twhile(firstOffset > limit) {\n\t\t\tfirstOffset -= limit;\n\t\t}\n\n\t\treturn firstOffset;\n\t}", "int getStartSearch();", "private void gotoMinOf(IntTree<V> node) {\n while (node.size > 0) {\n stack = stack.plus(node);\n key += node.key;\n node = node.left;\n }\n }", "public static int forwardScanBit(long map, int start)\n {\n if ( start < 64 )\n {\n start = Math.max(start, 0);\n long bit = 1L << start;\n\n for (int i = start; i <= 63; i++, bit <<= 1)\n {\n if ((map & bit) != 0) return i;\n }\n }\n return 64;\n }", "public int load(int offset){\n return runStack.load(offset);\n }", "private String getDeasLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return symbols[key] + \": \";\n }\n return \"\";\n }", "public Data getDataAfter(Address addr);", "public static BinaryExpression lessThan(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public int getLowerBound ();", "public Double peekAhead(int in);", "public static int lower_bound(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] >= key)\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid - 1;\n\t\t}\n\t\treturn low;\n\t}", "static int check_for_label(String instruction){\n\t\tif(instruction.length()<=4)//For memory values\n\t\t\treturn 0;\n\t\tString first_code = instruction.split(\" \")[0];\n\t\tint len = -1;\n\t\tfor(int i=0;i<possible_codes.length;i++)\n\t\t\tif(possible_codes[i].equals(first_code))\n\t\t\t\tlen = 0;\n\t\tif(len!=0){\n\t\t\tlabels.put(first_code,address);\n\t\t\tlen = first_code.length()+1;\n\t\t}\n\t\treturn len;\n\t}", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "int getStartLineNumber();", "private static boolean runStateLessThan(int c, int s) {\n return c < s;\n }", "private static StartTag findPreviousOrNext(Source source, int pos, boolean previous) {\n\t\ttry {\r\n\t\t\tStartTag previousComment=source.findPreviousStartTag(pos,SpecialTag.COMMENT.getName());\r\n\t\t\tif (previousComment!=null) {\r\n\t\t\t\tif (previousComment.end>pos) {\r\n\t\t\t\t\t// the current position lies within the comment\r\n\t\t\t\t\tif (previous || pos==previousComment.begin) return previousComment; // return the comment if finding previous or comment starts at pos.\r\n\t\t\t\t\tpos=previousComment.end; // skip all tags within the comment\r\n\t\t\t\t}\r\n\t\t\t\tif (!previous) previousComment=null; // the previous comment is now no longer relevant if we are searching forward\r\n\t\t\t}\r\n\t\t\tString lsource=source.getParseTextLowerCase();\r\n\t\t\tint begin=pos;\r\n\t\t\tdo {\r\n\t\t\t\tbegin=previous?lsource.lastIndexOf('<',begin):lsource.indexOf('<',begin);\r\n\t\t\t\tif (begin==-1) return null;\r\n\t\t\t\tif (previousComment!=null && previousComment.encloses(begin)) return previousComment; // return the comment if finding previous and current position lies within the comment\r\n\t\t\t\tString tagAtCacheKey=SearchCache.getTagKey(begin);\r\n\t\t\t\tTag tag=(Tag)source.getSearchCache().getTag(tagAtCacheKey);\r\n\t\t\t\tif (tag instanceof StartTag) return (StartTag)tag;\r\n\t\t\t\tif (tag!=null || lsource.charAt(begin+1)=='/') continue; // end tag or CACHED_NULL\r\n\t\t\t\tint nameBegin=begin+1;\r\n\t\t\t\tint nameEnd;\r\n\t\t\t\tString name=null;\r\n\t\t\t\tStartTag startTag=null;\r\n\t\t\t\tSpecialTag specialTag=SpecialTag.get(source,nameBegin);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (specialTag!=null) {\r\n\t\t\t\t\t\tstartTag=newSpecialStartTag(source,begin,nameBegin,specialTag);\r\n\t\t\t\t\t\tif (startTag!=null) return startTag;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tnameEnd=source.getIdentifierEnd(nameBegin,true);\r\n\t\t\t\t\tif (nameEnd==-1) {\r\n\t\t\t\t\t\tsource.log(\"StartTag\",null,begin,\"rejected because it has an invalid first character in its name\",-1);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tname=lsource.substring(nameBegin,nameEnd);\r\n\t\t\t\t\tstartTag=constructWithAttributes(source,begin,name,null);\r\n\t\t\t\t\tif (startTag!=null) return startTag;\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tsource.getSearchCache().setTag(tagAtCacheKey,startTag);\r\n\t\t\t\t}\r\n\t\t\t} while (inRange(source,begin+=(previous?-2:2)));\r\n\t\t} catch (IndexOutOfBoundsException ex) {}\r\n\t\treturn null;\r\n\t}", "private int getInclusiveTopIndexStartOffset() {\n \n \t\tif (fTextWidget != null && !fTextWidget.isDisposed()) {\n \t\t\tint top= -1;\n \t\t\tif (fSourceViewer instanceof ITextViewerExtension5) {\n \t\t\t\ttop= fTextWidget.getTopIndex();\n \t\t\t\tif ((fTextWidget.getTopPixel() % fTextWidget.getLineHeight()) != 0)\n \t\t\t\t\ttop--;\n \t\t\t\tITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;\n \t\t\t\ttop= extension.widgetLine2ModelLine(top);\n \t\t\t} else {\n \t\t\t\ttop= fSourceViewer.getTopIndex();\n \t\t\t\tif ((fTextWidget.getTopPixel() % fTextWidget.getLineHeight()) != 0)\n \t\t\t\t\ttop--;\n \t\t\t}\n \n \t\t\ttry {\n \t\t\t\tIDocument document= fSourceViewer.getDocument();\n \t\t\t\treturn document.getLineOffset(top);\n \t\t\t} catch (BadLocationException x) {\n \t\t\t}\n \t\t}\n \n \t\treturn -1;\n \t}", "public int nextIndexOf(String identifier){\n Token token;\n int tempCurrentToken = currentToken, result;\n \n nextTokenOf(identifier);\n result = currentToken;\n currentToken = tempCurrentToken;\n return result;\n }", "public static int offset_offset_cmp() {\n return (168 / 8);\n }", "public int findMemory( int size )\n {\n // represents the smallest available freeBlock within out freeBlock list\n // that will accommodate the size of the entry.\n int smallestFreeBlock = poolSize + 1;\n int position = -1;\n freeBlockList.moveToStart();\n freeBlockList.next();\n while ( !freeBlockList.isAtEnd() )\n {\n Object[] keyArray =\n freeBlockList.getCurrentElement().keySet().toArray();\n Integer key = (Integer)keyArray[0];\n\n if ( ( freeBlockList.getCurrentElement().get( key ) < smallestFreeBlock )\n && ( freeBlockList.getCurrentElement().get( key ) >= size ) )\n {\n position = key;\n smallestFreeBlock = freeBlockList.getCurrentElement().get( key );\n }\n freeBlockList.next();\n }\n\n return position;\n\n }", "public Criteria andAddressLessThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"address < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "private int findTokenStart() {\n\n\t\tint tokenStart = NOTOKENFOUND;\n\t\t//find starting position of token\n\t\twhile ( tokenStart == NOTOKENFOUND)\n\t\t{\n\t\t\t//empty line, but more lines to read\n\t\t\tif (line.length() == 0 && s.hasNextLine()) \n\t\t\t{\n\t\t\t\t//read next line\n\t\t\t\tline = s.nextLine(); \n\t\t\t}\n\t\t\t//empty line, and no more lines to read\n\t\t\telse if (line.length() == 0 && !s.hasNextLine() )\n\t\t\t{\n\t\t\t\treturn NOTOKENFOUND;\n\t\t\t}\n\t\t\t//line not empty\n\t\t\telse if (line.length() > 0)\n\t\t\t{\n\t\t\t\t//convert to characters[]\n\t\t\t\tchar[] characters = line.toCharArray();\n\t\t\t\t//find position of token in line.\n\t\t\t\ttokenStart = findFirstNotWhitespace(characters);\n\t\t\t\t//empty line if no token found.\n\t\t\t\tif (tokenStart == NOTOKENFOUND)\n\t\t\t\t{\t\n\t\t\t\t\t//empty the line.\n\t\t\t\t\tline = \"\";\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//token was found!\n\t\treturn tokenStart;\n\t}", "int getLineOfOffset(int offset) throws BadLocationException;", "private static int indexOfSmallest(int[] a, int start) {\n int minNum = a[start];\n int minIndex = start;\n for(int i=start; i<a.length; i++){\n if(a[i]<minNum){\n minNum = a[i];\n minIndex = i;\n }\n\n }\n return minIndex;\n }", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Object next()\n/* */ {\n/* 84 */ if (this.m_offset < this.m_limit) {\n/* 85 */ return this.m_array[(this.m_offset++)];\n/* */ }\n/* 87 */ throw new NoSuchElementException();\n/* */ }", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "CodePosition getCodePosition();", "private int findBeginIndex(){\n\t\tint begin=Integer.MAX_VALUE;\n\t\tfor(int i=0;i<modelNames.size();i++){\n\t\t\tif(Integer.parseInt(modelNames.get(i).substring(0,8))>=this.date_begin)\n\t\t\t{begin=i;break;}\n\t\t}\n\t\treturn begin;\n\t}", "public Criteria andCodeLessThanColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"code < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "@Test\n public void testGetOpcodeOnLowerBoundary() {\n ProgramArea pa = new ProgramArea();\n\n pa.setOpCode(0, 0, 'a');\n\n Assert.assertEquals('a', pa.getOpCode(0, 0));\n\n Assert.assertEquals((char) 0, pa.getOpCode(-1, -1));\n }", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Loc getLoc();", "private long getLittleEndian(int addr, int bytes) throws ProgramException {\n if (addr % bytes != 0) {\n throw new ProgramException(ErrorType.ADDRL);\n }\n\n byte[] buff = new byte[bytes];\n get(addr, buff);\n\n long ret = 0;\n for (int i = 0; i < bytes; i++) {\n ret |= (buff[i] & BYTE_MASK) << (i * Byte.SIZE);\n }\n\n return ret;\n }", "public int eightMin(int[] array) {\n\t\tcountMin++;\n\t\tif (array.length != 8)\n\t\t\treturn -1;\n\t\telse {\n\t\t\tint min = array[0];\n\t\t\tint pos = 0;\n\n\t\t\tfor (int i = 1; i < array.length; i++) {\n\t\t\t\tif (array[i] < min) {\n\t\t\t\t\tpos = i;\n\t\t\t\t\tmin = array[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn pos;\n\t\t}\n\t}", "public static int offset_source() {\n return (256 / 8);\n }", "public abstract long getStartOffset();", "public int getALocationToPlaceBlock(){\n int lruIndex=-1,lruVal=-1;\n for(int i=0;i<this.localCache.length;i++){\n if(!this.localCache[i].isOccupied)// checks if the block is occupied\n return i;\n \n if(lruVal<this.localCache[i].lastUsed){// checks the last used of each block\n lruIndex=i;\n lruVal=this.localCache[i].lastUsed;\n }\n }\n \n return lruIndex;\n }", "public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}", "int canon_has_lowbits()\n{\n BytePtr test = new BytePtr(0x4000);\n int ret=1, i;\n\n CTOJ.fseek (ifp, 0, CTOJ.SEEK_SET);\n CTOJ.fread (test, 1, /*sizeof test*/0x4000, ifp);\n for (i=540; i < /*sizeof test*/0x4000 - 1; i++)\n if ( CTOJ.toUnsigned(test.at(i)) == 0xff) {\n if (test.at(i+1) != 0) return 1;\n ret=0;\n }\n return ret;\n}", "public abstract List<T> findWithOffsetFromPosition(int from, int amount);", "public Block allocateAt(long p) {\n for (Block b : freeSpace) {\n if (b.start == p)\n return checkout(b, b.length);\n }\n return null;\n }", "public int load(int offset) {\n runStack.add(runStack.get(framePointers.peek()+offset));\n return runStack.get(runStack.size()-1);\n }" ]
[ "0.6460616", "0.6274764", "0.62530065", "0.58382374", "0.5834023", "0.5737473", "0.564815", "0.55268323", "0.54871374", "0.5390867", "0.5240109", "0.52002674", "0.51540565", "0.5135533", "0.5115008", "0.5079923", "0.49638847", "0.49030128", "0.48863253", "0.4852128", "0.47461477", "0.47200847", "0.47058076", "0.46534547", "0.4603466", "0.45967627", "0.45837054", "0.45771804", "0.45746762", "0.45693517", "0.45484394", "0.45361617", "0.45061472", "0.450368", "0.45031413", "0.45003045", "0.4498363", "0.44897395", "0.4486831", "0.4481061", "0.44710973", "0.44410196", "0.44361717", "0.44209304", "0.44164273", "0.4412596", "0.44035196", "0.4389649", "0.43810973", "0.43551207", "0.43477237", "0.43462905", "0.43376073", "0.4325523", "0.4322478", "0.43106082", "0.43091756", "0.4296197", "0.42938995", "0.42927572", "0.42883128", "0.42828634", "0.4281581", "0.4279002", "0.4278643", "0.4275186", "0.4274492", "0.4263941", "0.42585653", "0.42574427", "0.42559016", "0.42509592", "0.42488372", "0.42442468", "0.42423877", "0.42358285", "0.42201164", "0.4215672", "0.4214183", "0.42136595", "0.42074367", "0.42060518", "0.4205552", "0.42044166", "0.41975084", "0.41873294", "0.41850507", "0.4184187", "0.41798243", "0.4162867", "0.41573513", "0.41533843", "0.4149412", "0.41486958", "0.41433978", "0.4140952", "0.4137729", "0.41369104", "0.4132061", "0.41316792" ]
0.6613606
0
Get an iterator that contains all code units in the program which have the specified property type defined. Standard property types are defined in the CodeUnit class. The property types are: EOL_COMMENT, PRE_COMMENT, POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE, VALUE_REFERENCE. Property types can also be user defined.
public CodeUnitIterator getCodeUnitIterator(String property, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "public interface Listing {\n\n\t/**\n\t * The name of the default tree in the display.\n\t * \n\t * @see #removeTree(String)\n\t */\n\tpublic static final String DEFAULT_TREE_NAME = \"Program Tree\";\n\n\t/**\n\t * get the code unit that starts at the given address.\n\t *\n\t * @param addr the address to look for a codeUnit.\n\t * @return the codeUnit that begins at the given address\n\t */\n\tpublic CodeUnit getCodeUnitAt(Address addr);\n\n\t/**\n\t * get the code unit that contains the given address.\n\t *\n\t * @param addr the address to look for a codeUnit.\n\t * @return the codeUnit that contains the given address\n\t */\n\tpublic CodeUnit getCodeUnitContaining(Address addr);\n\n\t/**\n\t * get the next code unit that starts an an address that is greater than the\n\t * given address. The search will include instructions, defined data, and\n\t * undefined data.\n\t *\n\t * @param addr the address from which to search forward.\n\t * @return the next CodeUnit found while searching forward from addr or null\n\t * if none found.\n\t */\n\tpublic CodeUnit getCodeUnitAfter(Address addr);\n\n\t/**\n\t * get the next code unit that starts at an address that is less than the\n\t * given address. The search will include instructions, defined data, and\n\t * undefined data.\n\t *\n\t * @param addr the address from which to search backwards.\n\t * @return The first codeUnit found while searching backwards from addr or\n\t * null if none found.\n\t */\n\tpublic CodeUnit getCodeUnitBefore(Address addr);\n\n\t/**\n\t * Get an iterator that contains all code units in the program which have\n\t * the specified property type defined. Standard property types are defined\n\t * in the CodeUnit class. The property types are: EOL_COMMENT, PRE_COMMENT,\n\t * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE, VALUE_REFERENCE.\n\t * Property types can also be user defined.\n\t *\n\t * @param property the name of the property type.\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * start address that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, boolean forward);\n\n\t/**\n\t * Get an iterator that contains the code units which have the specified\n\t * property type defined. Only code units at an address greater than or\n\t * equal to the specified start address will be returned by the iterator. If\n\t * the start address is null then check the entire program. Standard\n\t * property types are defined in the CodeUnit class. The property types are:\n\t * EOL_COMMENT, PRE_COMMENT, POST_COMMENT, USER_REFERENCE,\n\t * MNEMONIC_REFERENCE, VALUE_REFERENCE. Property types can also be user\n\t * defined.\n\t *\n\t * @param property the name of the property type. (EOL_COMMENT, PRE_COMMENT,\n\t * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE,\n\t * VALUE_REFERENCE)\n\t * @param addr the start address\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * start address that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator that contains the code units which have the specified\n\t * property type defined. Only code units starting within the address set\n\t * will be returned by the iterator. If the address set is null then check\n\t * the entire program. Standard property types are defined in the CodeUnit\n\t * class.\n\t *\n\t * @param property the name of the property type.\n\t * @param addrSet the address set\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * address set that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);\n\n\t/**\n\t * Get a forward code unit iterator over code units that have the specified\n\t * comment type.\n\t * \n\t * @param commentType type defined in CodeUnit\n\t * @param addrSet address set\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * address set that have the specified comment type defined\n\t */\n\tpublic CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);\n\n\t/**\n\t * Get a forward iterator over addresses that have the specified comment\n\t * type.\n\t * \n\t * @param commentType type defined in CodeUnit\n\t * @param addrSet address set\n\t * @param forward true to iterator from lowest address to highest, false\n\t * highest to lowest\n\t * @return an AddressIterator that returns all addresses from the indicated\n\t * address set that have the specified comment type defined\n\t */\n\tpublic AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);\n\n\t/**\n\t * Get a forward iterator over addresses that have any type of comment.\n\t * \n\t * @param addrSet address set\n\t * @param forward true to iterator from lowest address to highest, false\n\t * highest to lowest\n\t * @return an AddressIterator that returns all addresses from the indicated\n\t * address set that have any type of comment.\n\t */\n\tpublic AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * Get the comment for the given type at the specified address.\n\t *\n\t * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT,\n\t * PLATE_COMMENT, or REPEATABLE_COMMENT\n\t * @param address the address of the comment.\n\t * @return the comment string of the appropriate type or null if no comment\n\t * of that type exists for this code unit\n\t * @throws IllegalArgumentException if type is not one of the types of\n\t * comments supported\n\t */\n\tpublic String getComment(int commentType, Address address);\n\n\t/**\n\t * Set the comment for the given comment type at the specified address.\n\t *\n\t * @param address the address of the comment.\n\t * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT,\n\t * PLATE_COMMENT, or REPEATABLE_COMMENT\n\t * @param comment comment to set at the address\n\t * @throws IllegalArgumentException if type is not one of the types of\n\t * comments supported\n\t */\n\tpublic void setComment(Address address, int commentType, String comment);\n\n\t/**\n\t * get a CodeUnit iterator that will iterate over the entire address space.\n\t * \n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator in forward direction\n\t */\n\tpublic CodeUnitIterator getCodeUnits(boolean forward);\n\n\t/**\n\t * Returns an iterator of the code units in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first code unit that would be returned by an initial call\n\t * to the <code>next</code> method. An initial call to the <code>previous</code>\n\t * method would return the code unit with an address less than the specified\n\t * address.\n\t * <p>\n\t *\n\t * @param addr the start address of the iterator.\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator positioned just before addr.\n\t */\n\tpublic CodeUnitIterator getCodeUnits(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only code units whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the AddressRangeSet to iterate over (required).\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that is restricted to the give\n\t * AddressRangeSet.\n\t */\n\tpublic CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Instruction that starts at the given address. If no Instruction\n\t * has been defined to start at that address, return null.\n\t *\n\t * @param addr the address to check for the start of an instruction\n\t * @return the Instruction object that starts at addr; or null if no\n\t * Instructions starts at addr.\n\t */\n\tpublic Instruction getInstructionAt(Address addr);\n\n\t/**\n\t * get the Instruction that contains the given address. If an Instruction is\n\t * defined that contains that address, it will be returned. Otherwise, null\n\t * will be returned.\n\t *\n\t * @param addr the address to check for containment in an Instruction.\n\t * @return the Instruction object that contains addr; or null if no\n\t * Instructions contain addr.\n\t */\n\tpublic Instruction getInstructionContaining(Address addr);\n\n\t/**\n\t * get the closest Instruction that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr The address at which to begin the forward search.\n\t * @return the next Instruction whose starting address is greater than addr.\n\t */\n\tpublic Instruction getInstructionAfter(Address addr);\n\n\t/**\n\t * get the closest Instruction that starts at an address that is less than\n\t * the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest Instruction whose starting address is less than addr.\n\t */\n\tpublic Instruction getInstructionBefore(Address addr);\n\n\t/**\n\t * get an Instruction iterator that will iterate over the entire address\n\t * space.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return an InstructionIterator that iterates over all instructions in the\n\t * program.\n\t */\n\tpublic InstructionIterator getInstructions(boolean forward);\n\n\t/**\n\t * Returns an iterator of the instructions in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first instruction that would be returned by an initial call\n\t * to the <code>next</code> method. An initial call to the <code>previous</code>\n\t * method would return the instruction with an address less than the\n\t * specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return an InstructionIterator that iterates over all Instruction objects\n\t * in the given address range set.\n\t */\n\tpublic InstructionIterator getInstructions(Address addr, boolean forward);\n\n\t/**\n\t * Get an Instruction iterator over the address range(s). Only instructions\n\t * whose start addresses are contained in the given address set will be\n\t * returned by the iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * objects in the given address range set.\n\t */\n\tpublic InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (Defined or Undefined) that starts at the given address.\n\t *\n\t * @param addr the address to check for a Data object.\n\t * @return the Data object that starts at addr; or null if no Data\n\t * objects(defined or undefined) start at addr.\n\t */\n\tpublic Data getDataAt(Address addr);\n\n\t/**\n\t * Gets the data object that is at or contains the given address or null if\n\t * the address in not in memory or is in an instruction.\n\t *\n\t * @param addr the address for which to find its containing data element.\n\t * @return the Data object containing the given address or null if there is\n\t * no data that contains the address.\n\t */\n\tpublic Data getDataContaining(Address addr);\n\n\t/**\n\t * get the closest Data object that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @return the next Data object whose starting address is greater than addr.\n\t */\n\tpublic Data getDataAfter(Address addr);\n\n\t/**\n\t * get the closest Data object that starts at an address that is less than\n\t * the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest Data object whose starting address is less than addr.\n\t */\n\tpublic Data getDataBefore(Address addr);\n\n\t/**\n\t * get a Data iterator that will iterate over the entire address space;\n\t * returning both defined and undefined Data objects.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * object in the program.\n\t */\n\tpublic DataIterator getData(boolean forward);\n\n\t/**\n\t * Returns an iterator of the data in this listing (in proper sequence),\n\t * starting at the specified address. The specified address indicates the\n\t * first Data that would be returned by an initial call to the <code>next</code>\n\t * method. An initial call to the <code>previous</code> method would return the\n\t * Data with an address less than the specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all Data objects in the given\n\t * address range set.\n\t */\n\tpublic DataIterator getData(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only data whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * objects in the given address range set.\n\t */\n\tpublic DataIterator getData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (defined) object that starts at the given address. If no\n\t * Data object is defined at that address, then return null.\n\t *\n\t * @param addr The address to check for defined Data.\n\t * @return a Data object that starts at addr, or null if no Data object has\n\t * been defined to start at addr.\n\t */\n\tpublic Data getDefinedDataAt(Address addr);\n\n\t/**\n\t * get the Data object that starts at the given address. If no Data objects\n\t * have been defined that contain that address, then return null.\n\t *\n\t * @param addr the address to check for containment in a defined Data\n\t * object.\n\t * @return the defined Data object containing addr.\n\t */\n\tpublic Data getDefinedDataContaining(Address addr);\n\n\t/**\n\t *\n\t * get the defined Data object that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @return the next defined Data object whose starting address is greater\n\t * than addr.\n\t */\n\tpublic Data getDefinedDataAfter(Address addr);\n\n\t/**\n\t * get the closest defined Data object that starts at an address that is\n\t * less than the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest defined Data object whose starting address is less\n\t * than addr.\n\t */\n\tpublic Data getDefinedDataBefore(Address addr);\n\n\t/**\n\t * get a Data iterator that will iterate over the entire address space;\n\t * returning only defined Data objects.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * program.\n\t */\n\tpublic DataIterator getDefinedData(boolean forward);\n\n\t/**\n\t * Returns an iterator of the defined data in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first defined Data that would be returned by an initial\n\t * call to the <code>next</code> method. An initial call to the\n\t * <code>previous</code> method would return the defined Data with an address\n\t * less than the specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * given address range set.\n\t */\n\tpublic DataIterator getDefinedData(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only defined data whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * given address range set.\n\t */\n\tpublic DataIterator getDefinedData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (undefined) object that starts at the given address.\n\t *\n\t * @param addr The address to check for undefined data.\n\t * @return a default DataObject if bytes exist at addr and nothing has been\n\t * defined to exist there. Otherwise returns null.\n\t */\n\tpublic Data getUndefinedDataAt(Address addr);\n\n\t/**\n\t * Get the undefined Data object that starts at an address that is greater\n\t * than the given address. This operation can be slow for large programs so\n\t * a TaskMonitor is required.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t * @return the next undefined Data object whose starting address is greater\n\t * than addr.\n\t */\n\tpublic Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);\n\n\t/**\n\t * Get the undefined Data object that falls within the set. This operation\n\t * can be slow for large programs so a TaskMonitor is required.\n\t *\n\t * @param set the addressSet at which to find the first undefined address.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t *\n\t * @return the next undefined Data object whose starting address falls\n\t * within the addresSet.\n\t */\n\tpublic Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);\n\n\t/**\n\t * get the closest undefined Data object that starts at an address that is\n\t * less than the given address. This operation can be slow for large\n\t * programs so a TaskMonitor is required.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t * @return the closest undefined Data object whose starting address is less\n\t * than addr.\n\t */\n\tpublic Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);\n\n\t/**\n\t * Get the address set which corresponds to all undefined code units within\n\t * the specified set of address.\n\t *\n\t * @param set set of addresses to search\n\t * @param initializedMemoryOnly if true set will be constrained to\n\t * initialized memory areas, if false set will be constrained to\n\t * all defined memory blocks.\n\t * @param monitor task monitor\n\t * @return address set corresponding to undefined code units\n\t * @throws CancelledException if monitor cancelled\n\t */\n\tpublic AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly,\n\t\t\tTaskMonitor monitor) throws CancelledException;\n\n\t/**\n\t * Returns the next instruction or defined data after the given address;\n\t *\n\t * @param addr the address at which to begin the search\n\t * @return the next instruction or defined data at an address higher than\n\t * the given address.\n\t */\n\tpublic CodeUnit getDefinedCodeUnitAfter(Address addr);\n\n\t/**\n\t * Returns the closest instruction or defined data that starts before the\n\t * given address.\n\t *\n\t * @param addr the address at which to begin the search\n\t * @return the closest instruction or defined data at an address below the\n\t * given address.\n\t */\n\tpublic CodeUnit getDefinedCodeUnitBefore(Address addr);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) in the program.\n\t *\n\t * @param forward true means get iterator that starts at the minimum address\n\t * and iterates forward. Otherwise it starts at the maximum\n\t * address and iterates backwards.\n\t * @return an iterator over all the composite data objects.\n\t */\n\tpublic DataIterator getCompositeData(boolean forward);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) in the program at or after the given Address.\n\t *\n\t * @param start start of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return an iterator over all the composite data objects starting with the\n\t * given address.\n\t */\n\tpublic DataIterator getCompositeData(Address start, boolean forward);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) within the specified address set in the program.\n\t *\n\t * @param addrSet the address set\n\t * @param forward true means get iterator in forward direction\n\t * @return an iterator over all the composite data objects in the given\n\t * address set.\n\t */\n\tpublic DataIterator getCompositeData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * Returns an iterator over all user defined property names.\n\t *\n\t * @return an iterator over all user defined property names.\n\t */\n\tpublic Iterator<String> getUserDefinedProperties();\n\n\t/**\n\t * Removes the entire property from the program\n\t *\n\t * @param propertyName the name of the property to remove.\n\t */\n\tpublic void removeUserDefinedProperty(String propertyName);\n\n\t/**\n\t * Returns the PropertyMap associated with the given name\n\t *\n\t * @param propertyName the property name\n\t * @return PropertyMap the propertyMap object.\n\t */\n\tpublic PropertyMap getPropertyMap(String propertyName);\n\n\t/**\n\t * Creates a new Instruction object at the given address. The specified\n\t * context is only used to create the associated prototype. It is critical\n\t * that the context be written immediately after creation of the instruction\n\t * and must be done with a single set operation on the program context. Once\n\t * a set context is done on the instruction address, any subsequent context\n\t * changes will result in a <code>ContextChangeException</code>\n\t *\n\t * @param addr the address at which to create an instruction\n\t * @param prototype the InstructionPrototype that describes the type of instruction to create.\n\t * @param memBuf buffer that provides the bytes that make up the instruction.\n\t * @param context the processor context at this location.\n\t * @param length instruction byte-length (must be in the range 0..prototype.getLength()).\n\t * If smaller than the prototype length it must have a value no greater than 7, otherwise\n\t * an error will be thrown. A value of 0 or greater-than-or-equal the prototype length\n\t * will be ignored and not impose and override length. The length value must be a multiple \n\t * of the {@link Language#getInstructionAlignment() instruction alignment} .\n\t * @return the newly created instruction. \n\t * @throws CodeUnitInsertionException thrown if the new Instruction would overlap and \n\t * existing {@link CodeUnit} or the specified {@code length} is unsupported.\n\t * @throws IllegalArgumentException if a negative {@code length} is specified.\n\t */\n\tpublic Instruction createInstruction(Address addr, InstructionPrototype prototype,\n\t\t\tMemBuffer memBuf, ProcessorContextView context, int length)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a complete set of instructions. A preliminary pass will be made\n\t * checking for code unit conflicts which will be marked within the\n\t * instructionSet causing dependent blocks to get pruned.\n\t * \n\t * @param instructionSet the set of instructions to be added. All code unit\n\t * conflicts will be marked within the instructionSet and\n\t * associated blocks.\n\t * @param overwrite if true, overwrites existing code units.\n\t * @throws CodeUnitInsertionException if the instruction set is incompatible\n\t * with the program memory\n\t * @return the set of addresses over which instructions were actually added\n\t * to the program. This may differ from the InstructionSet address\n\t * set if conflict errors occurred. Such conflict errors will be\n\t * recorded within the InstructionSet and its InstructionBlocks.\n\t */\n\tpublic AddressSetView addInstructions(InstructionSet instructionSet, boolean overwrite)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a new defined Data object of a given length at the given address.\n\t * This ignores the bytes that are present\n\t *\n\t * @param addr the address at which to create a new Data object.\n\t * @param dataType the Data Type that describes the type of Data object to\n\t * create.\n\t * @param length the length of the datatype.\n\t * @return newly created data unit\n\t * @exception CodeUnitInsertionException thrown if the new Instruction would\n\t * overlap and existing Instruction or defined data.\n\t */\n\tpublic Data createData(Address addr, DataType dataType, int length)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a new defined Data object at the given address. This ignores the\n\t * bytes that are present\n\t *\n\t * @param addr the address at which to create a new Data object.\n\t * @param dataType the Data Type that describes the type of Data object to\n\t * create.\n\t * @return newly created data unit\n\t * @exception CodeUnitInsertionException thrown if the new Instruction would\n\t * overlap and existing Instruction or defined data.\n\t */\n\tpublic Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;\n\n\t/**\n\t * Clears any code units in the given range returning everything to \"db\"s,\n\t * and removing any references in the affected area. Note that the module\n\t * and fragment structure is unaffected. If part of a code unit is contained\n\t * in the given address range then the whole code unit will be cleared.\n\t *\n\t * @param startAddr the start address of the area to be cleared.\n\t * @param endAddr the end address of the area to be cleared.\n\t * @param clearContext clear context register values if true\n\t */\n\tpublic void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext);\n\n\t/**\n\t * Clears any code units in the given range returning everything to \"db\"s,\n\t * and removing any references in the affected area. Note that the module\n\t * and fragment structure is unaffected. If part of a code unit is contained\n\t * in the given address range then the whole code unit will be cleared.\n\t *\n\t * @param startAddr the start address of the area to be cleared.\n\t * @param endAddr the end address of the area to be cleared.\n\t * @param clearContext clear context register values if true\n\t * @param monitor monitor that can be used to cancel the clear operation\n\t * @throws CancelledException if the operation was cancelled.\n\t */\n\tpublic void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext,\n\t\t\tTaskMonitor monitor) throws CancelledException;\n\n\t/**\n\t * Checks if the given ranges consists entirely of undefined data.\n\t * \n\t * @param start The start address of the range to check.\n\t * @param end The end address of the range to check.\n\t * @return boolean true if the given range is in memory and has no\n\t * instructions or defined data.\n\t */\n\tpublic boolean isUndefined(Address start, Address end);\n\n\t/**\n\t * Clears the comments in the given range.\n\t * \n\t * @param startAddr the start address of the range to be cleared\n\t * @param endAddr the end address of the range to be cleared\n\t */\n\tpublic void clearComments(Address startAddr, Address endAddr);\n\n\t/**\n\t * Clears the properties in the given range.\n\t * \n\t * @param startAddr the start address of the range to be cleared\n\t * @param endAddr the end address of the range to be cleared\n\t * @param monitor task monitor for cancelling operation.\n\t * @throws CancelledException if the operation was cancelled.\n\t */\n\tpublic void clearProperties(Address startAddr, Address endAddr, TaskMonitor monitor)\n\t\t\tthrows CancelledException;\n\n\t/**\n\t * Removes all CodeUnits, comments, properties, and references from the\n\t * listing.\n\t * \n\t * @param clearContext if true, also clear any instruction context that has\n\t * been laid down from previous disassembly.\n\t * @param monitor used for tracking progress and cancelling the clear\n\t * operation.\n\t */\n\tpublic void clearAll(boolean clearContext, TaskMonitor monitor);\n\n\t/**\n\t * Returns the fragment containing the given address.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param addr the address that is contained within a fragment.\n\t *\n\t * @return will return null if the address is not in the program.\n\t */\n\tpublic ProgramFragment getFragment(String treeName, Address addr);\n\n\t/**\n\t * Returns the module with the given name.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param name the name of the module to find.\n\t *\n\t * @return will return null if there is no module with the given name.\n\t */\n\tpublic ProgramModule getModule(String treeName, String name);\n\n\t/**\n\t * Returns the fragment with the given name.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param name the name of the fragment to find.\n\t *\n\t * @return will return null if there is no fragment with the given name.\n\t */\n\tpublic ProgramFragment getFragment(String treeName, String name);\n\n\t/**\n\t * Create a new tree that will be identified by the given name. By default,\n\t * the new root module is populated with fragments based on memory blocks.\n\t * Note that the root module's name is not the same as its tree name. The\n\t * root module name defaults to the name of the program.\n\t * \n\t * @param treeName name of the tree to search\n\t * @return root module\n\t * @throws DuplicateNameException if a tree with the given name already\n\t * exists\n\t */\n\tpublic ProgramModule createRootModule(String treeName) throws DuplicateNameException;\n\n\t/**\n\t * Gets the root module for a tree in this listing.\n\t * \n\t * @param treeName name of tree\n\t *\n\t * @return the root module for the listing; returns null if there is no tree\n\t * rooted at a module with the given name.\n\t */\n\tpublic ProgramModule getRootModule(String treeName);\n\n\t/**\n\t * Returns the root module of the program tree with the given name;\n\t * \n\t * @param treeID id of the program tree\n\t * @return the root module of the specified tree.\n\t */\n\tpublic ProgramModule getRootModule(long treeID);\n\n\t/**\n\t * Returns the root module for the default program tree. This would be the\n\t * program tree that has existed the longest.\n\t *\n\t * @return the root module for the oldest existing program tree.\n\t */\n\tpublic ProgramModule getDefaultRootModule();\n\n\t/**\n\t * Get the names of all the trees defined in this listing.\n\t *\n\t * @return the names of all program trees defined in the program.\n\t */\n\tpublic String[] getTreeNames();\n\n\t/**\n\t * Remove the tree rooted at the given name.\n\t * \n\t * @param treeName the name of the tree to remove.\n\t * @return true if the tree was removed; return false if this is the last\n\t * tree for the program; cannot delete the last tree.\n\t */\n\tpublic boolean removeTree(String treeName);\n\n\t/**\n\t * Rename the tree. This method does not change the root module's name only\n\t * the identifier for the tree.\n\t * \n\t * @param oldName old name of the tree\n\t * @param newName new name of the tree.\n\t * @throws DuplicateNameException if newName already exists for a root\n\t * module\n\t */\n\tpublic void renameTree(String oldName, String newName) throws DuplicateNameException;\n\n\t/**\n\t * gets the total number of CodeUnits (Instructions, defined Data, and\n\t * undefined Data)\n\t *\n\t * @return the total number of CodeUnits in the listing.\n\t */\n\tpublic long getNumCodeUnits();\n\n\t/**\n\t * gets the total number of defined Data objects in the listing.\n\t *\n\t * @return the total number of defined Data objects in the listing.\n\t */\n\tpublic long getNumDefinedData();\n\n\t/**\n\t * gets the total number of Instructions in the listing.\n\t *\n\t * @return number of Instructions\n\t */\n\tpublic long getNumInstructions();\n\n\t/**\n\t * Get the data type manager for the program.\n\t * \n\t * @return the datatype manager for the program.\n\t */\n\tpublic DataTypeManager getDataTypeManager();\n\n\t/**\n\t * Create a function with an entry point and a body of addresses.\n\t * \n\t * @param name the name of the function to create\n\t * @param entryPoint the entry point for the function\n\t * @param body the address set that makes up the functions body\n\t * @param source the source of this function\n\t * @return the created function\n\t * @throws InvalidInputException if the name contains invalid characters\n\t * @throws OverlappingFunctionException if the given body overlaps with an\n\t * existing function.\n\t */\n\tpublic Function createFunction(String name, Address entryPoint, AddressSetView body,\n\t\t\tSourceType source) throws InvalidInputException, OverlappingFunctionException;\n\n\t/**\n\t * Create a function in the specified namespace with an entry point and a\n\t * body of addresses.\n\t * \n\t * @param name the name of the function to create\n\t * @param nameSpace the namespace in which to create the function\n\t * @param entryPoint the entry point for the function\n\t * @param body the address set that makes up the functions body\n\t * @param source the source of this function\n\t * @return the created function\n\t * @throws InvalidInputException if the name contains invalid characters\n\t * @throws OverlappingFunctionException if the given body overlaps with an\n\t * existing function.\n\t */\n\tpublic Function createFunction(String name, Namespace nameSpace, Address entryPoint,\n\t\t\tAddressSetView body, SourceType source)\n\t\t\tthrows InvalidInputException, OverlappingFunctionException;\n\n\t/**\n\t * Remove a function a given entry point.\n\t *\n\t * @param entryPoint entry point of function to be removed.\n\t */\n\tpublic void removeFunction(Address entryPoint);\n\n\t/**\n\t * Get a function with a given entry point.\n\t *\n\t * @param entryPoint entry point of the function\n\t * @return function at the entry point\n\t */\n\tpublic Function getFunctionAt(Address entryPoint);\n\n\t/**\n\t * Returns a list of all global functions with the given name.\n\t * \n\t * @param name the name of the functions to retrieve.\n\t * @return a list of all global functions with the given name.\n\t */\n\tpublic List<Function> getGlobalFunctions(String name);\n\n\t/**\n\t * Returns a list of all functions with the given name in the given\n\t * namespace.\n\t * \n\t * @param namespace the namespace to search for functions of the given name.\n\t * Can be null, in which case it will search the global\n\t * namespace.\n\t * @param name the name of the functions to retrieve.\n\t * @return a list of all global functions with the given name.\n\t */\n\tpublic List<Function> getFunctions(String namespace, String name);\n\n\t/**\n\t * Get a function containing an address.\n\t * \n\t * @param addr the address to search.\n\t * @return function containing this address, null otherwise\n\t */\n\tpublic Function getFunctionContaining(Address addr);\n\n\t/**\n\t * Get an iterator over all external functions\n\t * \n\t * @return an iterator over all currently defined external functions.\n\t */\n\tpublic FunctionIterator getExternalFunctions();\n\n\t/**\n\t * Get an iterator over all functions\n\t * \n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over all currently defined functions.\n\t */\n\tpublic FunctionIterator getFunctions(boolean forward);\n\n\t/**\n\t * Get an iterator over all functions starting at address\n\t * \n\t * @param start the address to start iterating at.\n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over functions\n\t */\n\tpublic FunctionIterator getFunctions(Address start, boolean forward);\n\n\t/**\n\t * Get an iterator over all functions with entry points in the address set.\n\t * \n\t * @param asv the set of addresses to iterator function entry points over.\n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over functions\n\t */\n\tpublic FunctionIterator getFunctions(AddressSetView asv, boolean forward);\n\n\t/**\n\t * Check if an address is contained in a function\n\t *\n\t * @param addr address to test\n\t * @return true if this address is in one or more functions\n\t */\n\tpublic boolean isInFunction(Address addr);\n\n\t/**\n\t * Get the comment history for comments at the given address.\n\t * \n\t * @param addr address for comments\n\t * @param commentType comment type defined in CodeUnit\n\t * @return array of comment history records\n\t */\n\tpublic CommentHistory[] getCommentHistory(Address addr, int commentType);\n\n}", "public java.util.List<CodeableConcept> type() {\n return getList(CodeableConcept.class, FhirPropertyNames.PROPERTY_TYPE);\n }", "public java.util.List<CodeableConcept> type() {\n return getList(CodeableConcept.class, FhirPropertyNames.PROPERTY_TYPE);\n }", "List<PropertyType<?>> getPropertyTypes();", "PropertyType(String propertyType) {\n this.propertyType = propertyType;\n }", "public Iterator<String> getProperties() {\n List<String> list = Collections.emptyList();\n return list.iterator();\n }", "public Iterator<String> listPropertyRange(String property)\r\n\t{\r\n\t\tOntProperty prop = obtainOntProperty(property);\r\n\t\treturn new ToStringIterator<String>(prop.listRange());\r\n\t}", "public abstract List<PropertyType> getBuiltInProperties();", "public final native KmlObjectList getElementsByType(String type) /*-{\r\n\t\treturn this.getElementsByType(type);\r\n\t}-*/;", "public Iterator<String> getUserDefinedProperties();", "public CodeUnitIterator getCodeUnits(boolean forward);", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public Iterator getTypes() {\r\n\t\treturn types == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(types.values());\r\n\t}", "public void showProperties(Class type);", "public List<ProgressConfigurationType> getConfigType(String type);", "public Iterator<String> listProperties(String ontClass)\r\n\t{\r\n\t\tOntClass ontR = obtainOntClass(ontClass);\r\n\t\treturn new ToStringIterator<String>(ontR.listDeclaredProperties());\r\n\t}", "public Set<Node> getChildByType(String type) {\n HashSet<Node> result = new HashSet<Node>();\n Iterable<Relationship> relations = gisNode.getRelationships(Direction.OUTGOING);\n for (Relationship relationship : relations) {\n Node node = relationship.getEndNode();\n if (type.equals(node.getProperty(INeoConstants.PROPERTY_TYPE_NAME, \"\"))) {\n result.add(node);\n }\n }\n return result;\n }", "List<Type> getTypeList(String type);", "public Rule compilationUnit()\n \t{\n \t\treturn sequence(\n \t\t\t\tOPT_SP,\n \t\t\t\tzeroOrMore(firstOf(using(), incUsing())),\n \t\t\t\tzeroOrMore(typeDef()),\n \t\t\t\tOPT_SP,\n \t\t\t\tzeroOrMore(doc()), // allow for extra docs at end of file (if last type commented out)\n \t\t\t\tOPT_SP,\n \t\t\t\teoi());\n \t}", "public Iterator<String> listPropertyValue(String instance, String property)\r\n\t{\r\n\t\tOntResource ontI = obtainOntResource(instance);\r\n\t\tProperty prop = obtainOntProperty(property);\r\n\t\treturn new ToStringIterator<String>(ontI.listPropertyValues(prop));\r\n\t}", "public Iterator<String> listSpecificProperties(String ontClass)\r\n\t{\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tOntClass ontR = obtainOntClass(ontClass);\r\n\t\tfor(Iterator iter = ontR.listDeclaredProperties(); iter.hasNext();)\r\n\t\t{\r\n\t\t\tOntProperty prop = (OntProperty)iter.next();\r\n\t\t\tStmtIterator si = ONT_MODEL.listStatements(prop, RDFS.domain, ontR);\r\n\t\t\tif(si.hasNext())\r\n\t\t\t\tlist.add(prop.getURI());\r\n\t\t}\r\n\t\treturn list.iterator();\r\n\t}", "public TLPropertyType getType() {\n return type;\n }", "public Interface_EntityIterator Typed( Standard_Type type) {\n return new Interface_EntityIterator(OCCwrapJavaJNI.Interface_EntityIterator_Typed(swigCPtr, this, Standard_Type.getCPtr(type) , type), true);\n }", "public List<PropertyImages> findWhereTypeEquals(String type) throws PropertyImagesDaoException\n\t{\n\t\ttry {\n\t\t\treturn getJdbcTemplate().query(\"SELECT ID, TITLE, TYPE, SIZE, SRC_URL, PROPERTY_DATA_UUID FROM \" + getTableName() + \" WHERE TYPE = ? ORDER BY TYPE\", this,type);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new PropertyImagesDaoException(\"Query failed\", e);\n\t\t}\n\t\t\n\t}", "public void testGetType() {\n System.out.println(\"getType\"); // NOI18N\n \n TypeID expResult;\n TypeID result;\n String value = \"Test value\"; // NOI18N\n TypeID type = new TypeID(TypeID.Kind.PRIMITIVE, \"javacode\");// NOI18N\n \n result = PropertyValue.createValue(primitveDescritor, type,value).getType();\n expResult = type;\n assertEquals(expResult, result);\n }", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "@Override\n public Iterator<Token> iterator() {\n return new Iterator<Token>() {\n private int left;\n private int right;\n private TokenType type;\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public boolean hasNext() {\n lex();\n return type != null;\n }\n\n @Override\n public Token next() {\n lex();\n if (type == null) {\n throw new NoSuchElementException();\n }\n Token t = new Token(type, left, right);\n left = right;\n right = -1;\n type = null;\n return t;\n }\n\n @SuppressWarnings(\"synthetic-access\")\n private void lex() {\n int n = content.length();\n while (type == null && left < n) {\n Matcher m = TOKEN.matcher(content);\n if (m.find(left)) {\n right = m.end();\n } else {\n // Do orphaned-surrogates cause this?\n throw new AssertionError(\"Index \" + left + \" in \" + content);\n }\n int cp = content.codePointAt(left);\n switch (cp) {\n case '\\t': case '\\n': case '\\r': case ' ':\n break;\n case '/':\n if (right - left == 1) {\n type = TokenType.PUNCTUATION;\n } else {\n type = null;\n if (preserveDocComments && left + 2 < right) {\n if (content.charAt(left + 1) == '*'\n && content.charAt(left + 2) == '*') {\n type = TokenType.DOC_COMMENT;\n }\n }\n }\n break;\n case '\"': case '\\'':\n type = TokenType.STRING;\n break;\n case '.':\n type = right - left == 1\n ? TokenType.PUNCTUATION : TokenType.NUMBER;\n break;\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n type = TokenType.NUMBER;\n break;\n default:\n if (Character.isUnicodeIdentifierStart(cp) || cp == '$') {\n type = TokenType.WORD;\n right = left;\n do {\n right += Character.charCount(cp);\n } while (\n right < n\n && ((cp = content.codePointAt(right)) == '$'\n || Character.isUnicodeIdentifierPart(cp)));\n } else {\n type = TokenType.PUNCTUATION;\n }\n break;\n }\n if (type == null) {\n Preconditions.checkState(right > left);\n left = right;\n }\n }\n }\n };\n }", "public interface CodeGenerator<T, S> {\n\n\tvoid setProperties(T properties);\n\n\tSet<SourceFile<S>> generate(ParserDefinition lexerDefinition) throws CodeGenerationException;\n}", "public void defineMetadataTypes(Properties properties) throws ThinklabException {\r\n\t\t\r\n\t\tfor (Object p : properties.keySet()) {\r\n\t\t\t\r\n\t\t\tif (p.toString().startsWith(KBOX_METADATA_PREFIX)) {\r\n\t\t\t\tString cid = properties.getProperty(p.toString());\r\n\t\t\t\t\r\n\t\t\t\tString[] ss = p.toString().split(\"\\\\.\");\r\n\t\t\t\tString metadataName = ss[ss.length - 1];\r\n\t\t\t\t\r\n\t\t\t\tIConcept cc = KnowledgeManager.get().requireConcept(cid);\r\n\t\t\t\tmetadataTypes.put(metadataName, cc);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "List<Location> getLocations(String coverageType);", "public Iterator<Character> getDefinedChars() {\n\t\tSortedSet<Character> dest = new TreeSet<Character>();\n\t\tSet<Key<?>> keys = properties.keys(ObservableProperties.DEFAULT);\n\t\tfor (Key<?> key : keys) {\n\t\t\tObject t = properties.get(key);\n\t\t\tif (t instanceof WritingShape && key.toString().length() == 1) {\n\t\t\t\tdest.add(key.toString().charAt(0));\n\t\t\t}\n\t\t}\n\t\treturn dest.iterator();\n\t}", "public final Iterator<PropertyDeclaration> getDeclarationIterator()\n {\n final Type superType = getSuperClass();\n\n return new FilterIterator(declarations.values().iterator(), new Predicate()\n {\n public boolean evaluate(Object object)\n {\n return superType.getProperty(((PropertyDeclaration)object).getName()) == null;\n }\n });\n }", "@Override\n public Iterator<Type> getTypeIterator() {\n // trick to convert List<TypeImpl> to List<Type> with some safety\n Iterator<Type> it = Collections.<Type> unmodifiableList(types).iterator();\n it.next();\n return it;\n }", "public Iterable<Properties> getPropertiesSets(String key);", "public List<CWLType> getTypes() {\n return types;\n }", "public int getPropertyType() {\n\t\treturn 0;\n\t}", "public static ExtendedIterator<? extends Resource> listTypes(Resource individual)\n\t{\n\t\tif (individual instanceof OntResource)\n\t\t\treturn ((OntResource)individual).listRDFTypes(false);\n\t\telse\n\t\t\treturn individual.listProperties(RDF.type).mapWith(new Map1<Statement, Resource>() {\n\t\t\t\tpublic Resource map1(Statement statement) {\n\t\t\t\t\treturn statement.getResource();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic Resource apply(Statement t) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t});\n\t}", "public List<Roi> getExamples(String classKey, String type);", "public Iterator<ODocument> getAllAsList(@Generic(\"T\") final Class<?> type) {\n return getAll(type);\n }", "public String getPropertyTypeString(String name) {\n\t//initialize();\n\tProperty p = getProperty(name);\n\tif (p == null) {\n\t return null;\n\t} else {\n\t if (name.toLowerCase().contains(\"line\")) {\n\t\treturn \"Line\";\n\t }\n\t String typeString = p.getTypeName();\n\t typeString = typeString.substring(0, 1).toUpperCase() + typeString.substring(1).toLowerCase();\n\t return typeString;\n\t}\n }", "public org.LexGrid.commonTypes.Properties getProperties() {\n return properties;\n }", "public Collection<ModuleProperty> getProperties();", "protected abstract String getFactPropertyType(Object property);", "public final ManchesterOWLSyntaxAutoComplete.propertyExpression_return propertyExpression() {\n ManchesterOWLSyntaxAutoComplete.propertyExpression_return retval = new ManchesterOWLSyntaxAutoComplete.propertyExpression_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxTree IDENTIFIER6 = null;\n ManchesterOWLSyntaxTree ENTITY_REFERENCE7 = null;\n ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return complexPropertyExpression8 = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:171:1:\n // ( IDENTIFIER | ENTITY_REFERENCE | complexPropertyExpression )\n int alt8 = 3;\n switch (input.LA(1)) {\n case IDENTIFIER: {\n alt8 = 1;\n }\n break;\n case ENTITY_REFERENCE: {\n alt8 = 2;\n }\n break;\n case INVERSE_OBJECT_PROPERTY_EXPRESSION: {\n alt8 = 3;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 8, 0, input);\n throw nvae;\n }\n switch (alt8) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:172:7:\n // IDENTIFIER\n {\n IDENTIFIER6 = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_propertyExpression462);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable().match(\n IDENTIFIER6.getText()));\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:176:9:\n // ENTITY_REFERENCE\n {\n ENTITY_REFERENCE7 = (ManchesterOWLSyntaxTree) match(input,\n ENTITY_REFERENCE,\n FOLLOW_ENTITY_REFERENCE_in_propertyExpression480);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable().match(\n ENTITY_REFERENCE7.getText()));\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:180:7:\n // complexPropertyExpression\n {\n pushFollow(FOLLOW_complexPropertyExpression_in_propertyExpression494);\n complexPropertyExpression8 = complexPropertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable()\n .match(complexPropertyExpression8 != null ? complexPropertyExpression8.node\n .getText() : null));\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "Set<TokenType> tokenTypes();", "public CustomizationPolicyPropertiesType typePropertiesType() {\n return this.typePropertiesType;\n }", "public abstract List<BeanPropertyDefinition> findProperties();", "public interface IPropertyType {\n\n /**\n * Returns PropertyType name\n *\n * @return PropertyType name\n */\n String getName();\n\n /**\n * Returns PropertyType schema\n *\n * @return PropertyType schema\n */\n String getSchema();\n\n}", "public ArrayList<Property> getProperties() {\r\n\t\ttry {\r\n\t\t\tproperties.clear();\r\n\t\t\tFileInputStream fis = new FileInputStream(PROPERTY_FILEPATH);\r\n \tObjectInputStream ois = new ObjectInputStream(fis);\r\n \t\r\n \tProperty obj = null;\r\n \twhile ((obj=(Property)ois.readObject())!=null) {\r\n \t\tproperties.add(obj);\r\n \t}\r\n \tois.close();\r\n }\r\n\t\tcatch (EOFException e) {\r\n\t\t\tSystem.out.println(\"End of file reached.\");\r\n }\r\n catch (ClassNotFoundException e) {\r\n \te.printStackTrace();\r\n }\r\n catch (IOException e) {\r\n \te.printStackTrace();\r\n }\r\n\t\treturn properties;\r\n\t}", "static public Vector getPropertyValues (Properties props, String propName)\n{\n String propertyDelimiterName = \"property.token.delimiter\";\n String delimiter = props.getProperty (propertyDelimiterName, \"::\");\n\n String listStartTokenName = \"list.startToken\";\n String listStartToken = props.getProperty (listStartTokenName, \"(\");\n\n String listEndTokenName = \"list.endToken\";\n String listEndToken = props.getProperty (listEndTokenName, \")\");\n\n Vector result = new Vector ();\n String propString = props.getProperty (propName);\n if (propString == null)\n return result;\n String propStringTrimmed = propString.trim ();\n String [] tokens = Misc.parseList (propStringTrimmed, listStartToken, listEndToken, delimiter);\n\n for (int i=0; i < tokens.length; i++)\n result.add (tokens [i]);\n\n return result;\n\n}", "Iterator<Class<? extends IToken>> getTmqlTokenIterator();", "public List<TLProperty> getElements();", "List<ReportType> findTypes();", "protected Iterator innerPropertyIterator(String[] propertyKeys) {\n HashMap<String, Property> properties = (HashMap<String, Property>) this.properties.clone();\n\n if (propertyKeys.length > 0)\n return properties.entrySet().stream()\n .filter(entry -> ElementHelper.keyExists(entry.getKey(), propertyKeys))\n .map(Map.Entry::getValue)\n .iterator();\n\n return properties.values().iterator();\n }", "public Map<String, SkylarkModuleDoc> getTypes() {\n return types;\n }", "TypeManager getTypeManager() {\n return types;\n }", "public Set<String> getConstants(PDDLType type) {\n\t\treturn filterTypedList(constants, type);\n\t}", "List<ITypeDescriptor> getSubTypes(String type) throws StoreException;", "public Iterator<Type> iterator();", "private void assertType(String snippet, Class<? extends Object> type) {\n try {\n Lexer lexer = new Lexer(new StringReader(snippet));\n Parser parser = new Parser(lexer);\n RootNode node = parser.program();\n AssignNode assignment = (AssignNode) node.get(0);\n assertTrue(assignment.getRight().getClass() == type);\n } catch (IOException e) {\n fail(e.getMessage());\n }\n }", "@Test\n public void propertyTest() throws Exception {\n String unMatchedTriples = \"\";\n StmtIterator msIter = propertyMeasuringStick.listStatements();\n while (msIter.hasNext()) {\n Statement msStmt = msIter.nextStatement();\n // TODO: find a more formal way to filter out properties we don't need to test\n if (!msStmt.getPredicate().toString().equals(\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\") &&\n !msStmt.getPredicate().toString().equals(\"http://www.w3.org/2000/01/rdf-schema#subPropertyOf\")) {\n StmtIterator poIter = propertyOutput.listStatements();\n boolean match = false;\n while (poIter.hasNext()) {\n Statement outputStmt = poIter.nextStatement();\n if (outputStmt.equals(msStmt)) {\n match = true;\n }\n }\n // If a match is not found then set this statement.\n if (!match) {\n unMatchedTriples += msStmt.getSubject() + \" \" + msStmt.getPredicate().toString() + \" \" + msStmt.getObject().toString() + \" .\\n\";\n }\n }\n }\n // Output assertion with message of results\n if (!unMatchedTriples.equals(\"\"))\n assertTrue(\"\\nThe following triples ARE in \" + propertyOutputFileName + \" but NOT in propertyMeasuringStick.n3:\\n\" + unMatchedTriples\n , false);\n else\n assertTrue(true);\n\n }", "public List getCourseTypes() throws ULMSSysException\r\n {\r\n return codeMaintainDAO.getCourseTypes();\r\n }", "public static List<DecisionKnowledgeElement> getElementsForIssueWithType(long issueId, String projectKey,\n\t\t\tString type) {\n\n\t\tList<DecisionKnowledgeElement> elements = new ArrayList<DecisionKnowledgeElement>();\n\t\tif (issueId <= 0 || projectKey == null || type == null) {\n\t\t\tLOGGER.error(\"Id, ProjectKey, Type are Invalid\");\n\t\t\treturn elements;\n\t\t}\n\t\tfor (DecisionKnowledgeInCommentEntity databaseEntry : ACTIVE_OBJECTS.find(\n\t\t\t\tDecisionKnowledgeInCommentEntity.class,\n\t\t\t\tQuery.select().where(\"PROJECT_KEY = ? AND ISSUE_ID = ? AND TYPE = ?\", projectKey, issueId, type))) {\n\t\t\telements.add(new SentenceImpl(databaseEntry));\n\t\t}\n\t\treturn elements;\n\t}", "public void testMsProjectType() throws MPXJException {\n TaskManager taskManager = getTaskManager();\n CustomPropertyDefinition col5 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"col5\", null);\n col5.getAttributes().put(CustomPropertyMapping.MSPROJECT_TYPE, \"NUMBER1\");\n\n CustomPropertyDefinition col4 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"col4\", null);\n\n CustomPropertyDefinition col3 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"col3\", null);\n col3.getAttributes().put(CustomPropertyMapping.MSPROJECT_TYPE, \"COST10\");\n\n CustomPropertyDefinition col2 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"col2\", null);\n CustomPropertyDefinition col1 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"col1\", null);\n col1.getAttributes().put(CustomPropertyMapping.MSPROJECT_TYPE, \"NUMBER3\");\n\n Map<CustomPropertyDefinition, FieldType> mapping = CustomPropertyMapping.buildMapping(taskManager);\n assertEquals(TaskField.NUMBER3, mapping.get(col1));\n assertEquals(TaskField.NUMBER4, mapping.get(col2));\n assertEquals(TaskField.COST10, mapping.get(col3));\n assertEquals(TaskField.NUMBER2, mapping.get(col4));\n assertEquals(TaskField.NUMBER1, mapping.get(col5));\n }", "private PropertyDescriptor findPropertyDesc(Class<?> type,String propertyName){\n\t\tString key=(type.getName()+PropertyAccessor.NESTED_PROPERTY_SEPARATOR+propertyName);\n\t\tif(propertyDescCache.containsKey(key)){\n\t\t\treturn propertyDescCache.get(key);\n\t\t}\n\t return doFindPropertyDesc(type.getName(), type, propertyName);\n\t}", "@Override\n\tpublic List<CustomerType> queryByUseLikeAndPage(String property, String value, int pageSize, int pageNumber) {\n\t\treturn null;\n\t}", "Collection<MCodeMember> getAllCodeMembers();", "protected Iterator getIterator(String name, String property) throws JspException {\n\n // Identify the bean containing our collection\n String beanName = name;\n if (beanName == null) {\n beanName = Constants.BEAN_KEY;\n }\n Object bean = pageContext.findAttribute(beanName);\n if (bean == null) {\n throw new JspException(messages.getMessage(\"getter.bean\", beanName));\n }\n\n // Identify the collection itself\n Object collection = bean;\n if (property != null) {\n try {\n collection = PropertyUtils.getProperty(bean, property);\n if (collection == null) {\n throw new JspException(messages.getMessage(\"getter.property\", property));\n }\n } catch (IllegalAccessException e) {\n throw new JspException(messages.getMessage(\"getter.access\", property, name));\n } catch (InvocationTargetException e) {\n Throwable t = e.getTargetException();\n throw new JspException(messages.getMessage(\"getter.result\", property, t.toString()));\n } catch (NoSuchMethodException e) {\n throw new JspException(messages.getMessage(\"getter.method\", property, name));\n }\n }\n\n // Construct and return an appropriate iterator\n if (collection.getClass().isArray()) {\n collection = Arrays.asList((Object[]) collection);\n }\n if (collection instanceof Collection) {\n return (((Collection) collection).iterator());\n } else if (collection instanceof Iterator) {\n return ((Iterator) collection);\n } else if (collection instanceof Map) {\n return (((Map) collection).entrySet().iterator());\n } else if (collection instanceof Enumeration) {\n return (IteratorUtils.asIterator((Enumeration) collection));\n } else {\n throw new JspException(messages.getMessage(\"optionsTag.iterator\", collection.toString()));\n }\n\n }", "@Test\n\tpublic void findTypeList() {\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<CustomerProperty> findAll() {\n\t\tlog.info(\"finding all CustomerProperty instances\");\n\t\ttry {\n\t\t\tfinal String queryString = \"select model from CustomerProperty model\";\n\t\t\tQuery query = getEntityManager().createQuery(queryString);\n\t\t\treturn query.getResultList();\n\t\t} catch (RuntimeException e) {\n\t\t\tlog.error(\"find all failed\", e);\n\t\t\tthrow e;\n\t\t}\n\t}", "public List<String> getlococtrltype(){\n\t\t\tList<String> lococtrl= new ArrayList<>();\n\t\t\tobj_uncleansedcommonrepo.findctrltype()\n\t\t\t.forEach(lococtrl::add);\n\t\t\treturn lococtrl;\n\t\t}", "private ColourRuleSet parse(List<String> properties)\n\t{\n\t\t@SuppressWarnings(\"unused\")\n\t\tString ruleSetName = \"\";\n\t\t\n\t\tColourRuleSet ruleSet = new ColourRuleSet(properties.size());\n\t\t\n\t\tif(!expect(\"colourset\"))\n\t\t\treturn null;\n\t\t\n\t\tSymbol symbol = scanner.getSymbol();\n\t\t\n\t\tif(symbol.type == Symbol.Type.STRING)\n\t\t{\n\t\t\truleSetName = symbol.text;\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror(\"Expected a name for the ruleset\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(!expect(\"{\"))\n\t\t\treturn null;\n\t\t\n\t\twhile(scanner.isValid()) \n\t\t{\n\t\t\tsymbol = scanner.peakSymbol();\n\t\t\tif(!symbol.text.equals(\"property\"))\n\t\t\t\tbreak;\n\t\t\t\n\t\t\treadColourRule(ruleSet, properties);\n\t\t}\n\n\t\texpect(\"}\");\n\t\t\n\t\treturn ruleSet;\n\t}", "@Override\n\tpublic List<Property> findAll() {\n\t\treturn pr.findAll();\n\t}", "public interface PropertyNamesIteratorOperations\n{\n\t/* constants */\n\t/* operations */\n\tvoid reset();\n\tboolean next_one(org.omg.CORBA.StringHolder property_name);\n\tboolean next_n(int how_many, org.omg.CosPropertyService.PropertyNamesHolder property_names);\n\tvoid destroy();\n}", "public static java.util.Iterator<org.semanticwb.model.ResourceType> listResourceTypes()\r\n {\r\n java.util.Iterator it=sclass.listInstances();\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceType>(it, true);\r\n }", "public Iterator<String> tagTypeIterator() { return tag_types.iterator(); }", "public final MF addColumnPropertyForType(Type type, Predicate<? super K> keyPredicate, Object... properties) {\n\t\tfor(final Object property : properties) {\n\t\t\taddColumnPropertyForType(type, keyPredicate, new UnaryFactory<K, Object>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Object newInstance(K k) {\n\t\t\t\t\treturn property;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn (MF) this;\n\t}", "Collection<String> getStringListValue(int type);", "public static ArrayList<XYCoord> findUsableProperties(Commander co, GameMap map)\n {\n ArrayList<XYCoord> industries = new ArrayList<XYCoord>();\n // We don't want to bother if we're trying to find nobody's properties\n if( null != co )\n {\n // Add all vacant, <co>-owned industries to the list\n for( XYCoord xyc : co.ownedProperties )\n {\n Location loc = map.getLocation(xyc);\n Unit resident = loc.getResident();\n // We only want industries we can act on, which means they need to be empty\n // TODO: maybe calculate whether the CO has enough money to buy something at this industry\n if( null == resident && loc.getOwner() == co )\n {\n if( co.getShoppingList(loc).size() > 0 )\n {\n industries.add(loc.getCoordinates());\n }\n }\n }\n }\n return industries;\n }", "public List<SecTyp> getAllTypes();", "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}", "public String[] getTypes() {\n/* 388 */ return getStringArray(\"type\");\n/* */ }", "public StringProperty typeProperty() {\n return type.getHint().textProperty();\n }", "public static final ArrayList<Units> GetUnitsForType(UnitTypes unitType)\n {\n return MethodsUnitP.GetUnitsTypeCommon(unitType);\n }", "private static List<Element> getXMLLocationTypes(Model model) {\n Set<LocationType> locTypes = new TreeSet<>(Comparators.objectsById());\n locTypes.addAll(model.getLocationTypes(null));\n List<Element> result = new ArrayList<>(locTypes.size());\n for (LocationType curType : locTypes) {\n Element typeElement = new Element(\"locationType\");\n typeElement.setAttribute(\"id\", String.valueOf(curType.getId()));\n typeElement.setAttribute(\"name\", curType.getName());\n for (String curOperation : curType.getAllowedOperations()) {\n Element opElement = new Element(\"allowedOperation\");\n opElement.setAttribute(\"name\", curOperation);\n typeElement.addContent(opElement);\n }\n result.add(typeElement);\n for (Map.Entry<String, String> curEntry\n : curType.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n typeElement.addContent(propertyElement);\n }\n }\n return result;\n }", "public List<IElementType> getMATypesForSource(IElementType relationshipType) {\r\n\t\tLinkedList<IElementType> types = new LinkedList<IElementType>();\r\n\t\tif (relationshipType == GeometryElementTypes.Line_4001) {\r\n\t\t\ttypes.add(GeometryElementTypes.Connector_2001);\r\n\t\t}\r\n\t\treturn types;\r\n\t}", "public Iterator<String> listInstanceProperties(String instance)\r\n\t{\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tOntResource ontI = obtainOntResource(instance);\r\n\t\tfor(StmtIterator props = ontI.listProperties(); props.hasNext();)\r\n\t\t\tlist.add(props.nextStatement().getPredicate().toString());\r\n\t\treturn list.iterator();\r\n\t}", "private static Map<String, Serializable> convertProps(Map<String, Serializable> properties, String typeId)\r\n {\r\n\r\n Map<String, Serializable> tmpProperties = new HashMap<String, Serializable>();\r\n if (properties != null)\r\n {\r\n tmpProperties.putAll(properties);\r\n }\r\n\r\n // Transform Alfresco properties to cmis properties\r\n for (Entry<String, String> props : ALFRESCO_TO_CMIS.entrySet())\r\n {\r\n if (tmpProperties.containsKey(props.getKey()))\r\n {\r\n tmpProperties.put(props.getValue(), tmpProperties.get(props.getKey()));\r\n tmpProperties.remove(props.getKey());\r\n }\r\n }\r\n\r\n // Take ObjectId provided in map or the default one provided by the\r\n // method\r\n String objectId = null;\r\n if (tmpProperties.containsKey(PropertyIds.OBJECT_TYPE_ID))\r\n {\r\n objectId = (String) tmpProperties.get(PropertyIds.OBJECT_TYPE_ID);\r\n }\r\n else\r\n {\r\n if (ContentModel.TYPE_CONTENT.equals(typeId))\r\n {\r\n objectId = BaseTypeId.CMIS_DOCUMENT.value();\r\n }\r\n else if (ContentModel.TYPE_FOLDER.equals(typeId))\r\n {\r\n objectId = BaseTypeId.CMIS_FOLDER.value();\r\n }\r\n else\r\n {\r\n objectId = typeId;\r\n }\r\n }\r\n\r\n // add aspects flags to objectId\r\n for (Entry<String, String> props : ALFRESCO_ASPECTS.entrySet())\r\n {\r\n if (tmpProperties.containsKey(props.getKey()) && !objectId.contains(props.getValue()))\r\n {\r\n objectId = objectId.concat(\",\" + props.getValue());\r\n }\r\n }\r\n\r\n // Log.d(TAG, objectId);\r\n\r\n tmpProperties.put(PropertyIds.OBJECT_TYPE_ID, objectId);\r\n\r\n return tmpProperties;\r\n }", "public static UnicodeSet addPropertyStarts(UnicodeSet paramUnicodeSet)\n/* */ {\n/* 2093 */ TrieIterator localTrieIterator1 = new TrieIterator(NormTrieImpl.normTrie);\n/* 2094 */ RangeValueIterator.Element localElement1 = new RangeValueIterator.Element();\n/* */ \n/* 2096 */ while (localTrieIterator1.next(localElement1)) {\n/* 2097 */ paramUnicodeSet.add(localElement1.start);\n/* */ }\n/* */ \n/* */ \n/* 2101 */ TrieIterator localTrieIterator2 = new TrieIterator(FCDTrieImpl.fcdTrie);\n/* 2102 */ RangeValueIterator.Element localElement2 = new RangeValueIterator.Element();\n/* */ \n/* 2104 */ while (localTrieIterator2.next(localElement2)) {\n/* 2105 */ paramUnicodeSet.add(localElement2.start);\n/* */ }\n/* */ \n/* 2108 */ if (isFormatVersion_2_1)\n/* */ {\n/* 2110 */ TrieIterator localTrieIterator3 = new TrieIterator(AuxTrieImpl.auxTrie);\n/* 2111 */ RangeValueIterator.Element localElement3 = new RangeValueIterator.Element();\n/* 2112 */ while (localTrieIterator3.next(localElement3)) {\n/* 2113 */ paramUnicodeSet.add(localElement3.start);\n/* */ }\n/* */ }\n/* */ \n/* 2117 */ for (int i = 44032; i < 55204; i += 28) {\n/* 2118 */ paramUnicodeSet.add(i);\n/* 2119 */ paramUnicodeSet.add(i + 1);\n/* */ }\n/* 2121 */ paramUnicodeSet.add(55204);\n/* 2122 */ return paramUnicodeSet;\n/* */ }", "public com.mozu.api.contracts.content.PropertyTypeCollection getList(com.mozu.api.DataViewMode dataViewMode, Integer pageSize, Integer startIndex, AuthTicket authTicket) throws Exception\n\t{\n\t\tMozuClient<com.mozu.api.contracts.content.PropertyTypeCollection> client = com.mozu.api.clients.content.PropertyTypeClient.getListClient(dataViewMode, pageSize, startIndex, authTicket);\n\t\tclient.setContext(_apiContext);\n\t\tclient.executeRequest();\n\t\treturn client.getResult();\n\n\t}", "@Override\n\t\tprotected void initEntitiesIteratorForType(String currentType) {\n\t\t\tif (attribute2values.isEmpty()) {\n\t\t\t\tsuper.initEntitiesIteratorForType(currentType);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\n\t\t\taddWhereClauseForAttributes(sb, currentType, attribute2values);\n\t\t\t\t\t\t\n\t \titEntities = new DatabaseEntitiesIterator(\n \t\t\t\tconnection, \n \t\t\t\tentityType2attributes.get(currentType), \n \t\t\t\tcurrentType,\n \t\t\t\tsb.toString()\n \t\t\t\t);\n\t }", "private ImmutableSet<Property> annotationBuilderPropertySet(TypeElement annotationType) {\n Nullables nullables = Nullables.fromMethods(processingEnv, ImmutableList.of());\n // Translate the annotation elements into fake Property instances. We're really only interested\n // in the name and type, so we can use them to declare a parameter of the generated\n // @AutoAnnotation method. We'll generate a parameter for every element, even elements that\n // don't have setters in the builder. The generated builder implementation will pass the default\n // value from the annotation to those parameters.\n return methodsIn(annotationType.getEnclosedElements()).stream()\n .filter(m -> m.getParameters().isEmpty() && !m.getModifiers().contains(Modifier.STATIC))\n .map(method -> annotationBuilderProperty(method, nullables))\n .collect(toImmutableSet());\n }", "private static HashMap<String, Integer> getRelationTypeValues(String property) {\n HashMap<String, Integer> relationTypeKeyValue = new HashMap<String, Integer>();\n if(StringUtils.isEmpty(property)) {\n LOGGER.warn(\"Relationship Type enumeration is empty\");\n return relationTypeKeyValue;\n }\n String[] keyValues = property.split(\"/\");\n for(String keyValueStr : keyValues) {\n String[] nameValue = keyValueStr.split(\"=\");\n if(!ArrayUtils.isEmpty(nameValue) && nameValue.length == 2) {\n relationTypeKeyValue.put(nameValue[0], Integer.valueOf(nameValue[1]));\n }\n }\n return relationTypeKeyValue;\n }", "UsedTypes getTypes();", "public List<PluginInfo> getPluginsByType(String type) {\n List<PluginInfo> typeList = new ArrayList<PluginInfo>();\n for (int i = 0; i < pl.getPlugins().size(); i++) {\n PluginInfo pi = pl.getPlugins().get(i);\n if (type.endsWith(pi.getType())) {\n typeList.add(pi);\n }\n }\n return typeList;\n }", "protected abstract boolean isSupportedTestType(Properties prop);", "private static void LessonComplexProperties() {\n EntityType emailWorkType = new EntityType(\"Work\");\n emailWorkType.setEntityTypeId(1);\n\n //instance of an object using constructor sending email in\n Email myEmail = new Email(\"[email protected]\");\n //setting email type on the Email object that is connected to EntityType Object through an instance\n myEmail.setEmailType(emailWorkType);\n\n //myEmail.getEmailType().getEntityTypeName() object within and object accessed with dot notation\n System.out.println(myEmail.getEmailAddress() + \" Type: \" + myEmail.getEmailType().getEntityTypeName() +\n myEmail.getEmailType().getEntityTypeId());\n\n //collection/list of complex(nested) objects as a property\n Employee myEmployee = new Employee();\n //Employee inherits from Person which has getEmails which sends back a List\n //then you use .add to add more emails to that List and create new Email object in that list\n myEmployee.getEmails().add(new Email(\"[email protected]\"));\n myEmployee.getEmails().add(new Email(\"[email protected]\"));\n myEmployee.getEmails().add(new Email(\"[email protected]\"));\n\n //for each statement reads email with in myEmployee object then list using getEmails\n for(Email email : myEmployee.getEmails()) {\n System.out.println(email.getEmailAddress());\n }\n\n }" ]
[ "0.59396654", "0.57630056", "0.5609544", "0.5273567", "0.5223194", "0.5187037", "0.5104233", "0.48467645", "0.48459128", "0.47885683", "0.47647503", "0.4653542", "0.462104", "0.45439145", "0.4534585", "0.4524385", "0.4490848", "0.44876853", "0.44713974", "0.44455096", "0.4437986", "0.4388801", "0.43850416", "0.43842366", "0.4374051", "0.43533716", "0.43498433", "0.43442035", "0.4342797", "0.43412587", "0.43254533", "0.42909122", "0.42890224", "0.42835027", "0.42790598", "0.4247811", "0.42293432", "0.4228754", "0.42267212", "0.42091718", "0.4190025", "0.41856048", "0.41777614", "0.41734904", "0.4171698", "0.41714045", "0.41638306", "0.41627988", "0.41506496", "0.41506267", "0.41272983", "0.41142544", "0.411037", "0.41080213", "0.41040564", "0.4094113", "0.40922147", "0.40844694", "0.40786147", "0.40771085", "0.406404", "0.40562624", "0.40553382", "0.4038017", "0.40170658", "0.40041283", "0.3998463", "0.398756", "0.39752272", "0.39746854", "0.39734724", "0.39686403", "0.3966455", "0.39656013", "0.39648876", "0.39625967", "0.39619258", "0.39603075", "0.39596188", "0.39558703", "0.3949852", "0.39482903", "0.39481282", "0.39430958", "0.39409393", "0.39398876", "0.3937798", "0.39282128", "0.39280978", "0.3926088", "0.39179057", "0.39106593", "0.3905666", "0.39020333", "0.38935593", "0.3889767", "0.38883647", "0.38807267", "0.3879432", "0.38790208" ]
0.59686714
0
Get an iterator that contains the code units which have the specified property type defined. Only code units at an address greater than or equal to the specified start address will be returned by the iterator. If the start address is null then check the entire program. Standard property types are defined in the CodeUnit class. The property types are: EOL_COMMENT, PRE_COMMENT, POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE, VALUE_REFERENCE. Property types can also be user defined.
public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeUnitIterator getCodeUnitIterator(String property, boolean forward);", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);", "public interface Listing {\n\n\t/**\n\t * The name of the default tree in the display.\n\t * \n\t * @see #removeTree(String)\n\t */\n\tpublic static final String DEFAULT_TREE_NAME = \"Program Tree\";\n\n\t/**\n\t * get the code unit that starts at the given address.\n\t *\n\t * @param addr the address to look for a codeUnit.\n\t * @return the codeUnit that begins at the given address\n\t */\n\tpublic CodeUnit getCodeUnitAt(Address addr);\n\n\t/**\n\t * get the code unit that contains the given address.\n\t *\n\t * @param addr the address to look for a codeUnit.\n\t * @return the codeUnit that contains the given address\n\t */\n\tpublic CodeUnit getCodeUnitContaining(Address addr);\n\n\t/**\n\t * get the next code unit that starts an an address that is greater than the\n\t * given address. The search will include instructions, defined data, and\n\t * undefined data.\n\t *\n\t * @param addr the address from which to search forward.\n\t * @return the next CodeUnit found while searching forward from addr or null\n\t * if none found.\n\t */\n\tpublic CodeUnit getCodeUnitAfter(Address addr);\n\n\t/**\n\t * get the next code unit that starts at an address that is less than the\n\t * given address. The search will include instructions, defined data, and\n\t * undefined data.\n\t *\n\t * @param addr the address from which to search backwards.\n\t * @return The first codeUnit found while searching backwards from addr or\n\t * null if none found.\n\t */\n\tpublic CodeUnit getCodeUnitBefore(Address addr);\n\n\t/**\n\t * Get an iterator that contains all code units in the program which have\n\t * the specified property type defined. Standard property types are defined\n\t * in the CodeUnit class. The property types are: EOL_COMMENT, PRE_COMMENT,\n\t * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE, VALUE_REFERENCE.\n\t * Property types can also be user defined.\n\t *\n\t * @param property the name of the property type.\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * start address that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, boolean forward);\n\n\t/**\n\t * Get an iterator that contains the code units which have the specified\n\t * property type defined. Only code units at an address greater than or\n\t * equal to the specified start address will be returned by the iterator. If\n\t * the start address is null then check the entire program. Standard\n\t * property types are defined in the CodeUnit class. The property types are:\n\t * EOL_COMMENT, PRE_COMMENT, POST_COMMENT, USER_REFERENCE,\n\t * MNEMONIC_REFERENCE, VALUE_REFERENCE. Property types can also be user\n\t * defined.\n\t *\n\t * @param property the name of the property type. (EOL_COMMENT, PRE_COMMENT,\n\t * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE,\n\t * VALUE_REFERENCE)\n\t * @param addr the start address\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * start address that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator that contains the code units which have the specified\n\t * property type defined. Only code units starting within the address set\n\t * will be returned by the iterator. If the address set is null then check\n\t * the entire program. Standard property types are defined in the CodeUnit\n\t * class.\n\t *\n\t * @param property the name of the property type.\n\t * @param addrSet the address set\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * address set that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);\n\n\t/**\n\t * Get a forward code unit iterator over code units that have the specified\n\t * comment type.\n\t * \n\t * @param commentType type defined in CodeUnit\n\t * @param addrSet address set\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * address set that have the specified comment type defined\n\t */\n\tpublic CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);\n\n\t/**\n\t * Get a forward iterator over addresses that have the specified comment\n\t * type.\n\t * \n\t * @param commentType type defined in CodeUnit\n\t * @param addrSet address set\n\t * @param forward true to iterator from lowest address to highest, false\n\t * highest to lowest\n\t * @return an AddressIterator that returns all addresses from the indicated\n\t * address set that have the specified comment type defined\n\t */\n\tpublic AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);\n\n\t/**\n\t * Get a forward iterator over addresses that have any type of comment.\n\t * \n\t * @param addrSet address set\n\t * @param forward true to iterator from lowest address to highest, false\n\t * highest to lowest\n\t * @return an AddressIterator that returns all addresses from the indicated\n\t * address set that have any type of comment.\n\t */\n\tpublic AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * Get the comment for the given type at the specified address.\n\t *\n\t * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT,\n\t * PLATE_COMMENT, or REPEATABLE_COMMENT\n\t * @param address the address of the comment.\n\t * @return the comment string of the appropriate type or null if no comment\n\t * of that type exists for this code unit\n\t * @throws IllegalArgumentException if type is not one of the types of\n\t * comments supported\n\t */\n\tpublic String getComment(int commentType, Address address);\n\n\t/**\n\t * Set the comment for the given comment type at the specified address.\n\t *\n\t * @param address the address of the comment.\n\t * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT,\n\t * PLATE_COMMENT, or REPEATABLE_COMMENT\n\t * @param comment comment to set at the address\n\t * @throws IllegalArgumentException if type is not one of the types of\n\t * comments supported\n\t */\n\tpublic void setComment(Address address, int commentType, String comment);\n\n\t/**\n\t * get a CodeUnit iterator that will iterate over the entire address space.\n\t * \n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator in forward direction\n\t */\n\tpublic CodeUnitIterator getCodeUnits(boolean forward);\n\n\t/**\n\t * Returns an iterator of the code units in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first code unit that would be returned by an initial call\n\t * to the <code>next</code> method. An initial call to the <code>previous</code>\n\t * method would return the code unit with an address less than the specified\n\t * address.\n\t * <p>\n\t *\n\t * @param addr the start address of the iterator.\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator positioned just before addr.\n\t */\n\tpublic CodeUnitIterator getCodeUnits(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only code units whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the AddressRangeSet to iterate over (required).\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that is restricted to the give\n\t * AddressRangeSet.\n\t */\n\tpublic CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Instruction that starts at the given address. If no Instruction\n\t * has been defined to start at that address, return null.\n\t *\n\t * @param addr the address to check for the start of an instruction\n\t * @return the Instruction object that starts at addr; or null if no\n\t * Instructions starts at addr.\n\t */\n\tpublic Instruction getInstructionAt(Address addr);\n\n\t/**\n\t * get the Instruction that contains the given address. If an Instruction is\n\t * defined that contains that address, it will be returned. Otherwise, null\n\t * will be returned.\n\t *\n\t * @param addr the address to check for containment in an Instruction.\n\t * @return the Instruction object that contains addr; or null if no\n\t * Instructions contain addr.\n\t */\n\tpublic Instruction getInstructionContaining(Address addr);\n\n\t/**\n\t * get the closest Instruction that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr The address at which to begin the forward search.\n\t * @return the next Instruction whose starting address is greater than addr.\n\t */\n\tpublic Instruction getInstructionAfter(Address addr);\n\n\t/**\n\t * get the closest Instruction that starts at an address that is less than\n\t * the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest Instruction whose starting address is less than addr.\n\t */\n\tpublic Instruction getInstructionBefore(Address addr);\n\n\t/**\n\t * get an Instruction iterator that will iterate over the entire address\n\t * space.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return an InstructionIterator that iterates over all instructions in the\n\t * program.\n\t */\n\tpublic InstructionIterator getInstructions(boolean forward);\n\n\t/**\n\t * Returns an iterator of the instructions in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first instruction that would be returned by an initial call\n\t * to the <code>next</code> method. An initial call to the <code>previous</code>\n\t * method would return the instruction with an address less than the\n\t * specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return an InstructionIterator that iterates over all Instruction objects\n\t * in the given address range set.\n\t */\n\tpublic InstructionIterator getInstructions(Address addr, boolean forward);\n\n\t/**\n\t * Get an Instruction iterator over the address range(s). Only instructions\n\t * whose start addresses are contained in the given address set will be\n\t * returned by the iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * objects in the given address range set.\n\t */\n\tpublic InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (Defined or Undefined) that starts at the given address.\n\t *\n\t * @param addr the address to check for a Data object.\n\t * @return the Data object that starts at addr; or null if no Data\n\t * objects(defined or undefined) start at addr.\n\t */\n\tpublic Data getDataAt(Address addr);\n\n\t/**\n\t * Gets the data object that is at or contains the given address or null if\n\t * the address in not in memory or is in an instruction.\n\t *\n\t * @param addr the address for which to find its containing data element.\n\t * @return the Data object containing the given address or null if there is\n\t * no data that contains the address.\n\t */\n\tpublic Data getDataContaining(Address addr);\n\n\t/**\n\t * get the closest Data object that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @return the next Data object whose starting address is greater than addr.\n\t */\n\tpublic Data getDataAfter(Address addr);\n\n\t/**\n\t * get the closest Data object that starts at an address that is less than\n\t * the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest Data object whose starting address is less than addr.\n\t */\n\tpublic Data getDataBefore(Address addr);\n\n\t/**\n\t * get a Data iterator that will iterate over the entire address space;\n\t * returning both defined and undefined Data objects.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * object in the program.\n\t */\n\tpublic DataIterator getData(boolean forward);\n\n\t/**\n\t * Returns an iterator of the data in this listing (in proper sequence),\n\t * starting at the specified address. The specified address indicates the\n\t * first Data that would be returned by an initial call to the <code>next</code>\n\t * method. An initial call to the <code>previous</code> method would return the\n\t * Data with an address less than the specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all Data objects in the given\n\t * address range set.\n\t */\n\tpublic DataIterator getData(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only data whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * objects in the given address range set.\n\t */\n\tpublic DataIterator getData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (defined) object that starts at the given address. If no\n\t * Data object is defined at that address, then return null.\n\t *\n\t * @param addr The address to check for defined Data.\n\t * @return a Data object that starts at addr, or null if no Data object has\n\t * been defined to start at addr.\n\t */\n\tpublic Data getDefinedDataAt(Address addr);\n\n\t/**\n\t * get the Data object that starts at the given address. If no Data objects\n\t * have been defined that contain that address, then return null.\n\t *\n\t * @param addr the address to check for containment in a defined Data\n\t * object.\n\t * @return the defined Data object containing addr.\n\t */\n\tpublic Data getDefinedDataContaining(Address addr);\n\n\t/**\n\t *\n\t * get the defined Data object that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @return the next defined Data object whose starting address is greater\n\t * than addr.\n\t */\n\tpublic Data getDefinedDataAfter(Address addr);\n\n\t/**\n\t * get the closest defined Data object that starts at an address that is\n\t * less than the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest defined Data object whose starting address is less\n\t * than addr.\n\t */\n\tpublic Data getDefinedDataBefore(Address addr);\n\n\t/**\n\t * get a Data iterator that will iterate over the entire address space;\n\t * returning only defined Data objects.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * program.\n\t */\n\tpublic DataIterator getDefinedData(boolean forward);\n\n\t/**\n\t * Returns an iterator of the defined data in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first defined Data that would be returned by an initial\n\t * call to the <code>next</code> method. An initial call to the\n\t * <code>previous</code> method would return the defined Data with an address\n\t * less than the specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * given address range set.\n\t */\n\tpublic DataIterator getDefinedData(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only defined data whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * given address range set.\n\t */\n\tpublic DataIterator getDefinedData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (undefined) object that starts at the given address.\n\t *\n\t * @param addr The address to check for undefined data.\n\t * @return a default DataObject if bytes exist at addr and nothing has been\n\t * defined to exist there. Otherwise returns null.\n\t */\n\tpublic Data getUndefinedDataAt(Address addr);\n\n\t/**\n\t * Get the undefined Data object that starts at an address that is greater\n\t * than the given address. This operation can be slow for large programs so\n\t * a TaskMonitor is required.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t * @return the next undefined Data object whose starting address is greater\n\t * than addr.\n\t */\n\tpublic Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);\n\n\t/**\n\t * Get the undefined Data object that falls within the set. This operation\n\t * can be slow for large programs so a TaskMonitor is required.\n\t *\n\t * @param set the addressSet at which to find the first undefined address.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t *\n\t * @return the next undefined Data object whose starting address falls\n\t * within the addresSet.\n\t */\n\tpublic Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);\n\n\t/**\n\t * get the closest undefined Data object that starts at an address that is\n\t * less than the given address. This operation can be slow for large\n\t * programs so a TaskMonitor is required.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t * @return the closest undefined Data object whose starting address is less\n\t * than addr.\n\t */\n\tpublic Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);\n\n\t/**\n\t * Get the address set which corresponds to all undefined code units within\n\t * the specified set of address.\n\t *\n\t * @param set set of addresses to search\n\t * @param initializedMemoryOnly if true set will be constrained to\n\t * initialized memory areas, if false set will be constrained to\n\t * all defined memory blocks.\n\t * @param monitor task monitor\n\t * @return address set corresponding to undefined code units\n\t * @throws CancelledException if monitor cancelled\n\t */\n\tpublic AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly,\n\t\t\tTaskMonitor monitor) throws CancelledException;\n\n\t/**\n\t * Returns the next instruction or defined data after the given address;\n\t *\n\t * @param addr the address at which to begin the search\n\t * @return the next instruction or defined data at an address higher than\n\t * the given address.\n\t */\n\tpublic CodeUnit getDefinedCodeUnitAfter(Address addr);\n\n\t/**\n\t * Returns the closest instruction or defined data that starts before the\n\t * given address.\n\t *\n\t * @param addr the address at which to begin the search\n\t * @return the closest instruction or defined data at an address below the\n\t * given address.\n\t */\n\tpublic CodeUnit getDefinedCodeUnitBefore(Address addr);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) in the program.\n\t *\n\t * @param forward true means get iterator that starts at the minimum address\n\t * and iterates forward. Otherwise it starts at the maximum\n\t * address and iterates backwards.\n\t * @return an iterator over all the composite data objects.\n\t */\n\tpublic DataIterator getCompositeData(boolean forward);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) in the program at or after the given Address.\n\t *\n\t * @param start start of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return an iterator over all the composite data objects starting with the\n\t * given address.\n\t */\n\tpublic DataIterator getCompositeData(Address start, boolean forward);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) within the specified address set in the program.\n\t *\n\t * @param addrSet the address set\n\t * @param forward true means get iterator in forward direction\n\t * @return an iterator over all the composite data objects in the given\n\t * address set.\n\t */\n\tpublic DataIterator getCompositeData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * Returns an iterator over all user defined property names.\n\t *\n\t * @return an iterator over all user defined property names.\n\t */\n\tpublic Iterator<String> getUserDefinedProperties();\n\n\t/**\n\t * Removes the entire property from the program\n\t *\n\t * @param propertyName the name of the property to remove.\n\t */\n\tpublic void removeUserDefinedProperty(String propertyName);\n\n\t/**\n\t * Returns the PropertyMap associated with the given name\n\t *\n\t * @param propertyName the property name\n\t * @return PropertyMap the propertyMap object.\n\t */\n\tpublic PropertyMap getPropertyMap(String propertyName);\n\n\t/**\n\t * Creates a new Instruction object at the given address. The specified\n\t * context is only used to create the associated prototype. It is critical\n\t * that the context be written immediately after creation of the instruction\n\t * and must be done with a single set operation on the program context. Once\n\t * a set context is done on the instruction address, any subsequent context\n\t * changes will result in a <code>ContextChangeException</code>\n\t *\n\t * @param addr the address at which to create an instruction\n\t * @param prototype the InstructionPrototype that describes the type of instruction to create.\n\t * @param memBuf buffer that provides the bytes that make up the instruction.\n\t * @param context the processor context at this location.\n\t * @param length instruction byte-length (must be in the range 0..prototype.getLength()).\n\t * If smaller than the prototype length it must have a value no greater than 7, otherwise\n\t * an error will be thrown. A value of 0 or greater-than-or-equal the prototype length\n\t * will be ignored and not impose and override length. The length value must be a multiple \n\t * of the {@link Language#getInstructionAlignment() instruction alignment} .\n\t * @return the newly created instruction. \n\t * @throws CodeUnitInsertionException thrown if the new Instruction would overlap and \n\t * existing {@link CodeUnit} or the specified {@code length} is unsupported.\n\t * @throws IllegalArgumentException if a negative {@code length} is specified.\n\t */\n\tpublic Instruction createInstruction(Address addr, InstructionPrototype prototype,\n\t\t\tMemBuffer memBuf, ProcessorContextView context, int length)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a complete set of instructions. A preliminary pass will be made\n\t * checking for code unit conflicts which will be marked within the\n\t * instructionSet causing dependent blocks to get pruned.\n\t * \n\t * @param instructionSet the set of instructions to be added. All code unit\n\t * conflicts will be marked within the instructionSet and\n\t * associated blocks.\n\t * @param overwrite if true, overwrites existing code units.\n\t * @throws CodeUnitInsertionException if the instruction set is incompatible\n\t * with the program memory\n\t * @return the set of addresses over which instructions were actually added\n\t * to the program. This may differ from the InstructionSet address\n\t * set if conflict errors occurred. Such conflict errors will be\n\t * recorded within the InstructionSet and its InstructionBlocks.\n\t */\n\tpublic AddressSetView addInstructions(InstructionSet instructionSet, boolean overwrite)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a new defined Data object of a given length at the given address.\n\t * This ignores the bytes that are present\n\t *\n\t * @param addr the address at which to create a new Data object.\n\t * @param dataType the Data Type that describes the type of Data object to\n\t * create.\n\t * @param length the length of the datatype.\n\t * @return newly created data unit\n\t * @exception CodeUnitInsertionException thrown if the new Instruction would\n\t * overlap and existing Instruction or defined data.\n\t */\n\tpublic Data createData(Address addr, DataType dataType, int length)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a new defined Data object at the given address. This ignores the\n\t * bytes that are present\n\t *\n\t * @param addr the address at which to create a new Data object.\n\t * @param dataType the Data Type that describes the type of Data object to\n\t * create.\n\t * @return newly created data unit\n\t * @exception CodeUnitInsertionException thrown if the new Instruction would\n\t * overlap and existing Instruction or defined data.\n\t */\n\tpublic Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;\n\n\t/**\n\t * Clears any code units in the given range returning everything to \"db\"s,\n\t * and removing any references in the affected area. Note that the module\n\t * and fragment structure is unaffected. If part of a code unit is contained\n\t * in the given address range then the whole code unit will be cleared.\n\t *\n\t * @param startAddr the start address of the area to be cleared.\n\t * @param endAddr the end address of the area to be cleared.\n\t * @param clearContext clear context register values if true\n\t */\n\tpublic void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext);\n\n\t/**\n\t * Clears any code units in the given range returning everything to \"db\"s,\n\t * and removing any references in the affected area. Note that the module\n\t * and fragment structure is unaffected. If part of a code unit is contained\n\t * in the given address range then the whole code unit will be cleared.\n\t *\n\t * @param startAddr the start address of the area to be cleared.\n\t * @param endAddr the end address of the area to be cleared.\n\t * @param clearContext clear context register values if true\n\t * @param monitor monitor that can be used to cancel the clear operation\n\t * @throws CancelledException if the operation was cancelled.\n\t */\n\tpublic void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext,\n\t\t\tTaskMonitor monitor) throws CancelledException;\n\n\t/**\n\t * Checks if the given ranges consists entirely of undefined data.\n\t * \n\t * @param start The start address of the range to check.\n\t * @param end The end address of the range to check.\n\t * @return boolean true if the given range is in memory and has no\n\t * instructions or defined data.\n\t */\n\tpublic boolean isUndefined(Address start, Address end);\n\n\t/**\n\t * Clears the comments in the given range.\n\t * \n\t * @param startAddr the start address of the range to be cleared\n\t * @param endAddr the end address of the range to be cleared\n\t */\n\tpublic void clearComments(Address startAddr, Address endAddr);\n\n\t/**\n\t * Clears the properties in the given range.\n\t * \n\t * @param startAddr the start address of the range to be cleared\n\t * @param endAddr the end address of the range to be cleared\n\t * @param monitor task monitor for cancelling operation.\n\t * @throws CancelledException if the operation was cancelled.\n\t */\n\tpublic void clearProperties(Address startAddr, Address endAddr, TaskMonitor monitor)\n\t\t\tthrows CancelledException;\n\n\t/**\n\t * Removes all CodeUnits, comments, properties, and references from the\n\t * listing.\n\t * \n\t * @param clearContext if true, also clear any instruction context that has\n\t * been laid down from previous disassembly.\n\t * @param monitor used for tracking progress and cancelling the clear\n\t * operation.\n\t */\n\tpublic void clearAll(boolean clearContext, TaskMonitor monitor);\n\n\t/**\n\t * Returns the fragment containing the given address.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param addr the address that is contained within a fragment.\n\t *\n\t * @return will return null if the address is not in the program.\n\t */\n\tpublic ProgramFragment getFragment(String treeName, Address addr);\n\n\t/**\n\t * Returns the module with the given name.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param name the name of the module to find.\n\t *\n\t * @return will return null if there is no module with the given name.\n\t */\n\tpublic ProgramModule getModule(String treeName, String name);\n\n\t/**\n\t * Returns the fragment with the given name.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param name the name of the fragment to find.\n\t *\n\t * @return will return null if there is no fragment with the given name.\n\t */\n\tpublic ProgramFragment getFragment(String treeName, String name);\n\n\t/**\n\t * Create a new tree that will be identified by the given name. By default,\n\t * the new root module is populated with fragments based on memory blocks.\n\t * Note that the root module's name is not the same as its tree name. The\n\t * root module name defaults to the name of the program.\n\t * \n\t * @param treeName name of the tree to search\n\t * @return root module\n\t * @throws DuplicateNameException if a tree with the given name already\n\t * exists\n\t */\n\tpublic ProgramModule createRootModule(String treeName) throws DuplicateNameException;\n\n\t/**\n\t * Gets the root module for a tree in this listing.\n\t * \n\t * @param treeName name of tree\n\t *\n\t * @return the root module for the listing; returns null if there is no tree\n\t * rooted at a module with the given name.\n\t */\n\tpublic ProgramModule getRootModule(String treeName);\n\n\t/**\n\t * Returns the root module of the program tree with the given name;\n\t * \n\t * @param treeID id of the program tree\n\t * @return the root module of the specified tree.\n\t */\n\tpublic ProgramModule getRootModule(long treeID);\n\n\t/**\n\t * Returns the root module for the default program tree. This would be the\n\t * program tree that has existed the longest.\n\t *\n\t * @return the root module for the oldest existing program tree.\n\t */\n\tpublic ProgramModule getDefaultRootModule();\n\n\t/**\n\t * Get the names of all the trees defined in this listing.\n\t *\n\t * @return the names of all program trees defined in the program.\n\t */\n\tpublic String[] getTreeNames();\n\n\t/**\n\t * Remove the tree rooted at the given name.\n\t * \n\t * @param treeName the name of the tree to remove.\n\t * @return true if the tree was removed; return false if this is the last\n\t * tree for the program; cannot delete the last tree.\n\t */\n\tpublic boolean removeTree(String treeName);\n\n\t/**\n\t * Rename the tree. This method does not change the root module's name only\n\t * the identifier for the tree.\n\t * \n\t * @param oldName old name of the tree\n\t * @param newName new name of the tree.\n\t * @throws DuplicateNameException if newName already exists for a root\n\t * module\n\t */\n\tpublic void renameTree(String oldName, String newName) throws DuplicateNameException;\n\n\t/**\n\t * gets the total number of CodeUnits (Instructions, defined Data, and\n\t * undefined Data)\n\t *\n\t * @return the total number of CodeUnits in the listing.\n\t */\n\tpublic long getNumCodeUnits();\n\n\t/**\n\t * gets the total number of defined Data objects in the listing.\n\t *\n\t * @return the total number of defined Data objects in the listing.\n\t */\n\tpublic long getNumDefinedData();\n\n\t/**\n\t * gets the total number of Instructions in the listing.\n\t *\n\t * @return number of Instructions\n\t */\n\tpublic long getNumInstructions();\n\n\t/**\n\t * Get the data type manager for the program.\n\t * \n\t * @return the datatype manager for the program.\n\t */\n\tpublic DataTypeManager getDataTypeManager();\n\n\t/**\n\t * Create a function with an entry point and a body of addresses.\n\t * \n\t * @param name the name of the function to create\n\t * @param entryPoint the entry point for the function\n\t * @param body the address set that makes up the functions body\n\t * @param source the source of this function\n\t * @return the created function\n\t * @throws InvalidInputException if the name contains invalid characters\n\t * @throws OverlappingFunctionException if the given body overlaps with an\n\t * existing function.\n\t */\n\tpublic Function createFunction(String name, Address entryPoint, AddressSetView body,\n\t\t\tSourceType source) throws InvalidInputException, OverlappingFunctionException;\n\n\t/**\n\t * Create a function in the specified namespace with an entry point and a\n\t * body of addresses.\n\t * \n\t * @param name the name of the function to create\n\t * @param nameSpace the namespace in which to create the function\n\t * @param entryPoint the entry point for the function\n\t * @param body the address set that makes up the functions body\n\t * @param source the source of this function\n\t * @return the created function\n\t * @throws InvalidInputException if the name contains invalid characters\n\t * @throws OverlappingFunctionException if the given body overlaps with an\n\t * existing function.\n\t */\n\tpublic Function createFunction(String name, Namespace nameSpace, Address entryPoint,\n\t\t\tAddressSetView body, SourceType source)\n\t\t\tthrows InvalidInputException, OverlappingFunctionException;\n\n\t/**\n\t * Remove a function a given entry point.\n\t *\n\t * @param entryPoint entry point of function to be removed.\n\t */\n\tpublic void removeFunction(Address entryPoint);\n\n\t/**\n\t * Get a function with a given entry point.\n\t *\n\t * @param entryPoint entry point of the function\n\t * @return function at the entry point\n\t */\n\tpublic Function getFunctionAt(Address entryPoint);\n\n\t/**\n\t * Returns a list of all global functions with the given name.\n\t * \n\t * @param name the name of the functions to retrieve.\n\t * @return a list of all global functions with the given name.\n\t */\n\tpublic List<Function> getGlobalFunctions(String name);\n\n\t/**\n\t * Returns a list of all functions with the given name in the given\n\t * namespace.\n\t * \n\t * @param namespace the namespace to search for functions of the given name.\n\t * Can be null, in which case it will search the global\n\t * namespace.\n\t * @param name the name of the functions to retrieve.\n\t * @return a list of all global functions with the given name.\n\t */\n\tpublic List<Function> getFunctions(String namespace, String name);\n\n\t/**\n\t * Get a function containing an address.\n\t * \n\t * @param addr the address to search.\n\t * @return function containing this address, null otherwise\n\t */\n\tpublic Function getFunctionContaining(Address addr);\n\n\t/**\n\t * Get an iterator over all external functions\n\t * \n\t * @return an iterator over all currently defined external functions.\n\t */\n\tpublic FunctionIterator getExternalFunctions();\n\n\t/**\n\t * Get an iterator over all functions\n\t * \n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over all currently defined functions.\n\t */\n\tpublic FunctionIterator getFunctions(boolean forward);\n\n\t/**\n\t * Get an iterator over all functions starting at address\n\t * \n\t * @param start the address to start iterating at.\n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over functions\n\t */\n\tpublic FunctionIterator getFunctions(Address start, boolean forward);\n\n\t/**\n\t * Get an iterator over all functions with entry points in the address set.\n\t * \n\t * @param asv the set of addresses to iterator function entry points over.\n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over functions\n\t */\n\tpublic FunctionIterator getFunctions(AddressSetView asv, boolean forward);\n\n\t/**\n\t * Check if an address is contained in a function\n\t *\n\t * @param addr address to test\n\t * @return true if this address is in one or more functions\n\t */\n\tpublic boolean isInFunction(Address addr);\n\n\t/**\n\t * Get the comment history for comments at the given address.\n\t * \n\t * @param addr address for comments\n\t * @param commentType comment type defined in CodeUnit\n\t * @return array of comment history records\n\t */\n\tpublic CommentHistory[] getCommentHistory(Address addr, int commentType);\n\n}", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public Iterator<String> listPropertyRange(String property)\r\n\t{\r\n\t\tOntProperty prop = obtainOntProperty(property);\r\n\t\treturn new ToStringIterator<String>(prop.listRange());\r\n\t}", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "List<Location> getLocations(String coverageType);", "public static UnicodeSet addPropertyStarts(UnicodeSet paramUnicodeSet)\n/* */ {\n/* 2093 */ TrieIterator localTrieIterator1 = new TrieIterator(NormTrieImpl.normTrie);\n/* 2094 */ RangeValueIterator.Element localElement1 = new RangeValueIterator.Element();\n/* */ \n/* 2096 */ while (localTrieIterator1.next(localElement1)) {\n/* 2097 */ paramUnicodeSet.add(localElement1.start);\n/* */ }\n/* */ \n/* */ \n/* 2101 */ TrieIterator localTrieIterator2 = new TrieIterator(FCDTrieImpl.fcdTrie);\n/* 2102 */ RangeValueIterator.Element localElement2 = new RangeValueIterator.Element();\n/* */ \n/* 2104 */ while (localTrieIterator2.next(localElement2)) {\n/* 2105 */ paramUnicodeSet.add(localElement2.start);\n/* */ }\n/* */ \n/* 2108 */ if (isFormatVersion_2_1)\n/* */ {\n/* 2110 */ TrieIterator localTrieIterator3 = new TrieIterator(AuxTrieImpl.auxTrie);\n/* 2111 */ RangeValueIterator.Element localElement3 = new RangeValueIterator.Element();\n/* 2112 */ while (localTrieIterator3.next(localElement3)) {\n/* 2113 */ paramUnicodeSet.add(localElement3.start);\n/* */ }\n/* */ }\n/* */ \n/* 2117 */ for (int i = 44032; i < 55204; i += 28) {\n/* 2118 */ paramUnicodeSet.add(i);\n/* 2119 */ paramUnicodeSet.add(i + 1);\n/* */ }\n/* 2121 */ paramUnicodeSet.add(55204);\n/* 2122 */ return paramUnicodeSet;\n/* */ }", "public java.util.List<ProductSpecificationMapping> findByProductType(\n\t\tString productType, int start, int end);", "public CodeUnit getCodeUnitContaining(Address addr);", "PropertyType(String propertyType) {\n this.propertyType = propertyType;\n }", "@Override\n\tpublic List<CustomerType> queryByUsePage(String property, Object value, int pageSize, int pageNumber) {\n\t\treturn null;\n\t}", "public void testGetType() {\n System.out.println(\"getType\"); // NOI18N\n \n TypeID expResult;\n TypeID result;\n String value = \"Test value\"; // NOI18N\n TypeID type = new TypeID(TypeID.Kind.PRIMITIVE, \"javacode\");// NOI18N\n \n result = PropertyValue.createValue(primitveDescritor, type,value).getType();\n expResult = type;\n assertEquals(expResult, result);\n }", "public java.util.List<CodeableConcept> type() {\n return getList(CodeableConcept.class, FhirPropertyNames.PROPERTY_TYPE);\n }", "List<PropertyType<?>> getPropertyTypes();", "public java.util.List<CodeableConcept> type() {\n return getList(CodeableConcept.class, FhirPropertyNames.PROPERTY_TYPE);\n }", "@Override\n\tpublic List<CustomerType> queryByUseLikeAndPage(String property, String value, int pageSize, int pageNumber) {\n\t\treturn null;\n\t}", "public CodeUnitIterator getCodeUnits(boolean forward);", "public java.util.List<ProductSpecificationMapping> findByProductType(\n\t\tString productType, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator\n\t\t\t<ProductSpecificationMapping> orderByComparator,\n\t\tboolean useFinderCache);", "private void assertType(String snippet, Class<? extends Object> type) {\n try {\n Lexer lexer = new Lexer(new StringReader(snippet));\n Parser parser = new Parser(lexer);\n RootNode node = parser.program();\n AssignNode assignment = (AssignNode) node.get(0);\n assertTrue(assignment.getRight().getClass() == type);\n } catch (IOException e) {\n fail(e.getMessage());\n }\n }", "public void startElement(int nameCode, int typeCode, int locationId, int properties) throws XPathException {\n if (this.locationId == -1) {\n this.locationId = locationId;\n }\n super.startElement(nameCode, typeCode, locationId, properties);\n }", "public static boolean getMemoryType(\n VkPhysicalDevice device, int bits, int properties, IntBuffer typeIndex) {\n VkPhysicalDeviceMemoryProperties memoryProperties =\n VkPhysicalDeviceMemoryProperties.calloc();\n vkGetPhysicalDeviceMemoryProperties(device, memoryProperties);\n\n boolean ret = false;\n\n for (int i = 0; i < 32; i++) {\n if ((bits & (1 << i)) > 0) {\n if ((memoryProperties.memoryTypes(i).propertyFlags() & properties) == properties) {\n typeIndex.put(0, i);\n ret = true;\n break;\n }\n }\n }\n\n memoryProperties.free();\n return ret;\n }", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "public CodeUnit getCodeUnitAt(Address addr);", "List<Building> findBuildingCoordinatesByType(String type);", "public final ManchesterOWLSyntaxAutoComplete.propertyExpression_return propertyExpression() {\n ManchesterOWLSyntaxAutoComplete.propertyExpression_return retval = new ManchesterOWLSyntaxAutoComplete.propertyExpression_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxTree IDENTIFIER6 = null;\n ManchesterOWLSyntaxTree ENTITY_REFERENCE7 = null;\n ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return complexPropertyExpression8 = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:171:1:\n // ( IDENTIFIER | ENTITY_REFERENCE | complexPropertyExpression )\n int alt8 = 3;\n switch (input.LA(1)) {\n case IDENTIFIER: {\n alt8 = 1;\n }\n break;\n case ENTITY_REFERENCE: {\n alt8 = 2;\n }\n break;\n case INVERSE_OBJECT_PROPERTY_EXPRESSION: {\n alt8 = 3;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 8, 0, input);\n throw nvae;\n }\n switch (alt8) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:172:7:\n // IDENTIFIER\n {\n IDENTIFIER6 = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_propertyExpression462);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable().match(\n IDENTIFIER6.getText()));\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:176:9:\n // ENTITY_REFERENCE\n {\n ENTITY_REFERENCE7 = (ManchesterOWLSyntaxTree) match(input,\n ENTITY_REFERENCE,\n FOLLOW_ENTITY_REFERENCE_in_propertyExpression480);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable().match(\n ENTITY_REFERENCE7.getText()));\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:180:7:\n // complexPropertyExpression\n {\n pushFollow(FOLLOW_complexPropertyExpression_in_propertyExpression494);\n complexPropertyExpression8 = complexPropertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable()\n .match(complexPropertyExpression8 != null ? complexPropertyExpression8.node\n .getText() : null));\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "public List<PropertyImages> findWhereTypeEquals(String type) throws PropertyImagesDaoException\n\t{\n\t\ttry {\n\t\t\treturn getJdbcTemplate().query(\"SELECT ID, TITLE, TYPE, SIZE, SRC_URL, PROPERTY_DATA_UUID FROM \" + getTableName() + \" WHERE TYPE = ? ORDER BY TYPE\", this,type);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new PropertyImagesDaoException(\"Query failed\", e);\n\t\t}\n\t\t\n\t}", "public final native KmlObjectList getElementsByType(String type) /*-{\r\n\t\treturn this.getElementsByType(type);\r\n\t}-*/;", "private boolean check(TokenType type) {\n return !isAtEnd() && peek().type == type;\n }", "public List<Lot> getLotsByEntityTypeAndLocationId(String type, Integer locationId, int start, int numOfRows) throws MiddlewareQueryException;", "public void showProperties(Class type);", "public CObject count_ObjectsFromType(short type, int stop)\r\n {\r\n stop++;\t\t\t\t\t\t\t\t\t// BX a partir de 1!\r\n evtNSelectedObjects = 0;\r\n\r\n int oil = 0;\r\n CObjInfo poilLoop = null;\r\n CObject pHo;\r\n do\r\n {\r\n for (; oil < rhPtr.rhOiList.length; oil++)\r\n {\r\n poilLoop = rhPtr.rhOiList[oil];\r\n if (type == 0 || (type != 0 && type == poilLoop.oilType))\r\n {\r\n break;\r\n }\r\n }\r\n if (oil == rhPtr.rhOiList.length)\r\n {\r\n return null;\r\n }\r\n\r\n CObjInfo poil = poilLoop;\r\n oil++;\r\n\r\n if (poil.oilEventCount != rh2EventCount)\r\n {\r\n if (rh4ConditionsFalse == false)\r\n {\r\n // Explore la liste entiere des objets\r\n short num = poil.oilObject;\r\n while (num >= 0)\r\n {\r\n pHo = rhPtr.rhObjectList[num];\r\n if (pHo == null)\r\n {\r\n return null;\r\n }\r\n if ((pHo.hoFlags & CObject.HOF_DESTROYED) == 0)\t\t// Deja detruit?\r\n {\r\n evtNSelectedObjects++;\r\n if (evtNSelectedObjects == stop)\r\n {\r\n return pHo;\r\n }\r\n }\r\n num = pHo.hoNumNext;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // Explore la liste des objets selectionnes\r\n short num = poil.oilListSelected;\r\n while (num >= 0)\r\n {\r\n pHo = rhPtr.rhObjectList[num];\r\n if (pHo == null)\r\n {\r\n return null;\r\n }\r\n if ((pHo.hoFlags & CObject.HOF_DESTROYED) == 0)\t\t// Deja detruit?\r\n {\r\n evtNSelectedObjects++;\r\n if (evtNSelectedObjects == stop)\r\n {\r\n return pHo;\r\n }\r\n }\r\n num = pHo.hoNextSelected;\r\n }\r\n }\r\n } while (true);\r\n }", "@SuppressWarnings(\"unchecked\") \n public List<ZipLocation> getZipCodeLocations(String city, int start, int chunkSize){\n EntityManager em = emf.createEntityManager();\n String pattern = \"'\"+city.toUpperCase()+\"%'\";\n Query query = em.createQuery(\"SELECT z FROM ZipLocation z where UPPER(z.city) LIKE \"+pattern);\n List<ZipLocation> zipCodeLocations = query.setFirstResult(start).setMaxResults(chunkSize).getResultList();\n em.close();\n return zipCodeLocations;\n }", "public int getPropertyType() {\n\t\treturn 0;\n\t}", "public Token nextTokenOf(Type type){\n Token token;\n \n while((token = nextToken()) != null){\n if(token.type == type){\n break;\n }\n }\n return token;\n }", "public List<Lot> getLotsByEntityType(String type, int start, int numOfRows) throws MiddlewareQueryException;", "public Rule compilationUnit()\n \t{\n \t\treturn sequence(\n \t\t\t\tOPT_SP,\n \t\t\t\tzeroOrMore(firstOf(using(), incUsing())),\n \t\t\t\tzeroOrMore(typeDef()),\n \t\t\t\tOPT_SP,\n \t\t\t\tzeroOrMore(doc()), // allow for extra docs at end of file (if last type commented out)\n \t\t\t\tOPT_SP,\n \t\t\t\teoi());\n \t}", "public java.util.List<ProductSpecificationMapping> findByProductType(\n\t\tString productType, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator\n\t\t\t<ProductSpecificationMapping> orderByComparator);", "public void testInScriptDeclaringType() throws Exception {\n String contents = \n \"other\\n\";\n int start = contents.lastIndexOf(\"other\");\n int end = start + \"other\".length();\n assertDeclaringType(contents, start, end, \"Search\", false, true);\n }", "public Set<Node> getChildByType(String type) {\n HashSet<Node> result = new HashSet<Node>();\n Iterable<Relationship> relations = gisNode.getRelationships(Direction.OUTGOING);\n for (Relationship relationship : relations) {\n Node node = relationship.getEndNode();\n if (type.equals(node.getProperty(INeoConstants.PROPERTY_TYPE_NAME, \"\"))) {\n result.add(node);\n }\n }\n return result;\n }", "public Interface_EntityIterator Typed( Standard_Type type) {\n return new Interface_EntityIterator(OCCwrapJavaJNI.Interface_EntityIterator_Typed(swigCPtr, this, Standard_Type.getCPtr(type) , type), true);\n }", "public final Iterator<PropertyDeclaration> getDeclarationIterator()\n {\n final Type superType = getSuperClass();\n\n return new FilterIterator(declarations.values().iterator(), new Predicate()\n {\n public boolean evaluate(Object object)\n {\n return superType.getProperty(((PropertyDeclaration)object).getName()) == null;\n }\n });\n }", "boolean hasStartLineNumber();", "boolean managePhysicalPropertiesSection(final boolean starting) {\n if (starting) {\n if (physicBlock == null) {\n // this is the first (and unique) physical properties block, we need to allocate the container\n physicBlock = new OrbitPhysicalProperties(metadata.getEpochT0());\n }\n anticipateNext(this::processPhysicalPropertyToken);\n } else {\n anticipateNext(structureProcessor);\n }\n return true;\n }", "public int nextIndexOf(Type type){\n Token token;\n int tempCurrentToken = currentToken, result;\n \n nextTokenOf(type);\n result = currentToken;\n currentToken = tempCurrentToken;\n return result;\n }", "public TLPropertyType getType() {\n return type;\n }", "public com.mozu.api.contracts.content.PropertyTypeCollection getList(com.mozu.api.DataViewMode dataViewMode, Integer pageSize, Integer startIndex, AuthTicket authTicket) throws Exception\n\t{\n\t\tMozuClient<com.mozu.api.contracts.content.PropertyTypeCollection> client = com.mozu.api.clients.content.PropertyTypeClient.getListClient(dataViewMode, pageSize, startIndex, authTicket);\n\t\tclient.setContext(_apiContext);\n\t\tclient.executeRequest();\n\t\treturn client.getResult();\n\n\t}", "private PropertyDescriptor findPropertyDesc(Class<?> type,String propertyName){\n\t\tString key=(type.getName()+PropertyAccessor.NESTED_PROPERTY_SEPARATOR+propertyName);\n\t\tif(propertyDescCache.containsKey(key)){\n\t\t\treturn propertyDescCache.get(key);\n\t\t}\n\t return doFindPropertyDesc(type.getName(), type, propertyName);\n\t}", "public List<LotReportRow> generateReportOnLotsByEntityType(String type, int start, int numOfRows) throws MiddlewareQueryException;", "public String getPropertyTypeString(String name) {\n\t//initialize();\n\tProperty p = getProperty(name);\n\tif (p == null) {\n\t return null;\n\t} else {\n\t if (name.toLowerCase().contains(\"line\")) {\n\t\treturn \"Line\";\n\t }\n\t String typeString = p.getTypeName();\n\t typeString = typeString.substring(0, 1).toUpperCase() + typeString.substring(1).toLowerCase();\n\t return typeString;\n\t}\n }", "public EsIndexPropertyBuilder setType(String type) {\n this.type = type;\n return this;\n }", "public abstract List<LocationDto> search_type_building\n (BuildingDto building, LocationTypeDto type);", "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "ActualStartType getActualStart();", "public Iterator<String> listPropertyValue(String instance, String property)\r\n\t{\r\n\t\tOntResource ontI = obtainOntResource(instance);\r\n\t\tProperty prop = obtainOntProperty(property);\r\n\t\treturn new ToStringIterator<String>(ontI.listPropertyValues(prop));\r\n\t}", "public List<ProgressConfigurationType> getConfigType(String type);", "public void testIndexTypeProperty() throws Exception {\n bean = new ManagedBeanBean();\n property = new ManagedPropertyBean();\n bean.setManagedBeanClass(beanName);\n bean.setManagedBeanScope(\"session\");\n property.setPropertyName(\"indexIntegerProperties\");\n listEntries = new ListEntriesBean();\n listEntries.setValueClass(\"java.lang.Integer\");\n listEntries.addValue(\"23\");\n property.setListEntries(listEntries);\n \n bean.addManagedProperty(property);\n \n mbf = new ManagedBeanFactory(bean);\n \n //testing with a property set\n assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));\n \n //make sure bean instantiated properly. Get property back from bean.\n ArrayList properties = (ArrayList) testBean.getIndexIntegerProperties();\n assertTrue(properties.get(1) instanceof Integer);\n \n Integer integer = new Integer(\"23\");\n assertTrue(properties.get(2).equals(integer));\n }", "protected abstract boolean isSupportedTestType(Properties prop);", "List<Type> getTypeList(String type);", "public DebugRuleElementMatch(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }", "void startEntry(String type);", "private void getPropertyFacts(AstNode node, String prop, Address addr, State state, String prefix) {\n\t\t\t\n\t\tString identifier;\n\t\tif(prefix == null) identifier = prop;\n\t\telse identifier = prefix + \".\" + prop;\n\n\t\tBValue val = state.store.apply(addr);\n\t\tif(val.nullAD.le == Null.LatticeElement.BOTTOM)\n\t\t\tregisterFact(node, identifier, \"NULL\", val.nullAD.le.toString(), val.nullAD.change.toString());\n\t\tif(val.undefinedAD.le == Undefined.LatticeElement.BOTTOM)\n\t\t\tregisterFact(node, identifier, \"UNDEFINED\", val.undefinedAD.le.toString(), val.undefinedAD.change.toString());\n\t\tif(Str.notBlank(val.stringAD))\n\t\t\tregisterFact(node, identifier, \"BLANK\", val.stringAD.toString(), val.stringAD.change.toString());\n\t\tif(Num.notZero(val.numberAD))\n\t\t\tregisterFact(node, identifier, \"ZERO\", val.numberAD.toString(), val.numberAD.change.toString());\n\t\tif(Num.notNaN(val.numberAD))\n\t\t\tregisterFact(node, identifier, \"NAN\", val.numberAD.toString(), val.numberAD.change.toString());\n\t\tif(Bool.notFalse(val.booleanAD))\n\t\t\tregisterFact(node, identifier, \"FALSE\", val.booleanAD.toString(), val.booleanAD.change.toString());\n\n\t\t/* Recursively check property values. */\n\t\tif(val.addressAD.le == LatticeElement.TOP) return;\n\t\tfor(Address objAddr : val.addressAD.addresses) {\n\t\t\tgetObjectFacts(node, state.store.getObj(objAddr).externalProperties, state, identifier);\n\t\t}\n\n\t}", "boolean tokenCanStart(Token token)\r\n {\r\n\r\n int type = token.getType();\r\n switch (type) {\r\n case MExprANTLRParserTokenTypes.NOT:\r\n case MExprANTLRParserTokenTypes.PLUS:\r\n case MExprANTLRParserTokenTypes.MINUS:\r\n case MExprANTLRParserTokenTypes.PLUSPLUS:\r\n case MExprANTLRParserTokenTypes.MINUSMINUS:\r\n case MExprANTLRParserTokenTypes.LBRACE:\r\n case MExprANTLRParserTokenTypes.LPAREN:\r\n case MExprANTLRParserTokenTypes.INT:\r\n case MExprANTLRParserTokenTypes.REAL:\r\n case MExprANTLRParserTokenTypes.ID:\r\n case MExprANTLRParserTokenTypes.STRING:\r\n case MExprANTLRParserTokenTypes.BLANK1:\r\n case MExprANTLRParserTokenTypes.IDBLANK1:\r\n case MExprANTLRParserTokenTypes.BLANKID1:\r\n case MExprANTLRParserTokenTypes.IDBLANKID1:\r\n case MExprANTLRParserTokenTypes.BLANK2:\r\n case MExprANTLRParserTokenTypes.IDBLANK2:\r\n case MExprANTLRParserTokenTypes.BLANKID2:\r\n case MExprANTLRParserTokenTypes.IDBLANKID2:\r\n case MExprANTLRParserTokenTypes.BLANK3:\r\n case MExprANTLRParserTokenTypes.IDBLANK3:\r\n case MExprANTLRParserTokenTypes.BLANKID3:\r\n case MExprANTLRParserTokenTypes.IDBLANKID3:\r\n case MExprANTLRParserTokenTypes.SLOT:\r\n case MExprANTLRParserTokenTypes.TYPESETEXPR:\r\n case MExprANTLRParserTokenTypes.PERCENT:\r\n case MExprANTLRParserTokenTypes.PERCENTNUMBER:\r\n case MExprANTLRParserTokenTypes.GET:\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "public Iterator getTypes() {\r\n\t\treturn types == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(types.values());\r\n\t}", "public void defineMetadataTypes(Properties properties) throws ThinklabException {\r\n\t\t\r\n\t\tfor (Object p : properties.keySet()) {\r\n\t\t\t\r\n\t\t\tif (p.toString().startsWith(KBOX_METADATA_PREFIX)) {\r\n\t\t\t\tString cid = properties.getProperty(p.toString());\r\n\t\t\t\t\r\n\t\t\t\tString[] ss = p.toString().split(\"\\\\.\");\r\n\t\t\t\tString metadataName = ss[ss.length - 1];\r\n\t\t\t\t\r\n\t\t\t\tIConcept cc = KnowledgeManager.get().requireConcept(cid);\r\n\t\t\t\tmetadataTypes.put(metadataName, cc);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public abstract List<BeanPropertyDefinition> findProperties();", "public CodeUnit getCodeUnitBefore(Address addr);", "List<ConnectorTypeElement> findConnectorTypes(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String searchString,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "private boolean peek(TokenType expectedType) {\n return peek(0, expectedType);\n }", "public OpinionFinding(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }", "public Iterator<String> getProperties() {\n List<String> list = Collections.emptyList();\n return list.iterator();\n }", "public String nextPropertyValue()\n {\n if (empty())\n return null;\n int start = position;\n int lastValidPos = position;\n\n int ch = input.charAt(position);\n while (ch != -1 && ch != ';' && ch != '}' && ch != '!' && !isEOL(ch)) {\n if (!isWhitespace(ch)) // don't include an spaces at the end\n lastValidPos = position + 1;\n ch = advanceChar();\n }\n if (position > start)\n return input.substring(start, lastValidPos);\n position = start;\n return null;\n }", "protected abstract String getFactPropertyType(Object property);", "public List<Lot> getLotsByEntityTypeAndEntityIdAndLocationId(String type, \n Integer entityId, Integer locationId, int start, int numOfRows) throws MiddlewareQueryException;", "public CodeUnit getDefinedCodeUnitAfter(Address addr);", "@Override\n public Iterator<Token> iterator() {\n return new Iterator<Token>() {\n private int left;\n private int right;\n private TokenType type;\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public boolean hasNext() {\n lex();\n return type != null;\n }\n\n @Override\n public Token next() {\n lex();\n if (type == null) {\n throw new NoSuchElementException();\n }\n Token t = new Token(type, left, right);\n left = right;\n right = -1;\n type = null;\n return t;\n }\n\n @SuppressWarnings(\"synthetic-access\")\n private void lex() {\n int n = content.length();\n while (type == null && left < n) {\n Matcher m = TOKEN.matcher(content);\n if (m.find(left)) {\n right = m.end();\n } else {\n // Do orphaned-surrogates cause this?\n throw new AssertionError(\"Index \" + left + \" in \" + content);\n }\n int cp = content.codePointAt(left);\n switch (cp) {\n case '\\t': case '\\n': case '\\r': case ' ':\n break;\n case '/':\n if (right - left == 1) {\n type = TokenType.PUNCTUATION;\n } else {\n type = null;\n if (preserveDocComments && left + 2 < right) {\n if (content.charAt(left + 1) == '*'\n && content.charAt(left + 2) == '*') {\n type = TokenType.DOC_COMMENT;\n }\n }\n }\n break;\n case '\"': case '\\'':\n type = TokenType.STRING;\n break;\n case '.':\n type = right - left == 1\n ? TokenType.PUNCTUATION : TokenType.NUMBER;\n break;\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n type = TokenType.NUMBER;\n break;\n default:\n if (Character.isUnicodeIdentifierStart(cp) || cp == '$') {\n type = TokenType.WORD;\n right = left;\n do {\n right += Character.charCount(cp);\n } while (\n right < n\n && ((cp = content.codePointAt(right)) == '$'\n || Character.isUnicodeIdentifierPart(cp)));\n } else {\n type = TokenType.PUNCTUATION;\n }\n break;\n }\n if (type == null) {\n Preconditions.checkState(right > left);\n left = right;\n }\n }\n }\n };\n }", "public abstract List<PropertyType> getBuiltInProperties();", "public org.omg.CORBA.TypeCode _type()\r\n {\r\n return PropositionHelper.type();\r\n }", "public boolean contains(final MoveStepType type) {\n for (final Enumeration<MoveStep> i = getSteps(); i.hasMoreElements(); ) {\n final MoveStep step = i.nextElement();\n if (step.getType() == type) {\n return true;\n }\n }\n return false;\n }", "public Calendar calculateStartTime(ConfigProperties cprop){\n\t\tCalendar d = Calendar.getInstance();\n\t\tString sd = cprop.getProperty(\"TIME.startdate\");\n\t\tString st = cprop.getProperty(\"TIME.starttime\");\n\t\t\n\t\t//SD defined\n\t\tif(sd!=null){\n\t\t\td.setTime(df.parse(sd,new ParsePosition(0)));\n\t\t}\n\t\t//SD not defined, use current date\n\t\t\n\t\t//ST defined\n\t\tif(st!=null){\n\t\t\tCalendar t = Calendar.getInstance();\n\t\t\tt.setTime(tf.parse(st,new ParsePosition(0)));\n\t\t\t//take the starttime and add it to the startdate\n\t\t\td.add(Calendar.HOUR_OF_DAY,t.get(Calendar.HOUR_OF_DAY));\n\t\t\td.add(Calendar.MINUTE,t.get(Calendar.MINUTE));\n\t\t\td.add(Calendar.SECOND,t.get(Calendar.SECOND));\n\t\t}\n\t\t//ST not defined use current plus a small delay to avoid misfires\n\t\telse {\n\t\t\td.add(Calendar.SECOND,START_DELAY);\n\t\t}\n\t\treturn d;\n\n\t}", "private ColourRuleSet parse(List<String> properties)\n\t{\n\t\t@SuppressWarnings(\"unused\")\n\t\tString ruleSetName = \"\";\n\t\t\n\t\tColourRuleSet ruleSet = new ColourRuleSet(properties.size());\n\t\t\n\t\tif(!expect(\"colourset\"))\n\t\t\treturn null;\n\t\t\n\t\tSymbol symbol = scanner.getSymbol();\n\t\t\n\t\tif(symbol.type == Symbol.Type.STRING)\n\t\t{\n\t\t\truleSetName = symbol.text;\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror(\"Expected a name for the ruleset\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(!expect(\"{\"))\n\t\t\treturn null;\n\t\t\n\t\twhile(scanner.isValid()) \n\t\t{\n\t\t\tsymbol = scanner.peakSymbol();\n\t\t\tif(!symbol.text.equals(\"property\"))\n\t\t\t\tbreak;\n\t\t\t\n\t\t\treadColourRule(ruleSet, properties);\n\t\t}\n\n\t\texpect(\"}\");\n\t\t\n\t\treturn ruleSet;\n\t}", "void start(JavaScriptObject source, JavaScriptObject type);", "LexicalUnit getNextLexicalUnit();", "public Token(int start, int end, String typ) {\n startOffset = start;\n endOffset = end;\n type = typ;\n }", "public Iterator<String> getUserDefinedProperties();", "NodeSet<F> getRoots(OWLClassExpression c, P p, R start, boolean direct);", "public void test_lt_01() {\n OntModel m = ModelFactory.createOntologyModel();\n \n DatatypeProperty p = m.createDatatypeProperty(NS + \"p\");\n OntClass c = m.createClass(NS + \"A\");\n \n Individual i = m.createIndividual(NS + \"i\", c);\n i.addProperty(p, \"testData\");\n \n int count = 0;\n \n for (Iterator j = i.listPropertyValues(p); j.hasNext();) {\n //System.err.println(\"Individual i has p value: \" + j.next());\n j.next();\n count++;\n }\n \n assertEquals(\"i should have one property\", 1, count);\n }", "public int checkPiece(String colour, char type) {\n\t\tint location = -1;\n\t\tfor (Piece p : this.getPieces()) {\n\t\t\tlocation ++;\n\t\t\tif (p.getColour().equals(colour)) {\n\t\t\t\tif (p.getType() == type) {\n\t\t\t\t\treturn location;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "private boolean hasMarker(Component paramComponent)\n/* */ {\n/* 1006 */ for (Iterator localIterator = this.typeAheadMarkers.iterator(); localIterator.hasNext();) {\n/* 1007 */ if (((TypeAheadMarker)localIterator.next()).untilFocused == paramComponent) {\n/* 1008 */ return true;\n/* */ }\n/* */ }\n/* 1011 */ return false;\n/* */ }", "@SuppressWarnings(\"unchecked\")\n public List<ShoppingCartLine> findByProperty(String propertyName, final Object value\n ) {\n \t\t\t\tLogUtil.log(\"finding ShoppingCartLine instance with property: \" + propertyName + \", value: \" + value, Level.INFO, null);\n\t\t\ttry {\n\t\t\tfinal String queryString = \"select model from ShoppingCartLine model where model.\" \n\t\t\t \t\t\t\t\t\t+ propertyName + \"= :propertyValue\";\n\t\t\t\t\t\t\t\tQuery query = entityManager.createQuery(queryString);\n\t\t\t\t\tquery.setParameter(\"propertyValue\", value);\n\t\t\t\t\treturn query.getResultList();\n\t\t} catch (RuntimeException re) {\n\t\t\t\t\t\tLogUtil.log(\"find by property name failed\", Level.SEVERE, re);\n\t\t\t\tthrow re;\n\t\t}\n\t}", "public Iterator<String> listProperties(String ontClass)\r\n\t{\r\n\t\tOntClass ontR = obtainOntClass(ontClass);\r\n\t\treturn new ToStringIterator<String>(ontR.listDeclaredProperties());\r\n\t}", "public final ManchesterOWLSyntaxAutoComplete.axiom_return axiom() {\n ManchesterOWLSyntaxAutoComplete.axiom_return retval = new ManchesterOWLSyntaxAutoComplete.axiom_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxTree p = null;\n ManchesterOWLSyntaxTree anotherProperty = null;\n ManchesterOWLSyntaxTree subject = null;\n ManchesterOWLSyntaxTree anotherIndividual = null;\n ManchesterOWLSyntaxAutoComplete.expression_return superClass = null;\n ManchesterOWLSyntaxAutoComplete.expression_return rhs = null;\n ManchesterOWLSyntaxAutoComplete.unary_return superProperty = null;\n ManchesterOWLSyntaxAutoComplete.unary_return object = null;\n ManchesterOWLSyntaxAutoComplete.expression_return domain = null;\n ManchesterOWLSyntaxAutoComplete.expression_return range = null;\n ManchesterOWLSyntaxAutoComplete.axiom_return a = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:284:1:\n // ( ^( SUB_CLASS_AXIOM ^( EXPRESSION subClass= expression ) ^(\n // EXPRESSION superClass= expression ) ) | ^( EQUIVALENT_TO_AXIOM ^(\n // EXPRESSION lhs= expression ) ^( EXPRESSION rhs= expression ) ) |\n // ^( INVERSE_OF ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION\n // anotherProperty= IDENTIFIER ) ) | ^( DISJOINT_WITH_AXIOM ^(\n // EXPRESSION lhs= expression ) ^( EXPRESSION rhs= expression ) ) |\n // ^( SUB_PROPERTY_AXIOM ^( EXPRESSION subProperty= expression ) ^(\n // EXPRESSION superProperty= unary ) ) | ^( ROLE_ASSERTION ^(\n // EXPRESSION subject= IDENTIFIER ) ^( EXPRESSION predicate=\n // propertyExpression ) ^( EXPRESSION object= unary ) ) | ^(\n // TYPE_ASSERTION ^( EXPRESSION description= expression ) ^(\n // EXPRESSION subject= IDENTIFIER ) ) | ^( DOMAIN ^( EXPRESSION p=\n // IDENTIFIER ) ^( EXPRESSION domain= expression ) ) | ^( RANGE ^(\n // EXPRESSION p= IDENTIFIER ) ^( EXPRESSION range= expression ) ) |\n // ^( SAME_AS_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) ) | ^(\n // DIFFERENT_FROM_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) ) | ^( UNARY_AXIOM\n // FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) ) | ^( UNARY_AXIOM\n // INVERSE_FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM IRREFLEXIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM REFLEXIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM SYMMETRIC ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM TRANSITIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // NEGATED_ASSERTION a= axiom ) )\n int alt16 = 18;\n alt16 = dfa16.predict(input);\n switch (alt16) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:285:3:\n // ^( SUB_CLASS_AXIOM ^( EXPRESSION subClass= expression ) ^(\n // EXPRESSION superClass= expression ) )\n {\n match(input, SUB_CLASS_AXIOM, FOLLOW_SUB_CLASS_AXIOM_in_axiom936);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom940);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom947);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom952);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom959);\n superClass = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n superClass.node.getCompletions());\n } else {\n retval.completions = new ArrayList<>(\n AutoCompleteStrings\n .getStandaloneExpressionCompletions(superClass.node\n .getEvalType()));\n }\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:293:5:\n // ^( EQUIVALENT_TO_AXIOM ^( EXPRESSION lhs= expression ) ^(\n // EXPRESSION rhs= expression ) )\n {\n match(input, EQUIVALENT_TO_AXIOM,\n FOLLOW_EQUIVALENT_TO_AXIOM_in_axiom972);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom975);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom981);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom985);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom992);\n rhs = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n rhs.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:301:4:\n // ^( INVERSE_OF ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION\n // anotherProperty= IDENTIFIER ) )\n {\n match(input, INVERSE_OF, FOLLOW_INVERSE_OF_in_axiom1007);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1010);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1016);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1020);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherProperty = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1026);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherProperty.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:309:5:\n // ^( DISJOINT_WITH_AXIOM ^( EXPRESSION lhs= expression ) ^(\n // EXPRESSION rhs= expression ) )\n {\n match(input, DISJOINT_WITH_AXIOM,\n FOLLOW_DISJOINT_WITH_AXIOM_in_axiom1038);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1041);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1048);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1052);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1058);\n rhs = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n rhs.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 5:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:316:4:\n // ^( SUB_PROPERTY_AXIOM ^( EXPRESSION subProperty= expression )\n // ^( EXPRESSION superProperty= unary ) )\n {\n match(input, SUB_PROPERTY_AXIOM,\n FOLLOW_SUB_PROPERTY_AXIOM_in_axiom1070);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1073);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1080);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1084);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_axiom1090);\n superProperty = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n superProperty.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 6:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:324:4:\n // ^( ROLE_ASSERTION ^( EXPRESSION subject= IDENTIFIER ) ^(\n // EXPRESSION predicate= propertyExpression ) ^( EXPRESSION\n // object= unary ) )\n {\n match(input, ROLE_ASSERTION, FOLLOW_ROLE_ASSERTION_in_axiom1104);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1107);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n subject = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1114);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1118);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_propertyExpression_in_axiom1125);\n propertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1129);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_axiom1135);\n object = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n object.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 7:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:331:5:\n // ^( TYPE_ASSERTION ^( EXPRESSION description= expression ) ^(\n // EXPRESSION subject= IDENTIFIER ) )\n {\n match(input, TYPE_ASSERTION, FOLLOW_TYPE_ASSERTION_in_axiom1145);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1148);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1155);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1159);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n subject = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1165);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = subject.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 8:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:339:4:\n // ^( DOMAIN ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION domain=\n // expression ) )\n {\n match(input, DOMAIN, FOLLOW_DOMAIN_in_axiom1177);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1180);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1186);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1190);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1196);\n domain = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n domain.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 9:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:347:5:\n // ^( RANGE ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION range=\n // expression ) )\n {\n match(input, RANGE, FOLLOW_RANGE_in_axiom1209);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1212);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1218);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1222);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1228);\n range = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n range.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 10:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:355:6:\n // ^( SAME_AS_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) )\n {\n match(input, SAME_AS_AXIOM, FOLLOW_SAME_AS_AXIOM_in_axiom1243);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1246);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1251);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1255);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherIndividual = (ManchesterOWLSyntaxTree) match(input,\n IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1261);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherIndividual.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 11:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:363:7:\n // ^( DIFFERENT_FROM_AXIOM ^( EXPRESSION anIndividual=\n // IDENTIFIER ) ^( EXPRESSION anotherIndividual= IDENTIFIER ) )\n {\n match(input, DIFFERENT_FROM_AXIOM,\n FOLLOW_DIFFERENT_FROM_AXIOM_in_axiom1277);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1280);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1285);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1289);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherIndividual = (ManchesterOWLSyntaxTree) match(input,\n IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1295);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherIndividual.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 12:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:371:5:\n // ^( UNARY_AXIOM FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1309);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, FUNCTIONAL, FOLLOW_FUNCTIONAL_in_axiom1311);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1314);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1320);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 13:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:379:5:\n // ^( UNARY_AXIOM INVERSE_FUNCTIONAL ^( EXPRESSION p= IDENTIFIER\n // ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1333);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, INVERSE_FUNCTIONAL,\n FOLLOW_INVERSE_FUNCTIONAL_in_axiom1335);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1338);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1344);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 14:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:387:7:\n // ^( UNARY_AXIOM IRREFLEXIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1360);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IRREFLEXIVE, FOLLOW_IRREFLEXIVE_in_axiom1362);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1365);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1371);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 15:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:395:6:\n // ^( UNARY_AXIOM REFLEXIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1386);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, REFLEXIVE, FOLLOW_REFLEXIVE_in_axiom1388);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1391);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1397);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 16:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:403:6:\n // ^( UNARY_AXIOM SYMMETRIC ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1412);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, SYMMETRIC, FOLLOW_SYMMETRIC_in_axiom1414);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1417);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1423);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 17:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:411:7:\n // ^( UNARY_AXIOM TRANSITIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1440);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, TRANSITIVE, FOLLOW_TRANSITIVE_in_axiom1442);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1445);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1451);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 18:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:419:6:\n // ^( NEGATED_ASSERTION a= axiom )\n {\n match(input, NEGATED_ASSERTION, FOLLOW_NEGATED_ASSERTION_in_axiom1466);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_axiom_in_axiom1471);\n a = axiom();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = a.completions;\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n }\n if (state.backtracking == 1 && retval.completions != null) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(retval.completions);\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "protected Point getRowRange( Property property )\n {\n if(treeTable == null)\n {\n return null;\n }\n Point result = null;\n JTree tree = treeTable.getTree();\n String name = property.getCompleteName();\n\n TreePath path;\n Property p;\n boolean found = false;\n for ( int i = 1; i < tree.getRowCount(); i++ )\n {\n path = tree.getPathForRow( i );\n p = ( Property )path.getLastPathComponent();\n if ( p.getCompleteName().startsWith( name ) )\n {\n if ( found )\n {\n result.y = i;\n }\n else\n {\n found = true;\n result = new Point( i, i );\n }\n }\n else if ( found )\n {\n return result;\n }\n }\n\n return result;\n }", "Rule CppType() {\n // Push 1 CppTypeNode onto the value stack\n return Sequence(\n \"cpp_type \",\n Literal(),\n actions.pushCppTypeNode());\n }", "private boolean peek(int index, TokenType expectedType) {\n return peekType(index) == expectedType;\n }", "protected void writeType ()\n {\n stream.println (\" public org.omg.CORBA.TypeCode _type ()\");\n stream.println (\" {\");\n stream.println (\" return \" + helperClass + \".type ();\");\n stream.println (\" }\");\n stream.println ();\n }", "<T> PropertyType<T> getPropertyTypeByName(String propertyTypeName);", "@Test\n public void testStartsWith() {\n chkInt(\"startsWith('a')\", false);\n chkLong(\"startsWith('a')\", false);\n chkNumber(\"startsWith('a')\", false);\n chkBoolean(\"startsWith('a')\", false);\n chkString(\"startsWith('aaZ')\", true, \"'aaZb'\");\n chkDate(\"startsWith('a')\", false);\n chkList(\"startsWith('a')\", false, \"[]\");\n chkEnum(\"startsWith('a')\", false);\n }", "public Iterator<Type> iterator();" ]
[ "0.5847573", "0.58019674", "0.56301165", "0.5113567", "0.50857985", "0.4806511", "0.46825412", "0.46221682", "0.459307", "0.45521113", "0.44797927", "0.44406232", "0.436125", "0.43540356", "0.4345405", "0.43422425", "0.43210444", "0.432023", "0.43008506", "0.42945677", "0.42878145", "0.4277174", "0.41837367", "0.41613144", "0.41236386", "0.4071791", "0.40660852", "0.406484", "0.4064577", "0.4062797", "0.40488124", "0.40433273", "0.4041109", "0.4019265", "0.4008616", "0.40001085", "0.40000397", "0.39992532", "0.39724174", "0.3969802", "0.39653084", "0.39624938", "0.39508298", "0.39508292", "0.39498374", "0.3945747", "0.39347896", "0.3932635", "0.3928711", "0.39244005", "0.39199987", "0.3916909", "0.39048588", "0.39010847", "0.3893796", "0.38847384", "0.38753048", "0.38725388", "0.3871929", "0.3852944", "0.38517547", "0.3841589", "0.38347444", "0.38294804", "0.38062817", "0.3801879", "0.3797908", "0.37955144", "0.3795306", "0.37914386", "0.37867698", "0.3780722", "0.37803876", "0.37785435", "0.37773424", "0.3762742", "0.37612173", "0.3761209", "0.3756118", "0.3741353", "0.37342674", "0.3733701", "0.3733413", "0.37279943", "0.3724848", "0.37242994", "0.37227756", "0.3722373", "0.3713796", "0.37113553", "0.37077242", "0.37060496", "0.37034804", "0.36992398", "0.369118", "0.36870962", "0.36853197", "0.3684153", "0.36820948", "0.36776233" ]
0.63355833
0
Get an iterator that contains the code units which have the specified property type defined. Only code units starting within the address set will be returned by the iterator. If the address set is null then check the entire program. Standard property types are defined in the CodeUnit class.
public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public CodeUnitIterator getCodeUnitIterator(String property, boolean forward);", "public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "List<Location> getLocations(String coverageType);", "public CodeUnit getCodeUnitContaining(Address addr);", "public interface Listing {\n\n\t/**\n\t * The name of the default tree in the display.\n\t * \n\t * @see #removeTree(String)\n\t */\n\tpublic static final String DEFAULT_TREE_NAME = \"Program Tree\";\n\n\t/**\n\t * get the code unit that starts at the given address.\n\t *\n\t * @param addr the address to look for a codeUnit.\n\t * @return the codeUnit that begins at the given address\n\t */\n\tpublic CodeUnit getCodeUnitAt(Address addr);\n\n\t/**\n\t * get the code unit that contains the given address.\n\t *\n\t * @param addr the address to look for a codeUnit.\n\t * @return the codeUnit that contains the given address\n\t */\n\tpublic CodeUnit getCodeUnitContaining(Address addr);\n\n\t/**\n\t * get the next code unit that starts an an address that is greater than the\n\t * given address. The search will include instructions, defined data, and\n\t * undefined data.\n\t *\n\t * @param addr the address from which to search forward.\n\t * @return the next CodeUnit found while searching forward from addr or null\n\t * if none found.\n\t */\n\tpublic CodeUnit getCodeUnitAfter(Address addr);\n\n\t/**\n\t * get the next code unit that starts at an address that is less than the\n\t * given address. The search will include instructions, defined data, and\n\t * undefined data.\n\t *\n\t * @param addr the address from which to search backwards.\n\t * @return The first codeUnit found while searching backwards from addr or\n\t * null if none found.\n\t */\n\tpublic CodeUnit getCodeUnitBefore(Address addr);\n\n\t/**\n\t * Get an iterator that contains all code units in the program which have\n\t * the specified property type defined. Standard property types are defined\n\t * in the CodeUnit class. The property types are: EOL_COMMENT, PRE_COMMENT,\n\t * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE, VALUE_REFERENCE.\n\t * Property types can also be user defined.\n\t *\n\t * @param property the name of the property type.\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * start address that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, boolean forward);\n\n\t/**\n\t * Get an iterator that contains the code units which have the specified\n\t * property type defined. Only code units at an address greater than or\n\t * equal to the specified start address will be returned by the iterator. If\n\t * the start address is null then check the entire program. Standard\n\t * property types are defined in the CodeUnit class. The property types are:\n\t * EOL_COMMENT, PRE_COMMENT, POST_COMMENT, USER_REFERENCE,\n\t * MNEMONIC_REFERENCE, VALUE_REFERENCE. Property types can also be user\n\t * defined.\n\t *\n\t * @param property the name of the property type. (EOL_COMMENT, PRE_COMMENT,\n\t * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE,\n\t * VALUE_REFERENCE)\n\t * @param addr the start address\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * start address that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator that contains the code units which have the specified\n\t * property type defined. Only code units starting within the address set\n\t * will be returned by the iterator. If the address set is null then check\n\t * the entire program. Standard property types are defined in the CodeUnit\n\t * class.\n\t *\n\t * @param property the name of the property type.\n\t * @param addrSet the address set\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * address set that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);\n\n\t/**\n\t * Get a forward code unit iterator over code units that have the specified\n\t * comment type.\n\t * \n\t * @param commentType type defined in CodeUnit\n\t * @param addrSet address set\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * address set that have the specified comment type defined\n\t */\n\tpublic CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);\n\n\t/**\n\t * Get a forward iterator over addresses that have the specified comment\n\t * type.\n\t * \n\t * @param commentType type defined in CodeUnit\n\t * @param addrSet address set\n\t * @param forward true to iterator from lowest address to highest, false\n\t * highest to lowest\n\t * @return an AddressIterator that returns all addresses from the indicated\n\t * address set that have the specified comment type defined\n\t */\n\tpublic AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);\n\n\t/**\n\t * Get a forward iterator over addresses that have any type of comment.\n\t * \n\t * @param addrSet address set\n\t * @param forward true to iterator from lowest address to highest, false\n\t * highest to lowest\n\t * @return an AddressIterator that returns all addresses from the indicated\n\t * address set that have any type of comment.\n\t */\n\tpublic AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * Get the comment for the given type at the specified address.\n\t *\n\t * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT,\n\t * PLATE_COMMENT, or REPEATABLE_COMMENT\n\t * @param address the address of the comment.\n\t * @return the comment string of the appropriate type or null if no comment\n\t * of that type exists for this code unit\n\t * @throws IllegalArgumentException if type is not one of the types of\n\t * comments supported\n\t */\n\tpublic String getComment(int commentType, Address address);\n\n\t/**\n\t * Set the comment for the given comment type at the specified address.\n\t *\n\t * @param address the address of the comment.\n\t * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT,\n\t * PLATE_COMMENT, or REPEATABLE_COMMENT\n\t * @param comment comment to set at the address\n\t * @throws IllegalArgumentException if type is not one of the types of\n\t * comments supported\n\t */\n\tpublic void setComment(Address address, int commentType, String comment);\n\n\t/**\n\t * get a CodeUnit iterator that will iterate over the entire address space.\n\t * \n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator in forward direction\n\t */\n\tpublic CodeUnitIterator getCodeUnits(boolean forward);\n\n\t/**\n\t * Returns an iterator of the code units in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first code unit that would be returned by an initial call\n\t * to the <code>next</code> method. An initial call to the <code>previous</code>\n\t * method would return the code unit with an address less than the specified\n\t * address.\n\t * <p>\n\t *\n\t * @param addr the start address of the iterator.\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator positioned just before addr.\n\t */\n\tpublic CodeUnitIterator getCodeUnits(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only code units whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the AddressRangeSet to iterate over (required).\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that is restricted to the give\n\t * AddressRangeSet.\n\t */\n\tpublic CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Instruction that starts at the given address. If no Instruction\n\t * has been defined to start at that address, return null.\n\t *\n\t * @param addr the address to check for the start of an instruction\n\t * @return the Instruction object that starts at addr; or null if no\n\t * Instructions starts at addr.\n\t */\n\tpublic Instruction getInstructionAt(Address addr);\n\n\t/**\n\t * get the Instruction that contains the given address. If an Instruction is\n\t * defined that contains that address, it will be returned. Otherwise, null\n\t * will be returned.\n\t *\n\t * @param addr the address to check for containment in an Instruction.\n\t * @return the Instruction object that contains addr; or null if no\n\t * Instructions contain addr.\n\t */\n\tpublic Instruction getInstructionContaining(Address addr);\n\n\t/**\n\t * get the closest Instruction that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr The address at which to begin the forward search.\n\t * @return the next Instruction whose starting address is greater than addr.\n\t */\n\tpublic Instruction getInstructionAfter(Address addr);\n\n\t/**\n\t * get the closest Instruction that starts at an address that is less than\n\t * the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest Instruction whose starting address is less than addr.\n\t */\n\tpublic Instruction getInstructionBefore(Address addr);\n\n\t/**\n\t * get an Instruction iterator that will iterate over the entire address\n\t * space.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return an InstructionIterator that iterates over all instructions in the\n\t * program.\n\t */\n\tpublic InstructionIterator getInstructions(boolean forward);\n\n\t/**\n\t * Returns an iterator of the instructions in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first instruction that would be returned by an initial call\n\t * to the <code>next</code> method. An initial call to the <code>previous</code>\n\t * method would return the instruction with an address less than the\n\t * specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return an InstructionIterator that iterates over all Instruction objects\n\t * in the given address range set.\n\t */\n\tpublic InstructionIterator getInstructions(Address addr, boolean forward);\n\n\t/**\n\t * Get an Instruction iterator over the address range(s). Only instructions\n\t * whose start addresses are contained in the given address set will be\n\t * returned by the iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * objects in the given address range set.\n\t */\n\tpublic InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (Defined or Undefined) that starts at the given address.\n\t *\n\t * @param addr the address to check for a Data object.\n\t * @return the Data object that starts at addr; or null if no Data\n\t * objects(defined or undefined) start at addr.\n\t */\n\tpublic Data getDataAt(Address addr);\n\n\t/**\n\t * Gets the data object that is at or contains the given address or null if\n\t * the address in not in memory or is in an instruction.\n\t *\n\t * @param addr the address for which to find its containing data element.\n\t * @return the Data object containing the given address or null if there is\n\t * no data that contains the address.\n\t */\n\tpublic Data getDataContaining(Address addr);\n\n\t/**\n\t * get the closest Data object that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @return the next Data object whose starting address is greater than addr.\n\t */\n\tpublic Data getDataAfter(Address addr);\n\n\t/**\n\t * get the closest Data object that starts at an address that is less than\n\t * the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest Data object whose starting address is less than addr.\n\t */\n\tpublic Data getDataBefore(Address addr);\n\n\t/**\n\t * get a Data iterator that will iterate over the entire address space;\n\t * returning both defined and undefined Data objects.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * object in the program.\n\t */\n\tpublic DataIterator getData(boolean forward);\n\n\t/**\n\t * Returns an iterator of the data in this listing (in proper sequence),\n\t * starting at the specified address. The specified address indicates the\n\t * first Data that would be returned by an initial call to the <code>next</code>\n\t * method. An initial call to the <code>previous</code> method would return the\n\t * Data with an address less than the specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all Data objects in the given\n\t * address range set.\n\t */\n\tpublic DataIterator getData(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only data whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * objects in the given address range set.\n\t */\n\tpublic DataIterator getData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (defined) object that starts at the given address. If no\n\t * Data object is defined at that address, then return null.\n\t *\n\t * @param addr The address to check for defined Data.\n\t * @return a Data object that starts at addr, or null if no Data object has\n\t * been defined to start at addr.\n\t */\n\tpublic Data getDefinedDataAt(Address addr);\n\n\t/**\n\t * get the Data object that starts at the given address. If no Data objects\n\t * have been defined that contain that address, then return null.\n\t *\n\t * @param addr the address to check for containment in a defined Data\n\t * object.\n\t * @return the defined Data object containing addr.\n\t */\n\tpublic Data getDefinedDataContaining(Address addr);\n\n\t/**\n\t *\n\t * get the defined Data object that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @return the next defined Data object whose starting address is greater\n\t * than addr.\n\t */\n\tpublic Data getDefinedDataAfter(Address addr);\n\n\t/**\n\t * get the closest defined Data object that starts at an address that is\n\t * less than the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest defined Data object whose starting address is less\n\t * than addr.\n\t */\n\tpublic Data getDefinedDataBefore(Address addr);\n\n\t/**\n\t * get a Data iterator that will iterate over the entire address space;\n\t * returning only defined Data objects.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * program.\n\t */\n\tpublic DataIterator getDefinedData(boolean forward);\n\n\t/**\n\t * Returns an iterator of the defined data in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first defined Data that would be returned by an initial\n\t * call to the <code>next</code> method. An initial call to the\n\t * <code>previous</code> method would return the defined Data with an address\n\t * less than the specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * given address range set.\n\t */\n\tpublic DataIterator getDefinedData(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only defined data whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * given address range set.\n\t */\n\tpublic DataIterator getDefinedData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (undefined) object that starts at the given address.\n\t *\n\t * @param addr The address to check for undefined data.\n\t * @return a default DataObject if bytes exist at addr and nothing has been\n\t * defined to exist there. Otherwise returns null.\n\t */\n\tpublic Data getUndefinedDataAt(Address addr);\n\n\t/**\n\t * Get the undefined Data object that starts at an address that is greater\n\t * than the given address. This operation can be slow for large programs so\n\t * a TaskMonitor is required.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t * @return the next undefined Data object whose starting address is greater\n\t * than addr.\n\t */\n\tpublic Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);\n\n\t/**\n\t * Get the undefined Data object that falls within the set. This operation\n\t * can be slow for large programs so a TaskMonitor is required.\n\t *\n\t * @param set the addressSet at which to find the first undefined address.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t *\n\t * @return the next undefined Data object whose starting address falls\n\t * within the addresSet.\n\t */\n\tpublic Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);\n\n\t/**\n\t * get the closest undefined Data object that starts at an address that is\n\t * less than the given address. This operation can be slow for large\n\t * programs so a TaskMonitor is required.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t * @return the closest undefined Data object whose starting address is less\n\t * than addr.\n\t */\n\tpublic Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);\n\n\t/**\n\t * Get the address set which corresponds to all undefined code units within\n\t * the specified set of address.\n\t *\n\t * @param set set of addresses to search\n\t * @param initializedMemoryOnly if true set will be constrained to\n\t * initialized memory areas, if false set will be constrained to\n\t * all defined memory blocks.\n\t * @param monitor task monitor\n\t * @return address set corresponding to undefined code units\n\t * @throws CancelledException if monitor cancelled\n\t */\n\tpublic AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly,\n\t\t\tTaskMonitor monitor) throws CancelledException;\n\n\t/**\n\t * Returns the next instruction or defined data after the given address;\n\t *\n\t * @param addr the address at which to begin the search\n\t * @return the next instruction or defined data at an address higher than\n\t * the given address.\n\t */\n\tpublic CodeUnit getDefinedCodeUnitAfter(Address addr);\n\n\t/**\n\t * Returns the closest instruction or defined data that starts before the\n\t * given address.\n\t *\n\t * @param addr the address at which to begin the search\n\t * @return the closest instruction or defined data at an address below the\n\t * given address.\n\t */\n\tpublic CodeUnit getDefinedCodeUnitBefore(Address addr);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) in the program.\n\t *\n\t * @param forward true means get iterator that starts at the minimum address\n\t * and iterates forward. Otherwise it starts at the maximum\n\t * address and iterates backwards.\n\t * @return an iterator over all the composite data objects.\n\t */\n\tpublic DataIterator getCompositeData(boolean forward);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) in the program at or after the given Address.\n\t *\n\t * @param start start of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return an iterator over all the composite data objects starting with the\n\t * given address.\n\t */\n\tpublic DataIterator getCompositeData(Address start, boolean forward);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) within the specified address set in the program.\n\t *\n\t * @param addrSet the address set\n\t * @param forward true means get iterator in forward direction\n\t * @return an iterator over all the composite data objects in the given\n\t * address set.\n\t */\n\tpublic DataIterator getCompositeData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * Returns an iterator over all user defined property names.\n\t *\n\t * @return an iterator over all user defined property names.\n\t */\n\tpublic Iterator<String> getUserDefinedProperties();\n\n\t/**\n\t * Removes the entire property from the program\n\t *\n\t * @param propertyName the name of the property to remove.\n\t */\n\tpublic void removeUserDefinedProperty(String propertyName);\n\n\t/**\n\t * Returns the PropertyMap associated with the given name\n\t *\n\t * @param propertyName the property name\n\t * @return PropertyMap the propertyMap object.\n\t */\n\tpublic PropertyMap getPropertyMap(String propertyName);\n\n\t/**\n\t * Creates a new Instruction object at the given address. The specified\n\t * context is only used to create the associated prototype. It is critical\n\t * that the context be written immediately after creation of the instruction\n\t * and must be done with a single set operation on the program context. Once\n\t * a set context is done on the instruction address, any subsequent context\n\t * changes will result in a <code>ContextChangeException</code>\n\t *\n\t * @param addr the address at which to create an instruction\n\t * @param prototype the InstructionPrototype that describes the type of instruction to create.\n\t * @param memBuf buffer that provides the bytes that make up the instruction.\n\t * @param context the processor context at this location.\n\t * @param length instruction byte-length (must be in the range 0..prototype.getLength()).\n\t * If smaller than the prototype length it must have a value no greater than 7, otherwise\n\t * an error will be thrown. A value of 0 or greater-than-or-equal the prototype length\n\t * will be ignored and not impose and override length. The length value must be a multiple \n\t * of the {@link Language#getInstructionAlignment() instruction alignment} .\n\t * @return the newly created instruction. \n\t * @throws CodeUnitInsertionException thrown if the new Instruction would overlap and \n\t * existing {@link CodeUnit} or the specified {@code length} is unsupported.\n\t * @throws IllegalArgumentException if a negative {@code length} is specified.\n\t */\n\tpublic Instruction createInstruction(Address addr, InstructionPrototype prototype,\n\t\t\tMemBuffer memBuf, ProcessorContextView context, int length)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a complete set of instructions. A preliminary pass will be made\n\t * checking for code unit conflicts which will be marked within the\n\t * instructionSet causing dependent blocks to get pruned.\n\t * \n\t * @param instructionSet the set of instructions to be added. All code unit\n\t * conflicts will be marked within the instructionSet and\n\t * associated blocks.\n\t * @param overwrite if true, overwrites existing code units.\n\t * @throws CodeUnitInsertionException if the instruction set is incompatible\n\t * with the program memory\n\t * @return the set of addresses over which instructions were actually added\n\t * to the program. This may differ from the InstructionSet address\n\t * set if conflict errors occurred. Such conflict errors will be\n\t * recorded within the InstructionSet and its InstructionBlocks.\n\t */\n\tpublic AddressSetView addInstructions(InstructionSet instructionSet, boolean overwrite)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a new defined Data object of a given length at the given address.\n\t * This ignores the bytes that are present\n\t *\n\t * @param addr the address at which to create a new Data object.\n\t * @param dataType the Data Type that describes the type of Data object to\n\t * create.\n\t * @param length the length of the datatype.\n\t * @return newly created data unit\n\t * @exception CodeUnitInsertionException thrown if the new Instruction would\n\t * overlap and existing Instruction or defined data.\n\t */\n\tpublic Data createData(Address addr, DataType dataType, int length)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a new defined Data object at the given address. This ignores the\n\t * bytes that are present\n\t *\n\t * @param addr the address at which to create a new Data object.\n\t * @param dataType the Data Type that describes the type of Data object to\n\t * create.\n\t * @return newly created data unit\n\t * @exception CodeUnitInsertionException thrown if the new Instruction would\n\t * overlap and existing Instruction or defined data.\n\t */\n\tpublic Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;\n\n\t/**\n\t * Clears any code units in the given range returning everything to \"db\"s,\n\t * and removing any references in the affected area. Note that the module\n\t * and fragment structure is unaffected. If part of a code unit is contained\n\t * in the given address range then the whole code unit will be cleared.\n\t *\n\t * @param startAddr the start address of the area to be cleared.\n\t * @param endAddr the end address of the area to be cleared.\n\t * @param clearContext clear context register values if true\n\t */\n\tpublic void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext);\n\n\t/**\n\t * Clears any code units in the given range returning everything to \"db\"s,\n\t * and removing any references in the affected area. Note that the module\n\t * and fragment structure is unaffected. If part of a code unit is contained\n\t * in the given address range then the whole code unit will be cleared.\n\t *\n\t * @param startAddr the start address of the area to be cleared.\n\t * @param endAddr the end address of the area to be cleared.\n\t * @param clearContext clear context register values if true\n\t * @param monitor monitor that can be used to cancel the clear operation\n\t * @throws CancelledException if the operation was cancelled.\n\t */\n\tpublic void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext,\n\t\t\tTaskMonitor monitor) throws CancelledException;\n\n\t/**\n\t * Checks if the given ranges consists entirely of undefined data.\n\t * \n\t * @param start The start address of the range to check.\n\t * @param end The end address of the range to check.\n\t * @return boolean true if the given range is in memory and has no\n\t * instructions or defined data.\n\t */\n\tpublic boolean isUndefined(Address start, Address end);\n\n\t/**\n\t * Clears the comments in the given range.\n\t * \n\t * @param startAddr the start address of the range to be cleared\n\t * @param endAddr the end address of the range to be cleared\n\t */\n\tpublic void clearComments(Address startAddr, Address endAddr);\n\n\t/**\n\t * Clears the properties in the given range.\n\t * \n\t * @param startAddr the start address of the range to be cleared\n\t * @param endAddr the end address of the range to be cleared\n\t * @param monitor task monitor for cancelling operation.\n\t * @throws CancelledException if the operation was cancelled.\n\t */\n\tpublic void clearProperties(Address startAddr, Address endAddr, TaskMonitor monitor)\n\t\t\tthrows CancelledException;\n\n\t/**\n\t * Removes all CodeUnits, comments, properties, and references from the\n\t * listing.\n\t * \n\t * @param clearContext if true, also clear any instruction context that has\n\t * been laid down from previous disassembly.\n\t * @param monitor used for tracking progress and cancelling the clear\n\t * operation.\n\t */\n\tpublic void clearAll(boolean clearContext, TaskMonitor monitor);\n\n\t/**\n\t * Returns the fragment containing the given address.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param addr the address that is contained within a fragment.\n\t *\n\t * @return will return null if the address is not in the program.\n\t */\n\tpublic ProgramFragment getFragment(String treeName, Address addr);\n\n\t/**\n\t * Returns the module with the given name.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param name the name of the module to find.\n\t *\n\t * @return will return null if there is no module with the given name.\n\t */\n\tpublic ProgramModule getModule(String treeName, String name);\n\n\t/**\n\t * Returns the fragment with the given name.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param name the name of the fragment to find.\n\t *\n\t * @return will return null if there is no fragment with the given name.\n\t */\n\tpublic ProgramFragment getFragment(String treeName, String name);\n\n\t/**\n\t * Create a new tree that will be identified by the given name. By default,\n\t * the new root module is populated with fragments based on memory blocks.\n\t * Note that the root module's name is not the same as its tree name. The\n\t * root module name defaults to the name of the program.\n\t * \n\t * @param treeName name of the tree to search\n\t * @return root module\n\t * @throws DuplicateNameException if a tree with the given name already\n\t * exists\n\t */\n\tpublic ProgramModule createRootModule(String treeName) throws DuplicateNameException;\n\n\t/**\n\t * Gets the root module for a tree in this listing.\n\t * \n\t * @param treeName name of tree\n\t *\n\t * @return the root module for the listing; returns null if there is no tree\n\t * rooted at a module with the given name.\n\t */\n\tpublic ProgramModule getRootModule(String treeName);\n\n\t/**\n\t * Returns the root module of the program tree with the given name;\n\t * \n\t * @param treeID id of the program tree\n\t * @return the root module of the specified tree.\n\t */\n\tpublic ProgramModule getRootModule(long treeID);\n\n\t/**\n\t * Returns the root module for the default program tree. This would be the\n\t * program tree that has existed the longest.\n\t *\n\t * @return the root module for the oldest existing program tree.\n\t */\n\tpublic ProgramModule getDefaultRootModule();\n\n\t/**\n\t * Get the names of all the trees defined in this listing.\n\t *\n\t * @return the names of all program trees defined in the program.\n\t */\n\tpublic String[] getTreeNames();\n\n\t/**\n\t * Remove the tree rooted at the given name.\n\t * \n\t * @param treeName the name of the tree to remove.\n\t * @return true if the tree was removed; return false if this is the last\n\t * tree for the program; cannot delete the last tree.\n\t */\n\tpublic boolean removeTree(String treeName);\n\n\t/**\n\t * Rename the tree. This method does not change the root module's name only\n\t * the identifier for the tree.\n\t * \n\t * @param oldName old name of the tree\n\t * @param newName new name of the tree.\n\t * @throws DuplicateNameException if newName already exists for a root\n\t * module\n\t */\n\tpublic void renameTree(String oldName, String newName) throws DuplicateNameException;\n\n\t/**\n\t * gets the total number of CodeUnits (Instructions, defined Data, and\n\t * undefined Data)\n\t *\n\t * @return the total number of CodeUnits in the listing.\n\t */\n\tpublic long getNumCodeUnits();\n\n\t/**\n\t * gets the total number of defined Data objects in the listing.\n\t *\n\t * @return the total number of defined Data objects in the listing.\n\t */\n\tpublic long getNumDefinedData();\n\n\t/**\n\t * gets the total number of Instructions in the listing.\n\t *\n\t * @return number of Instructions\n\t */\n\tpublic long getNumInstructions();\n\n\t/**\n\t * Get the data type manager for the program.\n\t * \n\t * @return the datatype manager for the program.\n\t */\n\tpublic DataTypeManager getDataTypeManager();\n\n\t/**\n\t * Create a function with an entry point and a body of addresses.\n\t * \n\t * @param name the name of the function to create\n\t * @param entryPoint the entry point for the function\n\t * @param body the address set that makes up the functions body\n\t * @param source the source of this function\n\t * @return the created function\n\t * @throws InvalidInputException if the name contains invalid characters\n\t * @throws OverlappingFunctionException if the given body overlaps with an\n\t * existing function.\n\t */\n\tpublic Function createFunction(String name, Address entryPoint, AddressSetView body,\n\t\t\tSourceType source) throws InvalidInputException, OverlappingFunctionException;\n\n\t/**\n\t * Create a function in the specified namespace with an entry point and a\n\t * body of addresses.\n\t * \n\t * @param name the name of the function to create\n\t * @param nameSpace the namespace in which to create the function\n\t * @param entryPoint the entry point for the function\n\t * @param body the address set that makes up the functions body\n\t * @param source the source of this function\n\t * @return the created function\n\t * @throws InvalidInputException if the name contains invalid characters\n\t * @throws OverlappingFunctionException if the given body overlaps with an\n\t * existing function.\n\t */\n\tpublic Function createFunction(String name, Namespace nameSpace, Address entryPoint,\n\t\t\tAddressSetView body, SourceType source)\n\t\t\tthrows InvalidInputException, OverlappingFunctionException;\n\n\t/**\n\t * Remove a function a given entry point.\n\t *\n\t * @param entryPoint entry point of function to be removed.\n\t */\n\tpublic void removeFunction(Address entryPoint);\n\n\t/**\n\t * Get a function with a given entry point.\n\t *\n\t * @param entryPoint entry point of the function\n\t * @return function at the entry point\n\t */\n\tpublic Function getFunctionAt(Address entryPoint);\n\n\t/**\n\t * Returns a list of all global functions with the given name.\n\t * \n\t * @param name the name of the functions to retrieve.\n\t * @return a list of all global functions with the given name.\n\t */\n\tpublic List<Function> getGlobalFunctions(String name);\n\n\t/**\n\t * Returns a list of all functions with the given name in the given\n\t * namespace.\n\t * \n\t * @param namespace the namespace to search for functions of the given name.\n\t * Can be null, in which case it will search the global\n\t * namespace.\n\t * @param name the name of the functions to retrieve.\n\t * @return a list of all global functions with the given name.\n\t */\n\tpublic List<Function> getFunctions(String namespace, String name);\n\n\t/**\n\t * Get a function containing an address.\n\t * \n\t * @param addr the address to search.\n\t * @return function containing this address, null otherwise\n\t */\n\tpublic Function getFunctionContaining(Address addr);\n\n\t/**\n\t * Get an iterator over all external functions\n\t * \n\t * @return an iterator over all currently defined external functions.\n\t */\n\tpublic FunctionIterator getExternalFunctions();\n\n\t/**\n\t * Get an iterator over all functions\n\t * \n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over all currently defined functions.\n\t */\n\tpublic FunctionIterator getFunctions(boolean forward);\n\n\t/**\n\t * Get an iterator over all functions starting at address\n\t * \n\t * @param start the address to start iterating at.\n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over functions\n\t */\n\tpublic FunctionIterator getFunctions(Address start, boolean forward);\n\n\t/**\n\t * Get an iterator over all functions with entry points in the address set.\n\t * \n\t * @param asv the set of addresses to iterator function entry points over.\n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over functions\n\t */\n\tpublic FunctionIterator getFunctions(AddressSetView asv, boolean forward);\n\n\t/**\n\t * Check if an address is contained in a function\n\t *\n\t * @param addr address to test\n\t * @return true if this address is in one or more functions\n\t */\n\tpublic boolean isInFunction(Address addr);\n\n\t/**\n\t * Get the comment history for comments at the given address.\n\t * \n\t * @param addr address for comments\n\t * @param commentType comment type defined in CodeUnit\n\t * @return array of comment history records\n\t */\n\tpublic CommentHistory[] getCommentHistory(Address addr, int commentType);\n\n}", "List<Building> findBuildingCoordinatesByType(String type);", "public java.util.List<CodeableConcept> type() {\n return getList(CodeableConcept.class, FhirPropertyNames.PROPERTY_TYPE);\n }", "public java.util.List<CodeableConcept> type() {\n return getList(CodeableConcept.class, FhirPropertyNames.PROPERTY_TYPE);\n }", "List<PropertyType<?>> getPropertyTypes();", "public final native KmlObjectList getElementsByType(String type) /*-{\r\n\t\treturn this.getElementsByType(type);\r\n\t}-*/;", "@Override\n\tpublic List<CustomerType> queryByUsePage(String property, Object value, int pageSize, int pageNumber) {\n\t\treturn null;\n\t}", "public CodeUnitIterator getCodeUnits(boolean forward);", "@Override\n\tpublic List<CustomerType> queryByUseLikeAndPage(String property, String value, int pageSize, int pageNumber) {\n\t\treturn null;\n\t}", "public static boolean getMemoryType(\n VkPhysicalDevice device, int bits, int properties, IntBuffer typeIndex) {\n VkPhysicalDeviceMemoryProperties memoryProperties =\n VkPhysicalDeviceMemoryProperties.calloc();\n vkGetPhysicalDeviceMemoryProperties(device, memoryProperties);\n\n boolean ret = false;\n\n for (int i = 0; i < 32; i++) {\n if ((bits & (1 << i)) > 0) {\n if ((memoryProperties.memoryTypes(i).propertyFlags() & properties) == properties) {\n typeIndex.put(0, i);\n ret = true;\n break;\n }\n }\n }\n\n memoryProperties.free();\n return ret;\n }", "<T> Set<T> lookupAll(Class<T> type);", "public Iterator<String> listPropertyRange(String property)\r\n\t{\r\n\t\tOntProperty prop = obtainOntProperty(property);\r\n\t\treturn new ToStringIterator<String>(prop.listRange());\r\n\t}", "public Set<Node> getChildByType(String type) {\n HashSet<Node> result = new HashSet<Node>();\n Iterable<Relationship> relations = gisNode.getRelationships(Direction.OUTGOING);\n for (Relationship relationship : relations) {\n Node node = relationship.getEndNode();\n if (type.equals(node.getProperty(INeoConstants.PROPERTY_TYPE_NAME, \"\"))) {\n result.add(node);\n }\n }\n return result;\n }", "public Iterator getTypes() {\r\n\t\treturn types == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(types.values());\r\n\t}", "public CodeUnit getCodeUnitAt(Address addr);", "public abstract List<LocationDto> search_type_building\n (BuildingDto building, LocationTypeDto type);", "public static ArrayList<XYCoord> findUsableProperties(Commander co, GameMap map)\n {\n ArrayList<XYCoord> industries = new ArrayList<XYCoord>();\n // We don't want to bother if we're trying to find nobody's properties\n if( null != co )\n {\n // Add all vacant, <co>-owned industries to the list\n for( XYCoord xyc : co.ownedProperties )\n {\n Location loc = map.getLocation(xyc);\n Unit resident = loc.getResident();\n // We only want industries we can act on, which means they need to be empty\n // TODO: maybe calculate whether the CO has enough money to buy something at this industry\n if( null == resident && loc.getOwner() == co )\n {\n if( co.getShoppingList(loc).size() > 0 )\n {\n industries.add(loc.getCoordinates());\n }\n }\n }\n }\n return industries;\n }", "public List<PropertyImages> findWhereTypeEquals(String type) throws PropertyImagesDaoException\n\t{\n\t\ttry {\n\t\t\treturn getJdbcTemplate().query(\"SELECT ID, TITLE, TYPE, SIZE, SRC_URL, PROPERTY_DATA_UUID FROM \" + getTableName() + \" WHERE TYPE = ? ORDER BY TYPE\", this,type);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new PropertyImagesDaoException(\"Query failed\", e);\n\t\t}\n\t\t\n\t}", "List<Type> getTypeList(String type);", "List<ReportType> findTypes();", "public void testGetType() {\n System.out.println(\"getType\"); // NOI18N\n \n TypeID expResult;\n TypeID result;\n String value = \"Test value\"; // NOI18N\n TypeID type = new TypeID(TypeID.Kind.PRIMITIVE, \"javacode\");// NOI18N\n \n result = PropertyValue.createValue(primitveDescritor, type,value).getType();\n expResult = type;\n assertEquals(expResult, result);\n }", "public List<ProgressConfigurationType> getConfigType(String type);", "public boolean contains(int type) {\n\t\tint n = check(type);\n\t\treturn n >= 64 ? (n1 & mask(n - 64)) != 0L : (n0 & mask(n)) != 0L;\n\t}", "public synchronized static Set<MeasureUnit> getAvailable(String type) {\n populateCache();\n Map<String, MeasureUnit> units = cache.get(type);\n // Train users not to modify returned set from the start giving us more\n // flexibility for implementation.\n return units == null ? Collections.<MeasureUnit>emptySet()\n : Collections.unmodifiableSet(new HashSet<MeasureUnit>(units.values()));\n }", "public void findByType(String type)\n {\n boolean found = false;\n for(KantoDex entry : entries)\n {\n if(entry.getTypes1().contains(type) && !type.equals(\"\"))\n {\n found = true;\n } \n }\n if(!found)\n {\n System.out.println(\"You have input a nonexistent type, or the type was not applicable to this entry.\"); \n }\n else\n {\n System.out.println(\"All Pokedex entries of type \" + type + \":\");\n for(KantoDex entry : entries)\n {\n if(entry.getType1().equals(type) || entry.getType2().equals(type))\n {\n entry.display();\n }\n }\n }\n }", "private void assertType(String snippet, Class<? extends Object> type) {\n try {\n Lexer lexer = new Lexer(new StringReader(snippet));\n Parser parser = new Parser(lexer);\n RootNode node = parser.program();\n AssignNode assignment = (AssignNode) node.get(0);\n assertTrue(assignment.getRight().getClass() == type);\n } catch (IOException e) {\n fail(e.getMessage());\n }\n }", "PropertyType(String propertyType) {\n this.propertyType = propertyType;\n }", "public Rule type()\n \t{\n \t\treturn firstOf(simpleMapType(), nonSimpleMapTypes());\n \t}", "@Test\n\tpublic void findTypeList() {\n\t}", "public Class<?> getPropertyType(String property, int typeConstrParamCount) {\n List<Method> methods = getSetterMethods(property);\n Class<?> result = null;\n\n for (Method method : methods) {\n Class<?> paramType = method.getParameterTypes()[0];\n\n if (!getConstructors(paramType, typeConstrParamCount).isEmpty()) {\n result = paramType;\n break;\n }\n }\n\n return result;\n }", "ConfigType getConfigTypeByCode(String typeCode);", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "public Iterable<Properties> getPropertiesSets(String key);", "public java.util.List<ProductSpecificationMapping> findByProductType(\n\t\tString productType, int start, int end);", "Collection<MCodeMember> getAllCodeMembers();", "public abstract java.util.Set getPaymentTypes();", "boolean antecedentsContain(LayerType type) {\n if (this.antecedents.size() == 0)\n return false;\n\n boolean antecendentsContainType = false;\n\n for (LayerType t: this.antecedents)\n if (t == type)\n antecendentsContainType = true;\n\n return antecendentsContainType;\n }", "private PropertyDescriptor findPropertyDesc(Class<?> type,String propertyName){\n\t\tString key=(type.getName()+PropertyAccessor.NESTED_PROPERTY_SEPARATOR+propertyName);\n\t\tif(propertyDescCache.containsKey(key)){\n\t\t\treturn propertyDescCache.get(key);\n\t\t}\n\t return doFindPropertyDesc(type.getName(), type, propertyName);\n\t}", "private Set<LCMessage> getOutOfContextLC(int type, int regency) {\n\n HashSet<LCMessage> result = new HashSet<>();\n\n for (LCMessage m : outOfContextLC) {\n\n if (m.getType() == type && m.getReg() == regency) {\n result.add(m);\n }\n\n }\n\n outOfContextLC.removeAll(result); // avoid memory leaks\n\n return result;\n }", "public static UnicodeSet addPropertyStarts(UnicodeSet paramUnicodeSet)\n/* */ {\n/* 2093 */ TrieIterator localTrieIterator1 = new TrieIterator(NormTrieImpl.normTrie);\n/* 2094 */ RangeValueIterator.Element localElement1 = new RangeValueIterator.Element();\n/* */ \n/* 2096 */ while (localTrieIterator1.next(localElement1)) {\n/* 2097 */ paramUnicodeSet.add(localElement1.start);\n/* */ }\n/* */ \n/* */ \n/* 2101 */ TrieIterator localTrieIterator2 = new TrieIterator(FCDTrieImpl.fcdTrie);\n/* 2102 */ RangeValueIterator.Element localElement2 = new RangeValueIterator.Element();\n/* */ \n/* 2104 */ while (localTrieIterator2.next(localElement2)) {\n/* 2105 */ paramUnicodeSet.add(localElement2.start);\n/* */ }\n/* */ \n/* 2108 */ if (isFormatVersion_2_1)\n/* */ {\n/* 2110 */ TrieIterator localTrieIterator3 = new TrieIterator(AuxTrieImpl.auxTrie);\n/* 2111 */ RangeValueIterator.Element localElement3 = new RangeValueIterator.Element();\n/* 2112 */ while (localTrieIterator3.next(localElement3)) {\n/* 2113 */ paramUnicodeSet.add(localElement3.start);\n/* */ }\n/* */ }\n/* */ \n/* 2117 */ for (int i = 44032; i < 55204; i += 28) {\n/* 2118 */ paramUnicodeSet.add(i);\n/* 2119 */ paramUnicodeSet.add(i + 1);\n/* */ }\n/* 2121 */ paramUnicodeSet.add(55204);\n/* 2122 */ return paramUnicodeSet;\n/* */ }", "List<AccountTypeDTO> lookupAccountTypes();", "public synchronized <T extends EnvironmentalObject> Iterable<T> getEnvironmentalObjects(int x, int y, Class<T> type) {\n\t\treturn new FilteringIterable<>(type, this.grid.getObjects(x, y));\n\t}", "List<ITypeDescriptor> getSubTypes(String type) throws StoreException;", "public void showProperties(Class type);", "@Override\n public Iterator<Type> getTypeIterator() {\n // trick to convert List<TypeImpl> to List<Type> with some safety\n Iterator<Type> it = Collections.<Type> unmodifiableList(types).iterator();\n it.next();\n return it;\n }", "CodeSetType createCodeSetType();", "public int getPropertyType() {\n\t\treturn 0;\n\t}", "public abstract List<LocationDto> searchLocationType(int loc_type_id);", "Collection<? extends String> getHasZipCode();", "public static final Set<SubscriberTypeEnum> getSystemTypeToCharge(SubscriberTypeEnum type)\r\n {\r\n Set<SubscriberTypeEnum> systemTypes = new HashSet<SubscriberTypeEnum>();\r\n systemTypes.add(SubscriberTypeEnum.HYBRID);\r\n \r\n if (SubscriberTypeEnum.PREPAID.equals(type))\r\n {\r\n systemTypes.add(SubscriberTypeEnum.PREPAID);\r\n }\r\n else if (SubscriberTypeEnum.POSTPAID.equals(type))\r\n {\r\n systemTypes.add(SubscriberTypeEnum.POSTPAID);\r\n }\r\n else\r\n {\r\n systemTypes.add(SubscriberTypeEnum.PREPAID);\r\n systemTypes.add(SubscriberTypeEnum.POSTPAID);\r\n }\r\n return systemTypes;\r\n }", "public Collection<Helper> getIslandHelpers(final WorldType type, final IslandLookupKey key) {\n Set<Helper> result = new HashSet<>();\n if (islandKeysCache.containsKey(key)) {\n for (Helper helper : islandKeysCache.get(key)) {\n if (helper.getWorldType() == type) {\n result.add(helper);\n }\n }\n }\n return result;\n }", "ISourceType[] getMemberTypes();", "Collection<BuildingBlock> findBuildingBlocksByType(BuildingBlockConstant buildingBlockType) throws BusinessException;", "public AIfcmaterialconstituentset getTomaterialconstituentset(EIfcmaterialconstituent type, ASdaiModel domain) throws SdaiException;", "List<PSTemplateSummary> findBaseTemplates(String type);", "public abstract List<BeanPropertyDefinition> findProperties();", "Set<Role> getRoleSet(RoleType type);", "List<ConnectorTypeElement> findConnectorTypes(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String searchString,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "public List<Address> findByProperty(String propertyName, Object value);", "public boolean needsPhi(TypeReference type) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n boolean seenLive = false;\n\n if (seenTypes.containsKey(type)) {\n \n for (ManagedParameter param : seenTypes.get(type)) { // TODO: Check all these\n if ((param.status == ValueStatus.FREE)) { // TODO: What about scopes\n return true;\n }\n\n if (param.status == ValueStatus.ALLOCATED) {\n if (seenLive) {\n return true;\n } else {\n seenLive = true;\n }\n }\n }\n } else {\n throw new IllegalArgumentException(\"Type \" + type + \" has never been seen before!\");\n }\n\n throw new IllegalStateException(\"No suitable candidate has been found\"); // TODO WRONG text\n }", "public CodeableConcept physicalType() {\n return getObject(CodeableConcept.class, FhirPropertyNames.PROPERTY_PHYSICAL_TYPE);\n }", "public abstract List<PropertyType> getBuiltInProperties();", "public boolean contains(final MoveStepType type) {\n for (final Enumeration<MoveStep> i = getSteps(); i.hasMoreElements(); ) {\n final MoveStep step = i.nextElement();\n if (step.getType() == type) {\n return true;\n }\n }\n return false;\n }", "public List<MBean> getMbeans(String type) {\n\n\t\tList<MBean> mBeans = mbeanMap.get(type);\n\n\t\tif (mBeans == null) {\n\t\t\tmBeans = new ArrayList<MBean>();\n\t\t\tthis.mbeanMap.put(type, mBeans);\n\t\t}\n\n\t\treturn Collections.unmodifiableList(mBeans);\n\t}", "public void testIndexTypeProperty() throws Exception {\n bean = new ManagedBeanBean();\n property = new ManagedPropertyBean();\n bean.setManagedBeanClass(beanName);\n bean.setManagedBeanScope(\"session\");\n property.setPropertyName(\"indexIntegerProperties\");\n listEntries = new ListEntriesBean();\n listEntries.setValueClass(\"java.lang.Integer\");\n listEntries.addValue(\"23\");\n property.setListEntries(listEntries);\n \n bean.addManagedProperty(property);\n \n mbf = new ManagedBeanFactory(bean);\n \n //testing with a property set\n assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));\n \n //make sure bean instantiated properly. Get property back from bean.\n ArrayList properties = (ArrayList) testBean.getIndexIntegerProperties();\n assertTrue(properties.get(1) instanceof Integer);\n \n Integer integer = new Integer(\"23\");\n assertTrue(properties.get(2).equals(integer));\n }", "public List<CWLType> getTypes() {\n return types;\n }", "protected abstract boolean isSupportedTestType(Properties prop);", "public Iterator<String> listSpecificProperties(String ontClass)\r\n\t{\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tOntClass ontR = obtainOntClass(ontClass);\r\n\t\tfor(Iterator iter = ontR.listDeclaredProperties(); iter.hasNext();)\r\n\t\t{\r\n\t\t\tOntProperty prop = (OntProperty)iter.next();\r\n\t\t\tStmtIterator si = ONT_MODEL.listStatements(prop, RDFS.domain, ontR);\r\n\t\t\tif(si.hasNext())\r\n\t\t\t\tlist.add(prop.getURI());\r\n\t\t}\r\n\t\treturn list.iterator();\r\n\t}", "public CustomizationPolicyPropertiesType typePropertiesType() {\n return this.typePropertiesType;\n }", "public CWLType getType() {\n return type;\n }", "public boolean testTiles(EIfcfillareastyletiles type) throws SdaiException;", "public boolean hasExperienceType(ExperienceType type)\r\n\t{\treturn this.experienceSources.contains(type);\t}", "public List getCourseTypes() throws ULMSSysException\r\n {\r\n return codeMaintainDAO.getCourseTypes();\r\n }", "public CodeUnit getDefinedCodeUnitAfter(Address addr);", "boolean contains(String type) {\n for (ASTNode child : children) {\n if (child.getType().equals(type)) return true;\n }\n\n return false;\n }", "TypeManager getTypeManager() {\n return types;\n }", "<T> PropertyType<T> getPropertyTypeByName(String propertyTypeName);", "public Iterator<Character> getDefinedChars() {\n\t\tSortedSet<Character> dest = new TreeSet<Character>();\n\t\tSet<Key<?>> keys = properties.keys(ObservableProperties.DEFAULT);\n\t\tfor (Key<?> key : keys) {\n\t\t\tObject t = properties.get(key);\n\t\t\tif (t instanceof WritingShape && key.toString().length() == 1) {\n\t\t\t\tdest.add(key.toString().charAt(0));\n\t\t\t}\n\t\t}\n\t\treturn dest.iterator();\n\t}", "public Units whereType(UnitType unitType)\n\t{\n\t\treturn where(new UnitSelector.UnitTypeSelector(unitType));\n\t}", "public static ExtendedIterator<? extends Resource> listTypes(Resource individual)\n\t{\n\t\tif (individual instanceof OntResource)\n\t\t\treturn ((OntResource)individual).listRDFTypes(false);\n\t\telse\n\t\t\treturn individual.listProperties(RDF.type).mapWith(new Map1<Statement, Resource>() {\n\t\t\t\tpublic Resource map1(Statement statement) {\n\t\t\t\t\treturn statement.getResource();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic Resource apply(Statement t) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t});\n\t}", "public void test_lt_01() {\n OntModel m = ModelFactory.createOntologyModel();\n \n DatatypeProperty p = m.createDatatypeProperty(NS + \"p\");\n OntClass c = m.createClass(NS + \"A\");\n \n Individual i = m.createIndividual(NS + \"i\", c);\n i.addProperty(p, \"testData\");\n \n int count = 0;\n \n for (Iterator j = i.listPropertyValues(p); j.hasNext();) {\n //System.err.println(\"Individual i has p value: \" + j.next());\n j.next();\n count++;\n }\n \n assertEquals(\"i should have one property\", 1, count);\n }", "private static List<Element> getXMLLocationTypes(Model model) {\n Set<LocationType> locTypes = new TreeSet<>(Comparators.objectsById());\n locTypes.addAll(model.getLocationTypes(null));\n List<Element> result = new ArrayList<>(locTypes.size());\n for (LocationType curType : locTypes) {\n Element typeElement = new Element(\"locationType\");\n typeElement.setAttribute(\"id\", String.valueOf(curType.getId()));\n typeElement.setAttribute(\"name\", curType.getName());\n for (String curOperation : curType.getAllowedOperations()) {\n Element opElement = new Element(\"allowedOperation\");\n opElement.setAttribute(\"name\", curOperation);\n typeElement.addContent(opElement);\n }\n result.add(typeElement);\n for (Map.Entry<String, String> curEntry\n : curType.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n typeElement.addContent(propertyElement);\n }\n }\n return result;\n }", "public CObject count_ObjectsFromType(short type, int stop)\r\n {\r\n stop++;\t\t\t\t\t\t\t\t\t// BX a partir de 1!\r\n evtNSelectedObjects = 0;\r\n\r\n int oil = 0;\r\n CObjInfo poilLoop = null;\r\n CObject pHo;\r\n do\r\n {\r\n for (; oil < rhPtr.rhOiList.length; oil++)\r\n {\r\n poilLoop = rhPtr.rhOiList[oil];\r\n if (type == 0 || (type != 0 && type == poilLoop.oilType))\r\n {\r\n break;\r\n }\r\n }\r\n if (oil == rhPtr.rhOiList.length)\r\n {\r\n return null;\r\n }\r\n\r\n CObjInfo poil = poilLoop;\r\n oil++;\r\n\r\n if (poil.oilEventCount != rh2EventCount)\r\n {\r\n if (rh4ConditionsFalse == false)\r\n {\r\n // Explore la liste entiere des objets\r\n short num = poil.oilObject;\r\n while (num >= 0)\r\n {\r\n pHo = rhPtr.rhObjectList[num];\r\n if (pHo == null)\r\n {\r\n return null;\r\n }\r\n if ((pHo.hoFlags & CObject.HOF_DESTROYED) == 0)\t\t// Deja detruit?\r\n {\r\n evtNSelectedObjects++;\r\n if (evtNSelectedObjects == stop)\r\n {\r\n return pHo;\r\n }\r\n }\r\n num = pHo.hoNumNext;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // Explore la liste des objets selectionnes\r\n short num = poil.oilListSelected;\r\n while (num >= 0)\r\n {\r\n pHo = rhPtr.rhObjectList[num];\r\n if (pHo == null)\r\n {\r\n return null;\r\n }\r\n if ((pHo.hoFlags & CObject.HOF_DESTROYED) == 0)\t\t// Deja detruit?\r\n {\r\n evtNSelectedObjects++;\r\n if (evtNSelectedObjects == stop)\r\n {\r\n return pHo;\r\n }\r\n }\r\n num = pHo.hoNextSelected;\r\n }\r\n }\r\n } while (true);\r\n }", "boolean containsRequirementFor(AResourceType type);", "public java.util.List<ProductSpecificationMapping> findByProductType(\n\t\tString productType, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator\n\t\t\t<ProductSpecificationMapping> orderByComparator,\n\t\tboolean useFinderCache);", "private ImmutableSet<Property> annotationBuilderPropertySet(TypeElement annotationType) {\n Nullables nullables = Nullables.fromMethods(processingEnv, ImmutableList.of());\n // Translate the annotation elements into fake Property instances. We're really only interested\n // in the name and type, so we can use them to declare a parameter of the generated\n // @AutoAnnotation method. We'll generate a parameter for every element, even elements that\n // don't have setters in the builder. The generated builder implementation will pass the default\n // value from the annotation to those parameters.\n return methodsIn(annotationType.getEnclosedElements()).stream()\n .filter(m -> m.getParameters().isEmpty() && !m.getModifiers().contains(Modifier.STATIC))\n .map(method -> annotationBuilderProperty(method, nullables))\n .collect(toImmutableSet());\n }", "public void testMsProjectType() throws MPXJException {\n TaskManager taskManager = getTaskManager();\n CustomPropertyDefinition col5 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"col5\", null);\n col5.getAttributes().put(CustomPropertyMapping.MSPROJECT_TYPE, \"NUMBER1\");\n\n CustomPropertyDefinition col4 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"col4\", null);\n\n CustomPropertyDefinition col3 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"col3\", null);\n col3.getAttributes().put(CustomPropertyMapping.MSPROJECT_TYPE, \"COST10\");\n\n CustomPropertyDefinition col2 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"col2\", null);\n CustomPropertyDefinition col1 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"col1\", null);\n col1.getAttributes().put(CustomPropertyMapping.MSPROJECT_TYPE, \"NUMBER3\");\n\n Map<CustomPropertyDefinition, FieldType> mapping = CustomPropertyMapping.buildMapping(taskManager);\n assertEquals(TaskField.NUMBER3, mapping.get(col1));\n assertEquals(TaskField.NUMBER4, mapping.get(col2));\n assertEquals(TaskField.COST10, mapping.get(col3));\n assertEquals(TaskField.NUMBER2, mapping.get(col4));\n assertEquals(TaskField.NUMBER1, mapping.get(col5));\n }", "public String getProperty(Class type, String key);", "Report.LocationOuterClass.Location.LocationType getLocationtype();", "public final Iterator<PropertyDeclaration> getDeclarationIterator()\n {\n final Type superType = getSuperClass();\n\n return new FilterIterator(declarations.values().iterator(), new Predicate()\n {\n public boolean evaluate(Object object)\n {\n return superType.getProperty(((PropertyDeclaration)object).getName()) == null;\n }\n });\n }", "public org.omg.CORBA.TypeCode _type()\r\n {\r\n return PropositionHelper.type();\r\n }", "public abstract List<CustomerType> findCustomerTypebyCustomerTypeNumber(String searchString);", "public Iterator<String> getProperties() {\n List<String> list = Collections.emptyList();\n return list.iterator();\n }" ]
[ "0.6307171", "0.5792047", "0.5635438", "0.53670543", "0.536341", "0.5146952", "0.49988532", "0.4960873", "0.47293165", "0.47099218", "0.46754825", "0.46068302", "0.45988932", "0.4580763", "0.4530616", "0.45224696", "0.4506573", "0.44699368", "0.4454517", "0.44423068", "0.44364104", "0.4419948", "0.43984303", "0.43803596", "0.435514", "0.43304595", "0.4299807", "0.42576945", "0.42551777", "0.42525753", "0.42316103", "0.42252058", "0.42076674", "0.41940492", "0.4190489", "0.4179813", "0.4178466", "0.4172919", "0.41516528", "0.41472715", "0.41379285", "0.41280228", "0.41052347", "0.41011155", "0.40949428", "0.40929005", "0.40904236", "0.4088944", "0.40836582", "0.40831771", "0.40804112", "0.40784764", "0.4073101", "0.4068121", "0.40564653", "0.40295464", "0.40176755", "0.40153694", "0.4004061", "0.40015373", "0.3996863", "0.3995948", "0.39947355", "0.39917174", "0.39835206", "0.39770377", "0.3974105", "0.39719394", "0.39708155", "0.39683312", "0.3968097", "0.396759", "0.39658457", "0.3960821", "0.3960661", "0.39586708", "0.39564863", "0.39562264", "0.39558083", "0.39527208", "0.39526606", "0.39488837", "0.39424974", "0.39409858", "0.3936277", "0.39355692", "0.3935427", "0.39321098", "0.392965", "0.39231655", "0.3918589", "0.3918541", "0.39164928", "0.39148396", "0.39122015", "0.39086777", "0.39047906", "0.38994068", "0.3893423", "0.38910204" ]
0.61754173
1
Get a forward code unit iterator over code units that have the specified comment type.
public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "public CodeUnitIterator getCodeUnits(boolean forward);", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public CodeUnitIterator getCodeUnitIterator(String property, boolean forward);", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "public CommentTypeCodeType getCommentType() {\n\t return this.commentType;\n\t}", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "void moveNext() {\n moveNextInternal();\n while (tokenType == CifTokenType.COMMENT) {\n moveNextInternal();\n }\n }", "public void setCommentType(CommentTypeCodeType commentType) {\n\t this.commentType = commentType;\n\t}", "public interface CommentGenerator {\n\n void addConfigurationProperties(Properties properties);\n\n void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn);\n\n void addFieldComment(Field field, IntrospectedTable introspectedTable);\n\n void addClassComment(JavaElement element, IntrospectedTable introspectedTable);\n\n void addDataServiceComment(JavaElement element, IntrospectedTable introspectedTable);\n\n void addClassAnnotation(JavaElement element);\n\n void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean markAsDoNotDelete);\n\n void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable);\n\n void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable);\n\n void addDataServiceSaveMethodComment(Method method, IntrospectedTable introspectedTable);\n\n void addDataServiceQueryMethodComment(Method method, List<IntrospectedColumn> introspectedColumns, IntrospectedTable introspectedTable);\n\n void addGetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn);\n\n void addSetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn);\n\n void addJavaFileComment(CompilationUnit compilationUnit);\n\n void addComment(XmlElement xmlElement);\n\n void addRootComment(XmlElement rootElement);\n\n}", "@NotNull\n private List<UMLComment> extractInternalComments(@NotNull PsiFile file,\n @NotNull String sourceFile) {\n Collection<PsiComment> psiComments = PsiTreeUtil.findChildrenOfType(file, PsiComment.class);\n List<UMLComment> umlComments = new ArrayList<>();\n for (PsiComment comment : psiComments) {\n LocationInfo locationInfo = null;\n if (comment.getTokenType() == JavaTokenType.END_OF_LINE_COMMENT) {\n locationInfo = new LocationInfo(file, sourceFile, comment, LocationInfo.CodeElementType.LINE_COMMENT);\n } else if (comment.getTokenType() == JavaTokenType.C_STYLE_COMMENT) {\n locationInfo = new LocationInfo(file, sourceFile, comment, LocationInfo.CodeElementType.BLOCK_COMMENT);\n }\n if (locationInfo != null) {\n String text = Formatter.format(comment);\n UMLComment umlComment = new UMLComment(text, locationInfo);\n umlComments.add(umlComment);\n }\n }\n return umlComments;\n }", "Iterator<Class<? extends IToken>> getTmqlTokenIterator();", "private void skipComment() {\r\n int length = sourceCode.length();\r\n if (++index < length) {\r\n char character = sourceCode.charAt(index);\r\n if (character == '/') {\r\n // If it's a line comment (//) then skip to the next line.\r\n // Find the next line.\r\n index = sourceCode.indexOf('\\n', index);\r\n // Skip to after it if it's found, or the end of the source code\r\n // otherwise.\r\n index = index == -1 ? length : index + 1;\r\n } else if (character == '*') {\r\n // If it's a long comment (/* ... */) then skip to after the\r\n // occurrence of \"*/\".\r\n // Find \"*/\".\r\n index = sourceCode.indexOf(\"*/\", index);\r\n // Skip to after it if it's found, or the end of the source code\r\n // otherwise.\r\n index = index == -1 ? length : index + 2;\r\n }\r\n }\r\n }", "@Override\n public Iterator<Token> iterator() {\n return new Iterator<Token>() {\n private int left;\n private int right;\n private TokenType type;\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public boolean hasNext() {\n lex();\n return type != null;\n }\n\n @Override\n public Token next() {\n lex();\n if (type == null) {\n throw new NoSuchElementException();\n }\n Token t = new Token(type, left, right);\n left = right;\n right = -1;\n type = null;\n return t;\n }\n\n @SuppressWarnings(\"synthetic-access\")\n private void lex() {\n int n = content.length();\n while (type == null && left < n) {\n Matcher m = TOKEN.matcher(content);\n if (m.find(left)) {\n right = m.end();\n } else {\n // Do orphaned-surrogates cause this?\n throw new AssertionError(\"Index \" + left + \" in \" + content);\n }\n int cp = content.codePointAt(left);\n switch (cp) {\n case '\\t': case '\\n': case '\\r': case ' ':\n break;\n case '/':\n if (right - left == 1) {\n type = TokenType.PUNCTUATION;\n } else {\n type = null;\n if (preserveDocComments && left + 2 < right) {\n if (content.charAt(left + 1) == '*'\n && content.charAt(left + 2) == '*') {\n type = TokenType.DOC_COMMENT;\n }\n }\n }\n break;\n case '\"': case '\\'':\n type = TokenType.STRING;\n break;\n case '.':\n type = right - left == 1\n ? TokenType.PUNCTUATION : TokenType.NUMBER;\n break;\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n type = TokenType.NUMBER;\n break;\n default:\n if (Character.isUnicodeIdentifierStart(cp) || cp == '$') {\n type = TokenType.WORD;\n right = left;\n do {\n right += Character.charCount(cp);\n } while (\n right < n\n && ((cp = content.codePointAt(right)) == '$'\n || Character.isUnicodeIdentifierPart(cp)));\n } else {\n type = TokenType.PUNCTUATION;\n }\n break;\n }\n if (type == null) {\n Preconditions.checkState(right > left);\n left = right;\n }\n }\n }\n };\n }", "protected int scanComment () throws HTMLParseException {\r\n int startvalue = index - 1;\r\n int i = -1;\r\n int j = index;\r\n while (j+2 < length) {\r\n if (pagepart[j] == '-' &&\r\n pagepart[j + 1] == '-' &&\r\n pagepart[j + 2] == '>') {\r\n i = j;\r\n break;\r\n }\r\n j++;\r\n }\r\n if (i > -1) {\r\n index = i + 2;\r\n nextToken = MT;\r\n match (MT);\r\n stringLength = index - startvalue;\r\n return COMMENT;\r\n }\r\n block.setRest (startvalue);\r\n return END;\r\n }", "private static void testComments() throws IOException {\n\t// say what output is expected\n\tSystem.err.println(\"\\nTESTING COMMENTS -- NO OUTPUT EXPECTED\");\n\n\t// open input file\n\tFileReader inFile = null;\n\ttry {\n\t inFile = new FileReader(\"inComments\");\n\t} catch (FileNotFoundException ex) {\n\t System.err.println(\"File inUntermComment not found.\");\n\t System.exit(-1);\n\t}\n\n\t// create and call the scanner\n\tYylex scanner = new Yylex(inFile);\n\tSymbol token = scanner.next_token();\n\tif (token.sym != sym.EOF) {\n\t System.err.println(\"ERROR TESTING COMMENTS: not at EOF\");\n\t System.err.println(\"sym: \" + token.sym);\n\t}\n }", "public interface Listing {\n\n\t/**\n\t * The name of the default tree in the display.\n\t * \n\t * @see #removeTree(String)\n\t */\n\tpublic static final String DEFAULT_TREE_NAME = \"Program Tree\";\n\n\t/**\n\t * get the code unit that starts at the given address.\n\t *\n\t * @param addr the address to look for a codeUnit.\n\t * @return the codeUnit that begins at the given address\n\t */\n\tpublic CodeUnit getCodeUnitAt(Address addr);\n\n\t/**\n\t * get the code unit that contains the given address.\n\t *\n\t * @param addr the address to look for a codeUnit.\n\t * @return the codeUnit that contains the given address\n\t */\n\tpublic CodeUnit getCodeUnitContaining(Address addr);\n\n\t/**\n\t * get the next code unit that starts an an address that is greater than the\n\t * given address. The search will include instructions, defined data, and\n\t * undefined data.\n\t *\n\t * @param addr the address from which to search forward.\n\t * @return the next CodeUnit found while searching forward from addr or null\n\t * if none found.\n\t */\n\tpublic CodeUnit getCodeUnitAfter(Address addr);\n\n\t/**\n\t * get the next code unit that starts at an address that is less than the\n\t * given address. The search will include instructions, defined data, and\n\t * undefined data.\n\t *\n\t * @param addr the address from which to search backwards.\n\t * @return The first codeUnit found while searching backwards from addr or\n\t * null if none found.\n\t */\n\tpublic CodeUnit getCodeUnitBefore(Address addr);\n\n\t/**\n\t * Get an iterator that contains all code units in the program which have\n\t * the specified property type defined. Standard property types are defined\n\t * in the CodeUnit class. The property types are: EOL_COMMENT, PRE_COMMENT,\n\t * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE, VALUE_REFERENCE.\n\t * Property types can also be user defined.\n\t *\n\t * @param property the name of the property type.\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * start address that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, boolean forward);\n\n\t/**\n\t * Get an iterator that contains the code units which have the specified\n\t * property type defined. Only code units at an address greater than or\n\t * equal to the specified start address will be returned by the iterator. If\n\t * the start address is null then check the entire program. Standard\n\t * property types are defined in the CodeUnit class. The property types are:\n\t * EOL_COMMENT, PRE_COMMENT, POST_COMMENT, USER_REFERENCE,\n\t * MNEMONIC_REFERENCE, VALUE_REFERENCE. Property types can also be user\n\t * defined.\n\t *\n\t * @param property the name of the property type. (EOL_COMMENT, PRE_COMMENT,\n\t * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE,\n\t * VALUE_REFERENCE)\n\t * @param addr the start address\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * start address that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator that contains the code units which have the specified\n\t * property type defined. Only code units starting within the address set\n\t * will be returned by the iterator. If the address set is null then check\n\t * the entire program. Standard property types are defined in the CodeUnit\n\t * class.\n\t *\n\t * @param property the name of the property type.\n\t * @param addrSet the address set\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * address set that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);\n\n\t/**\n\t * Get a forward code unit iterator over code units that have the specified\n\t * comment type.\n\t * \n\t * @param commentType type defined in CodeUnit\n\t * @param addrSet address set\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * address set that have the specified comment type defined\n\t */\n\tpublic CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);\n\n\t/**\n\t * Get a forward iterator over addresses that have the specified comment\n\t * type.\n\t * \n\t * @param commentType type defined in CodeUnit\n\t * @param addrSet address set\n\t * @param forward true to iterator from lowest address to highest, false\n\t * highest to lowest\n\t * @return an AddressIterator that returns all addresses from the indicated\n\t * address set that have the specified comment type defined\n\t */\n\tpublic AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);\n\n\t/**\n\t * Get a forward iterator over addresses that have any type of comment.\n\t * \n\t * @param addrSet address set\n\t * @param forward true to iterator from lowest address to highest, false\n\t * highest to lowest\n\t * @return an AddressIterator that returns all addresses from the indicated\n\t * address set that have any type of comment.\n\t */\n\tpublic AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * Get the comment for the given type at the specified address.\n\t *\n\t * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT,\n\t * PLATE_COMMENT, or REPEATABLE_COMMENT\n\t * @param address the address of the comment.\n\t * @return the comment string of the appropriate type or null if no comment\n\t * of that type exists for this code unit\n\t * @throws IllegalArgumentException if type is not one of the types of\n\t * comments supported\n\t */\n\tpublic String getComment(int commentType, Address address);\n\n\t/**\n\t * Set the comment for the given comment type at the specified address.\n\t *\n\t * @param address the address of the comment.\n\t * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT,\n\t * PLATE_COMMENT, or REPEATABLE_COMMENT\n\t * @param comment comment to set at the address\n\t * @throws IllegalArgumentException if type is not one of the types of\n\t * comments supported\n\t */\n\tpublic void setComment(Address address, int commentType, String comment);\n\n\t/**\n\t * get a CodeUnit iterator that will iterate over the entire address space.\n\t * \n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator in forward direction\n\t */\n\tpublic CodeUnitIterator getCodeUnits(boolean forward);\n\n\t/**\n\t * Returns an iterator of the code units in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first code unit that would be returned by an initial call\n\t * to the <code>next</code> method. An initial call to the <code>previous</code>\n\t * method would return the code unit with an address less than the specified\n\t * address.\n\t * <p>\n\t *\n\t * @param addr the start address of the iterator.\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator positioned just before addr.\n\t */\n\tpublic CodeUnitIterator getCodeUnits(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only code units whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the AddressRangeSet to iterate over (required).\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that is restricted to the give\n\t * AddressRangeSet.\n\t */\n\tpublic CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Instruction that starts at the given address. If no Instruction\n\t * has been defined to start at that address, return null.\n\t *\n\t * @param addr the address to check for the start of an instruction\n\t * @return the Instruction object that starts at addr; or null if no\n\t * Instructions starts at addr.\n\t */\n\tpublic Instruction getInstructionAt(Address addr);\n\n\t/**\n\t * get the Instruction that contains the given address. If an Instruction is\n\t * defined that contains that address, it will be returned. Otherwise, null\n\t * will be returned.\n\t *\n\t * @param addr the address to check for containment in an Instruction.\n\t * @return the Instruction object that contains addr; or null if no\n\t * Instructions contain addr.\n\t */\n\tpublic Instruction getInstructionContaining(Address addr);\n\n\t/**\n\t * get the closest Instruction that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr The address at which to begin the forward search.\n\t * @return the next Instruction whose starting address is greater than addr.\n\t */\n\tpublic Instruction getInstructionAfter(Address addr);\n\n\t/**\n\t * get the closest Instruction that starts at an address that is less than\n\t * the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest Instruction whose starting address is less than addr.\n\t */\n\tpublic Instruction getInstructionBefore(Address addr);\n\n\t/**\n\t * get an Instruction iterator that will iterate over the entire address\n\t * space.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return an InstructionIterator that iterates over all instructions in the\n\t * program.\n\t */\n\tpublic InstructionIterator getInstructions(boolean forward);\n\n\t/**\n\t * Returns an iterator of the instructions in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first instruction that would be returned by an initial call\n\t * to the <code>next</code> method. An initial call to the <code>previous</code>\n\t * method would return the instruction with an address less than the\n\t * specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return an InstructionIterator that iterates over all Instruction objects\n\t * in the given address range set.\n\t */\n\tpublic InstructionIterator getInstructions(Address addr, boolean forward);\n\n\t/**\n\t * Get an Instruction iterator over the address range(s). Only instructions\n\t * whose start addresses are contained in the given address set will be\n\t * returned by the iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * objects in the given address range set.\n\t */\n\tpublic InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (Defined or Undefined) that starts at the given address.\n\t *\n\t * @param addr the address to check for a Data object.\n\t * @return the Data object that starts at addr; or null if no Data\n\t * objects(defined or undefined) start at addr.\n\t */\n\tpublic Data getDataAt(Address addr);\n\n\t/**\n\t * Gets the data object that is at or contains the given address or null if\n\t * the address in not in memory or is in an instruction.\n\t *\n\t * @param addr the address for which to find its containing data element.\n\t * @return the Data object containing the given address or null if there is\n\t * no data that contains the address.\n\t */\n\tpublic Data getDataContaining(Address addr);\n\n\t/**\n\t * get the closest Data object that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @return the next Data object whose starting address is greater than addr.\n\t */\n\tpublic Data getDataAfter(Address addr);\n\n\t/**\n\t * get the closest Data object that starts at an address that is less than\n\t * the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest Data object whose starting address is less than addr.\n\t */\n\tpublic Data getDataBefore(Address addr);\n\n\t/**\n\t * get a Data iterator that will iterate over the entire address space;\n\t * returning both defined and undefined Data objects.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * object in the program.\n\t */\n\tpublic DataIterator getData(boolean forward);\n\n\t/**\n\t * Returns an iterator of the data in this listing (in proper sequence),\n\t * starting at the specified address. The specified address indicates the\n\t * first Data that would be returned by an initial call to the <code>next</code>\n\t * method. An initial call to the <code>previous</code> method would return the\n\t * Data with an address less than the specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all Data objects in the given\n\t * address range set.\n\t */\n\tpublic DataIterator getData(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only data whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * objects in the given address range set.\n\t */\n\tpublic DataIterator getData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (defined) object that starts at the given address. If no\n\t * Data object is defined at that address, then return null.\n\t *\n\t * @param addr The address to check for defined Data.\n\t * @return a Data object that starts at addr, or null if no Data object has\n\t * been defined to start at addr.\n\t */\n\tpublic Data getDefinedDataAt(Address addr);\n\n\t/**\n\t * get the Data object that starts at the given address. If no Data objects\n\t * have been defined that contain that address, then return null.\n\t *\n\t * @param addr the address to check for containment in a defined Data\n\t * object.\n\t * @return the defined Data object containing addr.\n\t */\n\tpublic Data getDefinedDataContaining(Address addr);\n\n\t/**\n\t *\n\t * get the defined Data object that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @return the next defined Data object whose starting address is greater\n\t * than addr.\n\t */\n\tpublic Data getDefinedDataAfter(Address addr);\n\n\t/**\n\t * get the closest defined Data object that starts at an address that is\n\t * less than the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest defined Data object whose starting address is less\n\t * than addr.\n\t */\n\tpublic Data getDefinedDataBefore(Address addr);\n\n\t/**\n\t * get a Data iterator that will iterate over the entire address space;\n\t * returning only defined Data objects.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * program.\n\t */\n\tpublic DataIterator getDefinedData(boolean forward);\n\n\t/**\n\t * Returns an iterator of the defined data in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first defined Data that would be returned by an initial\n\t * call to the <code>next</code> method. An initial call to the\n\t * <code>previous</code> method would return the defined Data with an address\n\t * less than the specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * given address range set.\n\t */\n\tpublic DataIterator getDefinedData(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only defined data whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * given address range set.\n\t */\n\tpublic DataIterator getDefinedData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (undefined) object that starts at the given address.\n\t *\n\t * @param addr The address to check for undefined data.\n\t * @return a default DataObject if bytes exist at addr and nothing has been\n\t * defined to exist there. Otherwise returns null.\n\t */\n\tpublic Data getUndefinedDataAt(Address addr);\n\n\t/**\n\t * Get the undefined Data object that starts at an address that is greater\n\t * than the given address. This operation can be slow for large programs so\n\t * a TaskMonitor is required.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t * @return the next undefined Data object whose starting address is greater\n\t * than addr.\n\t */\n\tpublic Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);\n\n\t/**\n\t * Get the undefined Data object that falls within the set. This operation\n\t * can be slow for large programs so a TaskMonitor is required.\n\t *\n\t * @param set the addressSet at which to find the first undefined address.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t *\n\t * @return the next undefined Data object whose starting address falls\n\t * within the addresSet.\n\t */\n\tpublic Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);\n\n\t/**\n\t * get the closest undefined Data object that starts at an address that is\n\t * less than the given address. This operation can be slow for large\n\t * programs so a TaskMonitor is required.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t * @return the closest undefined Data object whose starting address is less\n\t * than addr.\n\t */\n\tpublic Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);\n\n\t/**\n\t * Get the address set which corresponds to all undefined code units within\n\t * the specified set of address.\n\t *\n\t * @param set set of addresses to search\n\t * @param initializedMemoryOnly if true set will be constrained to\n\t * initialized memory areas, if false set will be constrained to\n\t * all defined memory blocks.\n\t * @param monitor task monitor\n\t * @return address set corresponding to undefined code units\n\t * @throws CancelledException if monitor cancelled\n\t */\n\tpublic AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly,\n\t\t\tTaskMonitor monitor) throws CancelledException;\n\n\t/**\n\t * Returns the next instruction or defined data after the given address;\n\t *\n\t * @param addr the address at which to begin the search\n\t * @return the next instruction or defined data at an address higher than\n\t * the given address.\n\t */\n\tpublic CodeUnit getDefinedCodeUnitAfter(Address addr);\n\n\t/**\n\t * Returns the closest instruction or defined data that starts before the\n\t * given address.\n\t *\n\t * @param addr the address at which to begin the search\n\t * @return the closest instruction or defined data at an address below the\n\t * given address.\n\t */\n\tpublic CodeUnit getDefinedCodeUnitBefore(Address addr);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) in the program.\n\t *\n\t * @param forward true means get iterator that starts at the minimum address\n\t * and iterates forward. Otherwise it starts at the maximum\n\t * address and iterates backwards.\n\t * @return an iterator over all the composite data objects.\n\t */\n\tpublic DataIterator getCompositeData(boolean forward);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) in the program at or after the given Address.\n\t *\n\t * @param start start of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return an iterator over all the composite data objects starting with the\n\t * given address.\n\t */\n\tpublic DataIterator getCompositeData(Address start, boolean forward);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) within the specified address set in the program.\n\t *\n\t * @param addrSet the address set\n\t * @param forward true means get iterator in forward direction\n\t * @return an iterator over all the composite data objects in the given\n\t * address set.\n\t */\n\tpublic DataIterator getCompositeData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * Returns an iterator over all user defined property names.\n\t *\n\t * @return an iterator over all user defined property names.\n\t */\n\tpublic Iterator<String> getUserDefinedProperties();\n\n\t/**\n\t * Removes the entire property from the program\n\t *\n\t * @param propertyName the name of the property to remove.\n\t */\n\tpublic void removeUserDefinedProperty(String propertyName);\n\n\t/**\n\t * Returns the PropertyMap associated with the given name\n\t *\n\t * @param propertyName the property name\n\t * @return PropertyMap the propertyMap object.\n\t */\n\tpublic PropertyMap getPropertyMap(String propertyName);\n\n\t/**\n\t * Creates a new Instruction object at the given address. The specified\n\t * context is only used to create the associated prototype. It is critical\n\t * that the context be written immediately after creation of the instruction\n\t * and must be done with a single set operation on the program context. Once\n\t * a set context is done on the instruction address, any subsequent context\n\t * changes will result in a <code>ContextChangeException</code>\n\t *\n\t * @param addr the address at which to create an instruction\n\t * @param prototype the InstructionPrototype that describes the type of instruction to create.\n\t * @param memBuf buffer that provides the bytes that make up the instruction.\n\t * @param context the processor context at this location.\n\t * @param length instruction byte-length (must be in the range 0..prototype.getLength()).\n\t * If smaller than the prototype length it must have a value no greater than 7, otherwise\n\t * an error will be thrown. A value of 0 or greater-than-or-equal the prototype length\n\t * will be ignored and not impose and override length. The length value must be a multiple \n\t * of the {@link Language#getInstructionAlignment() instruction alignment} .\n\t * @return the newly created instruction. \n\t * @throws CodeUnitInsertionException thrown if the new Instruction would overlap and \n\t * existing {@link CodeUnit} or the specified {@code length} is unsupported.\n\t * @throws IllegalArgumentException if a negative {@code length} is specified.\n\t */\n\tpublic Instruction createInstruction(Address addr, InstructionPrototype prototype,\n\t\t\tMemBuffer memBuf, ProcessorContextView context, int length)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a complete set of instructions. A preliminary pass will be made\n\t * checking for code unit conflicts which will be marked within the\n\t * instructionSet causing dependent blocks to get pruned.\n\t * \n\t * @param instructionSet the set of instructions to be added. All code unit\n\t * conflicts will be marked within the instructionSet and\n\t * associated blocks.\n\t * @param overwrite if true, overwrites existing code units.\n\t * @throws CodeUnitInsertionException if the instruction set is incompatible\n\t * with the program memory\n\t * @return the set of addresses over which instructions were actually added\n\t * to the program. This may differ from the InstructionSet address\n\t * set if conflict errors occurred. Such conflict errors will be\n\t * recorded within the InstructionSet and its InstructionBlocks.\n\t */\n\tpublic AddressSetView addInstructions(InstructionSet instructionSet, boolean overwrite)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a new defined Data object of a given length at the given address.\n\t * This ignores the bytes that are present\n\t *\n\t * @param addr the address at which to create a new Data object.\n\t * @param dataType the Data Type that describes the type of Data object to\n\t * create.\n\t * @param length the length of the datatype.\n\t * @return newly created data unit\n\t * @exception CodeUnitInsertionException thrown if the new Instruction would\n\t * overlap and existing Instruction or defined data.\n\t */\n\tpublic Data createData(Address addr, DataType dataType, int length)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a new defined Data object at the given address. This ignores the\n\t * bytes that are present\n\t *\n\t * @param addr the address at which to create a new Data object.\n\t * @param dataType the Data Type that describes the type of Data object to\n\t * create.\n\t * @return newly created data unit\n\t * @exception CodeUnitInsertionException thrown if the new Instruction would\n\t * overlap and existing Instruction or defined data.\n\t */\n\tpublic Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;\n\n\t/**\n\t * Clears any code units in the given range returning everything to \"db\"s,\n\t * and removing any references in the affected area. Note that the module\n\t * and fragment structure is unaffected. If part of a code unit is contained\n\t * in the given address range then the whole code unit will be cleared.\n\t *\n\t * @param startAddr the start address of the area to be cleared.\n\t * @param endAddr the end address of the area to be cleared.\n\t * @param clearContext clear context register values if true\n\t */\n\tpublic void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext);\n\n\t/**\n\t * Clears any code units in the given range returning everything to \"db\"s,\n\t * and removing any references in the affected area. Note that the module\n\t * and fragment structure is unaffected. If part of a code unit is contained\n\t * in the given address range then the whole code unit will be cleared.\n\t *\n\t * @param startAddr the start address of the area to be cleared.\n\t * @param endAddr the end address of the area to be cleared.\n\t * @param clearContext clear context register values if true\n\t * @param monitor monitor that can be used to cancel the clear operation\n\t * @throws CancelledException if the operation was cancelled.\n\t */\n\tpublic void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext,\n\t\t\tTaskMonitor monitor) throws CancelledException;\n\n\t/**\n\t * Checks if the given ranges consists entirely of undefined data.\n\t * \n\t * @param start The start address of the range to check.\n\t * @param end The end address of the range to check.\n\t * @return boolean true if the given range is in memory and has no\n\t * instructions or defined data.\n\t */\n\tpublic boolean isUndefined(Address start, Address end);\n\n\t/**\n\t * Clears the comments in the given range.\n\t * \n\t * @param startAddr the start address of the range to be cleared\n\t * @param endAddr the end address of the range to be cleared\n\t */\n\tpublic void clearComments(Address startAddr, Address endAddr);\n\n\t/**\n\t * Clears the properties in the given range.\n\t * \n\t * @param startAddr the start address of the range to be cleared\n\t * @param endAddr the end address of the range to be cleared\n\t * @param monitor task monitor for cancelling operation.\n\t * @throws CancelledException if the operation was cancelled.\n\t */\n\tpublic void clearProperties(Address startAddr, Address endAddr, TaskMonitor monitor)\n\t\t\tthrows CancelledException;\n\n\t/**\n\t * Removes all CodeUnits, comments, properties, and references from the\n\t * listing.\n\t * \n\t * @param clearContext if true, also clear any instruction context that has\n\t * been laid down from previous disassembly.\n\t * @param monitor used for tracking progress and cancelling the clear\n\t * operation.\n\t */\n\tpublic void clearAll(boolean clearContext, TaskMonitor monitor);\n\n\t/**\n\t * Returns the fragment containing the given address.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param addr the address that is contained within a fragment.\n\t *\n\t * @return will return null if the address is not in the program.\n\t */\n\tpublic ProgramFragment getFragment(String treeName, Address addr);\n\n\t/**\n\t * Returns the module with the given name.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param name the name of the module to find.\n\t *\n\t * @return will return null if there is no module with the given name.\n\t */\n\tpublic ProgramModule getModule(String treeName, String name);\n\n\t/**\n\t * Returns the fragment with the given name.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param name the name of the fragment to find.\n\t *\n\t * @return will return null if there is no fragment with the given name.\n\t */\n\tpublic ProgramFragment getFragment(String treeName, String name);\n\n\t/**\n\t * Create a new tree that will be identified by the given name. By default,\n\t * the new root module is populated with fragments based on memory blocks.\n\t * Note that the root module's name is not the same as its tree name. The\n\t * root module name defaults to the name of the program.\n\t * \n\t * @param treeName name of the tree to search\n\t * @return root module\n\t * @throws DuplicateNameException if a tree with the given name already\n\t * exists\n\t */\n\tpublic ProgramModule createRootModule(String treeName) throws DuplicateNameException;\n\n\t/**\n\t * Gets the root module for a tree in this listing.\n\t * \n\t * @param treeName name of tree\n\t *\n\t * @return the root module for the listing; returns null if there is no tree\n\t * rooted at a module with the given name.\n\t */\n\tpublic ProgramModule getRootModule(String treeName);\n\n\t/**\n\t * Returns the root module of the program tree with the given name;\n\t * \n\t * @param treeID id of the program tree\n\t * @return the root module of the specified tree.\n\t */\n\tpublic ProgramModule getRootModule(long treeID);\n\n\t/**\n\t * Returns the root module for the default program tree. This would be the\n\t * program tree that has existed the longest.\n\t *\n\t * @return the root module for the oldest existing program tree.\n\t */\n\tpublic ProgramModule getDefaultRootModule();\n\n\t/**\n\t * Get the names of all the trees defined in this listing.\n\t *\n\t * @return the names of all program trees defined in the program.\n\t */\n\tpublic String[] getTreeNames();\n\n\t/**\n\t * Remove the tree rooted at the given name.\n\t * \n\t * @param treeName the name of the tree to remove.\n\t * @return true if the tree was removed; return false if this is the last\n\t * tree for the program; cannot delete the last tree.\n\t */\n\tpublic boolean removeTree(String treeName);\n\n\t/**\n\t * Rename the tree. This method does not change the root module's name only\n\t * the identifier for the tree.\n\t * \n\t * @param oldName old name of the tree\n\t * @param newName new name of the tree.\n\t * @throws DuplicateNameException if newName already exists for a root\n\t * module\n\t */\n\tpublic void renameTree(String oldName, String newName) throws DuplicateNameException;\n\n\t/**\n\t * gets the total number of CodeUnits (Instructions, defined Data, and\n\t * undefined Data)\n\t *\n\t * @return the total number of CodeUnits in the listing.\n\t */\n\tpublic long getNumCodeUnits();\n\n\t/**\n\t * gets the total number of defined Data objects in the listing.\n\t *\n\t * @return the total number of defined Data objects in the listing.\n\t */\n\tpublic long getNumDefinedData();\n\n\t/**\n\t * gets the total number of Instructions in the listing.\n\t *\n\t * @return number of Instructions\n\t */\n\tpublic long getNumInstructions();\n\n\t/**\n\t * Get the data type manager for the program.\n\t * \n\t * @return the datatype manager for the program.\n\t */\n\tpublic DataTypeManager getDataTypeManager();\n\n\t/**\n\t * Create a function with an entry point and a body of addresses.\n\t * \n\t * @param name the name of the function to create\n\t * @param entryPoint the entry point for the function\n\t * @param body the address set that makes up the functions body\n\t * @param source the source of this function\n\t * @return the created function\n\t * @throws InvalidInputException if the name contains invalid characters\n\t * @throws OverlappingFunctionException if the given body overlaps with an\n\t * existing function.\n\t */\n\tpublic Function createFunction(String name, Address entryPoint, AddressSetView body,\n\t\t\tSourceType source) throws InvalidInputException, OverlappingFunctionException;\n\n\t/**\n\t * Create a function in the specified namespace with an entry point and a\n\t * body of addresses.\n\t * \n\t * @param name the name of the function to create\n\t * @param nameSpace the namespace in which to create the function\n\t * @param entryPoint the entry point for the function\n\t * @param body the address set that makes up the functions body\n\t * @param source the source of this function\n\t * @return the created function\n\t * @throws InvalidInputException if the name contains invalid characters\n\t * @throws OverlappingFunctionException if the given body overlaps with an\n\t * existing function.\n\t */\n\tpublic Function createFunction(String name, Namespace nameSpace, Address entryPoint,\n\t\t\tAddressSetView body, SourceType source)\n\t\t\tthrows InvalidInputException, OverlappingFunctionException;\n\n\t/**\n\t * Remove a function a given entry point.\n\t *\n\t * @param entryPoint entry point of function to be removed.\n\t */\n\tpublic void removeFunction(Address entryPoint);\n\n\t/**\n\t * Get a function with a given entry point.\n\t *\n\t * @param entryPoint entry point of the function\n\t * @return function at the entry point\n\t */\n\tpublic Function getFunctionAt(Address entryPoint);\n\n\t/**\n\t * Returns a list of all global functions with the given name.\n\t * \n\t * @param name the name of the functions to retrieve.\n\t * @return a list of all global functions with the given name.\n\t */\n\tpublic List<Function> getGlobalFunctions(String name);\n\n\t/**\n\t * Returns a list of all functions with the given name in the given\n\t * namespace.\n\t * \n\t * @param namespace the namespace to search for functions of the given name.\n\t * Can be null, in which case it will search the global\n\t * namespace.\n\t * @param name the name of the functions to retrieve.\n\t * @return a list of all global functions with the given name.\n\t */\n\tpublic List<Function> getFunctions(String namespace, String name);\n\n\t/**\n\t * Get a function containing an address.\n\t * \n\t * @param addr the address to search.\n\t * @return function containing this address, null otherwise\n\t */\n\tpublic Function getFunctionContaining(Address addr);\n\n\t/**\n\t * Get an iterator over all external functions\n\t * \n\t * @return an iterator over all currently defined external functions.\n\t */\n\tpublic FunctionIterator getExternalFunctions();\n\n\t/**\n\t * Get an iterator over all functions\n\t * \n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over all currently defined functions.\n\t */\n\tpublic FunctionIterator getFunctions(boolean forward);\n\n\t/**\n\t * Get an iterator over all functions starting at address\n\t * \n\t * @param start the address to start iterating at.\n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over functions\n\t */\n\tpublic FunctionIterator getFunctions(Address start, boolean forward);\n\n\t/**\n\t * Get an iterator over all functions with entry points in the address set.\n\t * \n\t * @param asv the set of addresses to iterator function entry points over.\n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over functions\n\t */\n\tpublic FunctionIterator getFunctions(AddressSetView asv, boolean forward);\n\n\t/**\n\t * Check if an address is contained in a function\n\t *\n\t * @param addr address to test\n\t * @return true if this address is in one or more functions\n\t */\n\tpublic boolean isInFunction(Address addr);\n\n\t/**\n\t * Get the comment history for comments at the given address.\n\t * \n\t * @param addr address for comments\n\t * @param commentType comment type defined in CodeUnit\n\t * @return array of comment history records\n\t */\n\tpublic CommentHistory[] getCommentHistory(Address addr, int commentType);\n\n}", "public String nextComment() throws IOException {\n // syntax: (* comment *) | /* comment */ \n StringBuffer c = new StringBuffer();\n int tt;\n if (debug)\n logger.debug(\"comment: \" + tok);\n tt = tok.nextToken();\n if (debug)\n logger.debug(\"comment: \" + tok);\n if (tt == '(') {\n tt = tok.nextToken();\n if (debug)\n logger.debug(\"comment: \" + tok);\n if (tt == '*') {\n if (debug)\n logger.debug(\"comment: \");\n while (true) {\n tt = tok.nextToken();\n if (tt == '*') {\n tt = tok.nextToken();\n if (tt == ')') {\n return c.toString();\n }\n tok.pushBack();\n }\n c.append(tok.sval);\n }\n }\n tok.pushBack();\n if (debug)\n logger.debug(\"comment: \" + tok);\n }\n tok.pushBack();\n if (debug)\n logger.debug(\"comment: \" + tok);\n return c.toString();\n }", "public Iterator<Type> iterator();", "void visitComment(MappedElementKind targetKind, String comment);", "public final void mCOMMENT() throws RecognitionException {\r\n try {\r\n int _type = COMMENT;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:253:9: ( '/*' ( options {greedy=false; } : . )* '*/' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:253:12: '/*' ( options {greedy=false; } : . )* '*/'\r\n {\r\n match(\"/*\"); \r\n\r\n\r\n\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:253:17: ( options {greedy=false; } : . )*\r\n loop1:\r\n do {\r\n int alt1=2;\r\n int LA1_0 = input.LA(1);\r\n\r\n if ( (LA1_0=='*') ) {\r\n int LA1_1 = input.LA(2);\r\n\r\n if ( (LA1_1=='/') ) {\r\n alt1=2;\r\n }\r\n else if ( ((LA1_1 >= '\\u0000' && LA1_1 <= '.')||(LA1_1 >= '0' && LA1_1 <= '\\uFFFF')) ) {\r\n alt1=1;\r\n }\r\n\r\n\r\n }\r\n else if ( ((LA1_0 >= '\\u0000' && LA1_0 <= ')')||(LA1_0 >= '+' && LA1_0 <= '\\uFFFF')) ) {\r\n alt1=1;\r\n }\r\n\r\n\r\n switch (alt1) {\r\n \tcase 1 :\r\n \t // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:253:45: .\r\n \t {\r\n \t matchAny(); \r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop1;\r\n }\r\n } while (true);\r\n\r\n\r\n match(\"*/\"); \r\n\r\n\r\n\r\n _channel = HIDDEN; \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "public List<FreeTextType> getCommentList() {\n return commentList;\n }", "public Rule compilationUnit()\n \t{\n \t\treturn sequence(\n \t\t\t\tOPT_SP,\n \t\t\t\tzeroOrMore(firstOf(using(), incUsing())),\n \t\t\t\tzeroOrMore(typeDef()),\n \t\t\t\tOPT_SP,\n \t\t\t\tzeroOrMore(doc()), // allow for extra docs at end of file (if last type commented out)\n \t\t\t\tOPT_SP,\n \t\t\t\teoi());\n \t}", "public String getComment(int commentType, Address address);", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllComments_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), COMMENTS);\r\n\t}", "public CommentHistory[] getCommentHistory(Address addr, int commentType);", "@Test\n\tpublic void embeddedComment() throws ParseException {\n\t\t// -->\n\t\tILineMatcher startMatcher = JavaSourceLineMatcher.startMatcher();\n\t\tILineMatcher endMatcher = JavaSourceLineMatcher.endMatcher();\n\t\tBlockToBlockListConverter converter = new BlockToBlockListConverter(startMatcher, endMatcher);\n\n\t\tList<String> lines = Lists.newArrayList();\n\n\t\tlines.add(\" // -->\");\n\t\tlines.add(\" // shift one left\");\n\t\tlines.add(\" \t// <--\");\n\t\tlines.add(\" \t// -->\");\n\t\tlines.add(\" \t// shift one left (embedded)\");\n\t\tlines.add(\" \t// this line too (embedded)\");\n\t\tlines.add(\" \t// <--\");\n\t\tlines.add(\" \t// -->\");\n\t\tlines.add(\" // this line too\");\n\t\tlines.add(\" // <--\");\n\n\t\tList<Block> blocks = converter.convert(new Block(lines));\n\n\t\tassertEquals(1, blocks.size());\n\t\tBlock block = blocks.get(0);\n\t\tassertNotNull(block);\n\t\tassertEquals(\"// shift one left\", block.lines().get(0));\n\t\tassertEquals(\"\t// shift one left (embedded)\", block.lines().get(1));\n\t\tassertEquals(\"\t// this line too (embedded)\", block.lines().get(2));\n\t\tassertEquals(\"// this line too\", block.lines().get(3));\n\t\t// <--\n\t}", "private void scanComment(LocatedChar ch) {\n\t\tch = input.next();\n\t\twhile(!ch.matchChar('%') && !ch.matchChar('\\n')) {\n\t\t\tch = input.next();\n\t\t}\n\t}", "void visit(Comment node);", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "@Test\n\tpublic void simpleComment() throws ParseException {\n\t\t// -->\n\t\tILineMatcher startMatcher = JavaSourceLineMatcher.startMatcher();\n\t\tILineMatcher endMatcher = JavaSourceLineMatcher.endMatcher();\n\t\tBlockToBlockListConverter converter = new BlockToBlockListConverter(startMatcher, endMatcher);\n\n\t\tList<String> lines = Lists.newArrayList();\n\n\t\tlines.add(\" // -->\");\n\t\tlines.add(\" // shift one left\");\n\t\tlines.add(\" // this line too\");\n\t\tlines.add(\" // <--\");\n\n\t\tList<Block> blocks = converter.convert(new Block(lines));\n\n\t\tassertEquals(1, blocks.size());\n\t\tBlock block = blocks.get(0);\n\t\tassertNotNull(block);\n\t\tassertEquals(\"// shift one left\", block.lines().get(0));\n\t\tassertEquals(\"// this line too\", block.lines().get(1));\n\t\t// <--\n\t}", "private void commentStates() throws SAXException, IOException {\n CommentState state = CommentState.COMMENT_START_STATE;\n for (;;) {\n char c = read();\n switch (state) {\n case COMMENT_START_STATE:\n /*\n * Comment start state\n * \n * \n * Consume the next input character:\n */\n switch (c) {\n case '-':\n /*\n * U+002D HYPHEN-MINUS (-) Switch to the comment\n * start dash state.\n */\n state = CommentState.COMMENT_START_DASH_STATE;\n continue;\n case '>':\n /*\n * U+003E GREATER-THAN SIGN (>) Parse error.\n */\n err(\"Premature end of comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Switch to the data state.\n */\n return;\n case '\\u0000':\n /*\n * EOF Parse error.\n */\n err(\"End of file inside comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append the input character to the\n * comment token's data.\n */\n appendToComment(c);\n /*\n * Switch to the comment state.\n */\n state = CommentState.COMMENT_STATE;\n continue;\n }\n case COMMENT_START_DASH_STATE:\n /*\n * Comment start dash state\n * \n * Consume the next input character:\n */\n switch (c) {\n case '-':\n /*\n * U+002D HYPHEN-MINUS (-) Switch to the comment end\n * state\n */\n state = CommentState.COMMENT_END_STATE;\n continue;\n case '>':\n /*\n * U+003E GREATER-THAN SIGN (>) Parse error.\n */\n err(\"Premature end of comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Switch to the data state.\n */\n return;\n case '\\u0000':\n /*\n * EOF Parse error.\n */\n err(\"End of file inside comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append a U+002D HYPHEN-MINUS (-)\n * character and the input character to the comment\n * token's data.\n */\n appendToComment('-');\n appendToComment(c);\n /*\n * Switch to the comment state.\n */\n state = CommentState.COMMENT_STATE;\n continue;\n }\n case COMMENT_STATE:\n /*\n * Comment state Consume the next input character:\n */\n switch (c) {\n case '-':\n /*\n * U+002D HYPHEN-MINUS (-) Switch to the comment end\n * dash state\n */\n state = CommentState.COMMENT_END_DASH_STATE;\n continue;\n case '\\u0000':\n /*\n * EOF Parse error.\n */\n err(\"End of file inside comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append the input character to the\n * comment token's data.\n */\n appendToComment(c);\n /*\n * Stay in the comment state.\n */\n continue;\n }\n case COMMENT_END_DASH_STATE:\n /*\n * Comment end dash state Consume the next input character:\n */\n switch (c) {\n case '-':\n /*\n * U+002D HYPHEN-MINUS (-) Switch to the comment end\n * state\n */\n state = CommentState.COMMENT_END_STATE;\n continue;\n case '\\u0000':\n /*\n * EOF Parse error.\n */\n err(\"End of file inside comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append a U+002D HYPHEN-MINUS (-)\n * character and the input character to the comment\n * token's data.\n */\n appendToComment('-');\n appendToComment(c);\n /*\n * Switch to the comment state.\n */\n state = CommentState.COMMENT_STATE;\n continue;\n }\n case COMMENT_END_STATE:\n /*\n * Comment end dash state Consume the next input character:\n */\n switch (c) {\n case '>':\n /*\n * U+003E GREATER-THAN SIGN (>) Emit the comment\n * token.\n */\n emitComment();\n /*\n * Switch to the data state.\n */\n return;\n case '-':\n /* U+002D HYPHEN-MINUS (-) Parse error. */\n err(\"Consecutive hyphens did not terminate a comment.\");\n /*\n * Append a U+002D HYPHEN-MINUS (-) character to the\n * comment token's data.\n */\n appendToComment('-');\n /*\n * Stay in the comment end state.\n */\n continue;\n case '\\u0000':\n /*\n * EOF Parse error.\n */\n err(\"End of file inside comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Parse error.\n */\n err(\"Consecutive hyphens did not terminate a comment.\");\n /*\n * Append two U+002D HYPHEN-MINUS (-) characters and\n * the input character to the comment token's data.\n */\n appendToComment('-');\n appendToComment('-');\n appendToComment(c);\n /*\n * Switch to the comment state.\n */\n state = CommentState.COMMENT_STATE;\n continue;\n }\n }\n }\n }", "ImmutableList<SchemaOrgType> getCommentList();", "protected IElementType delegateLexing() {\n yypushback(yylength());\n syncPerlLexer();\n try {\n IElementType result = myPerlLexer.advance();\n CommentEndCalculator commentEndCalculator = getCommentEndCalculator();\n if (commentEndCalculator != null && (result == COMMENT_LINE || result == COMMENT_ANNOTATION)) {\n int endIndex = commentEndCalculator.getCommentEndOffset(myPerlLexer.yytext());\n if (endIndex > -1) {\n myPerlLexer.setTokenEnd(myPerlLexer.getTokenStart() + endIndex);\n }\n }\n syncMainLexer();\n return result;\n }\n catch (Exception ignore) {\n }\n throw new RuntimeException(\"Something bad happened\");\n }", "public static ListIterator iterator() {\r\n\t\treturn getIterator(Direction.class);\r\n\t}", "@Override\n public Iterator<Type> getTypeIterator() {\n // trick to convert List<TypeImpl> to List<Type> with some safety\n Iterator<Type> it = Collections.<Type> unmodifiableList(types).iterator();\n it.next();\n return it;\n }", "public static ParseAction<Located<Void>> matchTLALineComment(){\n\t\treturn sequence(\n\t\t\t\tdrop(matchString(\"\\\\*\")),\n\t\t\t\tdrop(matchPattern(TLA_NOT_A_COMMENT_MARKER_LINE))\n\t\t).map(seq -> new Located<>(seq.getLocation(), null));\n\t}", "@Override\n public void addJavaFileComment(CompilationUnit compilationUnit) {\n\n }", "public final void mCOMMENT() throws RecognitionException {\n try {\n int _type = COMMENT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // Office.g:965:8: ( ( '//' (~ ( '\\\\n' | '\\\\r' | '\\\\uffff' ) )* ) )\n // Office.g:966:2: ( '//' (~ ( '\\\\n' | '\\\\r' | '\\\\uffff' ) )* )\n {\n // Office.g:966:2: ( '//' (~ ( '\\\\n' | '\\\\r' | '\\\\uffff' ) )* )\n // Office.g:966:3: '//' (~ ( '\\\\n' | '\\\\r' | '\\\\uffff' ) )*\n {\n match(\"//\"); \n\n\n\n // Office.g:966:7: (~ ( '\\\\n' | '\\\\r' | '\\\\uffff' ) )*\n loop1:\n do {\n int alt1=2;\n int LA1_0 = input.LA(1);\n\n if ( ((LA1_0 >= '\\u0000' && LA1_0 <= '\\t')||(LA1_0 >= '\\u000B' && LA1_0 <= '\\f')||(LA1_0 >= '\\u000E' && LA1_0 <= '\\uFFFE')) ) {\n alt1=1;\n }\n\n\n switch (alt1) {\n \tcase 1 :\n \t // Office.g:\n \t {\n \t if ( (input.LA(1) >= '\\u0000' && input.LA(1) <= '\\t')||(input.LA(1) >= '\\u000B' && input.LA(1) <= '\\f')||(input.LA(1) >= '\\u000E' && input.LA(1) <= '\\uFFFE') ) {\n \t input.consume();\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop1;\n }\n } while (true);\n\n\n }\n\n\n _channel = 99; \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n \t// do for sure before leaving\n }\n }", "public Iterator getTypes() {\r\n\t\treturn types == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(types.values());\r\n\t}", "public final void mCOMMENT() throws RecognitionException {\r\n\t\ttry {\r\n\t\t\tint _type = COMMENT;\r\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\r\n\t\t\t// C:\\\\Users\\\\don\\\\workspace\\\\sea-of-ql-repo-3\\\\ckonig\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:154:6: ( '/*' ( . )* '*/' | '//' (~ '\\\\n' )* )\r\n\t\t\tint alt3=2;\r\n\t\t\tint LA3_0 = input.LA(1);\r\n\t\t\tif ( (LA3_0=='/') ) {\r\n\t\t\t\tint LA3_1 = input.LA(2);\r\n\t\t\t\tif ( (LA3_1=='*') ) {\r\n\t\t\t\t\talt3=1;\r\n\t\t\t\t}\r\n\t\t\t\telse if ( (LA3_1=='/') ) {\r\n\t\t\t\t\talt3=2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\t\t\t\t\tint nvaeMark = input.mark();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tinput.consume();\r\n\t\t\t\t\t\tNoViableAltException nvae =\r\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 3, 1, input);\r\n\t\t\t\t\t\tthrow nvae;\r\n\t\t\t\t\t} finally {\r\n\t\t\t\t\t\tinput.rewind(nvaeMark);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tNoViableAltException nvae =\r\n\t\t\t\t\tnew NoViableAltException(\"\", 3, 0, input);\r\n\t\t\t\tthrow nvae;\r\n\t\t\t}\r\n\r\n\t\t\tswitch (alt3) {\r\n\t\t\t\tcase 1 :\r\n\t\t\t\t\t// C:\\\\Users\\\\don\\\\workspace\\\\sea-of-ql-repo-3\\\\ckonig\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:154:10: '/*' ( . )* '*/'\r\n\t\t\t\t\t{\r\n\t\t\t\t\tmatch(\"/*\"); \r\n\r\n\t\t\t\t\t// C:\\\\Users\\\\don\\\\workspace\\\\sea-of-ql-repo-3\\\\ckonig\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:154:15: ( . )*\r\n\t\t\t\t\tloop1:\r\n\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\tint alt1=2;\r\n\t\t\t\t\t\tint LA1_0 = input.LA(1);\r\n\t\t\t\t\t\tif ( (LA1_0=='*') ) {\r\n\t\t\t\t\t\t\tint LA1_1 = input.LA(2);\r\n\t\t\t\t\t\t\tif ( (LA1_1=='/') ) {\r\n\t\t\t\t\t\t\t\talt1=2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if ( ((LA1_1 >= '\\u0000' && LA1_1 <= '.')||(LA1_1 >= '0' && LA1_1 <= '\\uFFFF')) ) {\r\n\t\t\t\t\t\t\t\talt1=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\telse if ( ((LA1_0 >= '\\u0000' && LA1_0 <= ')')||(LA1_0 >= '+' && LA1_0 <= '\\uFFFF')) ) {\r\n\t\t\t\t\t\t\talt1=1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tswitch (alt1) {\r\n\t\t\t\t\t\tcase 1 :\r\n\t\t\t\t\t\t\t// C:\\\\Users\\\\don\\\\workspace\\\\sea-of-ql-repo-3\\\\ckonig\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:154:15: .\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmatchAny(); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault :\r\n\t\t\t\t\t\t\tbreak loop1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tmatch(\"*/\"); \r\n\r\n\t\t\t\t\t_channel=HIDDEN;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2 :\r\n\t\t\t\t\t// C:\\\\Users\\\\don\\\\workspace\\\\sea-of-ql-repo-3\\\\ckonig\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:155:10: '//' (~ '\\\\n' )*\r\n\t\t\t\t\t{\r\n\t\t\t\t\tmatch(\"//\"); \r\n\r\n\t\t\t\t\t// C:\\\\Users\\\\don\\\\workspace\\\\sea-of-ql-repo-3\\\\ckonig\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:155:15: (~ '\\\\n' )*\r\n\t\t\t\t\tloop2:\r\n\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\tint alt2=2;\r\n\t\t\t\t\t\tint LA2_0 = input.LA(1);\r\n\t\t\t\t\t\tif ( ((LA2_0 >= '\\u0000' && LA2_0 <= '\\t')||(LA2_0 >= '\\u000B' && LA2_0 <= '\\uFFFF')) ) {\r\n\t\t\t\t\t\t\talt2=1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tswitch (alt2) {\r\n\t\t\t\t\t\tcase 1 :\r\n\t\t\t\t\t\t\t// C:\\\\Users\\\\don\\\\workspace\\\\sea-of-ql-repo-3\\\\ckonig\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif ( (input.LA(1) >= '\\u0000' && input.LA(1) <= '\\t')||(input.LA(1) >= '\\u000B' && input.LA(1) <= '\\uFFFF') ) {\r\n\t\t\t\t\t\t\t\tinput.consume();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\r\n\t\t\t\t\t\t\t\trecover(mse);\r\n\t\t\t\t\t\t\t\tthrow mse;\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\tbreak;\r\n\r\n\t\t\t\t\t\tdefault :\r\n\t\t\t\t\t\t\tbreak loop2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t_channel=HIDDEN;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\t\t\tstate.type = _type;\r\n\t\t\tstate.channel = _channel;\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\t// do for sure before leaving\r\n\t\t}\r\n\t}", "public interface CommentsProcessor {\n\t\n\t/**\n\t * Processes passed token. By contract it is guaranteed that passed token will be always \n\t * javascript comment (i.e. {@link Token#isComment()} always returns <code>true</code>.\n\t * @param comment to process\n\t * @return result of comments processing or <code>null</code> if there is no result.\n\t */\n\tString process(Token comment);\n}", "@Test\n public void commentMatch() {\n comment.match(\"//hier steht text\\n\");\n assertEquals(comment.getClass(), comment.getToken().getClass());\n }", "Iterator<CtElement> descendantIterator();", "@Test\n public void testCommentLine() {\n setupReaderAndErrorHandler(\"# This is a comment line\");\n scanner.nextToken();\n\n assertTrue(\"EOFSY expected\", scanner.getCurrentToken().getSymbol() == Symbol.EOFSY);\n }", "public ASTNodeIterator iterator()\n {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = expression;\n return I;\n }", "void visitElement_comment(org.w3c.dom.Element element) { // <comment>\n // element.getValue();\n org.w3c.dom.NodeList nodes = element.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++) {\n org.w3c.dom.Node node = nodes.item(i);\n switch (node.getNodeType()) {\n case org.w3c.dom.Node.CDATA_SECTION_NODE:\n // ((org.w3c.dom.CDATASection)node).getData();\n break;\n case org.w3c.dom.Node.ELEMENT_NODE:\n org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;\n break;\n case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:\n // ((org.w3c.dom.ProcessingInstruction)node).getTarget();\n // ((org.w3c.dom.ProcessingInstruction)node).getData();\n break;\n case org.w3c.dom.Node.TEXT_NODE:\n issue.comments.add(((org.w3c.dom.Text)node).getData());\n break;\n }\n }\n }", "static boolean isComment(Token t) {\n return t.getText().startsWith(\"#\");\n }", "LexicalUnit getNextLexicalUnit();", "public abstract char getCommentChar();", "public Iterator getIterator() {\n\t\t\n\t\treturn blocks.iterator();\n\t\t\n\t}", "public void skipComments() {\r\n this.ignoreLinesStartWith(this.charComment);\r\n }", "@PropertyGetter(role = COMMENT)\n\tList<CtComment> getComments();", "protected boolean isComment () {\r\n int startvalue = index - 1;\r\n if (index + 3 >= length)\r\n return false;\r\n return (pagepart[index] == '!' &&\r\n pagepart[index + 1] == '-' &&\r\n pagepart[index + 2] == '-');\r\n }", "public ASTNodeIterator iterator() {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = name;\n return I;\n }", "public final void mCOMMENTS() throws RecognitionException {\r\n try {\r\n int _type = COMMENTS;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // Satmc.g:7:10: ( 'COMMENTS' )\r\n // Satmc.g:7:12: 'COMMENTS'\r\n {\r\n match(\"COMMENTS\"); \r\n\r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "public static Iterator<XRI3Segment> getContextNodeTypes(ContextNode contextNode) {\r\n\r\n\t\treturn new MappingContextNodeXriIterator(new MappingRelationTargetContextNodeIterator(contextNode.getRelations(XDIDictionaryConstants.XRI_S_IS_TYPE)));\r\n\t}", "public interface\n BBlockNodeIterator\n{\n\n /** next\n * Get the next node in this basic block.\n * By repetitively invoking \"next\", all nodes in the basic block\n * are traversed.\n **/\n public IR\n next();\n\n /** hasNext\n * @return true if there is next node remaining in the basic block.\n **/\n public boolean\n hasNext();\n\n//##62 public IR // Get the node that is an instance of Stmt\n//##62 nextStmt(); //##60\n\n//##62 public boolean\n//##62 hasNextStmt();\n\n /** getNextExecutableNode\n * Get the node that refer/set data or change control flow directly.\n * The iterator skips such non-executable nodes as\n * labelNode, blockNode, listNode, stmtNode,\n * ifNode, forNode, whileNode, untilNode, switchNode,\n * progNode, subpDefNode, labelDefNode, infNode, subpNode,\n * typeNode, labeledStmtNode with non-null Stmt body, nullNode\n * and get executable statement body or expression\n * under the skipped node.\n * If a labeled statement has null statement body,\n * it is not skipped.\n **/\n public HIR\n getNextExecutableNode();\n\n}", "private void collectComments(JSParseRootNode result)\n {\n\n List<Symbol> sDocComments = fScanner.getSDocComments();\n List<Symbol> vsDocComments = fScanner.getVSDocComments();\n List<Symbol> singleLineComments = fScanner.getSingleLineComments();\n List<Symbol> multiLineComments = fScanner.getMultiLineComments();\n\n List<JSCommentNode> comments = new ArrayList<JSCommentNode>(sDocComments.size() + vsDocComments.size()\n + singleLineComments.size() + multiLineComments.size());\n\n for (Symbol symbol : sDocComments)\n {\n comments.add(new JSCommentNode(IJSNodeTypes.SDOC_COMMENT, symbol.getStart(), symbol.getEnd()));\n }\n\n for (Symbol symbol : vsDocComments)\n {\n comments.add(new JSCommentNode(IJSNodeTypes.VSDOC_COMMENT, symbol.getStart(), symbol.getEnd()));\n }\n\n for (Symbol symbol : singleLineComments)\n {\n comments.add(new JSCommentNode(IJSNodeTypes.SINGLE_LINE_COMMENT, symbol.getStart(), symbol.getEnd()));\n }\n\n for (Symbol symbol : multiLineComments)\n {\n comments.add(new JSCommentNode(IJSNodeTypes.MULTI_LINE_COMMENT, symbol.getStart(), symbol.getEnd()));\n }\n\n result.setCommentNodes(comments.toArray(new IParseNode[comments.size()]));\n }", "public CommentSource getCommentSource() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"8a9b1fe1-6895-465a-bd8d-8b98409b313e\");\n return commentSource;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 743,\n FQN=\"llvm::Module::debug_compile_units\", NM=\"_ZNK4llvm6Module19debug_compile_unitsEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module19debug_compile_unitsEv\")\n //</editor-fold>\n public iterator_range<DICompileUnit /*P*/ > debug_compile_units() /*const*/ {\n NamedMDNode /*P*/ CUs = getNamedMetadata(new Twine(/*KEEP_STR*/\"llvm.dbg.cu\"));\n return make_range(new debug_compile_units_iterator(CUs, 0), \n new debug_compile_units_iterator(CUs, (CUs != null) ? CUs.getNumOperands() : 0));\n }", "public List<ReturnComment> getComments() {\n return (List<ReturnComment>) get(\"comments\");\n }", "public boolean next() {\n\t\tif (done())\n\t\t\treturn false;\n\t\tmany(whitespace);\n\t\tString c=program.charAt(pos)+\"\";\n\t\tif (digits.contains(c))\n\t\t\tnextNumber();\n\t\telse if (letters.contains(c))\n\t\t\tnextKwId();\n\t\telse if (operators.contains(c))\n\t\t\tnextOp();\n\t\telse if (c.equals(\"#\")){\n\t\t\t//this is a comment, move past the first hashtag\n\t\t\tpast('#');\n\t\t\t//move past the second hastag, ignoring everything in between\n\t\t\tpast('#');\n\t\t\treturn next();\n\t\t} else {\n\t\t\tSystem.err.println(\"illegal character at position \"+pos);\n\t\t\tpos++;\n\t\t\treturn next();\n\t\t}\n\t\treturn true;\n }", "int getCommentEndOffset(CharSequence commentText);", "public final void mCOMMENT() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = COMMENT;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:320:9: ( ( '//' ( . )* NEWLINE | '/*' ( . )* '*/' ) )\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:320:11: ( '//' ( . )* NEWLINE | '/*' ( . )* '*/' )\n\t\t\t{\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:320:11: ( '//' ( . )* NEWLINE | '/*' ( . )* '*/' )\n\t\t\tint alt9=2;\n\t\t\tint LA9_0 = input.LA(1);\n\t\t\tif ( (LA9_0=='/') ) {\n\t\t\t\tint LA9_1 = input.LA(2);\n\t\t\t\tif ( (LA9_1=='/') ) {\n\t\t\t\t\talt9=1;\n\t\t\t\t}\n\t\t\t\telse if ( (LA9_1=='*') ) {\n\t\t\t\t\talt9=2;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 9, 1, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 9, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt9) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:320:13: '//' ( . )* NEWLINE\n\t\t\t\t\t{\n\t\t\t\t\tmatch(\"//\"); \n\n\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:320:18: ( . )*\n\t\t\t\t\tloop7:\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tint alt7=2;\n\t\t\t\t\t\tint LA7_0 = input.LA(1);\n\t\t\t\t\t\tif ( (LA7_0=='\\r') ) {\n\t\t\t\t\t\t\talt7=2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( (LA7_0=='\\n') ) {\n\t\t\t\t\t\t\talt7=2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( ((LA7_0 >= '\\u0000' && LA7_0 <= '\\t')||(LA7_0 >= '\\u000B' && LA7_0 <= '\\f')||(LA7_0 >= '\\u000E' && LA7_0 <= '\\uFFFF')) ) {\n\t\t\t\t\t\t\talt7=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tswitch (alt7) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:320:18: .\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmatchAny(); \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\tbreak loop7;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tmNEWLINE(); \n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:320:31: '/*' ( . )* '*/'\n\t\t\t\t\t{\n\t\t\t\t\tmatch(\"/*\"); \n\n\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:320:36: ( . )*\n\t\t\t\t\tloop8:\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tint alt8=2;\n\t\t\t\t\t\tint LA8_0 = input.LA(1);\n\t\t\t\t\t\tif ( (LA8_0=='*') ) {\n\t\t\t\t\t\t\tint LA8_1 = input.LA(2);\n\t\t\t\t\t\t\tif ( (LA8_1=='/') ) {\n\t\t\t\t\t\t\t\talt8=2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( ((LA8_1 >= '\\u0000' && LA8_1 <= '.')||(LA8_1 >= '0' && LA8_1 <= '\\uFFFF')) ) {\n\t\t\t\t\t\t\t\talt8=1;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( ((LA8_0 >= '\\u0000' && LA8_0 <= ')')||(LA8_0 >= '+' && LA8_0 <= '\\uFFFF')) ) {\n\t\t\t\t\t\t\talt8=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tswitch (alt8) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:320:36: .\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmatchAny(); \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\tbreak loop8;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tmatch(\"*/\"); \n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t _channel=HIDDEN; \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "boolean processCommentsContainingIdentifier( String identifier, SearchScope searchScope, Processor<PsiElement> processor);", "public final Iterator<CodeFragmentList> getDefinitionIterator()\n {\n IteratorList iterList = new IteratorList();\n\n Model.addDefinitionIterators(iterList, getTopLevelInitializerIterator());\n\n Iterator iter = statefulEventInitializers.iterator();\n while (iter.hasNext())\n {\n iterList.add(((Initializer)iter.next()).getDefinitionsIterator());\n }\n \n iterList.add(root.getSubDefinitionsIterator());\n \n if (getVersion() >= 4)\n \titerList.add(statesModel.getSubDefinitionIterators());\n\n return iterList.toIterator();\n }", "@Nullable\n private static PbFile searchForSourceCommentInInitialBlock(\n String commentPrefix, PsiFile file, PsiElement[] children) {\n List<String> generatedByProtocComments =\n ImmutableList.of(\n String.format(\n \"%s Generated by the protocol buffer compiler. DO NOT EDIT!\", commentPrefix),\n String.format(\"%s Code generated by protoc-gen-go. DO NOT EDIT.\", commentPrefix));\n Pattern sourceCommentPattern =\n Pattern.compile(String.format(\"^%s source: (.*\\\\.proto)$\", commentPrefix));\n while (isWhitespaceOrComment(children[2])) {\n if (!(children[0] instanceof PsiComment)\n || !(children[1] instanceof PsiWhiteSpace)\n || !(children[2] instanceof PsiComment)) {\n shiftInNextChild(children);\n continue;\n }\n String generatedComment = children[0].getText();\n String sourceComment = children[2].getText();\n if (generatedByProtocComments.contains(generatedComment)) {\n Matcher matcher = sourceCommentPattern.matcher(sourceComment);\n if (matcher.find()) {\n String path = matcher.group(1);\n List<PbFile> pbFiles = PbFileResolver.findFilesForContext(path, file);\n if (!pbFiles.isEmpty()) {\n return pbFiles.get(0);\n } else {\n return null;\n }\n }\n }\n shiftInNextChild(children);\n }\n return null;\n }", "private boolean isComment(int nextVal) {\n\t\treturn nextVal == COMMENT;\n\t}", "private ArrayList<Integer> getListOnComment(String comment) {\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < copyOfChunks.size(); i++) {\n\t\t\tif (copyOfChunks.get(i).getComment().equals(comment)) {\n\t\t\t\tlist.add(i);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public abstract Iterator<C17883a<E>> mo45843b();", "@Override\n\t/**\n\t * returns false because comments are disabled for classes\n\t * \n\t * @return false \n\t */\n\tpublic boolean isComment() {\n\t\treturn false;\n\t}", "public Iterator<Clause> iterator(PredicateLiteralDescriptor predicate, boolean isPositive);", "static boolean comment(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"comment\")) return false;\n if (!nextTokenIs(b, \"\", DOUBLE_COMMENT, TRIPLE_COMMENT)) return false;\n boolean r;\n r = consumeToken(b, TRIPLE_COMMENT);\n if (!r) r = consumeToken(b, DOUBLE_COMMENT);\n return r;\n }", "public void addFirstComment(String comment) {\n if (methodMode) {\n methodCode.addFirst(new Line(comment));\n } else {\n program.addFirst(new Line(comment));\n }\n }", "@Override\n\tpublic Iterator<Statement> iterator() {\n\t\treturn iterator(null, null, null);\n\t}", "public final void mCOMMENT() throws RecognitionException {\n try {\n int _type = COMMENT;\n // /Users/benjamincoe/HackWars/C.g:158:9: ( '//' (~ ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' ) )* )\n // /Users/benjamincoe/HackWars/C.g:158:11: '//' (~ ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' ) )*\n {\n match(\"//\"); \n\n // /Users/benjamincoe/HackWars/C.g:158:16: (~ ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' ) )*\n loop1:\n do {\n int alt1=2;\n int LA1_0 = input.LA(1);\n\n if ( ((LA1_0>='\\u0000' && LA1_0<='\\t')||(LA1_0>='\\u000B' && LA1_0<='\\f')||(LA1_0>='\\u000E' && LA1_0<='\\uFFFE')) ) {\n alt1=1;\n }\n\n\n switch (alt1) {\n \tcase 1 :\n \t // /Users/benjamincoe/HackWars/C.g:158:16: ~ ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' )\n \t {\n \t if ( (input.LA(1)>='\\u0000' && input.LA(1)<='\\t')||(input.LA(1)>='\\u000B' && input.LA(1)<='\\f')||(input.LA(1)>='\\u000E' && input.LA(1)<='\\uFFFE') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse =\n \t new MismatchedSetException(null,input);\n \t recover(mse); throw mse;\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop1;\n }\n } while (true);\n\n channel=HIDDEN;\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }", "public List<CommentInfo> getComments() {\n \treturn this.comments;\n }", "public List<Comment> showComment() {\n\t\treturn cdi.showComment();\n\t}", "public InstructionIterator getInstructions(Address addr, boolean forward);", "@Ignore\n\t@Test\n\tpublic void testComment() {\n\t\tFile outputXml = new File(\n\t\t\t\toutputDir,\n\t\t\t\t\"/org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/Alien.hbm.xml\");\n\t\tJUnitUtil.assertIsNonEmptyFile(outputXml);\n\t\tSAXReader xmlReader = new SAXReader();\n\t\txmlReader.setValidation(true);\n\t\tDocument document;\n\t\ttry {\n\t\t\tdocument = xmlReader.read(outputXml);\n\t\t\tXPath xpath = DocumentHelper.createXPath(\"//hibernate-mapping/joined-subclass/comment\");\n\t\t\tList<?> list = xpath.selectNodes(document);\n\t\t\tAssert.assertEquals(\"Expected to get one comment element\", 1, list.size());\n\t\t} catch (DocumentException e) {\n\t\t\tAssert.fail(\"Can't parse file \" + outputXml.getAbsolutePath());\n\t\t}\n }", "public InstructionIterator getInstructions(boolean forward);", "Comment getBase_Comment();", "public Token nextTokenOf(Type type){\n Token token;\n \n while((token = nextToken()) != null){\n if(token.type == type){\n break;\n }\n }\n return token;\n }", "public CodeUnit getCodeUnitBefore(Address addr);", "private void skipCommentLine() {\n while (position < length) {\n int c = data.charAt(position);\n if (c == '\\r' || c == '\\n') {\n return;\n }\n position++;\n }\n }", "public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllComments_asNode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_asNode(model, instanceResource, COMMENTS);\r\n\t}", "public void processClasses(CompilationUnit cu) {\n\t\t\n\t\tif(cu.getStorage().get().getFileName().equals(\"package-info.java\")) {\n\t\t\tthis.packageInfo = cu;\n\t\t}else {\n\t\t\tthis.cus.add(cu);\n\t\t}\n\t\tfor(TypeDeclaration<?> node : cu.findAll(TypeDeclaration.class)) {\n\t\t\tthis.classes.put(node.getNameAsString(), new ClassAST(node, this));\n\t\t}\n\t}", "private void interpretComments() throws IOException {\n trimLines( comments );\n \n /* Try to interpret the last remaining comment line as a set of\n * column headings. */\n if ( comments.size() > 0 ) {\n String hline = (String) comments.get( comments.size() - 1 );\n List headings = readHeadings( new PushbackInputStream( \n new ByteArrayInputStream( hline.getBytes() ) ) );\n \n /* If this line looks like a set of headings (there are the\n * right number of fields) modify the colinfos accordingly and\n * remove it from the set of comments. */\n if ( headings.size() == ncol ) {\n comments.remove( comments.size() - 1 );\n for ( int i = 0; i < ncol; i++ ) {\n colinfos[ i ].setName( (String) headings.get( i ) );\n }\n trimLines( comments );\n }\n }\n \n /* If there are any other comment lines, concatenate them and bung\n * them into a description parameter. */\n if ( comments.size() > 0 ) {\n StringBuffer dbuf = new StringBuffer();\n for ( Iterator it = comments.iterator(); it.hasNext(); ) {\n dbuf.append( (String) it.next() );\n if ( it.hasNext() ) {\n dbuf.append( '\\n' );\n }\n }\n ValueInfo descriptionInfo =\n new DefaultValueInfo( \"Description\", String.class,\n \"Comments included in text file\" );\n parameters.add( new DescribedValue( descriptionInfo, \n dbuf.toString() ) );\n }\n }", "@Override\n public void recordComment(Comment.Type type, SourceRange range, String value) {\n if (lastCommentEndPosition == null || range.end.offset > this.lastCommentEndPosition.offset) {\n value = value.trim();\n if (value.startsWith(SOURCE_MAPPING_URL_PREFIX)) {\n sourceMapURL = value.substring(SOURCE_MAPPING_URL_PREFIX.length());\n }\n comments.add(new Comment(value, range, type));\n this.lastCommentEndPosition = range.end;\n }\n }", "public List<Comment> getComments() {\n return this.comments;\n }", "public static ParseAction<Located<Void>> skipWhitespaceAndTLAComments(){\n\t\treturn repeat(parseOneOf(\n\t\t\t\tmatchWhitespace(),\n\t\t\t\tmatchTLAComment()\n\t\t)).map(list -> new Located<>(list.getLocation(), null));\n\t}", "public List<Comment> getComments() {\n fetchComments();\n return Collections.unmodifiableList(comments);\n }", "@Test\n public final void testGetXPathWithCommentProlog() {\n \n Document testDoc = TestDocHelper.createDocument(\n \"<!-- comment --><a>text</a>\");\n \n //Move to beforeclass method\n XPathFactory xPathFac = XPathFactory.newInstance();\n XPath xpathExpr = xPathFac.newXPath();\n \n testXPathForNode(testDoc, xpathExpr);\n \n }", "public Iterator<MaterialType> iterator() {\n\t\treload();\n\t\treturn new IteratorImpl(); \n\t}", "public final void mSINGLE_COMMENT() throws RecognitionException {\r\n try {\r\n int _type = SINGLE_COMMENT;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:256:2: ( '//' (~ ( '\\\\n' | '\\\\r' ) )* )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:256:4: '//' (~ ( '\\\\n' | '\\\\r' ) )*\r\n {\r\n match(\"//\"); \r\n\r\n\r\n\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:256:9: (~ ( '\\\\n' | '\\\\r' ) )*\r\n loop2:\r\n do {\r\n int alt2=2;\r\n int LA2_0 = input.LA(1);\r\n\r\n if ( ((LA2_0 >= '\\u0000' && LA2_0 <= '\\t')||(LA2_0 >= '\\u000B' && LA2_0 <= '\\f')||(LA2_0 >= '\\u000E' && LA2_0 <= '\\uFFFF')) ) {\r\n alt2=1;\r\n }\r\n\r\n\r\n switch (alt2) {\r\n \tcase 1 :\r\n \t // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:\r\n \t {\r\n \t if ( (input.LA(1) >= '\\u0000' && input.LA(1) <= '\\t')||(input.LA(1) >= '\\u000B' && input.LA(1) <= '\\f')||(input.LA(1) >= '\\u000E' && input.LA(1) <= '\\uFFFF') ) {\r\n \t input.consume();\r\n \t }\r\n \t else {\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t recover(mse);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop2;\r\n }\r\n } while (true);\r\n\r\n\r\n _channel = HIDDEN; \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "@PropertySetter(role = COMMENT)\n\t<E extends CtElement> E addComment(CtComment comment);", "public CSVInput withComments(String comments) {\n setComments(comments);\n return this;\n }" ]
[ "0.699732", "0.61150515", "0.5936307", "0.5903563", "0.5891776", "0.56692976", "0.55383503", "0.54784346", "0.53429294", "0.5321886", "0.52956885", "0.5134323", "0.5099443", "0.50917155", "0.50713897", "0.50677055", "0.50197595", "0.49429217", "0.49296695", "0.49211398", "0.49197337", "0.48826617", "0.48691982", "0.48395202", "0.48198906", "0.47990713", "0.47702864", "0.4745465", "0.47033268", "0.4688099", "0.46836177", "0.46702623", "0.4642478", "0.4632717", "0.4559752", "0.45029834", "0.44975027", "0.44874436", "0.44441262", "0.4442023", "0.44150284", "0.44076678", "0.44024885", "0.43695268", "0.43669063", "0.4312661", "0.4305492", "0.4298854", "0.4281613", "0.42648396", "0.42533368", "0.4247179", "0.42470804", "0.4245999", "0.4245655", "0.42425704", "0.42369726", "0.42359638", "0.42354685", "0.42339647", "0.42221296", "0.42219344", "0.42185974", "0.42167383", "0.42110735", "0.42061806", "0.4205191", "0.41902626", "0.41864213", "0.41818497", "0.4181571", "0.41668543", "0.41565773", "0.4149354", "0.414647", "0.41401708", "0.41399038", "0.41325006", "0.41309503", "0.4121883", "0.4112889", "0.41078728", "0.41063392", "0.40968305", "0.40953672", "0.40916887", "0.40908948", "0.40899453", "0.40890318", "0.40725136", "0.40720263", "0.4071173", "0.4070075", "0.40608582", "0.4059388", "0.4058326", "0.40507892", "0.40404138", "0.40348244", "0.40247276" ]
0.820608
0
Get a forward iterator over addresses that have the specified comment type.
public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "public CommentHistory[] getCommentHistory(Address addr, int commentType);", "public String getComment(int commentType, Address address);", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllComments_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), COMMENTS);\r\n\t}", "ImmutableList<SchemaOrgType> getCommentList();", "public InstructionIterator getInstructions(Address addr, boolean forward);", "public CommentTypeCodeType getCommentType() {\n\t return this.commentType;\n\t}", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "public void setCommentType(CommentTypeCodeType commentType) {\n\t this.commentType = commentType;\n\t}", "public Iterable<Relationship> getRelationships( RelationshipType... type );", "public Iterator<Type> iterator();", "public void setComment(Address address, int commentType, String comment);", "Iterator<CtElement> descendantIterator();", "public Iterator getBindings(QName portType) {\r\n\t\tif (portType == null || bindings == null) {\r\n\t\t\treturn EmptyStructures.EMPTY_ITERATOR;\r\n\t\t}\r\n\t\tList l = new ArrayList();\r\n\t\tfor (Iterator it = bindings.values().iterator(); it.hasNext();) {\r\n\t\t\tWSDLBinding binding = (WSDLBinding) it.next();\r\n\t\t\tif (portType.equals(binding.getTypeName())) {\r\n\t\t\t\tl.add(binding);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new ReadOnlyIterator(l);\r\n\t}", "public List<FreeTextType> getCommentList() {\n return commentList;\n }", "public Iterator<ODocument> getAllAsList(@Generic(\"T\") final Class<?> type) {\n return getAll(type);\n }", "@Override\n public <T> Iterator<Entry<T>> typedIterator(Class<T> clazz) {\n List<Entry<T>> entries = new ArrayList();\n for (Iterator<Entry> it = this.iterator(); it.hasNext(); ) {\n final Entry e = it.next();\n if (e.getKey().valueType.equals(clazz)) {\n entries.add(e);\n }\n }\n return entries.iterator();\n }", "public DataIterator getDefinedData(Address addr, boolean forward);", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "@Override\r\n\tpublic List<Address> searchAddress(Double latitude, Double longitude, String type) throws Exception {\r\n\t\tStringBuilder selectQuery = new StringBuilder();\r\n\t\tStringBuilder whereQuery = new StringBuilder();\r\n\t\tif (!StringUtils.isEmpty(latitude) && !StringUtils.isEmpty(longitude)) {\r\n\t\t\tselectQuery.append(\" from Address \");\r\n\t\t\twhereQuery.append(\"where \");\r\n\t\t\twhereQuery.append(\"ACOS( SIN( RADIANS(latitude) ) * SIN( RADIANS(\");\r\n\t\t\twhereQuery.append(latitude);\r\n\t\t\twhereQuery.append(\") ) + COS( RADIANS(latitude) ) * COS( RADIANS(\");\r\n\t\t\twhereQuery.append(latitude);\r\n\t\t\twhereQuery.append(\")) * COS( RADIANS(longitude) - RADIANS(\");\r\n\t\t\twhereQuery.append(longitude);\r\n\t\t\twhereQuery.append(\"))) * 6380 < 5\");\r\n\t\t\tif (!StringUtils.isEmpty(type)) {\r\n\t\t\t\twhereQuery.append(\" and type='\").append(type + \"'\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Exception(\"Latitude/Longitude can not be Null\");\r\n\t\t}\r\n\t\tselectQuery.append(whereQuery);\r\n\t\treturn executeQuery(selectQuery.toString());\r\n\t}", "void visitComment(MappedElementKind targetKind, String comment);", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "List<Comment> findAll();", "public ArrayList<LocationMarker> getBookmarks(long userId, int type){\n try {\n petBetterDb.openDatabase();\n }catch (SQLException e) {\n e.printStackTrace();\n }\n\n ArrayList<LocationMarker> result = petBetterDb.getBookmarks(userId, type);\n petBetterDb.closeDatabase();\n return result;\n }", "public Vector<NetworkAddress> getHostAddresses(int type) {return addressesChecker.getAllMyAddresses(type); }", "public List<ReturnComment> getComments() {\n return (List<ReturnComment>) get(\"comments\");\n }", "@Override\n public Iterator<Type> getTypeIterator() {\n // trick to convert List<TypeImpl> to List<Type> with some safety\n Iterator<Type> it = Collections.<Type> unmodifiableList(types).iterator();\n it.next();\n return it;\n }", "@Override\r\n\tpublic List<Comment> findAllComment() {\n\t\treturn commentDao.findAllComment();\r\n\t}", "void visit(Comment node);", "java.util.List<? extends kr.pik.message.Profile.ProfileMessage.ContactAddressOrBuilder> \n getContactAddressOrBuilderList();", "public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllComments_asNode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_asNode(model, instanceResource, COMMENTS);\r\n\t}", "List<?> getAddress();", "@Override\n public void recordComment(Comment.Type type, SourceRange range, String value) {\n if (lastCommentEndPosition == null || range.end.offset > this.lastCommentEndPosition.offset) {\n value = value.trim();\n if (value.startsWith(SOURCE_MAPPING_URL_PREFIX)) {\n sourceMapURL = value.substring(SOURCE_MAPPING_URL_PREFIX.length());\n }\n comments.add(new Comment(value, range, type));\n this.lastCommentEndPosition = range.end;\n }\n }", "Iterator<Class<? extends IToken>> getTmqlTokenIterator();", "@Override\n\tpublic Collection<Comment> getAllComments() {\n\t\treturn commentMap.values();\n\t}", "public static Iterator<XRI3Segment> getContextNodeTypes(ContextNode contextNode) {\r\n\r\n\t\treturn new MappingContextNodeXriIterator(new MappingRelationTargetContextNodeIterator(contextNode.getRelations(XDIDictionaryConstants.XRI_S_IS_TYPE)));\r\n\t}", "@Override\n public Iterator<Location> iterator() {\n return new NeighborhoodIterator(this, new Location(0, 0));\n }", "List<Building> findBuildingCoordinatesByType(String type);", "public interface IAddressList {\n\n\t/**\n\t * Returns the list of addresses.\n\t *\n\t * @return list of addresses\n\t */\n\tList<?> getAddress();\n\n}", "public List<Comment> getComments() {\n fetchComments();\n return Collections.unmodifiableList(comments);\n }", "public List<Bookmark> searchBookmarks (String searchString, BookmarkType type, Long userId) throws BookMarkException;", "public List<CommentInfo> getComments() {\n \treturn this.comments;\n }", "public DataIterator getData(Address addr, boolean forward);", "private ArrayList<Integer> getListOnComment(String comment) {\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < copyOfChunks.size(); i++) {\n\t\t\tif (copyOfChunks.get(i).getComment().equals(comment)) {\n\t\t\t\tlist.add(i);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "@PropertyGetter(role = COMMENT)\n\tList<CtComment> getComments();", "java.util.List<kr.pik.message.Profile.ProfileMessage.ContactAddress> \n getContactAddressList();", "public List<Place> getGates(GateType typeRequested) {\n\t\tList<Place> gatesRequested = new ArrayList<Place>();\n\t\tfor(Place p: placesByUri.values()){\n\t\t\tboolean pIsGate = p.getGate() != null;\n\t\t\tif(pIsGate){\n\t\t\t\tboolean typeIsEqual = true;\n\t\t\t\tif(typeRequested != null){\n\t\t\t\t\ttypeIsEqual = p.getGate().getType().\n\t\t\t\t\t\t\t\t\tequals(typeRequested);\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\tif(typeIsEqual){\n\t\t\t\t\tgatesRequested.add(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn gatesRequested;\n\t}", "ImmutableList<SchemaOrgType> getCommentCountList();", "public ResultMap<BaseNode> listRelatives(QName type, Direction direction);", "public Iterator<Integer> neighbors(int i)\n {\n return adjList[i].iterator();\n }", "public Iterator<?> xpathIterator(Collection<?> collection, String query) {\n JXPathContext pathContext = JXPathContext.newContext(collection);\n Iterator<?> result = null;\n try {\n result = pathContext.iteratePointers(query);\n } catch (JXPathNotFoundException e) {\n logger.log(Level.WARNING, \"JXPath exception: {0}\", e.getMessage());\n }\n return result;\n }", "public final Iterator<PropertyDeclaration> getDeclarationIterator()\n {\n final Type superType = getSuperClass();\n\n return new FilterIterator(declarations.values().iterator(), new Predicate()\n {\n public boolean evaluate(Object object)\n {\n return superType.getProperty(((PropertyDeclaration)object).getName()) == null;\n }\n });\n }", "@Override\n public void onCommentsReceived(String comment, String URL) {\n\n }", "protected Iterator<Cell> getCellIterator(ColumnFamily container)\n {\n return container.iterator();\n }", "Iterator<TrieEntry<T, U>> trieIterator();", "public List<Comment> getComments() {\n return this.comments;\n }", "public List<CommentDTO> getComments() {\n\t\treturn comments;\n\t}", "public Iterator<Clause> iterator(PredicateLiteralDescriptor predicate, boolean isPositive);", "public Iterator<Location> neighborIterator(Location centerLocation, int neighborThreshold) {\n return new NeighborIterator(this, centerLocation, neighborThreshold);\n }", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "public interface Schema {\n /**\n * Get the list of {@link AddressSpaceType} instances.\n */\n List<AddressSpaceType> getAddressSpaceTypes();\n}", "Collection<? extends String> getHasAddress();", "void visitElement_comment(org.w3c.dom.Element element) { // <comment>\n // element.getValue();\n org.w3c.dom.NodeList nodes = element.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++) {\n org.w3c.dom.Node node = nodes.item(i);\n switch (node.getNodeType()) {\n case org.w3c.dom.Node.CDATA_SECTION_NODE:\n // ((org.w3c.dom.CDATASection)node).getData();\n break;\n case org.w3c.dom.Node.ELEMENT_NODE:\n org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;\n break;\n case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:\n // ((org.w3c.dom.ProcessingInstruction)node).getTarget();\n // ((org.w3c.dom.ProcessingInstruction)node).getData();\n break;\n case org.w3c.dom.Node.TEXT_NODE:\n issue.comments.add(((org.w3c.dom.Text)node).getData());\n break;\n }\n }\n }", "Iterable<Comment> findByAuthorId(int authorId);", "public List<CommentsEntity> getAllComments(){\n\t\tfinal List<CommentsEntity> comments = entityManager.createQuery(\"SELECT comments FROM CommentsEntity comments\", CommentsEntity.class)\n\t\t\t\t.getResultList();\n\t\tSystem.out.println(\"[REPO] Found comments query success\");\n\t\treturn comments;\n\t}", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "@Override\n\tpublic List<Comment> searchComments(List<User> users) {\n List<MarkedUpText> texts = getDescendantTexts();\n \n List<Comment> comments = new LinkedList<Comment>();\n for(MarkedUpText t: texts) {\n comments.addAll(t.searchComments(users));\n }\n return comments;\n\t}", "public Iterator getPortTypes() {\r\n\t\treturn portTypes == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(portTypes.values());\r\n\t}", "public static List<DecisionKnowledgeElement> getElementsForIssueWithType(long issueId, String projectKey,\n\t\t\tString type) {\n\n\t\tList<DecisionKnowledgeElement> elements = new ArrayList<DecisionKnowledgeElement>();\n\t\tif (issueId <= 0 || projectKey == null || type == null) {\n\t\t\tLOGGER.error(\"Id, ProjectKey, Type are Invalid\");\n\t\t\treturn elements;\n\t\t}\n\t\tfor (DecisionKnowledgeInCommentEntity databaseEntry : ACTIVE_OBJECTS.find(\n\t\t\t\tDecisionKnowledgeInCommentEntity.class,\n\t\t\t\tQuery.select().where(\"PROJECT_KEY = ? AND ISSUE_ID = ? AND TYPE = ?\", projectKey, issueId, type))) {\n\t\t\telements.add(new SentenceImpl(databaseEntry));\n\t\t}\n\t\treturn elements;\n\t}", "public Iterator getTypes() {\r\n\t\treturn types == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(types.values());\r\n\t}", "public List<Address> findAll();", "String getAddress(int type);", "@Override\n\t\tpublic Iterable<Relationship> getRelationships(RelationshipType... types) {\n\t\t\treturn null;\n\t\t}", "public Iterator<Point> getPointIterator(ModelObject target);", "public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);", "public Class getAddressClass() {\n return addressClass;\n }", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "public boolean isInComments(Comment query) {\n for (Comment comment : this.comments) {\n if (comment.getUuid().equals(query.getUuid())) {\n return true;\n }\n }\n\n return false;\n }", "public LinkedListIterator<AnyType> find(AnyType x) {\n ListNode<AnyType> itr = header.next;\n\n while (itr != null && !itr.element.equals(x)) {\n itr = itr.next;\n }\n\n return new LinkedListIterator<AnyType>(itr);\n }", "public List<CommentAttributes> getCommentsForInstructor(InstructorAttributes instructor)\n throws EntityDoesNotExistException {\n verifyIsCoursePresent(instructor.courseId, \"get\");\n verifyIsInstructorOfCourse(instructor.courseId, instructor.email);\n HashSet<String> commentsVisitedSet = new HashSet<String>();\n \n List<CommentAttributes> comments = getCommentsForGiverAndStatus(instructor.courseId, instructor.email, CommentStatus.FINAL);\n for(CommentAttributes c: comments){\n preventAppendingThisCommentAgain(commentsVisitedSet, c);\n }\n \n List<CommentAttributes> commentsForOtherInstructor = getCommentsForCommentViewer(instructor.courseId, CommentRecipientType.INSTRUCTOR);\n removeNonVisibleCommentsForInstructor(commentsForOtherInstructor, commentsVisitedSet, comments);\n \n java.util.Collections.sort(comments);\n \n return comments;\n }", "public List<Comment> showComment() {\n\t\treturn cdi.showComment();\n\t}", "public static ListIterator iterator() {\r\n\t\treturn getIterator(Direction.class);\r\n\t}", "protected int scanComment () throws HTMLParseException {\r\n int startvalue = index - 1;\r\n int i = -1;\r\n int j = index;\r\n while (j+2 < length) {\r\n if (pagepart[j] == '-' &&\r\n pagepart[j + 1] == '-' &&\r\n pagepart[j + 2] == '>') {\r\n i = j;\r\n break;\r\n }\r\n j++;\r\n }\r\n if (i > -1) {\r\n index = i + 2;\r\n nextToken = MT;\r\n match (MT);\r\n stringLength = index - startvalue;\r\n return COMMENT;\r\n }\r\n block.setRest (startvalue);\r\n return END;\r\n }", "@Override\n\t\tpublic Iterable<Relationship> getRelationships(RelationshipType type, Direction dir) {\n\t\t\treturn null;\n\t\t}", "public com.google.protobuf.ByteString\n getCommentsBytes() {\n java.lang.Object ref = comments_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n comments_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Integer getAcCommentsFrom() {\n return acCommentsFrom;\n }", "public com.google.protobuf.ByteString\n getCommentsBytes() {\n java.lang.Object ref = comments_;\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 comments_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Set<? extends Position> getCellsAdjacent(int cellType) {\n\t\treturn getCellList(cellType).getAdjacent();\n\t}", "public java.util.Iterator<Entry> iterator(){\n\t\treturn new ContentIterator();\n\t}", "private void findRdf(String comment) {\n int rdfPosition = comment.indexOf(\"RDF\");\n if (rdfPosition < 0)\n return; // no RDF, abort\n int nsPosition = comment.indexOf(CC_NS);\n if (nsPosition < 0)\n return; // no RDF, abort\n\n // try to parse the XML\n Document doc;\n try {\n DocumentBuilder parser = FACTORY.newDocumentBuilder();\n doc = parser.parse(new InputSource(new StringReader(comment)));\n } catch (Exception e) {\n if (LOG.isWarnEnabled()) {\n LOG.warn(\"CC: Failed to parse RDF in \" + base + \": \" + e);\n }\n return;\n }\n\n // check that root is rdf:RDF\n NodeList roots = doc.getElementsByTagNameNS(RDF_NS, \"RDF\");\n if (roots.getLength() != 1) {\n if (LOG.isWarnEnabled()) {\n LOG.warn(\"CC: No RDF root in \" + base);\n }\n return;\n }\n Element rdf = (Element) roots.item(0);\n\n // get cc:License nodes inside rdf:RDF\n NodeList licenses = rdf.getElementsByTagNameNS(CC_NS, \"License\");\n for (int i = 0; i < licenses.getLength(); i++) {\n\n Element l = (Element) licenses.item(i);\n\n // license is rdf:about= attribute from cc:License\n this.rdfLicense = l.getAttributeNodeNS(RDF_NS, \"about\").getValue();\n\n // walk predicates of cc:License\n NodeList predicates = l.getChildNodes();\n for (int j = 0; j < predicates.getLength(); j++) {\n Node predicateNode = predicates.item(j);\n if (!(predicateNode instanceof Element))\n continue;\n Element predicateElement = (Element) predicateNode;\n\n // extract predicates of cc:xxx predicates\n if (!CC_NS.equals(predicateElement.getNamespaceURI())) {\n continue;\n }\n }\n }\n\n // get cc:Work nodes from rdf:RDF\n NodeList works = rdf.getElementsByTagNameNS(CC_NS, \"Work\");\n for (int i = 0; i < works.getLength(); i++) {\n // get dc:type nodes from cc:Work\n NodeList types = rdf.getElementsByTagNameNS(DC_NS, \"type\");\n\n for (int j = 0; j < types.getLength(); j++) {\n Element type = (Element) types.item(j);\n String workUri = type.getAttributeNodeNS(RDF_NS, \"resource\")\n .getValue();\n this.workType = WORK_TYPE_NAMES.get(workUri);\n }\n }\n }", "public Iterator<Customer> iterator(){\n\t\treturn list.iterator();\n\t}", "public Iterator<GPoint> iterator() {\n\t\treturn points.iterator();\n\t}", "protected List<CommentDocument> getCommentsByRef(HttpServletRequest servletRequest, String documentId, int limit) throws RepositoryException, QueryException {\r\n if (documentId == null) {\r\n return null;\r\n }\r\n \r\n //Get the references to the context and the query manager\r\n HstRequestContext requestContext = getRequestContext(servletRequest);\r\n HstQueryManager hstQueryManager = getHstQueryManager(requestContext.getSession(), requestContext);\r\n\r\n //Determine search base\r\n String mountContentPath = requestContext.getResolvedMount().getMount().getContentPath();\r\n Node mountContentNode = requestContext.getSession().getRootNode().getNode(PathUtils.normalizePath(mountContentPath));\r\n\r\n //Create and execute query\r\n @SuppressWarnings(\"unchecked\")\r\n\t\tHstQuery hstQuery = hstQueryManager.createQuery(mountContentNode, CommentDocument.class);\r\n Filter filter = hstQuery.createFilter();\r\n filter.addEqualTo(\"website:reference/@hippo:docbase\", documentId.toLowerCase());\r\n hstQuery.setFilter(filter);\r\n if (limit > 0) {\r\n hstQuery.setLimit(limit);\r\n }\r\n\r\n HstQueryResult result = hstQuery.execute();\r\n \r\n if (result.getSize() == 0) {\r\n return Collections.emptyList();\r\n }\r\n \r\n //Read results\r\n List<CommentDocument> comments = new ArrayList<CommentDocument>(result.getSize());\r\n HippoBeanIterator iterator = result.getHippoBeans();\r\n\r\n while (iterator.hasNext()) {\r\n //Get all incoming comment links\r\n CommentDocument comment = (CommentDocument) iterator.nextHippoBean();\r\n\r\n if (comment != null) {\r\n comments.add(comment);\r\n }\r\n }\r\n\r\n return comments;\r\n }", "public T iterator();", "private void scanComment(LocatedChar ch) {\n\t\tch = input.next();\n\t\twhile(!ch.matchChar('%') && !ch.matchChar('\\n')) {\n\t\t\tch = input.next();\n\t\t}\n\t}", "public CommentElements getCommentAccess() {\n\t\treturn (pComment != null) ? pComment : (pComment = new CommentElements());\n\t}", "public Set<Node> getChildByType(String type) {\n HashSet<Node> result = new HashSet<Node>();\n Iterable<Relationship> relations = gisNode.getRelationships(Direction.OUTGOING);\n for (Relationship relationship : relations) {\n Node node = relationship.getEndNode();\n if (type.equals(node.getProperty(INeoConstants.PROPERTY_TYPE_NAME, \"\"))) {\n result.add(node);\n }\n }\n return result;\n }" ]
[ "0.7349432", "0.70595115", "0.6320613", "0.56374776", "0.48344266", "0.47928762", "0.479205", "0.47639105", "0.47415644", "0.4732901", "0.4710619", "0.47098818", "0.47022358", "0.46490675", "0.46416742", "0.4638544", "0.46188402", "0.46165246", "0.46151778", "0.4471151", "0.44294992", "0.4389894", "0.43874612", "0.43818024", "0.43769225", "0.4362109", "0.4357807", "0.4357085", "0.4354544", "0.43338275", "0.43267676", "0.4310789", "0.42951626", "0.4278603", "0.42762208", "0.4249661", "0.42433372", "0.4217379", "0.42160133", "0.42104217", "0.42079777", "0.4182755", "0.41781518", "0.4158449", "0.4146523", "0.41229707", "0.4100555", "0.41002527", "0.40841234", "0.40801346", "0.4077901", "0.40777558", "0.40702492", "0.40638375", "0.40603188", "0.40566525", "0.4053717", "0.40526265", "0.40403917", "0.40379304", "0.40371972", "0.40306497", "0.40266117", "0.40143558", "0.4013428", "0.40086973", "0.40062273", "0.4001403", "0.39944363", "0.3993852", "0.39862114", "0.39691564", "0.39599043", "0.39531457", "0.39406598", "0.39386588", "0.39327478", "0.39326546", "0.3923866", "0.3922637", "0.39177823", "0.3916414", "0.39163724", "0.39112157", "0.3910338", "0.39050254", "0.38958502", "0.38921067", "0.38912228", "0.3890967", "0.3878843", "0.38777015", "0.38752618", "0.38725317", "0.38723308", "0.38711745", "0.3865334", "0.38629878", "0.385862", "0.38538986" ]
0.8320843
0
Get a forward iterator over addresses that have any type of comment.
public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllComments_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), COMMENTS);\r\n\t}", "public CommentHistory[] getCommentHistory(Address addr, int commentType);", "Iterator<CtElement> descendantIterator();", "@Override\n\tpublic Collection<Comment> getAllComments() {\n\t\treturn commentMap.values();\n\t}", "@Override\r\n\tpublic List<Comment> findAllComment() {\n\t\treturn commentDao.findAllComment();\r\n\t}", "public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllComments_asNode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_asNode(model, instanceResource, COMMENTS);\r\n\t}", "List<Comment> findAll();", "ImmutableList<SchemaOrgType> getCommentList();", "public List<ReturnComment> getComments() {\n return (List<ReturnComment>) get(\"comments\");\n }", "public InstructionIterator getInstructions(Address addr, boolean forward);", "@Override\n\tpublic List<Comment> searchComments(List<User> users) {\n List<MarkedUpText> texts = getDescendantTexts();\n \n List<Comment> comments = new LinkedList<Comment>();\n for(MarkedUpText t: texts) {\n comments.addAll(t.searchComments(users));\n }\n return comments;\n\t}", "void visit(Comment node);", "public List<FreeTextType> getCommentList() {\n return commentList;\n }", "public String getComment(int commentType, Address address);", "void visitComment(MappedElementKind targetKind, String comment);", "public List<CommentInfo> getComments() {\n \treturn this.comments;\n }", "public List<Comment> getComments() {\n fetchComments();\n return Collections.unmodifiableList(comments);\n }", "public void clearComments(Address startAddr, Address endAddr);", "boolean hasComments();", "public boolean isInComments(Comment query) {\n for (Comment comment : this.comments) {\n if (comment.getUuid().equals(query.getUuid())) {\n return true;\n }\n }\n\n return false;\n }", "public List<Comment> getComments() {\n return this.comments;\n }", "public DataIterator getDefinedData(Address addr, boolean forward);", "@PropertyGetter(role = COMMENT)\n\tList<CtComment> getComments();", "public List<CommentsEntity> getAllComments(){\n\t\tfinal List<CommentsEntity> comments = entityManager.createQuery(\"SELECT comments FROM CommentsEntity comments\", CommentsEntity.class)\n\t\t\t\t.getResultList();\n\t\tSystem.out.println(\"[REPO] Found comments query success\");\n\t\treturn comments;\n\t}", "void visitElement_comment(org.w3c.dom.Element element) { // <comment>\n // element.getValue();\n org.w3c.dom.NodeList nodes = element.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++) {\n org.w3c.dom.Node node = nodes.item(i);\n switch (node.getNodeType()) {\n case org.w3c.dom.Node.CDATA_SECTION_NODE:\n // ((org.w3c.dom.CDATASection)node).getData();\n break;\n case org.w3c.dom.Node.ELEMENT_NODE:\n org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;\n break;\n case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:\n // ((org.w3c.dom.ProcessingInstruction)node).getTarget();\n // ((org.w3c.dom.ProcessingInstruction)node).getData();\n break;\n case org.w3c.dom.Node.TEXT_NODE:\n issue.comments.add(((org.w3c.dom.Text)node).getData());\n break;\n }\n }\n }", "@Override\n\tpublic Collection<SummonerComments> getAllSummonerComments() {\n\t\treturn summonerCommentMap.values();\n\t}", "Collection<? extends String> getHasAddress();", "@NotNull\n private List<UMLComment> extractInternalComments(@NotNull PsiFile file,\n @NotNull String sourceFile) {\n Collection<PsiComment> psiComments = PsiTreeUtil.findChildrenOfType(file, PsiComment.class);\n List<UMLComment> umlComments = new ArrayList<>();\n for (PsiComment comment : psiComments) {\n LocationInfo locationInfo = null;\n if (comment.getTokenType() == JavaTokenType.END_OF_LINE_COMMENT) {\n locationInfo = new LocationInfo(file, sourceFile, comment, LocationInfo.CodeElementType.LINE_COMMENT);\n } else if (comment.getTokenType() == JavaTokenType.C_STYLE_COMMENT) {\n locationInfo = new LocationInfo(file, sourceFile, comment, LocationInfo.CodeElementType.BLOCK_COMMENT);\n }\n if (locationInfo != null) {\n String text = Formatter.format(comment);\n UMLComment umlComment = new UMLComment(text, locationInfo);\n umlComments.add(umlComment);\n }\n }\n return umlComments;\n }", "public void setFilteredComments(Set<Comment> filteredComments);", "private void scanComment(LocatedChar ch) {\n\t\tch = input.next();\n\t\twhile(!ch.matchChar('%') && !ch.matchChar('\\n')) {\n\t\t\tch = input.next();\n\t\t}\n\t}", "boolean processCommentsContainingIdentifier( String identifier, SearchScope searchScope, Processor<PsiElement> processor);", "java.util.List<? extends kr.pik.message.Profile.ProfileMessage.ContactAddressOrBuilder> \n getContactAddressOrBuilderList();", "public List<CommentDTO> getComments() {\n\t\treturn comments;\n\t}", "boolean hasComment();", "@Override\n public Iterator<Location> iterator() {\n return new NeighborhoodIterator(this, new Location(0, 0));\n }", "Iterable<Comment> findByAuthorId(int authorId);", "@Override\n\tpublic Iterator<Coffee> iterator() {\n\t\treturn null;\n\t}", "public final Iterator<PropertyDeclaration> getDeclarationIterator()\n {\n final Type superType = getSuperClass();\n\n return new FilterIterator(declarations.values().iterator(), new Predicate()\n {\n public boolean evaluate(Object object)\n {\n return superType.getProperty(((PropertyDeclaration)object).getName()) == null;\n }\n });\n }", "@Override\n public List<NutricionistComment> findAllComments() {\n return nutricionistCommentDAO.findAllComments();\n }", "@Override\n public List<Comments> getAllComments() throws Exception {\n Query query = entityManager.createQuery(\"SELECT c FROM Comments c\", Comments.class);\n return query.getResultList();\n }", "public List<Bugcomment> getComments(int userId) {\n\t\t\t\t\treturn null;\n\t\t\t\t}", "public List<Comment> showComment() {\n\t\treturn cdi.showComment();\n\t}", "PsiElement[] findCommentsContainingIdentifier( String identifier, SearchScope searchScope);", "public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllComments_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), COMMENTS, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}", "public List<CommentAttributes> getCommentsForInstructor(InstructorAttributes instructor)\n throws EntityDoesNotExistException {\n verifyIsCoursePresent(instructor.courseId, \"get\");\n verifyIsInstructorOfCourse(instructor.courseId, instructor.email);\n HashSet<String> commentsVisitedSet = new HashSet<String>();\n \n List<CommentAttributes> comments = getCommentsForGiverAndStatus(instructor.courseId, instructor.email, CommentStatus.FINAL);\n for(CommentAttributes c: comments){\n preventAppendingThisCommentAgain(commentsVisitedSet, c);\n }\n \n List<CommentAttributes> commentsForOtherInstructor = getCommentsForCommentViewer(instructor.courseId, CommentRecipientType.INSTRUCTOR);\n removeNonVisibleCommentsForInstructor(commentsForOtherInstructor, commentsVisitedSet, comments);\n \n java.util.Collections.sort(comments);\n \n return comments;\n }", "@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}", "public ReactorResult<java.lang.String> getAllComments_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), COMMENTS, java.lang.String.class);\r\n\t}", "public com.google.protobuf.ByteString\n getCommentsBytes() {\n java.lang.Object ref = comments_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n comments_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getCommentsBytes() {\n java.lang.Object ref = comments_;\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 comments_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n\tpublic Collection<Comment> getAll(String summonerCommentId) {\n\t\treturn getSummonerComments(summonerCommentId).getComments();\n\t}", "public CommentElements getCommentAccess() {\n\t\treturn (pComment != null) ? pComment : (pComment = new CommentElements());\n\t}", "boolean isComment(Object object);", "public boolean fetchComments() {\n return fetchComments(false);\n }", "ImmutableList<SchemaOrgType> getCommentCountList();", "public Iterator<?> xpathIterator(Collection<?> collection, String query) {\n JXPathContext pathContext = JXPathContext.newContext(collection);\n Iterator<?> result = null;\n try {\n result = pathContext.iteratePointers(query);\n } catch (JXPathNotFoundException e) {\n logger.log(Level.WARNING, \"JXPath exception: {0}\", e.getMessage());\n }\n return result;\n }", "java.util.List<kr.pik.message.Profile.ProfileMessage.ContactAddress> \n getContactAddressList();", "public Iterator reachable() {\n Set s = SortedArraySet.FACTORY.makeSet(HashCodeComparator.INSTANCE);\n s.add(IdentityHashCodeWrapper.create(this));\n this.reachable(s);\n return new FilterIterator(s.iterator(), filter);\n }", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public Iterator<Type> iterator();", "static boolean isComment(Token t) {\n return t.getText().startsWith(\"#\");\n }", "public interface IAddressList {\n\n\t/**\n\t * Returns the list of addresses.\n\t *\n\t * @return list of addresses\n\t */\n\tList<?> getAddress();\n\n}", "private void collectComments(JSParseRootNode result)\n {\n\n List<Symbol> sDocComments = fScanner.getSDocComments();\n List<Symbol> vsDocComments = fScanner.getVSDocComments();\n List<Symbol> singleLineComments = fScanner.getSingleLineComments();\n List<Symbol> multiLineComments = fScanner.getMultiLineComments();\n\n List<JSCommentNode> comments = new ArrayList<JSCommentNode>(sDocComments.size() + vsDocComments.size()\n + singleLineComments.size() + multiLineComments.size());\n\n for (Symbol symbol : sDocComments)\n {\n comments.add(new JSCommentNode(IJSNodeTypes.SDOC_COMMENT, symbol.getStart(), symbol.getEnd()));\n }\n\n for (Symbol symbol : vsDocComments)\n {\n comments.add(new JSCommentNode(IJSNodeTypes.VSDOC_COMMENT, symbol.getStart(), symbol.getEnd()));\n }\n\n for (Symbol symbol : singleLineComments)\n {\n comments.add(new JSCommentNode(IJSNodeTypes.SINGLE_LINE_COMMENT, symbol.getStart(), symbol.getEnd()));\n }\n\n for (Symbol symbol : multiLineComments)\n {\n comments.add(new JSCommentNode(IJSNodeTypes.MULTI_LINE_COMMENT, symbol.getStart(), symbol.getEnd()));\n }\n\n result.setCommentNodes(comments.toArray(new IParseNode[comments.size()]));\n }", "public abstract Iterator<C17883a<E>> mo45843b();", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "@Test\n public void commentMatchNotNull() {\n comment.match(\"//hier steht text\\n@test zuziuziuziu\");\n assertNotSame(null, comment.getToken().getClass());\n }", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "@Override\n\tpublic List<Comment> findCommentbyuserId(String userId) {\n\t\treturn commentDao.findCommentbyuserId(userId);\n\t}", "public boolean hasComments() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "void extractComments(String longString)\n\t{\n\t\tlongString = longString.toLowerCase();\n\t\tString openingCommentTag = \"<div class=\\\"CT\\\">\".toLowerCase();\n\t\tString endingCommentTag = \"</div>\".toLowerCase();\n\n\t\tfor (int i = 0; i < longString.length(); i++)\n\t\t{\n\t\t\tint openIndex = longString.indexOf(openingCommentTag, i);\n\t\t\tif (openIndex != -1)\n\t\t\t{\n\t\t\t\tint endIndex = longString.indexOf(endingCommentTag, openIndex);\n\t\t\t\t// System.out.println(\"openIndex: \" + openIndex + \"\\n\" +\n\t\t\t\t// \"endIndex: \" + endIndex);\n\n\t\t\t\tcomments.add(longString.substring(\n\t\t\t\t\t\topenIndex + openingCommentTag.length(), endIndex));\n\t\t\t\ti = endIndex;\n\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public CommentExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "@Override\n public void onCommentsReceived(String comment, String URL) {\n\n }", "List<?> getAddress();", "private String filterComments(String[] initial) {\n\t\tStringBuilder answer = new StringBuilder();\n\t\tfor (int a = 0; a < initial.length; a++) {\n\t\t\tString potential = initial[a];\n\t\t\tint index = potential.indexOf(START_COMMENT);\n\t\t\tif(index != -1)\n\t\t\t\tpotential = potential.substring(0,index);\n\t\t\tif (!potential.trim().isEmpty())\n\t\t\t\tanswer.append(potential + \" \");\n\t\t}\n\t\treturn answer.toString();\n\t}", "public boolean hasComments() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "protected Iterator<Cell> getCellIterator(ColumnFamily container)\n {\n return container.iterator();\n }", "public List<String> getComments() {\n return comments;\n }", "public java.util.Iterator<Entry> iterator(){\n\t\treturn new ContentIterator();\n\t}", "private void commentStates() throws SAXException, IOException {\n CommentState state = CommentState.COMMENT_START_STATE;\n for (;;) {\n char c = read();\n switch (state) {\n case COMMENT_START_STATE:\n /*\n * Comment start state\n * \n * \n * Consume the next input character:\n */\n switch (c) {\n case '-':\n /*\n * U+002D HYPHEN-MINUS (-) Switch to the comment\n * start dash state.\n */\n state = CommentState.COMMENT_START_DASH_STATE;\n continue;\n case '>':\n /*\n * U+003E GREATER-THAN SIGN (>) Parse error.\n */\n err(\"Premature end of comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Switch to the data state.\n */\n return;\n case '\\u0000':\n /*\n * EOF Parse error.\n */\n err(\"End of file inside comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append the input character to the\n * comment token's data.\n */\n appendToComment(c);\n /*\n * Switch to the comment state.\n */\n state = CommentState.COMMENT_STATE;\n continue;\n }\n case COMMENT_START_DASH_STATE:\n /*\n * Comment start dash state\n * \n * Consume the next input character:\n */\n switch (c) {\n case '-':\n /*\n * U+002D HYPHEN-MINUS (-) Switch to the comment end\n * state\n */\n state = CommentState.COMMENT_END_STATE;\n continue;\n case '>':\n /*\n * U+003E GREATER-THAN SIGN (>) Parse error.\n */\n err(\"Premature end of comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Switch to the data state.\n */\n return;\n case '\\u0000':\n /*\n * EOF Parse error.\n */\n err(\"End of file inside comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append a U+002D HYPHEN-MINUS (-)\n * character and the input character to the comment\n * token's data.\n */\n appendToComment('-');\n appendToComment(c);\n /*\n * Switch to the comment state.\n */\n state = CommentState.COMMENT_STATE;\n continue;\n }\n case COMMENT_STATE:\n /*\n * Comment state Consume the next input character:\n */\n switch (c) {\n case '-':\n /*\n * U+002D HYPHEN-MINUS (-) Switch to the comment end\n * dash state\n */\n state = CommentState.COMMENT_END_DASH_STATE;\n continue;\n case '\\u0000':\n /*\n * EOF Parse error.\n */\n err(\"End of file inside comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append the input character to the\n * comment token's data.\n */\n appendToComment(c);\n /*\n * Stay in the comment state.\n */\n continue;\n }\n case COMMENT_END_DASH_STATE:\n /*\n * Comment end dash state Consume the next input character:\n */\n switch (c) {\n case '-':\n /*\n * U+002D HYPHEN-MINUS (-) Switch to the comment end\n * state\n */\n state = CommentState.COMMENT_END_STATE;\n continue;\n case '\\u0000':\n /*\n * EOF Parse error.\n */\n err(\"End of file inside comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append a U+002D HYPHEN-MINUS (-)\n * character and the input character to the comment\n * token's data.\n */\n appendToComment('-');\n appendToComment(c);\n /*\n * Switch to the comment state.\n */\n state = CommentState.COMMENT_STATE;\n continue;\n }\n case COMMENT_END_STATE:\n /*\n * Comment end dash state Consume the next input character:\n */\n switch (c) {\n case '>':\n /*\n * U+003E GREATER-THAN SIGN (>) Emit the comment\n * token.\n */\n emitComment();\n /*\n * Switch to the data state.\n */\n return;\n case '-':\n /* U+002D HYPHEN-MINUS (-) Parse error. */\n err(\"Consecutive hyphens did not terminate a comment.\");\n /*\n * Append a U+002D HYPHEN-MINUS (-) character to the\n * comment token's data.\n */\n appendToComment('-');\n /*\n * Stay in the comment end state.\n */\n continue;\n case '\\u0000':\n /*\n * EOF Parse error.\n */\n err(\"End of file inside comment.\");\n /* Emit the comment token. */\n emitComment();\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Parse error.\n */\n err(\"Consecutive hyphens did not terminate a comment.\");\n /*\n * Append two U+002D HYPHEN-MINUS (-) characters and\n * the input character to the comment token's data.\n */\n appendToComment('-');\n appendToComment('-');\n appendToComment(c);\n /*\n * Switch to the comment state.\n */\n state = CommentState.COMMENT_STATE;\n continue;\n }\n }\n }\n }", "@Override\n\tpublic List<CommentDTO> findAll() {\n\t\tList<Comment> comments = commentRepository.findAllByOrderByDateDesc();\n\t\tif(comments != null) {\n\t\t\tList<CommentDTO> commentsDTO = new ArrayList<>();\n\t\t\tfor(Comment comment : comments) {\n\t\t\t\tCommentDTO commentDTO = new CommentDTO(comment);\n\t\t\t\tUserDTO userDTO = new UserDTO(comment.getUser());\n\t\t\t\tcommentDTO.setUserDTO(userDTO);\n\t\t\t\tcommentsDTO.add(commentDTO);\n\t\t\t}\n\t\t\treturn commentsDTO;\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public <T> Iterator<Entry<T>> typedIterator(Class<T> clazz) {\n List<Entry<T>> entries = new ArrayList();\n for (Iterator<Entry> it = this.iterator(); it.hasNext(); ) {\n final Entry e = it.next();\n if (e.getKey().valueType.equals(clazz)) {\n entries.add(e);\n }\n }\n return entries.iterator();\n }", "public String[] getComments() {\n return comments;\n }", "public String[] getComments() {\n return comments;\n }", "@Test\n public void noCommentMatch() {\n comment.match(\"@test\");\n assertEquals(null, comment.getToken());\n }", "@Test\n public void FetchCommentsAndValidateEmail(){\n String regex = \"/^[\\\\w-_\\\\.+]*[\\\\w-_\\\\.]\\\\@([\\\\w]+\\\\.)+[\\\\w]+[\\\\w]$/\";\n String number = \"\";\n List userPostIds = searchForPosts();\n\n //check to see that the user has posts before iterating (in case user has no posts)\n if(!userPostIds.isEmpty()) {\n for (int i = 0; i < userPostIds.size(); i++) {\n number = userPostIds.get(i).toString();\n String response = given().\n get(\"/comments?postId=\" + number).then().extract().asString();\n\n //check for emails with invalid format\n List inValidEmails = from(response).getList(String.format(\"findAll { !it.email.matches(%s)}.email\", regex));\n if (!inValidEmails.isEmpty()) {\n System.out.printf(\"The InValid email(s) for post Id: %s is/are %s%n\", number, inValidEmails.toString());\n Assert.assertTrue(inValidEmails.isEmpty());\n }\n }\n }\n }", "@PropertySetter(role = COMMENT)\n\t<E extends CtElement> E setComments(List<CtComment> comments);", "private boolean isComment(int nextVal) {\n\t\treturn nextVal == COMMENT;\n\t}", "@GetMapping(value= \"/comment/\")\n\tpublic List<Comment> getAll() {\n\t\tlogger.debug(\"Getting all comments.\");\n\t\treturn service.getAllComments();\n\t}", "public AddressList getCc() {\n return getAddressList(FieldName.CC);\n }", "@Test\n public void commentMatch() {\n comment.match(\"//hier steht text\\n\");\n assertEquals(comment.getClass(), comment.getToken().getClass());\n }", "default Iterator<E> edgeIterator() {\n return getEdges().iterator();\n }", "com.google.protobuf.ByteString\n getCommentsBytes();", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "protected List<CommentDocument> getCommentsByRef(HttpServletRequest servletRequest, String documentId, int limit) throws RepositoryException, QueryException {\r\n if (documentId == null) {\r\n return null;\r\n }\r\n \r\n //Get the references to the context and the query manager\r\n HstRequestContext requestContext = getRequestContext(servletRequest);\r\n HstQueryManager hstQueryManager = getHstQueryManager(requestContext.getSession(), requestContext);\r\n\r\n //Determine search base\r\n String mountContentPath = requestContext.getResolvedMount().getMount().getContentPath();\r\n Node mountContentNode = requestContext.getSession().getRootNode().getNode(PathUtils.normalizePath(mountContentPath));\r\n\r\n //Create and execute query\r\n @SuppressWarnings(\"unchecked\")\r\n\t\tHstQuery hstQuery = hstQueryManager.createQuery(mountContentNode, CommentDocument.class);\r\n Filter filter = hstQuery.createFilter();\r\n filter.addEqualTo(\"website:reference/@hippo:docbase\", documentId.toLowerCase());\r\n hstQuery.setFilter(filter);\r\n if (limit > 0) {\r\n hstQuery.setLimit(limit);\r\n }\r\n\r\n HstQueryResult result = hstQuery.execute();\r\n \r\n if (result.getSize() == 0) {\r\n return Collections.emptyList();\r\n }\r\n \r\n //Read results\r\n List<CommentDocument> comments = new ArrayList<CommentDocument>(result.getSize());\r\n HippoBeanIterator iterator = result.getHippoBeans();\r\n\r\n while (iterator.hasNext()) {\r\n //Get all incoming comment links\r\n CommentDocument comment = (CommentDocument) iterator.nextHippoBean();\r\n\r\n if (comment != null) {\r\n comments.add(comment);\r\n }\r\n }\r\n\r\n return comments;\r\n }", "public Iterator<GPoint> iterator() {\n\t\treturn points.iterator();\n\t}", "protected boolean isComment () {\r\n int startvalue = index - 1;\r\n if (index + 3 >= length)\r\n return false;\r\n return (pagepart[index] == '!' &&\r\n pagepart[index + 1] == '-' &&\r\n pagepart[index + 2] == '-');\r\n }", "protected int scanComment () throws HTMLParseException {\r\n int startvalue = index - 1;\r\n int i = -1;\r\n int j = index;\r\n while (j+2 < length) {\r\n if (pagepart[j] == '-' &&\r\n pagepart[j + 1] == '-' &&\r\n pagepart[j + 2] == '>') {\r\n i = j;\r\n break;\r\n }\r\n j++;\r\n }\r\n if (i > -1) {\r\n index = i + 2;\r\n nextToken = MT;\r\n match (MT);\r\n stringLength = index - startvalue;\r\n return COMMENT;\r\n }\r\n block.setRest (startvalue);\r\n return END;\r\n }", "private ArrayList<Integer> getListOnComment(String comment) {\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < copyOfChunks.size(); i++) {\n\t\t\tif (copyOfChunks.get(i).getComment().equals(comment)) {\n\t\t\t\tlist.add(i);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public Iterator<E> iterator()\n {\n return new CircularLinkedListIterator();\n }" ]
[ "0.7392895", "0.6313815", "0.5756708", "0.53809136", "0.5373411", "0.52931345", "0.52007455", "0.5008831", "0.49365658", "0.48958686", "0.488664", "0.48852006", "0.48805016", "0.48347476", "0.4823594", "0.48040226", "0.47861794", "0.47676823", "0.47647306", "0.47122395", "0.46862346", "0.46836698", "0.46752098", "0.46473688", "0.46383384", "0.4634835", "0.46211874", "0.4607048", "0.4606532", "0.4603613", "0.46008393", "0.45877525", "0.45828617", "0.4580671", "0.45765212", "0.4576387", "0.45736286", "0.45699513", "0.45669746", "0.45548612", "0.45542732", "0.4548659", "0.4536497", "0.45305872", "0.45276773", "0.45025572", "0.44595674", "0.4450535", "0.44438004", "0.44386873", "0.4419428", "0.4406672", "0.44055927", "0.44046637", "0.43943465", "0.43895018", "0.43829256", "0.43774593", "0.43621898", "0.43558934", "0.43261808", "0.43247887", "0.43109664", "0.43087292", "0.42991912", "0.4292412", "0.42863363", "0.4285315", "0.4285291", "0.4277948", "0.42776787", "0.42760575", "0.42727864", "0.42727026", "0.4269973", "0.42624095", "0.4249233", "0.42442346", "0.42413086", "0.4235149", "0.42343098", "0.42312965", "0.42220557", "0.42220557", "0.4221741", "0.42215106", "0.42210475", "0.42156285", "0.42107645", "0.42089993", "0.4205963", "0.41965237", "0.41869968", "0.41852254", "0.4182477", "0.41805914", "0.41752696", "0.4172689", "0.41675633", "0.41656438" ]
0.7295569
1
Get the comment for the given type at the specified address.
public String getComment(int commentType, Address address);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setComment(Address address, int commentType, String comment);", "public CommentHistory[] getCommentHistory(Address addr, int commentType);", "String getAddress(int type);", "public void setAddressType(String addressType) {\n this.addressType = addressType;\n }", "public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "@Override\n public void recordComment(Comment.Type type, SourceRange range, String value) {\n if (lastCommentEndPosition == null || range.end.offset > this.lastCommentEndPosition.offset) {\n value = value.trim();\n if (value.startsWith(SOURCE_MAPPING_URL_PREFIX)) {\n sourceMapURL = value.substring(SOURCE_MAPPING_URL_PREFIX.length());\n }\n comments.add(new Comment(value, range, type));\n this.lastCommentEndPosition = range.end;\n }\n }", "@RequestMapping(value=\"/getComments\")\n\t@ResponseBody\n\tpublic String getComments(\n\t\t\t@RequestParam(value=\"type\") char type,\n\t\t\t@RequestParam(value=\"id\") int id){\n\t\treturn convertToJson(commentDao.getCommentsForElement(id, Character.toString(type)));\n\t}", "public String getComment() {\n Object ref = comment_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n comment_ = s;\n }\n return s;\n }\n }", "public String getComment() {\n Object ref = comment_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n comment_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "com.google.protobuf.ByteString\n getCommentBytes();", "public CommentTypeCodeType getCommentType() {\n\t return this.commentType;\n\t}", "public com.google.protobuf.ByteString\n getCommentBytes() {\n Object ref = comment_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n comment_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getCommentBytes() {\n Object ref = comment_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n comment_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Place(String name, String address, double longitude, \n\t\t\tdouble latitude, int phoneNumber, String url, String comment,\n\t\t\tint rate, PlaceType type) {\n\t\tdate = System.currentTimeMillis();\n\t\tposition = new GeoPoint(longitude, latitude);\n\t\tthis.name = name;\n\t\tthis.address = address;\n\t\tthis.phoneNumber = phoneNumber;\n\t\tthis.url = url;\n\t\tthis.comment = comment;\n\t\tthis.rate = rate;\n\t\tthis.type = type;\n\t}", "String getComment();", "String getComment();", "public void setCommentType(CommentTypeCodeType commentType) {\n\t this.commentType = commentType;\n\t}", "public ST getComment() { \r\n\t\tST retVal = this.getTypedField(48, 0);\r\n\t\treturn retVal;\r\n }", "public myContact(Address address, String type, Object identity, Object boss){\n\t\tmyAddress = address;\n\t\tmyType = type;\n\t\tmyIdentity = identity;\n\t\tmyBoss = boss;\n\t}", "public Class getAddressClass() {\n return addressClass;\n }", "@ApiModelProperty(value = \"The type to which the place is referring. This may be \\\"Site\\\", \\\"FormattedAddress\\\", \\\"FieldedAddress\\\", \\\"ReferencedAddress\\\", or \\\"GeographicLocation\")\n\n\n public String getType() {\n return type;\n }", "public static String getAddressSnippet(String userInfo) {\n String snippet = null;\n try {\n JSONArray jsonArray = new JSONArray(userInfo);\n JSONObject jsonObject = jsonArray.getJSONObject(0);\n JSONObject resid = jsonObject.getJSONObject(\"resid\");\n snippet = resid.getString(\"address\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return snippet;\n }", "public String getComment() {\n\t LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"getComment() \" );\n Via via=(Via)sipHeader;\n return via.getComment();\n }", "lightpay.lnd.grpc.NewAddressRequest.AddressType getType();", "public SourceDocumentInformation(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "public String getAddress() {\n return definition.getString(ADDRESS);\n }", "String getCommentStringValue(Object comment);", "public String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "public CommentView getComment(String commentHandle) throws SQLException {\n CommentView comment = commentDao.queryForId(commentHandle);\n\n if (comment == null) {\n throw new SQLException(\"comment \" + commentHandle + \" not found in cache\");\n }\n\n return comment;\n }", "public String getComment(String path) {\n return getComment(path, null);\n }", "public GEDCOMType(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }", "private String getDeasLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return symbols[key] + \": \";\n }\n return \"\";\n }", "private Comment createSimpleComment(String content) {\n Comment comment = new Comment();\n comment.setContent(content);\n return comment;\n }", "public final String getComment() {\n return comment;\n }", "public com.apatar.cdyne.ws.demographix.PlaceInfo getPlaceIDbyAddress(java.lang.String addressLine1, java.lang.String city, java.lang.String stateAbbrev, java.lang.String zipCode, java.lang.String licenseKey) throws java.rmi.RemoteException;", "public CrashReport withComment(String comment);", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public static long getThreadIdFromAddress(Context context, String address) {\r\n \t\tif (address == null)\r\n \t\t\treturn 0;\r\n \r\n \t\tString THREAD_RECIPIENT_QUERY = \"recipient\";\r\n \r\n \t\tUri.Builder uriBuilder = THREAD_ID_CONTENT_URI.buildUpon();\r\n \t\turiBuilder.appendQueryParameter(THREAD_RECIPIENT_QUERY, address);\r\n \r\n \t\tlong threadId = 0;\r\n \r\n \t\tCursor cursor = context.getContentResolver().query(uriBuilder.build(), new String[] { SMS_ID }, null, null,\r\n \t\t\t\tnull);\r\n \t\tif (cursor != null) {\r\n \t\t\ttry {\r\n \t\t\t\tif (cursor.moveToFirst()) {\r\n \t\t\t\t\tthreadId = cursor.getLong(0);\r\n \t\t\t\t}\r\n \t\t\t} finally {\r\n \t\t\t\tcursor.close();\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn threadId;\r\n \t}", "public String getLongDescriptionFor(String type) {\n ProtocolMetadata metadata = types.get(type);\n if (metadata != null) {\n return metadata.getDescription();\n } else {\n return null;\n }\n }", "public String get_comment() throws Exception {\n\t\treturn this.comment;\n\t}", "Comment createComment();", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "Builder addComment(String value);", "Builder addComment(Comment value);", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public Optional<String> getComment() {\n\t\treturn Optional.ofNullable(_comment);\n\t}", "public Document(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }", "public com.google.protobuf.ByteString\n getCommentsBytes() {\n java.lang.Object ref = comments_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n comments_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String address() {\n return Codegen.stringProp(\"address\").config(config).require();\n }", "public String getComment() {\n return this.comment;\n }", "public String getComment(String path, String def) {\n return configComments.getOrDefault(path, def);\n }", "java.lang.String getCommentId();", "public ByteBuffer read(long address)\n {\n return tryRead(address, null);\n }", "public String getComment() {\n return comment;\n }", "public String getComment() {\n return comment;\n }", "public String getComment() {\n return comment;\n }", "public String getComment() {\n return comment;\n }", "public String getComment() {\n return comment;\n }", "public String getComment() {\n return comment;\n }", "public String getComment() {\n return comment;\n }", "public void setAddress(java.lang.String address) {\r\n this.address = address;\r\n }", "public java.lang.String getComments() {\n java.lang.Object ref = comments_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n comments_ = s;\n }\n return s;\n }\n }", "@Function Comment createComment(String data);", "protected Entry(MemoryType type, String data, int address, int size) {\n\t\t\tthis.type =type;\n\t\t\tthis.address = address;\n\t\t\tthis.data = data;\n\t\t\tthis.size = size;\n\t\t}", "public com.google.protobuf.ByteString\n getCommentsBytes() {\n java.lang.Object ref = comments_;\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 comments_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getLink(@NotNull String type) {\n switch (type) {\n default:\n case \"Official\": return link;\n case \"Summary\": return tldr.isEmpty() ? link : tldr;\n }\n }", "public void setAddress(String address)\n {\n this.address = address;\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }", "public void assignObjectnr(int addr, String type) {\n\t\tint i = 1;\n\t\tfor(String host : hosts) {\n\t\t\tfor(List<String> pkt : pkts) {\n\t\t\t\tif(pkt.get(addr).equals(host)) {\n\t\t\t\t\tpkt.add(Integer.toString(i));\n\t\t\t\t\tpkt.add(\"host\");\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tfor(String webPage : webPages) {\n\t\t\tfor(List<String> pkt : pkts) {\n\t\t\t\tif(pkt.get(addr).equals(webPage)) {\n\t\t\t\t\tpkt.add(Integer.toString(i));\n\t\t\t\t\tpkt.add(\"webPage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tif(type.equals(\"IPv4\")) {\n\t\t\tCollections.sort(pkts,new ListComparatorIPv4());\n\t\t}\n\t\telse if(type.equals(\"IPv6\")) {\n\t\t\tCollections.sort(pkts,new ListComparatorIPv6());\n\t\t}\n\t\telse if(type.equals(\"Netflow\")) {\n\t\t\tCollections.sort(pkts,new ListComparatorNetFlow());\n\t\t}\n\t\telse if(type.equals(\"Webserver\")) {\n\t\t\tCollections.sort(pkts,new ListComparatorWebserver());\n\t\t}\n\t\telse if(type.equals(\"Syslog\")) {\n\t\t\tCollections.sort(pkts,new ListComparatorSyslog());\n\t\t}\t\n\t}", "public String getComment()\n {\n return comment;\n }", "public String getComment(){\n return this.comment;\n }", "public String getComment() {\n return comment ;\n }", "public ModbusRegisterInfo(int address, int typeId)\n {\n // store the address\n this.address = address;\n\n // create the suitable xlator to handle translations to/from this\n // register\n this.xlator = RegXlatorTypes.createRegXlator(typeId);\n\n }" ]
[ "0.7052541", "0.6282044", "0.6129532", "0.57938", "0.5717057", "0.55629265", "0.5354968", "0.53363794", "0.52837867", "0.5188215", "0.5184359", "0.517115", "0.5135788", "0.5076414", "0.50307876", "0.49976462", "0.49976462", "0.49908826", "0.49778375", "0.49397108", "0.4904327", "0.48706546", "0.48671955", "0.4861895", "0.48573977", "0.4799246", "0.47928154", "0.47789118", "0.47508857", "0.47470263", "0.47470263", "0.47470263", "0.47470263", "0.47470263", "0.47470263", "0.4735692", "0.4714071", "0.4692052", "0.46518007", "0.46322235", "0.4598829", "0.4596325", "0.45955876", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.45897254", "0.4584081", "0.45824936", "0.45600623", "0.45470682", "0.45460075", "0.45383126", "0.45383126", "0.45331305", "0.4528963", "0.45274696", "0.45274696", "0.45274696", "0.4525686", "0.4524831", "0.45236877", "0.45191243", "0.45112303", "0.45112002", "0.4505909", "0.44962266", "0.44952175", "0.44952175", "0.44952175", "0.44952175", "0.44952175", "0.44952175", "0.44952175", "0.4491411", "0.4485063", "0.44849658", "0.447484", "0.44704995", "0.4465841", "0.44622606", "0.44605428", "0.44507614", "0.44496763", "0.4445896", "0.4445526", "0.44444773" ]
0.8481864
0
Set the comment for the given comment type at the specified address.
public void setComment(Address address, int commentType, String comment);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAddress(java.lang.String address)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ADDRESS$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ADDRESS$2);\n }\n target.setStringValue(address);\n }\n }", "public void setAddressType(String addressType) {\n this.addressType = addressType;\n }", "public void setAddress(org.xmlsoap.schemas.wsdl.soap.TAddress address)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().find_element_user(ADDRESS$0, 0);\n if (target == null)\n {\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().add_element_user(ADDRESS$0);\n }\n target.set(address);\n }\n }", "public void setAddress(final String address){\n this.address=address;\n }", "public String getComment(int commentType, Address address);", "public void setAddress(final String address) {\n this._address = address;\n }", "public void setComment(String comment) throws IllegalArgumentException,\n SipParseException {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"setComment() \" + comment );\n Via via=(Via)sipHeader;\n \n if (comment==null) \n throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: null comment\" );\n else if (comment.length() == 0) \n throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: 0 length comment\" );\n else via.setComment(comment);\n }", "public void setAddress(java.lang.String address) {\r\n this.address = address;\r\n }", "public void setComment(String comment);", "public void setComment(String comment);", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(Address address) {\n this.address = address;\n }", "public void setAddress(Address address) {\n this.address = address;\n }", "public void setAddress(Address address) {\n this.address = address;\n }", "public void xsetAddress(org.apache.xmlbeans.XmlString address)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ADDRESS$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ADDRESS$2);\n }\n target.set(address);\n }\n }", "public void setAddress(String address)\n {\n this.address = address;\n }", "public void setAddress(int address)\n {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(final String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setCommentType(CommentTypeCodeType commentType) {\n\t this.commentType = commentType;\n\t}", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setComment(String path, String comment) {\n if (comment == null)\n configComments.remove(path);\n else\n configComments.put(path, comment);\n }", "public void setInternalAddress(String address);", "public void setAddress (java.lang.String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String _address){\n address = _address;\n }", "@Generated(hash = 607080948)\n public void setAddress(Address address) {\n synchronized (this) {\n this.address = address;\n addressId = address == null ? null : address.getId();\n address__resolvedKey = addressId;\n }\n }", "public void setaddress(String address) {\n\t\t_address = address;\n\t}", "void setAddress(String address) throws IllegalArgumentException;", "Builder setAddress(String address);", "public void setAddress(String address){\n\t\tthis.address = address;\n\t}", "public void setAddress(String address){\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n this.address = address;\n }", "@Override\r\n\tpublic void setAddress(String address) {\n\t\tif (address == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (address.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.address = address;\r\n\t}", "public void setAddress(final Address address) {\n\n // Check sanity\n Validate.notNull(address, \"address\");\n\n // Assign internal state\n this.address = address;\n }", "public final void setComment(final String comment) {\n this.comment = comment;\n }", "public void setData(int address, String data, int size, String comment) {\n\t\tint bank = address % numOfbank;\n\t\t\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\td.setData(data);\n\t\t\td.setType(MemoryType.DATA);\n\t\t\td.setSize(size);\n\t\t\tlogger.info(\"data memory update, bank:\" + bank +\", address:\"+ address);\n\t\t\tpublishUpdate(address, data,comment);\n\t\t} else{\n\t\t\tlogger.error(\"invalid data memory address \" + address + \" in bank \" + bank);\n\t\t}\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "@Override\n\tpublic void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "@Override\n public void recordComment(Comment.Type type, SourceRange range, String value) {\n if (lastCommentEndPosition == null || range.end.offset > this.lastCommentEndPosition.offset) {\n value = value.trim();\n if (value.startsWith(SOURCE_MAPPING_URL_PREFIX)) {\n sourceMapURL = value.substring(SOURCE_MAPPING_URL_PREFIX.length());\n }\n comments.add(new Comment(value, range, type));\n this.lastCommentEndPosition = range.end;\n }\n }", "public void setComment(String c) {\n comment = c ;\n }", "public void setAddress(String address) { this.address = address; }", "public void setComment(java.lang.String comment) {\r\n this.comment = comment;\r\n }", "public void setAddress(String address) {\n\t\tthis.address = StringUtils.trimString( address );\n\t}", "public void setComment(String new_comment){\n this.comment=new_comment;\n }", "public void setAddress(String address) throws JAXRException {\n this.address = address;\n }", "public void setComment(java.lang.String comment) {\n this.comment = comment;\n }", "public void setComment(java.lang.String comment) {\n this.comment = comment;\n }", "public void setComment(java.lang.String comment) {\n this.comment = comment;\n }", "public void setExternalAddress(String address);", "public Builder setComment(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000020;\n comment_ = value;\n onChanged();\n return this;\n }", "public void setAddress(java.lang.String newAddress) {\n\taddress = newAddress;\n}", "public void setAddress(java.lang.String newAddress) {\n\taddress = newAddress;\n}", "public void setAddress(String address) {\n if (getAddresses().isEmpty()) {\n getAddresses().add(address);\n } else {\n getAddresses().set(0, address);\n }\n }", "public void setComments( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), COMMENTS, value);\r\n\t}", "@PropertySetter(role = COMMENT)\n\t<E extends CtElement> E addComment(CtComment comment);", "public void setAdress(Adress adr) {\r\n // Bouml preserved body begin 00040F82\r\n\t this.adress = adr;\r\n // Bouml preserved body end 00040F82\r\n }", "public void setComment(String comment) {\n this.comment = comment;\n }", "private void setPrefAddress( String addr ) {\n\t\tmPreferences.edit().putString( PREF_ADDR, addr ).commit();\n\t}", "public void set_comment(String comment) throws Exception{\n\t\tthis.comment = comment;\n\t}", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setComment(String comment)\n {\n this.comment = comment;\n }", "Builder addComment(Comment value);" ]
[ "0.6431821", "0.62871635", "0.62091196", "0.6207589", "0.61807567", "0.61623555", "0.6158147", "0.6157271", "0.61289173", "0.61289173", "0.61161685", "0.61161685", "0.61161685", "0.61161685", "0.60988545", "0.60988545", "0.60988545", "0.60934156", "0.6080004", "0.604046", "0.6032694", "0.6032694", "0.60249776", "0.6015495", "0.6015495", "0.6015495", "0.6003168", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.5983209", "0.59652746", "0.5965219", "0.59563893", "0.5932105", "0.5919223", "0.5905325", "0.5866714", "0.5854717", "0.5853718", "0.5853718", "0.58527565", "0.5827642", "0.582386", "0.5821444", "0.5813794", "0.5808497", "0.5808497", "0.5808497", "0.5808497", "0.5808497", "0.57463646", "0.5734218", "0.57192767", "0.57165843", "0.56939906", "0.56908506", "0.56759953", "0.5660074", "0.56565213", "0.56565213", "0.56565213", "0.56564045", "0.5642814", "0.5641746", "0.5641746", "0.5635146", "0.56278634", "0.5615006", "0.5572001", "0.5560832", "0.55586696", "0.5549522", "0.553667", "0.553667", "0.553667", "0.553667", "0.553667", "0.553667", "0.553667", "0.553667", "0.553667", "0.553667", "0.553667", "0.553667", "0.55233425", "0.5514486" ]
0.9022491
0
get a CodeUnit iterator that will iterate over the entire address space.
public CodeUnitIterator getCodeUnits(boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "public Iterator<? extends ICodeBase> appCodeBaseIterator();", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "public Iterator<? extends ICodeBase> auxCodeBaseIterator();", "public InstructionIterator getInstructions(Address addr, boolean forward);", "public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public Iterator iterator()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n try\r\n {\r\n return new CompositeIterator(new Iterator[] { \r\n spaceMgr.makeComponentSpaceIterator(),\r\n spaceMgr.makeHistorySpaceIterator() });\r\n }\r\n catch (RuntimeException e)\r\n {\r\n e.printStackTrace();\r\n throw e;\r\n }\r\n }", "public CodeUnit getCodeUnitAt(Address addr);", "public CodeUnit getCodeUnitContaining(Address addr);", "public Iterator<VirtualMachine> iterator() {\n return mapped_vms.iterator();\n }", "public Iterator<Coord> iterator() {\n\t\treturn new CoordListIterator(array, index);\n\t}", "public CodeUnitIterator getCodeUnitIterator(String property, boolean forward);", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "public Iterator<Range> iterator(ValueMapper mapper) {\n return new Trie2Iterator(mapper);\n }", "public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }", "@Override // java.util.Collection, java.lang.Iterable\n public final Iterator<C0472aH> iterator() {\n return new C0220Kr(this.A00);\n }", "public abstract ucar.array.RangeIterator getRangeIterator();", "@Override public java.util.Iterator<Function> iterator() {return new JavaIterator(begin(), end()); }", "public UnmodifiableIterator<Entry<K, V>> iterator() {\n return mo8403b().iterator();\n }", "@Override\n\tpublic Iterator<Statement> iterator() {\n\t\treturn iterator(null, null, null);\n\t}", "@VTID(14)\n java.util.Iterator<Com4jObject> iterator();", "public Iterator getIterator() {\n\t\t\n\t\treturn blocks.iterator();\n\t\t\n\t}", "@VTID(11)\r\n java.util.Iterator<Com4jObject> iterator();", "@Override\n public Iterator<Location> iterator() {\n return new NeighborhoodIterator(this, new Location(0, 0));\n }", "public Iterator<T> iterator() {\n\t\treturn new ReferentIterator();\n\t}", "@VisibleForTesting\n public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {\n return map.entrySet().iterator();\n }", "abstract public Iterator<BlockReportReplica> iterator();", "public UnmodifiableIterator<K> iterator() {\n return mo8403b().iterator();\n }", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "public Iterator<Hex> iterator() {\n return new Iterator<Hex>() {\n private int g = 0;\n private int h = 0;\n @Override\n public boolean hasNext() {\n return g < hexWidth && h < hexHeight;\n }\n @Override\n public Hex next() {\n Hex result = hexes[g][h];\n if (++g == hexWidth) {\n g = 0;\n h++;\n }\n return result;\n }\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }", "@DISPID(-4) //= 0xfffffffc. The runtime will prefer the VTID if present\r\n @VTID(22)\r\n java.util.Iterator<Com4jObject> iterator();", "@Override\n public OctreeIterator iterator()\n {\n Stack<CelestialBody> stack = new Stack<>();\n stack = this.root.iterate(stack);\n\n OctreeIterator iterator = new OctreeIterator(stack);\n return iterator;\n }", "@Override\n public Range next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n if (nextStart >= limitCP) {\n // Switch over from iterating normal code point values to\n // doing the alternate lead-surrogate values.\n doingCodePoints = false;\n nextStart = 0xd800;\n }\n int endOfRange = 0;\n int val = 0;\n int mappedVal = 0;\n\n if (doingCodePoints) {\n // Iteration over code point values.\n val = get(nextStart);\n mappedVal = mapper.map(val);\n endOfRange = rangeEnd(nextStart, limitCP, val);\n // Loop once for each range in the Trie2 with the same raw (unmapped) value.\n // Loop continues so long as the mapped values are the same.\n for (;;) {\n if (endOfRange >= limitCP-1) {\n break;\n }\n val = get(endOfRange+1);\n if (mapper.map(val) != mappedVal) {\n break;\n }\n endOfRange = rangeEnd(endOfRange+1, limitCP, val);\n }\n } else {\n // Iteration over the alternate lead surrogate values.\n val = getFromU16SingleLead((char)nextStart);\n mappedVal = mapper.map(val);\n endOfRange = rangeEndLS((char)nextStart);\n // Loop once for each range in the Trie2 with the same raw (unmapped) value.\n // Loop continues so long as the mapped values are the same.\n for (;;) {\n if (endOfRange >= 0xdbff) {\n break;\n }\n val = getFromU16SingleLead((char)(endOfRange+1));\n if (mapper.map(val) != mappedVal) {\n break;\n }\n endOfRange = rangeEndLS((char)(endOfRange+1));\n }\n }\n returnValue.startCodePoint = nextStart;\n returnValue.endCodePoint = endOfRange;\n returnValue.value = mappedVal;\n returnValue.leadSurrogate = !doingCodePoints;\n nextStart = endOfRange+1;\n return returnValue;\n }", "public Iterator<Type> iterator();", "@Override\n public Iterator<Range> iterator() {\n return iterator(defaultValueMapper);\n }", "public Iterator<Item> iterator() {\n return new AIterator();\n }", "public static ListIterator iterator() {\r\n\t\treturn getIterator(Direction.class);\r\n\t}", "public Iterator<IBDLocus> runModelAndCoallateResults() {\n final ModelResults modelResults = runModel();\n final IBDState[] states = modelResults.viterbiStates;\n final List<IBDLocus> results = new ArrayList<>(observations.size());\n for (int i = 0; i < states.length; i++) {\n VariantContext vc = null;\n if (sites.size() > 0) {\n vc = sites.get(i);\n }\n results.add(new IBDLocus(seqs.get(i), starts.get(i), vc, states[i],\n modelResults.statePosteriors[i], parentalIndicators.get(i),\n observations.get(i).agreesWith(states[i]), observations.get(i)));\n }\n observations.clear();\n\n seqs.clear();\n starts.clear();\n sites.clear();\n parentalIndicators.clear();\n\n return results.iterator();\n }", "public Iterator<T> iterator() {\r\n return byGenerations();\r\n }", "public ASTNodeIterator iterator()\n {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = expression;\n return I;\n }", "public T iterator();", "public SList_Iterator<T> iterator() {\n return new iterator();\n }", "@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }", "public Iterator<E> iterator() {\n\t\treturn new Itr();\n\t}", "public java.util.Iterator<Entry> iterator(){\n\t\treturn new ContentIterator();\n\t}", "@Override\n public Iterator<Integer> iterator() {\n return new IteratorImplementation();\n }", "private static void iterator() {\n\t\t\r\n\t}", "@DISPID(-4)\n @PropGet\n java.util.Iterator<Com4jObject> iterator();", "public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}", "@Override public debug_compile_units_iterator clone() { return new debug_compile_units_iterator(this); }", "public interface\n BBlockNodeIterator\n{\n\n /** next\n * Get the next node in this basic block.\n * By repetitively invoking \"next\", all nodes in the basic block\n * are traversed.\n **/\n public IR\n next();\n\n /** hasNext\n * @return true if there is next node remaining in the basic block.\n **/\n public boolean\n hasNext();\n\n//##62 public IR // Get the node that is an instance of Stmt\n//##62 nextStmt(); //##60\n\n//##62 public boolean\n//##62 hasNextStmt();\n\n /** getNextExecutableNode\n * Get the node that refer/set data or change control flow directly.\n * The iterator skips such non-executable nodes as\n * labelNode, blockNode, listNode, stmtNode,\n * ifNode, forNode, whileNode, untilNode, switchNode,\n * progNode, subpDefNode, labelDefNode, infNode, subpNode,\n * typeNode, labeledStmtNode with non-null Stmt body, nullNode\n * and get executable statement body or expression\n * under the skipped node.\n * If a labeled statement has null statement body,\n * it is not skipped.\n **/\n public HIR\n getNextExecutableNode();\n\n}", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "public Iterator<Item> iterator() {\n return new Iterator<Item>() {\n public boolean hasNext() {\n return false;\n }\n\n public Item next() {\n return null;\n }\n };\n }", "public Iterator iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "public synchronized Iterator<E> iterator()\n {\n return iteratorUpAll();\n }", "@Override\n public Iterator<T> iterator() {\n return forwardIterator();\n }", "@Override\n\tpublic Iterator<StackType> iterator();", "public Iterator<E> iterator(){\r\n return new IteratorHelper();\r\n }", "@Override\n public Iterator<T> iterator() {\n return new CLITableIterator<T>(createNew(tables, cursor, rowIndex));\n }", "public Iterator<Item> iterator(){\n return new ArrayIterator();\n }", "@Override\n\tpublic Iterator<Item> iterator() {\n\t\treturn new StackIterator();\n\t}", "@Override\n public Iterator iterator() {\n\n Iterator<RadarContent> iterator = new Iterator<RadarContent>() {\n\n ProfileQueue pq = new ProfileQueue(arrProfiles);\n int iCursor;\n\n /*\n * Check for next available profile\n */\n @Override\n public boolean hasNext() {\n return !pq.isEmpty() && pq.arrProfiles[iCursor++] != null;\n }\n\n /**\n * Return the next profile and advance the cursor\n */\n @Override\n public RadarContent next() {\n RadarContent p = pq.arrProfiles[iCursor];\n iCursor++;\n return p;\n }\n };\n\n return iterator;\n\n }", "public Iterator<Space> iterator() {\n return spaces.iterator();\n }", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<Item> iterator(){\n return new Iterator<Item>(); //Iterator interface implementation instance(has all Iterator methods)\n }", "public abstract Iterator<C17883a<E>> mo45843b();", "public interface Listing {\n\n\t/**\n\t * The name of the default tree in the display.\n\t * \n\t * @see #removeTree(String)\n\t */\n\tpublic static final String DEFAULT_TREE_NAME = \"Program Tree\";\n\n\t/**\n\t * get the code unit that starts at the given address.\n\t *\n\t * @param addr the address to look for a codeUnit.\n\t * @return the codeUnit that begins at the given address\n\t */\n\tpublic CodeUnit getCodeUnitAt(Address addr);\n\n\t/**\n\t * get the code unit that contains the given address.\n\t *\n\t * @param addr the address to look for a codeUnit.\n\t * @return the codeUnit that contains the given address\n\t */\n\tpublic CodeUnit getCodeUnitContaining(Address addr);\n\n\t/**\n\t * get the next code unit that starts an an address that is greater than the\n\t * given address. The search will include instructions, defined data, and\n\t * undefined data.\n\t *\n\t * @param addr the address from which to search forward.\n\t * @return the next CodeUnit found while searching forward from addr or null\n\t * if none found.\n\t */\n\tpublic CodeUnit getCodeUnitAfter(Address addr);\n\n\t/**\n\t * get the next code unit that starts at an address that is less than the\n\t * given address. The search will include instructions, defined data, and\n\t * undefined data.\n\t *\n\t * @param addr the address from which to search backwards.\n\t * @return The first codeUnit found while searching backwards from addr or\n\t * null if none found.\n\t */\n\tpublic CodeUnit getCodeUnitBefore(Address addr);\n\n\t/**\n\t * Get an iterator that contains all code units in the program which have\n\t * the specified property type defined. Standard property types are defined\n\t * in the CodeUnit class. The property types are: EOL_COMMENT, PRE_COMMENT,\n\t * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE, VALUE_REFERENCE.\n\t * Property types can also be user defined.\n\t *\n\t * @param property the name of the property type.\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * start address that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, boolean forward);\n\n\t/**\n\t * Get an iterator that contains the code units which have the specified\n\t * property type defined. Only code units at an address greater than or\n\t * equal to the specified start address will be returned by the iterator. If\n\t * the start address is null then check the entire program. Standard\n\t * property types are defined in the CodeUnit class. The property types are:\n\t * EOL_COMMENT, PRE_COMMENT, POST_COMMENT, USER_REFERENCE,\n\t * MNEMONIC_REFERENCE, VALUE_REFERENCE. Property types can also be user\n\t * defined.\n\t *\n\t * @param property the name of the property type. (EOL_COMMENT, PRE_COMMENT,\n\t * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE,\n\t * VALUE_REFERENCE)\n\t * @param addr the start address\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * start address that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator that contains the code units which have the specified\n\t * property type defined. Only code units starting within the address set\n\t * will be returned by the iterator. If the address set is null then check\n\t * the entire program. Standard property types are defined in the CodeUnit\n\t * class.\n\t *\n\t * @param property the name of the property type.\n\t * @param addrSet the address set\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * address set that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);\n\n\t/**\n\t * Get a forward code unit iterator over code units that have the specified\n\t * comment type.\n\t * \n\t * @param commentType type defined in CodeUnit\n\t * @param addrSet address set\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * address set that have the specified comment type defined\n\t */\n\tpublic CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);\n\n\t/**\n\t * Get a forward iterator over addresses that have the specified comment\n\t * type.\n\t * \n\t * @param commentType type defined in CodeUnit\n\t * @param addrSet address set\n\t * @param forward true to iterator from lowest address to highest, false\n\t * highest to lowest\n\t * @return an AddressIterator that returns all addresses from the indicated\n\t * address set that have the specified comment type defined\n\t */\n\tpublic AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);\n\n\t/**\n\t * Get a forward iterator over addresses that have any type of comment.\n\t * \n\t * @param addrSet address set\n\t * @param forward true to iterator from lowest address to highest, false\n\t * highest to lowest\n\t * @return an AddressIterator that returns all addresses from the indicated\n\t * address set that have any type of comment.\n\t */\n\tpublic AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * Get the comment for the given type at the specified address.\n\t *\n\t * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT,\n\t * PLATE_COMMENT, or REPEATABLE_COMMENT\n\t * @param address the address of the comment.\n\t * @return the comment string of the appropriate type or null if no comment\n\t * of that type exists for this code unit\n\t * @throws IllegalArgumentException if type is not one of the types of\n\t * comments supported\n\t */\n\tpublic String getComment(int commentType, Address address);\n\n\t/**\n\t * Set the comment for the given comment type at the specified address.\n\t *\n\t * @param address the address of the comment.\n\t * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT,\n\t * PLATE_COMMENT, or REPEATABLE_COMMENT\n\t * @param comment comment to set at the address\n\t * @throws IllegalArgumentException if type is not one of the types of\n\t * comments supported\n\t */\n\tpublic void setComment(Address address, int commentType, String comment);\n\n\t/**\n\t * get a CodeUnit iterator that will iterate over the entire address space.\n\t * \n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator in forward direction\n\t */\n\tpublic CodeUnitIterator getCodeUnits(boolean forward);\n\n\t/**\n\t * Returns an iterator of the code units in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first code unit that would be returned by an initial call\n\t * to the <code>next</code> method. An initial call to the <code>previous</code>\n\t * method would return the code unit with an address less than the specified\n\t * address.\n\t * <p>\n\t *\n\t * @param addr the start address of the iterator.\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator positioned just before addr.\n\t */\n\tpublic CodeUnitIterator getCodeUnits(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only code units whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the AddressRangeSet to iterate over (required).\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that is restricted to the give\n\t * AddressRangeSet.\n\t */\n\tpublic CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Instruction that starts at the given address. If no Instruction\n\t * has been defined to start at that address, return null.\n\t *\n\t * @param addr the address to check for the start of an instruction\n\t * @return the Instruction object that starts at addr; or null if no\n\t * Instructions starts at addr.\n\t */\n\tpublic Instruction getInstructionAt(Address addr);\n\n\t/**\n\t * get the Instruction that contains the given address. If an Instruction is\n\t * defined that contains that address, it will be returned. Otherwise, null\n\t * will be returned.\n\t *\n\t * @param addr the address to check for containment in an Instruction.\n\t * @return the Instruction object that contains addr; or null if no\n\t * Instructions contain addr.\n\t */\n\tpublic Instruction getInstructionContaining(Address addr);\n\n\t/**\n\t * get the closest Instruction that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr The address at which to begin the forward search.\n\t * @return the next Instruction whose starting address is greater than addr.\n\t */\n\tpublic Instruction getInstructionAfter(Address addr);\n\n\t/**\n\t * get the closest Instruction that starts at an address that is less than\n\t * the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest Instruction whose starting address is less than addr.\n\t */\n\tpublic Instruction getInstructionBefore(Address addr);\n\n\t/**\n\t * get an Instruction iterator that will iterate over the entire address\n\t * space.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return an InstructionIterator that iterates over all instructions in the\n\t * program.\n\t */\n\tpublic InstructionIterator getInstructions(boolean forward);\n\n\t/**\n\t * Returns an iterator of the instructions in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first instruction that would be returned by an initial call\n\t * to the <code>next</code> method. An initial call to the <code>previous</code>\n\t * method would return the instruction with an address less than the\n\t * specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return an InstructionIterator that iterates over all Instruction objects\n\t * in the given address range set.\n\t */\n\tpublic InstructionIterator getInstructions(Address addr, boolean forward);\n\n\t/**\n\t * Get an Instruction iterator over the address range(s). Only instructions\n\t * whose start addresses are contained in the given address set will be\n\t * returned by the iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * objects in the given address range set.\n\t */\n\tpublic InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (Defined or Undefined) that starts at the given address.\n\t *\n\t * @param addr the address to check for a Data object.\n\t * @return the Data object that starts at addr; or null if no Data\n\t * objects(defined or undefined) start at addr.\n\t */\n\tpublic Data getDataAt(Address addr);\n\n\t/**\n\t * Gets the data object that is at or contains the given address or null if\n\t * the address in not in memory or is in an instruction.\n\t *\n\t * @param addr the address for which to find its containing data element.\n\t * @return the Data object containing the given address or null if there is\n\t * no data that contains the address.\n\t */\n\tpublic Data getDataContaining(Address addr);\n\n\t/**\n\t * get the closest Data object that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @return the next Data object whose starting address is greater than addr.\n\t */\n\tpublic Data getDataAfter(Address addr);\n\n\t/**\n\t * get the closest Data object that starts at an address that is less than\n\t * the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest Data object whose starting address is less than addr.\n\t */\n\tpublic Data getDataBefore(Address addr);\n\n\t/**\n\t * get a Data iterator that will iterate over the entire address space;\n\t * returning both defined and undefined Data objects.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * object in the program.\n\t */\n\tpublic DataIterator getData(boolean forward);\n\n\t/**\n\t * Returns an iterator of the data in this listing (in proper sequence),\n\t * starting at the specified address. The specified address indicates the\n\t * first Data that would be returned by an initial call to the <code>next</code>\n\t * method. An initial call to the <code>previous</code> method would return the\n\t * Data with an address less than the specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all Data objects in the given\n\t * address range set.\n\t */\n\tpublic DataIterator getData(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only data whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * objects in the given address range set.\n\t */\n\tpublic DataIterator getData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (defined) object that starts at the given address. If no\n\t * Data object is defined at that address, then return null.\n\t *\n\t * @param addr The address to check for defined Data.\n\t * @return a Data object that starts at addr, or null if no Data object has\n\t * been defined to start at addr.\n\t */\n\tpublic Data getDefinedDataAt(Address addr);\n\n\t/**\n\t * get the Data object that starts at the given address. If no Data objects\n\t * have been defined that contain that address, then return null.\n\t *\n\t * @param addr the address to check for containment in a defined Data\n\t * object.\n\t * @return the defined Data object containing addr.\n\t */\n\tpublic Data getDefinedDataContaining(Address addr);\n\n\t/**\n\t *\n\t * get the defined Data object that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @return the next defined Data object whose starting address is greater\n\t * than addr.\n\t */\n\tpublic Data getDefinedDataAfter(Address addr);\n\n\t/**\n\t * get the closest defined Data object that starts at an address that is\n\t * less than the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest defined Data object whose starting address is less\n\t * than addr.\n\t */\n\tpublic Data getDefinedDataBefore(Address addr);\n\n\t/**\n\t * get a Data iterator that will iterate over the entire address space;\n\t * returning only defined Data objects.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * program.\n\t */\n\tpublic DataIterator getDefinedData(boolean forward);\n\n\t/**\n\t * Returns an iterator of the defined data in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first defined Data that would be returned by an initial\n\t * call to the <code>next</code> method. An initial call to the\n\t * <code>previous</code> method would return the defined Data with an address\n\t * less than the specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * given address range set.\n\t */\n\tpublic DataIterator getDefinedData(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only defined data whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * given address range set.\n\t */\n\tpublic DataIterator getDefinedData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (undefined) object that starts at the given address.\n\t *\n\t * @param addr The address to check for undefined data.\n\t * @return a default DataObject if bytes exist at addr and nothing has been\n\t * defined to exist there. Otherwise returns null.\n\t */\n\tpublic Data getUndefinedDataAt(Address addr);\n\n\t/**\n\t * Get the undefined Data object that starts at an address that is greater\n\t * than the given address. This operation can be slow for large programs so\n\t * a TaskMonitor is required.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t * @return the next undefined Data object whose starting address is greater\n\t * than addr.\n\t */\n\tpublic Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);\n\n\t/**\n\t * Get the undefined Data object that falls within the set. This operation\n\t * can be slow for large programs so a TaskMonitor is required.\n\t *\n\t * @param set the addressSet at which to find the first undefined address.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t *\n\t * @return the next undefined Data object whose starting address falls\n\t * within the addresSet.\n\t */\n\tpublic Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);\n\n\t/**\n\t * get the closest undefined Data object that starts at an address that is\n\t * less than the given address. This operation can be slow for large\n\t * programs so a TaskMonitor is required.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t * @return the closest undefined Data object whose starting address is less\n\t * than addr.\n\t */\n\tpublic Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);\n\n\t/**\n\t * Get the address set which corresponds to all undefined code units within\n\t * the specified set of address.\n\t *\n\t * @param set set of addresses to search\n\t * @param initializedMemoryOnly if true set will be constrained to\n\t * initialized memory areas, if false set will be constrained to\n\t * all defined memory blocks.\n\t * @param monitor task monitor\n\t * @return address set corresponding to undefined code units\n\t * @throws CancelledException if monitor cancelled\n\t */\n\tpublic AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly,\n\t\t\tTaskMonitor monitor) throws CancelledException;\n\n\t/**\n\t * Returns the next instruction or defined data after the given address;\n\t *\n\t * @param addr the address at which to begin the search\n\t * @return the next instruction or defined data at an address higher than\n\t * the given address.\n\t */\n\tpublic CodeUnit getDefinedCodeUnitAfter(Address addr);\n\n\t/**\n\t * Returns the closest instruction or defined data that starts before the\n\t * given address.\n\t *\n\t * @param addr the address at which to begin the search\n\t * @return the closest instruction or defined data at an address below the\n\t * given address.\n\t */\n\tpublic CodeUnit getDefinedCodeUnitBefore(Address addr);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) in the program.\n\t *\n\t * @param forward true means get iterator that starts at the minimum address\n\t * and iterates forward. Otherwise it starts at the maximum\n\t * address and iterates backwards.\n\t * @return an iterator over all the composite data objects.\n\t */\n\tpublic DataIterator getCompositeData(boolean forward);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) in the program at or after the given Address.\n\t *\n\t * @param start start of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return an iterator over all the composite data objects starting with the\n\t * given address.\n\t */\n\tpublic DataIterator getCompositeData(Address start, boolean forward);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) within the specified address set in the program.\n\t *\n\t * @param addrSet the address set\n\t * @param forward true means get iterator in forward direction\n\t * @return an iterator over all the composite data objects in the given\n\t * address set.\n\t */\n\tpublic DataIterator getCompositeData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * Returns an iterator over all user defined property names.\n\t *\n\t * @return an iterator over all user defined property names.\n\t */\n\tpublic Iterator<String> getUserDefinedProperties();\n\n\t/**\n\t * Removes the entire property from the program\n\t *\n\t * @param propertyName the name of the property to remove.\n\t */\n\tpublic void removeUserDefinedProperty(String propertyName);\n\n\t/**\n\t * Returns the PropertyMap associated with the given name\n\t *\n\t * @param propertyName the property name\n\t * @return PropertyMap the propertyMap object.\n\t */\n\tpublic PropertyMap getPropertyMap(String propertyName);\n\n\t/**\n\t * Creates a new Instruction object at the given address. The specified\n\t * context is only used to create the associated prototype. It is critical\n\t * that the context be written immediately after creation of the instruction\n\t * and must be done with a single set operation on the program context. Once\n\t * a set context is done on the instruction address, any subsequent context\n\t * changes will result in a <code>ContextChangeException</code>\n\t *\n\t * @param addr the address at which to create an instruction\n\t * @param prototype the InstructionPrototype that describes the type of instruction to create.\n\t * @param memBuf buffer that provides the bytes that make up the instruction.\n\t * @param context the processor context at this location.\n\t * @param length instruction byte-length (must be in the range 0..prototype.getLength()).\n\t * If smaller than the prototype length it must have a value no greater than 7, otherwise\n\t * an error will be thrown. A value of 0 or greater-than-or-equal the prototype length\n\t * will be ignored and not impose and override length. The length value must be a multiple \n\t * of the {@link Language#getInstructionAlignment() instruction alignment} .\n\t * @return the newly created instruction. \n\t * @throws CodeUnitInsertionException thrown if the new Instruction would overlap and \n\t * existing {@link CodeUnit} or the specified {@code length} is unsupported.\n\t * @throws IllegalArgumentException if a negative {@code length} is specified.\n\t */\n\tpublic Instruction createInstruction(Address addr, InstructionPrototype prototype,\n\t\t\tMemBuffer memBuf, ProcessorContextView context, int length)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a complete set of instructions. A preliminary pass will be made\n\t * checking for code unit conflicts which will be marked within the\n\t * instructionSet causing dependent blocks to get pruned.\n\t * \n\t * @param instructionSet the set of instructions to be added. All code unit\n\t * conflicts will be marked within the instructionSet and\n\t * associated blocks.\n\t * @param overwrite if true, overwrites existing code units.\n\t * @throws CodeUnitInsertionException if the instruction set is incompatible\n\t * with the program memory\n\t * @return the set of addresses over which instructions were actually added\n\t * to the program. This may differ from the InstructionSet address\n\t * set if conflict errors occurred. Such conflict errors will be\n\t * recorded within the InstructionSet and its InstructionBlocks.\n\t */\n\tpublic AddressSetView addInstructions(InstructionSet instructionSet, boolean overwrite)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a new defined Data object of a given length at the given address.\n\t * This ignores the bytes that are present\n\t *\n\t * @param addr the address at which to create a new Data object.\n\t * @param dataType the Data Type that describes the type of Data object to\n\t * create.\n\t * @param length the length of the datatype.\n\t * @return newly created data unit\n\t * @exception CodeUnitInsertionException thrown if the new Instruction would\n\t * overlap and existing Instruction or defined data.\n\t */\n\tpublic Data createData(Address addr, DataType dataType, int length)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a new defined Data object at the given address. This ignores the\n\t * bytes that are present\n\t *\n\t * @param addr the address at which to create a new Data object.\n\t * @param dataType the Data Type that describes the type of Data object to\n\t * create.\n\t * @return newly created data unit\n\t * @exception CodeUnitInsertionException thrown if the new Instruction would\n\t * overlap and existing Instruction or defined data.\n\t */\n\tpublic Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;\n\n\t/**\n\t * Clears any code units in the given range returning everything to \"db\"s,\n\t * and removing any references in the affected area. Note that the module\n\t * and fragment structure is unaffected. If part of a code unit is contained\n\t * in the given address range then the whole code unit will be cleared.\n\t *\n\t * @param startAddr the start address of the area to be cleared.\n\t * @param endAddr the end address of the area to be cleared.\n\t * @param clearContext clear context register values if true\n\t */\n\tpublic void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext);\n\n\t/**\n\t * Clears any code units in the given range returning everything to \"db\"s,\n\t * and removing any references in the affected area. Note that the module\n\t * and fragment structure is unaffected. If part of a code unit is contained\n\t * in the given address range then the whole code unit will be cleared.\n\t *\n\t * @param startAddr the start address of the area to be cleared.\n\t * @param endAddr the end address of the area to be cleared.\n\t * @param clearContext clear context register values if true\n\t * @param monitor monitor that can be used to cancel the clear operation\n\t * @throws CancelledException if the operation was cancelled.\n\t */\n\tpublic void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext,\n\t\t\tTaskMonitor monitor) throws CancelledException;\n\n\t/**\n\t * Checks if the given ranges consists entirely of undefined data.\n\t * \n\t * @param start The start address of the range to check.\n\t * @param end The end address of the range to check.\n\t * @return boolean true if the given range is in memory and has no\n\t * instructions or defined data.\n\t */\n\tpublic boolean isUndefined(Address start, Address end);\n\n\t/**\n\t * Clears the comments in the given range.\n\t * \n\t * @param startAddr the start address of the range to be cleared\n\t * @param endAddr the end address of the range to be cleared\n\t */\n\tpublic void clearComments(Address startAddr, Address endAddr);\n\n\t/**\n\t * Clears the properties in the given range.\n\t * \n\t * @param startAddr the start address of the range to be cleared\n\t * @param endAddr the end address of the range to be cleared\n\t * @param monitor task monitor for cancelling operation.\n\t * @throws CancelledException if the operation was cancelled.\n\t */\n\tpublic void clearProperties(Address startAddr, Address endAddr, TaskMonitor monitor)\n\t\t\tthrows CancelledException;\n\n\t/**\n\t * Removes all CodeUnits, comments, properties, and references from the\n\t * listing.\n\t * \n\t * @param clearContext if true, also clear any instruction context that has\n\t * been laid down from previous disassembly.\n\t * @param monitor used for tracking progress and cancelling the clear\n\t * operation.\n\t */\n\tpublic void clearAll(boolean clearContext, TaskMonitor monitor);\n\n\t/**\n\t * Returns the fragment containing the given address.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param addr the address that is contained within a fragment.\n\t *\n\t * @return will return null if the address is not in the program.\n\t */\n\tpublic ProgramFragment getFragment(String treeName, Address addr);\n\n\t/**\n\t * Returns the module with the given name.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param name the name of the module to find.\n\t *\n\t * @return will return null if there is no module with the given name.\n\t */\n\tpublic ProgramModule getModule(String treeName, String name);\n\n\t/**\n\t * Returns the fragment with the given name.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param name the name of the fragment to find.\n\t *\n\t * @return will return null if there is no fragment with the given name.\n\t */\n\tpublic ProgramFragment getFragment(String treeName, String name);\n\n\t/**\n\t * Create a new tree that will be identified by the given name. By default,\n\t * the new root module is populated with fragments based on memory blocks.\n\t * Note that the root module's name is not the same as its tree name. The\n\t * root module name defaults to the name of the program.\n\t * \n\t * @param treeName name of the tree to search\n\t * @return root module\n\t * @throws DuplicateNameException if a tree with the given name already\n\t * exists\n\t */\n\tpublic ProgramModule createRootModule(String treeName) throws DuplicateNameException;\n\n\t/**\n\t * Gets the root module for a tree in this listing.\n\t * \n\t * @param treeName name of tree\n\t *\n\t * @return the root module for the listing; returns null if there is no tree\n\t * rooted at a module with the given name.\n\t */\n\tpublic ProgramModule getRootModule(String treeName);\n\n\t/**\n\t * Returns the root module of the program tree with the given name;\n\t * \n\t * @param treeID id of the program tree\n\t * @return the root module of the specified tree.\n\t */\n\tpublic ProgramModule getRootModule(long treeID);\n\n\t/**\n\t * Returns the root module for the default program tree. This would be the\n\t * program tree that has existed the longest.\n\t *\n\t * @return the root module for the oldest existing program tree.\n\t */\n\tpublic ProgramModule getDefaultRootModule();\n\n\t/**\n\t * Get the names of all the trees defined in this listing.\n\t *\n\t * @return the names of all program trees defined in the program.\n\t */\n\tpublic String[] getTreeNames();\n\n\t/**\n\t * Remove the tree rooted at the given name.\n\t * \n\t * @param treeName the name of the tree to remove.\n\t * @return true if the tree was removed; return false if this is the last\n\t * tree for the program; cannot delete the last tree.\n\t */\n\tpublic boolean removeTree(String treeName);\n\n\t/**\n\t * Rename the tree. This method does not change the root module's name only\n\t * the identifier for the tree.\n\t * \n\t * @param oldName old name of the tree\n\t * @param newName new name of the tree.\n\t * @throws DuplicateNameException if newName already exists for a root\n\t * module\n\t */\n\tpublic void renameTree(String oldName, String newName) throws DuplicateNameException;\n\n\t/**\n\t * gets the total number of CodeUnits (Instructions, defined Data, and\n\t * undefined Data)\n\t *\n\t * @return the total number of CodeUnits in the listing.\n\t */\n\tpublic long getNumCodeUnits();\n\n\t/**\n\t * gets the total number of defined Data objects in the listing.\n\t *\n\t * @return the total number of defined Data objects in the listing.\n\t */\n\tpublic long getNumDefinedData();\n\n\t/**\n\t * gets the total number of Instructions in the listing.\n\t *\n\t * @return number of Instructions\n\t */\n\tpublic long getNumInstructions();\n\n\t/**\n\t * Get the data type manager for the program.\n\t * \n\t * @return the datatype manager for the program.\n\t */\n\tpublic DataTypeManager getDataTypeManager();\n\n\t/**\n\t * Create a function with an entry point and a body of addresses.\n\t * \n\t * @param name the name of the function to create\n\t * @param entryPoint the entry point for the function\n\t * @param body the address set that makes up the functions body\n\t * @param source the source of this function\n\t * @return the created function\n\t * @throws InvalidInputException if the name contains invalid characters\n\t * @throws OverlappingFunctionException if the given body overlaps with an\n\t * existing function.\n\t */\n\tpublic Function createFunction(String name, Address entryPoint, AddressSetView body,\n\t\t\tSourceType source) throws InvalidInputException, OverlappingFunctionException;\n\n\t/**\n\t * Create a function in the specified namespace with an entry point and a\n\t * body of addresses.\n\t * \n\t * @param name the name of the function to create\n\t * @param nameSpace the namespace in which to create the function\n\t * @param entryPoint the entry point for the function\n\t * @param body the address set that makes up the functions body\n\t * @param source the source of this function\n\t * @return the created function\n\t * @throws InvalidInputException if the name contains invalid characters\n\t * @throws OverlappingFunctionException if the given body overlaps with an\n\t * existing function.\n\t */\n\tpublic Function createFunction(String name, Namespace nameSpace, Address entryPoint,\n\t\t\tAddressSetView body, SourceType source)\n\t\t\tthrows InvalidInputException, OverlappingFunctionException;\n\n\t/**\n\t * Remove a function a given entry point.\n\t *\n\t * @param entryPoint entry point of function to be removed.\n\t */\n\tpublic void removeFunction(Address entryPoint);\n\n\t/**\n\t * Get a function with a given entry point.\n\t *\n\t * @param entryPoint entry point of the function\n\t * @return function at the entry point\n\t */\n\tpublic Function getFunctionAt(Address entryPoint);\n\n\t/**\n\t * Returns a list of all global functions with the given name.\n\t * \n\t * @param name the name of the functions to retrieve.\n\t * @return a list of all global functions with the given name.\n\t */\n\tpublic List<Function> getGlobalFunctions(String name);\n\n\t/**\n\t * Returns a list of all functions with the given name in the given\n\t * namespace.\n\t * \n\t * @param namespace the namespace to search for functions of the given name.\n\t * Can be null, in which case it will search the global\n\t * namespace.\n\t * @param name the name of the functions to retrieve.\n\t * @return a list of all global functions with the given name.\n\t */\n\tpublic List<Function> getFunctions(String namespace, String name);\n\n\t/**\n\t * Get a function containing an address.\n\t * \n\t * @param addr the address to search.\n\t * @return function containing this address, null otherwise\n\t */\n\tpublic Function getFunctionContaining(Address addr);\n\n\t/**\n\t * Get an iterator over all external functions\n\t * \n\t * @return an iterator over all currently defined external functions.\n\t */\n\tpublic FunctionIterator getExternalFunctions();\n\n\t/**\n\t * Get an iterator over all functions\n\t * \n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over all currently defined functions.\n\t */\n\tpublic FunctionIterator getFunctions(boolean forward);\n\n\t/**\n\t * Get an iterator over all functions starting at address\n\t * \n\t * @param start the address to start iterating at.\n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over functions\n\t */\n\tpublic FunctionIterator getFunctions(Address start, boolean forward);\n\n\t/**\n\t * Get an iterator over all functions with entry points in the address set.\n\t * \n\t * @param asv the set of addresses to iterator function entry points over.\n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over functions\n\t */\n\tpublic FunctionIterator getFunctions(AddressSetView asv, boolean forward);\n\n\t/**\n\t * Check if an address is contained in a function\n\t *\n\t * @param addr address to test\n\t * @return true if this address is in one or more functions\n\t */\n\tpublic boolean isInFunction(Address addr);\n\n\t/**\n\t * Get the comment history for comments at the given address.\n\t * \n\t * @param addr address for comments\n\t * @param commentType comment type defined in CodeUnit\n\t * @return array of comment history records\n\t */\n\tpublic CommentHistory[] getCommentHistory(Address addr, int commentType);\n\n}", "@Override\n public Iterator<Long> iterator() {\n Collection<Long> c = new ArrayList<>();\n synchronized (data) {\n for (int i=0; i<data.length; i++)\n c.add(get(i));\n }\n return c.iterator();\n }", "public ASTNodeIterator iterator() {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = name;\n return I;\n }", "@Test\n public void iterator() {\n }", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public final Iterable getChainingIterator() {\n\t// TODO: Implemente the chaining iterator and add generic type to Iterable. I suppose it is this class.\n\tthrow new IllegalAccessError(\"Not implemented yet\");\n }", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "public Iterator<BigInteger> iterator() {\n // return new FibIterator();\n return new Iterator<BigInteger>() {\n private BigInteger previous = BigInteger.valueOf(-1);\n private BigInteger current = BigInteger.ONE;\n private int index = 0;\n \n \n @Override\n //if either true will stop, evaluates upper < 0 first (short circuit)\n public boolean hasNext() {\n return upper < 0 || index < upper;\n }\n\n @Override\n //Creating a new value called next\n public BigInteger next() {\n BigInteger next = previous.add(current);\n previous = current;\n current = next;\n index++;\n return current;\n }\n \n };\n }", "Trie2Iterator(ValueMapper vm) {\n mapper = vm;\n nextStart = 0;\n limitCP = 0x110000;\n doLeadSurrogates = true;\n }", "public Iterator <T> iterator (){\n\t\t// create and return an instance of the inner class IteratorImpl\n\t\t\t\treturn new HashAVLTreeIterator();\n\t}", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "public Iterable<HashNode> iterator() {\n\t\treturn bucket;\n\t\t//for(HashTable<Character, Integer>.HashNode x : HT.iterator()) {\n\t}", "public final Iterator<CodeFragmentList> getDefinitionIterator()\n {\n IteratorList iterList = new IteratorList();\n\n Model.addDefinitionIterators(iterList, getTopLevelInitializerIterator());\n\n Iterator iter = statefulEventInitializers.iterator();\n while (iter.hasNext())\n {\n iterList.add(((Initializer)iter.next()).getDefinitionsIterator());\n }\n \n iterList.add(root.getSubDefinitionsIterator());\n \n if (getVersion() >= 4)\n \titerList.add(statesModel.getSubDefinitionIterators());\n\n return iterList.toIterator();\n }", "@Override\n\tpublic Iterator<Item> iterator() {\n\t\treturn new StackIter();\n\t}", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public ListIterator<T> listIterator() { return new DLLListIterator(); }", "public Iterator getIterator() {\n/* 87 */ return this.iterator;\n/* */ }", "public Iterator iterator () {\n return new MyIterator (first);\n }", "public abstract Iterator<E> createIterator();", "public Iterator<Entry> iterator() {\n return new ArrayIterator<Entry>(fEntries);\n }", "public zzeiu iterator() {\n return new zzeio(this);\n }" ]
[ "0.7440831", "0.68778795", "0.67575663", "0.6446953", "0.6354262", "0.61130023", "0.603673", "0.5841473", "0.554867", "0.54908687", "0.5448066", "0.544601", "0.54251224", "0.5416681", "0.5411857", "0.5408071", "0.53847957", "0.53129655", "0.52974325", "0.52743673", "0.52741563", "0.52567816", "0.5241874", "0.52293825", "0.5207046", "0.51947176", "0.51731455", "0.5168508", "0.51675314", "0.5158793", "0.51480466", "0.5132266", "0.51187706", "0.5115193", "0.50944954", "0.5087709", "0.50865936", "0.5077821", "0.5077594", "0.50630003", "0.5050063", "0.50318027", "0.5028313", "0.5012627", "0.50093234", "0.49968055", "0.49963024", "0.49807993", "0.49599364", "0.49586475", "0.4955511", "0.49518794", "0.49480256", "0.49475428", "0.49466357", "0.49384752", "0.49375597", "0.49335232", "0.4913524", "0.4913524", "0.4910342", "0.49060425", "0.48913375", "0.48874128", "0.48806083", "0.4878969", "0.48764148", "0.4866279", "0.4864893", "0.4864613", "0.48629987", "0.48629987", "0.48629987", "0.48629987", "0.48596886", "0.48554108", "0.48380253", "0.48373538", "0.48364446", "0.48280516", "0.48262602", "0.48241788", "0.48150954", "0.48124534", "0.48117152", "0.48081028", "0.4807755", "0.48058802", "0.48051727", "0.47992226", "0.47923854", "0.47923854", "0.47923854", "0.47923854", "0.47911078", "0.47885904", "0.4779858", "0.47748765", "0.47672734", "0.47664365" ]
0.5940844
7
Returns an iterator of the code units in this listing (in proper sequence), starting at the specified address. The specified address indicates the first code unit that would be returned by an initial call to the next method. An initial call to the previous method would return the code unit with an address less than the specified address.
public CodeUnitIterator getCodeUnits(Address addr, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public CodeUnit getCodeUnitBefore(Address addr);", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public CodeUnitIterator getCodeUnits(boolean forward);", "public InstructionIterator getInstructions(Address addr, boolean forward);", "public CodeUnitIterator getCodeUnitIterator(String property, boolean forward);", "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "public CodeUnit getCodeUnitAfter(Address addr);", "public CodeUnit getCodeUnitAt(Address addr);", "public interface Listing {\n\n\t/**\n\t * The name of the default tree in the display.\n\t * \n\t * @see #removeTree(String)\n\t */\n\tpublic static final String DEFAULT_TREE_NAME = \"Program Tree\";\n\n\t/**\n\t * get the code unit that starts at the given address.\n\t *\n\t * @param addr the address to look for a codeUnit.\n\t * @return the codeUnit that begins at the given address\n\t */\n\tpublic CodeUnit getCodeUnitAt(Address addr);\n\n\t/**\n\t * get the code unit that contains the given address.\n\t *\n\t * @param addr the address to look for a codeUnit.\n\t * @return the codeUnit that contains the given address\n\t */\n\tpublic CodeUnit getCodeUnitContaining(Address addr);\n\n\t/**\n\t * get the next code unit that starts an an address that is greater than the\n\t * given address. The search will include instructions, defined data, and\n\t * undefined data.\n\t *\n\t * @param addr the address from which to search forward.\n\t * @return the next CodeUnit found while searching forward from addr or null\n\t * if none found.\n\t */\n\tpublic CodeUnit getCodeUnitAfter(Address addr);\n\n\t/**\n\t * get the next code unit that starts at an address that is less than the\n\t * given address. The search will include instructions, defined data, and\n\t * undefined data.\n\t *\n\t * @param addr the address from which to search backwards.\n\t * @return The first codeUnit found while searching backwards from addr or\n\t * null if none found.\n\t */\n\tpublic CodeUnit getCodeUnitBefore(Address addr);\n\n\t/**\n\t * Get an iterator that contains all code units in the program which have\n\t * the specified property type defined. Standard property types are defined\n\t * in the CodeUnit class. The property types are: EOL_COMMENT, PRE_COMMENT,\n\t * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE, VALUE_REFERENCE.\n\t * Property types can also be user defined.\n\t *\n\t * @param property the name of the property type.\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * start address that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, boolean forward);\n\n\t/**\n\t * Get an iterator that contains the code units which have the specified\n\t * property type defined. Only code units at an address greater than or\n\t * equal to the specified start address will be returned by the iterator. If\n\t * the start address is null then check the entire program. Standard\n\t * property types are defined in the CodeUnit class. The property types are:\n\t * EOL_COMMENT, PRE_COMMENT, POST_COMMENT, USER_REFERENCE,\n\t * MNEMONIC_REFERENCE, VALUE_REFERENCE. Property types can also be user\n\t * defined.\n\t *\n\t * @param property the name of the property type. (EOL_COMMENT, PRE_COMMENT,\n\t * POST_COMMENT, USER_REFERENCE, MNEMONIC_REFERENCE,\n\t * VALUE_REFERENCE)\n\t * @param addr the start address\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * start address that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator that contains the code units which have the specified\n\t * property type defined. Only code units starting within the address set\n\t * will be returned by the iterator. If the address set is null then check\n\t * the entire program. Standard property types are defined in the CodeUnit\n\t * class.\n\t *\n\t * @param property the name of the property type.\n\t * @param addrSet the address set\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * address set that have the specified property type defined.\n\t */\n\tpublic CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);\n\n\t/**\n\t * Get a forward code unit iterator over code units that have the specified\n\t * comment type.\n\t * \n\t * @param commentType type defined in CodeUnit\n\t * @param addrSet address set\n\t * @return a CodeUnitIterator that returns all code units from the indicated\n\t * address set that have the specified comment type defined\n\t */\n\tpublic CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);\n\n\t/**\n\t * Get a forward iterator over addresses that have the specified comment\n\t * type.\n\t * \n\t * @param commentType type defined in CodeUnit\n\t * @param addrSet address set\n\t * @param forward true to iterator from lowest address to highest, false\n\t * highest to lowest\n\t * @return an AddressIterator that returns all addresses from the indicated\n\t * address set that have the specified comment type defined\n\t */\n\tpublic AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);\n\n\t/**\n\t * Get a forward iterator over addresses that have any type of comment.\n\t * \n\t * @param addrSet address set\n\t * @param forward true to iterator from lowest address to highest, false\n\t * highest to lowest\n\t * @return an AddressIterator that returns all addresses from the indicated\n\t * address set that have any type of comment.\n\t */\n\tpublic AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * Get the comment for the given type at the specified address.\n\t *\n\t * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT,\n\t * PLATE_COMMENT, or REPEATABLE_COMMENT\n\t * @param address the address of the comment.\n\t * @return the comment string of the appropriate type or null if no comment\n\t * of that type exists for this code unit\n\t * @throws IllegalArgumentException if type is not one of the types of\n\t * comments supported\n\t */\n\tpublic String getComment(int commentType, Address address);\n\n\t/**\n\t * Set the comment for the given comment type at the specified address.\n\t *\n\t * @param address the address of the comment.\n\t * @param commentType either EOL_COMMENT, PRE_COMMENT, POST_COMMENT,\n\t * PLATE_COMMENT, or REPEATABLE_COMMENT\n\t * @param comment comment to set at the address\n\t * @throws IllegalArgumentException if type is not one of the types of\n\t * comments supported\n\t */\n\tpublic void setComment(Address address, int commentType, String comment);\n\n\t/**\n\t * get a CodeUnit iterator that will iterate over the entire address space.\n\t * \n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator in forward direction\n\t */\n\tpublic CodeUnitIterator getCodeUnits(boolean forward);\n\n\t/**\n\t * Returns an iterator of the code units in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first code unit that would be returned by an initial call\n\t * to the <code>next</code> method. An initial call to the <code>previous</code>\n\t * method would return the code unit with an address less than the specified\n\t * address.\n\t * <p>\n\t *\n\t * @param addr the start address of the iterator.\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator positioned just before addr.\n\t */\n\tpublic CodeUnitIterator getCodeUnits(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only code units whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the AddressRangeSet to iterate over (required).\n\t * @param forward true means get iterator in forward direction\n\t * @return a CodeUnitIterator that is restricted to the give\n\t * AddressRangeSet.\n\t */\n\tpublic CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Instruction that starts at the given address. If no Instruction\n\t * has been defined to start at that address, return null.\n\t *\n\t * @param addr the address to check for the start of an instruction\n\t * @return the Instruction object that starts at addr; or null if no\n\t * Instructions starts at addr.\n\t */\n\tpublic Instruction getInstructionAt(Address addr);\n\n\t/**\n\t * get the Instruction that contains the given address. If an Instruction is\n\t * defined that contains that address, it will be returned. Otherwise, null\n\t * will be returned.\n\t *\n\t * @param addr the address to check for containment in an Instruction.\n\t * @return the Instruction object that contains addr; or null if no\n\t * Instructions contain addr.\n\t */\n\tpublic Instruction getInstructionContaining(Address addr);\n\n\t/**\n\t * get the closest Instruction that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr The address at which to begin the forward search.\n\t * @return the next Instruction whose starting address is greater than addr.\n\t */\n\tpublic Instruction getInstructionAfter(Address addr);\n\n\t/**\n\t * get the closest Instruction that starts at an address that is less than\n\t * the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest Instruction whose starting address is less than addr.\n\t */\n\tpublic Instruction getInstructionBefore(Address addr);\n\n\t/**\n\t * get an Instruction iterator that will iterate over the entire address\n\t * space.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return an InstructionIterator that iterates over all instructions in the\n\t * program.\n\t */\n\tpublic InstructionIterator getInstructions(boolean forward);\n\n\t/**\n\t * Returns an iterator of the instructions in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first instruction that would be returned by an initial call\n\t * to the <code>next</code> method. An initial call to the <code>previous</code>\n\t * method would return the instruction with an address less than the\n\t * specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return an InstructionIterator that iterates over all Instruction objects\n\t * in the given address range set.\n\t */\n\tpublic InstructionIterator getInstructions(Address addr, boolean forward);\n\n\t/**\n\t * Get an Instruction iterator over the address range(s). Only instructions\n\t * whose start addresses are contained in the given address set will be\n\t * returned by the iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * objects in the given address range set.\n\t */\n\tpublic InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (Defined or Undefined) that starts at the given address.\n\t *\n\t * @param addr the address to check for a Data object.\n\t * @return the Data object that starts at addr; or null if no Data\n\t * objects(defined or undefined) start at addr.\n\t */\n\tpublic Data getDataAt(Address addr);\n\n\t/**\n\t * Gets the data object that is at or contains the given address or null if\n\t * the address in not in memory or is in an instruction.\n\t *\n\t * @param addr the address for which to find its containing data element.\n\t * @return the Data object containing the given address or null if there is\n\t * no data that contains the address.\n\t */\n\tpublic Data getDataContaining(Address addr);\n\n\t/**\n\t * get the closest Data object that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @return the next Data object whose starting address is greater than addr.\n\t */\n\tpublic Data getDataAfter(Address addr);\n\n\t/**\n\t * get the closest Data object that starts at an address that is less than\n\t * the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest Data object whose starting address is less than addr.\n\t */\n\tpublic Data getDataBefore(Address addr);\n\n\t/**\n\t * get a Data iterator that will iterate over the entire address space;\n\t * returning both defined and undefined Data objects.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * object in the program.\n\t */\n\tpublic DataIterator getData(boolean forward);\n\n\t/**\n\t * Returns an iterator of the data in this listing (in proper sequence),\n\t * starting at the specified address. The specified address indicates the\n\t * first Data that would be returned by an initial call to the <code>next</code>\n\t * method. An initial call to the <code>previous</code> method would return the\n\t * Data with an address less than the specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all Data objects in the given\n\t * address range set.\n\t */\n\tpublic DataIterator getData(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only data whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined and undefined Data\n\t * objects in the given address range set.\n\t */\n\tpublic DataIterator getData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (defined) object that starts at the given address. If no\n\t * Data object is defined at that address, then return null.\n\t *\n\t * @param addr The address to check for defined Data.\n\t * @return a Data object that starts at addr, or null if no Data object has\n\t * been defined to start at addr.\n\t */\n\tpublic Data getDefinedDataAt(Address addr);\n\n\t/**\n\t * get the Data object that starts at the given address. If no Data objects\n\t * have been defined that contain that address, then return null.\n\t *\n\t * @param addr the address to check for containment in a defined Data\n\t * object.\n\t * @return the defined Data object containing addr.\n\t */\n\tpublic Data getDefinedDataContaining(Address addr);\n\n\t/**\n\t *\n\t * get the defined Data object that starts at an address that is greater\n\t * than the given address.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @return the next defined Data object whose starting address is greater\n\t * than addr.\n\t */\n\tpublic Data getDefinedDataAfter(Address addr);\n\n\t/**\n\t * get the closest defined Data object that starts at an address that is\n\t * less than the given address.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @return the closest defined Data object whose starting address is less\n\t * than addr.\n\t */\n\tpublic Data getDefinedDataBefore(Address addr);\n\n\t/**\n\t * get a Data iterator that will iterate over the entire address space;\n\t * returning only defined Data objects.\n\t *\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * program.\n\t */\n\tpublic DataIterator getDefinedData(boolean forward);\n\n\t/**\n\t * Returns an iterator of the defined data in this listing (in proper\n\t * sequence), starting at the specified address. The specified address\n\t * indicates the first defined Data that would be returned by an initial\n\t * call to the <code>next</code> method. An initial call to the\n\t * <code>previous</code> method would return the defined Data with an address\n\t * less than the specified address.\n\t * <p>\n\t *\n\t * @param addr the initial position of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * given address range set.\n\t */\n\tpublic DataIterator getDefinedData(Address addr, boolean forward);\n\n\t/**\n\t * Get an iterator over the address range(s). Only defined data whose start\n\t * addresses are contained in the given address set will be returned by the\n\t * iterator.\n\t *\n\t * @param addrSet the address range set to iterate over.\n\t * @param forward true means get iterator in forward direction\n\t * @return a DataIterator that iterates over all defined Data objects in the\n\t * given address range set.\n\t */\n\tpublic DataIterator getDefinedData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * get the Data (undefined) object that starts at the given address.\n\t *\n\t * @param addr The address to check for undefined data.\n\t * @return a default DataObject if bytes exist at addr and nothing has been\n\t * defined to exist there. Otherwise returns null.\n\t */\n\tpublic Data getUndefinedDataAt(Address addr);\n\n\t/**\n\t * Get the undefined Data object that starts at an address that is greater\n\t * than the given address. This operation can be slow for large programs so\n\t * a TaskMonitor is required.\n\t *\n\t * @param addr the address at which to begin the forward search.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t * @return the next undefined Data object whose starting address is greater\n\t * than addr.\n\t */\n\tpublic Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);\n\n\t/**\n\t * Get the undefined Data object that falls within the set. This operation\n\t * can be slow for large programs so a TaskMonitor is required.\n\t *\n\t * @param set the addressSet at which to find the first undefined address.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t *\n\t * @return the next undefined Data object whose starting address falls\n\t * within the addresSet.\n\t */\n\tpublic Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);\n\n\t/**\n\t * get the closest undefined Data object that starts at an address that is\n\t * less than the given address. This operation can be slow for large\n\t * programs so a TaskMonitor is required.\n\t *\n\t * @param addr The address at which to begin the backward search.\n\t * @param monitor a task monitor allowing this operation to be cancelled\n\t * @return the closest undefined Data object whose starting address is less\n\t * than addr.\n\t */\n\tpublic Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);\n\n\t/**\n\t * Get the address set which corresponds to all undefined code units within\n\t * the specified set of address.\n\t *\n\t * @param set set of addresses to search\n\t * @param initializedMemoryOnly if true set will be constrained to\n\t * initialized memory areas, if false set will be constrained to\n\t * all defined memory blocks.\n\t * @param monitor task monitor\n\t * @return address set corresponding to undefined code units\n\t * @throws CancelledException if monitor cancelled\n\t */\n\tpublic AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly,\n\t\t\tTaskMonitor monitor) throws CancelledException;\n\n\t/**\n\t * Returns the next instruction or defined data after the given address;\n\t *\n\t * @param addr the address at which to begin the search\n\t * @return the next instruction or defined data at an address higher than\n\t * the given address.\n\t */\n\tpublic CodeUnit getDefinedCodeUnitAfter(Address addr);\n\n\t/**\n\t * Returns the closest instruction or defined data that starts before the\n\t * given address.\n\t *\n\t * @param addr the address at which to begin the search\n\t * @return the closest instruction or defined data at an address below the\n\t * given address.\n\t */\n\tpublic CodeUnit getDefinedCodeUnitBefore(Address addr);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) in the program.\n\t *\n\t * @param forward true means get iterator that starts at the minimum address\n\t * and iterates forward. Otherwise it starts at the maximum\n\t * address and iterates backwards.\n\t * @return an iterator over all the composite data objects.\n\t */\n\tpublic DataIterator getCompositeData(boolean forward);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) in the program at or after the given Address.\n\t *\n\t * @param start start of the iterator\n\t * @param forward true means get iterator in forward direction\n\t * @return an iterator over all the composite data objects starting with the\n\t * given address.\n\t */\n\tpublic DataIterator getCompositeData(Address start, boolean forward);\n\n\t/**\n\t * Get an iterator over all the composite data objects (Arrays, Structures,\n\t * and Union) within the specified address set in the program.\n\t *\n\t * @param addrSet the address set\n\t * @param forward true means get iterator in forward direction\n\t * @return an iterator over all the composite data objects in the given\n\t * address set.\n\t */\n\tpublic DataIterator getCompositeData(AddressSetView addrSet, boolean forward);\n\n\t/**\n\t * Returns an iterator over all user defined property names.\n\t *\n\t * @return an iterator over all user defined property names.\n\t */\n\tpublic Iterator<String> getUserDefinedProperties();\n\n\t/**\n\t * Removes the entire property from the program\n\t *\n\t * @param propertyName the name of the property to remove.\n\t */\n\tpublic void removeUserDefinedProperty(String propertyName);\n\n\t/**\n\t * Returns the PropertyMap associated with the given name\n\t *\n\t * @param propertyName the property name\n\t * @return PropertyMap the propertyMap object.\n\t */\n\tpublic PropertyMap getPropertyMap(String propertyName);\n\n\t/**\n\t * Creates a new Instruction object at the given address. The specified\n\t * context is only used to create the associated prototype. It is critical\n\t * that the context be written immediately after creation of the instruction\n\t * and must be done with a single set operation on the program context. Once\n\t * a set context is done on the instruction address, any subsequent context\n\t * changes will result in a <code>ContextChangeException</code>\n\t *\n\t * @param addr the address at which to create an instruction\n\t * @param prototype the InstructionPrototype that describes the type of instruction to create.\n\t * @param memBuf buffer that provides the bytes that make up the instruction.\n\t * @param context the processor context at this location.\n\t * @param length instruction byte-length (must be in the range 0..prototype.getLength()).\n\t * If smaller than the prototype length it must have a value no greater than 7, otherwise\n\t * an error will be thrown. A value of 0 or greater-than-or-equal the prototype length\n\t * will be ignored and not impose and override length. The length value must be a multiple \n\t * of the {@link Language#getInstructionAlignment() instruction alignment} .\n\t * @return the newly created instruction. \n\t * @throws CodeUnitInsertionException thrown if the new Instruction would overlap and \n\t * existing {@link CodeUnit} or the specified {@code length} is unsupported.\n\t * @throws IllegalArgumentException if a negative {@code length} is specified.\n\t */\n\tpublic Instruction createInstruction(Address addr, InstructionPrototype prototype,\n\t\t\tMemBuffer memBuf, ProcessorContextView context, int length)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a complete set of instructions. A preliminary pass will be made\n\t * checking for code unit conflicts which will be marked within the\n\t * instructionSet causing dependent blocks to get pruned.\n\t * \n\t * @param instructionSet the set of instructions to be added. All code unit\n\t * conflicts will be marked within the instructionSet and\n\t * associated blocks.\n\t * @param overwrite if true, overwrites existing code units.\n\t * @throws CodeUnitInsertionException if the instruction set is incompatible\n\t * with the program memory\n\t * @return the set of addresses over which instructions were actually added\n\t * to the program. This may differ from the InstructionSet address\n\t * set if conflict errors occurred. Such conflict errors will be\n\t * recorded within the InstructionSet and its InstructionBlocks.\n\t */\n\tpublic AddressSetView addInstructions(InstructionSet instructionSet, boolean overwrite)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a new defined Data object of a given length at the given address.\n\t * This ignores the bytes that are present\n\t *\n\t * @param addr the address at which to create a new Data object.\n\t * @param dataType the Data Type that describes the type of Data object to\n\t * create.\n\t * @param length the length of the datatype.\n\t * @return newly created data unit\n\t * @exception CodeUnitInsertionException thrown if the new Instruction would\n\t * overlap and existing Instruction or defined data.\n\t */\n\tpublic Data createData(Address addr, DataType dataType, int length)\n\t\t\tthrows CodeUnitInsertionException;\n\n\t/**\n\t * Creates a new defined Data object at the given address. This ignores the\n\t * bytes that are present\n\t *\n\t * @param addr the address at which to create a new Data object.\n\t * @param dataType the Data Type that describes the type of Data object to\n\t * create.\n\t * @return newly created data unit\n\t * @exception CodeUnitInsertionException thrown if the new Instruction would\n\t * overlap and existing Instruction or defined data.\n\t */\n\tpublic Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;\n\n\t/**\n\t * Clears any code units in the given range returning everything to \"db\"s,\n\t * and removing any references in the affected area. Note that the module\n\t * and fragment structure is unaffected. If part of a code unit is contained\n\t * in the given address range then the whole code unit will be cleared.\n\t *\n\t * @param startAddr the start address of the area to be cleared.\n\t * @param endAddr the end address of the area to be cleared.\n\t * @param clearContext clear context register values if true\n\t */\n\tpublic void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext);\n\n\t/**\n\t * Clears any code units in the given range returning everything to \"db\"s,\n\t * and removing any references in the affected area. Note that the module\n\t * and fragment structure is unaffected. If part of a code unit is contained\n\t * in the given address range then the whole code unit will be cleared.\n\t *\n\t * @param startAddr the start address of the area to be cleared.\n\t * @param endAddr the end address of the area to be cleared.\n\t * @param clearContext clear context register values if true\n\t * @param monitor monitor that can be used to cancel the clear operation\n\t * @throws CancelledException if the operation was cancelled.\n\t */\n\tpublic void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext,\n\t\t\tTaskMonitor monitor) throws CancelledException;\n\n\t/**\n\t * Checks if the given ranges consists entirely of undefined data.\n\t * \n\t * @param start The start address of the range to check.\n\t * @param end The end address of the range to check.\n\t * @return boolean true if the given range is in memory and has no\n\t * instructions or defined data.\n\t */\n\tpublic boolean isUndefined(Address start, Address end);\n\n\t/**\n\t * Clears the comments in the given range.\n\t * \n\t * @param startAddr the start address of the range to be cleared\n\t * @param endAddr the end address of the range to be cleared\n\t */\n\tpublic void clearComments(Address startAddr, Address endAddr);\n\n\t/**\n\t * Clears the properties in the given range.\n\t * \n\t * @param startAddr the start address of the range to be cleared\n\t * @param endAddr the end address of the range to be cleared\n\t * @param monitor task monitor for cancelling operation.\n\t * @throws CancelledException if the operation was cancelled.\n\t */\n\tpublic void clearProperties(Address startAddr, Address endAddr, TaskMonitor monitor)\n\t\t\tthrows CancelledException;\n\n\t/**\n\t * Removes all CodeUnits, comments, properties, and references from the\n\t * listing.\n\t * \n\t * @param clearContext if true, also clear any instruction context that has\n\t * been laid down from previous disassembly.\n\t * @param monitor used for tracking progress and cancelling the clear\n\t * operation.\n\t */\n\tpublic void clearAll(boolean clearContext, TaskMonitor monitor);\n\n\t/**\n\t * Returns the fragment containing the given address.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param addr the address that is contained within a fragment.\n\t *\n\t * @return will return null if the address is not in the program.\n\t */\n\tpublic ProgramFragment getFragment(String treeName, Address addr);\n\n\t/**\n\t * Returns the module with the given name.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param name the name of the module to find.\n\t *\n\t * @return will return null if there is no module with the given name.\n\t */\n\tpublic ProgramModule getModule(String treeName, String name);\n\n\t/**\n\t * Returns the fragment with the given name.\n\t * <P>\n\t * \n\t * @param treeName name of the tree to search\n\t * @param name the name of the fragment to find.\n\t *\n\t * @return will return null if there is no fragment with the given name.\n\t */\n\tpublic ProgramFragment getFragment(String treeName, String name);\n\n\t/**\n\t * Create a new tree that will be identified by the given name. By default,\n\t * the new root module is populated with fragments based on memory blocks.\n\t * Note that the root module's name is not the same as its tree name. The\n\t * root module name defaults to the name of the program.\n\t * \n\t * @param treeName name of the tree to search\n\t * @return root module\n\t * @throws DuplicateNameException if a tree with the given name already\n\t * exists\n\t */\n\tpublic ProgramModule createRootModule(String treeName) throws DuplicateNameException;\n\n\t/**\n\t * Gets the root module for a tree in this listing.\n\t * \n\t * @param treeName name of tree\n\t *\n\t * @return the root module for the listing; returns null if there is no tree\n\t * rooted at a module with the given name.\n\t */\n\tpublic ProgramModule getRootModule(String treeName);\n\n\t/**\n\t * Returns the root module of the program tree with the given name;\n\t * \n\t * @param treeID id of the program tree\n\t * @return the root module of the specified tree.\n\t */\n\tpublic ProgramModule getRootModule(long treeID);\n\n\t/**\n\t * Returns the root module for the default program tree. This would be the\n\t * program tree that has existed the longest.\n\t *\n\t * @return the root module for the oldest existing program tree.\n\t */\n\tpublic ProgramModule getDefaultRootModule();\n\n\t/**\n\t * Get the names of all the trees defined in this listing.\n\t *\n\t * @return the names of all program trees defined in the program.\n\t */\n\tpublic String[] getTreeNames();\n\n\t/**\n\t * Remove the tree rooted at the given name.\n\t * \n\t * @param treeName the name of the tree to remove.\n\t * @return true if the tree was removed; return false if this is the last\n\t * tree for the program; cannot delete the last tree.\n\t */\n\tpublic boolean removeTree(String treeName);\n\n\t/**\n\t * Rename the tree. This method does not change the root module's name only\n\t * the identifier for the tree.\n\t * \n\t * @param oldName old name of the tree\n\t * @param newName new name of the tree.\n\t * @throws DuplicateNameException if newName already exists for a root\n\t * module\n\t */\n\tpublic void renameTree(String oldName, String newName) throws DuplicateNameException;\n\n\t/**\n\t * gets the total number of CodeUnits (Instructions, defined Data, and\n\t * undefined Data)\n\t *\n\t * @return the total number of CodeUnits in the listing.\n\t */\n\tpublic long getNumCodeUnits();\n\n\t/**\n\t * gets the total number of defined Data objects in the listing.\n\t *\n\t * @return the total number of defined Data objects in the listing.\n\t */\n\tpublic long getNumDefinedData();\n\n\t/**\n\t * gets the total number of Instructions in the listing.\n\t *\n\t * @return number of Instructions\n\t */\n\tpublic long getNumInstructions();\n\n\t/**\n\t * Get the data type manager for the program.\n\t * \n\t * @return the datatype manager for the program.\n\t */\n\tpublic DataTypeManager getDataTypeManager();\n\n\t/**\n\t * Create a function with an entry point and a body of addresses.\n\t * \n\t * @param name the name of the function to create\n\t * @param entryPoint the entry point for the function\n\t * @param body the address set that makes up the functions body\n\t * @param source the source of this function\n\t * @return the created function\n\t * @throws InvalidInputException if the name contains invalid characters\n\t * @throws OverlappingFunctionException if the given body overlaps with an\n\t * existing function.\n\t */\n\tpublic Function createFunction(String name, Address entryPoint, AddressSetView body,\n\t\t\tSourceType source) throws InvalidInputException, OverlappingFunctionException;\n\n\t/**\n\t * Create a function in the specified namespace with an entry point and a\n\t * body of addresses.\n\t * \n\t * @param name the name of the function to create\n\t * @param nameSpace the namespace in which to create the function\n\t * @param entryPoint the entry point for the function\n\t * @param body the address set that makes up the functions body\n\t * @param source the source of this function\n\t * @return the created function\n\t * @throws InvalidInputException if the name contains invalid characters\n\t * @throws OverlappingFunctionException if the given body overlaps with an\n\t * existing function.\n\t */\n\tpublic Function createFunction(String name, Namespace nameSpace, Address entryPoint,\n\t\t\tAddressSetView body, SourceType source)\n\t\t\tthrows InvalidInputException, OverlappingFunctionException;\n\n\t/**\n\t * Remove a function a given entry point.\n\t *\n\t * @param entryPoint entry point of function to be removed.\n\t */\n\tpublic void removeFunction(Address entryPoint);\n\n\t/**\n\t * Get a function with a given entry point.\n\t *\n\t * @param entryPoint entry point of the function\n\t * @return function at the entry point\n\t */\n\tpublic Function getFunctionAt(Address entryPoint);\n\n\t/**\n\t * Returns a list of all global functions with the given name.\n\t * \n\t * @param name the name of the functions to retrieve.\n\t * @return a list of all global functions with the given name.\n\t */\n\tpublic List<Function> getGlobalFunctions(String name);\n\n\t/**\n\t * Returns a list of all functions with the given name in the given\n\t * namespace.\n\t * \n\t * @param namespace the namespace to search for functions of the given name.\n\t * Can be null, in which case it will search the global\n\t * namespace.\n\t * @param name the name of the functions to retrieve.\n\t * @return a list of all global functions with the given name.\n\t */\n\tpublic List<Function> getFunctions(String namespace, String name);\n\n\t/**\n\t * Get a function containing an address.\n\t * \n\t * @param addr the address to search.\n\t * @return function containing this address, null otherwise\n\t */\n\tpublic Function getFunctionContaining(Address addr);\n\n\t/**\n\t * Get an iterator over all external functions\n\t * \n\t * @return an iterator over all currently defined external functions.\n\t */\n\tpublic FunctionIterator getExternalFunctions();\n\n\t/**\n\t * Get an iterator over all functions\n\t * \n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over all currently defined functions.\n\t */\n\tpublic FunctionIterator getFunctions(boolean forward);\n\n\t/**\n\t * Get an iterator over all functions starting at address\n\t * \n\t * @param start the address to start iterating at.\n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over functions\n\t */\n\tpublic FunctionIterator getFunctions(Address start, boolean forward);\n\n\t/**\n\t * Get an iterator over all functions with entry points in the address set.\n\t * \n\t * @param asv the set of addresses to iterator function entry points over.\n\t * @param forward if true functions are return in address order, otherwise\n\t * backwards address order\n\t * @return an iterator over functions\n\t */\n\tpublic FunctionIterator getFunctions(AddressSetView asv, boolean forward);\n\n\t/**\n\t * Check if an address is contained in a function\n\t *\n\t * @param addr address to test\n\t * @return true if this address is in one or more functions\n\t */\n\tpublic boolean isInFunction(Address addr);\n\n\t/**\n\t * Get the comment history for comments at the given address.\n\t * \n\t * @param addr address for comments\n\t * @param commentType comment type defined in CodeUnit\n\t * @return array of comment history records\n\t */\n\tpublic CommentHistory[] getCommentHistory(Address addr, int commentType);\n\n}", "public CodeUnit getCodeUnitContaining(Address addr);", "public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);", "@Test(expected = NoSuchElementException.class)\n public void testPrevious_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 5, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.previous();\n }", "public CodeUnit getDefinedCodeUnitAfter(Address addr);", "public Instruction getInstructionBefore(Address addr);", "@Test\n public void testNextIndex_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n int expResult = 0;\n int result = instance.nextIndex();\n\n assertEquals(expResult, result);\n }", "@Test\n public void testPreviousIndex_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n int expResult = -1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "@Test\n public void testNext_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n Integer expResult = 1;\n Integer result = instance.next();\n assertEquals(expResult, result);\n }", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "@Test\n public void testPrevious_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n Integer expResult = 2;\n Integer result = instance.previous();\n assertEquals(expResult, result);\n }", "@Test\n public void testAdd_After_Previous() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.previous();\n\n instance.add(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "@Test\n public void testPrevious_Middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 5, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.next();\n\n Integer expResult = 5;\n Integer result = instance.previous();\n assertEquals(expResult, result);\n }", "public Iterator<BigInteger> iterator() {\n // return new FibIterator();\n return new Iterator<BigInteger>() {\n private BigInteger previous = BigInteger.valueOf(-1);\n private BigInteger current = BigInteger.ONE;\n private int index = 0;\n \n \n @Override\n //if either true will stop, evaluates upper < 0 first (short circuit)\n public boolean hasNext() {\n return upper < 0 || index < upper;\n }\n\n @Override\n //Creating a new value called next\n public BigInteger next() {\n BigInteger next = previous.add(current);\n previous = current;\n current = next;\n index++;\n return current;\n }\n \n };\n }", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "@Test\n public void testPreviousIndex_End() {\n\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "@Test\n public void testPreviousIndex_Middle() {\n\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "public Iterator begin()\n\t{\n\t\treturn new LinkedListIterator(head); \n\t}", "iterator(){current = start;}", "@Override\n public Range next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n if (nextStart >= limitCP) {\n // Switch over from iterating normal code point values to\n // doing the alternate lead-surrogate values.\n doingCodePoints = false;\n nextStart = 0xd800;\n }\n int endOfRange = 0;\n int val = 0;\n int mappedVal = 0;\n\n if (doingCodePoints) {\n // Iteration over code point values.\n val = get(nextStart);\n mappedVal = mapper.map(val);\n endOfRange = rangeEnd(nextStart, limitCP, val);\n // Loop once for each range in the Trie2 with the same raw (unmapped) value.\n // Loop continues so long as the mapped values are the same.\n for (;;) {\n if (endOfRange >= limitCP-1) {\n break;\n }\n val = get(endOfRange+1);\n if (mapper.map(val) != mappedVal) {\n break;\n }\n endOfRange = rangeEnd(endOfRange+1, limitCP, val);\n }\n } else {\n // Iteration over the alternate lead surrogate values.\n val = getFromU16SingleLead((char)nextStart);\n mappedVal = mapper.map(val);\n endOfRange = rangeEndLS((char)nextStart);\n // Loop once for each range in the Trie2 with the same raw (unmapped) value.\n // Loop continues so long as the mapped values are the same.\n for (;;) {\n if (endOfRange >= 0xdbff) {\n break;\n }\n val = getFromU16SingleLead((char)(endOfRange+1));\n if (mapper.map(val) != mappedVal) {\n break;\n }\n endOfRange = rangeEndLS((char)(endOfRange+1));\n }\n }\n returnValue.startCodePoint = nextStart;\n returnValue.endCodePoint = endOfRange;\n returnValue.value = mappedVal;\n returnValue.leadSurrogate = !doingCodePoints;\n nextStart = endOfRange+1;\n return returnValue;\n }", "public ListIterator iterator()\n {\n return new ListIterator(firstLink);\n }", "public AIter next() {\n int p;\n return (p = start + 1) < size ? new Iter(p) : null;\n }", "public Object next()\n/* */ {\n/* 93 */ if (this.m_offset < this.m_array.length) {\n/* 94 */ Object localObject = this.m_array[this.m_offset];\n/* 95 */ advance();\n/* 96 */ return localObject;\n/* */ }\n/* 98 */ throw new NoSuchElementException();\n/* */ }", "@Test\n public void testSet_After_Previous() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.previous();\n\n instance.set(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "@Test\n public void testIterator_Forward() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n int i = 0;\n while (instance.hasNext()) {\n assertEquals(baseList.get(i++), instance.next());\n }\n\n }", "@Test\n public void testAdd_After_Next() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n instance.add(9);\n int expResult = 2;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public Object next()\n/* */ {\n/* 84 */ if (this.m_offset < this.m_limit) {\n/* 85 */ return this.m_array[(this.m_offset++)];\n/* */ }\n/* 87 */ throw new NoSuchElementException();\n/* */ }", "@Test\n public void testNextIndex_Middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 2;\n int result = instance.nextIndex();\n\n assertEquals(expResult, result);\n }", "public List<T> next(){\n\t\tif(hasNext==true){\n\t\t\tSystem.out.println(\"***BEFORE CALL [NCR] next\");\n\t\t\tprintIndices();\n\t\t\t\n\t\t\tif(first==true){\n\t\t\t\tfirst = false;\n\t\t\t\treturn getCompList();\n\t\t\t}\n\t\t\t\n\t\t\t//current is always rightmost 1\n\t\t\tfor(int i=indices.length-1; i>=0; i--){\n\t\t\t\tif(indices[i]==1){\n\t\t\t\t\tcurrent = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//push current pointer right\n\t\t\tif(current<indices.length-1){\n\t\t\t\tSystem.out.println(\"[NCR] pushing\");\n\t\t\t\t//push\n\t\t\t\tindices[current++] = 0;\n\t\t\t\tindices[current] = 1;\n\t\t\t} \n\t\t\t//if current pointer can't be pushed right any further, pull closest base 1 spot right and reset to closest base\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"[NCR] Pulling\");\n\t\t\t\t//scan left to find closest base\n\t\t\t\tfor(int i=indices.length-1; i>=0; i--){\n\t\t\t\t\t//skip all consecutive 1's before searching for qualified base\n\t\t\t\t\tif(indices[i]==0){\n\t\t\t\t\t\tboolean addBase = true;\n\t\t\t\t\t\tfor(int j=i; j>=0; j--){\n\t\t\t\t\t\t\tif(indices[j]==1){\n\t\t\t\t\t\t\t\tindices[j++] = 0;\n\t\t\t\t\t\t\t\tindices[j] = 1;\n\t\t\t\t\t\t\t\tbase = j;\n\t\t\t\t\t\t\t\taddBase = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//if all current 1's are consecutively located at the end, add another base and reset to base\n\t\t\t\t\t\tif(addBase==true){\n\t\t\t\t\t\t\tpointers++;\n\t\t\t\t\t\t\tif(pointers==indices.length){\n\t\t\t\t\t\t\t\thasNext = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindices[0] = 1;\n\t\t\t\t\t\t\tbase = 0;\n\t\t\t\t\t\t\tSystem.out.println(\"Add base true; added a base\");\n\t\t\t\t\t\t\tprintIndices();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//reset to base\n\t\t\t\t\t\tresetToBase();\n\t\t\t\t\t\tSystem.out.println(\"After base reset\");\n\t\t\t\t\t\tprintIndices();\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}\n\t\t\t\n\t\t\treturn getCompList();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@Test\n public void testListIterator_valid_index_From_Start() {\n int index = 0;\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator(index);\n assertTrue(isEqual(instance, baseList));\n\n }", "public C getNext();", "@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "public FunctionIterator getFunctions(Address start, boolean forward);", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public Instruction getInstructionAfter(Address addr);", "public List<Integer> succ(int n) {\n // Don't generate a non-existent \"next\" instruction for the last in a block.\n // For sensibly generated code, this ought not even to be possible,\n // as the last operation will be return or unconditional jump.\n boolean last = (n == this.code.size() - 1) ? true : false;\n TACOp op = this.code.get(n);\n\n switch (op.getType()) {\n // Unconditional jumps can't fall through to the next operation.\n case JMP:\n return Collections.singletonList(this.labelLocs.get(op.getLabel()));\n // Conditional jumps can fall through.\n case JZ:\n int dest = this.labelLocs.get(op.getLabel());\n if (last) {\n return Collections.singletonList(dest);\n }\n else {\n return pairList(dest, n+1);\n }\n // Returns can't go anywhere (within the block).\n case RET:\n return Collections.emptyList();\n // All other operations fall through.\n // (Even for calls, execution resumes at the following operation.)\n default:\n if (last) {\n return Collections.emptyList();\n }\n else {\n return Collections.singletonList(n+1);\n }\n }\n }", "public Iterator iterator () {\n return new MyIterator (first);\n }", "@Override\r\n public BankAccount next() {\r\n \t//check if the list of the bank accounts is empty \r\n if(!hasNext())\r\n \tthrow new NoSuchElementException();\r\n //if the list is not empty remove the first link and return it \r\n else {\r\n \tcurrent = bankAccounts.get(0);\r\n \tbankAccounts.remove(0);\r\n \treturn current;\r\n }\r\n }", "public static ListIterator iterator() {\r\n\t\treturn getIterator(Direction.class);\r\n\t}", "@Test\n public void testIterator_Backward() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n int i = 0;\n while (instance.hasNext()) {\n instance.next();\n }\n\n i = baseList.size() - 1;\n while (instance.hasPrevious()) {\n assertEquals(baseList.get(i--), instance.previous());\n }\n\n }", "@Test\n public void testHasPrevious_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = false;\n boolean result = instance.hasPrevious();\n\n assertEquals(expResult, result);\n }", "@Field(1) \n\tpublic Pointer<uvc_processing_unit > next() {\n\t\treturn this.io.getPointerField(this, 1);\n\t}", "@Test(expected = NoSuchElementException.class)\n public void testNext_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.next();\n }", "public DataIterator getCompositeData(Address start, boolean forward);", "public Iterator<K> iterator()\n {\n\treturn new SkipListIterator<K>(this.head);\n }", "private int nextDiscontiguous(RuleBasedCollator collator, int entryoffset)\n {\n int offset = entryoffset;\n boolean multicontraction = false;\n // since it will be stuffed into this iterator and ran over again\n if (m_utilSkippedBuffer_ == null) {\n m_utilSkippedBuffer_ = new StringBuilder();\n }\n else {\n m_utilSkippedBuffer_.setLength(0);\n }\n int ch = currentChar();\n m_utilSkippedBuffer_.appendCodePoint(ch);\n int prevCC = 0;\n int cc = getCombiningClass(ch);\n // accent after the first character\n if (m_utilSpecialDiscontiguousBackUp_ == null) {\n m_utilSpecialDiscontiguousBackUp_ = new Backup();\n }\n backupInternalState(m_utilSpecialDiscontiguousBackUp_);\n boolean prevWasLead = false;\n while (true) {\n // We read code units for contraction table matching\n // but have to get combining classes for code points\n // to figure out where to stop with discontiguous contraction.\n int ch_int = nextChar();\n char nextch = (char)ch_int;\n if (UTF16.isSurrogate(nextch)) {\n if (prevWasLead) {\n // trail surrogate of surrogate pair, keep previous and current cc\n prevWasLead = false;\n } else {\n prevCC = cc;\n cc = 0; // default cc for an unpaired surrogate\n prevWasLead = false;\n if (Character.isHighSurrogate(nextch)) {\n int trail = nextChar();\n if (Character.isLowSurrogate((char)trail)) {\n cc = getCombiningClass(Character.toCodePoint(nextch, (char)trail));\n prevWasLead = true;\n }\n if (trail >= 0) {\n previousChar(); // restore index after having peeked at the next code unit\n }\n }\n }\n } else {\n prevCC = cc;\n cc = getCombiningClass(ch_int);\n prevWasLead = false;\n }\n if (ch_int < 0 || cc == 0) {\n // if there are no more accents to move around\n // we don't have to shift previousChar, since we are resetting\n // the offset later\n if (multicontraction) {\n if (ch_int >= 0) {\n previousChar(); // backtrack\n }\n setDiscontiguous(m_utilSkippedBuffer_);\n return collator.m_contractionCE_[offset];\n }\n break;\n }\n\n offset ++; // skip the combining class offset\n while ((offset < collator.m_contractionIndex_.length) &&\n (nextch > collator.m_contractionIndex_[offset])) {\n offset ++;\n }\n\n int ce = CE_NOT_FOUND_;\n if ( offset >= collator.m_contractionIndex_.length) {\n break;\n }\n if (nextch != collator.m_contractionIndex_[offset] || cc == prevCC) {\n // unmatched or blocked character\n if ( (m_utilSkippedBuffer_.length()!= 1) ||\n ((m_utilSkippedBuffer_.charAt(0)!= nextch) &&\n (m_bufferOffset_<0) )) { // avoid push to skipped buffer twice\n m_utilSkippedBuffer_.append(nextch);\n }\n offset = entryoffset; // Restore the offset before checking next character.\n continue;\n }\n else {\n ce = collator.m_contractionCE_[offset];\n }\n\n if (ce == CE_NOT_FOUND_) {\n break;\n }\n else if (isContractionTag(ce)) {\n // this is a multi-contraction\n offset = getContractionOffset(collator, ce);\n if (collator.m_contractionCE_[offset] != CE_NOT_FOUND_) {\n multicontraction = true;\n backupInternalState(m_utilSpecialDiscontiguousBackUp_);\n }\n }\n else {\n setDiscontiguous(m_utilSkippedBuffer_);\n return ce;\n }\n }\n\n updateInternalState(m_utilSpecialDiscontiguousBackUp_);\n // backup is one forward of the base character, we need to move back\n // one more\n previousChar();\n return collator.m_contractionCE_[entryoffset];\n }", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "public Instruction getInstructionContaining(Address addr);", "private\t\tMiContainerIterator getPreviousIterator()\n\t\t{\n\t\tif (startAtTop)\n\t\t\t{\n\t\t\twhile (++layerNum <= editor.getNumberOfLayers() - 1)\n\t\t\t\t{\n\t\t\t\tif (editor.getLayer(layerNum).isVisible())\n\t\t\t\t\t{\n\t\t\t\t\treturn(new MiContainerIterator(\n\t\t\t\t\t\teditor.getLayer(layerNum), !startAtTop, \n\t\t\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn(null);\n\t\t\t}\n\t\twhile (--layerNum >= 0)\n\t\t\t{\n\t\t\tif (editor.getLayer(layerNum).isVisible())\n\t\t\t\t{\n\t\t\t\treturn(new MiContainerIterator(\n\t\t\t\t\teditor.getLayer(layerNum), !startAtTop, \n\t\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts));\n\t\t\t\t}\n\t\t\t}\n\t\treturn(null);\n\t\t}", "@Test\n public void testNext_Middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 4, 6));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n Integer expResult = 4;\n Integer result = instance.next();\n assertEquals(expResult, result);\n }", "private void setNextIterator() {\n\t\t\t\n\t\t\tfor (int i = index; i < inconsistencies.size(); i++){\n\t\t\t\tSet<LPGInconsistency> inconsistencyList = inconsistencies.get(i);\n\t\t\t\tif (!inconsistencyList.isEmpty()) {\n\t\t\t\t\titerator = inconsistencyList.iterator();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tindex++;\n\t\t\t}\n\t\t}", "public Iterator<Coord> iterator() {\n\t\treturn new CoordListIterator(array, index);\n\t}", "@Test\n public void testSet_After_Next() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n instance.set(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public abstract int start(int i);", "@Test\n public void testHasNext_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = true;\n boolean result = instance.hasNext();\n\n assertEquals(expResult, result);\n }", "public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}", "public ASTNodeIterator iterator() {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = name;\n return I;\n }", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public ASTNodeIterator iterator()\n {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = expression;\n return I;\n }", "@Override\r\n\tpublic Iterator<T> iterator() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn this.iteratorInOrder();\r\n\t}", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "public ListUtilities returnToStart(){\n\t\tListUtilities temp = new ListUtilities();\n\t\tif(this.prevNum != null){\n\t\t\ttemp = this.prevNum.returnToStart();\n\t\t\treturn temp;\n\t\t}else{\n\t\t\t//System.out.println(\"Returned to... \" + this.num);\n\t\t\treturn this;\n\t\t}\n\t}", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "public abstract int getStartIndex();", "public Call<ExpResult<List<DelegationInfo>>> getDelegations(MinterAddress address, long page) {\n checkNotNull(address, \"Address can't be null\");\n\n return getInstantService().getDelegationsForAddress(address.toString(), page);\n }", "public LinkedListIterator(){\n position = null;\n previous = null; \n isAfterNext = false;\n }", "IList<T> getNext();", "public ListIterator<T> listIterator() { return new DLLListIterator(); }", "@Test\n public void testHasNext_middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = true;\n instance.next();\n\n boolean result = instance.hasNext();\n\n assertEquals(expResult, result);\n }", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }", "LexicalUnit getNextLexicalUnit();", "Iterator<T> iterator(int start, int limit);", "@Override\n public Automaton next(){\n if (!this.hasNext()) return null;\n this.checkNext();\n \n Automaton ret = new Automaton();\n try {\n ret = new Automaton(this.currentTransitions,this.currentInitialStateId,this.currentFinalStatesIds);\n } catch (Exception ex) {\n Logger.getLogger(AutomatonIterator.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n if (!this.allStatesIterator.hasNext()){\n this.allStatesIterator = new IntegerIterator(1);\n this.currentInitialStateId = this.allStatesIterator.next();\n if(!this.allSubsetsIterator.hasNext()){\n this.allSubsetsIterator.reset();// = new SubsetIterator(this.numberOfStates);\n this.currentFinalStatesIds = this.allSubsetsIterator.next();\n this.currentTransitions = this.allTransitionsIterator.next();\n }\n else{\n this.currentFinalStatesIds = this.allSubsetsIterator.next();\n }\n }\n else{\n this.currentInitialStateId = this.allStatesIterator.next();\n }\n \n return ret;\n }", "@Override\n\tpublic Iterator<Key> iterator() {\n\t\treturn new ListIterator<Key>() {\n\t\t\tNode temp = getFirstNode();\n\t\t\t@Override\n\t\t\tpublic boolean hasNext() {\n\t\t\t\treturn temp.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Key next() {\n\t\t\t\tKey k = temp.next.key;\n\t\t\t\ttemp = temp.next;\n\t\t\t\treturn k;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic boolean hasPrevious() {\n\t\t\t\treturn !temp.equals(getFirstNode());\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Key previous() {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int nextIndex() {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int previousIndex() {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void remove() {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void set(Key key) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void add(Key key) {\n\n\t\t\t}\n\t\t};\n\t}", "public int next() {\n\treturn _current < _last ? _data[_current++] : END;\n }", "void startIndexing();", "public Iterator<Customer> iterator(){\n\t\treturn list.iterator();\n\t}", "void next();", "@Override\n\t\tpublic int next() {\n\t\t\treturn current++;\n\t\t}", "public Iterator<Integer> fromA() {return this.fromA.iterator();}", "public CS228ListIterator(int startIndex) {\r\n\t\t\t// TODO ...test\r\n\t\t\tcaret = new Caret();\r\n\t\t\tint idxCount = 0;\r\n\t\t\tfor (Node n = head.next; n != tail; n = n.next) {\r\n\t\t\t\tfor (int i = 0; i < n.data.length; i++) {\r\n\t\t\t\t\tif (n.data[i] != null)\r\n\t\t\t\t\t\tidxCount++;\r\n\t\t\t\t\tif (idxCount == startIndex) {\r\n\t\t\t\t\t\tcaret.n = n;\r\n\t\t\t\t\t\tcaret.idx = i;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "@Test\n public void testHasPrevious_Middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n instance.next();\n instance.next();\n\n boolean expResult = true;\n boolean result = instance.hasPrevious();\n\n assertEquals(expResult, result);\n }", "@Test\n public void testListIteratorPrevious(){\n DoubleLinkedList<Integer> list1 = new DoubleLinkedList<Integer>();\n ListIterator<Integer> list1It = list1.iterator();\n try{\n list1It.previous();\n fail(\"expected a NoSuchElementException to be thrown\");\n }\n catch(NoSuchElementException error){\n assertEquals(error.getMessage(), \"There is no previous element in the list\");\n }\n list1It.add(1);\n assertEquals(\"testing with an element in the next spot\", new Integer(1), list1It.previous());\n }", "public Instruction getInstructionAt(Address addr);", "private\t\tMiContainerIterator getNextIterator()\n\t\t{\n\t\tif (startAtTop)\n\t\t\t{\n\t\t\twhile (--layerNum >= 0)\n\t\t\t\t{\n\t\t\t\tif (editor.getLayer(layerNum).isVisible())\n\t\t\t\t\t{\n\t\t\t\t\treturn(new MiContainerIterator(\n\t\t\t\t\t\teditor.getLayer(layerNum), !startAtTop,\n\t\t\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn(null);\n\t\t\t}\n\t\twhile (++layerNum <= editor.getNumberOfLayers() - 1)\n\t\t\t{\n\t\t\tif (editor.getLayer(layerNum).isVisible())\n\t\t\t\t{\n\t\t\t\treturn(new MiContainerIterator(\n\t\t\t\t\teditor.getLayer(layerNum), !startAtTop, \n\t\t\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts));\n\t\t\t\t}\n\t\t\t}\n\t\treturn(null);\n\t\t}", "public LookupAccountTransactions next(String next) {\n addQuery(\"next\", String.valueOf(next));\n return this;\n }", "public Iterator iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "public long getNextBlock(long address){\n int marker = readMarkerLowerBits(address - 1);\n int blocksize;\n if(marker == 0){\n blocksize = readLengthField(address, 1);\n return address + blocksize + 1;\n } else if(marker == 15){\n return address + 1;\n } else {\n if (isBlockUsed(address)) marker -= 8;\n blocksize = readLengthField(address, marker);\n if (isBlockUsed(address)) {\n return address + blocksize + 2 * (marker - 8) + 1;\n }\n return address + blocksize + 1;\n }\n }" ]
[ "0.6823876", "0.61968225", "0.60902107", "0.6070422", "0.58657384", "0.5844704", "0.5716347", "0.56976324", "0.56849974", "0.5660903", "0.5644212", "0.55368215", "0.5455282", "0.54499793", "0.5382377", "0.5238707", "0.52176726", "0.5139063", "0.5135898", "0.5106747", "0.5031317", "0.4986517", "0.49733007", "0.4933121", "0.48253024", "0.4823886", "0.48226538", "0.48164678", "0.48080978", "0.48030725", "0.4801066", "0.47817537", "0.47816634", "0.47565326", "0.4754697", "0.47486714", "0.47475", "0.47440007", "0.4727813", "0.47017753", "0.46906474", "0.46766946", "0.46739972", "0.46687457", "0.4659721", "0.46562174", "0.46433708", "0.46367565", "0.46353137", "0.4630682", "0.4623705", "0.46192753", "0.46160576", "0.46011284", "0.45969373", "0.45837227", "0.45832548", "0.45656058", "0.4562712", "0.45555276", "0.45447195", "0.45422262", "0.45378003", "0.45342764", "0.45327747", "0.4532771", "0.4519137", "0.45149606", "0.45110744", "0.45098475", "0.4492445", "0.44808146", "0.44743744", "0.4474127", "0.4471438", "0.44693905", "0.44654763", "0.44638577", "0.44625574", "0.44545108", "0.4445615", "0.44401768", "0.44287223", "0.44200826", "0.44194922", "0.44165602", "0.44125015", "0.44070384", "0.4403414", "0.4383678", "0.4381968", "0.43804803", "0.43802842", "0.43765292", "0.43756238", "0.43676117", "0.43648347", "0.43647814", "0.43625265", "0.43595767" ]
0.72476584
0
Get an iterator over the address range(s). Only code units whose start addresses are contained in the given address set will be returned by the iterator.
public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public Set<T> getRanges();", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "public abstract ucar.array.RangeIterator getRangeIterator();", "public Set<String> zrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public AddressSetView getAddressSet() {\n\t\treturn new AddressSet(baseAddress, getEndAddress());\n\t}", "private AddressSet getMappedIntersection(MemoryBlock mappedBlock, AddressSet set) {\n\t\tAddressSet mappedIntersection = new AddressSet();\n\t\tList<MemoryBlockSourceInfo> sourceInfos = mappedBlock.getSourceInfos();\n\t\t// mapped blocks can only ever have one sourceInfo\n\t\tMemoryBlockSourceInfo info = sourceInfos.get(0);\n\t\tAddressRange range = info.getMappedRange().get();\n\t\tAddressSet resolvedIntersection = set.intersect(new AddressSet(range));\n\t\tfor (AddressRange resolvedRange : resolvedIntersection) {\n\t\t\tAddressRange mappedRange = getMappedRange(mappedBlock, resolvedRange);\n\t\t\tif (mappedRange != null) {\n\t\t\t\tmappedIntersection.add(mappedRange);\n\t\t\t}\n\t\t}\n\t\treturn mappedIntersection;\n\t}", "public InstructionIterator getInstructions(Address addr, boolean forward);", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new NullPointerException();\n TreeSet<Point2D> inRangeSet = new TreeSet<>();\n for (Point2D point : pointSet) {\n if (rect.contains(point)) {\n inRangeSet.add(point);\n }\n }\n return inRangeSet;\n }", "@Override\n public Iterator<Range> iterator() {\n return iterator(defaultValueMapper);\n }", "public Iterator<Range> iterator(ValueMapper mapper) {\n return new Trie2Iterator(mapper);\n }", "@Override\r\n\tpublic Iterator<GIS_layer> iterator() {\n\t\treturn set.iterator();\r\n\t}", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public static AddressSetView getAddressSet(AddressFactory factory, Address start,\n\t\t\tboolean forward) {\n\t\tAddressSet all = factory.getAddressSet();\n\t\tif (forward) {\n\t\t\tAddress max = all.getMaxAddress();\n\t\t\treturn factory.getAddressSet(start, max);\n\t\t}\n\t\tAddress min = all.getMinAddress();\n\t\treturn factory.getAddressSet(min, start);\n\t}", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}", "private void getNextInSet() throws CancelledException {\n\t\t// find next address that has a valid block;\n\t\tAddress addr = getNextAddress(nextAddr);\n\n\t\t// if the instruction's start address is in our set\n\t\t// then we have our block\n\t\tif (addr != null && addrSet.contains(addr)) {\n\t\t\tnextBlock = model.getCodeBlockAt(addr, monitor);\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// otherwise we're out of our current address range in\n\t\t// our address range set so we find the next address range\n\t\t// with a min address >= the instructions address and\n\t\t// look for a block there\n\t\t//nextAddr = instr.getMaxAddress();\n\t\twhile (rangeIter.hasNext()) {\n\t\t\tAddressRange range = rangeIter.next();\n\n\t\t\tif (nextAddr.compareTo(range.getMinAddress()) >= 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnextBlock = getFirstInRange(range);\n\t\t\t// if we find a block we're done\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if we find no block then there's no block in the\n\t\t\t// current range and we can move on to the next one\n\t\t}\n\t\tnextBlock = null;\n\t}", "public SetOfRanges() {\n RangeSet = new Vector();\n }", "public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);", "public Iterable<Point2D> range(RectHV rect) {\n ArrayList<Point2D> returnArray = new ArrayList<Point2D>();\n if (rect == null) {\n throw new IllegalArgumentException(\"rect input is null\");\n }\n for (Point2D i : pointsSet) {\n if (rect.contains(i))\n returnArray.add(i);\n }\n return returnArray;\n }", "public IntIterator intIterator(final int start, final int end) {\n\t\treturn new BufferedRangeEWAHintIterator(this, start, end);\n\t}", "public Iterable<Point2D> range(RectHV rect) {\n\n if (rect == null)\n throw new IllegalArgumentException(\"Got null object in range()\");\n \n Queue<Point2D> pointsInside = new Queue<>();\n \n for (Point2D p : point2DSET) {\n \n double x = p.x();\n double y = p.y();\n if (x >= rect.xmin() && x <= rect.xmax() &&\n y >= rect.ymin() && y <= rect.ymax())\n pointsInside.enqueue(p);\n \n }\n \n return pointsInside;\n }", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfSource(String lowerInclusive, String upperInclusive) {\n return fetchRange(Income.INCOME.SOURCE, lowerInclusive, upperInclusive);\n }", "private List<Integer> allIntegerInRange(int start, int end) {\n\t\tList<Integer> range = new ArrayList<Integer>();\n\n\t\tfor (int i = start; i <= end; i++) {\n\t\t\trange.add(i);\n\t\t}\n\n\t\treturn range;\n\t}", "private static EntityIterator getEntityIterator(Schematic schematic, Location location) {\n var iterator = new EntityIterator();\n\n var world = location.getWorld();\n var offset = new Vector3i(location.getBlockX(), location.getBlockY(), location.getBlockZ());\n offset.sub(schematic.getOrigin());\n\n var min = schematic.getMinimumPoint().add(offset, new Vector3i());\n var max = schematic.getMaximumPoint().add(offset, new Vector3i());\n\n for (var entity : world.getEntities()) {\n var eLoc = entity.getLocation();\n if (isInBounds(eLoc, min, max))\n iterator.addEntity(entity);\n }\n\n return iterator;\n }", "public Iterator<? extends ICodeBase> appCodeBaseIterator();", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);", "@Override\r\n\tpublic List<CodeRangeDis> findAll() {\n\t\treturn codeRangeDisMapper.findAll();\r\n\t}", "List<Account> findByAddressStartingWith(String startAddress);", "List<MemoryBlockDB> getBlocks(Address start, Address end) {\n\t\tList<MemoryBlockDB> list = new ArrayList<>();\n\n\t\tList<MemoryBlockDB> tmpBlocks = blocks;\n\t\tint index = Collections.binarySearch(tmpBlocks, start, BLOCK_ADDRESS_COMPARATOR);\n\t\tif (index < 0) {\n\t\t\tindex = -index - 2;\n\t\t}\n\t\tif (index >= 0) {\n\t\t\tMemoryBlockDB block = tmpBlocks.get(index);\n\t\t\tif (block.contains(start)) {\n\t\t\t\tlist.add(block);\n\t\t\t}\n\t\t}\n\n\t\twhile (++index < tmpBlocks.size()) {\n\t\t\tMemoryBlockDB block = tmpBlocks.get(index);\n\t\t\tif (block.getStart().compareTo(end) > 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlist.add(block);\n\t\t}\n\n\t\treturn list;\n\t}", "public AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly,\n\t\t\tTaskMonitor monitor) throws CancelledException;", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new IllegalArgumentException(\n \"Null pointer provided instead of a query rectangle\");\n ptsInside = new SET<Point2D>();\n searchForPoints(root, rect);\n return ptsInside;\n }", "protected Iterator getNominationsSet() \n {\n return this.nominations.iterator();\n }", "String getBeginRange();", "public static List <Index> rangeOf(int start, int end) {\r\n FastTable <Index> list = FastTable.newInstance();\r\n for (int i=start; i < end; i++) {\r\n list.add(Index.valueOf(i));\r\n }\r\n return list;\r\n }", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) {\n throw new IllegalArgumentException();\n }\n SET<Point2D> result = new SET<Point2D>();\n for (Point2D point : points) {\n if (rect.contains(point))\n result.add(point);\n }\n return result;\n }", "public Iterable<Point2D> range(RectHV rect) {\n SET<Point2D> point_list = new SET<Point2D>();\n rangesearch(root, rect, point_list);\n return point_list;\n }", "public HashSet<Edge> rangeQuery(MBR mbr) {\r\n\t\tthrow new UnsupportedOperationException();\r\n\t}", "Set<String> getRangeLocalNames();", "Set<MacAddress> neighbors();", "@Override\n public Iterator<Set<E>> iterator() {\n return new DisjointSetIterator(theSet);\n }", "private static RegionIterator getChunkIterator(Schematic schematic, Location location) {\n var offset = new Vector3i(location.getBlockX(), location.getBlockY(), location.getBlockZ());\n offset.sub(schematic.getOrigin());\n\n var min = schematic.getMinimumPoint().add(offset, new Vector3i());\n var max = schematic.getMaximumPoint().add(offset, new Vector3i());\n\n blockCoordsToChunkCoords(min);\n blockCoordsToChunkCoords(max);\n\n var mask = new Vector3i(1, 0, 1);\n min.mul(mask);\n max.mul(mask);\n\n return new RegionIterator(min, max);\n }", "public abstract java.util.Set getLocations();", "private static boolean startsWith(final CollationElementIterator i,\n final CollationElementIterator is) {\n do {\n final int cs = next(is);\n if(cs == -1) return true;\n if(cs != next(i)) return false;\n } while(true);\n }", "protected Iterator<Cell> getCellIterator(ColumnFamily container)\n {\n return container.iterator();\n }", "@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}", "public Iterator reachable() {\n Set s = SortedArraySet.FACTORY.makeSet(HashCodeComparator.INSTANCE);\n s.add(IdentityHashCodeWrapper.create(this));\n this.reachable(s);\n return new FilterIterator(s.iterator(), filter);\n }", "abstract public Iterator<BlockReportReplica> iterator();", "public static Iterator <Gate> iterator() {\n return allGates.iterator();\n }", "public boolean allInRange(int start, int end) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tint a=data[i];\n \t\t\tif ((a<start)||(a>=end)) return false;\n \t\t}\n \t\treturn true;\n \t}", "public AddressInfo getRange() {\r\n return range;\r\n }", "@Override\n public CloseableIterator<KVPair> getRange(byte[] minKey, byte[] maxKey, boolean reverse) {\n Preconditions.checkState(!this.closed.get(), \"transaction closed\");\n return new XodusIter(this.store.openCursor(this.tx), minKey, maxKey, reverse);\n }", "protected abstract Iterable<E> getIntersecting(D lower, D upper);", "@Test\n\tpublic void seperateRangeTest() {\n\n\t\tsetup();\n\t\tSystem.out.println(\"seperate range test\");\n\t\tZipCodeRange z1 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z2 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94299));\n\t\tZipCodeRange z3 = new ZipCodeRange(new ZipCode(94600), new ZipCode(94699));\n\n\t\t// Testing\n\t\tZipRangeControl zrc = new ZipRangeControl();\n\t\tzrc.processNewRange(z1);\n\t\tzrc.processNewRange(z2);\n\t\tzrc.processNewRange(z3);\n\n\t\tZipCodeRange z4 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94399));\n\t\trequiredList.add(z1);\n\t\trequiredList.add(z2);\n\t\trequiredList.add(z3);\n\n\t\tZipCodeRange[] ziparray = new ZipCodeRange[requiredList.size()];\n\t\tList<ZipCodeRange> zlist = zrc.getFinalZipRanges();\n\n\t\tfor (int i = 0; i < requiredList.size(); i++) {\n\t\t\tAssert.assertThat(\"Lower Limit match failed at entry\" + i, requiredList.get(i).lower.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).lower.zipcode));\n\t\t\tAssert.assertThat(\"Upper Limit match failed at entry\" + i, requiredList.get(i).upper.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).upper.zipcode));\n\t\t}\n\t\tclimax();\n\n\t}", "public java.util.List<DataEntry> findAll(int start, int end);", "public Iterable<Point2D> range(RectHV rect) {\n //rect\n Queue<Point2D> range = new Queue<Point2D>();\n \n for (Point2D p: bst.keys()) {\n if (rect.contains(p)) {\n range.enqueue(p);\n }\n }\n return range; \n }", "private IterableSet<AugmentedStmt> get_EntryPoint(IterableSet<AugmentedStmt> nodeList) {\n IterableSet<AugmentedStmt> entryPoints = new IterableSet<AugmentedStmt>();\n\n for (AugmentedStmt as : nodeList) {\n for (AugmentedStmt po : as.cpreds) {\n if (nodeList.contains(po) == false) {\n entryPoints.add(as);\n break;\n }\n }\n }\n\n return entryPoints;\n }", "public FunctionIterator getFunctions(Address start, boolean forward);", "public Iterator<GPoint> iterator() {\n\t\treturn points.iterator();\n\t}", "public Iterator iterator()\n {\n return new HashSetIterator();\n }", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfUsedFor(UByte lowerInclusive, UByte upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.USED_FOR, lowerInclusive, upperInclusive);\n }", "public Iterator<Coord> iterator() {\n\t\treturn new CoordListIterator(array, index);\n\t}", "public List<com.ims.dataAccess.tables.pojos.User> fetchRangeOfStreetname(String lowerInclusive, String upperInclusive) {\n return fetchRange(User.USER.STREETNAME, lowerInclusive, upperInclusive);\n }", "public Iterator<Integer> fromA() {return this.fromA.iterator();}", "public XnRegion keysOf(int start, int stop) {\n\t\tint offset = start;\n\t\tint left = -1;\n\t\tStepper stepper = myRegion.simpleRegions(myOrdering);\n\t\ttry {\n\t\t\tXnRegion region;\n\t\t\twhile ((region = (XnRegion) stepper.fetch()) != null) {\n\t\t\t\tif (region.count().isLE(IntegerValue.make(offset))) {\n\t\t\t\t\toffset = offset - region.count().asInt32();\n\t\t\t\t} else {\n\t\t\t\t\tif (left == -1) {\n\t\t\t\t\t\tleft = ((IntegerPos) (region.chooseOne(myOrdering))).asIntegerVar().asInt32() + offset;\n\t\t\t\t\t\toffset = stop - (start - offset);\n\t\t\t\t\t\tif (offset <= region.count().asInt32()) {\n\t\t\t\t\t\t\treturn IntegerRegion.make(\n\t\t\t\t\t\t\t\tIntegerValue.make(left),\n\t\t\t\t\t\t\t\t(((IntegerPos) (region.chooseOne(myOrdering))).asIntegerVar().plus(IntegerValue.make(offset))));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tint right = ((IntegerPos) (region.chooseOne(myOrdering))).asIntegerVar().asInt32() + offset;\n\t\t\t\t\t\treturn IntegerRegion.make(IntegerValue.make(left), IntegerValue.make(right));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstepper.step();\n\t\t\t}\n\t\t} finally {\n\t\t\tstepper.destroy();\n\t\t}\n\t\tthrow new AboraRuntimeException(AboraRuntimeException.NOT_IN_TABLE);\n\t\t/*\n\t\tudanax-top.st:12729:IntegerArrangement methodsFor: 'accessing'!\n\t\t{XnRegion} keysOf: start {Int32} with: stop {Int32}\n\t\t\t\"Return the region that corresponds to a range of indices.\"\n\t\t\t| offset {Int32} left {Int32} right {Int32} | \n\t\t\toffset _ start.\n\t\t\tleft _ -1.\n\t\t\t(myRegion simpleRegions: myOrdering) forEach: \n\t\t\t\t[:region {XnRegion} |\n\t\t\t\tregion count <= offset \n\t\t\t\t\tifTrue: [offset _ offset - region count DOTasLong]\n\t\t\t\t\tifFalse:\n\t\t\t\t\t\t[left == -1 \n\t\t\t\t\t\t\tifTrue: \n\t\t\t\t\t\t\t\t[left _ ((region chooseOne: myOrdering) cast: IntegerPos) asIntegerVar DOTasLong + offset.\n\t\t\t\t\t\t\t\toffset _ stop - (start - offset).\n\t\t\t\t\t\t\t\toffset <= region count DOTasLong ifTrue: \n\t\t\t\t\t\t\t\t\t[^IntegerRegion make: left \n\t\t\t\t\t\t\t\t\t\t\twith: (((region chooseOne: myOrdering) cast: IntegerPos) asIntegerVar + offset)]]\n\t\t\t\t\t\t\tifFalse:\n\t\t\t\t\t\t\t\t[right _ ((region chooseOne: myOrdering) cast: IntegerPos) asIntegerVar DOTasLong + offset.\n\t\t\t\t\t\t\t\t^IntegerRegion make: left with: right]]].\n\t\t\tHeaper BLAST: #NotInTable.\n\t\t\t^ NULL \"compiler fodder\"!\n\t\t*/\n\t}", "public static Automaton.List rangeOf(Automaton automaton,\n\t\t\tAutomaton.Int _start, Automaton.Int _end) {\n\t\t// FIXME: there is a bug here for big integer values.\n\t\tint start = _start.intValue();\n\t\tint end = _end.intValue();\n\t\tint[] children = new int[end - start];\n\t\tfor (int i = 0; i < children.length; ++i, ++start) {\n\t\t\tchildren[i] = automaton.add(new Automaton.Int(start));\n\t\t}\n\t\treturn new Automaton.List(children);\n\t}", "public Iterator<T> iterator() {\n return new SetIterator<T>(this.head);\n }", "public Iterator getIterator() {\n\t\t\n\t\treturn blocks.iterator();\n\t\t\n\t}", "@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new SetIterator();\n }", "Iterator<CtElement> descendantIterator();", "public Iterable<Point2D> range(RectHV rect) {\n SET<Point2D> result = new SET<Point2D>();\n if (root == null) {\n return result;\n }\n\n range(root, rect, result);\n return result;\n }", "public Iterator getPrefixes(String uri) {\n throw new UnsupportedOperationException();\n }", "public List<Range> getRanges() {\n // Lazy initialization with double-check.\n List<Range> r = this.ranges;\n if (r == null) {\n synchronized (this) {\n r = this.ranges;\n if (r == null) {\n this.ranges = r = new CopyOnWriteArrayList<Range>();\n }\n }\n }\n return r;\n }", "public java.util.List<ProductSpecificationMapping> findAll(\n\t\tint start, int end);", "public List<Address> getAddresses()\n\t{\n\t\treturn getAddresses( getSession().getSessionContext() );\n\t}", "public java.util.List<CsclAppointeeMaster> findAll(int start, int end);", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfId(UUID lowerInclusive, UUID upperInclusive) {\n return fetchRange(Income.INCOME.ID, lowerInclusive, upperInclusive);\n }", "Set<URI> fetchAllUris(ServicePath service);", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfState(UByte lowerInclusive, UByte upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.STATE, lowerInclusive, upperInclusive);\n }", "public Set<Tuple> zrangeWithScores(final String key, final long start, final long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrangeWithScores(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public Iterable<Point2D> range(RectHV rect) \r\n\t{\r\n\t\tStack<Point2D> insiders = new Stack<Point2D>();\r\n\t\trange(insiders, root, rect, new RectHV(0,0,1,1));\r\n\t\treturn insiders;\r\n\t}", "public Iterable<Point2D> range(RectHV rect) \n\t {\n\t\t if(rect==null)\n\t\t\t throw new java.lang.NullPointerException();\n\t\t LinkedQueue<Point2D> insidePoints = new LinkedQueue<Point2D>();\n\t\t range(root,rect.xmin(),rect.ymin(),rect.xmax(),rect.ymax(),insidePoints,true);\n\t\t return insidePoints;\n\t }", "public FunctionIterator getFunctions(AddressSetView asv, boolean forward);", "public List<String> lrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.lrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public Collection<Address> getAddressCollection(){\r\n\t\treturn addressCollection;\r\n\t}", "public Iterator<Range> iteratorForLeadSurrogate(char lead) {\n return new Trie2Iterator(lead, defaultValueMapper);\n }", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }", "public void includeDomainInRangeCalculator(IntegerRangeCalculator i)\r\n\t{\r\n\t\ti.include(start);\r\n\t\tif(data.length>0) i.include(start+data.length-1);\r\n\t}", "@VisibleForTesting\n public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {\n return map.entrySet().iterator();\n }", "@Override\n public Iterable<Location> listLocations() {\n return ImmutableSet.<Location>of();\n }", "public abstract Collection<IRelation> getStartingRelations(String elementUri);", "Iterator<T> iterator();", "public Set<String> zrevrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrevrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "@Override\n public Iterator<Location> iterator() {\n return new NeighborhoodIterator(this, new Location(0, 0));\n }", "@Override\n public Range next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n if (nextStart >= limitCP) {\n // Switch over from iterating normal code point values to\n // doing the alternate lead-surrogate values.\n doingCodePoints = false;\n nextStart = 0xd800;\n }\n int endOfRange = 0;\n int val = 0;\n int mappedVal = 0;\n\n if (doingCodePoints) {\n // Iteration over code point values.\n val = get(nextStart);\n mappedVal = mapper.map(val);\n endOfRange = rangeEnd(nextStart, limitCP, val);\n // Loop once for each range in the Trie2 with the same raw (unmapped) value.\n // Loop continues so long as the mapped values are the same.\n for (;;) {\n if (endOfRange >= limitCP-1) {\n break;\n }\n val = get(endOfRange+1);\n if (mapper.map(val) != mappedVal) {\n break;\n }\n endOfRange = rangeEnd(endOfRange+1, limitCP, val);\n }\n } else {\n // Iteration over the alternate lead surrogate values.\n val = getFromU16SingleLead((char)nextStart);\n mappedVal = mapper.map(val);\n endOfRange = rangeEndLS((char)nextStart);\n // Loop once for each range in the Trie2 with the same raw (unmapped) value.\n // Loop continues so long as the mapped values are the same.\n for (;;) {\n if (endOfRange >= 0xdbff) {\n break;\n }\n val = getFromU16SingleLead((char)(endOfRange+1));\n if (mapper.map(val) != mappedVal) {\n break;\n }\n endOfRange = rangeEndLS((char)(endOfRange+1));\n }\n }\n returnValue.startCodePoint = nextStart;\n returnValue.endCodePoint = endOfRange;\n returnValue.value = mappedVal;\n returnValue.leadSurrogate = !doingCodePoints;\n nextStart = endOfRange+1;\n return returnValue;\n }" ]
[ "0.6157389", "0.5951599", "0.59367657", "0.58750486", "0.5670531", "0.55801594", "0.5458", "0.5441142", "0.54298806", "0.54082423", "0.5391307", "0.52611387", "0.52473176", "0.52306634", "0.5218712", "0.520738", "0.5198245", "0.5193855", "0.5169012", "0.51597166", "0.51388425", "0.5085208", "0.5007524", "0.49842975", "0.49105626", "0.49045265", "0.48669383", "0.48555169", "0.48551127", "0.48451155", "0.4844142", "0.48433116", "0.48398867", "0.48254526", "0.4821064", "0.48047644", "0.4783387", "0.47780544", "0.47745577", "0.47737935", "0.47694367", "0.47497225", "0.47469744", "0.4743516", "0.47388136", "0.47341913", "0.4733361", "0.47325206", "0.47315103", "0.47284728", "0.4717376", "0.47153103", "0.47137502", "0.4712339", "0.46859857", "0.468532", "0.46812236", "0.4677702", "0.4675903", "0.46632975", "0.4660161", "0.46576163", "0.46521333", "0.46445784", "0.46441075", "0.4636535", "0.46160692", "0.46129152", "0.46105155", "0.4608921", "0.46033812", "0.46007386", "0.45920464", "0.45855638", "0.45855302", "0.45805067", "0.4579855", "0.45769808", "0.45763993", "0.4573301", "0.4562075", "0.455909", "0.45490047", "0.45476794", "0.45439938", "0.45368826", "0.45298094", "0.4524189", "0.4520187", "0.4518429", "0.45167223", "0.45044065", "0.4501628", "0.44999015", "0.4489929", "0.4489526", "0.44891012", "0.4488853", "0.44868785", "0.44798696" ]
0.64940155
0
get the Instruction that starts at the given address. If no Instruction has been defined to start at that address, return null.
public Instruction getInstructionAt(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Instruction getInstructionContaining(Address addr);", "public Instruction getInstructionBefore(Address addr);", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "public Instruction getInstructionAfter(Address addr);", "public Instruction getInstruction(long index){\n\t\tInstruction instruction = null;\n\t\tint effectiveAddress = (int) (index-Constants.START_ADDRESS);\n\t\tif(effectiveAddress>0)\n\t\t{\n\t\t\teffectiveAddress = effectiveAddress/4;\t\t\t\n\t\t}\n\t\tif(instructions.size()>effectiveAddress)\n\t\t\tinstruction = instructions.get(effectiveAddress);\n\t\treturn instruction;\n\t}", "private SimInstruction getInstruction(Addr address) {\n var inst = decodedInstructions.get(address);\n\n if (inst != null) {\n return inst;\n }\n\n // Try to decode instruction\n var rawInstruction = program.get(address);\n\n // System.out.println(\"INSTRUC: \" + instructions);\n SpecsCheck.checkNotNull(rawInstruction,\n () -> \"No program instruction found at address \" + address.toNumber() + \" (\" +\n address + \")\");\n\n var microCodeInstruction = decoder.decode(rawInstruction, this);\n decodedInstructions.put(address, microCodeInstruction);\n\n return microCodeInstruction;\n }", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public CodeUnit getCodeUnitBefore(Address addr);", "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "String getStartAddress();", "public CodeUnit getCodeUnitContaining(Address addr);", "Optional<MemoryAddress> lookup(String name);", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "SimpleString getPrefix(SimpleString address);", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "public CodeUnit getCodeUnitAt(Address addr);", "org.hl7.fhir.Integer getStart();", "String getInstruction();", "public abstract Address getBootHeapStart();", "public com.a9.spec.opensearch.x11.QueryType.StartIndex xgetStartIndex()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.StartIndex target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.StartIndex)get_store().find_attribute_user(STARTINDEX$10);\n return target;\n }\n }", "public java.math.BigInteger getStartIndex()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTINDEX$10);\n if (target == null)\n {\n return null;\n }\n return target.getBigIntegerValue();\n }\n }", "public static String getStart(String town){\n\t\treturn Character.toString(town.charAt(0));\n\t}", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "private int getOperandAddress(final CPU6502Instruction instruction) {\r\n // switch address mode\r\n switch (instruction.addressMode) {\r\n case CPU6502Instruction.ZERO:\r\n return this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n case CPU6502Instruction.ZERO_X:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n case CPU6502Instruction.ZERO_Y:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.y) & 0xff;\r\n case CPU6502Instruction.INDIRECT: {\r\n final int lowAddress = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n final int highAddress = (this.memory[this.currentInstructionAddress + 2] & 0xff) << 8;\r\n\r\n return (readByte(highAddress + lowAddress) & 0xff) + ((readByte(highAddress + ((lowAddress + 1) & 0xff)) & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_X: {\r\n final int p = ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n\r\n return (this.memory[p] & 0xff) + ((this.memory[(p + 1) & 0xff] & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_Y: {\r\n // this is the address on the zero page where we read from\r\n final int p = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n\r\n // if over page boundary then do another access => one more cycle\r\n final int lowAddress = (this.memory[p] & 0xff) + this.y;\r\n\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[(p + 1) & 0xff] & 0xff) << 8)) & 0xffff;\r\n }\r\n case CPU6502Instruction.RELATIVE: {\r\n // calculate relative address\r\n final int address = this.memory[this.currentInstructionAddress + 1] + this.pc;\r\n\r\n // add two cycles if crossing page boundary, otherwise one\r\n this.cycles += ((this.pc) & 0xff00) != (address & 0xff00) ? 2 : 1;\r\n return address;\r\n }\r\n case CPU6502Instruction.ABSOLUTE:\r\n return (this.memory[this.currentInstructionAddress + 1] & 0xff) + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8);\r\n case CPU6502Instruction.ABSOLUTE_X:\r\n case CPU6502Instruction.ABSOLUTE_Y: {\r\n // read low-byte of the address\r\n final int lowAddress = (this.memory[this.currentInstructionAddress + 1] & 0xff) + (instruction.addressMode == CPU6502Instruction.ABSOLUTE_Y ? this.y : this.x);\r\n\r\n // if over page boundary then do another access => one more cycle\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8)) & 0xffff;\r\n }\r\n\r\n default:\r\n throw new RuntimeException(\"Illegal address mode for instruction \" + instruction.toString() + \" ($\" + Integer.toHexString(instruction.opCode) + \")\");\r\n }\r\n }", "public Function getFunctionContaining(Address addr);", "public Address getStartAddress() {\n\t\treturn baseAddress;\n\t}", "private Segment getSegment(int addr, boolean get) throws ProgramException {\n Set<Segment> found = memory.get(addr);\n if (found.isEmpty()) {\n throw new ProgramException(get ? ErrorType.ADDRL : ErrorType.ADDRS);\n }\n return found.iterator().next();\n }", "public CodeUnit getDefinedCodeUnitAfter(Address addr);", "private static int firstPassParse(String line, int offset)\r\n {\r\n String[] tokens = line.split(\"[\\\\s,]+\");\r\n\r\n if(tokens.length <= 0)\r\n {\r\n return offset;\r\n }\r\n \r\n if(!isOpcode(tokens[0]) && !tokens[0].startsWith(\".\"))\r\n {\r\n int address = beginningAddress + offset;\r\n \r\n if(isHex(tokens[0]))\r\n {\r\n throw new AssemblerException(\"Invalid label on line: \" + line);\r\n }\r\n else\r\n {\r\n symbolTable.put(tokens[0], address);\r\n }\r\n }\r\n\r\n return offset + ADDRESS_OFFSET;\r\n }", "private String getLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return \"(\" + symbols[key] + \")\";\n }\n return \"\";\n }", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public int getAddressOfEntryPoint()\n throws IOException, EndOfStreamException\n {\n return peFile_.readInt32(relpos(Offsets.ADDRESS_OF_ENTRY_POINT.position));\n }", "public CodeUnit getCodeUnitAfter(Address addr);", "public Data getDefinedDataBefore(Address addr);", "protected int getStartAddress() {\r\n return (readByte(RESET_VECTOR) & 0xff) + ((readByte(RESET_VECTOR + 1) & 0xff) << 8);\r\n }", "private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }", "Instruction asInstruction();", "public @Nullable Op getOp(int address) {\n return getTemplateNode(address).getOp();\n }", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Data getDataBefore(Address addr);", "public abstract Address getBootImageStart();", "AddressI getAddress();", "public int getInstruction(int index){\n \tif (index % 4 != 0){ //check to see if the index is aligned\n\t\t\tSystem.out.println(\"Wrong number for PC\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\treturn memory[(index / 4)];\n }", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "private Expression addressOf (Expression expression) {\n return expression;\n }", "public com.a9.spec.opensearch.x11.QueryType.StartPage xgetStartPage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.StartPage target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.StartPage)get_store().find_attribute_user(STARTPAGE$12);\n return target;\n }\n }", "public Label\ngetStartLabel();", "public int getReturnAddressOffset();", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Loc getLoc();", "public final int getLine()\n\t{\n\t\treturn address >>> 8 & 0x0F;\n\t}", "public static int offset_addr() {\n return (0 / 8);\n }", "Position<T> first();", "IRBasicBlock getEntry();", "public Variable getVariableContaining(int offset);", "Constant getStartOffsetConstant();", "public int findGeneStart(int startAt)\n {\n //TODO: find the location, if any of the first\n // ATG sequence starting at startAt\n return -1;\n }", "public PixelPoint getStartPoint ()\r\n {\r\n Point start = glyph.getLag()\r\n .switchRef(\r\n new Point(getStart(), line.yAt(getStart())),\r\n null);\r\n\r\n return new PixelPoint(start.x, start.y);\r\n }", "public int getStart() {\r\n\t\treturn this.offset;\r\n\t}", "public Coordinate getStart( )\n\t{\n\t\treturn startLocation;\n\t}", "public Data getDefinedDataContaining(Address addr);", "private Place getFromPlace(Element passageElement, ArrayList<Place> places) {\n Place start = null;\n for (int i = 0; i <= places.size() - 1; i++) {\n if (passageElement.getElementsByTagName(\"comeFrom\").item(0).getTextContent()\n .equals(places.get(i).getName())) {\n start = places.get(i);\n }\n }\n return start;\n }", "public Symbol findEntryLocal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null || (l.get(0).level < scopeLevel))\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "public java.math.BigInteger getStartPage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTPAGE$12);\n if (target == null)\n {\n return null;\n }\n return target.getBigIntegerValue();\n }\n }", "public int load(int offset){\n return runStack.load(offset);\n }", "static int findraslot(Memory mem, int addr) {\r\n\t\t// afbf0020 sw [sp +32] = ra\r\n\t\tfor (int n = 0; n < 8; n++) {\r\n\t\t\tint isn = mem.load_word(addr + (n * 4));\r\n\t\t\tif ((isn & 0xffff0000) == 0xafbf0000) {\r\n\t\t\t\tshort imm = (short) isn;\r\n\t\t\t\treturn imm;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public String getInstruction()\n\t\t{\n\t\t\treturn m_instruction;\n\t\t}", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public List<DexlibAbstractInstruction> instructionsBefore(DexlibAbstractInstruction instruction) {\n int i = instructions.indexOf(instruction);\n if (i == -1) {\n throw new IllegalArgumentException(\"Instruction \" + instruction + \" not part of this body.\");\n }\n\n List<DexlibAbstractInstruction> l = new ArrayList<DexlibAbstractInstruction>();\n l.addAll(instructions.subList(0, i));\n Collections.reverse(l);\n return l;\n }", "String getBegin();", "int getStartSegment();", "public byte get(int addr) throws ProgramException {\n return getSegment(addr, true).get(addr);\n }", "private void findStartOfBlock () {\n int index = 0;\n blockEnded = false;\n blockStarted = false;\n while ((! blockStarted) && (! endOfText())) {\n String line = getNextLine();\n if (line.equals (getBlockStart())) {\n blockStarted = true;\n } // end if line contains block start string\n } // end while looking for start of block\n lineHasLabel = false;\n while ((! lineHasLabel) && (! endOfText())) {\n getNextLine();\n }\n }", "public Block getStart () {\n\t\treturn start;\n\t}", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "private String getDeasLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return symbols[key] + \": \";\n }\n return \"\";\n }", "public Instruction getInstruction() {\n return this.instruction;\n }", "public int getPin(String n) {\n Integer i = (Integer)pinAssignments.get(n);\n if ( i == null )\n throw new NoSuchElementException(StringUtil.quote(n)+\" pin not found\");\n return i.intValue();\n }", "public Void visit(NasmAddress operand){\n return null;\n }", "@Override\n public Annotation getInstructionPointerAnnotation(final IEditorPart editorPart, final IStackFrame frame) {\n return null;\n }", "public Element getStartExpression() {\n\t\treturn startExpression;\n\t}", "public Addr getLocationOnStack() {\n\n\t\tImm immediateStackPointerOffset = new Imm(String.valueOf(this.spOffset));\n\t\tAddr spilledValueLocationOnStack = new Addr(immediateStackPointerOffset, this.sp);\n\t\treturn spilledValueLocationOnStack;\n\t}", "public int rva2offset(Address address) {\n\t\tint offset = -1;\n\t\tfor(IMAGE_SECTION_HEADER section:peFileSections) {\n\t\t\tif(address.getAddr32() >= section.getVirtualAddress()\n\t\t\t&& address.getAddr32() < section.getVirtualAddress() + section.getVirtualSize()) {\n\t\t\t\toffset = address.getAddr32() - section.getVirtualAddress() + section.getPointerToRawData();\n\t\t\t\treturn offset;\n\t\t\t}\n\t\t}\n\t\tif(address.getAddr32() < peOptionalHeader.getSizeOfHeaders())\n\t\t\treturn address.getAddr32();\n\t\treturn offset;\n\t}", "Long getStartAt();", "@Override\n\tpublic Address getAddress() {\n\t\treturn (Address)map.get(ADDRESS);\n\t}", "String getMarkingInstruction();", "public static InstructionBlock readInstructionBlock(\n String filepath)\n {\n try\n {\n XStream xstream = new XStream();\n FileReader fileIn = new FileReader(filepath);\n BufferedReader read = new BufferedReader(fileIn);\n String complete = \"\";\n String temp;\n while ((temp = read.readLine()) != null)\n {\n complete = complete + temp;\n }\n InstructionBlock instructions =\n (InstructionBlock) xstream.fromXML(complete);\n return instructions;\n } catch (IOException exc)\n {\n System.out.println(\"There was a problem reading the \" +\n \"instructions file\");\n exc.printStackTrace();\n System.exit(1);\n }\n return null;\n }", "public org.xmlsoap.schemas.wsdl.soap.TAddress getAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().find_element_user(ADDRESS$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String getInstruction(){\n\t\treturn this.instruction;\n\t}", "public Instruction nextInstruction() {\n return this.instructionList.next();\t\n }", "public int findGeneStart()\n {\n return findGeneStart(0);\n }", "public T findStartOfCircle() {\n \tNode<T> current = head;\n \tList<T> seen = new ArrayList<>();\n \twhile (true) {\n \t\tseen.add(current.val);\n \t\tif (seen.contains(current.next.val)) return current.next.val;\n \t\telse current = current.next;\n\t\t}\n }", "private Addr nextPC() {\n if (inDelaySlotQueue()) {\n // Next address\n return currentAddr.inc();\n }\n\n // If there is a jump scheduled, return it\n if (jump != null) {\n var jumpAddr = jump;\n jump = null;\n return jumpAddr;\n }\n\n // Next address\n return currentAddr.inc();\n }", "public Instruction startNode(@Nullable final PsiElement element) {\n final Instruction instruction = new InstructionImpl(this, element);\n addNode(instruction);\n checkPending(instruction);\n return instruction;\n }", "String getIfBegin();", "static Optional<Instruction> of(char letter, int distance) {\n Optional<Instruction> result;\n if (letter == 'F') {\n result = Optional.of(new MoveForward(distance));\n } else {\n result = Optional.empty();\n }\n return result;\n }", "public com.apatar.cdyne.ws.demographix.PlaceInfo getPlaceIDbyAddress(java.lang.String addressLine1, java.lang.String city, java.lang.String stateAbbrev, java.lang.String zipCode, java.lang.String licenseKey) throws java.rmi.RemoteException;", "public int getStartPC() {\n\t\treturn startPC & 0xffff;\n\t}", "public AccountInterface getAccount(String _address) {\n\t\tfor (AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(_address))\n\t\t\t\treturn account;\n\t\t}\n\t\treturn null;\t\t\n\t}", "public java.lang.String getFromAddress() {\n\t\treturn fromAddress;\n\t}", "String getFirstIndex();" ]
[ "0.74550736", "0.7238228", "0.64863926", "0.6310099", "0.618777", "0.6185855", "0.5617643", "0.560426", "0.56039083", "0.5563262", "0.5492868", "0.53707594", "0.53705496", "0.5205246", "0.5192263", "0.51133496", "0.51011926", "0.509219", "0.5088316", "0.5068159", "0.5065077", "0.5058026", "0.50142723", "0.50063956", "0.49768582", "0.49532473", "0.49379376", "0.49220434", "0.49105722", "0.4865424", "0.48468044", "0.48397738", "0.48313627", "0.48085195", "0.48079976", "0.4806549", "0.47926944", "0.4769443", "0.47692645", "0.47666186", "0.47605658", "0.47601047", "0.4746759", "0.47425228", "0.4742398", "0.47388962", "0.47361958", "0.47155634", "0.4696885", "0.46849874", "0.46638408", "0.46532145", "0.46526107", "0.46487373", "0.46434522", "0.46388903", "0.46336585", "0.4611641", "0.46001044", "0.45974055", "0.4594624", "0.45932242", "0.45866576", "0.45850125", "0.45805505", "0.45723328", "0.45696634", "0.45654514", "0.4565039", "0.45630577", "0.45498654", "0.45381665", "0.4530372", "0.45291927", "0.45285025", "0.4519919", "0.45162478", "0.4513507", "0.44925126", "0.44917673", "0.4485463", "0.44803938", "0.44787806", "0.44704702", "0.44659507", "0.44602236", "0.44578958", "0.4450318", "0.44489348", "0.44383377", "0.44325906", "0.44260582", "0.4425564", "0.44212788", "0.44146156", "0.44065443", "0.44028243", "0.4396599", "0.43860233", "0.43730652" ]
0.71612144
2
get the Instruction that contains the given address. If an Instruction is defined that contains that address, it will be returned. Otherwise, null will be returned.
public Instruction getInstructionContaining(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Instruction getInstructionAt(Address addr);", "private SimInstruction getInstruction(Addr address) {\n var inst = decodedInstructions.get(address);\n\n if (inst != null) {\n return inst;\n }\n\n // Try to decode instruction\n var rawInstruction = program.get(address);\n\n // System.out.println(\"INSTRUC: \" + instructions);\n SpecsCheck.checkNotNull(rawInstruction,\n () -> \"No program instruction found at address \" + address.toNumber() + \" (\" +\n address + \")\");\n\n var microCodeInstruction = decoder.decode(rawInstruction, this);\n decodedInstructions.put(address, microCodeInstruction);\n\n return microCodeInstruction;\n }", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "Optional<MemoryAddress> lookup(String name);", "public Instruction getInstructionAfter(Address addr);", "public Instruction getInstructionBefore(Address addr);", "public CodeUnit getCodeUnitContaining(Address addr);", "public Instruction getInstruction(long index){\n\t\tInstruction instruction = null;\n\t\tint effectiveAddress = (int) (index-Constants.START_ADDRESS);\n\t\tif(effectiveAddress>0)\n\t\t{\n\t\t\teffectiveAddress = effectiveAddress/4;\t\t\t\n\t\t}\n\t\tif(instructions.size()>effectiveAddress)\n\t\t\tinstruction = instructions.get(effectiveAddress);\n\t\treturn instruction;\n\t}", "public @Nullable Op getOp(int address) {\n return getTemplateNode(address).getOp();\n }", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Data getDefinedDataContaining(Address addr);", "private String getLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return \"(\" + symbols[key] + \")\";\n }\n return \"\";\n }", "public CodeUnit getCodeUnitAt(Address addr);", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public Function getFunctionContaining(Address addr);", "AddressI getAddress();", "public Data getDataContaining(Address addr);", "private int getOperandAddress(final CPU6502Instruction instruction) {\r\n // switch address mode\r\n switch (instruction.addressMode) {\r\n case CPU6502Instruction.ZERO:\r\n return this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n case CPU6502Instruction.ZERO_X:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n case CPU6502Instruction.ZERO_Y:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.y) & 0xff;\r\n case CPU6502Instruction.INDIRECT: {\r\n final int lowAddress = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n final int highAddress = (this.memory[this.currentInstructionAddress + 2] & 0xff) << 8;\r\n\r\n return (readByte(highAddress + lowAddress) & 0xff) + ((readByte(highAddress + ((lowAddress + 1) & 0xff)) & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_X: {\r\n final int p = ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n\r\n return (this.memory[p] & 0xff) + ((this.memory[(p + 1) & 0xff] & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_Y: {\r\n // this is the address on the zero page where we read from\r\n final int p = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n\r\n // if over page boundary then do another access => one more cycle\r\n final int lowAddress = (this.memory[p] & 0xff) + this.y;\r\n\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[(p + 1) & 0xff] & 0xff) << 8)) & 0xffff;\r\n }\r\n case CPU6502Instruction.RELATIVE: {\r\n // calculate relative address\r\n final int address = this.memory[this.currentInstructionAddress + 1] + this.pc;\r\n\r\n // add two cycles if crossing page boundary, otherwise one\r\n this.cycles += ((this.pc) & 0xff00) != (address & 0xff00) ? 2 : 1;\r\n return address;\r\n }\r\n case CPU6502Instruction.ABSOLUTE:\r\n return (this.memory[this.currentInstructionAddress + 1] & 0xff) + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8);\r\n case CPU6502Instruction.ABSOLUTE_X:\r\n case CPU6502Instruction.ABSOLUTE_Y: {\r\n // read low-byte of the address\r\n final int lowAddress = (this.memory[this.currentInstructionAddress + 1] & 0xff) + (instruction.addressMode == CPU6502Instruction.ABSOLUTE_Y ? this.y : this.x);\r\n\r\n // if over page boundary then do another access => one more cycle\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8)) & 0xffff;\r\n }\r\n\r\n default:\r\n throw new RuntimeException(\"Illegal address mode for instruction \" + instruction.toString() + \" ($\" + Integer.toHexString(instruction.opCode) + \")\");\r\n }\r\n }", "Instruction asInstruction();", "private Expression addressOf (Expression expression) {\n return expression;\n }", "private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }", "public AccountInterface getAccount(String _address) {\n\t\tfor (AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(_address))\n\t\t\t\treturn account;\n\t\t}\n\t\treturn null;\t\t\n\t}", "private SimEnt getInterface(NetworkAddr nAddr)\n\t{\n\t\tSimEnt routerInterface=null;\n\t\tif(nAddr.networkId() == _id.networkId()) {\n\t\t\tfor(int i=0; i<_interfaces; i++)\n\t\t\t\tif (_routingTable[i] != null)\n\t\t\t\t{\n\t\t\t\t\tif (_routingTable[i].node() == nAddr.nodeId())\n\t\t\t\t\t{\n\t\t\t\t\t\trouterInterface = _routingTable[i].link();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(routerInterface == null)\n\t\t\t\trouterInterface = _HA;\n\t\t}\n\t\telse {\n\t\t\tfor(int i=0; i<_interfaces; i++)\n\t\t\t\tif (_routingTable[i] != null)\n\t\t\t\t{\n\t\t\t\t\tif (_routingTable[i].network() == nAddr.networkId())\n\t\t\t\t\t{\n\t\t\t\t\t\trouterInterface = _routingTable[i].link();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\treturn routerInterface;\n\t}", "String getInstruction();", "private Segment getSegment(int addr, boolean get) throws ProgramException {\n Set<Segment> found = memory.get(addr);\n if (found.isEmpty()) {\n throw new ProgramException(get ? ErrorType.ADDRL : ErrorType.ADDRS);\n }\n return found.iterator().next();\n }", "public Address getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "public byte get(int addr) throws ProgramException {\n return getSegment(addr, true).get(addr);\n }", "public CodeUnit getDefinedCodeUnitAfter(Address addr);", "static int findraslot(Memory mem, int addr) {\r\n\t\t// afbf0020 sw [sp +32] = ra\r\n\t\tfor (int n = 0; n < 8; n++) {\r\n\t\t\tint isn = mem.load_word(addr + (n * 4));\r\n\t\t\tif ((isn & 0xffff0000) == 0xafbf0000) {\r\n\t\t\t\tshort imm = (short) isn;\r\n\t\t\t\treturn imm;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public boolean containsAddress(String address) {\n\t\treturn tseqnums.containsKey(address);\n\t}", "public org.xmlsoap.schemas.wsdl.soap.TAddress getAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().find_element_user(ADDRESS$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public CPU6502Instruction getInstruction(final int opCode) {\r\n return this.instructions[opCode];\r\n }", "private final byte getOperand(final CPU6502Instruction instruction) {\r\n return instruction.addressMode == CPU6502Instruction.IMMEDIATE\r\n ? this.memory[this.currentInstructionAddress + 1]\r\n : readByte(getOperandAddress(instruction));\r\n }", "public int getInstruction(int index){\n \tif (index % 4 != 0){ //check to see if the index is aligned\n\t\t\tSystem.out.println(\"Wrong number for PC\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\treturn memory[(index / 4)];\n }", "public com.apatar.cdyne.ws.demographix.PlaceInfo getPlaceIDbyAddress(java.lang.String addressLine1, java.lang.String city, java.lang.String stateAbbrev, java.lang.String zipCode, java.lang.String licenseKey) throws java.rmi.RemoteException;", "public HDAddressDescription findAddress(Address addr) {\n HDAddressDescription retval = null;\n for (HDAccount acct : mAccounts) {\n retval = acct.findAddress(addr);\n if (retval != null)\n return retval;\n }\n return retval;\n }", "protected int isExternByAddress(String address) {\n\t\ttry {\n\t\t\tPreparedStatement pstmt = \n\t\t\t\t\tthis.agent.getDatabaseManager().getConnection().prepareStatement(\n\t\t\t\t\t\t\tthis.agent.getDatabaseManager().selectByAddress);\n\t pstmt.setString(1,address);\n\t ResultSet rs = pstmt.executeQuery();\n\t return rs.getInt(\"isExtern\");\n\t\t} catch (Exception e) {\n\t\t\tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to get isExtern of address %s in the database\\n\",address), e);\n\t\t}\n return 0; // Pas accessible\n\t}", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "public Void visit(NasmAddress operand){\n return null;\n }", "private String getDeasLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return symbols[key] + \": \";\n }\n return \"\";\n }", "private Place getPlace(String identifierPlace) {\n\t\tPlace place = null;\n\t\tfor(Place p: places ){\n\t\t\tif(p.getName().equals(identifierPlace)){\n\t\t\t\tplace = p;\n\t\t\t}\n\t\t}\n\t\treturn place;\n\t}", "public byte get(int address) {\n try {\n return direct_read(address);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }", "public EmployeeInfo searchFromTable(int employeeNum){\r\n \r\n int targetBucket = calcBucket(employeeNum);\r\n \r\n\t\tfor(int i = 0 ; i < buckets[targetBucket].size(); i++) {\r\n\t\t\tif (buckets[targetBucket].get(i).getEmpNum() == employeeNum) {\r\n EmployeeInfo locatedEmployee = buckets[targetBucket].get(i);\r\n return locatedEmployee;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n \r\n }", "@Override\n\tpublic Address getAddress() {\n\t\treturn (Address)map.get(ADDRESS);\n\t}", "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "public int getPin(String n) {\n Integer i = (Integer)pinAssignments.get(n);\n if ( i == null )\n throw new NoSuchElementException(StringUtil.quote(n)+\" pin not found\");\n return i.intValue();\n }", "public CodeUnit getCodeUnitAfter(Address addr);", "String getAddress(int type);", "IRBasicBlock getEntry();", "public Address searchByName(String name) {\n if (name == null || !addressBook.containsKey(name))\n throw new NullPointerException();\n return addressBook.get(name);\n }", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public static IPAddress getByAddress(byte[] addr)\n\t\tthrows UnknownHostException\n\t{\n\t\tIPAddress result = null;\n\t\tjava.net.InetAddress jnetAddr = null;\n\t\tif(addr.length==16) {\n\t \tStringBuffer sb = new StringBuffer();\n\t \tfor(int i=0; i<16; i=i+2) {\n\t \t\tsb.append(Integer.toHexString(0xFF & addr[i]));\n\t \t\tsb.append(Integer.toHexString(0xFF & addr[i+1]));\n\t \t\tif(i!=14) {\n\t \t\t\tsb.append(\":\");\n\t \t\t}\n\t \t}\n\t \tjnetAddr = java.net.InetAddress.getByName(sb.toString());\n\t\t} else {\n\t\t\tjnetAddr = java.net.InetAddress.getByAddress(addr);\n\t\t}\n\t\tif (jnetAddr instanceof java.net.Inet4Address) {\n\t\t\tresult = new IP4Address(addr, jnetAddr);\n\t\t}\n\t\telse if (jnetAddr instanceof java.net.Inet6Address) {\n\t\t\tresult = new IP6Address(addr, jnetAddr);\n\t\t}\n\t\treturn result;\n\t}", "public Friend findFriend(Address addr);", "public int hitOrMiss(String addressTag){\n\t\tif(blocks[0].getHexTag() == null)\n\t\t\treturn -1;\n\t\tfor(i = 0; i < blocksPerSet; i++){\n\t\t\tif(blocks[i].getValid() == false)\n\t\t\t\t\treturn -1;\n\t\t\tif((blocks[i].getHexTag()).equals(addressTag))\n\t\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}", "public Instruction getInstruction() {\n return this.instruction;\n }", "IsisNeighbor lookup(MacAddress isisNeighborMac);", "public boolean isInstr(){\n\t\t\tif (type == MemoryType.INSTR) {return true;\n\t\t\t} return false;\n\t\t}", "boolean isAddressOf(int addr) {\n return addr == mAddress;\n }", "private int findBlock(long addr) {\n\t\t// find cache by splitting addr into multiple segs\n\t\tint setIndex = (int) ((addr & 0x7FC0) >>> 6);\n\t\tlong tag = (addr & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t// search for the set to check for existence\n\t\tfor (int j = 0; j < 8; j++) {\n\t\t\tif (cache[setIndex][j] == tag) {\n\t\t\t\tpolicies[setIndex].updateAt(j);\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t}\n\t\tif(usePrefetch){\n\t\t\t//fetch from memory; preftecher will fetch many other relevant addresses\n\t\t\tArrayList<Long> address = pf.getPrefetchedAddress(addr);\n\t\t\tfor(long add : address) {\n\t\t\t\tsetIndex = (int) ((add & 0x7FC0) >>> 6);\n\t\t\t\ttag = (add & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\t\tcache[setIndex][index] = tag;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\tcache[setIndex][index] = tag;\n\t\t}\n\t\t// after all, we need to update the entry\n\t\treturn 4;\n\t}", "public static Sensor getSensor(String name, String address) {\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tif (mSensors.get(x).mName.equals(name)) {\n\t\t\t\tif (mSensors.get(x).mAddress.equals(address))\n\t\t\t\t\treturn mSensors.get(x);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Variable getVariableContaining(int offset);", "long getAddress(ByteBuffer buffer);", "@Override\n public Account get(final Address address) {\n BonsaiLayeredWorldState currentLayer = this;\n while (currentLayer != null) {\n final Optional<StateTrieAccountValue> maybeStateTrieAccount =\n currentLayer.trieLog.getAccount(address);\n final Optional<StateTrieAccountValue> maybePriorStateTrieAccount =\n currentLayer.trieLog.getPriorAccount(address);\n if (currentLayer == this && maybeStateTrieAccount.isPresent()) {\n return new BonsaiAccount(\n BonsaiLayeredWorldState.this, address, maybeStateTrieAccount.get(), false);\n } else if (maybePriorStateTrieAccount.isPresent()) {\n return new BonsaiAccount(\n BonsaiLayeredWorldState.this, address, maybePriorStateTrieAccount.get(), false);\n } else if (maybeStateTrieAccount.isPresent()) {\n return null;\n }\n if (currentLayer.getNextWorldView().isEmpty()) {\n currentLayer = null;\n } else if (currentLayer.getNextWorldView().get() instanceof BonsaiLayeredWorldState) {\n currentLayer = (BonsaiLayeredWorldState) currentLayer.getNextWorldView().get();\n } else {\n return currentLayer.getNextWorldView().get().get(address);\n }\n }\n return null;\n }", "@Override protected void fetch() throws MainMemory.InvalidAddressException {\n int pcVal = pc.get();\n UnsignedByte[] ins = mem.read (pcVal, 2);\n byte opCode = (byte) (ins[0].value() >>> 4);\n insOpCode.set (opCode);\n insOp0.set (ins[0].value() & 0x0f);\n insOp1.set (ins[1].value() >>> 4);\n insOp2.set (ins[1].value() & 0x0f);\n insOpImm.set (ins[1].value());\n pcVal += 2;\n switch (opCode) {\n case 0x0:\n case 0xb:\n\tlong opExt = mem.readIntegerUnaligned (pcVal);\n\tpcVal += 4;\n\tinsOpExt.set (opExt);\n\tinstruction.set (ins[0].value() << 40 | ins[1].value() << 32 | opExt);\n\tbreak;\n default:\n\tinsOpExt.set (0);\n\tinstruction.set (ins[0].value() << 40 | ins[1].value() << 32);\n }\n pc.set (pcVal);\n }", "public CodeUnit getCodeUnitBefore(Address addr);", "public static Icon lookup(String name) \r\n\t{\r\n\t\tEntry\t\ttab[] = m_table;\r\n\t\tEntry\t\te;\r\n\t\tint\t\t\tindex;\r\n\t\r\n\t\tif (tab != null) {\r\n\t\t\tindex = (name.hashCode() & 0x7FFFFFFF) % tab.length;\r\n\t\r\n\t\t\tfor (e = tab[index] ; e != null ; e = e.m_next) {\r\n\t\t\t\tif (name.compareTo(e.m_name) == 0) {\r\n\t\t\t\t\treturn(e.m_value);\r\n\t\t}\t}\t}\r\n\t\treturn null;\r\n\t}", "public com.kcdataservices.partners.kcdebdmnlib_common.businessobjects.address.v1.Address getAddressReq(Address address){\n\t\tcom.kcdataservices.partners.kcdebdmnlib_common.businessobjects.address.v1.Address addressReq =\n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_common.businessobjects.address.v1.Address();\n\t\t//Start theAV-3749/HBsi 52 Enhancement of emergency info tab for passegner\t\n\t\taddressReq.setStreetAddress( address.getStreetAddress() );\n\t\taddressReq.setCity( address.getCity() );\n\t\taddressReq.setState( address.getState() );\n\t\t//Business wise not require for now\n\t\t//addressReq.setCountry( address.getCountry() );\n\t\taddressReq.setZipCode( address.getZipCode() );\n\t\t//End of the AV-3749/HBsi 52 Enhancement of emergency info tab for passegner\t\n\t\treturn addressReq;\n\t}", "public Data getDefinedDataAt(Address addr);", "public static void loadInstructionOntoDisk(String address,String instruction){\n\t\tmemory.put(address, instruction);\n\t}", "public static Instruction getInstance() {\n \t\treturn staticInstance;\n \t}", "public static Instruction getInstance() {\n \t\treturn staticInstance;\n \t}", "public static Instruction getInstance() {\n \t\treturn staticInstance;\n \t}", "public Address getValue() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "public LayoutThread find(int x, int y) {\n Iterator<LayoutThread> it = map.keySet().iterator(); while (it.hasNext()) {\n LayoutThread layout_thread = it.next(); if (map.get(layout_thread).contains(x,y)) return layout_thread;\n }\n return null;\n }", "public NodeDB.NodeInfo getNodeByInetAddress(InetAddress a) { synchronized (this.nodedb) {\n\t\tfor (NodeInfo ni : this.nodedb.values()) {\n\t\t\tif (ni.nodecomms.getAddress().equals(a))\n\t\t\t\treturn ni;\n\t\t}\n\t\treturn null;\n\t}}", "public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }", "public Optional<Identification> getIdentificationFor(X x) {\n Identification identification = map.get(x);\n if (identification == null || identification.equals(placeholder)) {\n return Optional.empty();\n } else {\n return Optional.of(identification);\n }\n }", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "Instruction createInstruction();", "public Entry find(Object key) {\n int hashCode = key.hashCode();\n int index = compFunction(hashCode);\n\n if(defTable[index].isEmpty()) {\n return null;\n }\n\n Entry entry = new Entry();\n ListNode current = defTable[index].front();\n\n try{\n while(true) {\n if(((Entry) current.item()).key().equals(key)) {\n entry.key = key;\n entry.value = ((Entry) current.item()).value();\n return entry;\n }\n if(current==defTable[index].back()) {\n break;\n }\n current = current.next();\n }\n } catch(Exception err) {\n System.out.println(err);\n }\n return null;\n }", "public <T extends IConstruct> T byIdentity(Map<ILocator, T> map, ILocator l) {\r\n\t\tif (map == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn map.get(l);\r\n\t}", "public Symbol findEntryLocal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null || (l.get(0).level < scopeLevel))\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "static int check_for_label(String instruction){\n\t\tif(instruction.length()<=4)//For memory values\n\t\t\treturn 0;\n\t\tString first_code = instruction.split(\" \")[0];\n\t\tint len = -1;\n\t\tfor(int i=0;i<possible_codes.length;i++)\n\t\t\tif(possible_codes[i].equals(first_code))\n\t\t\t\tlen = 0;\n\t\tif(len!=0){\n\t\t\tlabels.put(first_code,address);\n\t\t\tlen = first_code.length()+1;\n\t\t}\n\t\treturn len;\n\t}", "Interface getMatchingInterface(IpAddress ip);", "NetworkInterface getNetworkInterfaceByAddress(InterfaceAddress interfaceAddress);", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "boolean hasAddress();", "boolean hasAddress();", "protected Optional<Tile> getTile(Coordinate c) {\n\t\tfor (Tile t : model.getPuzzle()) {\n\t\t\tif (t.contains(c)) {\n\t\t\t\treturn Optional.of(t);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn Optional.empty(); \n\t}", "public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}", "static Optional<Instruction> of(char letter, int distance) {\n Optional<Instruction> result;\n if (letter == 'F') {\n result = Optional.of(new MoveForward(distance));\n } else {\n result = Optional.empty();\n }\n return result;\n }", "public MapCell getNeighbor(String neighbor){\n\t\tMapCell neighborCell = null;\n\t\ttry {\n\t\t\tif(neighbor.equalsIgnoreCase(\"east\")){\t\t\t\t\n\t\t\t\tneighborCell = eastCell;\n\t\t\t}else if(neighbor.equalsIgnoreCase(\"north\")){\t\t\t\t\n\t\t\t\tneighborCell = northCell;\n\t\t\t}else if(neighbor.equalsIgnoreCase(\"west\")){\t\t\t\t\n\t\t\t\tneighborCell = westCell;\n\t\t\t}else if(neighbor.equalsIgnoreCase(\"south\")){\t\t\t\t\n\t\t\t\tneighborCell = southCell;\n\t\t\t}\n\t\t}catch(NullPointerException np){\n\t\t\treturn neighborCell;\n\t\t}catch(Exception e){\n\t\t\treturn neighborCell;\n\t\t}\n\t\treturn neighborCell;\n\t}", "private Access getAvailableReg(Var3 variable) {\n Integer index = getVarIndex(variable);\n HashSet<Integer> description = addrDescriptor.get(index);\n if(!description.isEmpty()) {\n //take the first good register\n for(Integer i : description)\n return new Reg(getArmRegNum(i));\n }\n return null;\n }", "public String getInstruction()\n\t\t{\n\t\t\treturn m_instruction;\n\t\t}", "public InternetAddress getFromAddress();", "public static InstructionBlock readInstructionBlock(\n String filepath)\n {\n try\n {\n XStream xstream = new XStream();\n FileReader fileIn = new FileReader(filepath);\n BufferedReader read = new BufferedReader(fileIn);\n String complete = \"\";\n String temp;\n while ((temp = read.readLine()) != null)\n {\n complete = complete + temp;\n }\n InstructionBlock instructions =\n (InstructionBlock) xstream.fromXML(complete);\n return instructions;\n } catch (IOException exc)\n {\n System.out.println(\"There was a problem reading the \" +\n \"instructions file\");\n exc.printStackTrace();\n System.exit(1);\n }\n return null;\n }", "@Override\n\tpublic InternalCoordinate findJump(InternalCoordinate c) {\n\t\treturn null;\n\t}", "@Nullable\n @Override\n public Workload getWorkloadByIp(String ip) {\n for (Workload workload : workloadRepository.findAll()) {\n if (workload.getIpAddress().equals(ip)) {\n return workload;\n }\n }\n return null;\n }", "private TType searchLabelInAssembly(TInLabel inlabel) throws TamagoCCException {\n\t\tIterator<TDefinition> definitions = ((TAssembly)entity).getDefinitions();\r\n\t\twhile(definitions.hasNext()) {\r\n\t\t\tTDefinition definition = (TDefinition)definitions.next();\r\n\t\t\tif(definition.getComponentLabel().equals(((TVariable)inlabel.getTarget()).getVariable())) {\r\n\t\t\t\tTTamago component = TamagoCCPool.getDefaultPool().getTreeAbstractSyntax(definition.getComponentName(),definition.getComponentModule());\r\n\t\t\t\tTamagoCCSearchType searchtype = new TamagoCCSearchType(component,null,new Stack<TInLabel>(),inlabel.getSubTerm());\r\n\t\t\t\treturn searchtype.getType();\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new TamagoCCException(\"TamagoCCSearchType<searchLabelInAssembly> : unfind label in definitions (\"+inlabel.getTarget()+\")\");\r\n\t}", "boolean hasHasAddress();" ]
[ "0.7403498", "0.68826085", "0.6754452", "0.6346563", "0.62359613", "0.6088273", "0.6061082", "0.574899", "0.53747404", "0.5355435", "0.52627", "0.5262048", "0.52470297", "0.5225712", "0.5212831", "0.51795363", "0.5174152", "0.50667906", "0.50645185", "0.5055936", "0.5018734", "0.4973366", "0.49694806", "0.4915981", "0.49022073", "0.4855209", "0.47908717", "0.47700343", "0.47381327", "0.47219938", "0.47111422", "0.47044417", "0.46877414", "0.4681271", "0.46797636", "0.46562785", "0.46556574", "0.4645941", "0.46444032", "0.46413857", "0.4635826", "0.46215892", "0.4617166", "0.45987317", "0.45963806", "0.45855314", "0.45842496", "0.4574046", "0.45641446", "0.4557646", "0.45400974", "0.45382175", "0.45278996", "0.45277438", "0.45256615", "0.4524925", "0.4512516", "0.45102435", "0.4510198", "0.45065066", "0.45058504", "0.4486649", "0.44744956", "0.44718504", "0.44666862", "0.44611514", "0.44578463", "0.44122207", "0.44068733", "0.4404314", "0.4404314", "0.4404314", "0.4398686", "0.4368448", "0.43613875", "0.4360366", "0.43583885", "0.43539172", "0.43508056", "0.4346858", "0.43408585", "0.433568", "0.4321553", "0.4319031", "0.43170613", "0.43105894", "0.4288698", "0.4288698", "0.4281965", "0.42809114", "0.427615", "0.4269898", "0.4262535", "0.42621002", "0.42614856", "0.42540938", "0.4249705", "0.42483884", "0.42401102", "0.42295042" ]
0.8223299
0
get the closest Instruction that starts at an address that is greater than the given address.
public Instruction getInstructionAfter(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public Instruction getInstructionBefore(Address addr);", "public Instruction getInstructionContaining(Address addr);", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "private int binarySearchToFindClosest(String overflowName, int bottomRecord, int topRecord) {\n // Base condition for only having two records left to choose from\n if (topRecord - bottomRecord == 1) {\n String topRecordName = getRecordCompanyName(\"normal\", topRecord);\n\n // If the name of the overflow company comes after the company name of the top record, then the top record is the closest\n if (overflowName.compareTo(topRecordName) >= 1) {\n return topRecord;\n // Otherwise, either the top and bottom records are equal length away, or the bottom record is closer, so return the bottom record\n } else {\n return bottomRecord;\n }\n // Base condition for having only 1 record left means that that record is the closest\n } else if (topRecord == bottomRecord) {\n return topRecord;\n }\n\n int middle = (topRecord + bottomRecord) / 2;\n String nameOfNormalRecord = getRecordCompanyName(\"normal\", middle);\n int alphabeticalOrder = overflowName.compareTo(nameOfNormalRecord);\n if (alphabeticalOrder == 0) {\n return middle;\n } else if (alphabeticalOrder < 0) {\n return binarySearchToFindClosest(overflowName, bottomRecord, middle);\n } else {\n return binarySearchToFindClosest(overflowName, middle + 1, topRecord);\n } \n }", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "public Instruction getInstructionAt(Address addr);", "Execution getClosestDistance();", "public int relativePosTo(long addr) {\n\t\t\tif(addr < this.start)\n\t\t\t\treturn -1;\n\t\t\tif(addr > this.end)\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "public Criteria andAddressGreaterThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"address > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "@NotNull\n private RangeInfo findNearestRangeInfo() {\n final int caretPosition = myView.getCaretPosition();\n\n for (final RangeInfo range : myRangeInfos) {\n if (range.isWithin(caretPosition)) {\n return range;\n }\n if (range.getFrom() > caretPosition) {\n return range; // Ranges are sorted, so we are on the next range. Take it, if caret is not within range\n }\n }\n\n return myRangeInfos.last();\n }", "void findNextGreaterOnRight(int a[]) {\n\t\tStack<Integer> stack = new Stack<>();\n\t\tstack.push(a[0]);\n\t\tfor(int i = 1; i < a.length; i++) {\n\t\t\twhile(stack.size() > 0 && a[i] > stack.peek()) {\n\t\t\t\tSystem.out.println(stack.pop() + \" -> \" + a[i]);\n\t\t\t}\n\t\t\tstack.push(a[i]);\n\t\t}\n\t\twhile(stack.size() != 0) {\n\t\t\tSystem.out.println(stack.pop() + \" -> -1\");\n\t\t}\n\t}", "static long closer(int arr[], int n, long x)\n {\n int index = binarySearch(arr,0,n-1,(int)x); \n return (long) index;\n }", "public CodeUnit getCodeUnitBefore(Address addr);", "public CodeUnit getCodeUnitAfter(Address addr);", "public int getLowerBound ();", "int absTopOfStack(int stackNum){\n\treturn stackNum * stackSize + stackPointer[stackNum];\n}", "public long getNextBlock(long address){\n int marker = readMarkerLowerBits(address - 1);\n int blocksize;\n if(marker == 0){\n blocksize = readLengthField(address, 1);\n return address + blocksize + 1;\n } else if(marker == 15){\n return address + 1;\n } else {\n if (isBlockUsed(address)) marker -= 8;\n blocksize = readLengthField(address, marker);\n if (isBlockUsed(address)) {\n return address + blocksize + 2 * (marker - 8) + 1;\n }\n return address + blocksize + 1;\n }\n }", "public static int closestNumber(int p, int high, int low) {\n\t\tif(p>Math.abs(high-p)) {\n\t\t\tp=high;\n\t\t}\n\t\telse {\n\t\t\tp=low;\n\t\t}\n\t\treturn p;\n\t}", "public static int binarySearchWithTheClosestNum(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// when we reach here, means target is not in the array, so we need to find the closet element from num[left] or num[right]\n\t\t// notice that, right is smailler than left now, according to the while condition, if it breaks, left > right\n\t\treturn Math.abs(target - num[left]) > Math.abs(target - num[right]) ? right : left;\n\t}", "public Node closestPrecedingNode(int id);", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "private UnconstrainedBidElement getClosest(double demandWatt) {\n UnconstrainedBidElement best = null;\n double bestDistance = Double.MAX_VALUE;\n for (UnconstrainedBidElement e : elements) {\n double distance = Math.abs(demandWatt - e.demandWatt);\n if (best == null || distance < bestDistance) {\n best = e;\n bestDistance = distance;\n }\n }\n return best;\n }", "private String getLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return \"(\" + symbols[key] + \")\";\n }\n return \"\";\n }", "private int indexOfTop(int stackNum) {\n\t\tint offset = stackNum * stackCapacity;\r\n\t\tint size = sizes[stackNum];\r\n\t\treturn offset+size-1;\r\n\t}", "static int findraslot(Memory mem, int addr) {\r\n\t\t// afbf0020 sw [sp +32] = ra\r\n\t\tfor (int n = 0; n < 8; n++) {\r\n\t\t\tint isn = mem.load_word(addr + (n * 4));\r\n\t\t\tif ((isn & 0xffff0000) == 0xafbf0000) {\r\n\t\t\t\tshort imm = (short) isn;\r\n\t\t\t\treturn imm;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public Data getDataBefore(Address addr);", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "public static BinaryExpression lessThan(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "Optional<MemoryAddress> lookup(String name);", "public static BinaryExpression greaterThan(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "public T findMin();", "private GlobeAccessPointRecord findNearestGAP(InetAddress srcAddr)\n {\n GlobeAccessPointRecord nearestGAPrec;\n FloatCoordinate coords = null;\n\n // look in our GAP lookup cache. It looks like IE5 ignores our\n // Expires: header so we might really need this for performance \n // reasons.\n synchronized(GlobeRedirector.ip2GAPCache) {\n nearestGAPrec =\n (GlobeAccessPointRecord) GlobeRedirector.ip2GAPCache.get(srcAddr);\n }\n\n /*\n * Return the GAP record if it is in the cache.\n */\n if (nearestGAPrec != null) {\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"(cached) Nearest GAP is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n return nearestGAPrec;\n }\n\n /*\n * There is no {srcAddr, nearest GAP record} pair in the cache. We need\n * the geographical coordinates associated with srcAddr to determine\n * the nearest GAP.\n */\n\n if (_cookieCoords != null) { // client cookie contains coordinates\n coords = _cookieCoords;\n }\n else {\n coords = getCoordinates(srcAddr);\n\n if (coords == null) {\n return null;\n }\n }\n\n /*\n * Calculate which GAP is nearest.\n */\n int i, dist, min = Integer.MAX_VALUE;\n CoordinateImpl srcCoords = new CoordinateImpl((int)coords.lat,\n (int)coords.longi);\n\n for (i = 0; i < _gapList.size(); i++) {\n GlobeAccessPointRecord gaprec = _gapList.get(i);\n dist = gaprec.coords.computeDistance(srcCoords);\n\n if (dist < min) {\n nearestGAPrec = gaprec;\n min = dist;\n }\n }\n\n // Cache the result.\n synchronized(GlobeRedirector.ip2GAPCache) {\n GlobeRedirector.ip2GAPCache.put(srcAddr, nearestGAPrec);\n }\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Nearest GAP of \" + srcAddr.getHostAddress()\n + \" at (\" + (int)coords.lat + \",\" + (int)coords.longi\n + \") is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n\n _cookieCoords = coords;\n return nearestGAPrec;\n }", "protected static int advanceUntil(CharBuffer array, int pos, int length, char min) {\n int lower = pos + 1;\n\n // special handling for a possibly common sequential case\n if (lower >= length || (array.get(lower)) >= (min)) {\n return lower;\n }\n\n int spansize = 1; // could set larger\n // bootstrap an upper limit\n\n while (lower + spansize < length\n && (array.get(lower + spansize)) < (min)) {\n spansize *= 2; // hoping for compiler will reduce to\n }\n // shift\n int upper = (lower + spansize < length) ? lower + spansize : length - 1;\n\n // maybe we are lucky (could be common case when the seek ahead\n // expected\n // to be small and sequential will otherwise make us look bad)\n if (array.get(upper) == min) {\n return upper;\n }\n\n if ((array.get(upper)) < (min)) {// means\n // array\n // has no\n // item\n // >= min\n // pos = array.length;\n return length;\n }\n\n // we know that the next-smallest span was too small\n lower += (spansize >>> 1);\n\n // else begin binary search\n // invariant: array[lower]<min && array[upper]>min\n while (lower + 1 != upper) {\n int mid = (lower + upper) >>> 1;\n char arraymid = array.get(mid);\n if (arraymid == min) {\n return mid;\n } else if ((arraymid) < (min)) {\n lower = mid;\n } else {\n upper = mid;\n }\n }\n return upper;\n\n }", "public @Nullable Op getOp(int address) {\n return getTemplateNode(address).getOp();\n }", "public Data getDataAfter(Address addr);", "public Location checkClosestLocation(Location toCompareTo, Location Location1, Location Location2) {\n int Distance1 = getDistance(toCompareTo, Location1);\n int Distance2 = getDistance(toCompareTo, Location2);\n if (Distance2 < Distance1)\n return Location2;\n return Location1;\n }", "public CodeUnit getDefinedCodeUnitAfter(Address addr);", "public Integer getNextHopAddress(Integer LL3PNetworknumber) {\n\t\tIterator<RouteTableEntry> tableIterator=table.iterator();\n\t\tRouteTableEntry tmp=null;\n\t\t//boolean found=false;\n\t\tInteger nextHop=null;\n\t\twhile(tableIterator.hasNext()){\n\t\t\ttmp=tableIterator.next();\n\t\t\tif (tmp.getNetworkDistancePair().getNetworkNumber().equals(LL3PNetworknumber)){\n\t\t\t\tnextHop=tmp.getNextHOP();\n\t\t\t}\n\t\t}\n\t\treturn nextHop;\n\t }", "ComparableExpression<T> min();", "public Criteria andAddressGreaterThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"address >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public Function getFunctionContaining(Address addr);", "public int findMemory( int size )\n {\n // represents the smallest available freeBlock within out freeBlock list\n // that will accommodate the size of the entry.\n int smallestFreeBlock = poolSize + 1;\n int position = -1;\n freeBlockList.moveToStart();\n freeBlockList.next();\n while ( !freeBlockList.isAtEnd() )\n {\n Object[] keyArray =\n freeBlockList.getCurrentElement().keySet().toArray();\n Integer key = (Integer)keyArray[0];\n\n if ( ( freeBlockList.getCurrentElement().get( key ) < smallestFreeBlock )\n && ( freeBlockList.getCurrentElement().get( key ) >= size ) )\n {\n position = key;\n smallestFreeBlock = freeBlockList.getCurrentElement().get( key );\n }\n freeBlockList.next();\n }\n\n return position;\n\n }", "TrackingToken lowerBound();", "public Address getClosestAddressTo(Depot d) {\n double bestDistance = Double.MAX_VALUE;\n Address bestAddress = null;\n for (Address a : addresses) {\n double distance = a.getCoordinates().companyDistanceTo(d.getCoordinates());\n if (distance < bestDistance) {\n bestAddress = a;\n bestDistance = distance;\n }\n }\n return bestAddress;\n }", "public int nextLessThan(int range) {\n return (0x7fffffff & this.nextInt()) % range;\n }", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\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\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "private int getOperandAddress(final CPU6502Instruction instruction) {\r\n // switch address mode\r\n switch (instruction.addressMode) {\r\n case CPU6502Instruction.ZERO:\r\n return this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n case CPU6502Instruction.ZERO_X:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n case CPU6502Instruction.ZERO_Y:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.y) & 0xff;\r\n case CPU6502Instruction.INDIRECT: {\r\n final int lowAddress = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n final int highAddress = (this.memory[this.currentInstructionAddress + 2] & 0xff) << 8;\r\n\r\n return (readByte(highAddress + lowAddress) & 0xff) + ((readByte(highAddress + ((lowAddress + 1) & 0xff)) & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_X: {\r\n final int p = ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n\r\n return (this.memory[p] & 0xff) + ((this.memory[(p + 1) & 0xff] & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_Y: {\r\n // this is the address on the zero page where we read from\r\n final int p = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n\r\n // if over page boundary then do another access => one more cycle\r\n final int lowAddress = (this.memory[p] & 0xff) + this.y;\r\n\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[(p + 1) & 0xff] & 0xff) << 8)) & 0xffff;\r\n }\r\n case CPU6502Instruction.RELATIVE: {\r\n // calculate relative address\r\n final int address = this.memory[this.currentInstructionAddress + 1] + this.pc;\r\n\r\n // add two cycles if crossing page boundary, otherwise one\r\n this.cycles += ((this.pc) & 0xff00) != (address & 0xff00) ? 2 : 1;\r\n return address;\r\n }\r\n case CPU6502Instruction.ABSOLUTE:\r\n return (this.memory[this.currentInstructionAddress + 1] & 0xff) + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8);\r\n case CPU6502Instruction.ABSOLUTE_X:\r\n case CPU6502Instruction.ABSOLUTE_Y: {\r\n // read low-byte of the address\r\n final int lowAddress = (this.memory[this.currentInstructionAddress + 1] & 0xff) + (instruction.addressMode == CPU6502Instruction.ABSOLUTE_Y ? this.y : this.x);\r\n\r\n // if over page boundary then do another access => one more cycle\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8)) & 0xffff;\r\n }\r\n\r\n default:\r\n throw new RuntimeException(\"Illegal address mode for instruction \" + instruction.toString() + \" ($\" + Integer.toHexString(instruction.opCode) + \")\");\r\n }\r\n }", "private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }", "@Test\r\n public void testGetClosestAddressTo() {\r\n System.out.println(\"getClosestAddressTo\");\r\n Customer testCustomer;\r\n testCustomer = new Customer(\"Test Customer\", testAddress4);\r\n \r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress1);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress3);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress2);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertNotEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress2, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n }", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "public static int findNextHigherIndex(int[] a, int k) {\n\t\tint start = 0, end = a.length - 1; \n\t \n int ans = -1; \n while (start <= end) { \n int mid = (start + end) / 2; \n \n // Move to right side if target is \n // greater. \n if (a[mid] <= k) { \n start = mid + 1; \n } \n \n // Move left side. \n else { \n ans = mid; \n end = mid - 1; \n } \n } \n return ans;\n\t}", "public int jump(int[] A) {\n if (null==A || A.length==0) return -1;\n int start=0, end=0, result=0;\n while (end<A.length-1) {\n result++;\n int farthest = end;\n for (int i=start;i<=end;i++) {\n if (A[i]+i > farthest) {\n farthest = A[i]+i;\n }\n }\n start = end+1;\n end = farthest;\n }\n return result;\n }", "Execution getFarthestDistance();", "public Address getNextHop()\n {\n return (Address)route.get(getHopCount()+1);\n }", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "public abstract S isCloseTo(A expected, A offset, boolean strict);", "private void getNextInSet() throws CancelledException {\n\t\t// find next address that has a valid block;\n\t\tAddress addr = getNextAddress(nextAddr);\n\n\t\t// if the instruction's start address is in our set\n\t\t// then we have our block\n\t\tif (addr != null && addrSet.contains(addr)) {\n\t\t\tnextBlock = model.getCodeBlockAt(addr, monitor);\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// otherwise we're out of our current address range in\n\t\t// our address range set so we find the next address range\n\t\t// with a min address >= the instructions address and\n\t\t// look for a block there\n\t\t//nextAddr = instr.getMaxAddress();\n\t\twhile (rangeIter.hasNext()) {\n\t\t\tAddressRange range = rangeIter.next();\n\n\t\t\tif (nextAddr.compareTo(range.getMinAddress()) >= 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnextBlock = getFirstInRange(range);\n\t\t\t// if we find a block we're done\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if we find no block then there's no block in the\n\t\t\t// current range and we can move on to the next one\n\t\t}\n\t\tnextBlock = null;\n\t}", "public int getReturnAddressOffset();", "public Location checkFurtherLocation(Location toCompareTo, Location Location1, Location Location2) {\n int Distance1 = getDistance(toCompareTo, Location1);\n int Distance2 = getDistance(toCompareTo, Location2);\n\n if (Distance2 > Distance1)\n return Location2;\n\n return Location1;\n }", "public Instruction getInstruction(long index){\n\t\tInstruction instruction = null;\n\t\tint effectiveAddress = (int) (index-Constants.START_ADDRESS);\n\t\tif(effectiveAddress>0)\n\t\t{\n\t\t\teffectiveAddress = effectiveAddress/4;\t\t\t\n\t\t}\n\t\tif(instructions.size()>effectiveAddress)\n\t\t\tinstruction = instructions.get(effectiveAddress);\n\t\treturn instruction;\n\t}", "public CodeUnit getCodeUnitContaining(Address addr);", "public ILocation top()\n {\n EmptyStackException ex = new EmptyStackException();\n if (top <= 0)\n {\n throw ex;\n }\n else\n {\n return stack.get(top - 1);\n }\n }", "public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}", "private int hopsToTop(Block nextBlock, State goal, int blkLoc) {\n\t\tint idx = 0;\n\t\tfor(int i=0; i<stacksNum; i++){\n\t\t\tidx =1;\t//reset for every stack\n\t\t\tStack<Block> s =this.getStack(i);\n\t\t\tIterator<Block> iter = s.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tif(iter.next().getCh() != nextBlock.getCh()){\n\t\t\t\t\tidx++;\n\t\t\t\t}else{\n\t\t\t\t\treturn s.size()-idx+1;\t\t//as counted from bottom to top, hops will be subtracted\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} \n\t\treturn idx;\n\t}", "public static Position getClosest2reference(ArrayList<Position> c, Position reference){\n \t// Gets the closest point to the user's current position\n \tPosition temp;\n \tPosition min = new Position(0,0);\n \tdouble d;\n \tdouble minDistance = 1000;\n \tIterator<Position> t = c.iterator();\n \twhile (t.hasNext()){\n \t\ttemp = (Position) t.next();\n \t\t//System.out.println(\"Checking: \" + temp.getLat() + \",\" + temp.getLon());\n \t\td = Tools.distance(reference, temp);\n \t\tif (d < minDistance){\n \t\t\tmin = temp;\n \t\t\tminDistance = d;\n \t\t}\n \t}\n \treturn min;\n }", "public static BinaryExpression greaterThan(Expression expression0, Expression expression1, boolean liftToNull, Method method) { throw Extensions.todo(); }", "private double distanceToCarBack(double fromPosition) {\n\t\t double carBackPosition = Double.POSITIVE_INFINITY;\n\t\t for (Car c : cars)\n\t\t\t if (c.backPosition() >= fromPosition && c.backPosition() < carBackPosition)\n\t\t\t\t carBackPosition = c.backPosition();\n\t\t return carBackPosition;\n\t }", "private Point backtrack(Point p){\n\t\t// coordinates of the point\n\t\tint x = (int)p.getX();\n\t\tint y = (int)p.getY();\n\t\t// neigh hold the return value\n\t\tPoint neigh= p;\n\t\t// the lowest score\n\t\tint score=10000;\n\t\t// look at all the neighbor and compare them\n\t\tif(x>0\t && topology[x-1][y]>=0){\n\t\t\tscore = topology[x-1][y];\n\t\t\tneigh = new Point(x-1,y);\n\t\t}\n\t\tif(x<row-1 && topology[x+1][y]>=0 && score > topology[x+1][y]) {\n\t\t\tscore = topology[x+1][y];\n\t\t\tneigh = new Point(x+1,y);\n\t\t}\n\t\tif(y<col-1 && topology[x][y+1]>=0 && score > topology[x][y+1]) {\n\t\t\tscore = topology[x][y+1];\n\t\t\tneigh = new Point(x,y+1);\n\t\t}\n\t\tif(y>0 && topology[x][y-1]>=0 && score > topology[x][y-1]) {\n\t\t\tscore = topology[x][y-1];\n\t\t\tneigh = new Point(x,y-1);\n\t\t}\n\t\treturn neigh;\n\t}", "public static BinaryExpression lessThan(Expression expression0, Expression expression1, boolean liftToNull, Method method) { throw Extensions.todo(); }", "public boolean greaterthan(Inatnum a) throws Exception{\n if((this.isZero() &&a.isZero())==true) {return false;}//if both this and a are both zero, it returns false because it is not greater than. \n if((this.isZero())==false&&a.isZero()==true) {return true;}//conditional returns if a is greater than this.\n if((this.isZero())==true&&a.isZero()==false) {return false;}//conditional returns if this is greater than a.\n else {return this.pred().greaterthan(a.pred()); }//recursive call to subtract one from this and a.\n }", "public int searchStrictlyGreater(T key) {\n if ((array.length == 1) ||\n (array[0].compareTo(key) == -1) ||\n (array[array.length - 1].compareTo(key) == 1)) {\n return 0;\n }\n\n int start = 0, end = array.length - 2;\n\n do {\n int mid = start + (end - start)/2;\n if (array[mid].compareTo(key) <= 0) {\n if (array[mid + 1].compareTo(key) > 0) {\n return mid + 1;\n }\n else {\n start = mid + 1;\n }\n }\n else {\n end = mid - 1;\n }\n }\n while (start <= end);\n\n return 0;\n }", "public Double peekAhead(int in);", "private int findBlock(long addr) {\n\t\t// find cache by splitting addr into multiple segs\n\t\tint setIndex = (int) ((addr & 0x7FC0) >>> 6);\n\t\tlong tag = (addr & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t// search for the set to check for existence\n\t\tfor (int j = 0; j < 8; j++) {\n\t\t\tif (cache[setIndex][j] == tag) {\n\t\t\t\tpolicies[setIndex].updateAt(j);\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t}\n\t\tif(usePrefetch){\n\t\t\t//fetch from memory; preftecher will fetch many other relevant addresses\n\t\t\tArrayList<Long> address = pf.getPrefetchedAddress(addr);\n\t\t\tfor(long add : address) {\n\t\t\t\tsetIndex = (int) ((add & 0x7FC0) >>> 6);\n\t\t\t\ttag = (add & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\t\tcache[setIndex][index] = tag;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\tcache[setIndex][index] = tag;\n\t\t}\n\t\t// after all, we need to update the entry\n\t\treturn 4;\n\t}", "public T peekBest();", "public static int findClosest(int[] array, int value){\n if(value < array[0]) return array[0];\n if(value > array[array.length-1]) return array[array.length-1];\n\n int low = 0;\n int high = array.length -1;\n\n while(low <= high){\n int mid = (low+high)/2;\n if(array[mid] == value) return array[mid];\n else if(array[mid] < value) low = mid+1;\n else high = mid-1;\n }\n\n return ((array[low] - value) < (value - array[high])) ? array[low] : array[high];\n }", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "private Process findClosestProcess(){\n\n //Ensure that the process queue is sorted by process ID for traversal.\n Collections.sort(this.unfinishedJobs,new PIDComparator());\n\n //If there was no process currently executing on the CPU,\n //the next process is simply the process queue's first item.\n if(this.activeJob == null){\n if(this.unfinishedJobs.size() > 0){\n return this.unfinishedJobs.get(0);\n } \n } else {\n\n //Find the first process with a higher process ID than the currently executing\n //process and set it as the new process to execute next.\n for(int i = 0; i < this.unfinishedJobs.size(); i++){\n Process temp = this.unfinishedJobs.get(i);\n if(temp.getPID() > this.activeJob.getPID()){\n return temp;\n }\n }\n\n //If there are no processes with a higher process ID than the current process, use the \n //process queue's first item as a default.\n if(this.unfinishedJobs.size() > 0){\n return this.unfinishedJobs.get(0);\n }\n }\n return null;\n }", "public PlanNode findAtOrBelow( Type typeToFind ) {\n return findAtOrBelow(EnumSet.of(typeToFind));\n }", "private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }", "public Balloon acquireTarget() {\r\n\r\n\t\tBalloon closest = null;\r\n\t\tfloat closestDistance = 1000;\r\n\t\tif (balloons != null) {\r\n\t\t\tfor (Balloon balloons : balloons) {\r\n\t\t\t\tif (isInRange(balloons) && findDistance(balloons) < closestDistance && balloons.getHiddenHealth() > 0) {\r\n\t\t\t\t\tclosestDistance = findDistance(balloons);\r\n\t\t\t\t\tclosest = balloons;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (closest != null) {\r\n\t\t\t\ttargeted = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closest;\r\n\r\n\t}", "private List<Integer> getClosestRange(List<Integer> ranges, double predictionAmount) {\n List<Integer> bestRange = new ArrayList<>();\n double bestRangeDistance = Double.MAX_VALUE;\n for (int i = 0; i < ranges.size(); i += 2) {\n double rangeDistance = Math.abs(predictionAmount - getRangeCenter(ranges.get(i), ranges.get(i + 1)));\n if (rangeDistance < bestRangeDistance) {\n bestRangeDistance = rangeDistance;\n bestRange.clear();\n bestRange.add(ranges.get(i));\n bestRange.add(ranges.get(i + 1));\n }\n }\n return bestRange;\n }", "static int findIdxBiggest(List l, int from, int to) {\n\t\tString biggest=(String) l.get(0);\n\t\tint idxBiggest=from;\n\n\t\tfor(int i=from+1; i<=to; ++i) {\n\t\t\tif(biggest.compareTo((String) l.get(i))<0) {// it is bigger than biggest\n\t\t\t\tbiggest=(String)l.get(i);\n\t\t\t\tidxBiggest=i;\n\t\t\t}\n\t\t}\n\t\treturn idxBiggest;\n\t}", "public static int search(int[] nums, int target) {\n int low=0;\n int high=nums.length-1;\n int middle=(high+low)>>1;\n\n for(int i=0;i<nums.length;i++){\n int num = nums[middle];\n if(target>num){\n low=middle+1;\n middle=(high+low)>>1;\n }else if(target<num){\n high=middle-1;\n middle=(high+low)>>1;\n } else{\n return middle;\n }\n\n }\n\n return -1;\n }", "public static int findNextHigher(int[] a, int k) {\n\t int low = 0; \n\t int high = a.length - 1;\n\t \n\t int result = Integer.MAX_VALUE;\n\t while (low <= high) {\n\t int mid = (low + high) / 2;\n\t \n\t if (a[mid] > k) {\n\t result = a[mid]; /*update the result and continue*/\n\t high = mid - 1;\n\t } else {\n\t low = mid + 1;\n\t }\n\t } \n\t \n\t return result;\n\t}", "private Block findFreeBlock(int size) {\n\n // iteration is ordered min ~ max\n for (Block b : freeSpace) {\n if (b.length >= size) \n return b;\n }\n return null;\n }", "@Override\n\tpublic int compareTo(Tile another) {\n\n\t\tfloat diference = (distanceToStart + distanceToEnd) - (another.distanceToStart + another.distanceToEnd);\n\n\t\tif( diference < 0 )\n\t\t\treturn -1;\n\t\telse if ( diference > 0)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n\t}", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "public int findBranch(int fromBusNdx, int toBusNdx)\n\t{\n\t\tint end = _list[fromBusNdx];\n\t\twhile (end >= 0)\n\t\t{\n\t\t\tint far = _far[end];\n\t\t\tif (far == toBusNdx) return end / 2;\n\t\t\tend = _next[end];\n\t\t}\n\t\treturn -1;\n\t}", "private Node getMinimumOld() {\n Node tmp = null;\n\n // TODO: optimize by putting in 1 list and\n // provide 'starting offset' for remaining nodes to find mimimum\n // note: see new getMinimum method above\n\n if (null != nodeA) {\n tmp = nodeA;\n if (null != nodeB && tmp.data > nodeB.data) {\n tmp = nodeB;\n }\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeB) {\n tmp = nodeB;\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeC) {\n tmp = nodeC;\n }\n\n // System.out.println(tmp);\n\n if (null == tmp ) {\n // terminating condition\n return null;\n }\n\n if (tmp.equals(nodeA)) {\n nodeA = nodeA.next;\n }\n if (tmp.equals(nodeB)) {\n nodeB = nodeB.next;\n }\n if (tmp.equals(nodeC)) {\n nodeC = nodeC.next;\n }\n\n System.out.println(tmp.data);\n\n return tmp;\n }", "static int nextGreater(int num){\n char[] digits = String.valueOf(num).toCharArray();\n\n int i = digits.length - 2;\n //we search for the element that breaks the ascending order\n\n while (i>=0 && digits[i] >= digits[i+1])\n i--;\n //if we find i as -1 then the greater number doesnt exixts\n if (i == -1) return num;\n\n int j = digits.length - 1;\n\n //Now we search for the first digit that is greater than i\n while (digits[j] <= digits[i]) j--;\n\n //we swap the digits at j and digits at i\n char temp = digits[j];\n digits[j] = digits[i];\n digits[i] = temp;\n\n //we reverse the part starts from i+1\n int left = i+1, right = digits.length - 1;\n\n while (left<right){\n temp = digits[left];\n digits[left] = digits[right];\n digits[right] = temp;\n left ++;\n right --;\n }\n\n return Integer.parseInt(String.valueOf(digits));\n }", "@Override\n\t@TimeComplexity(\"O(log n)\")\n\tpublic Entry<K, V> higherEntry(K key) {\n\t/* TCJ \n\t * Binary search operation: log n\n\t */\n\t\tint j = findIndex(key);\n\t\tif ( j < size() && key.equals(map.get(j).getKey())) j++;\n\t\treturn safeEntry(j);\n\t}", "public Shard getLowerNeighbor() {\r\n double middleLat = south + Math.abs(north - south) / 2;\r\n double nextLat = middleLat - Math.abs(north - south);\r\n\r\n return new Shard(new Coordinates(nextLat, coordinates.getLon()), zoom);\r\n }", "public PlanNode findAtOrBelow( Traversal order,\n Type typeToFind ) {\n return findAtOrBelow(order, EnumSet.of(typeToFind));\n }", "public static int offset_offset_cmp() {\n return (168 / 8);\n }", "private Expression addressOf (Expression expression) {\n return expression;\n }", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }" ]
[ "0.58812755", "0.58101654", "0.56523657", "0.5252349", "0.5239398", "0.5184734", "0.5143116", "0.51255107", "0.50866294", "0.50855285", "0.5069121", "0.49899086", "0.4973576", "0.4917967", "0.4878125", "0.4877462", "0.48091948", "0.48036355", "0.4782375", "0.4757373", "0.4750823", "0.47435758", "0.47340608", "0.472662", "0.47260493", "0.46980873", "0.4697196", "0.46886432", "0.46779788", "0.4666274", "0.46631578", "0.46551764", "0.4643783", "0.46374923", "0.46339467", "0.46258202", "0.46107066", "0.46006817", "0.45988607", "0.4577199", "0.4574899", "0.45636025", "0.45603102", "0.45572922", "0.4542541", "0.4540832", "0.45345554", "0.45333895", "0.45326498", "0.45309126", "0.45289984", "0.45218107", "0.45210484", "0.4520173", "0.45197806", "0.45190766", "0.45174453", "0.45155233", "0.45008254", "0.44945467", "0.44737864", "0.44715706", "0.446111", "0.44470608", "0.44443846", "0.44432795", "0.44431382", "0.4441929", "0.44409558", "0.44294035", "0.4422411", "0.44219142", "0.44100437", "0.43967858", "0.43829533", "0.43819842", "0.4381289", "0.43720078", "0.43693987", "0.4369379", "0.4366305", "0.43631807", "0.4357701", "0.43551832", "0.43526614", "0.43468103", "0.43394247", "0.4338639", "0.43376875", "0.43345687", "0.43309495", "0.43286616", "0.43222344", "0.43199256", "0.4311849", "0.43049917", "0.4302306", "0.42997336", "0.42970428", "0.42960754" ]
0.5853024
1
get the closest Instruction that starts at an address that is less than the given address.
public Instruction getInstructionBefore(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Instruction getInstructionContaining(Address addr);", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public int nextLessThan(int range) {\n return (0x7fffffff & this.nextInt()) % range;\n }", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "public T findMin();", "public static BinaryExpression lessThan(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public Instruction getInstructionAfter(Address addr);", "public CodeUnit getCodeUnitBefore(Address addr);", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "ComparableExpression<T> min();", "public int relativePosTo(long addr) {\n\t\t\tif(addr < this.start)\n\t\t\t\treturn -1;\n\t\t\tif(addr > this.end)\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "public Data getDataBefore(Address addr);", "private int binarySearchToFindClosest(String overflowName, int bottomRecord, int topRecord) {\n // Base condition for only having two records left to choose from\n if (topRecord - bottomRecord == 1) {\n String topRecordName = getRecordCompanyName(\"normal\", topRecord);\n\n // If the name of the overflow company comes after the company name of the top record, then the top record is the closest\n if (overflowName.compareTo(topRecordName) >= 1) {\n return topRecord;\n // Otherwise, either the top and bottom records are equal length away, or the bottom record is closer, so return the bottom record\n } else {\n return bottomRecord;\n }\n // Base condition for having only 1 record left means that that record is the closest\n } else if (topRecord == bottomRecord) {\n return topRecord;\n }\n\n int middle = (topRecord + bottomRecord) / 2;\n String nameOfNormalRecord = getRecordCompanyName(\"normal\", middle);\n int alphabeticalOrder = overflowName.compareTo(nameOfNormalRecord);\n if (alphabeticalOrder == 0) {\n return middle;\n } else if (alphabeticalOrder < 0) {\n return binarySearchToFindClosest(overflowName, bottomRecord, middle);\n } else {\n return binarySearchToFindClosest(overflowName, middle + 1, topRecord);\n } \n }", "private static int minimumPosition(int[] a, int from)\n {\n int minPos = from;\n for (int i = from + 1; i < a.length; i++) \n {\n if (a[i] < a[minPos]) { minPos = i; }\n }\n return minPos;\n }", "public Instruction getInstructionAt(Address addr);", "static int min(int a, int b) { return a < b ? a : b; }", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public static BinaryExpression lessThan(Expression expression0, Expression expression1, boolean liftToNull, Method method) { throw Extensions.todo(); }", "public static int lower_bound(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] >= key)\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid - 1;\n\t\t}\n\t\treturn low;\n\t}", "public Node closestPrecedingNode(int id);", "public int getLowerBound ();", "public Criteria andAddressLessThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"address < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "Execution getClosestDistance();", "protected static int advanceUntil(CharBuffer array, int pos, int length, char min) {\n int lower = pos + 1;\n\n // special handling for a possibly common sequential case\n if (lower >= length || (array.get(lower)) >= (min)) {\n return lower;\n }\n\n int spansize = 1; // could set larger\n // bootstrap an upper limit\n\n while (lower + spansize < length\n && (array.get(lower + spansize)) < (min)) {\n spansize *= 2; // hoping for compiler will reduce to\n }\n // shift\n int upper = (lower + spansize < length) ? lower + spansize : length - 1;\n\n // maybe we are lucky (could be common case when the seek ahead\n // expected\n // to be small and sequential will otherwise make us look bad)\n if (array.get(upper) == min) {\n return upper;\n }\n\n if ((array.get(upper)) < (min)) {// means\n // array\n // has no\n // item\n // >= min\n // pos = array.length;\n return length;\n }\n\n // we know that the next-smallest span was too small\n lower += (spansize >>> 1);\n\n // else begin binary search\n // invariant: array[lower]<min && array[upper]>min\n while (lower + 1 != upper) {\n int mid = (lower + upper) >>> 1;\n char arraymid = array.get(mid);\n if (arraymid == min) {\n return mid;\n } else if ((arraymid) < (min)) {\n lower = mid;\n } else {\n upper = mid;\n }\n }\n return upper;\n\n }", "public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}", "public Point getXLower()\n {\n return (Point)xLow.clone();\n }", "int getMin( int min );", "public Shard getLowerNeighbor() {\r\n double middleLat = south + Math.abs(north - south) / 2;\r\n double nextLat = middleLat - Math.abs(north - south);\r\n\r\n return new Shard(new Coordinates(nextLat, coordinates.getLon()), zoom);\r\n }", "private static int indexOfSmallest(int[] a, int start) {\n int minNum = a[start];\n int minIndex = start;\n for(int i=start; i<a.length; i++){\n if(a[i]<minNum){\n minNum = a[i];\n minIndex = i;\n }\n\n }\n return minIndex;\n }", "@NotNull\n private RangeInfo findNearestRangeInfo() {\n final int caretPosition = myView.getCaretPosition();\n\n for (final RangeInfo range : myRangeInfos) {\n if (range.isWithin(caretPosition)) {\n return range;\n }\n if (range.getFrom() > caretPosition) {\n return range; // Ranges are sorted, so we are on the next range. Take it, if caret is not within range\n }\n }\n\n return myRangeInfos.last();\n }", "private int min(int index1, int index2) {\n // TODO: YOUR CODE HERE\n E first = getElement(index1);\n E second = getElement(index2);\n if (first == null) { //if null then just return the other one?\n return index2;\n }\n if (second == null) {\n return index1;\n }\n if (first.compareTo(second) > 0) {\n return index2;\n } else {\n return index1;\n }\n }", "private int min(int index1, int index2) {\n \t\tNode node1 = getNode(index1);\n \t\tNode node2 = getNode(index2);\n \t\tif (node1 == null) {\n \t\t\treturn index2;\n \t\t} else if (node2 == null) {\n \t\t\treturn index1;\n \t\t} else if (node1.myPriority < node2.myPriority) {\n \t\t\treturn index1;\n \t\t} else {\n \t\t\treturn index2;\n \t\t}\n \t}", "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "private int min(int a, int b) {\n\t\treturn a<b?a:b;\n\t}", "private Node lowestCostThrough(List<Node> openSet, Map<Node, Double> costThrough){\n Node lowest = openSet.get(0);\n\n for(Node n: openSet){\n if(costThrough.get(n) < costThrough.get(lowest)){\n lowest = n;\n }\n }\n return lowest;\n }", "public int findMin()\n {\n if(isEmpty())\n {\n throw new NoSuchElementException(\"Underflow Exeption\");\n }\n return heap[0];\n }", "public static State min(State a, State b){\n return a.score <= b.score ? a: b;\n }", "private int minPosition(int from) throws InterruptedException{\n\t\tint minPos = from;\n\t\tfor (int i = from + 1; i < a.length; i++){\n\t\t\tsortStateLock.lock();\n\t\t\ttry{\n\t\t\t\tif (a[i] < a[minPos]) minPos = i;\n\t\t\t // For animation\n\t\t\t markedPosition = i;\n\t\t }\n\t\t\tfinally\n\t\t {\n\t\t\t\tsortStateLock.unlock();\n\t\t }\n\t\t pause(2);\n\t }\n\t return minPos;\n }", "Condition lessThan(QueryParameter parameter, Object x);", "protected abstract D getLower(R range);", "public Point getLowerPoint() {\n return lower;\n }", "private T getMinUnvisited(){\n if (unvisited.isEmpty()) return null;\n T min = unvisited.get(0);\n for (int i = 1; i < unvisited.size(); i++){\n T temp = unvisited.get(i);\n if (distances[vertexIndex(temp)] < distances[vertexIndex(min)]){\n min = temp;\n }\n }\n return min;\n }", "public int minJump(int[] array) {\n if (array == null || array.length <= 1) {\n return 0;\n }\n int[] minJump = new int[array.length];\n minJump[0] = 0;\n for (int i = 1; i < array.length; i++) {\n minJump[i] = -1;\n for (int j = i - 1; j >= 0; j--) {\n if (j + array[j] >= i && minJump[j] != -1) {\n if (minJump[j] + 1 < minJump[i] || minJump[i] == -1) {\n minJump[i] = minJump[j] + 1;\n }\n }\n }\n }\n return minJump[minJump.length - 1];\n }", "private static <T extends Comparable <? super T>> int findMinPos(List <T> list, int from, int to){\r\n\t\tif (list.isEmpty()) return -1;\r\n\t\tif (from < 0 || to > list.size()) throw new IllegalArgumentException();\r\n\t\tT currentMin = list.get(from);\r\n\t\tint currentMinPos = from;\r\n\t\tfor (int i = from; i < to; i++){\r\n\t\t\tif (list.get(i).compareTo(currentMin) < 0){\r\n\t\t\t\tcurrentMin = list.get(i);\r\n\t\t\t\tcurrentMinPos = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn currentMinPos;\r\n\t}", "public O before(O a)\r\n {\r\n int index = indexOf(a);\r\n if (index != -1 && index != 0) //is defined and not first\r\n return get(index-1);\r\n else return null;\r\n }", "private IAVLNode findPredecessor(IAVLNode node)\r\n\t{\r\n\t\t//minimum node has no predecessor\r\n\t\tif (node == minimum) \r\n\t\t\treturn null; \r\n\t\t\r\n\t\tif (node.getLeft().isRealNode()) \r\n\t\t\treturn maxPointer(node.getLeft()); \r\n\t\telse \r\n\t\t{\r\n\t\t\tIAVLNode parent = node.getParent();\r\n\t\t\twhile ((node == parent.getLeft())&&(parent != null)) \r\n\t\t\t{ \r\n\t\t\t\tnode = parent; \r\n \t\t\t\tparent = parent.getParent() ; \r\n\t\t\t}\r\n\t\t\treturn parent;\t\r\n\t\t}\r\n\t}", "public static int offset_min() {\n return (56 / 8);\n }", "public int eightMin(int[] array) {\n\t\tcountMin++;\n\t\tif (array.length != 8)\n\t\t\treturn -1;\n\t\telse {\n\t\t\tint min = array[0];\n\t\t\tint pos = 0;\n\n\t\t\tfor (int i = 1; i < array.length; i++) {\n\t\t\t\tif (array[i] < min) {\n\t\t\t\t\tpos = i;\n\t\t\t\t\tmin = array[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn pos;\n\t\t}\n\t}", "public static int closestNumber(int p, int high, int low) {\n\t\tif(p>Math.abs(high-p)) {\n\t\t\tp=high;\n\t\t}\n\t\telse {\n\t\t\tp=low;\n\t\t}\n\t\treturn p;\n\t}", "public static int min(int a, int b) {\n return b + ((a - b) & (a - b) >> 31);\n }", "protected ValuePosition getMinimum() {\n\t\t// Calcule la position et la durée d'exécution de la requête la plus courte dans le tableau des requêtes\n\t\tValuePosition minimum = new ValuePosition();\n\t\tminimum.position = 0;\n\t\tfor(int pos=0; pos<requests.length; pos++) {\n\t\t\tRequest request = requests[pos];\n\t\t\tif(request == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minimum.value == null || request.getElapsedTime() < minimum.value) {\n\t\t\t\tminimum.position = pos;\n\t\t\t\tminimum.value = request.getElapsedTime();\n\t\t\t}\n\t\t}\n\t\treturn minimum;\n\t}", "public Point closestIntersectionToStartOfLine(Rectangle rect) {\r\n List<Point> list = rect.intersectionPoints(this);\r\n if (list.isEmpty()) {\r\n return null;\r\n // there is only one point in list\r\n } else if (list.size() == 1) {\r\n return list.get(0);\r\n // first point in list closer than the second one\r\n } else if (this.start.distance(list.get(0)) < this.start.distance(list.get(1))) {\r\n return list.get(0);\r\n // second point in list closer than the first one\r\n } else {\r\n return list.get(1);\r\n }\r\n }", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "private static int getLowestCostUnprocessedNode(int[] costs, boolean[] doneWithNode) {\n int result = UNKNOWN;\n int lowestCost = 0;\n\n for (int i=0; i<doneWithNode.length; i++) {\n // We can't pick the node if we've already done it or\n // we don't know how much it costs to get to the node.\n if (doneWithNode[i] || costs[i] == UNKNOWN)\n continue;\n\n if (result == UNKNOWN || costs[i] < lowestCost) {\n lowestCost = costs[i];\n result = i;\n }\n }\n\n return result;\n }", "default A isLessThan(Number number) {\n return satisfiesNumberCondition(new NumberCondition<>(number, LESS_THAN));\n }", "private Point getLower() {\n int lowerX;\n int lowerY;\n lowerY = (int) (-gameCanvas.getHeight() + mapOffsetY * 2);\n lowerX = (int) (-gameCanvas.getWidth() + mapOffsetX * 2);\n return new Point(lowerX, lowerY);\n }", "public float getLimit_lin_x_lower() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 32);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 24);\n\t\t}\n\t}", "private GlobeAccessPointRecord findNearestGAP(InetAddress srcAddr)\n {\n GlobeAccessPointRecord nearestGAPrec;\n FloatCoordinate coords = null;\n\n // look in our GAP lookup cache. It looks like IE5 ignores our\n // Expires: header so we might really need this for performance \n // reasons.\n synchronized(GlobeRedirector.ip2GAPCache) {\n nearestGAPrec =\n (GlobeAccessPointRecord) GlobeRedirector.ip2GAPCache.get(srcAddr);\n }\n\n /*\n * Return the GAP record if it is in the cache.\n */\n if (nearestGAPrec != null) {\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"(cached) Nearest GAP is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n return nearestGAPrec;\n }\n\n /*\n * There is no {srcAddr, nearest GAP record} pair in the cache. We need\n * the geographical coordinates associated with srcAddr to determine\n * the nearest GAP.\n */\n\n if (_cookieCoords != null) { // client cookie contains coordinates\n coords = _cookieCoords;\n }\n else {\n coords = getCoordinates(srcAddr);\n\n if (coords == null) {\n return null;\n }\n }\n\n /*\n * Calculate which GAP is nearest.\n */\n int i, dist, min = Integer.MAX_VALUE;\n CoordinateImpl srcCoords = new CoordinateImpl((int)coords.lat,\n (int)coords.longi);\n\n for (i = 0; i < _gapList.size(); i++) {\n GlobeAccessPointRecord gaprec = _gapList.get(i);\n dist = gaprec.coords.computeDistance(srcCoords);\n\n if (dist < min) {\n nearestGAPrec = gaprec;\n min = dist;\n }\n }\n\n // Cache the result.\n synchronized(GlobeRedirector.ip2GAPCache) {\n GlobeRedirector.ip2GAPCache.put(srcAddr, nearestGAPrec);\n }\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Nearest GAP of \" + srcAddr.getHostAddress()\n + \" at (\" + (int)coords.lat + \",\" + (int)coords.longi\n + \") is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n\n _cookieCoords = coords;\n return nearestGAPrec;\n }", "public static int lowerBound(int[] arr, int data) {\n int ans = -1, low = 0, high = arr.length - 1;\n while (low <= high) {\n int mid = (low + high) / 2;\n if (arr[mid] == data) {\n ans = mid;\n high = mid - 1;\n } else if (data < arr[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return ans;\n }", "Coordinate getMinX();", "public int minDistance(int distance[], Boolean span_tree[]) {\n\t\tint min_value=Integer.MAX_VALUE,min_node=-1;\n\t\tfor(int i=0;i<vertexs;i++) {\n\t\t\tif(span_tree[i]==false && distance[i]<=min_value) {\n\t\t\t\tmin_value=distance[i];\n\t\t\t\tmin_node=i;\n\t\t\t}\n\t\t}\n\t\treturn min_node;\n\t}", "double getLeft(double min);", "public Node findPredecessor(int id) {\n\t\tNode n = this;\n\t\twhile (id <= n.getId() || id > n.getSuccessor().getId()) {\n\t\t\tn = n.closestPrecedingFinger(id);\n\t\t}\n\t\treturn n;\n\t}", "int getMin() {\n\t\tif (stack.size() > 0) {\n\t\t\treturn minEle;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "private Node getMinimumOld() {\n Node tmp = null;\n\n // TODO: optimize by putting in 1 list and\n // provide 'starting offset' for remaining nodes to find mimimum\n // note: see new getMinimum method above\n\n if (null != nodeA) {\n tmp = nodeA;\n if (null != nodeB && tmp.data > nodeB.data) {\n tmp = nodeB;\n }\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeB) {\n tmp = nodeB;\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeC) {\n tmp = nodeC;\n }\n\n // System.out.println(tmp);\n\n if (null == tmp ) {\n // terminating condition\n return null;\n }\n\n if (tmp.equals(nodeA)) {\n nodeA = nodeA.next;\n }\n if (tmp.equals(nodeB)) {\n nodeB = nodeB.next;\n }\n if (tmp.equals(nodeC)) {\n nodeC = nodeC.next;\n }\n\n System.out.println(tmp.data);\n\n return tmp;\n }", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "public Instruction getInstruction(long index){\n\t\tInstruction instruction = null;\n\t\tint effectiveAddress = (int) (index-Constants.START_ADDRESS);\n\t\tif(effectiveAddress>0)\n\t\t{\n\t\t\teffectiveAddress = effectiveAddress/4;\t\t\t\n\t\t}\n\t\tif(instructions.size()>effectiveAddress)\n\t\t\tinstruction = instructions.get(effectiveAddress);\n\t\treturn instruction;\n\t}", "TrackingToken lowerBound();", "private static int findMin(int startPos,int[] x){\n\t\tint result = startPos;\n\t\tfor(int i= startPos;i<x.length;i++){\n\t\t\tif(x[i]<x[result]){\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static int argmin(double[] array, int from, int to) {\n\t\tif (from>=to) return -1;\n\t\tdouble max = array[from];\n\t\tint re = from;\n\t\tfor (int i=from+1; i<to; i++) {\n\t\t\tif (array[i]<max) {\n\t\t\t\tmax = array[i];\n\t\t\t\tre = i;\n\t\t\t}\n\t\t}\n\t\treturn re;\n\t}", "public static int getMin(ArrayList<QuoteShort> data, int begin, int end) {\n\t\tint min = 999999999;\r\n\t\tint minIndex = -1;\r\n\t\tif (begin<=0) begin = 0;\r\n\t\tfor (int i=begin;i<=end;i++){\r\n\t\t\tif (data.get(i).getHigh5()<=min){\r\n\t\t\t\tmin = data.get(i).getLow5();\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn minIndex;\r\n\t}", "public E findMin() throws NoSuchElementException {\n\t\treturn minimums.peek();\n\t}", "public static int findMinPositionSegment (int[] elts, int first, int size) {\r\n\t\tint min = elts[first];\r\n\t\tint minPosition = first;\r\n\t\tfor (int i = first+1; i < first+size; i++) {\r\n\t\t\tif (elts[i] < min) {\r\n\t\t\t\tmin = elts[i];\r\n\t\t\t\tminPosition = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn minPosition;\r\n\t}", "public static int findMinPositionSegment (int[] elts, int first, int size) {\r\n\t\tint min = elts[first];\r\n\t\tint minPosition = first;\r\n\t\tfor (int i = first+1; i < first+size; i++) {\r\n\t\t\tif (elts[i] < min) {\r\n\t\t\t\tmin = elts[i];\r\n\t\t\t\tminPosition = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn minPosition;\r\n\t}", "public int\ngetNodeIndexMin();", "private UnconstrainedBidElement getClosest(double demandWatt) {\n UnconstrainedBidElement best = null;\n double bestDistance = Double.MAX_VALUE;\n for (UnconstrainedBidElement e : elements) {\n double distance = Math.abs(demandWatt - e.demandWatt);\n if (best == null || distance < bestDistance) {\n best = e;\n bestDistance = distance;\n }\n }\n return best;\n }", "private void gotoMinOf(IntTree<V> node) {\n while (node.size > 0) {\n stack = stack.plus(node);\n key += node.key;\n node = node.left;\n }\n }", "public static int smin(int a, int b) {\n return (a < b) ? a : b;\n }", "public E findMin() {\n // TODO: YOUR CODE HERE\n return getElement(1);\n }", "public static Unit getNearest(List<Unit> units, MapLocation loc, Predicate<Unit> shouldPrioritize) {\n if (units == null) return null;\n int numUnits = (int) units.size();\n if (numUnits == 0) return null;\n Unit nearest = null;\n Unit nearestLowPrio = null;\n int nearistDist = Integer.MAX_VALUE;\n int nearestDistLowPrio = Integer.MAX_VALUE;\n for (int i=0; i<numUnits; i++) {\n Unit unit = units.get(i);\n assert gc.canSenseUnit(unit.id());\n int distance = (int) unit.location().mapLocation().distanceSquaredTo(loc);\n if (shouldPrioritize != null && shouldPrioritize.test(unit)) {\n if (distance < nearistDist) {\n nearest = unit;\n nearistDist = distance;\n }\n } else {\n if (distance < nearestDistLowPrio) {\n nearestLowPrio = unit;\n nearestDistLowPrio = distance;\n }\n }\n }\n return (nearest == null) ? nearestLowPrio : nearest;\n }", "public int getLowerBound() {\r\n return lowerBound;\r\n }", "int min();", "public static int min(int a, int b) {\t\n\t\treturn ((a<b)?a:b);\n\t}", "static long closer(int arr[], int n, long x)\n {\n int index = binarySearch(arr,0,n-1,(int)x); \n return (long) index;\n }", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "public Point ExtractMin() {\n\t\tif (heapSize < 0)\n\t\t\tthrow new RuntimeException(\"MinHeap underflow!\");\n\t\tPoint min = new Point(heapArr[0]);\n\t\theapArr[0] = new Point(heapArr[heapSize - 1]);\n\t\theapSize = heapSize - 1;\n\t\tminHeapify(0);\n\t\treturn min;\n\n\t}", "BooleanExpression lt(ComparableExpression<? extends T> expr);", "public Location getNearest(Location src)\r\n {\r\n if(Main.ASSERT) Util.assertion(!src.inside(bl, tr));\r\n // cases: \r\n // 3 6 9 \r\n // 2 x 8\r\n // 1 4 7\r\n if(src.getX()<=bl.getX())\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return bl; // case 1\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return tl; // case 3\r\n }\r\n else\r\n {\r\n return new Location.Location2D(bl.getX(), src.getY()); // case 2\r\n }\r\n }\r\n else if(src.getX()>=tr.getX())\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return br; // case 7\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return tr; // case 9\r\n }\r\n else\r\n {\r\n return new Location.Location2D(tr.getX(), src.getY()); // case 8\r\n }\r\n }\r\n else\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return new Location.Location2D(src.getX(), bl.getY()); // case 4\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return new Location.Location2D(src.getX(), tr.getY()); // case 6\r\n }\r\n else\r\n {\r\n throw new RuntimeException(\"get nearest undefined for internal point\");\r\n }\r\n }\r\n }", "Node predecessor(T value) {\n Node x = search(value);\n if (x.value.compareTo(value) < 0) return x;\n else return predecessor(x);\n }", "public int getLowestChromID();", "public int getLowerBound ()\n\t{\n\t\treturn getRelationshipImpl().getLowerBound();\n\t}", "private int indexOfTop(int stackNum) {\n\t\tint offset = stackNum * stackCapacity;\r\n\t\tint size = sizes[stackNum];\r\n\t\treturn offset+size-1;\r\n\t}", "public int findMin() {\r\n\t\treturn this.min.value;\r\n\t}", "public static int minIndex(int a, int b)\n {\n return (a < 0) ? b\n : (b < 0) ? a\n : Math.min(a, b);\n }", "int absTopOfStack(int stackNum){\n\treturn stackNum * stackSize + stackPointer[stackNum];\n}", "protected Instance nearestValidNeighbor(Instance inst, int a,\r\n\t\t\tInstanceAttributes atts) {\r\n\t\tdouble distance = Double.POSITIVE_INFINITY;\r\n\t\tInstance inst2;\r\n\t\tint nn = 0;\r\n\r\n\t\tfor (int i = 0; i < IS.getNumInstances(); i++) {\r\n\t\t\tinst2 = IS.getInstance(i);\r\n\t\t\tif (inst != inst2 && !inst2.getInputMissingValues(a)\r\n\t\t\t\t\t&& distance(inst, inst2, atts) < distance) {\r\n\t\t\t\tdistance = distance(inst, inst2, atts);\r\n\t\t\t\tnn = i;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn IS.getInstance(nn);\r\n\t}", "@Override\n\t@TimeComplexity(\"O(log n)\")\n\tpublic Entry<K, V> lowerEntry(K key) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t */\n\t\treturn safeEntry(findIndex(key) - 1);\n\t}" ]
[ "0.5812921", "0.5771001", "0.56578445", "0.563464", "0.5441169", "0.5379972", "0.5329751", "0.5324648", "0.53241557", "0.53115326", "0.5288498", "0.5253196", "0.52401006", "0.52357227", "0.52317804", "0.52097946", "0.5208333", "0.52011555", "0.51956695", "0.5195482", "0.51916033", "0.51656413", "0.51205444", "0.51175165", "0.50879717", "0.5084012", "0.50782156", "0.50351787", "0.5034239", "0.49924105", "0.49798557", "0.49788576", "0.49628645", "0.4956395", "0.49502555", "0.49418595", "0.4939761", "0.49361336", "0.49314722", "0.49284217", "0.49176148", "0.4911263", "0.48885798", "0.48638594", "0.486114", "0.4850556", "0.48441198", "0.4842974", "0.48293963", "0.48167717", "0.4815148", "0.48111054", "0.48077682", "0.48021868", "0.4799494", "0.4793099", "0.4788577", "0.47851616", "0.47757113", "0.47714442", "0.47632858", "0.47608954", "0.475996", "0.47578284", "0.4754834", "0.47501564", "0.47468683", "0.47408986", "0.4738545", "0.47303686", "0.47266862", "0.47262153", "0.4722032", "0.47120076", "0.47049227", "0.47036192", "0.47036192", "0.47033948", "0.46950275", "0.46919125", "0.46911618", "0.46890047", "0.46883652", "0.46838015", "0.46831405", "0.46819183", "0.46817598", "0.46804965", "0.467703", "0.46741062", "0.46719915", "0.4666217", "0.46596736", "0.46541062", "0.46533296", "0.4651794", "0.4648847", "0.46465433", "0.46430236", "0.46387482" ]
0.6787092
0
get an Instruction iterator that will iterate over the entire address space.
public InstructionIterator getInstructions(boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public InstructionIterator getInstructions(Address addr, boolean forward);", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "public Iterator<Hex> iterator() {\n return new Iterator<Hex>() {\n private int g = 0;\n private int h = 0;\n @Override\n public boolean hasNext() {\n return g < hexWidth && h < hexHeight;\n }\n @Override\n public Hex next() {\n Hex result = hexes[g][h];\n if (++g == hexWidth) {\n g = 0;\n h++;\n }\n return result;\n }\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }", "public Iterator<Range> iterator(ValueMapper mapper) {\n return new Trie2Iterator(mapper);\n }", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public Iterator<T> iterator() {\n\t\treturn new ReferentIterator();\n\t}", "public Iterator<VirtualMachine> iterator() {\n return mapped_vms.iterator();\n }", "public Iterator<Coord> iterator() {\n\t\treturn new CoordListIterator(array, index);\n\t}", "public Iterator iterator()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n try\r\n {\r\n return new CompositeIterator(new Iterator[] { \r\n spaceMgr.makeComponentSpaceIterator(),\r\n spaceMgr.makeHistorySpaceIterator() });\r\n }\r\n catch (RuntimeException e)\r\n {\r\n e.printStackTrace();\r\n throw e;\r\n }\r\n }", "public Instruction getInstructionContaining(Address addr);", "@VisibleForTesting\n public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {\n return map.entrySet().iterator();\n }", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }", "@Override\n public Iterator<Location> iterator() {\n return new NeighborhoodIterator(this, new Location(0, 0));\n }", "public Instruction getInstructionAt(Address addr);", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public Iterator<Type> iterator();", "Iterator<T> iterator();", "public ASTNodeIterator iterator()\n {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = expression;\n return I;\n }", "public Iterator<E> iterator() {\n\t\treturn new Itr();\n\t}", "public Iterator getIterator() {\n\t\t\n\t\treturn blocks.iterator();\n\t\t\n\t}", "public final Iterable getChainingIterator() {\n\t// TODO: Implemente the chaining iterator and add generic type to Iterable. I suppose it is this class.\n\tthrow new IllegalAccessError(\"Not implemented yet\");\n }", "public Iterator<Space> iterator() {\n return spaces.iterator();\n }", "public T iterator();", "public UnmodifiableIterator<Entry<K, V>> iterator() {\n return mo8403b().iterator();\n }", "public abstract ucar.array.RangeIterator getRangeIterator();", "@Override\n\tpublic Iterator<StackType> iterator();", "public Iterator<T> getIterator();", "@Override\n public Iterator<T> iterator() {\n return forwardIterator();\n }", "public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }", "abstract public Iterator<BlockReportReplica> iterator();", "public Iterator<E> iterator()\n {\n return stack.iterator();\n }", "public Iterator<T> iterator() {\r\n return byGenerations();\r\n }", "@Override\n\tpublic Iterator<Statement> iterator() {\n\t\treturn iterator(null, null, null);\n\t}", "public synchronized Iterator<E> iterator()\n {\n return iteratorUpAll();\n }", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "@Override\n public Iterator<Range> iterator() {\n return iterator(defaultValueMapper);\n }", "public static Iterator <Gate> iterator() {\n return allGates.iterator();\n }", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }", "public Iterator<? extends ICodeBase> auxCodeBaseIterator();", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "@Override\n\tpublic Iterator<Item> iterator() {\n\t\treturn new StackIterator();\n\t}", "public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}", "public static ListIterator iterator() {\r\n\t\treturn getIterator(Direction.class);\r\n\t}", "public Iterator<E> iterator(){\r\n return new IteratorHelper();\r\n }", "public Iterator iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "public Iterator<I> getReservables(){\n IterI iter = new IterI();\n return iter;\n }", "public synchronized Iterator<E> iteratorDownAll()\n {\n if (isEmpty())\n return new CNullIterator<E>();\n\n return new NodeIteratorDown<E>(this, this.m_LastNode, this.m_FirstNode.m_Element);\n }", "public Iterator<E> iterator() {\n\t\treturn new LinkedListItr();\r\n\t}", "public Iterator<Item> iterator() {\n return new AIterator();\n }", "IteratorExp createIteratorExp();", "public Iterator<T> getPageElements();", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "Iterator<E> iterator();", "Iterator<E> iterator();", "public Iterable<HashNode> iterator() {\n\t\treturn bucket;\n\t\t//for(HashTable<Character, Integer>.HashNode x : HT.iterator()) {\n\t}", "public Iterator<? extends ICodeBase> appCodeBaseIterator();", "public Iterator<T> iterator() {\n if (this.nrOfElements == 0) {\n return Collections.<T>emptyList().iterator();\n }\n return new Iterator<T>() {\n private Node walker = null;\n\n @Override\n public boolean hasNext() {\n return walker != last;\n }\n\n @Override\n public T next() {\n if (this.walker == null) {\n this.walker = first;\n return this.walker.getData();\n }\n\n if (this.walker.getNext() == null) {\n throw new NoSuchElementException();\n }\n\n this.walker = this.walker.getNext();\n return this.walker.getData();\n }\n };\n }", "public Iterator<Item> iterator() {\n return new Iterator<Item>() {\n public boolean hasNext() {\n return false;\n }\n\n public Item next() {\n return null;\n }\n };\n }", "@Override\n\tpublic Iterator<Item> iterator() {\n\t\treturn new StackIter();\n\t}", "public SList_Iterator<T> iterator() {\n return new iterator();\n }", "public Iterator<Item> iterator(){\n return new Iterator<Item>(); //Iterator interface implementation instance(has all Iterator methods)\n }", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "public Iterator<T> iterator()\n\t{\n\t\treturn new Iterator<T>()\n\t\t{\n\t\t\tNode<T> actual = head;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn actual != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic T next() \n\t\t\t{\n\t\t\t\tif(hasNext())\n\t\t\t\t{\n\t\t\t\t\tT data = actual.getElement();\n\t\t\t\t\tactual = actual.getNext();\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t}", "public abstract Iterator<E> createIterator();", "public Iterator iterator () {\n return new MyIterator (first);\n }", "public Iterator<T> iterator()\n\t{\n\t\treturn new LinkedListIterator();\n\t}", "public Iterator<LayoutNode> nodeIterator() {\n\treturn nodeList.iterator();\n }", "public Iterator<Integer> iterator() {\n\t\treturn new WrappedIntIterator(intIterator());\n\t}", "@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }", "public Iterable<M> iterateAll();", "public Iterator getIterator() {\n return myElements.iterator();\n }", "@Override\r\n\tpublic Iterator<E> iterator()\r\n\t{\n\t\treturn ( iterator.hasNext() ? new EntityListIterator() : iterator.reset() );\r\n\t}", "@Override\n public Iterator<E> iterator() {\n return new ElementIterator();\n }", "public Iterator<Entry> iterator() {\n return new ArrayIterator<Entry>(fEntries);\n }", "@Override\n\tpublic Iterator<E> iterator() {\n\t\treturn new Iterator<E>() {\n\n\t\t\tprivate final Iterator<Map.Entry<Integer, String>> idsByQueuePosIterator = idsByQueuePosition.entrySet().iterator();\n\n\t\t\tprivate Integer currentPos = null;\n\t\t\tprivate String currentId = null;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext() {\n\t\t\t\treturn idsByQueuePosIterator.hasNext();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic E next() {\n\t\t\t\tfinal Map.Entry<Integer, String> currEntry = idsByQueuePosIterator.next();\n\t\t\t\tcurrentPos = currEntry.getKey();\n\t\t\t\tcurrentId = currEntry.getValue();\n\t\t\t\treturn beansById.get(currentId);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void remove() {\n\t\t\t\tidsByQueuePosition.remove(currentPos);\n\t\t\t\tbeansById.remove(currentId);\n\t\t\t}\n\n\t\t};\n\t}", "public UnmodifiableIterator<K> iterator() {\n return mo8403b().iterator();\n }", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "@Override\n public Iterator<Entity> iterator() {\n return entities.iterator();\n }", "public java.util.Iterator<Entry> iterator(){\n\t\treturn new ContentIterator();\n\t}", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }", "public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}", "public IntIterator intIterator(final int start, final int end) {\n\t\treturn new BufferedRangeEWAHintIterator(this, start, end);\n\t}", "public Iterator<T> getIterator() {\n return new Iterator(this);\n }", "public ASTNodeIterator iterator() {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = name;\n return I;\n }", "public Iterator<? extends E> iterator() {\n return (Iterator<? extends E>) Arrays.asList(queue).subList(startPos, queue.length).iterator();\n }", "public ListIterator<T> getAllByRowsIterator() {\n\t\tAllByRowsIterator it = new AllByRowsIterator();\n\t\treturn it;\n\t}", "public Iterator<Item> iterator() {\n RQIterator it = new RQIterator();\n return it;\n }" ]
[ "0.737861", "0.6631445", "0.590328", "0.57450706", "0.5632712", "0.55749184", "0.55498415", "0.5516098", "0.5458979", "0.5448715", "0.5424757", "0.5411893", "0.5411781", "0.5379807", "0.5379807", "0.5379807", "0.5379807", "0.5370216", "0.5366796", "0.5362765", "0.53489935", "0.53406453", "0.53380805", "0.53310394", "0.5319056", "0.5315109", "0.5298419", "0.52973527", "0.5293798", "0.52928764", "0.5272361", "0.52709603", "0.5257333", "0.5251955", "0.52511036", "0.52492315", "0.5229126", "0.5222725", "0.5222606", "0.5214218", "0.5212075", "0.5212075", "0.5212075", "0.5208189", "0.5201188", "0.5200133", "0.51991534", "0.5191903", "0.5185107", "0.5182048", "0.51706725", "0.5167416", "0.5159337", "0.5158161", "0.5143328", "0.512651", "0.5125596", "0.5124196", "0.51199305", "0.5114023", "0.5094555", "0.5094555", "0.50945246", "0.50945246", "0.50920814", "0.5086744", "0.50859904", "0.5078522", "0.5077717", "0.5073638", "0.5061473", "0.50610197", "0.5052091", "0.5051075", "0.5050039", "0.5039056", "0.50387585", "0.50385946", "0.50318384", "0.5025685", "0.5020017", "0.5017303", "0.5011334", "0.49974093", "0.49881655", "0.49747285", "0.4964241", "0.49641868", "0.49620047", "0.49544358", "0.4945347", "0.49383897", "0.49330717", "0.49152917", "0.4913765", "0.48999712", "0.48999426", "0.48965603", "0.4895954", "0.48952463" ]
0.61810225
2
Returns an iterator of the instructions in this listing (in proper sequence), starting at the specified address. The specified address indicates the first instruction that would be returned by an initial call to the next method. An initial call to the previous method would return the instruction with an address less than the specified address.
public InstructionIterator getInstructions(Address addr, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Instruction getInstructionBefore(Address addr);", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public Instruction getInstructionAfter(Address addr);", "@Test(expected = NoSuchElementException.class)\n public void testPrevious_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 5, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.previous();\n }", "public InstructionIterator getInstructions(boolean forward);", "public Instruction getInstructionAt(Address addr);", "public Instruction getInstructionContaining(Address addr);", "public List<DexlibAbstractInstruction> instructionsBefore(DexlibAbstractInstruction instruction) {\n int i = instructions.indexOf(instruction);\n if (i == -1) {\n throw new IllegalArgumentException(\"Instruction \" + instruction + \" not part of this body.\");\n }\n\n List<DexlibAbstractInstruction> l = new ArrayList<DexlibAbstractInstruction>();\n l.addAll(instructions.subList(0, i));\n Collections.reverse(l);\n return l;\n }", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public Iterator<K> iterator()\n {\n\treturn new SkipListIterator<K>(this.head);\n }", "public Iterator begin()\n\t{\n\t\treturn new LinkedListIterator(head); \n\t}", "@Test\n public void testPreviousIndex_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n int expResult = -1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "public ListIterator iterator()\n {\n return new ListIterator(firstLink);\n }", "public AIter next() {\n int p;\n return (p = start + 1) < size ? new Iter(p) : null;\n }", "@Test\n public void testPrevious_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n Integer expResult = 2;\n Integer result = instance.previous();\n assertEquals(expResult, result);\n }", "public IndexRecord getIteratorPrev() {\n iter = (iter == 0 ? -1 : iter - 1);\n return (iter == -1 ? null : data[iter]);\n }", "IList<T> getNext();", "public List<Integer> succ(int n) {\n // Don't generate a non-existent \"next\" instruction for the last in a block.\n // For sensibly generated code, this ought not even to be possible,\n // as the last operation will be return or unconditional jump.\n boolean last = (n == this.code.size() - 1) ? true : false;\n TACOp op = this.code.get(n);\n\n switch (op.getType()) {\n // Unconditional jumps can't fall through to the next operation.\n case JMP:\n return Collections.singletonList(this.labelLocs.get(op.getLabel()));\n // Conditional jumps can fall through.\n case JZ:\n int dest = this.labelLocs.get(op.getLabel());\n if (last) {\n return Collections.singletonList(dest);\n }\n else {\n return pairList(dest, n+1);\n }\n // Returns can't go anywhere (within the block).\n case RET:\n return Collections.emptyList();\n // All other operations fall through.\n // (Even for calls, execution resumes at the following operation.)\n default:\n if (last) {\n return Collections.emptyList();\n }\n else {\n return Collections.singletonList(n+1);\n }\n }\n }", "@Test\n public void testAdd_After_Previous() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.previous();\n\n instance.add(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public Instruction nextInstruction() {\n return this.instructionList.next();\t\n }", "@Test\n public void testPrevious_Middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 5, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.next();\n\n Integer expResult = 5;\n Integer result = instance.previous();\n assertEquals(expResult, result);\n }", "public FunctionIterator getFunctions(Address start, boolean forward);", "public LinkedListItr findPrevious( Object x )\n {\n ListNode itr = header;\n\n while( itr.next != null && !itr.next.element.equals( x ) )\n itr = itr.next;\n\n return new LinkedListItr( itr );\n }", "private NasmInst getNextInst(NasmInst previousInst) {\n if (previousInst == null)\n throw new FgException(\"ERROR: Need previous instruction to find the next one\");\n int instIndex = nasm.listeInst.indexOf(previousInst);\n if (instIndex == -1)\n throw new FgException(\"ERROR: Instruction doesn't appear on the NASM\");\n if (instIndex == nasm.listeInst.size() - 1)\n throw new FgException(\"ERROR: No next instruction\");\n return nasm.listeInst.get(instIndex + 1);\n }", "public Iterator iterator () {\n return new MyIterator (first);\n }", "@Test\n public void testNext_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n Integer expResult = 1;\n Integer result = instance.next();\n assertEquals(expResult, result);\n }", "public Object next()\n/* */ {\n/* 84 */ if (this.m_offset < this.m_limit) {\n/* 85 */ return this.m_array[(this.m_offset++)];\n/* */ }\n/* 87 */ throw new NoSuchElementException();\n/* */ }", "public Object next()\n/* */ {\n/* 93 */ if (this.m_offset < this.m_array.length) {\n/* 94 */ Object localObject = this.m_array[this.m_offset];\n/* 95 */ advance();\n/* 96 */ return localObject;\n/* */ }\n/* 98 */ throw new NoSuchElementException();\n/* */ }", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "public LinkedListIterator(){\n position = null;\n previous = null; \n isAfterNext = false;\n }", "@Test\n public void testNextIndex_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n int expResult = 0;\n int result = instance.nextIndex();\n\n assertEquals(expResult, result);\n }", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "public Z peek() {\n return mNext;\n }", "@Test\n public void testListIteratorPrevious(){\n DoubleLinkedList<Integer> list1 = new DoubleLinkedList<Integer>();\n ListIterator<Integer> list1It = list1.iterator();\n try{\n list1It.previous();\n fail(\"expected a NoSuchElementException to be thrown\");\n }\n catch(NoSuchElementException error){\n assertEquals(error.getMessage(), \"There is no previous element in the list\");\n }\n list1It.add(1);\n assertEquals(\"testing with an element in the next spot\", new Integer(1), list1It.previous());\n }", "@Test\n public void testHasPrevious_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = false;\n boolean result = instance.hasPrevious();\n\n assertEquals(expResult, result);\n }", "public IndexRecord getIteratorNext() {\n iter = (iter == next - 1 ? -1: iter + 1);\n return (iter == -1 ? null : data[iter]);\n }", "private\t\tMiContainerIterator getPreviousIterator()\n\t\t{\n\t\tif (startAtTop)\n\t\t\t{\n\t\t\twhile (++layerNum <= editor.getNumberOfLayers() - 1)\n\t\t\t\t{\n\t\t\t\tif (editor.getLayer(layerNum).isVisible())\n\t\t\t\t\t{\n\t\t\t\t\treturn(new MiContainerIterator(\n\t\t\t\t\t\teditor.getLayer(layerNum), !startAtTop, \n\t\t\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn(null);\n\t\t\t}\n\t\twhile (--layerNum >= 0)\n\t\t\t{\n\t\t\tif (editor.getLayer(layerNum).isVisible())\n\t\t\t\t{\n\t\t\t\treturn(new MiContainerIterator(\n\t\t\t\t\teditor.getLayer(layerNum), !startAtTop, \n\t\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts));\n\t\t\t\t}\n\t\t\t}\n\t\treturn(null);\n\t\t}", "public Iterator<BigInteger> iterator() {\n // return new FibIterator();\n return new Iterator<BigInteger>() {\n private BigInteger previous = BigInteger.valueOf(-1);\n private BigInteger current = BigInteger.ONE;\n private int index = 0;\n \n \n @Override\n //if either true will stop, evaluates upper < 0 first (short circuit)\n public boolean hasNext() {\n return upper < 0 || index < upper;\n }\n\n @Override\n //Creating a new value called next\n public BigInteger next() {\n BigInteger next = previous.add(current);\n previous = current;\n current = next;\n index++;\n return current;\n }\n \n };\n }", "BooleanIterator iterator(int startIndex);", "public final T next()\n {\n return skip(1);\n }", "@Test\n public void testSet_After_Previous() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.previous();\n\n instance.set(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public Iterator iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "@Test\n public void testIterator_Backward() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n int i = 0;\n while (instance.hasNext()) {\n instance.next();\n }\n\n i = baseList.size() - 1;\n while (instance.hasPrevious()) {\n assertEquals(baseList.get(i--), instance.previous());\n }\n\n }", "Iterator<T> iterator(int start, int limit);", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public interface RandomAccessIterator extends BidirectionalIterator\n {\n /**\n * Return the index of my current position.\n */\n public int index();\n\n /**\n * Return true if I'm before a specified iterator.\n * @param iterator The iterator to compare myself against.\n */\n public boolean less( RandomAccessIterator iterator );\n\n /**\n * Return a clone of myself.\n */\n public Object clone();\n }", "@Test\n public void testIterator_Forward() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n int i = 0;\n while (instance.hasNext()) {\n assertEquals(baseList.get(i++), instance.next());\n }\n\n }", "public Iterator<E> iterator() {\n\t\treturn new LinkedListItr();\r\n\t}", "public LinkedListIterator<AnyType> findPrevious(AnyType x) {\n ListNode<AnyType> itr = header;\n\n while (itr.next != null && !itr.next.element.equals(x)) {\n itr = itr.next;\n }\n\n return new LinkedListIterator<AnyType>(itr);\n }", "public CodeUnit getCodeUnitBefore(Address addr);", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public E next() {\r\n\r\n\t\tE result = null;\r\n\t\tif (hasNext()) {\r\n\t\t\tresult = links.get(counter);\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "Iterator<T> iterator();", "@Test\n public void testPreviousIndex_End() {\n\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "public IteratorInterface<T> iterator(int index)\r\n {\r\n return new IteratorInterface<T>()\r\n {\r\n private Node<T> prev; // node before cursor position\r\n private Node<T> next; // node after cursor position\r\n \r\n // Use an instance initialization block because\r\n // anonymous classes don't support constructors.\r\n \r\n {\r\n Node<T> walker; // needed for traversing the list\r\n \r\n if ((index < 0) || (index > numElements))\r\n throw new IndexOutOfBoundsException(\r\n \"Illegal index \" + index +\r\n \" passed to iterator initialization block.\\n\");\r\n\r\n if (index == 0)\r\n {\r\n prev = null;\r\n next = front;\r\n }\r\n else if (index == numElements)\r\n {\r\n prev = rear;\r\n next = null;\r\n }\r\n else\r\n {\r\n walker = front; \r\n for (int i=1; i<index; i++)\r\n {\r\n walker = walker.next;\r\n }\r\n prev = walker;\r\n next = walker.next;\r\n }\r\n } // end instance initialization block\r\n \r\n //*****************************************\r\n\r\n // Return true if not at the end of the list.\r\n \r\n public boolean hasNext()\r\n {\r\n return (next != null);\r\n }\r\n \r\n //*****************************************\r\n\r\n // Return the next node's value and move\r\n // cursor position forward.\r\n\r\n public T next()\r\n { \r\n if (next == null)\r\n throw new NoSuchElementException(\"Attempt to\" +\r\n \" call next when there's no next element.\");\r\n\r\n prev = next;\r\n next = next.next;\r\n return prev.data;\r\n } // end next\r\n\r\n //*****************************************\r\n\r\n // Instantiate a node and insert it before the\r\n // node that next points to. Afterward, the\r\n // cursor position is after the new node.\r\n \r\n public void add(T element)\r\n {\r\n Node<T> newNode = new Node<T>(element);\r\n Node<T> origPrev = prev; // remember original prev\r\n \r\n // these are needed for all 4 scenarios:\r\n newNode.next = next;\r\n prev = newNode;\r\n \r\n if (isEmpty())\r\n {\r\n front = rear = newNode;\r\n }\r\n \r\n // cursor position at front:\r\n else if (prev == null)\r\n {\r\n front = newNode;\r\n }\r\n\r\n // cursor position at rear:\r\n else if (next == null)\r\n {\r\n rear = newNode;\r\n origPrev.next = newNode;\r\n }\r\n\r\n else // cursor position in the interior:\r\n {\r\n origPrev.next = newNode;\r\n }\r\n \r\n numElements++;\r\n } // end add\r\n }; // end anonymous inner class\r\n }", "public Iterator next() {\n return new FilterIterator(succ.iterator(), filter);\n }", "public interface ListIterator extends Iterator<Object> {\n /**\n * Checks if the previous element exists.\n *\n * @return true if this list iterator has more elements when traversing\n * the list in the reverse direction.\n */\n boolean hasPrevious();\n\n /**\n * Returns the previous element in the list and\n * moves the cursor position backwards.\n *\n * @return the previous element in the list\n */\n Object previous();\n\n /**\n *\n * @param e replaces the last element returned by next or\n * previous with the specified element.\n */\n void set(Object e);\n\n /**\n * Removes the last element returned by next or\n * previous with the specified element.\n */\n void remove();\n\n\n}", "@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "@Test\n public void testListIteratorHasPrevious(){\n DoubleLinkedList<Integer> list1 = new DoubleLinkedList<Integer>();\n ListIterator<Integer> list1It = list1.iterator();\n assertFalse(\"testing with no previous element\", list1It.hasPrevious());\n list1It.add(1);\n assertTrue(\"testing with a previous element\", list1It.hasPrevious());\n }", "@Override\n public T next() {\n T n = null;\n if (hasNext()) {\n // Give it to them.\n n = next;\n next = null;\n // Step forward.\n it = it.next;\n stop -= 1;\n } else {\n // Not there!!\n throw new NoSuchElementException();\n }\n return n;\n }", "public interface SupplyPageIterator extends PageIteratorBase {\n\n Supply2[] prev() throws RemoteException;\n\n Supply2[] current() throws RemoteException;\n\n Supply2[] next() throws RemoteException;\n\n Supply2[] goTo(int page) throws RemoteException;\n\t\n}", "public static ListIterator iterator() {\r\n\t\treturn getIterator(Direction.class);\r\n\t}", "@Override\n\tpublic Iterator<Key> iterator() {\n\t\treturn new ListIterator<Key>() {\n\t\t\tNode temp = getFirstNode();\n\t\t\t@Override\n\t\t\tpublic boolean hasNext() {\n\t\t\t\treturn temp.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Key next() {\n\t\t\t\tKey k = temp.next.key;\n\t\t\t\ttemp = temp.next;\n\t\t\t\treturn k;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic boolean hasPrevious() {\n\t\t\t\treturn !temp.equals(getFirstNode());\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Key previous() {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int nextIndex() {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int previousIndex() {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void remove() {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void set(Key key) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void add(Key key) {\n\n\t\t\t}\n\t\t};\n\t}", "OIterator<V> before();", "@Override\n public Integer next() {\n if (next == null) {\n throw new NoSuchElementException();\n }\n Integer toReturn = next;\n next = null;\n if (peekingIterator.hasNext()) {\n next = peekingIterator.next();\n }\n return toReturn;\n }", "public interface PersonPageIterator extends PageIteratorBase {\n\t\n\tPerson2[] prev() throws RemoteException;\n\t\n\tPerson2[] current() throws RemoteException;\n\t\n\tPerson2[] next() throws RemoteException;\n\t\n\tPerson2[] goTo(int page) throws RemoteException;\n\n}", "public T previous() {\n\t\t\tif(hasPrevious()) {\n\t\t\t\tT temp = vector.elementAt(previousPosition);\n\t\t\t\tpreviousPosition++;\n\t\t\t\tnextPosition++;\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\t}\n\t\t}", "@Test\n public void testPreviousIndex_Middle() {\n\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "public LinkedList<Address> getInputAddressList() {\n assert(invariant());\n return inputAddressList;\n }", "@Override\n public Integer next() {\n if (hasTop) {\n hasTop = false;\n return top;\n }\n return it.next();\n }", "@Override\n public Integer next() {\n if (!isPeeked && hasNext())\n return iterator.next();\n int toReturn = peekedElement;\n peekedElement = -1;\n isPeeked = false;\n return toReturn;\n }", "public Iterator<T> getPageElements();", "public ListUtilities returnToStart(){\n\t\tListUtilities temp = new ListUtilities();\n\t\tif(this.prevNum != null){\n\t\t\ttemp = this.prevNum.returnToStart();\n\t\t\treturn temp;\n\t\t}else{\n\t\t\t//System.out.println(\"Returned to... \" + this.num);\n\t\t\treturn this;\n\t\t}\n\t}", "@Override\n public Integer next() {\n if (next != null) {\n Integer next = this.next;\n this.next = null;\n return next;\n\n }\n\n return iterator.next();\n }", "public IList<T> getNext() {\n throw new UnsupportedOperationException();\n }", "public C getNext();", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "public DataIterator getData(Address addr, boolean forward);", "public SkipListNode<K> next(int i)\n {\n\treturn next.get(i);\n }", "public Iterator<T> iterator()\n\t{\n\t\treturn new LinkedListIterator();\n\t}", "@Override\r\n\tpublic Iterator<T> iterator() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn this.iteratorInOrder();\r\n\t}", "public ListIterator iterator(){\n\t\treturn new ListIterator(tail.next);\n\t}", "@Nonnull\n public Optional<ENTITY> peekNext()\n {\n return hasNext() ? Optional.of(items.get(index + 1)) : Optional.empty();\n }", "public JumpIterator(Iterator<T> iterator) {\n this.iterator = iterator;\n hasNextFlag = true;\n }", "public int next() {\r\n\t\tif (currentPosition <= list.length &&list[currentPosition]==-1) {\r\n\t\t\tcurrentPosition = 0;\r\n\t\t\treturn list[currentPosition];\r\n\t\t}\r\n\t\treturn list[currentPosition++];\r\n\t}", "public List<DexlibAbstractInstruction> instructionsAfter(DexlibAbstractInstruction instruction) {\n int i = instructions.indexOf(instruction);\n if (i == -1) {\n throw new IllegalArgumentException(\"Instruction\" + instruction + \"not part of this body.\");\n }\n\n return instructions.subList(i + 1, instructions.size());\n }", "public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}", "public LinkedListItr zeroth( )\n {\n return new LinkedListItr( header );\n }", "@Override\n\tpublic Iterator<E> iterator()\n\t{\n\t\treturn new Iterator<E>() {\n\t\t\tprivate Node<E> current = first;\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn current.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic E next()\n\t\t\t{\n\t\t\t\tif (hasNext())\n\t\t\t\t{\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\treturn current.value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthrow new NoSuchElementException();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}", "iterator(){current = start;}", "public void Prev();" ]
[ "0.6398826", "0.61390734", "0.5822756", "0.569061", "0.5607173", "0.5548895", "0.5524082", "0.54783624", "0.54018855", "0.5385965", "0.53267795", "0.51855487", "0.5152817", "0.51020396", "0.50639135", "0.50595194", "0.5013587", "0.50089175", "0.49562147", "0.49268925", "0.49218437", "0.49049658", "0.4882176", "0.48709604", "0.48612285", "0.48552024", "0.4851894", "0.48511744", "0.4846041", "0.48452622", "0.4836469", "0.47941014", "0.4787196", "0.47870755", "0.47834373", "0.47800893", "0.47737885", "0.47689822", "0.4745918", "0.47291076", "0.47157872", "0.471551", "0.4701546", "0.46790493", "0.46767753", "0.46745682", "0.46712968", "0.4668642", "0.46682864", "0.46550453", "0.46524462", "0.46520546", "0.46420443", "0.46405357", "0.46334335", "0.46334335", "0.46334335", "0.46334335", "0.46102902", "0.46054772", "0.46037775", "0.46021855", "0.46018535", "0.45926967", "0.4588308", "0.45873314", "0.4586732", "0.45819026", "0.45816258", "0.45710793", "0.45672458", "0.4566493", "0.45649916", "0.45639816", "0.4557911", "0.4555927", "0.45550457", "0.45542184", "0.45477825", "0.45473874", "0.45460752", "0.45386595", "0.45358196", "0.45303252", "0.45294365", "0.45275822", "0.4522571", "0.45219052", "0.4518766", "0.45093197", "0.45066893", "0.4506089", "0.44935718", "0.4484413", "0.44790584", "0.44774348", "0.44753292", "0.44720775", "0.44703272", "0.44672304" ]
0.67382777
0
Get an Instruction iterator over the address range(s). Only instructions whose start addresses are contained in the given address set will be returned by the iterator.
public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public InstructionIterator getInstructions(Address addr, boolean forward);", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "public Set<T> getRanges();", "private void getNextInSet() throws CancelledException {\n\t\t// find next address that has a valid block;\n\t\tAddress addr = getNextAddress(nextAddr);\n\n\t\t// if the instruction's start address is in our set\n\t\t// then we have our block\n\t\tif (addr != null && addrSet.contains(addr)) {\n\t\t\tnextBlock = model.getCodeBlockAt(addr, monitor);\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// otherwise we're out of our current address range in\n\t\t// our address range set so we find the next address range\n\t\t// with a min address >= the instructions address and\n\t\t// look for a block there\n\t\t//nextAddr = instr.getMaxAddress();\n\t\twhile (rangeIter.hasNext()) {\n\t\t\tAddressRange range = rangeIter.next();\n\n\t\t\tif (nextAddr.compareTo(range.getMinAddress()) >= 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnextBlock = getFirstInRange(range);\n\t\t\t// if we find a block we're done\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if we find no block then there's no block in the\n\t\t\t// current range and we can move on to the next one\n\t\t}\n\t\tnextBlock = null;\n\t}", "public AddressSetView getAddressSet() {\n\t\treturn new AddressSet(baseAddress, getEndAddress());\n\t}", "private AddressSet getMappedIntersection(MemoryBlock mappedBlock, AddressSet set) {\n\t\tAddressSet mappedIntersection = new AddressSet();\n\t\tList<MemoryBlockSourceInfo> sourceInfos = mappedBlock.getSourceInfos();\n\t\t// mapped blocks can only ever have one sourceInfo\n\t\tMemoryBlockSourceInfo info = sourceInfos.get(0);\n\t\tAddressRange range = info.getMappedRange().get();\n\t\tAddressSet resolvedIntersection = set.intersect(new AddressSet(range));\n\t\tfor (AddressRange resolvedRange : resolvedIntersection) {\n\t\t\tAddressRange mappedRange = getMappedRange(mappedBlock, resolvedRange);\n\t\t\tif (mappedRange != null) {\n\t\t\t\tmappedIntersection.add(mappedRange);\n\t\t\t}\n\t\t}\n\t\treturn mappedIntersection;\n\t}", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new NullPointerException();\n TreeSet<Point2D> inRangeSet = new TreeSet<>();\n for (Point2D point : pointSet) {\n if (rect.contains(point)) {\n inRangeSet.add(point);\n }\n }\n return inRangeSet;\n }", "public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}", "public InstructionIterator getInstructions(boolean forward);", "public abstract ucar.array.RangeIterator getRangeIterator();", "@Override\r\n\tpublic Iterator<GIS_layer> iterator() {\n\t\treturn set.iterator();\r\n\t}", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "public IntIterator intIterator(final int start, final int end) {\n\t\treturn new BufferedRangeEWAHintIterator(this, start, end);\n\t}", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "public static AddressSetView getAddressSet(AddressFactory factory, Address start,\n\t\t\tboolean forward) {\n\t\tAddressSet all = factory.getAddressSet();\n\t\tif (forward) {\n\t\t\tAddress max = all.getMaxAddress();\n\t\t\treturn factory.getAddressSet(start, max);\n\t\t}\n\t\tAddress min = all.getMinAddress();\n\t\treturn factory.getAddressSet(min, start);\n\t}", "public Iterator<Range> iterator(ValueMapper mapper) {\n return new Trie2Iterator(mapper);\n }", "@Override\n public Iterator<Range> iterator() {\n return iterator(defaultValueMapper);\n }", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public Iterable<Point2D> range(RectHV rect) {\n ArrayList<Point2D> returnArray = new ArrayList<Point2D>();\n if (rect == null) {\n throw new IllegalArgumentException(\"rect input is null\");\n }\n for (Point2D i : pointsSet) {\n if (rect.contains(i))\n returnArray.add(i);\n }\n return returnArray;\n }", "public Instruction getInstructionContaining(Address addr);", "public Set<String> zrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public static Iterator <Gate> iterator() {\n return allGates.iterator();\n }", "private IterableSet<AugmentedStmt> get_EntryPoint(IterableSet<AugmentedStmt> nodeList) {\n IterableSet<AugmentedStmt> entryPoints = new IterableSet<AugmentedStmt>();\n\n for (AugmentedStmt as : nodeList) {\n for (AugmentedStmt po : as.cpreds) {\n if (nodeList.contains(po) == false) {\n entryPoints.add(as);\n break;\n }\n }\n }\n\n return entryPoints;\n }", "private List<Integer> allIntegerInRange(int start, int end) {\n\t\tList<Integer> range = new ArrayList<Integer>();\n\n\t\tfor (int i = start; i <= end; i++) {\n\t\t\trange.add(i);\n\t\t}\n\n\t\treturn range;\n\t}", "private static EntityIterator getEntityIterator(Schematic schematic, Location location) {\n var iterator = new EntityIterator();\n\n var world = location.getWorld();\n var offset = new Vector3i(location.getBlockX(), location.getBlockY(), location.getBlockZ());\n offset.sub(schematic.getOrigin());\n\n var min = schematic.getMinimumPoint().add(offset, new Vector3i());\n var max = schematic.getMaximumPoint().add(offset, new Vector3i());\n\n for (var entity : world.getEntities()) {\n var eLoc = entity.getLocation();\n if (isInBounds(eLoc, min, max))\n iterator.addEntity(entity);\n }\n\n return iterator;\n }", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfSource(String lowerInclusive, String upperInclusive) {\n return fetchRange(Income.INCOME.SOURCE, lowerInclusive, upperInclusive);\n }", "public HashSet<Edge> rangeQuery(MBR mbr) {\r\n\t\tthrow new UnsupportedOperationException();\r\n\t}", "public Iterable<Point2D> range(RectHV rect) {\n\n if (rect == null)\n throw new IllegalArgumentException(\"Got null object in range()\");\n \n Queue<Point2D> pointsInside = new Queue<>();\n \n for (Point2D p : point2DSET) {\n \n double x = p.x();\n double y = p.y();\n if (x >= rect.xmin() && x <= rect.xmax() &&\n y >= rect.ymin() && y <= rect.ymax())\n pointsInside.enqueue(p);\n \n }\n \n return pointsInside;\n }", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "BooleanIterator iterator(int startIndex);", "protected abstract Iterable<E> getIntersecting(D lower, D upper);", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) {\n throw new IllegalArgumentException();\n }\n SET<Point2D> result = new SET<Point2D>();\n for (Point2D point : points) {\n if (rect.contains(point))\n result.add(point);\n }\n return result;\n }", "Iterator<T> iterator();", "public static List <Index> rangeOf(int start, int end) {\r\n FastTable <Index> list = FastTable.newInstance();\r\n for (int i=start; i < end; i++) {\r\n list.add(Index.valueOf(i));\r\n }\r\n return list;\r\n }", "@Override\n public Iterator<Set<E>> iterator() {\n return new DisjointSetIterator(theSet);\n }", "public SetOfRanges() {\n RangeSet = new Vector();\n }", "public static Iterable<Integer> allPrimesInRange(final int startInclusive, final int endExclusive) {\n grow(endExclusive);\n final int first = getNextHigherPrime(Math.min(1, startInclusive-1));\n return () -> new Iterator<Integer>() {\n int cur = first;\n @Override\n public boolean hasNext() {\n return cur != -1;\n }\n\n @Override\n public Integer next() {\n final int limit = endExclusive;\n //start at next higher odd number\n int higher = -1;\n for(int nxt = cur + 1 +(cur%2); nxt < limit; nxt += 2){\n if(!sieve.get((nxt-3)/2)){\n higher = nxt;\n break;\n }\n }\n int ret = cur;\n cur = higher;\n return ret;\n }\n };\n }", "public AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly,\n\t\t\tTaskMonitor monitor) throws CancelledException;", "abstract public Iterator<BlockReportReplica> iterator();", "public FunctionIterator getFunctions(Address start, boolean forward);", "public Iterator reachable() {\n Set s = SortedArraySet.FACTORY.makeSet(HashCodeComparator.INSTANCE);\n s.add(IdentityHashCodeWrapper.create(this));\n this.reachable(s);\n return new FilterIterator(s.iterator(), filter);\n }", "public Iterator<T> iterator() {\n return new SetIterator<T>(this.head);\n }", "Set<MacAddress> neighbors();", "Iterator<T> iterator(int start, int limit);", "public boolean allInRange(int start, int end) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tint a=data[i];\n \t\t\tif ((a<start)||(a>=end)) return false;\n \t\t}\n \t\treturn true;\n \t}", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "@Override\n public CloseableIterator<KVPair> getRange(byte[] minKey, byte[] maxKey, boolean reverse) {\n Preconditions.checkState(!this.closed.get(), \"transaction closed\");\n return new XodusIter(this.store.openCursor(this.tx), minKey, maxKey, reverse);\n }", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "List<MemoryBlockDB> getBlocks(Address start, Address end) {\n\t\tList<MemoryBlockDB> list = new ArrayList<>();\n\n\t\tList<MemoryBlockDB> tmpBlocks = blocks;\n\t\tint index = Collections.binarySearch(tmpBlocks, start, BLOCK_ADDRESS_COMPARATOR);\n\t\tif (index < 0) {\n\t\t\tindex = -index - 2;\n\t\t}\n\t\tif (index >= 0) {\n\t\t\tMemoryBlockDB block = tmpBlocks.get(index);\n\t\t\tif (block.contains(start)) {\n\t\t\t\tlist.add(block);\n\t\t\t}\n\t\t}\n\n\t\twhile (++index < tmpBlocks.size()) {\n\t\t\tMemoryBlockDB block = tmpBlocks.get(index);\n\t\t\tif (block.getStart().compareTo(end) > 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlist.add(block);\n\t\t}\n\n\t\treturn list;\n\t}", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfId(UUID lowerInclusive, UUID upperInclusive) {\n return fetchRange(Income.INCOME.ID, lowerInclusive, upperInclusive);\n }", "public Iterator getIterator() {\n\t\t\n\t\treturn blocks.iterator();\n\t\t\n\t}", "public Iterator<GPoint> iterator() {\n\t\treturn points.iterator();\n\t}", "public LinkedList<Address> getInputAddressList() {\n assert(invariant());\n return inputAddressList;\n }", "List<Account> findByAddressStartingWith(String startAddress);", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }", "@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}", "public Iterator iterator()\n {\n return new HashSetIterator();\n }", "Set<? extends IRBasicBlock> getBlocks();", "public Set<AddressEntry> getEntry() {\n return entrySet;\n }", "public Iterator<Join> iterator()\n {\n return joins.iterator();\n }", "protected Iterator getNominationsSet() \n {\n return this.nominations.iterator();\n }", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new IllegalArgumentException(\n \"Null pointer provided instead of a query rectangle\");\n ptsInside = new SET<Point2D>();\n searchForPoints(root, rect);\n return ptsInside;\n }", "public Iterable<Point2D> range(RectHV rect) {\n SET<Point2D> point_list = new SET<Point2D>();\n rangesearch(root, rect, point_list);\n return point_list;\n }", "public void includeDomainInRangeCalculator(IntegerRangeCalculator i)\r\n\t{\r\n\t\ti.include(start);\r\n\t\tif(data.length>0) i.include(start+data.length-1);\r\n\t}", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "private static RegionIterator getChunkIterator(Schematic schematic, Location location) {\n var offset = new Vector3i(location.getBlockX(), location.getBlockY(), location.getBlockZ());\n offset.sub(schematic.getOrigin());\n\n var min = schematic.getMinimumPoint().add(offset, new Vector3i());\n var max = schematic.getMaximumPoint().add(offset, new Vector3i());\n\n blockCoordsToChunkCoords(min);\n blockCoordsToChunkCoords(max);\n\n var mask = new Vector3i(1, 0, 1);\n min.mul(mask);\n max.mul(mask);\n\n return new RegionIterator(min, max);\n }", "public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfState(UByte lowerInclusive, UByte upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.STATE, lowerInclusive, upperInclusive);\n }", "public Iterable<Point2D> range(RectHV rect) \r\n\t{\r\n\t\tStack<Point2D> insiders = new Stack<Point2D>();\r\n\t\trange(insiders, root, rect, new RectHV(0,0,1,1));\r\n\t\treturn insiders;\r\n\t}", "public java.util.List<DataEntry> findAll(int start, int end);", "protected Iterator<Cell> getCellIterator(ColumnFamily container)\n {\n return container.iterator();\n }", "public FunctionIterator getFunctions(AddressSetView asv, boolean forward);", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "public int rangeBitwiseAnd(int m, int n) {\n \tint mask = 0xffffffff;\n \twhile((m&mask) != (n&mask)){\n \t\tmask <<= 1;\n \t}\n \treturn mask&m;\n }", "public Iterator<Point> getPointIterator(ModelObject target);", "public Iterator<Integer> fromA() {return this.fromA.iterator();}", "Iterator<E> iterator();", "Iterator<E> iterator();", "public Iterator<Type> iterator();", "@Override\n public Iterator<Integer> iterator() {\n return new Iterator<>() {\n int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < Set.this.count;\n }\n\n @Override\n public Integer next() {\n return Set.this.arr[i++];\n }\n };\n }", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfUsedFor(UByte lowerInclusive, UByte upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.USED_FOR, lowerInclusive, upperInclusive);\n }", "public Iterator<T> getIterator();", "@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new SetIterator();\n }", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "public Iterator<Coord> iterator() {\n\t\treturn new CoordListIterator(array, index);\n\t}", "public Iterator<Hex> iterator() {\n return new Iterator<Hex>() {\n private int g = 0;\n private int h = 0;\n @Override\n public boolean hasNext() {\n return g < hexWidth && h < hexHeight;\n }\n @Override\n public Hex next() {\n Hex result = hexes[g][h];\n if (++g == hexWidth) {\n g = 0;\n h++;\n }\n return result;\n }\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }", "public List<com.ims.dataAccess.tables.pojos.User> fetchRangeOfStreetname(String lowerInclusive, String upperInclusive) {\n return fetchRange(User.USER.STREETNAME, lowerInclusive, upperInclusive);\n }", "public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);", "AllUsersAddresses getAllUsersAddresses();", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfId(ULong lowerInclusive, ULong upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.ID, lowerInclusive, upperInclusive);\n }", "public Iterator<Edge> edgeIterator(int source){\n return edges[source].iterator();\n }", "@VisibleForTesting\n public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {\n return map.entrySet().iterator();\n }", "Iterator<CtElement> descendantIterator();" ]
[ "0.62359035", "0.5748398", "0.5543227", "0.5371444", "0.53632987", "0.5247925", "0.5227429", "0.5179267", "0.51667655", "0.5121045", "0.50840425", "0.5012986", "0.49853376", "0.49140722", "0.49106935", "0.48962182", "0.48597443", "0.48564038", "0.4846609", "0.48452216", "0.47969764", "0.47869244", "0.4769434", "0.47449577", "0.46943578", "0.46943536", "0.46871856", "0.46591568", "0.46491638", "0.46488827", "0.46353212", "0.46182612", "0.45966837", "0.45935398", "0.45903683", "0.45811573", "0.45804176", "0.45716944", "0.45688334", "0.4564043", "0.45635727", "0.4537076", "0.4530587", "0.45302138", "0.45210382", "0.4518277", "0.45055446", "0.44927338", "0.44927338", "0.44927338", "0.44927338", "0.44843847", "0.44816878", "0.44748032", "0.44678864", "0.44667807", "0.44659874", "0.44647178", "0.44618526", "0.44603553", "0.4443263", "0.44396323", "0.44294867", "0.44276914", "0.44245067", "0.4418081", "0.441105", "0.4405812", "0.44043455", "0.4401341", "0.43997118", "0.4395592", "0.43946186", "0.43869093", "0.43816113", "0.43811202", "0.4378037", "0.43704182", "0.43704182", "0.43704182", "0.437016", "0.43682402", "0.436717", "0.43651706", "0.43651706", "0.43576568", "0.43482512", "0.43462282", "0.43409434", "0.4340345", "0.43336815", "0.43327552", "0.43275273", "0.43201864", "0.4316033", "0.4315353", "0.43134168", "0.43119395", "0.43111283", "0.4306642" ]
0.69870585
0
get the Data (Defined or Undefined) that starts at the given address.
public Data getDataAt(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data getDefinedDataAt(Address addr);", "public Data getUndefinedDataAt(Address addr);", "public Data getDefinedDataAfter(Address addr);", "public Data getDefinedDataBefore(Address addr);", "public Data getDefinedDataContaining(Address addr);", "public Data getDataBefore(Address addr);", "public Data getDataAfter(Address addr);", "public Data getDataContaining(Address addr);", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);", "public DataIterator getDefinedData(Address addr, boolean forward);", "public byte get(int addr) {\n return data[addr - start];\n }", "public abstract byte[] readData(int address, int length);", "protected byte direct_read(int address) {\n return segment_data[address];\n }", "public DataIterator getData(Address addr, boolean forward);", "public Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "public byte get(int address) {\n try {\n return direct_read(address);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }", "public static int offset_addr() {\n return (0 / 8);\n }", "public E getData(int pos) {\n\t\tif (pos >= 0 && pos < dataSize()) {\n\t\t\treturn data.get(pos);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "long getAddress(ByteBuffer buffer);", "private LogData getDefaultLogData(long address) {\n ByteBuf b = Unpooled.buffer();\n Serializers.CORFU.serialize(PAYLOAD_DATA.getBytes(), b);\n LogData ld = new LogData(DataType.DATA, b);\n ld.setGlobalAddress(address);\n ld.setEpoch(1L);\n return ld;\n }", "public byte[] searchReturnData(short addressInDataBlock) {\n //take initial and size binary from memory\n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //if 0 no have data\n if (initial == 0 && sizeData == 0) {\n return null;\n }\n\n //return data\n byte[] toReturn = new byte[sizeData];\n \n int j = 0;\n for (short i = initial; i < initial + sizeData; i++) {\n toReturn[j] = serialize[i];\n j++;\n }\n\n return toReturn;\n }", "public byte get(int addr) throws ProgramException {\n return getSegment(addr, true).get(addr);\n }", "public Address getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "public SelectMapedBufferResult getData(final long offset) {\n return this.getData(offset, (0 == offset ? true : false));\n }", "@Override\n public Pointer addressPointer() {\n val tempPtr = new PagedPointer(ptrDataBuffer.primaryBuffer());\n\n switch (this.type) {\n case DOUBLE: return tempPtr.asDoublePointer();\n case FLOAT: return tempPtr.asFloatPointer();\n case UINT16:\n case SHORT:\n case BFLOAT16:\n case HALF: return tempPtr.asShortPointer();\n case UINT32:\n case INT: return tempPtr.asIntPointer();\n case UBYTE:\n case BYTE: return tempPtr.asBytePointer();\n case UINT64:\n case LONG: return tempPtr.asLongPointer();\n case BOOL: return tempPtr.asBoolPointer();\n default: return tempPtr.asBytePointer();\n }\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "public Address getValue() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "@SuppressWarnings(\"PointlessArithmeticExpression\")\n static int getDataFirstRecord(final int territoryNumber) {\n return INDEX[territoryNumber + POS_INDEX_FIRST_RECORD];\n }", "com.google.protobuf.ByteString getData(int index);", "com.google.protobuf.ByteString getData(int index);", "public int read(int address){\n switch (address){\r\n /*\r\n case 0: {\r\n return registers_w[CONTROL_REGISTER_1];\r\n }\r\n\r\n case 3: {\r\n return spriteMemoryCounter;\r\n }\r\n case 5:{\r\n return registers_w[SCROLL_OFFSET];\r\n }\r\n case 6:{\r\n return horizontalTileCounter | (verticalTileCounter << 5) | (horizontalNameCounter << 10) | (verticalNameCounter << 11);\r\n }\r\n */\r\n\t\t\tcase 0: {\r\n\t\t\t\t\t\treturn scanLine;\r\n\t\t\t\t\t\t// hack\r\n\t\t\t}\r\n case 1: {\r\n return registers_w[CONTROL_REGISTER_2];\r\n }\r\n case STATUS_REGISTER:{ // 2\r\n int returnVal = registers_r[STATUS_REGISTER];\r\n registers_r[STATUS_REGISTER] = getBitsUnset(registers_r[STATUS_REGISTER], STATUS_VBLANK); //| STATUS_SPRITE0_HIT);\r\n isFirstWriteToScroll = true;\r\n lastPPUAddressWasHigh = false;\r\n //logger.info(\"Status is: \" + Integer.toHexString(returnVal));\r\n return returnVal;\r\n }\r\n case SPRITE_MEMORY_DATA:{ // 4\r\n return readFromSpriteMemory();\r\n }\r\n case PPU_MEMORY_DATA:{ // 7\r\n int returnVal = 0xFF & registers_r[PPU_MEMORY_DATA]; // buffered read\r\n \r\n //int returnVal = 0xFF & memory.read(ppuMemoryAddress);\r\n\t\t\tint readAddress = horizontalTileCounter \r\n\t\t\t\t\t\t\t\t| (verticalTileCounter << 5)\r\n\t\t\t\t\t\t\t\t| (horizontalNameCounter << 10)\r\n\t\t\t\t\t\t\t\t| (verticalNameCounter << 11)\r\n\t\t\t\t\t\t\t\t| ((fineVerticalCounter & 0x3) << 12);\r\n\r\n\t\t\tif (readAddress == 0x3F10 || readAddress == 0x3F14 || readAddress == 0x3F18 || readAddress == 0x3F1C) {\r\n\t\t\t\treadAddress = readAddress & 0x3F0F;\r\n\t\t\t}\r\n registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(readAddress);\r\n // registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(ppuMemoryAddress);\r\n incrementCounters();\r\n /*\r\n if ((registers_w[CONTROL_REGISTER_1] & CR1_VERTICAL_WRITE) == 0){\r\n ppuMemoryAddress++;\r\n }\r\n else {\r\n ppuMemoryAddress = (ppuMemoryAddress + 32);\r\n }\r\n */\r\n return returnVal;\r\n }\r\n\r\n default: throw new RuntimeException(\"Invalid read attempt: \" + Integer.toHexString(address));\r\n }\r\n }", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "public double getElementFromFirst(int channel, int position, int DataPointer){\n\t\t\tint index = datapointer + position;\r\n\t\t\tif(index >= this.datalen) index -= this.datalen;\r\n\r\n\t\t\treturn databuffer[channel][index];\r\n\t\t}", "public ByteBuffer read(long address)\n {\n return tryRead(address, null);\n }", "public static int offset_dataType() {\n return (0 / 8);\n }", "protected int getStartAddress() {\r\n return (readByte(RESET_VECTOR) & 0xff) + ((readByte(RESET_VECTOR + 1) & 0xff) << 8);\r\n }", "public int getReturnAddressOffset();", "@Override\r\n\t\tpublic int getAO(int address) throws IOServiceException {\n\t\t\treturn 0;\r\n\t\t}", "AddressI getAddress();", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "db.fennec.proto.FDataEntryProto getData(int index);", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "public Variable getVariableContaining(int offset);", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "public Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;", "public int rva2offset(Address address) {\n\t\tint offset = -1;\n\t\tfor(IMAGE_SECTION_HEADER section:peFileSections) {\n\t\t\tif(address.getAddr32() >= section.getVirtualAddress()\n\t\t\t&& address.getAddr32() < section.getVirtualAddress() + section.getVirtualSize()) {\n\t\t\t\toffset = address.getAddr32() - section.getVirtualAddress() + section.getPointerToRawData();\n\t\t\t\treturn offset;\n\t\t\t}\n\t\t}\n\t\tif(address.getAddr32() < peOptionalHeader.getSizeOfHeaders())\n\t\t\treturn address.getAddr32();\n\t\treturn offset;\n\t}", "@Override\n\tpublic int read() {\n\t\tint lowByte = getFirstArg();\n\t\tint highByte = getSecondArg();\n\t\tint address = highByte;\n\t\taddress = address << 8;\n\t\taddress |= lowByte;\n\t\treturn CpuMem.getInstance().readMem(address);\n\t}", "public static String readDiskMemory(String address){\n\t\treturn memory.get(address);\n\t}", "@Override\n public int read(int address) {\n\n Preconditions.checkBits16(address);\n\n switch (address) {\n\n case AddressMap.REG_DIV:\n return Bits.extract(DIV, Byte.SIZE, Byte.SIZE);\n\n case AddressMap.REG_TIMA:\n return TIMA;\n\n case AddressMap.REG_TMA:\n return TMA;\n\n case AddressMap.REG_TAC:\n return TAC;\n\n default:\n return NO_DATA;\n }\n\n }", "String getAddress(int type);", "private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }", "public int getDataMemory(int index)\n {\n int retValue = 0;\n try { retValue = data_memory[index].intValue(); }\n catch (ArrayIndexOutOfBoundsException OOB) { }\n return retValue;\n }", "public T getData(int index){\n if(index < 0 || index >= data.size())\n return null;\n\n //give back the data\n return data.get(index);\n }", "int getOffset();", "int getOffset();", "int getOffset();", "E getData(int index);", "public long getAddress() {\n return origin + originOffset;\n }", "public int getOffset() {\n\t\treturn OFFSET_MASK & dataOffset;\n\t}", "Optional<MemoryAddress> lookup(String name);", "@Override\n\t\t\t public void getData(final int length) throws Exception {\n\t\t\t\t if (self.state.masked) {\n\t\t\t\t\t /*\n\t\t\t self.expectHeader(4, function(data) {\n\t\t\t var mask = data;\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['8'].finish.call(self, mask, data);\n\t\t\t });\n\t\t\t });*/\n\t\t\t\t\t self.expectHeader(4, new PacketHandler(){\n\n\t\t\t\t\t\t @Override\n\t\t\t\t\t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t\t\t\t\t final byte[] mask = new byte[4]; ///data.array();\n\t\t\t\t\t\t\t mask[0] = data.get(0);\n\t\t\t\t\t\t\t mask[1] = data.get(1);\n\t\t\t\t\t\t\t mask[2] = data.get(2);\n\t\t\t\t\t\t\t mask[3] = data.get(3);\n\n\t\t\t\t\t\t\t self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t\t public void onPacket(ByteBuffer data2)\n\t\t\t\t\t\t\t\t\t\t throws Exception {\n\t\t\t\t\t\t\t\t\t finish(mask, data2);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t }\n\n\t\t\t\t\t });\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t /*self.expectData(length, function(data) {\n\t\t\t\t\t\t opcodes['8'].finish.call(self, null, data);\n\t\t\t\t\t });*/\n\t\t\t\t\t self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onPacket(ByteBuffer data) throws Exception {\n finish(null, data);\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 }", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "private Segment getSegment(int addr, boolean get) throws ProgramException {\n Set<Segment> found = memory.get(addr);\n if (found.isEmpty()) {\n throw new ProgramException(get ? ErrorType.ADDRL : ErrorType.ADDRS);\n }\n return found.iterator().next();\n }", "public Instruction getInstructionAt(Address addr);", "java.lang.String getData();", "@Override\n\t\t\t public void getData(final int length) throws Exception {\n\t\t\t\t if (self.state.masked) {\n\t\t\t\t\t /*self.expectHeader(4, function(data) {\n\t\t\t var mask = data;\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['2'].finish.call(self, mask, data);\n\t\t\t });\n\t\t\t });*/\n\t\t\t\t\t self.expectHeader(4, new PacketHandler(){\n\n\t\t\t\t\t\t @Override\n\t\t\t\t\t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t\t\t\t\t final byte[] mask = new byte[4]; ///data.array();\n\t\t\t\t\t\t\t mask[0] = data.get(0);\n\t\t\t\t\t\t\t mask[1] = data.get(1);\n\t\t\t\t\t\t\t mask[2] = data.get(2);\n\t\t\t\t\t\t\t mask[3] = data.get(3);\n\n\t\t\t\t\t\t\t self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t\t public void onPacket(ByteBuffer data2)\n\t\t\t\t\t\t\t\t\t\t throws Exception {\n\t\t\t\t\t\t\t\t\t finish(mask, data2);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t }\n\n\t\t\t\t\t });\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t /*\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['2'].finish.call(self, null, data);\n\t\t\t });*/\n\t\t\t\t\t self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t @Override\n\t\t\t\t\t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t\t\t\t\t finish(null, data);\t\t\t\t\t\t\t\n\t\t\t\t\t\t }\n\n\t\t\t\t\t });\n\t\t\t\t }\n\t\t\t }", "public InetSocketAddress getDataAddress()\n {\n return rtpTarget;\n }", "public byte[] syncRead(int address, int length)\n {\n final String funcName = \"syncRead\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"addr=%d,len=%d\", address, length);\n }\n\n if (!isEnabled())\n {\n throw new RuntimeException(\"Device is not enabled, must call setEnabled first.\");\n }\n\n byte[] data = null;\n if (requestQueue != null)\n {\n TrcEvent completionEvent = new TrcEvent(instanceName + \".\" + funcName);\n Request request = new Request(null, true, address, null, length, completionEvent, null);\n TrcRequestQueue<Request>.RequestEntry entry = requestQueue.add(request, this::requestHandler, false);\n\n while (!completionEvent.isSignaled())\n {\n Thread.yield();\n }\n\n if (!entry.isCanceled())\n {\n data = request.buffer;\n request.buffer = null;\n }\n }\n else\n {\n data = readData(address, length);\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%s\",\n data == null? \"null\": Arrays.toString(data));\n }\n\n return data;\n }", "public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }", "public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}", "public char first_message_offset_GET()\n { return (char)((char) get_bytes(data, 5, 1)); }", "public char first_message_offset_GET()\n { return (char)((char) get_bytes(data, 5, 1)); }", "@Override\n\t\t\t public void getData(final int length) throws Exception {\n\t\t\t if (self.state.masked) {\n\t\t\t \t /*\n\t\t\t this.expectHeader(4, function(data) {\n\t\t\t var mask = data;\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['10'].finish.call(self, mask, data);\n\t\t\t });\n\t\t\t });*/\n\t\t\t \t self.expectHeader(4, new PacketHandler(){\n\n\t\t\t \t\t @Override\n\t\t\t \t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t \t\t\t final byte[] mask = new byte[4]; ///data.array();\n\t\t\t \t\t\t mask[0] = data.get(0);\n\t\t\t \t\t\t mask[1] = data.get(1);\n\t\t\t \t\t\t mask[2] = data.get(2);\n\t\t\t \t\t\t mask[3] = data.get(3);\n\t\t\t \t\t\t\n\t\t\t \t\t\t self.expectData(length, new PacketHandler(){\n\t\t\t \t\t\t\t @Override\n\t\t\t\t\t \t\t public void onPacket(ByteBuffer data2) throws Exception {\n\t\t\t \t\t\t\t\t finish(mask, data2);\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 });\n\t\t\t }\n\t\t\t else {\n\t\t\t \t /*\n\t\t\t this.expectData(length, function(data) {\n\t\t\t opcodes['10'].finish.call(self, null, data);\n\t\t\t });*/\n\t\t\t \t self.expectData(length, new PacketHandler(){\n\t\t\t \t\t \n\t\t\t \t\t @Override\n\t\t\t \t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t\t \t\t finish(null, data);\n\t\t\t \t\t }\n\n\t\t\t \t });\n\t\t\t }\n\t\t\t }", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "public int getAddress() {\n return address;\n }", "String getData();", "@Override\n\t\t\t public void getData(final int length) throws Exception {\n\t\t\t if (self.state.masked) {\n\t\t\t \t /*\n\t\t\t self.expectHeader(4, function(data) {\n\t\t\t var mask = data;\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['9'].finish.call(self, mask, data);\n\t\t\t });\n\t\t\t });*/\n\t\t\t \t self.expectHeader(4, new PacketHandler(){\n\n\t\t\t \t\t @Override\n\t\t\t \t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t \t\t\t final byte[] mask = new byte[4]; ///data.array();\n\t\t\t \t\t\t mask[0] = data.get(0);\n\t\t\t \t\t\t mask[1] = data.get(1);\n\t\t\t \t\t\t mask[2] = data.get(2);\n\t\t\t \t\t\t mask[3] = data.get(3);\n\n\t\t\t \t\t\t self.expectData(length, new PacketHandler(){\n\n\t\t\t \t\t\t\t @Override\n\t\t\t \t\t\t\t public void onPacket(ByteBuffer data2)\n\t\t\t \t\t\t\t\t\t throws Exception {\n\t\t\t \t\t\t\t\t finish(mask, data2);\t\t\t\t\t\t\t\t\t\n\t\t\t \t\t\t\t }\n\n\t\t\t \t\t\t });\n\t\t\t \t\t }\n\n\t\t\t \t });\n\t\t\t }\n\t\t\t else {\n\t\t\t \t /*\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['9'].finish.call(self, null, data);\n\t\t\t });*/\n\t\t\t \t self.expectData(length, new PacketHandler(){\n\n\t\t\t \t\t @Override\n\t\t\t \t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t \t\t\t finish(null, data);\t\t\t\t\t\t\t\n\t\t\t \t\t }\n\n\t\t\t \t });\n\t\t\t }\n\t\t\t }", "private LogData readEntry(FileHandle fh, long address)\n throws IOException {\n ByteBuffer o = fh.getMapForRegion(64, (int) fh.getChannel().size());\n while (o.hasRemaining()) {\n short magic = o.getShort();\n if (magic != 0x4C45) {\n return null;\n }\n short flags = o.getShort();\n long addr = o.getLong();\n if (address == -1) {\n //Todo(Maithem) : maybe we can move this to getChannelForAddress\n fh.knownAddresses.add(addr);\n }\n int size = o.getInt();\n if (addr != address) {\n o.position(o.position() + size - 16); //skip over (size-20 is what we haven't read).\n log.trace(\"Read address {}, not match {}, skipping. (remain={})\", addr, address, o.remaining());\n } else {\n log.debug(\"Entry at {} hit, reading (size={}).\", address, size);\n if (flags % 2 == 0) {\n log.error(\"Read a log entry but the write was torn, aborting!\");\n throw new IOException(\"Torn write detected!\");\n }\n int metadataMapSize = o.getInt();\n ByteBuf mBuf = Unpooled.wrappedBuffer(o.slice());\n o.position(o.position() + metadataMapSize);\n ByteBuffer dBuf = o.slice();\n dBuf.limit(size - metadataMapSize - 24);\n return new LogData(Unpooled.wrappedBuffer(dBuf),\n ICorfuPayload.enumMapFromBuffer(mBuf, IMetadata.LogUnitMetadataType.class, Object.class));\n }\n }\n return null;\n }", "public DataIterator getDefinedData(boolean forward);", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address, boolean withSum) {\n return getAddressData(address.toString(), withSum);\n }", "private int[] findPointer() {\n \n int initialAux = 4095;\n int header = 0;\n \n \n for (int i = 0; i < 4096; i++) {\n String initialBinary = Integer.toBinaryString(0xFF & serialize[i * 4]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[i * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n \n if (initial == 0 && sizeData == 0) {\n header = i*4;\n break;\n }\n //get the higher initial \n if (initialAux > initial){\n initialAux = initial;\n }\n \n }\n\n int[] toReturn = new int[2];\n \n toReturn[0] = header;\n toReturn[1] = initialAux-1;\n \n return toReturn;\n }", "Object getData();", "Object getData();", "private String getDeasLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return symbols[key] + \": \";\n }\n return \"\";\n }", "public Integer getOffset();", "public synchronized ILogData handleRetrieval(long address) {\n LogData entry = streamLog.read(address);\n log.trace(\"Retrieved[{} : {}]\", address, entry);\n return entry;\n }", "@Override\n\tpublic Address getAddress() {\n\t\treturn (Address)map.get(ADDRESS);\n\t}", "public void get(int addr, byte[] buff) throws ProgramException {\n get(addr, buff, 0, buff.length);\n }", "public com.google.protobuf.ByteString getData(int index) {\n return data_.get(index);\n }", "public com.google.protobuf.ByteString getData(int index) {\n return data_.get(index);\n }", "public static int offset_data(int index1) {\n int offset = 160;\n if (index1 < 0 || index1 >= 60) throw new ArrayIndexOutOfBoundsException();\n offset += 0 + index1 * 8;\n return (offset / 8);\n }", "double getOffset();", "public int getData(int index) {\n return data_.get(index);\n }" ]
[ "0.81186306", "0.7934632", "0.7842683", "0.7793865", "0.7597878", "0.7361909", "0.7320095", "0.686719", "0.68031603", "0.67768884", "0.67434114", "0.66773665", "0.6472466", "0.62240696", "0.6203578", "0.6189396", "0.6088896", "0.5835064", "0.5742104", "0.5715404", "0.56339496", "0.56104463", "0.5606789", "0.5581633", "0.55561537", "0.5551526", "0.55434906", "0.5513207", "0.54555917", "0.540644", "0.54009557", "0.5385102", "0.5349107", "0.53457576", "0.53457576", "0.5315866", "0.5308759", "0.52963686", "0.52876276", "0.52649325", "0.5259059", "0.52185935", "0.5190706", "0.5178291", "0.51769096", "0.51584667", "0.51279455", "0.5127555", "0.5124428", "0.51241475", "0.50988865", "0.5095516", "0.50915915", "0.50904334", "0.5075756", "0.50689894", "0.5067251", "0.5062587", "0.50565076", "0.50560856", "0.50560856", "0.50560856", "0.5054357", "0.50506574", "0.50467014", "0.5045241", "0.50419414", "0.5041493", "0.5036726", "0.50336516", "0.503278", "0.5032143", "0.5028757", "0.501805", "0.50157046", "0.5013033", "0.50122845", "0.501113", "0.501113", "0.5003986", "0.5003479", "0.5003402", "0.5002545", "0.5001609", "0.49989522", "0.4996088", "0.4986494", "0.4985912", "0.49759355", "0.49759355", "0.49665743", "0.49644265", "0.4961724", "0.4956471", "0.49447268", "0.4941532", "0.4941532", "0.49398732", "0.4934448", "0.49318412" ]
0.7805811
3
Gets the data object that is at or contains the given address or null if the address in not in memory or is in an instruction.
public Data getDataContaining(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Data getDefinedDataContaining(Address addr);", "public Data getDataAt(Address addr);", "public Data getDefinedDataAt(Address addr);", "public Instruction getInstructionContaining(Address addr);", "public Data getUndefinedDataAt(Address addr);", "public Instruction getInstructionAt(Address addr);", "Optional<MemoryAddress> lookup(String name);", "public Data getDefinedDataAfter(Address addr);", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "public Address getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "private SimInstruction getInstruction(Addr address) {\n var inst = decodedInstructions.get(address);\n\n if (inst != null) {\n return inst;\n }\n\n // Try to decode instruction\n var rawInstruction = program.get(address);\n\n // System.out.println(\"INSTRUC: \" + instructions);\n SpecsCheck.checkNotNull(rawInstruction,\n () -> \"No program instruction found at address \" + address.toNumber() + \" (\" +\n address + \")\");\n\n var microCodeInstruction = decoder.decode(rawInstruction, this);\n decodedInstructions.put(address, microCodeInstruction);\n\n return microCodeInstruction;\n }", "public Data getDataAfter(Address addr);", "public Data getDefinedDataBefore(Address addr);", "public Address getValue() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "protected byte direct_read(int address) {\n return segment_data[address];\n }", "public Data getDataBefore(Address addr);", "public Instruction getInstructionAfter(Address addr);", "public byte[] searchReturnData(short addressInDataBlock) {\n //take initial and size binary from memory\n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //if 0 no have data\n if (initial == 0 && sizeData == 0) {\n return null;\n }\n\n //return data\n byte[] toReturn = new byte[sizeData];\n \n int j = 0;\n for (short i = initial; i < initial + sizeData; i++) {\n toReturn[j] = serialize[i];\n j++;\n }\n\n return toReturn;\n }", "public byte get(int addr) {\n return data[addr - start];\n }", "public byte get(int address) {\n try {\n return direct_read(address);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "AddressI getAddress();", "public byte get(int addr) throws ProgramException {\n return getSegment(addr, true).get(addr);\n }", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "long getAddress(ByteBuffer buffer);", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "public CodeUnit getCodeUnitContaining(Address addr);", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address, boolean withSum) {\n return getAddressData(address.toString(), withSum);\n }", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }", "public ByteBuffer read(long address)\n {\n return tryRead(address, null);\n }", "public static String readDiskMemory(String address){\n\t\treturn memory.get(address);\n\t}", "private int getOperandAddress(final CPU6502Instruction instruction) {\r\n // switch address mode\r\n switch (instruction.addressMode) {\r\n case CPU6502Instruction.ZERO:\r\n return this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n case CPU6502Instruction.ZERO_X:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n case CPU6502Instruction.ZERO_Y:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.y) & 0xff;\r\n case CPU6502Instruction.INDIRECT: {\r\n final int lowAddress = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n final int highAddress = (this.memory[this.currentInstructionAddress + 2] & 0xff) << 8;\r\n\r\n return (readByte(highAddress + lowAddress) & 0xff) + ((readByte(highAddress + ((lowAddress + 1) & 0xff)) & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_X: {\r\n final int p = ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n\r\n return (this.memory[p] & 0xff) + ((this.memory[(p + 1) & 0xff] & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_Y: {\r\n // this is the address on the zero page where we read from\r\n final int p = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n\r\n // if over page boundary then do another access => one more cycle\r\n final int lowAddress = (this.memory[p] & 0xff) + this.y;\r\n\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[(p + 1) & 0xff] & 0xff) << 8)) & 0xffff;\r\n }\r\n case CPU6502Instruction.RELATIVE: {\r\n // calculate relative address\r\n final int address = this.memory[this.currentInstructionAddress + 1] + this.pc;\r\n\r\n // add two cycles if crossing page boundary, otherwise one\r\n this.cycles += ((this.pc) & 0xff00) != (address & 0xff00) ? 2 : 1;\r\n return address;\r\n }\r\n case CPU6502Instruction.ABSOLUTE:\r\n return (this.memory[this.currentInstructionAddress + 1] & 0xff) + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8);\r\n case CPU6502Instruction.ABSOLUTE_X:\r\n case CPU6502Instruction.ABSOLUTE_Y: {\r\n // read low-byte of the address\r\n final int lowAddress = (this.memory[this.currentInstructionAddress + 1] & 0xff) + (instruction.addressMode == CPU6502Instruction.ABSOLUTE_Y ? this.y : this.x);\r\n\r\n // if over page boundary then do another access => one more cycle\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8)) & 0xffff;\r\n }\r\n\r\n default:\r\n throw new RuntimeException(\"Illegal address mode for instruction \" + instruction.toString() + \" ($\" + Integer.toHexString(instruction.opCode) + \")\");\r\n }\r\n }", "public Variable getVariableContaining(int offset);", "public org.xmlsoap.schemas.wsdl.soap.TAddress getAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().find_element_user(ADDRESS$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public Instruction getInstructionBefore(Address addr);", "public E getData(int pos) {\n\t\tif (pos >= 0 && pos < dataSize()) {\n\t\t\treturn data.get(pos);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public @Nullable Op getOp(int address) {\n return getTemplateNode(address).getOp();\n }", "public long memoryAddress()\r\n/* 143: */ {\r\n/* 144:172 */ throw new UnsupportedOperationException();\r\n/* 145: */ }", "public int rva2offset(Address address) {\n\t\tint offset = -1;\n\t\tfor(IMAGE_SECTION_HEADER section:peFileSections) {\n\t\t\tif(address.getAddr32() >= section.getVirtualAddress()\n\t\t\t&& address.getAddr32() < section.getVirtualAddress() + section.getVirtualSize()) {\n\t\t\t\toffset = address.getAddr32() - section.getVirtualAddress() + section.getPointerToRawData();\n\t\t\t\treturn offset;\n\t\t\t}\n\t\t}\n\t\tif(address.getAddr32() < peOptionalHeader.getSizeOfHeaders())\n\t\t\treturn address.getAddr32();\n\t\treturn offset;\n\t}", "public boolean hasMemoryAddress()\r\n/* 138: */ {\r\n/* 139:167 */ return false;\r\n/* 140: */ }", "@Override\n public Pointer addressPointer() {\n val tempPtr = new PagedPointer(ptrDataBuffer.primaryBuffer());\n\n switch (this.type) {\n case DOUBLE: return tempPtr.asDoublePointer();\n case FLOAT: return tempPtr.asFloatPointer();\n case UINT16:\n case SHORT:\n case BFLOAT16:\n case HALF: return tempPtr.asShortPointer();\n case UINT32:\n case INT: return tempPtr.asIntPointer();\n case UBYTE:\n case BYTE: return tempPtr.asBytePointer();\n case UINT64:\n case LONG: return tempPtr.asLongPointer();\n case BOOL: return tempPtr.asBoolPointer();\n default: return tempPtr.asBytePointer();\n }\n }", "@Override\n\tpublic Address getAddress() {\n\t\treturn (Address)map.get(ADDRESS);\n\t}", "public int read(int address){\n switch (address){\r\n /*\r\n case 0: {\r\n return registers_w[CONTROL_REGISTER_1];\r\n }\r\n\r\n case 3: {\r\n return spriteMemoryCounter;\r\n }\r\n case 5:{\r\n return registers_w[SCROLL_OFFSET];\r\n }\r\n case 6:{\r\n return horizontalTileCounter | (verticalTileCounter << 5) | (horizontalNameCounter << 10) | (verticalNameCounter << 11);\r\n }\r\n */\r\n\t\t\tcase 0: {\r\n\t\t\t\t\t\treturn scanLine;\r\n\t\t\t\t\t\t// hack\r\n\t\t\t}\r\n case 1: {\r\n return registers_w[CONTROL_REGISTER_2];\r\n }\r\n case STATUS_REGISTER:{ // 2\r\n int returnVal = registers_r[STATUS_REGISTER];\r\n registers_r[STATUS_REGISTER] = getBitsUnset(registers_r[STATUS_REGISTER], STATUS_VBLANK); //| STATUS_SPRITE0_HIT);\r\n isFirstWriteToScroll = true;\r\n lastPPUAddressWasHigh = false;\r\n //logger.info(\"Status is: \" + Integer.toHexString(returnVal));\r\n return returnVal;\r\n }\r\n case SPRITE_MEMORY_DATA:{ // 4\r\n return readFromSpriteMemory();\r\n }\r\n case PPU_MEMORY_DATA:{ // 7\r\n int returnVal = 0xFF & registers_r[PPU_MEMORY_DATA]; // buffered read\r\n \r\n //int returnVal = 0xFF & memory.read(ppuMemoryAddress);\r\n\t\t\tint readAddress = horizontalTileCounter \r\n\t\t\t\t\t\t\t\t| (verticalTileCounter << 5)\r\n\t\t\t\t\t\t\t\t| (horizontalNameCounter << 10)\r\n\t\t\t\t\t\t\t\t| (verticalNameCounter << 11)\r\n\t\t\t\t\t\t\t\t| ((fineVerticalCounter & 0x3) << 12);\r\n\r\n\t\t\tif (readAddress == 0x3F10 || readAddress == 0x3F14 || readAddress == 0x3F18 || readAddress == 0x3F1C) {\r\n\t\t\t\treadAddress = readAddress & 0x3F0F;\r\n\t\t\t}\r\n registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(readAddress);\r\n // registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(ppuMemoryAddress);\r\n incrementCounters();\r\n /*\r\n if ((registers_w[CONTROL_REGISTER_1] & CR1_VERTICAL_WRITE) == 0){\r\n ppuMemoryAddress++;\r\n }\r\n else {\r\n ppuMemoryAddress = (ppuMemoryAddress + 32);\r\n }\r\n */\r\n return returnVal;\r\n }\r\n\r\n default: throw new RuntimeException(\"Invalid read attempt: \" + Integer.toHexString(address));\r\n }\r\n }", "@Generated(hash = 489389972)\n public Address getAddress() {\n Long __key = this.addressId;\n if (address__resolvedKey == null || !address__resolvedKey.equals(__key)) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n AddressDao targetDao = daoSession.getAddressDao();\n Address addressNew = targetDao.load(__key);\n synchronized (this) {\n address = addressNew;\n address__resolvedKey = __key;\n }\n }\n return address;\n }", "private Segment getSegment(int addr, boolean get) throws ProgramException {\n Set<Segment> found = memory.get(addr);\n if (found.isEmpty()) {\n throw new ProgramException(get ? ErrorType.ADDRL : ErrorType.ADDRS);\n }\n return found.iterator().next();\n }", "public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "public NodeDB.NodeInfo getNodeByInetAddress(InetAddress a) { synchronized (this.nodedb) {\n\t\tfor (NodeInfo ni : this.nodedb.values()) {\n\t\t\tif (ni.nodecomms.getAddress().equals(a))\n\t\t\t\treturn ni;\n\t\t}\n\t\treturn null;\n\t}}", "public CodeUnit getCodeUnitAt(Address addr);", "public boolean isReadOnlyMemoryAddress(int address) {\n return (address >= 0) && (getMemory(address) instanceof ReadOnlyMemory);\n }", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "public DataIterator getDefinedData(Address addr, boolean forward);", "private LogData readEntry(FileHandle fh, long address)\n throws IOException {\n ByteBuffer o = fh.getMapForRegion(64, (int) fh.getChannel().size());\n while (o.hasRemaining()) {\n short magic = o.getShort();\n if (magic != 0x4C45) {\n return null;\n }\n short flags = o.getShort();\n long addr = o.getLong();\n if (address == -1) {\n //Todo(Maithem) : maybe we can move this to getChannelForAddress\n fh.knownAddresses.add(addr);\n }\n int size = o.getInt();\n if (addr != address) {\n o.position(o.position() + size - 16); //skip over (size-20 is what we haven't read).\n log.trace(\"Read address {}, not match {}, skipping. (remain={})\", addr, address, o.remaining());\n } else {\n log.debug(\"Entry at {} hit, reading (size={}).\", address, size);\n if (flags % 2 == 0) {\n log.error(\"Read a log entry but the write was torn, aborting!\");\n throw new IOException(\"Torn write detected!\");\n }\n int metadataMapSize = o.getInt();\n ByteBuf mBuf = Unpooled.wrappedBuffer(o.slice());\n o.position(o.position() + metadataMapSize);\n ByteBuffer dBuf = o.slice();\n dBuf.limit(size - metadataMapSize - 24);\n return new LogData(Unpooled.wrappedBuffer(dBuf),\n ICorfuPayload.enumMapFromBuffer(mBuf, IMetadata.LogUnitMetadataType.class, Object.class));\n }\n }\n return null;\n }", "public int readMemory(boolean isByteMode, int address) {\n int readValue = BUS_ERROR;\n // First check for I/O registers\n if (address >= getDevicesStartAddress()) {\n List<Device> subdevices = getDevices(address);\n if (subdevices != null) {\n long cpuClock = getCpu().getTime();\n readValue = 0;\n for (Device subdevice: subdevices) {\n // Read subdevice state value in word mode\n int subdeviceState = subdevice.read(cpuClock, address & 0177776);\n // For byte mode read and odd address - extract high byte\n if (isByteMode && (address & 1) != 0) {\n subdeviceState >>= 8;\n }\n // Concatenate this subdevice state value with values of other subdevices\n readValue |= (subdeviceState & (isByteMode ? 0377 : 0177777));\n }\n }\n } else {\n // Check for memory at given address\n Memory memory = getMemory(address);\n if (memory != null) {\n readValue = memory.read(isByteMode, address);\n }\n }\n return readValue;\n }", "@Override\n public Account get(final Address address) {\n BonsaiLayeredWorldState currentLayer = this;\n while (currentLayer != null) {\n final Optional<StateTrieAccountValue> maybeStateTrieAccount =\n currentLayer.trieLog.getAccount(address);\n final Optional<StateTrieAccountValue> maybePriorStateTrieAccount =\n currentLayer.trieLog.getPriorAccount(address);\n if (currentLayer == this && maybeStateTrieAccount.isPresent()) {\n return new BonsaiAccount(\n BonsaiLayeredWorldState.this, address, maybeStateTrieAccount.get(), false);\n } else if (maybePriorStateTrieAccount.isPresent()) {\n return new BonsaiAccount(\n BonsaiLayeredWorldState.this, address, maybePriorStateTrieAccount.get(), false);\n } else if (maybeStateTrieAccount.isPresent()) {\n return null;\n }\n if (currentLayer.getNextWorldView().isEmpty()) {\n currentLayer = null;\n } else if (currentLayer.getNextWorldView().get() instanceof BonsaiLayeredWorldState) {\n currentLayer = (BonsaiLayeredWorldState) currentLayer.getNextWorldView().get();\n } else {\n return currentLayer.getNextWorldView().get().get(address);\n }\n }\n return null;\n }", "private Expression addressOf (Expression expression) {\n return expression;\n }", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public Call<BCExplorerResult<AddressData>> getAddressData(String address, boolean withSum) {\n return getInstantService().balance(address, withSum ? 1 : 0);\n }", "public synchronized ILogData handleRetrieval(long address) {\n LogData entry = streamLog.read(address);\n log.trace(\"Retrieved[{} : {}]\", address, entry);\n return entry;\n }", "String getAddress(int type);", "private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }", "public static byte readByte(final long address) {\n\t\treturn Unsafe.get().getByte(address);\n\t}", "public Instruction getInstruction(long index){\n\t\tInstruction instruction = null;\n\t\tint effectiveAddress = (int) (index-Constants.START_ADDRESS);\n\t\tif(effectiveAddress>0)\n\t\t{\n\t\t\teffectiveAddress = effectiveAddress/4;\t\t\t\n\t\t}\n\t\tif(instructions.size()>effectiveAddress)\n\t\t\tinstruction = instructions.get(effectiveAddress);\n\t\treturn instruction;\n\t}", "public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }", "@Override protected void fetch() throws MainMemory.InvalidAddressException {\n int pcVal = pc.get();\n UnsignedByte[] ins = mem.read (pcVal, 2);\n byte opCode = (byte) (ins[0].value() >>> 4);\n insOpCode.set (opCode);\n insOp0.set (ins[0].value() & 0x0f);\n insOp1.set (ins[1].value() >>> 4);\n insOp2.set (ins[1].value() & 0x0f);\n insOpImm.set (ins[1].value());\n pcVal += 2;\n switch (opCode) {\n case 0x0:\n case 0xb:\n\tlong opExt = mem.readIntegerUnaligned (pcVal);\n\tpcVal += 4;\n\tinsOpExt.set (opExt);\n\tinstruction.set (ins[0].value() << 40 | ins[1].value() << 32 | opExt);\n\tbreak;\n default:\n\tinsOpExt.set (0);\n\tinstruction.set (ins[0].value() << 40 | ins[1].value() << 32);\n }\n pc.set (pcVal);\n }", "boolean isAddressOf(int addr) {\n return addr == mAddress;\n }", "public Void visit(NasmAddress operand){\n return null;\n }", "public DataIterator getData(Address addr, boolean forward);", "public java.lang.String getAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ADDRESS$2);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "protected int isExternByAddress(String address) {\n\t\ttry {\n\t\t\tPreparedStatement pstmt = \n\t\t\t\t\tthis.agent.getDatabaseManager().getConnection().prepareStatement(\n\t\t\t\t\t\t\tthis.agent.getDatabaseManager().selectByAddress);\n\t pstmt.setString(1,address);\n\t ResultSet rs = pstmt.executeQuery();\n\t return rs.getInt(\"isExtern\");\n\t\t} catch (Exception e) {\n\t\t\tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to get isExtern of address %s in the database\\n\",address), e);\n\t\t}\n return 0; // Pas accessible\n\t}", "public static Sensor getSensor(String name, String address) {\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tif (mSensors.get(x).mName.equals(name)) {\n\t\t\t\tif (mSensors.get(x).mAddress.equals(address))\n\t\t\t\t\treturn mSensors.get(x);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public AccountInterface getAccount(String _address) {\n\t\tfor (AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(_address))\n\t\t\t\treturn account;\n\t\t}\n\t\treturn null;\t\t\n\t}", "@Override\n public int read(int address) {\n\n Preconditions.checkBits16(address);\n\n switch (address) {\n\n case AddressMap.REG_DIV:\n return Bits.extract(DIV, Byte.SIZE, Byte.SIZE);\n\n case AddressMap.REG_TIMA:\n return TIMA;\n\n case AddressMap.REG_TMA:\n return TMA;\n\n case AddressMap.REG_TAC:\n return TAC;\n\n default:\n return NO_DATA;\n }\n\n }", "com.google.protobuf.ByteString getAddressBytes();", "public Address getAddressById(long addressid) {\n\t\treturn addressdao.findOne(addressid);\r\n\t}", "public SelectMapedBufferResult getData(final long offset) {\n return this.getData(offset, (0 == offset ? true : false));\n }", "public abstract byte[] readData(int address, int length);", "public T getMatch(T data){\r\n\t\tif (data == null)\r\n\t\t\tthrow new IllegalArgumentException(\"data cannot be null\"); \r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\tArrayNode<T> temp = beginMarker.next;\r\n\t\t\r\n\t\t//same as contains (below), except returns pointer, not boolean\r\n\t\twhile (temp != endMarker){\r\n\t\t\tif (temp.getLast().compareTo(data) < 0){\r\n\t\t\t\ttemp = temp.next;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tfor (int i=0; i< temp.getArraySize();i++){\r\n\t\t\t\t\tif (temp.get(i).equals(data))\r\n\t\t\t\t\t\treturn temp.get(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private String getDeasLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return symbols[key] + \": \";\n }\n return \"\";\n }", "public NodeRef getDataNode(String ip) {\r\n\t\treturn nodeMap.get(ip);\r\n\t}", "public Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);", "public boolean hasADDRESSIND() {\n return fieldSetFlags()[8];\n }", "public T getInfo(Coordinate where, boolean hit) { // where?\n if (hit) {\n return onHit;\n } \n return myData;\n }", "@Override\r\n\t\tpublic boolean getDO(int address) throws IOServiceException {\n\t\t\treturn false;\r\n\t\t}", "public Object findData(Object element)\r\n\t{\r\n\t\tif (treeComparator.compare(data, element)>0)\r\n\t\t{\r\n\t\t\tif (left!=null)\r\n\t\t\t\treturn ((BinarySearchNode)left).findData(element);\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}\r\n\t\telse\r\n\t\t\tif (treeComparator.compare(data, element)<0)\r\n\t\t\t{\r\n\t\t\t\tif (right!=null)\r\n\t\t\t\t\treturn ((BinarySearchNode)right).findData(element);\r\n\t\t\t\telse\r\n\t\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\treturn this.data;\r\n\t}", "public com.kcdataservices.partners.kcdebdmnlib_common.businessobjects.address.v1.Address getAddressReq(Address address){\n\t\tcom.kcdataservices.partners.kcdebdmnlib_common.businessobjects.address.v1.Address addressReq =\n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_common.businessobjects.address.v1.Address();\n\t\t//Start theAV-3749/HBsi 52 Enhancement of emergency info tab for passegner\t\n\t\taddressReq.setStreetAddress( address.getStreetAddress() );\n\t\taddressReq.setCity( address.getCity() );\n\t\taddressReq.setState( address.getState() );\n\t\t//Business wise not require for now\n\t\t//addressReq.setCountry( address.getCountry() );\n\t\taddressReq.setZipCode( address.getZipCode() );\n\t\t//End of the AV-3749/HBsi 52 Enhancement of emergency info tab for passegner\t\n\t\treturn addressReq;\n\t}", "public HDAddressDescription findAddress(Address addr) {\n HDAddressDescription retval = null;\n for (HDAccount acct : mAccounts) {\n retval = acct.findAddress(addr);\n if (retval != null)\n return retval;\n }\n return retval;\n }", "com.google.protobuf.ByteString\n getAddressBytes();", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "public T get(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"Data cannot be null.\");\n }\n if (root == null) {\n throw new NoSuchElementException(\"Element does not exist.\");\n }\n T findData = getHelper(data, root);\n if (findData != null) {\n return findData;\n } else {\n throw new NoSuchElementException(\"Element does not exist.\");\n }\n }", "public Address searchByName(String name) {\n if (name == null || !addressBook.containsKey(name))\n throw new NullPointerException();\n return addressBook.get(name);\n }", "public long getLongFromMemory(long number){\n\t\tif (number % 8L != 0L){\n\t\t\tSystem.out.println(\"Wrong number for access in memory\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tlong l1 = 0L;\n\t\ttry{\n\t\t\tint i = memory[((int)number / 4)];\n\t\t\tint j = memory[(((int)number + 4) / 4)];\n\t\t\tlong l3 = i;\n\t\t\tl3 &= 0xFFFFFFFFL; //bitwise AND with FFFFFFFF long\n\t\t\tlong l2 = j; \n\t\t\tl2 <<= 32;\t\t//shift 32 bits to left\n\t\t\tl1 = l2 | l3; \t//bitwise OR to get the result\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t\treturn l1;\n\t}", "public static void loadInstructionOntoDisk(String address,String instruction){\n\t\tmemory.put(address, instruction);\n\t}", "private String getLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return \"(\" + symbols[key] + \")\";\n }\n return \"\";\n }", "Object getData();", "Object getData();" ]
[ "0.68594426", "0.68198246", "0.66611683", "0.66005516", "0.6590701", "0.6463453", "0.619944", "0.6165787", "0.6115496", "0.60962135", "0.5942228", "0.5857395", "0.5801959", "0.56288004", "0.5627677", "0.5593962", "0.5539704", "0.55244035", "0.5459922", "0.5427366", "0.53998923", "0.53760386", "0.5371565", "0.5347504", "0.5318444", "0.52831966", "0.5231285", "0.52264607", "0.5221875", "0.5114576", "0.5077529", "0.507078", "0.50226617", "0.5017435", "0.50172895", "0.5000694", "0.4963275", "0.49532256", "0.49471632", "0.4945582", "0.49345362", "0.4919758", "0.49140352", "0.48944798", "0.48809254", "0.48743257", "0.4844984", "0.4838563", "0.4837087", "0.4834508", "0.4831048", "0.48307803", "0.48228353", "0.4820079", "0.4788162", "0.4785712", "0.4771551", "0.47693875", "0.47636", "0.47628003", "0.47423273", "0.47301856", "0.46721458", "0.46693698", "0.46682024", "0.4634696", "0.46329233", "0.46238884", "0.46215564", "0.45966524", "0.45923445", "0.45896584", "0.45748165", "0.4570165", "0.4560827", "0.45530012", "0.45312548", "0.45280942", "0.45242122", "0.4520543", "0.4517427", "0.4514919", "0.45117244", "0.45064726", "0.45013738", "0.44987348", "0.44983032", "0.4476066", "0.44498503", "0.4440404", "0.4434899", "0.44267538", "0.44163015", "0.44053584", "0.43947652", "0.43756074", "0.4374846", "0.4372484", "0.4355616", "0.4355616" ]
0.6605886
3
get the closest Data object that starts at an address that is greater than the given address.
public Data getDataAfter(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data getDataBefore(Address addr);", "public Data getDefinedDataBefore(Address addr);", "public Data getDataContaining(Address addr);", "public Data getDefinedDataAfter(Address addr);", "private int binarySearchToFindClosest(String overflowName, int bottomRecord, int topRecord) {\n // Base condition for only having two records left to choose from\n if (topRecord - bottomRecord == 1) {\n String topRecordName = getRecordCompanyName(\"normal\", topRecord);\n\n // If the name of the overflow company comes after the company name of the top record, then the top record is the closest\n if (overflowName.compareTo(topRecordName) >= 1) {\n return topRecord;\n // Otherwise, either the top and bottom records are equal length away, or the bottom record is closer, so return the bottom record\n } else {\n return bottomRecord;\n }\n // Base condition for having only 1 record left means that that record is the closest\n } else if (topRecord == bottomRecord) {\n return topRecord;\n }\n\n int middle = (topRecord + bottomRecord) / 2;\n String nameOfNormalRecord = getRecordCompanyName(\"normal\", middle);\n int alphabeticalOrder = overflowName.compareTo(nameOfNormalRecord);\n if (alphabeticalOrder == 0) {\n return middle;\n } else if (alphabeticalOrder < 0) {\n return binarySearchToFindClosest(overflowName, bottomRecord, middle);\n } else {\n return binarySearchToFindClosest(overflowName, middle + 1, topRecord);\n } \n }", "private GlobeAccessPointRecord findNearestGAP(InetAddress srcAddr)\n {\n GlobeAccessPointRecord nearestGAPrec;\n FloatCoordinate coords = null;\n\n // look in our GAP lookup cache. It looks like IE5 ignores our\n // Expires: header so we might really need this for performance \n // reasons.\n synchronized(GlobeRedirector.ip2GAPCache) {\n nearestGAPrec =\n (GlobeAccessPointRecord) GlobeRedirector.ip2GAPCache.get(srcAddr);\n }\n\n /*\n * Return the GAP record if it is in the cache.\n */\n if (nearestGAPrec != null) {\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"(cached) Nearest GAP is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n return nearestGAPrec;\n }\n\n /*\n * There is no {srcAddr, nearest GAP record} pair in the cache. We need\n * the geographical coordinates associated with srcAddr to determine\n * the nearest GAP.\n */\n\n if (_cookieCoords != null) { // client cookie contains coordinates\n coords = _cookieCoords;\n }\n else {\n coords = getCoordinates(srcAddr);\n\n if (coords == null) {\n return null;\n }\n }\n\n /*\n * Calculate which GAP is nearest.\n */\n int i, dist, min = Integer.MAX_VALUE;\n CoordinateImpl srcCoords = new CoordinateImpl((int)coords.lat,\n (int)coords.longi);\n\n for (i = 0; i < _gapList.size(); i++) {\n GlobeAccessPointRecord gaprec = _gapList.get(i);\n dist = gaprec.coords.computeDistance(srcCoords);\n\n if (dist < min) {\n nearestGAPrec = gaprec;\n min = dist;\n }\n }\n\n // Cache the result.\n synchronized(GlobeRedirector.ip2GAPCache) {\n GlobeRedirector.ip2GAPCache.put(srcAddr, nearestGAPrec);\n }\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Nearest GAP of \" + srcAddr.getHostAddress()\n + \" at (\" + (int)coords.lat + \",\" + (int)coords.longi\n + \") is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n\n _cookieCoords = coords;\n return nearestGAPrec;\n }", "public Data getDefinedDataContaining(Address addr);", "public Data getDataAt(Address addr);", "@NotNull\n private RangeInfo findNearestRangeInfo() {\n final int caretPosition = myView.getCaretPosition();\n\n for (final RangeInfo range : myRangeInfos) {\n if (range.isWithin(caretPosition)) {\n return range;\n }\n if (range.getFrom() > caretPosition) {\n return range; // Ranges are sorted, so we are on the next range. Take it, if caret is not within range\n }\n }\n\n return myRangeInfos.last();\n }", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "public Address getClosestAddressTo(Depot d) {\n double bestDistance = Double.MAX_VALUE;\n Address bestAddress = null;\n for (Address a : addresses) {\n double distance = a.getCoordinates().companyDistanceTo(d.getCoordinates());\n if (distance < bestDistance) {\n bestAddress = a;\n bestDistance = distance;\n }\n }\n return bestAddress;\n }", "public Data getDefinedDataAt(Address addr);", "public int relativePosTo(long addr) {\n\t\t\tif(addr < this.start)\n\t\t\t\treturn -1;\n\t\t\tif(addr > this.end)\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "private UnconstrainedBidElement getClosest(double demandWatt) {\n UnconstrainedBidElement best = null;\n double bestDistance = Double.MAX_VALUE;\n for (UnconstrainedBidElement e : elements) {\n double distance = Math.abs(demandWatt - e.demandWatt);\n if (best == null || distance < bestDistance) {\n best = e;\n bestDistance = distance;\n }\n }\n return best;\n }", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public static int lowerBound(int[] arr, int data) {\n int ans = -1, low = 0, high = arr.length - 1;\n while (low <= high) {\n int mid = (low + high) / 2;\n if (arr[mid] == data) {\n ans = mid;\n high = mid - 1;\n } else if (data < arr[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return ans;\n }", "public Node closestPrecedingNode(int id);", "long getAddress(ByteBuffer buffer);", "public int getLowerBound ();", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "private Node getMinimumOld() {\n Node tmp = null;\n\n // TODO: optimize by putting in 1 list and\n // provide 'starting offset' for remaining nodes to find mimimum\n // note: see new getMinimum method above\n\n if (null != nodeA) {\n tmp = nodeA;\n if (null != nodeB && tmp.data > nodeB.data) {\n tmp = nodeB;\n }\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeB) {\n tmp = nodeB;\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeC) {\n tmp = nodeC;\n }\n\n // System.out.println(tmp);\n\n if (null == tmp ) {\n // terminating condition\n return null;\n }\n\n if (tmp.equals(nodeA)) {\n nodeA = nodeA.next;\n }\n if (tmp.equals(nodeB)) {\n nodeB = nodeB.next;\n }\n if (tmp.equals(nodeC)) {\n nodeC = nodeC.next;\n }\n\n System.out.println(tmp.data);\n\n return tmp;\n }", "protected static int advanceUntil(CharBuffer array, int pos, int length, char min) {\n int lower = pos + 1;\n\n // special handling for a possibly common sequential case\n if (lower >= length || (array.get(lower)) >= (min)) {\n return lower;\n }\n\n int spansize = 1; // could set larger\n // bootstrap an upper limit\n\n while (lower + spansize < length\n && (array.get(lower + spansize)) < (min)) {\n spansize *= 2; // hoping for compiler will reduce to\n }\n // shift\n int upper = (lower + spansize < length) ? lower + spansize : length - 1;\n\n // maybe we are lucky (could be common case when the seek ahead\n // expected\n // to be small and sequential will otherwise make us look bad)\n if (array.get(upper) == min) {\n return upper;\n }\n\n if ((array.get(upper)) < (min)) {// means\n // array\n // has no\n // item\n // >= min\n // pos = array.length;\n return length;\n }\n\n // we know that the next-smallest span was too small\n lower += (spansize >>> 1);\n\n // else begin binary search\n // invariant: array[lower]<min && array[upper]>min\n while (lower + 1 != upper) {\n int mid = (lower + upper) >>> 1;\n char arraymid = array.get(mid);\n if (arraymid == min) {\n return mid;\n } else if ((arraymid) < (min)) {\n lower = mid;\n } else {\n upper = mid;\n }\n }\n return upper;\n\n }", "public Resource findNearestResource(){\n\t\tResource nearestResource = null;\n\t\tfloat distanceToCurrentResource = 0f;\n\t\tfor (Resource resource : MapData.getInstance().getResources()) {\n\t\t\tif(resource.isResourceMaxed()) continue;\n\t\t\tif (resource.getCenter().dst2(getCenter()) < 4000000) {\n\t\t\t\tif (nearestResource == null) {\n\t\t\t\t\tnearestResource = resource;\n\t\t\t\t\tdistanceToCurrentResource = nearestResource\n\t\t\t\t\t\t\t.getCenter().dst2(this.getCenter());\n\t\t\t\t} else {\n\t\t\t\t\tfloat distanceToNewResource = resource.getCenter()\n\t\t\t\t\t\t\t.dst2(this.getCenter());\n\t\t\t\t\tnearestResource = (distanceToNewResource < distanceToCurrentResource) ? resource\n\t\t\t\t\t\t\t: nearestResource;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nearestResource;\n\t}", "Execution getClosestDistance();", "private double distanceToCarBack(double fromPosition) {\n\t\t double carBackPosition = Double.POSITIVE_INFINITY;\n\t\t for (Car c : cars)\n\t\t\t if (c.backPosition() >= fromPosition && c.backPosition() < carBackPosition)\n\t\t\t\t carBackPosition = c.backPosition();\n\t\t return carBackPosition;\n\t }", "public static int getMin(ArrayList<QuoteShort> data, int begin, int end) {\n\t\tint min = 999999999;\r\n\t\tint minIndex = -1;\r\n\t\tif (begin<=0) begin = 0;\r\n\t\tfor (int i=begin;i<=end;i++){\r\n\t\t\tif (data.get(i).getHigh5()<=min){\r\n\t\t\t\tmin = data.get(i).getLow5();\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn minIndex;\r\n\t}", "public byte[] searchReturnData(short addressInDataBlock) {\n //take initial and size binary from memory\n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //if 0 no have data\n if (initial == 0 && sizeData == 0) {\n return null;\n }\n\n //return data\n byte[] toReturn = new byte[sizeData];\n \n int j = 0;\n for (short i = initial; i < initial + sizeData; i++) {\n toReturn[j] = serialize[i];\n j++;\n }\n\n return toReturn;\n }", "public String getNearestStreet() {\n String nearestStreet = \"null\";\n CollisionResults results = new CollisionResults();\n float closestDistance = 101f;\n for(float xDir = -1; xDir <= 1; xDir += .1f) {\n for(float yDir = -1; yDir <= 1; yDir += .1f) {\n for(float zDir = -1; zDir <= 1; zDir += .1f) { \n Ray ray = new Ray(loc, new Vector3f(xDir, yDir, zDir));\n world.collideWith(ray, results);\n for (int i = 0; i < results.size(); i++) {\n float dist = results.getCollision(i).getDistance();\n String name = results.getCollision(i).getGeometry().getParent().getName();\n if (name.startsWith(\"R_\") && dist <= 100 && dist < closestDistance) {\n nearestStreet = name;\n closestDistance = dist;\n }\n }\n }\n }\n }\n\n return nearestStreet;\n \n }", "public byte get(int addr) {\n return data[addr - start];\n }", "public NodeEntry<Boolean, Node> find(T data) {\n\t\tif (this.numberOfNodes == 0)\n\t\t\t// Return the header as the second parameter\n\t\t\t// to indicate that the returned false was\n\t\t\t// as a result of querying data to an empty\n\t\t\t// list.\n\t\t\treturn new NodeEntry<Boolean, Node>(false, this.header);\n\n\t\t// Begin with the header and traverse the list\n\t\t// using right pointers at every visited node.\n\t\tNode currentNode = this.header;\n\t\tNode nodeToCompare = null;\n\t\tNode leftNeighbor = null;\n\t\tint currentLevel = this.listLevel;\n\t\twhile (currentLevel > 1) {\n\t\t\tnodeToCompare = currentNode.nextNodes.get(currentLevel);\n\t\t\tif (nodeToCompare != null) {\n\t\t\t\tif (data.compareTo(nodeToCompare.data) > 0) {\n\t\t\t\t\tcurrentNode = nodeToCompare;\n\t\t\t\t} else if (data.compareTo(nodeToCompare.data) < 0) {\n\t\t\t\t\tcurrentLevel--;\n\t\t\t\t} else\n\t\t\t\t\treturn new NodeEntry<Boolean, Node>(true, nodeToCompare);\n\t\t\t} else currentLevel--;\n\t\t}\n\n\t\t// If the query value is found to be the smallest in the\n\t\t// list, we'd hit the bottom of the list through header.\n\t\t// Return the header as the left hand neighbor for the\n\t\t// position where the query data can be inserted later.\n\t\tif (currentNode.equals(this.header) &&\n\t\t\tcurrentNode.nextNodes.get(1).data.compareTo(data) >= 0) {\n\t\t\treturn new NodeEntry<Boolean, Node>(false, this.header);\n\t\t}\n\n\t\t// Otherwise, continue traversing the remaining nodes\n\t\t// until the last visited node's data value is found\n\t\t// to be equal to or greater than the query.\n\t\twhile (!currentNode.equals(this.sentinel)) {\n\t\t\tif (currentNode.data.compareTo(data) > 0) {\n\t\t\t\t// Return the node immediately before the possible\n\t\t\t\t// position where the data could have been found.\n\t\t\t\t// This can be used for inserting a new node to the\n\t\t\t\t// list containing the same data value as the query.\n\t\t\t\treturn new NodeEntry<Boolean, Node>(false, leftNeighbor);\n\t\t\t} else if (currentNode.data.compareTo(data) < 0) {\n\t\t\t\t// This is where we enter this while loop,\n\t\t\t\t// so we protect ourselves from losing the\n\t\t\t\t// track of the immediate left neighbor.\n\t\t\t\tleftNeighbor = currentNode;\n\t\t\t\tcurrentNode = currentNode.nextNodes.get(1);\n\t\t\t} else {\n\t\t\t\treturn new NodeEntry<Boolean, Node>(true, currentNode);\n\t\t\t}\n\t\t}\n\n\t\t// After reaching the sentinel, return the last node\n\t\t// in the list as the position where the data may be\n\t\t// inserted into the list.\n\t\treturn new NodeEntry<Boolean, Node>(false, leftNeighbor);\n\t}", "public Shard getLowerNeighbor() {\r\n double middleLat = south + Math.abs(north - south) / 2;\r\n double nextLat = middleLat - Math.abs(north - south);\r\n\r\n return new Shard(new Coordinates(nextLat, coordinates.getLon()), zoom);\r\n }", "@Test\r\n public void testGetClosestAddressTo() {\r\n System.out.println(\"getClosestAddressTo\");\r\n Customer testCustomer;\r\n testCustomer = new Customer(\"Test Customer\", testAddress4);\r\n \r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress1);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress3);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress2);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertNotEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress2, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n }", "public static Position getClosest2reference(ArrayList<Position> c, Position reference){\n \t// Gets the closest point to the user's current position\n \tPosition temp;\n \tPosition min = new Position(0,0);\n \tdouble d;\n \tdouble minDistance = 1000;\n \tIterator<Position> t = c.iterator();\n \twhile (t.hasNext()){\n \t\ttemp = (Position) t.next();\n \t\t//System.out.println(\"Checking: \" + temp.getLat() + \",\" + temp.getLon());\n \t\td = Tools.distance(reference, temp);\n \t\tif (d < minDistance){\n \t\t\tmin = temp;\n \t\t\tminDistance = d;\n \t\t}\n \t}\n \treturn min;\n }", "public static Location locateLargest(double[][] a){\n Location answer = new Location(a);\n return answer;\n }", "public static DataType findPointerRelativeInner(DataType base, int offset) {\n\t\tif (base instanceof TypeDef) {\n\t\t\tbase = ((TypeDef) base).getBaseDataType();\n\t\t}\n\t\twhile (base instanceof Structure) {\n\t\t\tDataTypeComponent component = ((Structure) base).getComponentContaining(offset);\n\t\t\tif (component == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbase = component.getDataType();\n\t\t\toffset -= component.getOffset();\n\t\t\tif (offset == 0) {\n\t\t\t\treturn base;\n\t\t\t}\n\t\t}\n\t\treturn Undefined1DataType.dataType;\n\t}", "public long getNextBlock(long address){\n int marker = readMarkerLowerBits(address - 1);\n int blocksize;\n if(marker == 0){\n blocksize = readLengthField(address, 1);\n return address + blocksize + 1;\n } else if(marker == 15){\n return address + 1;\n } else {\n if (isBlockUsed(address)) marker -= 8;\n blocksize = readLengthField(address, marker);\n if (isBlockUsed(address)) {\n return address + blocksize + 2 * (marker - 8) + 1;\n }\n return address + blocksize + 1;\n }\n }", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}", "public node_data heapMinimum(){return _a[0];}", "public node_data heapExtractMin(){\n\t\tdouble min = _positiveInfinity;\n\t\tnode_data v=null;\n\t\tif (!isEmpty()){\n\t\t\tv = _a[0];\n\t\t\tmin = v.getWeight();\n\t\t\t_a[0]=_a[_size-1];\n\t\t\t_size = _size-1;\n\t\t\tminHeapify(0, _size);\n\t\t}\n\t\treturn v;\n\t}", "long closest(double lon, double lat) {\n double smallestDist = Double.MAX_VALUE;\n long smallestId = 0;\n Iterable<Node> v = world.values();\n for (Node n : v) {\n double tempLat = n.getLat();\n double tempLon = n.getLon();\n double tempDist = distance(lon, lat, tempLon, tempLat);\n if (tempDist < smallestDist) {\n smallestDist = tempDist;\n smallestId = n.getId();\n }\n }\n return smallestId;\n }", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "public frameTableElement findVictimLRU(){\n int smallestLastReferenceTime = Integer.MAX_VALUE;\n frameTableElement correspondingElement = null;\n\n for(int i=0; i< frameTable.getSize(); i++){\n frameTableElement currElement = frameTable.getElement(i);\n if(currElement.getLastTimeReferenced() < smallestLastReferenceTime){\n smallestLastReferenceTime = currElement.getLastTimeReferenced();\n correspondingElement = currElement;\n }\n }\n\n return correspondingElement;\n }", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "static long closer(int arr[], int n, long x)\n {\n int index = binarySearch(arr,0,n-1,(int)x); \n return (long) index;\n }", "public Criteria andAddressGreaterThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"address > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "private WALPointer tailPointer(WALPointer from) throws IgniteCheckedException {\n WALIterator it = cctx.wal().replay(from);\n\n try {\n while (it.hasNextX()) {\n IgniteBiTuple<WALPointer, WALRecord> rec = it.nextX();\n\n if (rec == null)\n break;\n }\n }\n finally {\n it.close();\n }\n\n return it.lastRead().map(WALPointer::next).orElse(null);\n }", "public Location getNearest(Location src)\r\n {\r\n if(Main.ASSERT) Util.assertion(!src.inside(bl, tr));\r\n // cases: \r\n // 3 6 9 \r\n // 2 x 8\r\n // 1 4 7\r\n if(src.getX()<=bl.getX())\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return bl; // case 1\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return tl; // case 3\r\n }\r\n else\r\n {\r\n return new Location.Location2D(bl.getX(), src.getY()); // case 2\r\n }\r\n }\r\n else if(src.getX()>=tr.getX())\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return br; // case 7\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return tr; // case 9\r\n }\r\n else\r\n {\r\n return new Location.Location2D(tr.getX(), src.getY()); // case 8\r\n }\r\n }\r\n else\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return new Location.Location2D(src.getX(), bl.getY()); // case 4\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return new Location.Location2D(src.getX(), tr.getY()); // case 6\r\n }\r\n else\r\n {\r\n throw new RuntimeException(\"get nearest undefined for internal point\");\r\n }\r\n }\r\n }", "public int findMemory( int size )\n {\n // represents the smallest available freeBlock within out freeBlock list\n // that will accommodate the size of the entry.\n int smallestFreeBlock = poolSize + 1;\n int position = -1;\n freeBlockList.moveToStart();\n freeBlockList.next();\n while ( !freeBlockList.isAtEnd() )\n {\n Object[] keyArray =\n freeBlockList.getCurrentElement().keySet().toArray();\n Integer key = (Integer)keyArray[0];\n\n if ( ( freeBlockList.getCurrentElement().get( key ) < smallestFreeBlock )\n && ( freeBlockList.getCurrentElement().get( key ) >= size ) )\n {\n position = key;\n smallestFreeBlock = freeBlockList.getCurrentElement().get( key );\n }\n freeBlockList.next();\n }\n\n return position;\n\n }", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\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\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "public static int closestNumber(int p, int high, int low) {\n\t\tif(p>Math.abs(high-p)) {\n\t\t\tp=high;\n\t\t}\n\t\telse {\n\t\t\tp=low;\n\t\t}\n\t\treturn p;\n\t}", "private Block findFreeBlock(int size) {\n\n // iteration is ordered min ~ max\n for (Block b : freeSpace) {\n if (b.length >= size) \n return b;\n }\n return null;\n }", "private StreamEvent findIfActualMin(AttributeDetails latestEvent) {\n int indexCurrentMin = valueStack.indexOf(currentMin);\n int postBound = valueStack.indexOf(latestEvent) - indexCurrentMin;\n // If latest event is at a distance greater than maxPostBound from min, min is not eligible to be sent as output\n if (postBound > maxPostBound) {\n currentMin.notEligibleForRealMin();\n return null;\n }\n // If maxPreBound is 0, no need to check preBoundChange. Send output with postBound value\n if (maxPreBound == 0) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", 0, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n int preBound = 1;\n double dThreshold = currentMin.getValue() + currentMin.getValue() * preBoundChange / 100;\n while (preBound <= maxPreBound && indexCurrentMin - preBound >= 0) {\n if (valueStack.get(indexCurrentMin - preBound).getValue() >= dThreshold) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", preBound, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n ++preBound;\n }\n // Completed iterating through maxPreBound older events. No events which satisfy preBoundChange condition found.\n // Therefore min is not eligible to be sent as output.\n currentMin.notEligibleForRealMin();\n return null;\n }", "public Data getUndefinedDataAt(Address addr);", "private Point backtrack(Point p){\n\t\t// coordinates of the point\n\t\tint x = (int)p.getX();\n\t\tint y = (int)p.getY();\n\t\t// neigh hold the return value\n\t\tPoint neigh= p;\n\t\t// the lowest score\n\t\tint score=10000;\n\t\t// look at all the neighbor and compare them\n\t\tif(x>0\t && topology[x-1][y]>=0){\n\t\t\tscore = topology[x-1][y];\n\t\t\tneigh = new Point(x-1,y);\n\t\t}\n\t\tif(x<row-1 && topology[x+1][y]>=0 && score > topology[x+1][y]) {\n\t\t\tscore = topology[x+1][y];\n\t\t\tneigh = new Point(x+1,y);\n\t\t}\n\t\tif(y<col-1 && topology[x][y+1]>=0 && score > topology[x][y+1]) {\n\t\t\tscore = topology[x][y+1];\n\t\t\tneigh = new Point(x,y+1);\n\t\t}\n\t\tif(y>0 && topology[x][y-1]>=0 && score > topology[x][y-1]) {\n\t\t\tscore = topology[x][y-1];\n\t\t\tneigh = new Point(x,y-1);\n\t\t}\n\t\treturn neigh;\n\t}", "private Point findFront(Point[] points) {\n\t\t// Loop through the passed points.\n\t\tdouble[] dists = new double[3];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Get outer-loop point.\n\t\t\tPoint a = points[i];\n\t\t\t\n\t\t\t// Loop through rest of points.\n\t\t\tfor (int k = 0; k < 3; k++) {\n\t\t\t\t// Continue if current outer.\n\t\t\t\tif (i == k) continue;\n\t\t\t\t\n\t\t\t\t// Get inner-loop point.\n\t\t\t\tPoint b = points[k];\n\t\t\t\t\n\t\t\t\t// Add distance between out and inner.\n\t\t\t\tdists[i] += Math.sqrt(\n\t\t\t\t\tMath.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Prepare index and largest holder.\n\t\tint index = 0;\n\t\tdouble largest = 0;\n\t\t\n\t\t// Loop through the found distances.\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Skip if dist is lower than largest.\n\t\t\tif (dists[i] < largest) continue;\n\t\t\t\n\t\t\t// Save the index and largest value.\n\t\t\tindex = i;\n\t\t\tlargest = dists[i];\n\t\t}\n\t\t\n\t\t// Return the largest point index.\n\t\treturn points[index];\n\t}", "public static Address getTroveFromAddress()\n {\n Address rval = new Address();\n\n rval.setFirstName(\"Trove, Inc.\");\n rval.setAddressLine1(\"20 Exchange Place\");\n rval.setAddressLine2(\"Apt 1604\");\n rval.setCity(\"New York\");\n Subdivision subdivision = new Subdivision();\n subdivision.setCode(\"US-NY\");\n\n rval.setSubdivision(subdivision);\n rval.setPostalCode(\"10005\");\n rval.setPhone(\"3108096011\");\n\n return rval;\n }", "protected ValuePosition getMinimum() {\n\t\t// Calcule la position et la durée d'exécution de la requête la plus courte dans le tableau des requêtes\n\t\tValuePosition minimum = new ValuePosition();\n\t\tminimum.position = 0;\n\t\tfor(int pos=0; pos<requests.length; pos++) {\n\t\t\tRequest request = requests[pos];\n\t\t\tif(request == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minimum.value == null || request.getElapsedTime() < minimum.value) {\n\t\t\t\tminimum.position = pos;\n\t\t\t\tminimum.value = request.getElapsedTime();\n\t\t\t}\n\t\t}\n\t\treturn minimum;\n\t}", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "private static <K extends Comparable<? super K>, V> @Nullable Node<K, V> findBestRoot(\n @Nullable Node<K, V> pRoot,\n @Nullable K pFromKey,\n boolean pFromInclusive,\n @Nullable K pToKey,\n boolean pToInclusive) {\n\n @Var Node<K, V> current = pRoot;\n while (current != null) {\n\n if (pFromKey != null && exceedsLowerBound(current.getKey(), pFromKey, pFromInclusive)) {\n // current and left subtree can be ignored\n current = current.right;\n } else if (pToKey != null && exceedsUpperBound(current.getKey(), pToKey, pToInclusive)) {\n // current and right subtree can be ignored\n current = current.left;\n } else {\n // current is in range\n return current;\n }\n }\n\n return null; // no mapping in range\n }", "public O before(O a)\r\n {\r\n int index = indexOf(a);\r\n if (index != -1 && index != 0) //is defined and not first\r\n return get(index-1);\r\n else return null;\r\n }", "public Point ExtractMin() {\n\t\tif (heapSize < 0)\n\t\t\tthrow new RuntimeException(\"MinHeap underflow!\");\n\t\tPoint min = new Point(heapArr[0]);\n\t\theapArr[0] = new Point(heapArr[heapSize - 1]);\n\t\theapSize = heapSize - 1;\n\t\tminHeapify(0);\n\t\treturn min;\n\n\t}", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "Optional<MemoryAddress> lookup(String name);", "private static long getFirstOffset(long currentOffset, int limit) {\n\t\tlong firstOffset = currentOffset;\n\n\t\twhile(firstOffset > limit) {\n\t\t\tfirstOffset -= limit;\n\t\t}\n\n\t\treturn firstOffset;\n\t}", "public final Node getNearestNode(Point p) {\n double minDistanceSq = Double.MAX_VALUE;\n Node minPrimitive = null;\n for (Node n : getData().nodes) {\n if (n.deleted || n.incomplete)\n continue;\n Point sp = getPoint(n.eastNorth);\n double dist = p.distanceSq(sp);\n if (minDistanceSq > dist && dist < snapDistance) {\n minDistanceSq = p.distanceSq(sp);\n minPrimitive = n;\n }\n // prefer already selected node when multiple nodes on one point\n else if(minDistanceSq == dist && n.selected && !minPrimitive.selected)\n {\n minPrimitive = n;\n }\n }\n return minPrimitive;\n }", "public static int lower_bound(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] >= key)\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid - 1;\n\t\t}\n\t\treturn low;\n\t}", "public abstract List<T> findWithOffsetFromPosition(int from, int amount);", "public Coordinates closestPointB() {\n return closestPointB;\n }", "default AddressRange range(Address address, long length) {\n\t\ttry {\n\t\t\treturn new AddressRangeImpl(address, length);\n\t\t}\n\t\tcatch (AddressOverflowException e) {\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}", "public T findMin();", "public Set<? extends Position> findNearest(Position position, int k);", "public T poll() {\n if (this.size > 0) {\n T min = (T) pq[0];\n pq[0] = pq[this.size - 1];\n size--;\n percolateDown(0);\n return min;\n } else {\n return null;\n }\n }", "public void removeSmaller(double value){\r\n\t DoubleNode cursor2; \r\n\tfor(cursor = head; cursor != null; cursor = cursor.getLink()){\r\n\t\tif(cursor.getData() < value){\r\n\t\t\tif(cursor == head){\r\n\t\t\t\thead = head.getLink(); \r\n\t\t\t\tmanyNodes--; \r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcursor2 = cursor; \r\n\t\t\t\tthis.removeCurrent();\r\n\t\t\t\tcursor = cursor2;\r\n\t\t\t\tmanyNodes--; \r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n }", "public static int findIdxOfGreatest_IPv6AddressRangeFirst_LesserThanOrEqualTo(IPv6AddressRange[] ipv6AddressRanges, IPv6Address ipv6Address) {\n\t\tint lo = 0;\n\t\tint hi = ipv6AddressRanges.length - 1;\n\t\t// int loops = 0;\n\t\twhile (lo <= hi) {\n\t\t\t// ++loops;\n\t\t\t// Key is in a[lo..hi] or not present. Remember r=compareTo(a,b) => (r<0) means a<b, (r==0) means a==b, (r>0) means a>b\n\t\t\tint mid = lo + (hi - lo) / 2;\n\t\t\tif (ipv6Address.compareTo(ipv6AddressRanges[mid].getFirst()) < 0) hi = mid - 1;\n\t\t\telse if (ipv6Address.compareTo(ipv6AddressRanges[mid].getFirst()) > 0) lo = mid + 1;\n\t\t\telse return mid; // Equality Match!\n\t\t}\n\t\t// System.err.println(\"k: \" + n + \", loops: \" + loops);\n\t\tif (hi < 0) return -1; // Less than lowest\n\t\telse if (lo >= ipv6AddressRanges.length) return ipv6AddressRanges.length - 1; // Greater than highest\n\t\telse return hi; // Greatest lower element\n\t}", "private int[] findPointer() {\n \n int initialAux = 4095;\n int header = 0;\n \n \n for (int i = 0; i < 4096; i++) {\n String initialBinary = Integer.toBinaryString(0xFF & serialize[i * 4]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[i * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n \n if (initial == 0 && sizeData == 0) {\n header = i*4;\n break;\n }\n //get the higher initial \n if (initialAux > initial){\n initialAux = initial;\n }\n \n }\n\n int[] toReturn = new int[2];\n \n toReturn[0] = header;\n toReturn[1] = initialAux-1;\n \n return toReturn;\n }", "private void FindMinZ()\r\n\t{\r\n\t\tminimum_Z=Integer.MAX_VALUE;\r\n\t\tfor(Entry<Integer,Node> entry : FutureUpdateList.entrySet())\r\n\t\t{\r\n\t\t\tNode temp=entry.getValue();\r\n\t\t\tif(temp.z<minimum_Z)\r\n\t\t\t{\r\n\t\t\t\tminimum_Z=temp.z;\r\n\t\t\t\tminimum_X=temp.x;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "Point findNearestActualPoint(Point a, Point b) {\n\t\tPoint left = new Point(a.x-this.delta/3,a.y);\n\t\tPoint right = new Point(a.x+this.delta/3,a.y);\n\t\tPoint down = new Point(a.x,a.y-this.delta/3);\n\t\tPoint up = new Point(a.x,a.y+this.delta/3);\n\t\tPoint a_neighbor = left;\n\t\tif (distance(right,b) < distance(a_neighbor,b)) a_neighbor = right;\n\t\tif (distance(down,b) < distance(a_neighbor,b)) a_neighbor = down;\n\t\tif (distance(up,b) < distance(a_neighbor,b)) a_neighbor = up;\n\n\t\treturn a_neighbor;\n\t}", "private int findBlock(long addr) {\n\t\t// find cache by splitting addr into multiple segs\n\t\tint setIndex = (int) ((addr & 0x7FC0) >>> 6);\n\t\tlong tag = (addr & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t// search for the set to check for existence\n\t\tfor (int j = 0; j < 8; j++) {\n\t\t\tif (cache[setIndex][j] == tag) {\n\t\t\t\tpolicies[setIndex].updateAt(j);\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t}\n\t\tif(usePrefetch){\n\t\t\t//fetch from memory; preftecher will fetch many other relevant addresses\n\t\t\tArrayList<Long> address = pf.getPrefetchedAddress(addr);\n\t\t\tfor(long add : address) {\n\t\t\t\tsetIndex = (int) ((add & 0x7FC0) >>> 6);\n\t\t\t\ttag = (add & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\t\tcache[setIndex][index] = tag;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\tcache[setIndex][index] = tag;\n\t\t}\n\t\t// after all, we need to update the entry\n\t\treturn 4;\n\t}", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "protected abstract D getLower(R range);", "public T peekBest();", "public int serachMaxOrMinPoint(int [] A){\r\n\t\r\n\tint mid, first=0,last=A.length-1;\r\n\t\r\n\twhile( first <= last){\r\n\t\tif(first == last){\r\n\t\t\treturn A[first];\r\n\t\t}\r\n\t\telse if(first == last-1){\r\n\t\t\treturn Math.max(A[first], A[last]);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tmid= first + (last-first)/2;\r\n\t\t\t\r\n\t\t\tif(A[mid]>A[mid-1] && A[mid]>A[mid+1])\r\n\t\t\t\treturn A[mid];\r\n\t\t\telse if(A[mid]>A[mid-1] && A[mid]<A[mid+1])\r\n\t\t\t\tfirst=mid+1;\r\n\t\t\telse if(A[mid]<A[mid-1] && A[mid]>A[mid+1])\r\n\t\t\t\tlast=mid-1;\r\n\t\t\telse return -1;\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\treturn -1;\r\n\t\r\n}", "public Double peekAhead(int in);", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "double[] getBestSolAddressCost();", "public static int offset_offset_cmp() {\n return (168 / 8);\n }", "Execution getFarthestDistance();", "protected static long relativeIndexForOffset(long bufferAddress, int messageSize, long offset) {\n return (offset - bufferAddress) / messageSize;\n }", "public IORequest SSTF(int deviceNumber, IORequest oldhead) {\n\n IORequest closest = null;\n int min = Integer.MIN_VALUE;\n\n //disk scheduling\n try {\n int hedlo = machine.memory.load(Process_Table[oldhead.prognum].base + Process_Table[oldhead.prognum].acc + 2) + machine.memory.load(Process_Table[oldhead.prognum].base + Process_Table[currentProcess].acc + 3);\n for (IORequest request : waitQ[deviceNumber]) {\n int zzzstart = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 2);\n //System.out.println(zzzstart);\n int distance = Math.abs(hedlo-zzzstart );\n\n //if its the closest to the headlocation \n if (distance > min) {\n closest = request;\n min = distance;\n\n }\n \n }\n waitQ[deviceNumber].remove(closest);\n \n waitQ[deviceNumber].addFirst(closest);\n\n } catch (MemoryFault ex) {\n Logger.getLogger(OperatingSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return closest;\n }", "private List<Integer> getClosestRange(List<Integer> ranges, double predictionAmount) {\n List<Integer> bestRange = new ArrayList<>();\n double bestRangeDistance = Double.MAX_VALUE;\n for (int i = 0; i < ranges.size(); i += 2) {\n double rangeDistance = Math.abs(predictionAmount - getRangeCenter(ranges.get(i), ranges.get(i + 1)));\n if (rangeDistance < bestRangeDistance) {\n bestRangeDistance = rangeDistance;\n bestRange.clear();\n bestRange.add(ranges.get(i));\n bestRange.add(ranges.get(i + 1));\n }\n }\n return bestRange;\n }", "public Node getClosest(int x, int y)\n {\n if(NodeList.isEmpty()) return null;\n\n\n double distance = 0;\n //big fat pixel number... Stupidest way to initializa that value, but it's working flawlessly so...\n double reference = 1000000000;\n Node closest = null;\n\n //for each Node in NodeList\n for(Node myNode : NodeList)\n {\n\n //calculate distance\n distance = getDistance(myNode,x,y);\n //System.out.println(\"distance : \" + distance);\n\n if(distance < reference)\n {\n closest = myNode;\n reference = distance;\n }\n }\n\n return closest;\n }", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "public int getLowerBound() {\r\n return lowerBound;\r\n }" ]
[ "0.64873654", "0.58448565", "0.5783931", "0.57259196", "0.55206966", "0.54403394", "0.5434184", "0.53908145", "0.52451515", "0.5218538", "0.5216841", "0.5156608", "0.51387364", "0.51353914", "0.51304024", "0.50941783", "0.49731314", "0.49576017", "0.49097097", "0.4897155", "0.4869888", "0.48497623", "0.4840684", "0.48350894", "0.4812017", "0.48005766", "0.47890824", "0.47732997", "0.477207", "0.47622472", "0.47465616", "0.4734099", "0.47236118", "0.46871972", "0.46855745", "0.46828598", "0.46733022", "0.46315452", "0.46246794", "0.46133375", "0.46104953", "0.4609142", "0.46069673", "0.46009874", "0.45890167", "0.45847118", "0.457185", "0.4568881", "0.45644963", "0.45629263", "0.4562236", "0.45581928", "0.45482254", "0.45361063", "0.45254165", "0.4523727", "0.45147812", "0.4513444", "0.4513097", "0.45115063", "0.4504813", "0.4501757", "0.44914904", "0.44901395", "0.44800192", "0.44782776", "0.44741052", "0.44732565", "0.44691274", "0.44662207", "0.44661483", "0.4462067", "0.4460902", "0.44596758", "0.44564524", "0.44537887", "0.44528005", "0.4450405", "0.44493392", "0.44488275", "0.44488057", "0.44479713", "0.4443787", "0.4440813", "0.44391003", "0.4433786", "0.44337413", "0.44319838", "0.44277012", "0.44260097", "0.44182685", "0.44141686", "0.44125575", "0.44119623", "0.44093192", "0.44092202", "0.44083646", "0.44060254", "0.44034672", "0.440293" ]
0.6302685
1
get the closest Data object that starts at an address that is less than the given address.
public Data getDataBefore(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data getDefinedDataBefore(Address addr);", "public Data getDataAfter(Address addr);", "private int binarySearchToFindClosest(String overflowName, int bottomRecord, int topRecord) {\n // Base condition for only having two records left to choose from\n if (topRecord - bottomRecord == 1) {\n String topRecordName = getRecordCompanyName(\"normal\", topRecord);\n\n // If the name of the overflow company comes after the company name of the top record, then the top record is the closest\n if (overflowName.compareTo(topRecordName) >= 1) {\n return topRecord;\n // Otherwise, either the top and bottom records are equal length away, or the bottom record is closer, so return the bottom record\n } else {\n return bottomRecord;\n }\n // Base condition for having only 1 record left means that that record is the closest\n } else if (topRecord == bottomRecord) {\n return topRecord;\n }\n\n int middle = (topRecord + bottomRecord) / 2;\n String nameOfNormalRecord = getRecordCompanyName(\"normal\", middle);\n int alphabeticalOrder = overflowName.compareTo(nameOfNormalRecord);\n if (alphabeticalOrder == 0) {\n return middle;\n } else if (alphabeticalOrder < 0) {\n return binarySearchToFindClosest(overflowName, bottomRecord, middle);\n } else {\n return binarySearchToFindClosest(overflowName, middle + 1, topRecord);\n } \n }", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "private GlobeAccessPointRecord findNearestGAP(InetAddress srcAddr)\n {\n GlobeAccessPointRecord nearestGAPrec;\n FloatCoordinate coords = null;\n\n // look in our GAP lookup cache. It looks like IE5 ignores our\n // Expires: header so we might really need this for performance \n // reasons.\n synchronized(GlobeRedirector.ip2GAPCache) {\n nearestGAPrec =\n (GlobeAccessPointRecord) GlobeRedirector.ip2GAPCache.get(srcAddr);\n }\n\n /*\n * Return the GAP record if it is in the cache.\n */\n if (nearestGAPrec != null) {\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"(cached) Nearest GAP is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n return nearestGAPrec;\n }\n\n /*\n * There is no {srcAddr, nearest GAP record} pair in the cache. We need\n * the geographical coordinates associated with srcAddr to determine\n * the nearest GAP.\n */\n\n if (_cookieCoords != null) { // client cookie contains coordinates\n coords = _cookieCoords;\n }\n else {\n coords = getCoordinates(srcAddr);\n\n if (coords == null) {\n return null;\n }\n }\n\n /*\n * Calculate which GAP is nearest.\n */\n int i, dist, min = Integer.MAX_VALUE;\n CoordinateImpl srcCoords = new CoordinateImpl((int)coords.lat,\n (int)coords.longi);\n\n for (i = 0; i < _gapList.size(); i++) {\n GlobeAccessPointRecord gaprec = _gapList.get(i);\n dist = gaprec.coords.computeDistance(srcCoords);\n\n if (dist < min) {\n nearestGAPrec = gaprec;\n min = dist;\n }\n }\n\n // Cache the result.\n synchronized(GlobeRedirector.ip2GAPCache) {\n GlobeRedirector.ip2GAPCache.put(srcAddr, nearestGAPrec);\n }\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Nearest GAP of \" + srcAddr.getHostAddress()\n + \" at (\" + (int)coords.lat + \",\" + (int)coords.longi\n + \") is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n\n _cookieCoords = coords;\n return nearestGAPrec;\n }", "public Data getDataContaining(Address addr);", "public static int lowerBound(int[] arr, int data) {\n int ans = -1, low = 0, high = arr.length - 1;\n while (low <= high) {\n int mid = (low + high) / 2;\n if (arr[mid] == data) {\n ans = mid;\n high = mid - 1;\n } else if (data < arr[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return ans;\n }", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}", "public Node closestPrecedingNode(int id);", "@NotNull\n private RangeInfo findNearestRangeInfo() {\n final int caretPosition = myView.getCaretPosition();\n\n for (final RangeInfo range : myRangeInfos) {\n if (range.isWithin(caretPosition)) {\n return range;\n }\n if (range.getFrom() > caretPosition) {\n return range; // Ranges are sorted, so we are on the next range. Take it, if caret is not within range\n }\n }\n\n return myRangeInfos.last();\n }", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "public static int lower_bound(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] >= key)\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid - 1;\n\t\t}\n\t\treturn low;\n\t}", "public Data getDefinedDataAfter(Address addr);", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public Instruction getInstructionBefore(Address addr);", "public static int getMin(ArrayList<QuoteShort> data, int begin, int end) {\n\t\tint min = 999999999;\r\n\t\tint minIndex = -1;\r\n\t\tif (begin<=0) begin = 0;\r\n\t\tfor (int i=begin;i<=end;i++){\r\n\t\t\tif (data.get(i).getHigh5()<=min){\r\n\t\t\t\tmin = data.get(i).getLow5();\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn minIndex;\r\n\t}", "public Shard getLowerNeighbor() {\r\n double middleLat = south + Math.abs(north - south) / 2;\r\n double nextLat = middleLat - Math.abs(north - south);\r\n\r\n return new Shard(new Coordinates(nextLat, coordinates.getLon()), zoom);\r\n }", "public Data getDefinedDataContaining(Address addr);", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "public int getLowerBound ();", "private Node getMinimumOld() {\n Node tmp = null;\n\n // TODO: optimize by putting in 1 list and\n // provide 'starting offset' for remaining nodes to find mimimum\n // note: see new getMinimum method above\n\n if (null != nodeA) {\n tmp = nodeA;\n if (null != nodeB && tmp.data > nodeB.data) {\n tmp = nodeB;\n }\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeB) {\n tmp = nodeB;\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeC) {\n tmp = nodeC;\n }\n\n // System.out.println(tmp);\n\n if (null == tmp ) {\n // terminating condition\n return null;\n }\n\n if (tmp.equals(nodeA)) {\n nodeA = nodeA.next;\n }\n if (tmp.equals(nodeB)) {\n nodeB = nodeB.next;\n }\n if (tmp.equals(nodeC)) {\n nodeC = nodeC.next;\n }\n\n System.out.println(tmp.data);\n\n return tmp;\n }", "protected static int advanceUntil(CharBuffer array, int pos, int length, char min) {\n int lower = pos + 1;\n\n // special handling for a possibly common sequential case\n if (lower >= length || (array.get(lower)) >= (min)) {\n return lower;\n }\n\n int spansize = 1; // could set larger\n // bootstrap an upper limit\n\n while (lower + spansize < length\n && (array.get(lower + spansize)) < (min)) {\n spansize *= 2; // hoping for compiler will reduce to\n }\n // shift\n int upper = (lower + spansize < length) ? lower + spansize : length - 1;\n\n // maybe we are lucky (could be common case when the seek ahead\n // expected\n // to be small and sequential will otherwise make us look bad)\n if (array.get(upper) == min) {\n return upper;\n }\n\n if ((array.get(upper)) < (min)) {// means\n // array\n // has no\n // item\n // >= min\n // pos = array.length;\n return length;\n }\n\n // we know that the next-smallest span was too small\n lower += (spansize >>> 1);\n\n // else begin binary search\n // invariant: array[lower]<min && array[upper]>min\n while (lower + 1 != upper) {\n int mid = (lower + upper) >>> 1;\n char arraymid = array.get(mid);\n if (arraymid == min) {\n return mid;\n } else if ((arraymid) < (min)) {\n lower = mid;\n } else {\n upper = mid;\n }\n }\n return upper;\n\n }", "public int relativePosTo(long addr) {\n\t\t\tif(addr < this.start)\n\t\t\t\treturn -1;\n\t\t\tif(addr > this.end)\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "public O before(O a)\r\n {\r\n int index = indexOf(a);\r\n if (index != -1 && index != 0) //is defined and not first\r\n return get(index-1);\r\n else return null;\r\n }", "public T findMin();", "protected ValuePosition getMinimum() {\n\t\t// Calcule la position et la durée d'exécution de la requête la plus courte dans le tableau des requêtes\n\t\tValuePosition minimum = new ValuePosition();\n\t\tminimum.position = 0;\n\t\tfor(int pos=0; pos<requests.length; pos++) {\n\t\t\tRequest request = requests[pos];\n\t\t\tif(request == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minimum.value == null || request.getElapsedTime() < minimum.value) {\n\t\t\t\tminimum.position = pos;\n\t\t\t\tminimum.value = request.getElapsedTime();\n\t\t\t}\n\t\t}\n\t\treturn minimum;\n\t}", "public Data getDataAt(Address addr);", "public Address getClosestAddressTo(Depot d) {\n double bestDistance = Double.MAX_VALUE;\n Address bestAddress = null;\n for (Address a : addresses) {\n double distance = a.getCoordinates().companyDistanceTo(d.getCoordinates());\n if (distance < bestDistance) {\n bestAddress = a;\n bestDistance = distance;\n }\n }\n return bestAddress;\n }", "public Point getXLower()\n {\n return (Point)xLow.clone();\n }", "public String getNearestStreet() {\n String nearestStreet = \"null\";\n CollisionResults results = new CollisionResults();\n float closestDistance = 101f;\n for(float xDir = -1; xDir <= 1; xDir += .1f) {\n for(float yDir = -1; yDir <= 1; yDir += .1f) {\n for(float zDir = -1; zDir <= 1; zDir += .1f) { \n Ray ray = new Ray(loc, new Vector3f(xDir, yDir, zDir));\n world.collideWith(ray, results);\n for (int i = 0; i < results.size(); i++) {\n float dist = results.getCollision(i).getDistance();\n String name = results.getCollision(i).getGeometry().getParent().getName();\n if (name.startsWith(\"R_\") && dist <= 100 && dist < closestDistance) {\n nearestStreet = name;\n closestDistance = dist;\n }\n }\n }\n }\n }\n\n return nearestStreet;\n \n }", "public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}", "public node_data heapExtractMin(){\n\t\tdouble min = _positiveInfinity;\n\t\tnode_data v=null;\n\t\tif (!isEmpty()){\n\t\t\tv = _a[0];\n\t\t\tmin = v.getWeight();\n\t\t\t_a[0]=_a[_size-1];\n\t\t\t_size = _size-1;\n\t\t\tminHeapify(0, _size);\n\t\t}\n\t\treturn v;\n\t}", "protected abstract D getLower(R range);", "private UnconstrainedBidElement getClosest(double demandWatt) {\n UnconstrainedBidElement best = null;\n double bestDistance = Double.MAX_VALUE;\n for (UnconstrainedBidElement e : elements) {\n double distance = Math.abs(demandWatt - e.demandWatt);\n if (best == null || distance < bestDistance) {\n best = e;\n bestDistance = distance;\n }\n }\n return best;\n }", "public float getLimit_lin_x_lower() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 32);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 24);\n\t\t}\n\t}", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "public final Node getNearestNode(Point p) {\n double minDistanceSq = Double.MAX_VALUE;\n Node minPrimitive = null;\n for (Node n : getData().nodes) {\n if (n.deleted || n.incomplete)\n continue;\n Point sp = getPoint(n.eastNorth);\n double dist = p.distanceSq(sp);\n if (minDistanceSq > dist && dist < snapDistance) {\n minDistanceSq = p.distanceSq(sp);\n minPrimitive = n;\n }\n // prefer already selected node when multiple nodes on one point\n else if(minDistanceSq == dist && n.selected && !minPrimitive.selected)\n {\n minPrimitive = n;\n }\n }\n return minPrimitive;\n }", "public Location getNearest(Location src)\r\n {\r\n if(Main.ASSERT) Util.assertion(!src.inside(bl, tr));\r\n // cases: \r\n // 3 6 9 \r\n // 2 x 8\r\n // 1 4 7\r\n if(src.getX()<=bl.getX())\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return bl; // case 1\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return tl; // case 3\r\n }\r\n else\r\n {\r\n return new Location.Location2D(bl.getX(), src.getY()); // case 2\r\n }\r\n }\r\n else if(src.getX()>=tr.getX())\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return br; // case 7\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return tr; // case 9\r\n }\r\n else\r\n {\r\n return new Location.Location2D(tr.getX(), src.getY()); // case 8\r\n }\r\n }\r\n else\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return new Location.Location2D(src.getX(), bl.getY()); // case 4\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return new Location.Location2D(src.getX(), tr.getY()); // case 6\r\n }\r\n else\r\n {\r\n throw new RuntimeException(\"get nearest undefined for internal point\");\r\n }\r\n }\r\n }", "public Point ExtractMin() {\n\t\tif (heapSize < 0)\n\t\t\tthrow new RuntimeException(\"MinHeap underflow!\");\n\t\tPoint min = new Point(heapArr[0]);\n\t\theapArr[0] = new Point(heapArr[heapSize - 1]);\n\t\theapSize = heapSize - 1;\n\t\tminHeapify(0);\n\t\treturn min;\n\n\t}", "private static int minimumPosition(int[] a, int from)\n {\n int minPos = from;\n for (int i = from + 1; i < a.length; i++) \n {\n if (a[i] < a[minPos]) { minPos = i; }\n }\n return minPos;\n }", "public Resource findNearestResource(){\n\t\tResource nearestResource = null;\n\t\tfloat distanceToCurrentResource = 0f;\n\t\tfor (Resource resource : MapData.getInstance().getResources()) {\n\t\t\tif(resource.isResourceMaxed()) continue;\n\t\t\tif (resource.getCenter().dst2(getCenter()) < 4000000) {\n\t\t\t\tif (nearestResource == null) {\n\t\t\t\t\tnearestResource = resource;\n\t\t\t\t\tdistanceToCurrentResource = nearestResource\n\t\t\t\t\t\t\t.getCenter().dst2(this.getCenter());\n\t\t\t\t} else {\n\t\t\t\t\tfloat distanceToNewResource = resource.getCenter()\n\t\t\t\t\t\t\t.dst2(this.getCenter());\n\t\t\t\t\tnearestResource = (distanceToNewResource < distanceToCurrentResource) ? resource\n\t\t\t\t\t\t\t: nearestResource;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nearestResource;\n\t}", "private T getMinUnvisited(){\n if (unvisited.isEmpty()) return null;\n T min = unvisited.get(0);\n for (int i = 1; i < unvisited.size(); i++){\n T temp = unvisited.get(i);\n if (distances[vertexIndex(temp)] < distances[vertexIndex(min)]){\n min = temp;\n }\n }\n return min;\n }", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "private Node lowestCostThrough(List<Node> openSet, Map<Node, Double> costThrough){\n Node lowest = openSet.get(0);\n\n for(Node n: openSet){\n if(costThrough.get(n) < costThrough.get(lowest)){\n lowest = n;\n }\n }\n return lowest;\n }", "public int getLowerBound() {\r\n return lowerBound;\r\n }", "private Point[] nearestPointInArray(Point[] strip){\n\t\tint j = 1; // with each point we measure the distance with the following 6 point's\n\t\tPoint[] currentMinPoints = {strip[0],strip[1]};\n\t\tdouble currentMinDistance = Distance(currentMinPoints[0], currentMinPoints[1]);\n\t\tdouble currentDistance;\t\n\t\tfor (int i=0; i< strip.length; i++){\n\t\t\twhile (j<8 && i+j < strip.length){\n\t\t\t\tcurrentDistance = Distance(strip[i], strip[i+j]);\n\t\t\t\tif (currentDistance<currentMinDistance){\n\t\t\t\t\tcurrentMinDistance = currentDistance;\n\t\t\t\t\tcurrentMinPoints[0] = strip[i];\n\t\t\t\t\tcurrentMinPoints[1] = strip[i+j];\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tj=1;\n\t\t}\n\t\treturn currentMinPoints;\n\t}", "Execution getClosestDistance();", "public int findSmallest() {\n\t/*\n\t Cases:\n\t If last or only node, return datum\n\n\t Otherwise:\n\t Return whatever is smaller: \n\t The datum of the current node,\n\t or the datum of the next node \n\t*/ \n\tif (next == null) return datum; \n\telse {\n\t int nextDatum = next.findSmallest();\n\t if (nextDatum < datum) return nextDatum;\n\t else return datum;\n\t}\n }", "long closest(double lon, double lat) {\n double smallestDist = Double.MAX_VALUE;\n long smallestId = 0;\n Iterable<Node> v = world.values();\n for (Node n : v) {\n double tempLat = n.getLat();\n double tempLon = n.getLon();\n double tempDist = distance(lon, lat, tempLon, tempLat);\n if (tempDist < smallestDist) {\n smallestDist = tempDist;\n smallestId = n.getId();\n }\n }\n return smallestId;\n }", "public node_data heapMinimum(){return _a[0];}", "public Data getDefinedDataAt(Address addr);", "public Criteria andAddressLessThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"address < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public static Node getLowestDistanceNode(Set<Node> unsettledNodes) {\n Node lowestDistanceNode = null;\n int lowestDistance = Integer.MAX_VALUE;\n for (Node node: unsettledNodes) {\n int nodeDistance = node.distance;\n if (nodeDistance < lowestDistance) {\n lowestDistance = nodeDistance;\n lowestDistanceNode = node;\n }\n }\n return lowestDistanceNode;\n }", "public Point getLowerPoint() {\n return lower;\n }", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "public int\ngetNodeIndexMin();", "public static Position getClosest2reference(ArrayList<Position> c, Position reference){\n \t// Gets the closest point to the user's current position\n \tPosition temp;\n \tPosition min = new Position(0,0);\n \tdouble d;\n \tdouble minDistance = 1000;\n \tIterator<Position> t = c.iterator();\n \twhile (t.hasNext()){\n \t\ttemp = (Position) t.next();\n \t\t//System.out.println(\"Checking: \" + temp.getLat() + \",\" + temp.getLon());\n \t\td = Tools.distance(reference, temp);\n \t\tif (d < minDistance){\n \t\t\tmin = temp;\n \t\t\tminDistance = d;\n \t\t}\n \t}\n \treturn min;\n }", "public int getLowerBound ()\n\t{\n\t\treturn getRelationshipImpl().getLowerBound();\n\t}", "long getAddress(ByteBuffer buffer);", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "public int nextLessThan(int range) {\n return (0x7fffffff & this.nextInt()) % range;\n }", "public V getLowerBound();", "private static long getFirstOffset(long currentOffset, int limit) {\n\t\tlong firstOffset = currentOffset;\n\n\t\twhile(firstOffset > limit) {\n\t\t\tfirstOffset -= limit;\n\t\t}\n\n\t\treturn firstOffset;\n\t}", "public static int lower_bound_equals(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] > key)\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid - 1;\n\t\t}\n\t\treturn low;\n\t}", "public E extractMin() {\r\n\t\tif (this.size == 0) {\r\n\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\"Heap underflow. Cannot extractMin from an empty heap.\");\r\n\t\t}\r\n\t\tE min = this.objectHeap[0];\r\n\t\tdouble costMin = this.costHeap[0];\r\n\t\tthis.objectHeap[0] = this.objectHeap[this.size - 1];\r\n\t\tthis.costHeap[0] = this.costHeap[this.size - 1];\r\n\t\tthis.size -= 1;\r\n\t\tthis.locations.delete(min);\r\n\t\tthis.locations.put(this.objectHeap[0], 0);\r\n\t\tthis.minHeapify(0);\r\n\t\treturn min;\r\n\t}", "public static DataType findPointerRelativeInner(DataType base, int offset) {\n\t\tif (base instanceof TypeDef) {\n\t\t\tbase = ((TypeDef) base).getBaseDataType();\n\t\t}\n\t\twhile (base instanceof Structure) {\n\t\t\tDataTypeComponent component = ((Structure) base).getComponentContaining(offset);\n\t\t\tif (component == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbase = component.getDataType();\n\t\t\toffset -= component.getOffset();\n\t\t\tif (offset == 0) {\n\t\t\t\treturn base;\n\t\t\t}\n\t\t}\n\t\treturn Undefined1DataType.dataType;\n\t}", "public NodeEntry<Boolean, Node> find(T data) {\n\t\tif (this.numberOfNodes == 0)\n\t\t\t// Return the header as the second parameter\n\t\t\t// to indicate that the returned false was\n\t\t\t// as a result of querying data to an empty\n\t\t\t// list.\n\t\t\treturn new NodeEntry<Boolean, Node>(false, this.header);\n\n\t\t// Begin with the header and traverse the list\n\t\t// using right pointers at every visited node.\n\t\tNode currentNode = this.header;\n\t\tNode nodeToCompare = null;\n\t\tNode leftNeighbor = null;\n\t\tint currentLevel = this.listLevel;\n\t\twhile (currentLevel > 1) {\n\t\t\tnodeToCompare = currentNode.nextNodes.get(currentLevel);\n\t\t\tif (nodeToCompare != null) {\n\t\t\t\tif (data.compareTo(nodeToCompare.data) > 0) {\n\t\t\t\t\tcurrentNode = nodeToCompare;\n\t\t\t\t} else if (data.compareTo(nodeToCompare.data) < 0) {\n\t\t\t\t\tcurrentLevel--;\n\t\t\t\t} else\n\t\t\t\t\treturn new NodeEntry<Boolean, Node>(true, nodeToCompare);\n\t\t\t} else currentLevel--;\n\t\t}\n\n\t\t// If the query value is found to be the smallest in the\n\t\t// list, we'd hit the bottom of the list through header.\n\t\t// Return the header as the left hand neighbor for the\n\t\t// position where the query data can be inserted later.\n\t\tif (currentNode.equals(this.header) &&\n\t\t\tcurrentNode.nextNodes.get(1).data.compareTo(data) >= 0) {\n\t\t\treturn new NodeEntry<Boolean, Node>(false, this.header);\n\t\t}\n\n\t\t// Otherwise, continue traversing the remaining nodes\n\t\t// until the last visited node's data value is found\n\t\t// to be equal to or greater than the query.\n\t\twhile (!currentNode.equals(this.sentinel)) {\n\t\t\tif (currentNode.data.compareTo(data) > 0) {\n\t\t\t\t// Return the node immediately before the possible\n\t\t\t\t// position where the data could have been found.\n\t\t\t\t// This can be used for inserting a new node to the\n\t\t\t\t// list containing the same data value as the query.\n\t\t\t\treturn new NodeEntry<Boolean, Node>(false, leftNeighbor);\n\t\t\t} else if (currentNode.data.compareTo(data) < 0) {\n\t\t\t\t// This is where we enter this while loop,\n\t\t\t\t// so we protect ourselves from losing the\n\t\t\t\t// track of the immediate left neighbor.\n\t\t\t\tleftNeighbor = currentNode;\n\t\t\t\tcurrentNode = currentNode.nextNodes.get(1);\n\t\t\t} else {\n\t\t\t\treturn new NodeEntry<Boolean, Node>(true, currentNode);\n\t\t\t}\n\t\t}\n\n\t\t// After reaching the sentinel, return the last node\n\t\t// in the list as the position where the data may be\n\t\t// inserted into the list.\n\t\treturn new NodeEntry<Boolean, Node>(false, leftNeighbor);\n\t}", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "private StreamEvent findIfActualMin(AttributeDetails latestEvent) {\n int indexCurrentMin = valueStack.indexOf(currentMin);\n int postBound = valueStack.indexOf(latestEvent) - indexCurrentMin;\n // If latest event is at a distance greater than maxPostBound from min, min is not eligible to be sent as output\n if (postBound > maxPostBound) {\n currentMin.notEligibleForRealMin();\n return null;\n }\n // If maxPreBound is 0, no need to check preBoundChange. Send output with postBound value\n if (maxPreBound == 0) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", 0, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n int preBound = 1;\n double dThreshold = currentMin.getValue() + currentMin.getValue() * preBoundChange / 100;\n while (preBound <= maxPreBound && indexCurrentMin - preBound >= 0) {\n if (valueStack.get(indexCurrentMin - preBound).getValue() >= dThreshold) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", preBound, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n ++preBound;\n }\n // Completed iterating through maxPreBound older events. No events which satisfy preBoundChange condition found.\n // Therefore min is not eligible to be sent as output.\n currentMin.notEligibleForRealMin();\n return null;\n }", "private Point findFront(Point[] points) {\n\t\t// Loop through the passed points.\n\t\tdouble[] dists = new double[3];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Get outer-loop point.\n\t\t\tPoint a = points[i];\n\t\t\t\n\t\t\t// Loop through rest of points.\n\t\t\tfor (int k = 0; k < 3; k++) {\n\t\t\t\t// Continue if current outer.\n\t\t\t\tif (i == k) continue;\n\t\t\t\t\n\t\t\t\t// Get inner-loop point.\n\t\t\t\tPoint b = points[k];\n\t\t\t\t\n\t\t\t\t// Add distance between out and inner.\n\t\t\t\tdists[i] += Math.sqrt(\n\t\t\t\t\tMath.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Prepare index and largest holder.\n\t\tint index = 0;\n\t\tdouble largest = 0;\n\t\t\n\t\t// Loop through the found distances.\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Skip if dist is lower than largest.\n\t\t\tif (dists[i] < largest) continue;\n\t\t\t\n\t\t\t// Save the index and largest value.\n\t\t\tindex = i;\n\t\t\tlargest = dists[i];\n\t\t}\n\t\t\n\t\t// Return the largest point index.\n\t\treturn points[index];\n\t}", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "public Node findPredecessor(int id) {\n\t\tNode n = this;\n\t\twhile (id <= n.getId() || id > n.getSuccessor().getId()) {\n\t\t\tn = n.closestPrecedingFinger(id);\n\t\t}\n\t\treturn n;\n\t}", "public E returnMinElement(){\r\n if (theData.size() <= 0) return null;\r\n\r\n E min = theData.get(0).getData();\r\n\r\n for (int i = 0; i< theData.size() ; i++){\r\n if (min.compareTo(theData.get(i).getData()) > 0 ){\r\n min = theData.get(i).getData();\r\n }\r\n }\r\n return min;\r\n }", "public static Point searchNearestEgde(Rectangle bounds, Point first, Point next) {\n\n // One offset needed to avoid intersection with the wrong line.\n if (bounds.x + bounds.width <= first.x)\n first.x = bounds.x + bounds.width - 1;\n else if (bounds.x >= first.x) first.x = bounds.x + 1;\n\n if (bounds.y + bounds.height <= first.y)\n first.y = bounds.height + bounds.y - 1;\n else if (bounds.y >= first.y) first.y = bounds.y + 1;\n\n Line2D relationLine = new Line2D.Float(first.x, first.y, next.x, next.y);\n Line2D lineTop = new Line2D.Float(bounds.x, bounds.y, bounds.x\n + bounds.width, bounds.y);\n Line2D lineRight = new Line2D.Float(bounds.x + bounds.width, bounds.y,\n bounds.x + bounds.width, bounds.y + bounds.height);\n Line2D lineBottom = new Line2D.Float(bounds.x + bounds.width, bounds.y\n + bounds.height, bounds.x, bounds.y + bounds.height);\n Line2D lineLeft = new Line2D.Float(bounds.x, bounds.y + bounds.height,\n bounds.x, bounds.y);\n\n Point2D ptIntersectTop = ptIntersectsLines(relationLine, lineTop);\n Point2D ptIntersectRight = ptIntersectsLines(relationLine, lineRight);\n Point2D ptIntersectBottom = ptIntersectsLines(relationLine, lineBottom);\n Point2D ptIntersectLeft = ptIntersectsLines(relationLine, lineLeft);\n\n // line is to infinite, we must verify that the point find interst the\n // correct edge and the relation.\n int distTop = (int) lineTop.ptSegDist(ptIntersectTop)\n + (int) relationLine.ptSegDist(ptIntersectTop);\n int distRight = (int) lineRight.ptSegDist(ptIntersectRight)\n + (int) relationLine.ptSegDist(ptIntersectRight);\n int distBottom = (int) lineBottom.ptSegDist(ptIntersectBottom)\n + (int) relationLine.ptSegDist(ptIntersectBottom);\n int distLeft = (int) lineLeft.ptSegDist(ptIntersectLeft)\n + (int) relationLine.ptSegDist(ptIntersectLeft);\n\n if (ptIntersectTop != null && distTop == 0) {\n return new Point(RelationGrip.adjust((int) ptIntersectTop.getX()),\n (int) ptIntersectTop.getY());\n\n } else if (ptIntersectRight != null && distRight == 0) {\n return new Point((int) ptIntersectRight.getX(),\n RelationGrip.adjust((int) ptIntersectRight.getY()));\n\n } else if (ptIntersectBottom != null && distBottom == 0) {\n return new Point(RelationGrip.adjust((int) ptIntersectBottom.getX()),\n (int) ptIntersectBottom.getY());\n\n } else if (ptIntersectLeft != null && distLeft == 0) {\n return new Point((int) ptIntersectLeft.getX(),\n RelationGrip.adjust((int) ptIntersectLeft.getY()));\n\n } else {\n return null; // no point found!\n }\n }", "public static int offset_min() {\n return (56 / 8);\n }", "private Node locatePrevNode(K key) { \n\t\tNode p = null; \n\t\tNode current = first; \n\t\twhile (current != null && current.getData().getKey().compareTo(key) < 0) {\n\t\t\tp = current; \n\t\t\tcurrent = current.getNext(); \n\t\t}\n\t\treturn p; \n\t}", "public IORequest SSTF(int deviceNumber, IORequest oldhead) {\n\n IORequest closest = null;\n int min = Integer.MIN_VALUE;\n\n //disk scheduling\n try {\n int hedlo = machine.memory.load(Process_Table[oldhead.prognum].base + Process_Table[oldhead.prognum].acc + 2) + machine.memory.load(Process_Table[oldhead.prognum].base + Process_Table[currentProcess].acc + 3);\n for (IORequest request : waitQ[deviceNumber]) {\n int zzzstart = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 2);\n //System.out.println(zzzstart);\n int distance = Math.abs(hedlo-zzzstart );\n\n //if its the closest to the headlocation \n if (distance > min) {\n closest = request;\n min = distance;\n\n }\n \n }\n waitQ[deviceNumber].remove(closest);\n \n waitQ[deviceNumber].addFirst(closest);\n\n } catch (MemoryFault ex) {\n Logger.getLogger(OperatingSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return closest;\n }", "int getMinX(Long id) throws RemoteException;", "Node predecessor(T value) {\n Node x = search(value);\n if (x.value.compareTo(value) < 0) return x;\n else return predecessor(x);\n }", "private int calculateIndexOfClosestPoint(Position[] smoothedPath) {\n double[] distances = new double[smoothedPath.length];\n for (int i = 0/*lastClosestPointIndex*/; i < smoothedPath.length; i++) {\n distances[i] = Functions.Positions.subtract(smoothedPath[i], currentCoord).getMagnitude();\n }\n\n // calculates the index of value in the array with the smallest value and returns that index\n lastClosestPointIndex = Functions.calculateIndexOfSmallestValue(distances);\n return lastClosestPointIndex;\n }", "protected static Marker getLowestPoint(List<Marker> points) {\n\n Marker lowest = points.get(0);\n\n for(int i = 1; i < points.size(); i++) {\n\n Marker temp = points.get(i);\n\n if(temp.getPosition().latitude < lowest.getPosition().latitude || (temp.getPosition().latitude == lowest.getPosition().latitude && temp.getPosition().longitude < lowest.getPosition().longitude)) {\n lowest = temp;\n }\n }\n\n return lowest;\n }", "public Point closestIntersectionToStartOfLine(Rectangle rect) {\r\n List<Point> list = rect.intersectionPoints(this);\r\n if (list.isEmpty()) {\r\n return null;\r\n // there is only one point in list\r\n } else if (list.size() == 1) {\r\n return list.get(0);\r\n // first point in list closer than the second one\r\n } else if (this.start.distance(list.get(0)) < this.start.distance(list.get(1))) {\r\n return list.get(0);\r\n // second point in list closer than the first one\r\n } else {\r\n return list.get(1);\r\n }\r\n }", "public RTWLocation firstN(int n);", "@Override\n public UInt256 getPriorStorageValue(final Address address, final UInt256 key) {\n return getStorageValue(address, key);\n }", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "@Nullable\n protected abstract Map.Entry<K, V> onGetLowestEntry();", "public float getLimit_lin_z_lower() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 48);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 40);\n\t\t}\n\t}", "public static int closestNumber(int p, int high, int low) {\n\t\tif(p>Math.abs(high-p)) {\n\t\t\tp=high;\n\t\t}\n\t\telse {\n\t\t\tp=low;\n\t\t}\n\t\treturn p;\n\t}", "Point findNearestActualPoint(Point a, Point b) {\n\t\tPoint left = new Point(a.x-this.delta/3,a.y);\n\t\tPoint right = new Point(a.x+this.delta/3,a.y);\n\t\tPoint down = new Point(a.x,a.y-this.delta/3);\n\t\tPoint up = new Point(a.x,a.y+this.delta/3);\n\t\tPoint a_neighbor = left;\n\t\tif (distance(right,b) < distance(a_neighbor,b)) a_neighbor = right;\n\t\tif (distance(down,b) < distance(a_neighbor,b)) a_neighbor = down;\n\t\tif (distance(up,b) < distance(a_neighbor,b)) a_neighbor = up;\n\n\t\treturn a_neighbor;\n\t}", "private static <T extends Comparable <? super T>> int findMinPos(List <T> list, int from, int to){\r\n\t\tif (list.isEmpty()) return -1;\r\n\t\tif (from < 0 || to > list.size()) throw new IllegalArgumentException();\r\n\t\tT currentMin = list.get(from);\r\n\t\tint currentMinPos = from;\r\n\t\tfor (int i = from; i < to; i++){\r\n\t\t\tif (list.get(i).compareTo(currentMin) < 0){\r\n\t\t\t\tcurrentMin = list.get(i);\r\n\t\t\t\tcurrentMinPos = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn currentMinPos;\r\n\t}", "public int rva2offset(Address address) {\n\t\tint offset = -1;\n\t\tfor(IMAGE_SECTION_HEADER section:peFileSections) {\n\t\t\tif(address.getAddr32() >= section.getVirtualAddress()\n\t\t\t&& address.getAddr32() < section.getVirtualAddress() + section.getVirtualSize()) {\n\t\t\t\toffset = address.getAddr32() - section.getVirtualAddress() + section.getPointerToRawData();\n\t\t\t\treturn offset;\n\t\t\t}\n\t\t}\n\t\tif(address.getAddr32() < peOptionalHeader.getSizeOfHeaders())\n\t\t\treturn address.getAddr32();\n\t\treturn offset;\n\t}", "private void FindMinZ()\r\n\t{\r\n\t\tminimum_Z=Integer.MAX_VALUE;\r\n\t\tfor(Entry<Integer,Node> entry : FutureUpdateList.entrySet())\r\n\t\t{\r\n\t\t\tNode temp=entry.getValue();\r\n\t\t\tif(temp.z<minimum_Z)\r\n\t\t\t{\r\n\t\t\t\tminimum_Z=temp.z;\r\n\t\t\t\tminimum_X=temp.x;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public CodeUnit getCodeUnitBefore(Address addr);", "public E extractMin() {\n\t\tif (heap.size() <= 0)\n\t\t\treturn null;\n\t\telse {\n\t\t\tE minVal = heap.get(0);\n\t\t\theap.set(0, heap.get(heap.size()-1)); // Move last to position 0\n\t\t\theap.remove(heap.size()-1);\n\t\t\tminHeapify(heap, 0);\n\t\t\treturn minVal;\n\t\t}\n\t}", "@Test\r\n public void testGetClosestAddressTo() {\r\n System.out.println(\"getClosestAddressTo\");\r\n Customer testCustomer;\r\n testCustomer = new Customer(\"Test Customer\", testAddress4);\r\n \r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress1);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress3);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress2);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertNotEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress2, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n }", "public Point2D nearest(Point2D p) {\n \n if (p == null)\n throw new IllegalArgumentException(\"Got null object in nearest()\");\n \n double rmin = 2.;\n Point2D pmin = null;\n \n for (Point2D q : point2DSET) {\n \n double r = q.distanceTo(p);\n if (r < rmin) {\n \n rmin = r;\n pmin = q;\n }\n }\n return pmin;\n }" ]
[ "0.6132284", "0.5765364", "0.56250226", "0.55601424", "0.55489653", "0.5527959", "0.5341106", "0.52915126", "0.52612156", "0.5249369", "0.5241457", "0.52391833", "0.52251494", "0.52047926", "0.5202618", "0.5202101", "0.5190752", "0.51865655", "0.5185238", "0.51802033", "0.51781213", "0.51755756", "0.5173833", "0.51548785", "0.5117137", "0.5101681", "0.5095426", "0.50922894", "0.5080015", "0.5067479", "0.50239545", "0.5007787", "0.50043917", "0.49981326", "0.49865493", "0.4983193", "0.49815455", "0.4958196", "0.49327466", "0.49305758", "0.49097073", "0.49051178", "0.48976377", "0.48857307", "0.48818633", "0.486491", "0.48646444", "0.48609117", "0.4855288", "0.48321396", "0.4831189", "0.48124728", "0.47951713", "0.4794505", "0.47782424", "0.47702938", "0.47685775", "0.4760871", "0.47575438", "0.47518408", "0.47358695", "0.47348177", "0.47226912", "0.47205245", "0.47193754", "0.47172105", "0.47162122", "0.47156852", "0.47047397", "0.46992323", "0.4697545", "0.46849528", "0.46846217", "0.46824297", "0.4680877", "0.46778122", "0.46717933", "0.4665889", "0.46644327", "0.46605942", "0.46553564", "0.46549964", "0.4654535", "0.46528733", "0.46514803", "0.4650878", "0.46473414", "0.4643384", "0.46429506", "0.46319", "0.4628266", "0.46278328", "0.46237314", "0.46211973", "0.4620135", "0.46196744", "0.46170628", "0.4616484", "0.46082222", "0.46051687" ]
0.69056
0
get a Data iterator that will iterate over the entire address space; returning both defined and undefined Data objects.
public DataIterator getData(boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataIterator getDefinedData(Address addr, boolean forward);", "public DataIterator getData(Address addr, boolean forward);", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "public DataIterator getDefinedData(boolean forward);", "public DataIterator getCompositeData(Address start, boolean forward);", "public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);", "Iterator<TabularData> dataIterator();", "public Data getDefinedDataContaining(Address addr);", "@Override\n public Iterator<Long> iterator() {\n Collection<Long> c = new ArrayList<>();\n synchronized (data) {\n for (int i=0; i<data.length; i++)\n c.add(get(i));\n }\n return c.iterator();\n }", "public Data getDefinedDataAt(Address addr);", "public Iterable<E> getData(){\n return new Iterable<E>(){\n @Override\n public Iterator<E> iterator() {\n return structure.iterator();\n }\n };\n }", "public Data getDataAt(Address addr);", "public java.util.List<DataEntry> findAll(int start, int end);", "public Data getDataContaining(Address addr);", "public Iterator<DystoreTuple> iterator()\t{ return tuple_data.iterator(); }", "public InstructionIterator getInstructions(Address addr, boolean forward);", "public Data getUndefinedDataAt(Address addr);", "public Iterator<T> iterator() { return new DLLIterator(); }", "public Data getDefinedDataAfter(Address addr);", "public Iterator<Hex> iterator() {\n return new Iterator<Hex>() {\n private int g = 0;\n private int h = 0;\n @Override\n public boolean hasNext() {\n return g < hexWidth && h < hexHeight;\n }\n @Override\n public Hex next() {\n Hex result = hexes[g][h];\n if (++g == hexWidth) {\n g = 0;\n h++;\n }\n return result;\n }\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "@Override\n\t\t\tpublic Iterator<T> iterator() {\n\t\t\t\treturn convertData(data.iterator(), targetClass);\n\t\t\t}", "@Override\n public Iterator<Range> iterator() {\n return iterator(defaultValueMapper);\n }", "@Override\n public Iterator<Object> iterator() {\n return new Iterator<Object>() {\n\n private int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < data.length;\n }\n\n @Override\n public Object next() {\n Object result = data[i];\n i = i + 1;\n return result;\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException(\"Tuples are immutable\");\n }\n };\n }", "public Iterator<Entry> iterator() {\n return new ArrayIterator<Entry>(fEntries);\n }", "public UnmodifiableIterator<Entry<K, V>> iterator() {\n return mo8403b().iterator();\n }", "public IndexRecord getIterator() {\n return (iter == -1 ? null : data[iter]);\n}", "public Iterator<IDatasetItem> iterateOverDatasetItems();", "@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }", "public Iterator<T> iterator() {\r\n return new DLListIterator<T>();\r\n }", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "@Override\n public Iterator<Entry<Integer, T>> iterator() {\n List<Entry<Integer, T>> pairs = new ArrayList<Entry<Integer, T>>(count);\n\n for(int i = 0; i < count; i++) {\n pairs.add(new MapEntry<T>(extractKey(buckets[i]), (T)data[i]));\n }\n\n return pairs.iterator();\n }", "@Override\n public Iterator<Location> iterator() {\n return new NeighborhoodIterator(this, new Location(0, 0));\n }", "public native IterableIterator<Tuple<K, V>> entries();", "public Iterator iterator()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n try\r\n {\r\n return new CompositeIterator(new Iterator[] { \r\n spaceMgr.makeComponentSpaceIterator(),\r\n spaceMgr.makeHistorySpaceIterator() });\r\n }\r\n catch (RuntimeException e)\r\n {\r\n e.printStackTrace();\r\n throw e;\r\n }\r\n }", "public interface DataSourceIterator extends Iterator<Data> {\n\n}", "public abstract ucar.array.RangeIterator getRangeIterator();", "@DISPID(-4) //= 0xfffffffc. The runtime will prefer the VTID if present\r\n @VTID(22)\r\n java.util.Iterator<Com4jObject> iterator();", "@Override\n public boolean hasNext() {\n if(dataPageIterator.hasNext()) {\n return true;\n }\n while(dataPage.getNextPageId().isValid()) {\n PageId next = dataPage.getNextPageId();\n DBComponent.BUFFER_MANAGER().unpin(dataPageId, false);\n dataPage = getDataPage(next);\n dataPageId = next;\n dataPageIterator = new DataPageIterator(dataPage);\n if(dataPageIterator.hasNext()) return true;\n }\n return false;\n }", "public Iterator<T> iterator() {\n\t\treturn new ReferentIterator();\n\t}", "Iterator<Entry<String, Var>> getIterator() {\n\t\treturn iter;\n\t}", "@VisibleForTesting\n public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {\n return map.entrySet().iterator();\n }", "public T iterator();", "@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new ArrayMapIterator<>(this.entries, this.size);\n }", "public Iterator<Item> iterator() {\n return new Iterator<Item>() {\n public boolean hasNext() {\n return false;\n }\n\n public Item next() {\n return null;\n }\n };\n }", "@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new ArrayMapIterator<>(this.entries);\n }", "public Iterable<MapElement> elements() {\n return new MapIterator() {\n\n @Override\n public MapElement next() {\n return findNext(true);\n }\n \n };\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "@Override\n public Iterator<T> iterator() {\n return new Iterator<T>(){\n private int ci = 0;\n \n /**\n * Checks if ArrayList has next element \n * @return \n */\n public boolean hasNext(){\n return ci < size;\n }\n \n /**\n * Returns next element and moves iterator forward\n * @return \n */\n public T next(){\n return (T)data[ci++];\n }\n \n /**\n * Does nothing\n */\n public void remove(){\n \n }\n };\n }", "public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "public Iterator<Item> iterator(){\n return new ArrayIterator();\n }", "public Data getDataAfter(Address addr);", "@Override // java.util.Collection, java.lang.Iterable\n public final Iterator<C0472aH> iterator() {\n return new C0220Kr(this.A00);\n }", "@Override\r\n\tpublic Iterator<TableEntry<K, V>> iterator() {\r\n\t\treturn new IteratorImpl();\r\n\t}", "@Override\r\n\tpublic List<Address> findAll() {\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\tList<Address> arrayList = new ArrayList<>();\r\n\t\t\r\n\t\tResultSet array = DAOJDBCModel.multiCallReturn(\"SELECT * FROM address;\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(array.next()) {\r\n\t\t\t\tarrayList.add(new Address(array.getInt(\"id\"), array.getString(\"street\"), array.getString(\"district\"),\r\n\t\t\t\t\t\tarray.getInt(\"number\"), array.getString(\"note\"))); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn arrayList;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "public Iterator<Coord> iterator() {\n\t\treturn new CoordListIterator(array, index);\n\t}", "@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}", "@Override\r\n public Iterator<ValueType> iterator() {\r\n // TODO\r\n return null;\r\n }", "@DISPID(-4)\n @PropGet\n java.util.Iterator<Com4jObject> iterator();", "public native IterableIterator<V> values();", "public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}", "public List<Address> getAllAddresses() throws BackendException;", "public Iterator iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "public Iterator<Item> iterator() {\n return new AIterator();\n }", "@Parameters\n public static Iterable<Object[]> getData() {\n List<Object[]> obj = new ArrayList<>();\n obj.add(new Object[] {3, 12});\n obj.add(new Object[] {2, 8});\n obj.add(new Object[] {1, 4});\n \n return obj;\n }", "public Iterator iterator()\n {\n // optimization\n if (OldOldCache.this.isEmpty())\n {\n return NullImplementation.getIterator();\n }\n\n // complete entry set iterator\n Iterator iter = instantiateIterator();\n\n // filter to get rid of expired objects\n Filter filter = new Filter()\n {\n public boolean evaluate(Object o)\n {\n Entry entry = (Entry) o;\n boolean fExpired = entry.isExpired();\n if (fExpired)\n {\n OldOldCache.this.removeExpired(entry, true);\n }\n return !fExpired;\n }\n };\n\n return new FilterEnumerator(iter, filter);\n }", "@VTID(14)\n java.util.Iterator<Com4jObject> iterator();", "public Iterable<DataFeed> feeds() {\n return data_feeds.values();\n }", "public synchronized Iterator<E> iteratorDownAll()\n {\n if (isEmpty())\n return new CNullIterator<E>();\n\n return new NodeIteratorDown<E>(this, this.m_LastNode, this.m_FirstNode.m_Element);\n }", "public java.util.Iterator<Entry> iterator(){\n\t\treturn new ContentIterator();\n\t}", "@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "public Iterator<? extends TableValue> iterator() {\n\treturn null;\n }", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public Iterator<OpenERPRecord> iterator() {\r\n\t\treturn records.iterator();\r\n\t}", "public DbIterator iterator() {\n // some code goes here\n ArrayList<Tuple> tuples = new ArrayList<Tuple>();\n for (Field key : m_aggregateData.keySet()) {\n \tTuple nextTuple = new Tuple(m_td);\n \tint recvValue;\n \t\n \tswitch (m_op) {\n \tcase MIN: case MAX: case SUM:\n \t\trecvValue = m_aggregateData.get(key);\n \t\tbreak;\n \tcase COUNT:\n \t\trecvValue = m_count.get(key);\n \t\tbreak;\n \tcase AVG:\n \t\trecvValue = m_aggregateData.get(key) / m_count.get(key);\n \t\tbreak;\n \tdefault:\n \t\trecvValue = setInitData(); // shouldn't reach here\n \t}\n \t\n \tField recvField = new IntField(recvValue);\n \tif (m_gbfield == NO_GROUPING) {\n \t\tnextTuple.setField(0, recvField);\n \t}\n \telse {\n \t\tnextTuple.setField(0, key);\n \t\tnextTuple.setField(1, recvField);\n \t}\n \ttuples.add(nextTuple);\n }\n return new TupleIterator(m_td, tuples);\n }", "public Iterator<Item> iterator() {\n Item[] temp = (Item[]) new Object[size];\n System.arraycopy(array, 0, temp, 0, size);\n return (new RandomIterator(temp));\n }", "public ListIterator<T> getAllByRowsIterator() {\n\t\tAllByRowsIterator it = new AllByRowsIterator();\n\t\treturn it;\n\t}", "public Iterator<Type> iterator();", "public Iterator<I> getReservables(){\n IterI iter = new IterI();\n return iter;\n }", "@VTID(11)\r\n java.util.Iterator<Com4jObject> iterator();", "@Override\r\n\tpublic Iterator<T> iterator() {\n\t\treturn new Iterator<T>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic boolean hasNext() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tnodo<T> sig = sentinel;\r\n\t\t\t\tsentinel = sentinel.getNext();\r\n\t\t\t\treturn (sentinel != null) ? true : false;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic T next() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn sentinel.getValue();\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t}", "public Iterator<Object[]> getIterator()\n\t{\n\t\tinit();\n\t\t\n\t\treturn new SimpleIterator();\n\t}", "public static ListIterator iterator() {\r\n\t\treturn getIterator(Direction.class);\r\n\t}", "public Iterable<HashNode> iterator() {\n\t\treturn bucket;\n\t\t//for(HashTable<Character, Integer>.HashNode x : HT.iterator()) {\n\t}", "public Iterator<? extends ICodeBase> auxCodeBaseIterator();", "public Iterator<VirtualMachine> iterator() {\n return mapped_vms.iterator();\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "public synchronized Iterator<E> iterator()\n {\n return iteratorUpAll();\n }", "public Iterator<T> iterator() {\n if (this.nrOfElements == 0) {\n return Collections.<T>emptyList().iterator();\n }\n return new Iterator<T>() {\n private Node walker = null;\n\n @Override\n public boolean hasNext() {\n return walker != last;\n }\n\n @Override\n public T next() {\n if (this.walker == null) {\n this.walker = first;\n return this.walker.getData();\n }\n\n if (this.walker.getNext() == null) {\n throw new NoSuchElementException();\n }\n\n this.walker = this.walker.getNext();\n return this.walker.getData();\n }\n };\n }", "public ListIterator<T> getAllByColumnsIterator() {\n\t\tAllByColumnsIterator it = new AllByColumnsIterator();\n\t\treturn it;\n\t}", "abstract public Iterator<BlockReportReplica> iterator();", "public DoublyLinkedListIterator<T> dllIterator() {\n return new DLLIterator();\n }", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);" ]
[ "0.72631955", "0.685655", "0.65565103", "0.6374612", "0.60678935", "0.60132855", "0.58480084", "0.584209", "0.57476854", "0.5676158", "0.5656669", "0.5632181", "0.56263584", "0.5562449", "0.5513773", "0.5426553", "0.5340881", "0.5316066", "0.5311186", "0.5300931", "0.5273324", "0.5272992", "0.5269844", "0.5256099", "0.5238528", "0.52383375", "0.5235345", "0.5235326", "0.51960075", "0.5180331", "0.5172836", "0.516214", "0.51581645", "0.515592", "0.51249063", "0.51207435", "0.51168585", "0.51128006", "0.51081795", "0.5076687", "0.5053183", "0.5046339", "0.5030157", "0.5011808", "0.50105304", "0.5003077", "0.49784133", "0.49732846", "0.49689162", "0.49689162", "0.49689162", "0.49689162", "0.49666315", "0.49626452", "0.49606958", "0.49525258", "0.49442536", "0.49429473", "0.493957", "0.49382377", "0.49313676", "0.4922037", "0.49136567", "0.49089944", "0.48955888", "0.4894468", "0.48918763", "0.4879893", "0.48710543", "0.4870976", "0.48671365", "0.4861995", "0.4860715", "0.48474306", "0.48458964", "0.4836766", "0.4834213", "0.48308626", "0.48266625", "0.4826374", "0.48252103", "0.4820059", "0.48161623", "0.48145038", "0.48129484", "0.48108637", "0.4809887", "0.48062333", "0.48052526", "0.47957554", "0.4791043", "0.47907603", "0.47902542", "0.47902542", "0.47792825", "0.4776474", "0.47759148", "0.47750878", "0.4774187", "0.47713855" ]
0.5604652
13
Returns an iterator of the data in this listing (in proper sequence), starting at the specified address. The specified address indicates the first Data that would be returned by an initial call to the next method. An initial call to the previous method would return the Data with an address less than the specified address.
public DataIterator getData(Address addr, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataIterator getDefinedData(Address addr, boolean forward);", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "public Data getDataBefore(Address addr);", "public IndexRecord getIteratorNext() {\n iter = (iter == next - 1 ? -1: iter + 1);\n return (iter == -1 ? null : data[iter]);\n }", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public DataIterator getCompositeData(Address start, boolean forward);", "public DataIterator getData(boolean forward);", "public Data getDataAfter(Address addr);", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "public IndexRecord getIteratorPrev() {\n iter = (iter == 0 ? -1 : iter - 1);\n return (iter == -1 ? null : data[iter]);\n }", "public Data getDataAt(Address addr);", "public T next()\n\t\t{\n\t\t\tif(hasNext())\n\t\t\t{\n\t\t\t\tT currentData = current.getData(); //the data that will be returned\n\t\t\t\t\n\t\t\t\t// must continue to keep track of the Node that is in front of\n\t\t\t\t// the current Node whose data is must being returned , in case\n\t\t\t\t// its nextNode must be reset to skip the Node whose data is\n\t\t\t\t// just being returned\n\t\t\t\tbeforePrevious = previous;\n\t\t\t\t\n\t\t\t\t// must continue keep track of the Node that is referencing the\n\t\t\t\t// data that was just returned in case the user wishes to remove()\n\t\t\t\t// the data that was just returned\n\t\t\t\t\n\t\t\t\tprevious = current; // get ready to point to the Node with the next data value\n\t\t\t\t\n\t\t\t\tcurrent = current.getNext(); // move to next Node in the chain, get ready to point to the next data item in the list\n\t\t\t\t\n\t\t\t\tthis.removeCalled = false;\n\t\t\t\t// it's now pointing to next value in the list which is not the one that may have been removed\n\t\t\t\t\n\t\t\t\treturn currentData;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\t}\n\t\t}", "public InstructionIterator getInstructions(Address addr, boolean forward);", "public ListIterator iterator()\n {\n return new ListIterator(firstLink);\n }", "public HL7DataTree next() {\n final int size = Util.size(this.list), i = this.next == null ? size : this.list.indexOf(this.next) + 1;\n final HL7DataTree curr = this.next;\n \n this.next = i == size ? more() : this.list.get(i);\n \n return curr;\n }", "@Override\r\n public T next() {\r\n if (hasNext()) {\r\n node = node.next();\r\n nextCalled = true;\r\n return node.getData();\r\n }\r\n else {\r\n throw new NoSuchElementException(\"Illegal call to next(); \"\r\n + \"iterator is after end of list.\");\r\n }\r\n }", "public Data nextData()\r\n\t\t{\r\n\t\t\treturn this.nextData;\r\n\t\t}", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "public AIter next() {\n int p;\n return (p = start + 1) < size ? new Iter(p) : null;\n }", "public Object next()\n/* */ {\n/* 84 */ if (this.m_offset < this.m_limit) {\n/* 85 */ return this.m_array[(this.m_offset++)];\n/* */ }\n/* 87 */ throw new NoSuchElementException();\n/* */ }", "public Record next() {\n if (hasNext()) {\n if (nextRecord != null) {\n Record out = nextRecord;\n nextRecord = null;\n return out;\n }\n }\n throw new NoSuchElementException();\n //throw new UnsupportedOperationException(\"hw3: TODO\");\n }", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public Object next()\n/* */ {\n/* 93 */ if (this.m_offset < this.m_array.length) {\n/* 94 */ Object localObject = this.m_array[this.m_offset];\n/* 95 */ advance();\n/* 96 */ return localObject;\n/* */ }\n/* 98 */ throw new NoSuchElementException();\n/* */ }", "public T next()\r\n { \r\n if (next == null)\r\n throw new NoSuchElementException(\"Attempt to\" +\r\n \" call next when there's no next element.\");\r\n\r\n prev = next;\r\n next = next.next;\r\n return prev.data;\r\n }", "@Override\n public Item next() {\n if(!hasNext()) throw new NoSuchElementException(\"Failed to perform next because hasNext returned false!\");\n Item item = current.data;\n current = current.next;\n return item;\n }", "@Test(expected = NoSuchElementException.class)\n public void testPrevious_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 5, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.previous();\n }", "public Iterator begin()\n\t{\n\t\treturn new LinkedListIterator(head); \n\t}", "public Z peek() {\n return mNext;\n }", "public int next() {\n\treturn _current < _last ? _data[_current++] : END;\n }", "public Data getDataContaining(Address addr);", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "public Data getDefinedDataBefore(Address addr);", "public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);", "public Iterator<T> iterator() {\r\n return new DLListIterator<T>();\r\n }", "@Nonnull\n public Optional<ENTITY> peekNext()\n {\n return hasNext() ? Optional.of(items.get(index + 1)) : Optional.empty();\n }", "public Item next() {\n\t\t\tif (!hasNext())\n\t\t\t\treturn null;\n lastAccessed = current;\n Item item = current.item;\n current = current.next; \n index++;\n return item;\n\t\t}", "public T next()\n {\n T data = current.item;\n current = current.next;\n return data;\n }", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Iterator<K> iterator()\n {\n\treturn new SkipListIterator<K>(this.head);\n }", "@Override\n public Iterator<T> iterator() {\n return new Iterator<T>(){\n private int ci = 0;\n \n /**\n * Checks if ArrayList has next element \n * @return \n */\n public boolean hasNext(){\n return ci < size;\n }\n \n /**\n * Returns next element and moves iterator forward\n * @return \n */\n public T next(){\n return (T)data[ci++];\n }\n \n /**\n * Does nothing\n */\n public void remove(){\n \n }\n };\n }", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "public Iterator iterator () {\n return new MyIterator (first);\n }", "public Item next() {\r\n if (!hasNext()) throw new NoSuchElementException();\r\n lastAccessed = current;\r\n Item item = current.item;\r\n current = current.next;\r\n index++;\r\n return item;\r\n }", "private E next() {\n\t\tif (hasNext()) {\n\t\t\tE temp = iterator.data;\n\t\t\titerator = iterator.next;\n\t\t\treturn temp;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public E next() {\r\n\r\n\t\tE result = null;\r\n\t\tif (hasNext()) {\r\n\t\t\tresult = links.get(counter);\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public interface RandomAccessIterator extends BidirectionalIterator\n {\n /**\n * Return the index of my current position.\n */\n public int index();\n\n /**\n * Return true if I'm before a specified iterator.\n * @param iterator The iterator to compare myself against.\n */\n public boolean less( RandomAccessIterator iterator );\n\n /**\n * Return a clone of myself.\n */\n public Object clone();\n }", "@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "public LinkedListIterator(){\n position = null;\n previous = null; \n isAfterNext = false;\n }", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "public LinkedListItr zeroth( )\n {\n return new LinkedListItr( header );\n }", "Iterator<TabularData> dataIterator();", "public Data getDefinedDataAfter(Address addr);", "public T next(){\n return (T)data[ci++];\n }", "public Iterator<Item> iterator(){\n return this.doublyLinkedList.iterator();\n }", "public IndexRecord getIterator() {\n return (iter == -1 ? null : data[iter]);\n}", "@Override\n public T next() {\n current = current.next;\n return current.data;\n }", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "IList<T> getNext();", "public T next(){\r\n return itrArr[position++];\r\n }", "@Override\r\n\tpublic T next() throws NoSuchElementException{\n\t\tif (hasNext()) {\r\n\t\t\tT curr = next.getData();\r\n\t\t\tnext = next.getNext();\r\n\t\t\treturn curr;\r\n\t\t}\r\n\t\telse throw new NoSuchElementException();\r\n\t\t\r\n\t}", "public final T next()\n {\n return skip(1);\n }", "@Override\n public Integer next() {\n if (!isPeeked && hasNext())\n return iterator.next();\n int toReturn = peekedElement;\n peekedElement = -1;\n isPeeked = false;\n return toReturn;\n }", "public Iterator<T> getPageElements();", "@Override\n public E next() {\n if (this.hasNext()) {\n curr = curr.nextNode;\n return curr.getData();\n }\n else {\n throw new NoSuchElementException();\n }\n }", "@Test\n public void testPrevious_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n Integer expResult = 2;\n Integer result = instance.previous();\n assertEquals(expResult, result);\n }", "public Iterator iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "public LinkedListIterator<AnyType> first() {\n return new LinkedListIterator<AnyType>(header.next);\n }", "@SuppressWarnings(\"unchecked\")\n\t\tpublic T next() throws NoSuchElementException {\n\t\t\ttry {\n//\t\t\t\tT object = (T)data[cursor * numCols + pinnedColumn];\n\t\t\t\tT object = get(cursor, pinnedColumn);\n\t\t\t\tlastRet = cursor++;\n\t\t\t\treturn object;\n\t\t\t} catch ( IndexOutOfBoundsException e ) {\n\t\t\t\tthrow new NoSuchElementException( \"You have iterated past the last element.\" + e.toString() );\n\t\t\t}\n\t\t}", "@Override\r\n\t\tpublic E next() {\n\t\t\tcaret = caret.next();\r\n\t\t\tif (caret == null)\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\tnextIndex++;\r\n\t\t\treturn caret.n.data[caret.idx];\r\n\t\t}", "public E next(){\r\n E data = node.getData();\r\n node = node.getNext();\r\n return data;\r\n }", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "@Override\n public T next() {\n T n = null;\n if (hasNext()) {\n // Give it to them.\n n = next;\n next = null;\n // Step forward.\n it = it.next;\n stop -= 1;\n } else {\n // Not there!!\n throw new NoSuchElementException();\n }\n return n;\n }", "@Test\n public void testIterator_Forward() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n int i = 0;\n while (instance.hasNext()) {\n assertEquals(baseList.get(i++), instance.next());\n }\n\n }", "@Override\n public Integer next() {\n if (next == null) {\n throw new NoSuchElementException();\n }\n Integer toReturn = next;\n next = null;\n if (peekingIterator.hasNext()) {\n next = peekingIterator.next();\n }\n return toReturn;\n }", "@Test\n public void testPreviousIndex_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n int expResult = -1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "public LinkedListIterator<AnyType> zeroth() {\n return new LinkedListIterator<AnyType>(header);\n }", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "public Integer nextOffset() {\n return this.nextOffset;\n }", "@Test\n public void testListIteratorHasNext(){\n DoubleLinkedList<Integer> list1 = new DoubleLinkedList<Integer>();\n ListIterator<Integer> list1It = list1.iterator();\n assertFalse(\"testing with no next element\", list1It.hasNext());\n list1It.add(1);\n list1It.previous();\n assertTrue(\"testing with a next element\", list1It.hasNext());\n assertEquals(new Integer(1), list1It.next());\n }", "@Override\n public Iterator<Pair<K, V>> iterator() {\n return new Iterator<Pair<K, V>>() {\n private int i = 0, j = -1;\n private boolean _hasNext = true;\n\n @Override\n public boolean hasNext() {\n return _hasNext;\n }\n\n @Override\n public Pair<K, V> next() {\n Pair<K, V> r = null;\n if (j >= 0) {\n List<Pair<K, V>> inl = l.get(i);\n r = inl.get(j++);\n if (j > inl.size())\n j = -1;\n }\n else {\n for (; i < l.size(); ++i) {\n List<Pair<K, V>> inl = l.get(i);\n if (inl == null)\n continue;\n r = inl.get(0);\n j = 1;\n }\n }\n if (r == null)\n _hasNext = false;\n return r;\n }\n };\n }", "public T next() {\n T temp = this.curr.next.getData();\n this.curr = this.curr.next;\n return temp;\n }", "public long getNextBlock(long address){\n int marker = readMarkerLowerBits(address - 1);\n int blocksize;\n if(marker == 0){\n blocksize = readLengthField(address, 1);\n return address + blocksize + 1;\n } else if(marker == 15){\n return address + 1;\n } else {\n if (isBlockUsed(address)) marker -= 8;\n blocksize = readLengthField(address, marker);\n if (isBlockUsed(address)) {\n return address + blocksize + 2 * (marker - 8) + 1;\n }\n return address + blocksize + 1;\n }\n }", "@Test\n public void testNext_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n Integer expResult = 1;\n Integer result = instance.next();\n assertEquals(expResult, result);\n }", "@Override\n\tpublic Item next() {\n\t\tindex = findNextElement();\n\n\t\tif (index == -1)\n\t\t\treturn null;\n\t\treturn items.get(index);\n\t}", "public LinkedListItr findPrevious( Object x )\n {\n ListNode itr = header;\n\n while( itr.next != null && !itr.next.element.equals( x ) )\n itr = itr.next;\n\n return new LinkedListItr( itr );\n }", "@Override\n public Integer next() {\n if (next != null) {\n Integer next = this.next;\n this.next = null;\n return next;\n\n }\n\n return iterator.next();\n }", "public Iterator<E> iterator() {\n\t\treturn new LinkedListItr();\r\n\t}", "public ListIterator iterator(){\n\t\treturn new ListIterator(tail.next);\n\t}", "@Override\n public Iterator<Long> iterator() {\n Collection<Long> c = new ArrayList<>();\n synchronized (data) {\n for (int i=0; i<data.length; i++)\n c.add(get(i));\n }\n return c.iterator();\n }", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "public java.util.List<DataEntry> findAll(int start, int end);", "@Override\n public Map.Entry<K, V> next() {\n if (iter.hasNext()) {\n \n lastItemReturned = iter.next();\n return lastItemReturned;\n } else {\n throw new NoSuchElementException();\n }\n }", "public void testNext() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertTrue(test1.getValue().inRange(0));\n test1.next();\n assertTrue(test1.getValue().inRange(1));\n test1.next();\n assertTrue(test1.getValue().inRange(2));\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n assertEquals(10, test1.currPos());\n }", "@SuppressWarnings(\"unchecked\")\n\t\tpublic T next() throws NoSuchElementException {\n\t\t\ttry {\n\t\t\t\tT object = (T)data[pinnedRow * numCols + cursor];\n\t\t\t\tlastRet = cursor++;\n\t\t\t\treturn object;\n\t\t\t} catch ( IndexOutOfBoundsException e ) {\n\t\t\t\tthrow new NoSuchElementException( \"You have iterated past the last element.\" + e.toString() );\n\t\t\t}\n\t\t}", "@Override\n protected Iterator<? extends Map<String, AttributeValue>> nextIterator(final int count) {\n if (count == 1) {\n return currentResult.getItems().iterator();\n }\n // subsequent chained iterators will be obtained from dynamoDB\n // pagination\n if ((currentResult.getLastEvaluatedKey() == null)\n || currentResult.getLastEvaluatedKey().isEmpty()) {\n return null;\n } else {\n request.setExclusiveStartKey(currentResult.getLastEvaluatedKey());\n currentResult = dynamoDBClient.query(request);\n return currentResult.getItems().iterator();\n }\n }", "@Override\r\n public BankAccount next() {\r\n \t//check if the list of the bank accounts is empty \r\n if(!hasNext())\r\n \tthrow new NoSuchElementException();\r\n //if the list is not empty remove the first link and return it \r\n else {\r\n \tcurrent = bankAccounts.get(0);\r\n \tbankAccounts.remove(0);\r\n \treturn current;\r\n }\r\n }", "Iterator<T> iterator(int start, int limit);", "@Test\n public void testNextIndex_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n int expResult = 0;\n int result = instance.nextIndex();\n\n assertEquals(expResult, result);\n }", "@Override\n public Iterator<Item> iterator() {\n return new HeadFirstIterator();\n }" ]
[ "0.6237496", "0.5997467", "0.5988458", "0.5913631", "0.590285", "0.58227164", "0.57898766", "0.57824653", "0.5729313", "0.56053776", "0.5577195", "0.5522517", "0.5505955", "0.5494432", "0.5446636", "0.54297787", "0.541214", "0.5405946", "0.538908", "0.53534216", "0.53248286", "0.5316541", "0.53041524", "0.53037244", "0.52803344", "0.52786016", "0.52383685", "0.52284867", "0.5223274", "0.52174413", "0.5207414", "0.51983255", "0.51927716", "0.5168942", "0.51645213", "0.5163065", "0.5146848", "0.51362765", "0.5109616", "0.51078194", "0.5097812", "0.5097078", "0.50928307", "0.5086666", "0.5069594", "0.5054317", "0.50490195", "0.5048473", "0.5042079", "0.5037372", "0.5033727", "0.5031522", "0.50297195", "0.5025842", "0.5025434", "0.5023415", "0.50204974", "0.5017599", "0.50084066", "0.49982685", "0.49907288", "0.49897227", "0.49863398", "0.49854666", "0.49799094", "0.49770626", "0.4976054", "0.49745893", "0.49712098", "0.49681774", "0.49643397", "0.49614364", "0.4958702", "0.49565813", "0.49557254", "0.49451023", "0.49413034", "0.49346083", "0.49222454", "0.491937", "0.49180594", "0.49173963", "0.49151334", "0.49128824", "0.49108994", "0.49074858", "0.4901617", "0.49013177", "0.4897471", "0.48923331", "0.48916146", "0.48912942", "0.48906213", "0.488947", "0.48893443", "0.48860058", "0.48854172", "0.48780006", "0.48741955", "0.48730597" ]
0.70049536
0
Get an iterator over the address range(s). Only data whose start addresses are contained in the given address set will be returned by the iterator.
public DataIterator getData(AddressSetView addrSet, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public Set<T> getRanges();", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "public Set<String> zrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public AddressSetView getAddressSet() {\n\t\treturn new AddressSet(baseAddress, getEndAddress());\n\t}", "public abstract ucar.array.RangeIterator getRangeIterator();", "public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new NullPointerException();\n TreeSet<Point2D> inRangeSet = new TreeSet<>();\n for (Point2D point : pointSet) {\n if (rect.contains(point)) {\n inRangeSet.add(point);\n }\n }\n return inRangeSet;\n }", "public static AddressSetView getAddressSet(AddressFactory factory, Address start,\n\t\t\tboolean forward) {\n\t\tAddressSet all = factory.getAddressSet();\n\t\tif (forward) {\n\t\t\tAddress max = all.getMaxAddress();\n\t\t\treturn factory.getAddressSet(start, max);\n\t\t}\n\t\tAddress min = all.getMinAddress();\n\t\treturn factory.getAddressSet(min, start);\n\t}", "@Override\r\n\tpublic Iterator<GIS_layer> iterator() {\n\t\treturn set.iterator();\r\n\t}", "public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);", "public java.util.List<DataEntry> findAll(int start, int end);", "@Override\n public Iterator<Range> iterator() {\n return iterator(defaultValueMapper);\n }", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "private AddressSet getMappedIntersection(MemoryBlock mappedBlock, AddressSet set) {\n\t\tAddressSet mappedIntersection = new AddressSet();\n\t\tList<MemoryBlockSourceInfo> sourceInfos = mappedBlock.getSourceInfos();\n\t\t// mapped blocks can only ever have one sourceInfo\n\t\tMemoryBlockSourceInfo info = sourceInfos.get(0);\n\t\tAddressRange range = info.getMappedRange().get();\n\t\tAddressSet resolvedIntersection = set.intersect(new AddressSet(range));\n\t\tfor (AddressRange resolvedRange : resolvedIntersection) {\n\t\t\tAddressRange mappedRange = getMappedRange(mappedBlock, resolvedRange);\n\t\t\tif (mappedRange != null) {\n\t\t\t\tmappedIntersection.add(mappedRange);\n\t\t\t}\n\t\t}\n\t\treturn mappedIntersection;\n\t}", "public InstructionIterator getInstructions(Address addr, boolean forward);", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "public Iterable<Point2D> range(RectHV rect) {\n ArrayList<Point2D> returnArray = new ArrayList<Point2D>();\n if (rect == null) {\n throw new IllegalArgumentException(\"rect input is null\");\n }\n for (Point2D i : pointsSet) {\n if (rect.contains(i))\n returnArray.add(i);\n }\n return returnArray;\n }", "public Iterable<Point2D> range(RectHV rect) {\n\n if (rect == null)\n throw new IllegalArgumentException(\"Got null object in range()\");\n \n Queue<Point2D> pointsInside = new Queue<>();\n \n for (Point2D p : point2DSET) {\n \n double x = p.x();\n double y = p.y();\n if (x >= rect.xmin() && x <= rect.xmax() &&\n y >= rect.ymin() && y <= rect.ymax())\n pointsInside.enqueue(p);\n \n }\n \n return pointsInside;\n }", "public SetOfRanges() {\n RangeSet = new Vector();\n }", "public Iterator<Range> iterator(ValueMapper mapper) {\n return new Trie2Iterator(mapper);\n }", "public DataIterator getDefinedData(Address addr, boolean forward);", "public Set<Tuple> zrangeWithScores(final String key, final long start, final long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrangeWithScores(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "@Override\n public CloseableIterator<KVPair> getRange(byte[] minKey, byte[] maxKey, boolean reverse) {\n Preconditions.checkState(!this.closed.get(), \"transaction closed\");\n return new XodusIter(this.store.openCursor(this.tx), minKey, maxKey, reverse);\n }", "@Override\n public Iterator<Set<E>> iterator() {\n return new DisjointSetIterator(theSet);\n }", "private List<Integer> allIntegerInRange(int start, int end) {\n\t\tList<Integer> range = new ArrayList<Integer>();\n\n\t\tfor (int i = start; i <= end; i++) {\n\t\t\trange.add(i);\n\t\t}\n\n\t\treturn range;\n\t}", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) {\n throw new IllegalArgumentException();\n }\n SET<Point2D> result = new SET<Point2D>();\n for (Point2D point : points) {\n if (rect.contains(point))\n result.add(point);\n }\n return result;\n }", "public IntIterator intIterator(final int start, final int end) {\n\t\treturn new BufferedRangeEWAHintIterator(this, start, end);\n\t}", "public Iterator<GPoint> iterator() {\n\t\treturn points.iterator();\n\t}", "public AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly,\n\t\t\tTaskMonitor monitor) throws CancelledException;", "public Iterable<Point2D> range(RectHV rect) {\n SET<Point2D> point_list = new SET<Point2D>();\n rangesearch(root, rect, point_list);\n return point_list;\n }", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "public boolean allInRange(int start, int end) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tint a=data[i];\n \t\t\tif ((a<start)||(a>=end)) return false;\n \t\t}\n \t\treturn true;\n \t}", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfUsedFor(UByte lowerInclusive, UByte upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.USED_FOR, lowerInclusive, upperInclusive);\n }", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new IllegalArgumentException(\n \"Null pointer provided instead of a query rectangle\");\n ptsInside = new SET<Point2D>();\n searchForPoints(root, rect);\n return ptsInside;\n }", "@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}", "public Iterator iterator()\n {\n return new HashSetIterator();\n }", "public HashSet<Edge> rangeQuery(MBR mbr) {\r\n\t\tthrow new UnsupportedOperationException();\r\n\t}", "abstract public Iterator<BlockReportReplica> iterator();", "protected abstract Iterable<E> getIntersecting(D lower, D upper);", "Set<MacAddress> neighbors();", "@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new SetIterator();\n }", "public Iterator<T> iterator() {\n return new SetIterator<T>(this.head);\n }", "private void getNextInSet() throws CancelledException {\n\t\t// find next address that has a valid block;\n\t\tAddress addr = getNextAddress(nextAddr);\n\n\t\t// if the instruction's start address is in our set\n\t\t// then we have our block\n\t\tif (addr != null && addrSet.contains(addr)) {\n\t\t\tnextBlock = model.getCodeBlockAt(addr, monitor);\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// otherwise we're out of our current address range in\n\t\t// our address range set so we find the next address range\n\t\t// with a min address >= the instructions address and\n\t\t// look for a block there\n\t\t//nextAddr = instr.getMaxAddress();\n\t\twhile (rangeIter.hasNext()) {\n\t\t\tAddressRange range = rangeIter.next();\n\n\t\t\tif (nextAddr.compareTo(range.getMinAddress()) >= 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnextBlock = getFirstInRange(range);\n\t\t\t// if we find a block we're done\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if we find no block then there's no block in the\n\t\t\t// current range and we can move on to the next one\n\t\t}\n\t\tnextBlock = null;\n\t}", "public List<Address> getAddresses()\n\t{\n\t\treturn getAddresses( getSession().getSessionContext() );\n\t}", "public Set<String> zrevrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrevrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "List<MemoryBlockDB> getBlocks(Address start, Address end) {\n\t\tList<MemoryBlockDB> list = new ArrayList<>();\n\n\t\tList<MemoryBlockDB> tmpBlocks = blocks;\n\t\tint index = Collections.binarySearch(tmpBlocks, start, BLOCK_ADDRESS_COMPARATOR);\n\t\tif (index < 0) {\n\t\t\tindex = -index - 2;\n\t\t}\n\t\tif (index >= 0) {\n\t\t\tMemoryBlockDB block = tmpBlocks.get(index);\n\t\t\tif (block.contains(start)) {\n\t\t\t\tlist.add(block);\n\t\t\t}\n\t\t}\n\n\t\twhile (++index < tmpBlocks.size()) {\n\t\t\tMemoryBlockDB block = tmpBlocks.get(index);\n\t\t\tif (block.getStart().compareTo(end) > 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlist.add(block);\n\t\t}\n\n\t\treturn list;\n\t}", "Set<URI> fetchAllUris(ServicePath service);", "AllUsersAddresses getAllUsersAddresses();", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfSource(String lowerInclusive, String upperInclusive) {\n return fetchRange(Income.INCOME.SOURCE, lowerInclusive, upperInclusive);\n }", "public List<com.ims.dataAccess.tables.pojos.User> fetchRangeOfStreetname(String lowerInclusive, String upperInclusive) {\n return fetchRange(User.USER.STREETNAME, lowerInclusive, upperInclusive);\n }", "protected Iterator getNominationsSet() \n {\n return this.nominations.iterator();\n }", "Iterator<T> iterator();", "public DataIterator getCompositeData(Address start, boolean forward);", "Iterator<T> iterator(int start, int limit);", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfId(ULong lowerInclusive, ULong upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.ID, lowerInclusive, upperInclusive);\n }", "public Iterator reachable() {\n Set s = SortedArraySet.FACTORY.makeSet(HashCodeComparator.INSTANCE);\n s.add(IdentityHashCodeWrapper.create(this));\n this.reachable(s);\n return new FilterIterator(s.iterator(), filter);\n }", "public DataIterator getData(Address addr, boolean forward);", "public java.util.List<DataEntry> findByDataSetId(\n\t\tlong dataSetId, int start, int end);", "public AddressInfo getRange() {\r\n return range;\r\n }", "public <T> List<T> zrange(String key, long start, long end, Class<T> clazz) {\n List<T> result = new ArrayList<T>();\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n Set<byte[]> tempSet = jedis.zrange(key.getBytes(), start, end);\n if (tempSet != null && tempSet.size() > 0) {\n for (byte[] value : tempSet) {\n // result.add((T) HessianSerializer.deserialize(value));\n result.add(fromJsonByteArray(value, clazz));\n }\n return result;\n }\n return null;\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public Iterable<Point2D> range(RectHV rect) {\n //rect\n Queue<Point2D> range = new Queue<Point2D>();\n \n for (Point2D p: bst.keys()) {\n if (rect.contains(p)) {\n range.enqueue(p);\n }\n }\n return range; \n }", "public Map<Range, List<EndPoint>> getRangeToEndpointMap()\n {\n return ssProxy.getRangeToEndPointMap();\n }", "public List<Range> getRanges() {\n // Lazy initialization with double-check.\n List<Range> r = this.ranges;\n if (r == null) {\n synchronized (this) {\n r = this.ranges;\n if (r == null) {\n this.ranges = r = new CopyOnWriteArrayList<Range>();\n }\n }\n }\n return r;\n }", "public List<String> lrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.lrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfState(UByte lowerInclusive, UByte upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.STATE, lowerInclusive, upperInclusive);\n }", "public Set<AddressEntry> getEntry() {\n return entrySet;\n }", "protected Iterator<Cell> getCellIterator(ColumnFamily container)\n {\n return container.iterator();\n }", "public Iterator<V> get(final K key, final int startIndex, final int endIndex) {\n throwIfNullKey(key);\n if (startIndex < 0) {\n throw new IndexOutOfBoundsException(\"negative indices are not supported\");\n }\n if (startIndex > endIndex) {\n throw new IndexOutOfBoundsException(\"start index exceeds end index\");\n }\n final int count = getCount(key);\n if (count < endIndex) {\n throw new IndexOutOfBoundsException(\"end index \" + endIndex + \" requested but there \"\n + (count == 1 ? \"is\" : \"are\") + \" \" + count + \" \" + (count == 1 ? \"entry\" : \"entries\"));\n }\n return new FCOneToManyRelationIterator<>(associationMap, key, startIndex, endIndex);\n }", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "private static EntityIterator getEntityIterator(Schematic schematic, Location location) {\n var iterator = new EntityIterator();\n\n var world = location.getWorld();\n var offset = new Vector3i(location.getBlockX(), location.getBlockY(), location.getBlockZ());\n offset.sub(schematic.getOrigin());\n\n var min = schematic.getMinimumPoint().add(offset, new Vector3i());\n var max = schematic.getMaximumPoint().add(offset, new Vector3i());\n\n for (var entity : world.getEntities()) {\n var eLoc = entity.getLocation();\n if (isInBounds(eLoc, min, max))\n iterator.addEntity(entity);\n }\n\n return iterator;\n }", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfId(UUID lowerInclusive, UUID upperInclusive) {\n return fetchRange(Income.INCOME.ID, lowerInclusive, upperInclusive);\n }", "BooleanIterator iterator(int startIndex);", "public Iterable<Point2D> range(RectHV rect) {\n SET<Point2D> result = new SET<Point2D>();\n if (root == null) {\n return result;\n }\n\n range(root, rect, result);\n return result;\n }", "public java.util.List<DataEntry> findByCopiedFrom(\n\t\tlong copiedFrom, int start, int end);", "public Iterator<Integer> fromA() {return this.fromA.iterator();}", "public abstract Collection<IRelation> getStartingRelations(String elementUri);", "public Iterator<T> getIterator();", "public abstract java.util.Set getLocations();", "public Collection<Address> getAddressCollection(){\r\n\t\treturn addressCollection;\r\n\t}", "public static List <Index> rangeOf(int start, int end) {\r\n FastTable <Index> list = FastTable.newInstance();\r\n for (int i=start; i < end; i++) {\r\n list.add(Index.valueOf(i));\r\n }\r\n return list;\r\n }", "public List<Address> getAllAddresses() throws BackendException;", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfEmailId(ULong lowerInclusive, ULong upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.EMAIL_ID, lowerInclusive, upperInclusive);\n }", "List<Account> findByAddressStartingWith(String startAddress);", "private Iterator getEntries(){\r\n\t\tSet entries = items.entrySet();\r\n\t\treturn entries.iterator();\r\n\t}", "@Override\n public Iterator<Integer> iterator() {\n return new Iterator<>() {\n int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < Set.this.count;\n }\n\n @Override\n public Integer next() {\n return Set.this.arr[i++];\n }\n };\n }", "public static Iterator <Gate> iterator() {\n return allGates.iterator();\n }", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }", "@Override\n public Iterator<Long> iterator() {\n Collection<Long> c = new ArrayList<>();\n synchronized (data) {\n for (int i=0; i<data.length; i++)\n c.add(get(i));\n }\n return c.iterator();\n }", "public Iterable<Point2D> range(RectHV rect) \n\t {\n\t\t if(rect==null)\n\t\t\t throw new java.lang.NullPointerException();\n\t\t LinkedQueue<Point2D> insidePoints = new LinkedQueue<Point2D>();\n\t\t range(root,rect.xmin(),rect.ymin(),rect.xmax(),rect.ymax(),insidePoints,true);\n\t\t return insidePoints;\n\t }", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public T iterator();", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfUserId(ULong lowerInclusive, ULong upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.USER_ID, lowerInclusive, upperInclusive);\n }", "public Iterable<Point2D> range(RectHV rect) {\n TreeSet<Point2D> ret = new TreeSet<Point2D>();\n for (Point2D p: mPoints) {\n if (rect.contains(p)) {\n ret.add(p);\n }\n }\n return ret;\n }", "public Iterator getBindings() {\r\n\t\treturn bindings == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(bindings.values());\r\n\t}" ]
[ "0.61326396", "0.61208326", "0.61017424", "0.6039343", "0.57747465", "0.570726", "0.567721", "0.5611015", "0.55599695", "0.5535301", "0.5472614", "0.54545933", "0.54343325", "0.54319906", "0.5426227", "0.5295463", "0.52807647", "0.522705", "0.5208125", "0.51532316", "0.5149632", "0.514071", "0.51221967", "0.51177335", "0.50988734", "0.50405407", "0.50291634", "0.5020612", "0.502045", "0.50086933", "0.49906543", "0.49801388", "0.49688384", "0.4956417", "0.4954513", "0.49522445", "0.49396715", "0.49300206", "0.49269417", "0.49103564", "0.49091527", "0.49091277", "0.49039847", "0.49020866", "0.49000826", "0.48984787", "0.48954248", "0.4886562", "0.4875238", "0.48544574", "0.48527163", "0.4845508", "0.48436686", "0.4840437", "0.48312837", "0.482187", "0.4817031", "0.48002428", "0.48000464", "0.47972503", "0.4790405", "0.4789831", "0.4787681", "0.47839108", "0.47799382", "0.47714743", "0.475331", "0.4746272", "0.47402588", "0.47382662", "0.47376984", "0.4734812", "0.47197172", "0.47189865", "0.47150272", "0.47121245", "0.4709948", "0.47057196", "0.4703556", "0.4703146", "0.46908876", "0.4689674", "0.46848783", "0.46722412", "0.46722412", "0.46722412", "0.46722412", "0.46689734", "0.46561337", "0.46533945", "0.46471685", "0.46409726", "0.46372306", "0.46320146", "0.46236786", "0.46168798", "0.46133304", "0.46112463", "0.46097177", "0.46068537" ]
0.5871461
4
get the Data (defined) object that starts at the given address. If no Data object is defined at that address, then return null.
public Data getDefinedDataAt(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data getDefinedDataContaining(Address addr);", "public Data getDataAt(Address addr);", "public Data getDefinedDataBefore(Address addr);", "public Data getDefinedDataAfter(Address addr);", "public Data getDataContaining(Address addr);", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Data getUndefinedDataAt(Address addr);", "public Data getDataBefore(Address addr);", "public Data getDataAfter(Address addr);", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "public DataIterator getDefinedData(Address addr, boolean forward);", "public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);", "Optional<MemoryAddress> lookup(String name);", "public DataIterator getData(Address addr, boolean forward);", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "public org.xmlsoap.schemas.wsdl.soap.TAddress getAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().find_element_user(ADDRESS$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public byte get(int addr) {\n return data[addr - start];\n }", "AddressI getAddress();", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "public NodeDB.NodeInfo getNodeByInetAddress(InetAddress a) { synchronized (this.nodedb) {\n\t\tfor (NodeInfo ni : this.nodedb.values()) {\n\t\t\tif (ni.nodecomms.getAddress().equals(a))\n\t\t\t\treturn ni;\n\t\t}\n\t\treturn null;\n\t}}", "@Override\n\tpublic Address getAddress() {\n\t\treturn (Address)map.get(ADDRESS);\n\t}", "@Override\n public Pointer addressPointer() {\n val tempPtr = new PagedPointer(ptrDataBuffer.primaryBuffer());\n\n switch (this.type) {\n case DOUBLE: return tempPtr.asDoublePointer();\n case FLOAT: return tempPtr.asFloatPointer();\n case UINT16:\n case SHORT:\n case BFLOAT16:\n case HALF: return tempPtr.asShortPointer();\n case UINT32:\n case INT: return tempPtr.asIntPointer();\n case UBYTE:\n case BYTE: return tempPtr.asBytePointer();\n case UINT64:\n case LONG: return tempPtr.asLongPointer();\n case BOOL: return tempPtr.asBoolPointer();\n default: return tempPtr.asBytePointer();\n }\n }", "@Generated(hash = 489389972)\n public Address getAddress() {\n Long __key = this.addressId;\n if (address__resolvedKey == null || !address__resolvedKey.equals(__key)) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n AddressDao targetDao = daoSession.getAddressDao();\n Address addressNew = targetDao.load(__key);\n synchronized (this) {\n address = addressNew;\n address__resolvedKey = __key;\n }\n }\n return address;\n }", "Object firstData() {\n\t\t// por defecto enviamos null\n\t\treturn null;\n\t}", "public java.lang.String getAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ADDRESS$2);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public E getData(int pos) {\n\t\tif (pos >= 0 && pos < dataSize()) {\n\t\t\treturn data.get(pos);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "private LogData getDefaultLogData(long address) {\n ByteBuf b = Unpooled.buffer();\n Serializers.CORFU.serialize(PAYLOAD_DATA.getBytes(), b);\n LogData ld = new LogData(DataType.DATA, b);\n ld.setGlobalAddress(address);\n ld.setEpoch(1L);\n return ld;\n }", "public byte[] searchReturnData(short addressInDataBlock) {\n //take initial and size binary from memory\n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //if 0 no have data\n if (initial == 0 && sizeData == 0) {\n return null;\n }\n\n //return data\n byte[] toReturn = new byte[sizeData];\n \n int j = 0;\n for (short i = initial; i < initial + sizeData; i++) {\n toReturn[j] = serialize[i];\n j++;\n }\n\n return toReturn;\n }", "protected byte direct_read(int address) {\n return segment_data[address];\n }", "public Address getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }", "public synchronized MonitoringDevice getByIpAddress(String ipAddress)\n\t{\n\t\tlogger.debug(\"serach by ipaddress:\" + ipAddress);\n\t\tInteger id = this.indexByIpAddress.get(ipAddress);\n\t\tif (id != null)\n\t\t\treturn (MonitoringDevice) super.getObject(id);\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}", "long getAddress(ByteBuffer buffer);", "DataElement getFromCache(String dataElementName);", "public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }", "private LogData readEntry(FileHandle fh, long address)\n throws IOException {\n ByteBuffer o = fh.getMapForRegion(64, (int) fh.getChannel().size());\n while (o.hasRemaining()) {\n short magic = o.getShort();\n if (magic != 0x4C45) {\n return null;\n }\n short flags = o.getShort();\n long addr = o.getLong();\n if (address == -1) {\n //Todo(Maithem) : maybe we can move this to getChannelForAddress\n fh.knownAddresses.add(addr);\n }\n int size = o.getInt();\n if (addr != address) {\n o.position(o.position() + size - 16); //skip over (size-20 is what we haven't read).\n log.trace(\"Read address {}, not match {}, skipping. (remain={})\", addr, address, o.remaining());\n } else {\n log.debug(\"Entry at {} hit, reading (size={}).\", address, size);\n if (flags % 2 == 0) {\n log.error(\"Read a log entry but the write was torn, aborting!\");\n throw new IOException(\"Torn write detected!\");\n }\n int metadataMapSize = o.getInt();\n ByteBuf mBuf = Unpooled.wrappedBuffer(o.slice());\n o.position(o.position() + metadataMapSize);\n ByteBuffer dBuf = o.slice();\n dBuf.limit(size - metadataMapSize - 24);\n return new LogData(Unpooled.wrappedBuffer(dBuf),\n ICorfuPayload.enumMapFromBuffer(mBuf, IMetadata.LogUnitMetadataType.class, Object.class));\n }\n }\n return null;\n }", "public Address getValue() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "public Variable getVariableContaining(int offset);", "public Address getAddressById(long addressid) {\n\t\treturn addressdao.findOne(addressid);\r\n\t}", "public Instruction getInstructionContaining(Address addr);", "public synchronized ILogData handleRetrieval(long address) {\n LogData entry = streamLog.read(address);\n log.trace(\"Retrieved[{} : {}]\", address, entry);\n return entry;\n }", "public ByteBuffer read(long address)\n {\n return tryRead(address, null);\n }", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "public java.lang.String getAddress() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.lang.String) __getCache(\"address\")));\n }", "public InetSocketAddress getAddress ( ) {\n\t\treturn extract ( handle -> handle.getAddress ( ) );\n\t}", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "public byte get(int addr) throws ProgramException {\n return getSegment(addr, true).get(addr);\n }", "public static Sensor getSensor(String name, String address) {\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tif (mSensors.get(x).mName.equals(name)) {\n\t\t\t\tif (mSensors.get(x).mAddress.equals(address))\n\t\t\t\t\treturn mSensors.get(x);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address, boolean withSum) {\n return getAddressData(address.toString(), withSum);\n }", "public AccountInterface getAccount(String _address) {\n\t\tfor (AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(_address))\n\t\t\t\treturn account;\n\t\t}\n\t\treturn null;\t\t\n\t}", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "@Override\n public Account get(final Address address) {\n BonsaiLayeredWorldState currentLayer = this;\n while (currentLayer != null) {\n final Optional<StateTrieAccountValue> maybeStateTrieAccount =\n currentLayer.trieLog.getAccount(address);\n final Optional<StateTrieAccountValue> maybePriorStateTrieAccount =\n currentLayer.trieLog.getPriorAccount(address);\n if (currentLayer == this && maybeStateTrieAccount.isPresent()) {\n return new BonsaiAccount(\n BonsaiLayeredWorldState.this, address, maybeStateTrieAccount.get(), false);\n } else if (maybePriorStateTrieAccount.isPresent()) {\n return new BonsaiAccount(\n BonsaiLayeredWorldState.this, address, maybePriorStateTrieAccount.get(), false);\n } else if (maybeStateTrieAccount.isPresent()) {\n return null;\n }\n if (currentLayer.getNextWorldView().isEmpty()) {\n currentLayer = null;\n } else if (currentLayer.getNextWorldView().get() instanceof BonsaiLayeredWorldState) {\n currentLayer = (BonsaiLayeredWorldState) currentLayer.getNextWorldView().get();\n } else {\n return currentLayer.getNextWorldView().get().get(address);\n }\n }\n return null;\n }", "public NodeRef getDataNode(String ip) {\r\n\t\treturn nodeMap.get(ip);\r\n\t}", "public Address searchByName(String name) {\n if (name == null || !addressBook.containsKey(name))\n throw new NullPointerException();\n return addressBook.get(name);\n }", "public String getAddress() {\n return definition.getString(ADDRESS);\n }", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "public Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;", "String getStartAddress();", "public T peek()\n {\n if (isEmpty())\n return null;\n \n return first.getData();\n }", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "public String getAddress() {\n return (this.addresses == null) ? null\n : (this.addresses.isEmpty() ? null : this.addresses.get(0));\n }", "public T getEntry(int givenPosition);", "public byte get(int address) {\n try {\n return direct_read(address);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }", "public HDAddressDescription findAddress(Address addr) {\n HDAddressDescription retval = null;\n for (HDAccount acct : mAccounts) {\n retval = acct.findAddress(addr);\n if (retval != null)\n return retval;\n }\n return retval;\n }", "@Override\n\tpublic GeoEntity get(final InetAddress inetAddress) {\n\t\tPreConditions.checkNull(inetAddress, \"inetAddress must not be null\");\n\t\tGeoEntity result = null;\n\t\tif(inetAddress instanceof Inet4Address){\n\t\t\tfinal Integer startIpNum = InetAddresses.coerceToInteger(inetAddress);\n\n\t\t\treturn IPV4_REPOSITORY.floorEntry(startIpNum) == null ? null\n\t\t\t\t\t: IPV4_REPOSITORY.floorEntry(startIpNum).getValue() ;\n\t\t}\n\t\telse{\n\t\t\tfinal BigInteger startIpBigInt = IPUtils.ipv6ToBigInteger(inetAddress);\n\t\t\treturn IPV6_REPOSITORY.floorEntry(startIpBigInt) == null ? null\n\t\t\t\t\t: IPV6_REPOSITORY.floorEntry(startIpBigInt).getValue();\n\n\t\t}\n\t}", "public synchronized MonitoringDevice getByMacAddress(String macAddress)\n\t{\n\t\tInteger id = this.indexByMac.get(macAddress);\n\t\tif (id != null)\n\t\t\treturn (MonitoringDevice) super.getObject(id);\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}", "public synchronized Object peek()\n throws EmptyStackException\n {\n if (empty())\n {\n throw new EmptyStackException();\n }\n\n return dataList.get(0);\n }", "public org.apache.xmlbeans.XmlString xgetAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ADDRESS$2);\n return target;\n }\n }", "public E peekFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\treturn mHead.next.data;\n\t}", "public SelectMapedBufferResult getData(final long offset) {\n return this.getData(offset, (0 == offset ? true : false));\n }", "public CodeUnit getCodeUnitContaining(Address addr);", "DataTypeInstance getDataInstance();", "public int getAddress() {\n return mAddress;\n }", "private Segment getSegment(int addr, boolean get) throws ProgramException {\n Set<Segment> found = memory.get(addr);\n if (found.isEmpty()) {\n throw new ProgramException(get ? ErrorType.ADDRL : ErrorType.ADDRS);\n }\n return found.iterator().next();\n }", "public Address getAddress(double latitude, double longitude)\n {\n Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(context, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(latitude,longitude, 1); // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n return addresses.get(0);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n\n }", "public int getAddress() {\n return address;\n }", "public NodeD find(Object data){\n if (this.isEmpty()){\n return null;\n }else{\n if (this.head.getObject()==data){\n return this.head;\n }else{\n NodeD tmp = this.head.getNext();\n\n while(tmp!=null){\n if (tmp.getObject()==data){\n return tmp;\n }\n tmp = tmp.getNext();\n }\n return null;\n }\n }\n }", "@Nullable\r\n\t@Transactional (readOnly = true, propagation = Propagation.SUPPORTS)\r\n\t@Override\r\n\tpublic BuildingAddress readWithHierarchy(@NotNull Stub<BuildingAddress> addressStub) {\r\n\t\tList<BuildingAddress> addresses = buildingsDao.findWithFullHierarchy(addressStub.getId());\r\n\t\treturn addresses.isEmpty() ? null : addresses.get(0);\r\n\t}", "Object getData();", "Object getData();", "private Geo getGeoForAddress(String address) {\n Address addr = daDataStandartization.cleanAddress(address);\n Geo geo = new Geo();\n geo.setLatitude(addr.getGeoLat());\n geo.setLongitude(addr.getGeoLon());\n return geo;\n }", "com.google.protobuf.ByteString getAddressBytes();", "public static String readDiskMemory(String address){\n\t\treturn memory.get(address);\n\t}", "public T getData() {\n return this.first;\n }", "public double getElementFromFirst(int channel, int position, int DataPointer){\n\t\t\tint index = datapointer + position;\r\n\t\t\tif(index >= this.datalen) index -= this.datalen;\r\n\r\n\t\t\treturn databuffer[channel][index];\r\n\t\t}", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "public abstract byte[] readData(int address, int length);", "public Address getAddress(){\n\t\treturn address;\n\t}", "@Override\r\n\t\tpublic boolean getDO(int address) throws IOServiceException {\n\t\t\treturn false;\r\n\t\t}", "public T getData(int index){\n if(index < 0 || index >= data.size())\n return null;\n\n //give back the data\n return data.get(index);\n }", "public Object getFirst()\n {\n if(first == null){\n throw new NoSuchElementException();}\n \n \n \n return first.data;\n }" ]
[ "0.7339281", "0.7053993", "0.7042519", "0.69814324", "0.69793767", "0.6923883", "0.68196094", "0.67969584", "0.6501607", "0.60158765", "0.5994002", "0.58820254", "0.58140576", "0.57035536", "0.5577975", "0.5533416", "0.5522333", "0.5480089", "0.54292053", "0.537829", "0.5363705", "0.534694", "0.53185827", "0.52165395", "0.51927686", "0.5187889", "0.5163038", "0.5145033", "0.51348394", "0.5114264", "0.51015973", "0.508402", "0.50815696", "0.50627244", "0.5040841", "0.50306994", "0.50201637", "0.49908873", "0.49870062", "0.49848697", "0.49761224", "0.49639595", "0.49518257", "0.49457017", "0.49455324", "0.4930209", "0.49184582", "0.49154893", "0.491256", "0.49061465", "0.49024817", "0.48963827", "0.48850703", "0.48642114", "0.48613983", "0.48522547", "0.48478067", "0.4840688", "0.48388368", "0.48367906", "0.48330858", "0.48319474", "0.48313722", "0.48310664", "0.48256785", "0.48233235", "0.48221046", "0.48175207", "0.48137516", "0.48093006", "0.4802806", "0.47984853", "0.4797861", "0.4772218", "0.47697476", "0.4764783", "0.47483557", "0.47463346", "0.47404975", "0.47345716", "0.47294706", "0.47252926", "0.47238922", "0.47238922", "0.47183716", "0.47165722", "0.47122055", "0.47102237", "0.47054404", "0.4694861", "0.4694861", "0.4694861", "0.4694861", "0.4694861", "0.4694861", "0.46925935", "0.468947", "0.4681432", "0.46750173", "0.46749806" ]
0.72878087
1
get the Data object that starts at the given address. If no Data objects have been defined that contain that address, then return null.
public Data getDefinedDataContaining(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data getDataContaining(Address addr);", "public Data getDataBefore(Address addr);", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Data getDefinedDataBefore(Address addr);", "public Data getDataAt(Address addr);", "public Data getDefinedDataAt(Address addr);", "public Data getDefinedDataAfter(Address addr);", "public Data getDataAfter(Address addr);", "public Data getUndefinedDataAt(Address addr);", "public DataIterator getDefinedData(Address addr, boolean forward);", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "public Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);", "public DataIterator getData(Address addr, boolean forward);", "Optional<MemoryAddress> lookup(String name);", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "public byte[] searchReturnData(short addressInDataBlock) {\n //take initial and size binary from memory\n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //if 0 no have data\n if (initial == 0 && sizeData == 0) {\n return null;\n }\n\n //return data\n byte[] toReturn = new byte[sizeData];\n \n int j = 0;\n for (short i = initial; i < initial + sizeData; i++) {\n toReturn[j] = serialize[i];\n j++;\n }\n\n return toReturn;\n }", "public NodeDB.NodeInfo getNodeByInetAddress(InetAddress a) { synchronized (this.nodedb) {\n\t\tfor (NodeInfo ni : this.nodedb.values()) {\n\t\t\tif (ni.nodecomms.getAddress().equals(a))\n\t\t\t\treturn ni;\n\t\t}\n\t\treturn null;\n\t}}", "public byte get(int addr) {\n return data[addr - start];\n }", "public HDAddressDescription findAddress(Address addr) {\n HDAddressDescription retval = null;\n for (HDAccount acct : mAccounts) {\n retval = acct.findAddress(addr);\n if (retval != null)\n return retval;\n }\n return retval;\n }", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "public AccountInterface getAccount(String _address) {\n\t\tfor (AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(_address))\n\t\t\t\treturn account;\n\t\t}\n\t\treturn null;\t\t\n\t}", "public org.xmlsoap.schemas.wsdl.soap.TAddress getAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().find_element_user(ADDRESS$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public Instruction getInstructionContaining(Address addr);", "public Address searchByName(String name) {\n if (name == null || !addressBook.containsKey(name))\n throw new NullPointerException();\n return addressBook.get(name);\n }", "public static Sensor getSensor(String name, String address) {\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tif (mSensors.get(x).mName.equals(name)) {\n\t\t\t\tif (mSensors.get(x).mAddress.equals(address))\n\t\t\t\t\treturn mSensors.get(x);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "String getStartAddress();", "public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }", "private Place getFromPlace(Element passageElement, ArrayList<Place> places) {\n Place start = null;\n for (int i = 0; i <= places.size() - 1; i++) {\n if (passageElement.getElementsByTagName(\"comeFrom\").item(0).getTextContent()\n .equals(places.get(i).getName())) {\n start = places.get(i);\n }\n }\n return start;\n }", "AddressI getAddress();", "SimpleString getPrefix(SimpleString address);", "public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }", "public synchronized MonitoringDevice getByIpAddress(String ipAddress)\n\t{\n\t\tlogger.debug(\"serach by ipaddress:\" + ipAddress);\n\t\tInteger id = this.indexByIpAddress.get(ipAddress);\n\t\tif (id != null)\n\t\t\treturn (MonitoringDevice) super.getObject(id);\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}", "private LogData readEntry(FileHandle fh, long address)\n throws IOException {\n ByteBuffer o = fh.getMapForRegion(64, (int) fh.getChannel().size());\n while (o.hasRemaining()) {\n short magic = o.getShort();\n if (magic != 0x4C45) {\n return null;\n }\n short flags = o.getShort();\n long addr = o.getLong();\n if (address == -1) {\n //Todo(Maithem) : maybe we can move this to getChannelForAddress\n fh.knownAddresses.add(addr);\n }\n int size = o.getInt();\n if (addr != address) {\n o.position(o.position() + size - 16); //skip over (size-20 is what we haven't read).\n log.trace(\"Read address {}, not match {}, skipping. (remain={})\", addr, address, o.remaining());\n } else {\n log.debug(\"Entry at {} hit, reading (size={}).\", address, size);\n if (flags % 2 == 0) {\n log.error(\"Read a log entry but the write was torn, aborting!\");\n throw new IOException(\"Torn write detected!\");\n }\n int metadataMapSize = o.getInt();\n ByteBuf mBuf = Unpooled.wrappedBuffer(o.slice());\n o.position(o.position() + metadataMapSize);\n ByteBuffer dBuf = o.slice();\n dBuf.limit(size - metadataMapSize - 24);\n return new LogData(Unpooled.wrappedBuffer(dBuf),\n ICorfuPayload.enumMapFromBuffer(mBuf, IMetadata.LogUnitMetadataType.class, Object.class));\n }\n }\n return null;\n }", "@Override\n\tpublic Address getAddress() {\n\t\treturn (Address)map.get(ADDRESS);\n\t}", "@Override\n public Account get(final Address address) {\n BonsaiLayeredWorldState currentLayer = this;\n while (currentLayer != null) {\n final Optional<StateTrieAccountValue> maybeStateTrieAccount =\n currentLayer.trieLog.getAccount(address);\n final Optional<StateTrieAccountValue> maybePriorStateTrieAccount =\n currentLayer.trieLog.getPriorAccount(address);\n if (currentLayer == this && maybeStateTrieAccount.isPresent()) {\n return new BonsaiAccount(\n BonsaiLayeredWorldState.this, address, maybeStateTrieAccount.get(), false);\n } else if (maybePriorStateTrieAccount.isPresent()) {\n return new BonsaiAccount(\n BonsaiLayeredWorldState.this, address, maybePriorStateTrieAccount.get(), false);\n } else if (maybeStateTrieAccount.isPresent()) {\n return null;\n }\n if (currentLayer.getNextWorldView().isEmpty()) {\n currentLayer = null;\n } else if (currentLayer.getNextWorldView().get() instanceof BonsaiLayeredWorldState) {\n currentLayer = (BonsaiLayeredWorldState) currentLayer.getNextWorldView().get();\n } else {\n return currentLayer.getNextWorldView().get().get(address);\n }\n }\n return null;\n }", "Object firstData() {\n\t\t// por defecto enviamos null\n\t\treturn null;\n\t}", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address, boolean withSum) {\n return getAddressData(address.toString(), withSum);\n }", "public synchronized ILogData handleRetrieval(long address) {\n LogData entry = streamLog.read(address);\n log.trace(\"Retrieved[{} : {}]\", address, entry);\n return entry;\n }", "private Segment getSegment(int addr, boolean get) throws ProgramException {\n Set<Segment> found = memory.get(addr);\n if (found.isEmpty()) {\n throw new ProgramException(get ? ErrorType.ADDRL : ErrorType.ADDRS);\n }\n return found.iterator().next();\n }", "long getAddress(ByteBuffer buffer);", "@Override\n\tpublic GeoEntity get(final InetAddress inetAddress) {\n\t\tPreConditions.checkNull(inetAddress, \"inetAddress must not be null\");\n\t\tGeoEntity result = null;\n\t\tif(inetAddress instanceof Inet4Address){\n\t\t\tfinal Integer startIpNum = InetAddresses.coerceToInteger(inetAddress);\n\n\t\t\treturn IPV4_REPOSITORY.floorEntry(startIpNum) == null ? null\n\t\t\t\t\t: IPV4_REPOSITORY.floorEntry(startIpNum).getValue() ;\n\t\t}\n\t\telse{\n\t\t\tfinal BigInteger startIpBigInt = IPUtils.ipv6ToBigInteger(inetAddress);\n\t\t\treturn IPV6_REPOSITORY.floorEntry(startIpBigInt) == null ? null\n\t\t\t\t\t: IPV6_REPOSITORY.floorEntry(startIpBigInt).getValue();\n\n\t\t}\n\t}", "public java.lang.String getAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ADDRESS$2);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "@SuppressWarnings(\"PointlessArithmeticExpression\")\n static int getDataFirstRecord(final int territoryNumber) {\n return INDEX[territoryNumber + POS_INDEX_FIRST_RECORD];\n }", "public String getAddress() {\n return (this.addresses == null) ? null\n : (this.addresses.isEmpty() ? null : this.addresses.get(0));\n }", "public CodeUnit getCodeUnitContaining(Address addr);", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "public Variable getVariableContaining(int offset);", "@NotNull\r\n\t@Transactional (readOnly = true, propagation = Propagation.SUPPORTS)\r\n\t@Override\r\n\tpublic BuildingAddress findFirstAddress(@NotNull Stub<Building> buildingStub) throws FlexPayException {\r\n\r\n\t\tList<BuildingAddress> addresses = buildingsDao.findBuildingBuildings(buildingStub.getId());\r\n\t\tif (addresses.isEmpty()) {\r\n\t\t\tthrow new FlexPayException(\"Building #\" + buildingStub.getId() + \" doesn't have any addresses\");\r\n\t\t}\r\n\t\treturn addresses.get(0);\r\n\t}", "public T getEntry(int givenPosition);", "protected byte direct_read(int address) {\n return segment_data[address];\n }", "public Object getFirst()\n {\n if(first == null){\n throw new NoSuchElementException();}\n \n \n \n return first.data;\n }", "public Address getAddress(double latitude, double longitude)\n {\n Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(context, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(latitude,longitude, 1); // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n return addresses.get(0);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n\n }", "public Address getAddressById(long addressid) {\n\t\treturn addressdao.findOne(addressid);\r\n\t}", "public Address getPrimaryContactParsed();", "@Nullable\r\n\t@Transactional (readOnly = true, propagation = Propagation.SUPPORTS)\r\n\t@Override\r\n\tpublic BuildingAddress readWithHierarchy(@NotNull Stub<BuildingAddress> addressStub) {\r\n\t\tList<BuildingAddress> addresses = buildingsDao.findWithFullHierarchy(addressStub.getId());\r\n\t\treturn addresses.isEmpty() ? null : addresses.get(0);\r\n\t}", "public T getMatch(T data){\r\n\t\tif (data == null)\r\n\t\t\tthrow new IllegalArgumentException(\"data cannot be null\"); \r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\tArrayNode<T> temp = beginMarker.next;\r\n\t\t\r\n\t\t//same as contains (below), except returns pointer, not boolean\r\n\t\twhile (temp != endMarker){\r\n\t\t\tif (temp.getLast().compareTo(data) < 0){\r\n\t\t\t\ttemp = temp.next;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tfor (int i=0; i< temp.getArraySize();i++){\r\n\t\t\t\t\tif (temp.get(i).equals(data))\r\n\t\t\t\t\t\treturn temp.get(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public E peekFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\treturn mHead.next.data;\n\t}", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public com.apatar.cdyne.ws.demographix.PlaceInfo getPlaceIDbyAddress(java.lang.String addressLine1, java.lang.String city, java.lang.String stateAbbrev, java.lang.String zipCode, java.lang.String licenseKey) throws java.rmi.RemoteException;", "public T get(String name, int start) {\n\t\tint sz = size();\n\t\tfor (int i = start; i < sz; i++) {\n\t\t\tString n = getName(i);\n\t\t\tif (name == null) {\n\t\t\t\tif (n == null)\n\t\t\t\t\treturn getVal(i);\n\t\t\t} else if (name.equals(n)) {\n\t\t\t\treturn getVal(i);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Generated(hash = 489389972)\n public Address getAddress() {\n Long __key = this.addressId;\n if (address__resolvedKey == null || !address__resolvedKey.equals(__key)) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n AddressDao targetDao = daoSession.getAddressDao();\n Address addressNew = targetDao.load(__key);\n synchronized (this) {\n address = addressNew;\n address__resolvedKey = __key;\n }\n }\n return address;\n }", "private Geo getGeoForAddress(String address) {\n Address addr = daDataStandartization.cleanAddress(address);\n Geo geo = new Geo();\n geo.setLatitude(addr.getGeoLat());\n geo.setLongitude(addr.getGeoLon());\n return geo;\n }", "List<AccountDetail> findAllByAddressStartingWith(String address);", "public ByteBuffer read(long address)\n {\n return tryRead(address, null);\n }", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "public Address getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "public InetSocketAddress getAddress ( ) {\n\t\treturn extract ( handle -> handle.getAddress ( ) );\n\t}", "public SelectMapedBufferResult getData(final long offset) {\n return this.getData(offset, (0 == offset ? true : false));\n }", "Position<T> first();", "public T peek()\n {\n if (isEmpty())\n return null;\n \n return first.getData();\n }", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "public synchronized MonitoringDevice getByMacAddress(String macAddress)\n\t{\n\t\tInteger id = this.indexByMac.get(macAddress);\n\t\tif (id != null)\n\t\t\treturn (MonitoringDevice) super.getObject(id);\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}", "public Optional<T> getFirstItem() {\n return getData().stream().findFirst();\n }", "private LogData getDefaultLogData(long address) {\n ByteBuf b = Unpooled.buffer();\n Serializers.CORFU.serialize(PAYLOAD_DATA.getBytes(), b);\n LogData ld = new LogData(DataType.DATA, b);\n ld.setGlobalAddress(address);\n ld.setEpoch(1L);\n return ld;\n }", "public Address getStartAddress() {\n\t\treturn baseAddress;\n\t}", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "public EmployeeInfo searchFromTable(int employeeNum){\r\n \r\n int targetBucket = calcBucket(employeeNum);\r\n \r\n\t\tfor(int i = 0 ; i < buckets[targetBucket].size(); i++) {\r\n\t\t\tif (buckets[targetBucket].get(i).getEmpNum() == employeeNum) {\r\n EmployeeInfo locatedEmployee = buckets[targetBucket].get(i);\r\n return locatedEmployee;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n \r\n }", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "DataElement getFromCache(String dataElementName);", "public Account getAccount(byte[] address) {\n String addressAsHex = SHA3Util.digestToHex(address);\n Account account = accounts.get(addressAsHex);\n if (account == null) {\n account = createAccount(address);\n accounts.put(addressAsHex, account);\n }\n return account;\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(String address, boolean withSum) {\n return getInstantService().balance(address, withSum ? 1 : 0);\n }", "public java.lang.String getAddress() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.lang.String) __getCache(\"address\")));\n }", "public byte get(int addr) throws ProgramException {\n return getSegment(addr, true).get(addr);\n }", "public E getData(int pos) {\n\t\tif (pos >= 0 && pos < dataSize()) {\n\t\t\treturn data.get(pos);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "public org.apache.xmlbeans.XmlString xgetAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ADDRESS$2);\n return target;\n }\n }", "public AnyType getFront() {\n\t\tif (empty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn header.next.data;\n\t\t// Running time is θ(1) because it's a constant operation.\n\t}", "public List<Latlng_data> getLocationFromString(String address)\n {\n\n List<Latlng_data> Ldata = new ArrayList<Latlng_data>();\n\n try\n {\n String URL = \"http://maps.google.com/maps/api/geocode/json?address=\" + URLEncoder.encode(address, \"UTF-8\") + \"&en&sensor=false\";\n\n JSONObject jsonObject = new JSONObject(new WebServiceHelper().performGetCall(URL));\n\n JSONArray results = jsonObject.getJSONArray(\"results\");\n\n Latlng_data l;\n for (int j = 0; j < results.length(); j++)\n {\n\n l = new Latlng_data();\n\n double lng = results.getJSONObject(j).getJSONObject(\"geometry\").getJSONObject(\"location\").getDouble(\"lng\");\n\n double lat = results.getJSONObject(j).getJSONObject(\"geometry\").getJSONObject(\"location\").getDouble(\"lat\");\n String addrsssssName = results.getJSONObject(j).getString(\"formatted_address\");\n l.setAddress(addrsssssName != null ? addrsssssName : \"\");\n\n l.setLat(lng);\n l.setLng(lat);\n\n Ldata.add(l);\n }\n\n }\n catch (Exception e)\n {\n return Ldata;\n }\n catch (Error e)\n {\n return Ldata;\n }\n\n return Ldata;\n }", "public NodeD find(Object data){\n if (this.isEmpty()){\n return null;\n }else{\n if (this.head.getObject()==data){\n return this.head;\n }else{\n NodeD tmp = this.head.getNext();\n\n while(tmp!=null){\n if (tmp.getObject()==data){\n return tmp;\n }\n tmp = tmp.getNext();\n }\n return null;\n }\n }\n }", "public GJPoint2D firstPoint() {\n\t\tif (this.segments.isEmpty()) \n\t\t\treturn null;\n\t\treturn this.segments.get(0).controlPoints()[0];\n\t}", "public com.apatar.cdyne.ws.demographix.SummaryInformation getLocationInformationByAddress(java.lang.String addressLine1, java.lang.String city, java.lang.String stateAbbrev, java.lang.String zipCode, java.lang.String licenseKey) throws java.rmi.RemoteException;", "private GlobeAccessPointRecord findNearestGAP(InetAddress srcAddr)\n {\n GlobeAccessPointRecord nearestGAPrec;\n FloatCoordinate coords = null;\n\n // look in our GAP lookup cache. It looks like IE5 ignores our\n // Expires: header so we might really need this for performance \n // reasons.\n synchronized(GlobeRedirector.ip2GAPCache) {\n nearestGAPrec =\n (GlobeAccessPointRecord) GlobeRedirector.ip2GAPCache.get(srcAddr);\n }\n\n /*\n * Return the GAP record if it is in the cache.\n */\n if (nearestGAPrec != null) {\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"(cached) Nearest GAP is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n return nearestGAPrec;\n }\n\n /*\n * There is no {srcAddr, nearest GAP record} pair in the cache. We need\n * the geographical coordinates associated with srcAddr to determine\n * the nearest GAP.\n */\n\n if (_cookieCoords != null) { // client cookie contains coordinates\n coords = _cookieCoords;\n }\n else {\n coords = getCoordinates(srcAddr);\n\n if (coords == null) {\n return null;\n }\n }\n\n /*\n * Calculate which GAP is nearest.\n */\n int i, dist, min = Integer.MAX_VALUE;\n CoordinateImpl srcCoords = new CoordinateImpl((int)coords.lat,\n (int)coords.longi);\n\n for (i = 0; i < _gapList.size(); i++) {\n GlobeAccessPointRecord gaprec = _gapList.get(i);\n dist = gaprec.coords.computeDistance(srcCoords);\n\n if (dist < min) {\n nearestGAPrec = gaprec;\n min = dist;\n }\n }\n\n // Cache the result.\n synchronized(GlobeRedirector.ip2GAPCache) {\n GlobeRedirector.ip2GAPCache.put(srcAddr, nearestGAPrec);\n }\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Nearest GAP of \" + srcAddr.getHostAddress()\n + \" at (\" + (int)coords.lat + \",\" + (int)coords.longi\n + \") is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n\n _cookieCoords = coords;\n return nearestGAPrec;\n }", "public byte get(int address) {\n try {\n return direct_read(address);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }", "kr.pik.message.Profile.ProfileMessage.ContactAddress getContactAddress(int index);", "List<Account> findByAddressStartingWith(String startAddress);" ]
[ "0.7206651", "0.6894514", "0.68231523", "0.68084055", "0.668409", "0.6648045", "0.65530324", "0.63946503", "0.63708055", "0.58154726", "0.5802512", "0.57808053", "0.5748462", "0.5633711", "0.5629626", "0.55521476", "0.55171114", "0.5447701", "0.54440176", "0.5422311", "0.5395174", "0.52996504", "0.5195861", "0.5146456", "0.51313794", "0.5126432", "0.51185685", "0.5102963", "0.5081122", "0.50577337", "0.5039858", "0.50209457", "0.5018257", "0.50178534", "0.49984902", "0.49954587", "0.49930272", "0.49810928", "0.49773288", "0.4971564", "0.49698687", "0.49520633", "0.49225467", "0.4922523", "0.49221638", "0.4906591", "0.48992136", "0.48979208", "0.48959848", "0.4893064", "0.48889664", "0.48862365", "0.4879292", "0.48727435", "0.48599395", "0.48463607", "0.48233342", "0.48221835", "0.482178", "0.48127759", "0.47987416", "0.47973394", "0.47952572", "0.4791673", "0.47907865", "0.47802436", "0.47647783", "0.47627378", "0.47604305", "0.47535533", "0.4746277", "0.47427854", "0.47407794", "0.4730787", "0.47279134", "0.4724797", "0.47227818", "0.4720038", "0.46981722", "0.46972483", "0.4696665", "0.4696444", "0.46925357", "0.4684669", "0.4684339", "0.46834412", "0.4675634", "0.46714902", "0.46714458", "0.46671635", "0.46638677", "0.46554124", "0.4653051", "0.46518937", "0.46496242", "0.46417525", "0.46386027", "0.4635135", "0.46336955", "0.463312" ]
0.7158034
1
get the defined Data object that starts at an address that is greater than the given address.
public Data getDefinedDataAfter(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data getDataBefore(Address addr);", "public Data getDataAfter(Address addr);", "public Data getDefinedDataBefore(Address addr);", "public Data getDataContaining(Address addr);", "public Data getDefinedDataContaining(Address addr);", "public Data getDefinedDataAt(Address addr);", "public Data getDataAt(Address addr);", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public byte get(int addr) {\n return data[addr - start];\n }", "public Data getUndefinedDataAt(Address addr);", "public DataIterator getDefinedData(Address addr, boolean forward);", "default AddressRange range(Address address, long length) {\n\t\ttry {\n\t\t\treturn new AddressRangeImpl(address, length);\n\t\t}\n\t\tcatch (AddressOverflowException e) {\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}", "long getAddress(ByteBuffer buffer);", "public DataIterator getData(Address addr, boolean forward);", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public byte get(int address) {\n try {\n return direct_read(address);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }", "public byte[] searchReturnData(short addressInDataBlock) {\n //take initial and size binary from memory\n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //if 0 no have data\n if (initial == 0 && sizeData == 0) {\n return null;\n }\n\n //return data\n byte[] toReturn = new byte[sizeData];\n \n int j = 0;\n for (short i = initial; i < initial + sizeData; i++) {\n toReturn[j] = serialize[i];\n j++;\n }\n\n return toReturn;\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }", "Optional<MemoryAddress> lookup(String name);", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(String address, boolean withSum) {\n return getInstantService().balance(address, withSum ? 1 : 0);\n }", "public abstract byte[] readData(int address, int length);", "public AddressInfo getRange() {\r\n return range;\r\n }", "public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}", "protected byte direct_read(int address) {\n return segment_data[address];\n }", "public ByteBuffer read(long address)\n {\n return tryRead(address, null);\n }", "public int getLowerBound ();", "public int getReturnAddressOffset();", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address, boolean withSum) {\n return getAddressData(address.toString(), withSum);\n }", "public static int offset_addr() {\n return (0 / 8);\n }", "protected RecordHeader getRecordAt(long targetFp) throws IOException {\n for (RecordHeader next : getMemIndex().values()) {\n if (targetFp >= next.dataPointer &&\n targetFp < next.dataPointer + (long)next.dataCapacity) {\n return next;\n }\n }\n return null;\n }", "public Criteria andAddressGreaterThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"address > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "private int[] findPointer() {\n \n int initialAux = 4095;\n int header = 0;\n \n \n for (int i = 0; i < 4096; i++) {\n String initialBinary = Integer.toBinaryString(0xFF & serialize[i * 4]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[i * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n \n if (initial == 0 && sizeData == 0) {\n header = i*4;\n break;\n }\n //get the higher initial \n if (initialAux > initial){\n initialAux = initial;\n }\n \n }\n\n int[] toReturn = new int[2];\n \n toReturn[0] = header;\n toReturn[1] = initialAux-1;\n \n return toReturn;\n }", "AddressI getAddress();", "TrackingToken lowerBound();", "public long getNextBlock(long address){\n int marker = readMarkerLowerBits(address - 1);\n int blocksize;\n if(marker == 0){\n blocksize = readLengthField(address, 1);\n return address + blocksize + 1;\n } else if(marker == 15){\n return address + 1;\n } else {\n if (isBlockUsed(address)) marker -= 8;\n blocksize = readLengthField(address, marker);\n if (isBlockUsed(address)) {\n return address + blocksize + 2 * (marker - 8) + 1;\n }\n return address + blocksize + 1;\n }\n }", "public static int getMin(ArrayList<QuoteShort> data, int begin, int end) {\n\t\tint min = 999999999;\r\n\t\tint minIndex = -1;\r\n\t\tif (begin<=0) begin = 0;\r\n\t\tfor (int i=begin;i<=end;i++){\r\n\t\t\tif (data.get(i).getHigh5()<=min){\r\n\t\t\t\tmin = data.get(i).getLow5();\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn minIndex;\r\n\t}", "private List<T> findRange(RequestData requestData) {\n javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();\n cq.select(cq.from(getEntityClass()));\n javax.persistence.Query q = getEntityManager().createQuery(cq);\n q.setMaxResults(requestData.getLength());\n q.setFirstResult(requestData.getStart());\n return q.getResultList();\n }", "public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }", "public long getAddress() {\n return origin + originOffset;\n }", "public Integer getOffset();", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "static int memory_address_hl(){\n\t\tint hl_address = hexa_to_deci(registers.get('H')+registers.get('L'));\n\t\treturn hl_address;\n\t}", "public Address getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "private int loadData() {\n if (position >= numRecords * 2)\n return -1;\n int bufferPos = 0;\n int capacity = byteBuffer.capacity();\n while (bufferPos < capacity && position < numRecords * 2) {\n long curRecordAddress = sortedArray.get(position);\n int recordLen = Platform.getInt(null, curRecordAddress);\n // length + keyprefix + record length\n int length = Integer.BYTES + Long.BYTES + recordLen;\n if (length > capacity) {\n logger.error(\"single record size exceeds PMem read buffer. Please increase buffer size.\");\n }\n if (bufferPos + length <= capacity) {\n long curKeyPrefix = sortedArray.get(position + 1);\n if (length > bytes.length) {\n bytes = new byte[length];\n }\n Platform.putLong(bytes, Platform.BYTE_ARRAY_OFFSET, curKeyPrefix);\n Platform.copyMemory(null, curRecordAddress, bytes, Platform.BYTE_ARRAY_OFFSET + Long.BYTES, length - Long.BYTES);\n byteBuffer.put(bytes, 0, length);\n bufferPos += length;\n position += 2;\n } else {\n break;\n }\n }\n return bufferPos;\n }", "public node_data heapMinimum(){return _a[0];}", "public int getAddress() {\n return address;\n }", "int getOffset();", "int getOffset();", "int getOffset();", "public int getLowerBound() {\r\n return lowerBound;\r\n }", "public long memoryAddress()\r\n/* 143: */ {\r\n/* 144:172 */ throw new UnsupportedOperationException();\r\n/* 145: */ }", "public static int lowerBound(int[] arr, int data) {\n int ans = -1, low = 0, high = arr.length - 1;\n while (low <= high) {\n int mid = (low + high) / 2;\n if (arr[mid] == data) {\n ans = mid;\n high = mid - 1;\n } else if (data < arr[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return ans;\n }", "public int relativePosTo(long addr) {\n\t\t\tif(addr < this.start)\n\t\t\t\treturn -1;\n\t\t\tif(addr > this.end)\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "long getFrom();", "public T getEntry(int givenPosition);", "public int getAddress() {\n return mAddress;\n }", "double getOffset();", "public Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);", "Offset createOffset();", "private int findBlock(long addr) {\n\t\t// find cache by splitting addr into multiple segs\n\t\tint setIndex = (int) ((addr & 0x7FC0) >>> 6);\n\t\tlong tag = (addr & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t// search for the set to check for existence\n\t\tfor (int j = 0; j < 8; j++) {\n\t\t\tif (cache[setIndex][j] == tag) {\n\t\t\t\tpolicies[setIndex].updateAt(j);\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t}\n\t\tif(usePrefetch){\n\t\t\t//fetch from memory; preftecher will fetch many other relevant addresses\n\t\t\tArrayList<Long> address = pf.getPrefetchedAddress(addr);\n\t\t\tfor(long add : address) {\n\t\t\t\tsetIndex = (int) ((add & 0x7FC0) >>> 6);\n\t\t\t\ttag = (add & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\t\tcache[setIndex][index] = tag;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\tcache[setIndex][index] = tag;\n\t\t}\n\t\t// after all, we need to update the entry\n\t\treturn 4;\n\t}", "private WALPointer tailPointer(WALPointer from) throws IgniteCheckedException {\n WALIterator it = cctx.wal().replay(from);\n\n try {\n while (it.hasNextX()) {\n IgniteBiTuple<WALPointer, WALRecord> rec = it.nextX();\n\n if (rec == null)\n break;\n }\n }\n finally {\n it.close();\n }\n\n return it.lastRead().map(WALPointer::next).orElse(null);\n }", "private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }", "public Variable getVariableContaining(int offset);", "Double getOffset();", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "@Override\n public Pointer addressPointer() {\n val tempPtr = new PagedPointer(ptrDataBuffer.primaryBuffer());\n\n switch (this.type) {\n case DOUBLE: return tempPtr.asDoublePointer();\n case FLOAT: return tempPtr.asFloatPointer();\n case UINT16:\n case SHORT:\n case BFLOAT16:\n case HALF: return tempPtr.asShortPointer();\n case UINT32:\n case INT: return tempPtr.asIntPointer();\n case UBYTE:\n case BYTE: return tempPtr.asBytePointer();\n case UINT64:\n case LONG: return tempPtr.asLongPointer();\n case BOOL: return tempPtr.asBoolPointer();\n default: return tempPtr.asBytePointer();\n }\n }", "public Instruction getInstructionContaining(Address addr);", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "private LogData getDefaultLogData(long address) {\n ByteBuf b = Unpooled.buffer();\n Serializers.CORFU.serialize(PAYLOAD_DATA.getBytes(), b);\n LogData ld = new LogData(DataType.DATA, b);\n ld.setGlobalAddress(address);\n ld.setEpoch(1L);\n return ld;\n }", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "public Instruction getInstructionAfter(Address addr);", "public Function getFunctionContaining(Address addr);", "public RTWLocation firstN(int n);", "public int getAddress()\n {\n return address;\n }", "private GlobeAccessPointRecord findNearestGAP(InetAddress srcAddr)\n {\n GlobeAccessPointRecord nearestGAPrec;\n FloatCoordinate coords = null;\n\n // look in our GAP lookup cache. It looks like IE5 ignores our\n // Expires: header so we might really need this for performance \n // reasons.\n synchronized(GlobeRedirector.ip2GAPCache) {\n nearestGAPrec =\n (GlobeAccessPointRecord) GlobeRedirector.ip2GAPCache.get(srcAddr);\n }\n\n /*\n * Return the GAP record if it is in the cache.\n */\n if (nearestGAPrec != null) {\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"(cached) Nearest GAP is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n return nearestGAPrec;\n }\n\n /*\n * There is no {srcAddr, nearest GAP record} pair in the cache. We need\n * the geographical coordinates associated with srcAddr to determine\n * the nearest GAP.\n */\n\n if (_cookieCoords != null) { // client cookie contains coordinates\n coords = _cookieCoords;\n }\n else {\n coords = getCoordinates(srcAddr);\n\n if (coords == null) {\n return null;\n }\n }\n\n /*\n * Calculate which GAP is nearest.\n */\n int i, dist, min = Integer.MAX_VALUE;\n CoordinateImpl srcCoords = new CoordinateImpl((int)coords.lat,\n (int)coords.longi);\n\n for (i = 0; i < _gapList.size(); i++) {\n GlobeAccessPointRecord gaprec = _gapList.get(i);\n dist = gaprec.coords.computeDistance(srcCoords);\n\n if (dist < min) {\n nearestGAPrec = gaprec;\n min = dist;\n }\n }\n\n // Cache the result.\n synchronized(GlobeRedirector.ip2GAPCache) {\n GlobeRedirector.ip2GAPCache.put(srcAddr, nearestGAPrec);\n }\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Nearest GAP of \" + srcAddr.getHostAddress()\n + \" at (\" + (int)coords.lat + \",\" + (int)coords.longi\n + \") is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n\n _cookieCoords = coords;\n return nearestGAPrec;\n }", "public abstract List<T> findWithOffsetFromPosition(int from, int amount);", "public Instruction getInstructionBefore(Address addr);", "public Block allocateAt(long p) {\n for (Block b : freeSpace) {\n if (b.start == p)\n return checkout(b, b.length);\n }\n return null;\n }", "public Address getEndAddress() {\n\t\treturn baseAddress.getNewAddress(baseAddress.getOffset() + maxOffset);\n\t}", "private int binarySearchToFindClosest(String overflowName, int bottomRecord, int topRecord) {\n // Base condition for only having two records left to choose from\n if (topRecord - bottomRecord == 1) {\n String topRecordName = getRecordCompanyName(\"normal\", topRecord);\n\n // If the name of the overflow company comes after the company name of the top record, then the top record is the closest\n if (overflowName.compareTo(topRecordName) >= 1) {\n return topRecord;\n // Otherwise, either the top and bottom records are equal length away, or the bottom record is closer, so return the bottom record\n } else {\n return bottomRecord;\n }\n // Base condition for having only 1 record left means that that record is the closest\n } else if (topRecord == bottomRecord) {\n return topRecord;\n }\n\n int middle = (topRecord + bottomRecord) / 2;\n String nameOfNormalRecord = getRecordCompanyName(\"normal\", middle);\n int alphabeticalOrder = overflowName.compareTo(nameOfNormalRecord);\n if (alphabeticalOrder == 0) {\n return middle;\n } else if (alphabeticalOrder < 0) {\n return binarySearchToFindClosest(overflowName, bottomRecord, middle);\n } else {\n return binarySearchToFindClosest(overflowName, middle + 1, topRecord);\n } \n }", "public NodeDB.NodeInfo getNodeByInetAddress(InetAddress a) { synchronized (this.nodedb) {\n\t\tfor (NodeInfo ni : this.nodedb.values()) {\n\t\t\tif (ni.nodecomms.getAddress().equals(a))\n\t\t\t\treturn ni;\n\t\t}\n\t\treturn null;\n\t}}", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "com.google.protobuf.ByteString getQueryAddress();", "public Criteria andAddressGreaterThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"address >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "@Override\n\tpublic Address getAddress() {\n\t\treturn (Address)map.get(ADDRESS);\n\t}", "public CodeUnit getCodeUnitBefore(Address addr);", "public long getLongFromMemory(long number){\n\t\tif (number % 8L != 0L){\n\t\t\tSystem.out.println(\"Wrong number for access in memory\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tlong l1 = 0L;\n\t\ttry{\n\t\t\tint i = memory[((int)number / 4)];\n\t\t\tint j = memory[(((int)number + 4) / 4)];\n\t\t\tlong l3 = i;\n\t\t\tl3 &= 0xFFFFFFFFL; //bitwise AND with FFFFFFFF long\n\t\t\tlong l2 = j; \n\t\t\tl2 <<= 32;\t\t//shift 32 bits to left\n\t\t\tl1 = l2 | l3; \t//bitwise OR to get the result\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t\treturn l1;\n\t}", "public CodeUnit getDefinedCodeUnitBefore(Address addr);" ]
[ "0.69287556", "0.69230837", "0.66572714", "0.64548165", "0.63962114", "0.6303641", "0.62728107", "0.5609019", "0.559871", "0.54273134", "0.54058295", "0.5298324", "0.5180971", "0.5097101", "0.5067309", "0.50533295", "0.5050003", "0.50482297", "0.49888876", "0.49472442", "0.482649", "0.4778694", "0.47716686", "0.47686625", "0.4765862", "0.47645143", "0.47501093", "0.47405675", "0.4737383", "0.47246814", "0.4719923", "0.4705876", "0.46843514", "0.4681434", "0.46747816", "0.4674722", "0.46686822", "0.4662607", "0.46538156", "0.46471095", "0.46240824", "0.4608735", "0.46019593", "0.46015334", "0.45810416", "0.45780578", "0.45770684", "0.45722586", "0.45647654", "0.45587158", "0.45570982", "0.45494184", "0.45438838", "0.45349663", "0.45262614", "0.45244452", "0.45216453", "0.45216453", "0.45216453", "0.4517789", "0.45122933", "0.45102835", "0.44693452", "0.44674066", "0.44637892", "0.44612226", "0.44535977", "0.44534415", "0.44529948", "0.44467568", "0.44451267", "0.4445043", "0.44429135", "0.4439334", "0.44344288", "0.4434387", "0.44329938", "0.4432843", "0.44305766", "0.4430424", "0.44183892", "0.44152725", "0.4410975", "0.44078323", "0.44038546", "0.43992558", "0.4398126", "0.43937716", "0.43903393", "0.43790802", "0.4374354", "0.4370468", "0.43526062", "0.43494037", "0.43430582", "0.43369085", "0.4320567", "0.4312911", "0.43078756", "0.43062" ]
0.6697307
2
get the closest defined Data object that starts at an address that is less than the given address.
public Data getDefinedDataBefore(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data getDataBefore(Address addr);", "public Data getDataAfter(Address addr);", "private int binarySearchToFindClosest(String overflowName, int bottomRecord, int topRecord) {\n // Base condition for only having two records left to choose from\n if (topRecord - bottomRecord == 1) {\n String topRecordName = getRecordCompanyName(\"normal\", topRecord);\n\n // If the name of the overflow company comes after the company name of the top record, then the top record is the closest\n if (overflowName.compareTo(topRecordName) >= 1) {\n return topRecord;\n // Otherwise, either the top and bottom records are equal length away, or the bottom record is closer, so return the bottom record\n } else {\n return bottomRecord;\n }\n // Base condition for having only 1 record left means that that record is the closest\n } else if (topRecord == bottomRecord) {\n return topRecord;\n }\n\n int middle = (topRecord + bottomRecord) / 2;\n String nameOfNormalRecord = getRecordCompanyName(\"normal\", middle);\n int alphabeticalOrder = overflowName.compareTo(nameOfNormalRecord);\n if (alphabeticalOrder == 0) {\n return middle;\n } else if (alphabeticalOrder < 0) {\n return binarySearchToFindClosest(overflowName, bottomRecord, middle);\n } else {\n return binarySearchToFindClosest(overflowName, middle + 1, topRecord);\n } \n }", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "private GlobeAccessPointRecord findNearestGAP(InetAddress srcAddr)\n {\n GlobeAccessPointRecord nearestGAPrec;\n FloatCoordinate coords = null;\n\n // look in our GAP lookup cache. It looks like IE5 ignores our\n // Expires: header so we might really need this for performance \n // reasons.\n synchronized(GlobeRedirector.ip2GAPCache) {\n nearestGAPrec =\n (GlobeAccessPointRecord) GlobeRedirector.ip2GAPCache.get(srcAddr);\n }\n\n /*\n * Return the GAP record if it is in the cache.\n */\n if (nearestGAPrec != null) {\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"(cached) Nearest GAP is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n return nearestGAPrec;\n }\n\n /*\n * There is no {srcAddr, nearest GAP record} pair in the cache. We need\n * the geographical coordinates associated with srcAddr to determine\n * the nearest GAP.\n */\n\n if (_cookieCoords != null) { // client cookie contains coordinates\n coords = _cookieCoords;\n }\n else {\n coords = getCoordinates(srcAddr);\n\n if (coords == null) {\n return null;\n }\n }\n\n /*\n * Calculate which GAP is nearest.\n */\n int i, dist, min = Integer.MAX_VALUE;\n CoordinateImpl srcCoords = new CoordinateImpl((int)coords.lat,\n (int)coords.longi);\n\n for (i = 0; i < _gapList.size(); i++) {\n GlobeAccessPointRecord gaprec = _gapList.get(i);\n dist = gaprec.coords.computeDistance(srcCoords);\n\n if (dist < min) {\n nearestGAPrec = gaprec;\n min = dist;\n }\n }\n\n // Cache the result.\n synchronized(GlobeRedirector.ip2GAPCache) {\n GlobeRedirector.ip2GAPCache.put(srcAddr, nearestGAPrec);\n }\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Nearest GAP of \" + srcAddr.getHostAddress()\n + \" at (\" + (int)coords.lat + \",\" + (int)coords.longi\n + \") is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n\n _cookieCoords = coords;\n return nearestGAPrec;\n }", "public Data getDataContaining(Address addr);", "public Data getDefinedDataAfter(Address addr);", "public Data getDefinedDataContaining(Address addr);", "public static int lowerBound(int[] arr, int data) {\n int ans = -1, low = 0, high = arr.length - 1;\n while (low <= high) {\n int mid = (low + high) / 2;\n if (arr[mid] == data) {\n ans = mid;\n high = mid - 1;\n } else if (data < arr[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return ans;\n }", "public int getLowerBound ();", "public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public static int getMin(ArrayList<QuoteShort> data, int begin, int end) {\n\t\tint min = 999999999;\r\n\t\tint minIndex = -1;\r\n\t\tif (begin<=0) begin = 0;\r\n\t\tfor (int i=begin;i<=end;i++){\r\n\t\t\tif (data.get(i).getHigh5()<=min){\r\n\t\t\t\tmin = data.get(i).getLow5();\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn minIndex;\r\n\t}", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "public static int lower_bound(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] >= key)\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid - 1;\n\t\t}\n\t\treturn low;\n\t}", "private Node getMinimumOld() {\n Node tmp = null;\n\n // TODO: optimize by putting in 1 list and\n // provide 'starting offset' for remaining nodes to find mimimum\n // note: see new getMinimum method above\n\n if (null != nodeA) {\n tmp = nodeA;\n if (null != nodeB && tmp.data > nodeB.data) {\n tmp = nodeB;\n }\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeB) {\n tmp = nodeB;\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeC) {\n tmp = nodeC;\n }\n\n // System.out.println(tmp);\n\n if (null == tmp ) {\n // terminating condition\n return null;\n }\n\n if (tmp.equals(nodeA)) {\n nodeA = nodeA.next;\n }\n if (tmp.equals(nodeB)) {\n nodeB = nodeB.next;\n }\n if (tmp.equals(nodeC)) {\n nodeC = nodeC.next;\n }\n\n System.out.println(tmp.data);\n\n return tmp;\n }", "@NotNull\n private RangeInfo findNearestRangeInfo() {\n final int caretPosition = myView.getCaretPosition();\n\n for (final RangeInfo range : myRangeInfos) {\n if (range.isWithin(caretPosition)) {\n return range;\n }\n if (range.getFrom() > caretPosition) {\n return range; // Ranges are sorted, so we are on the next range. Take it, if caret is not within range\n }\n }\n\n return myRangeInfos.last();\n }", "public Instruction getInstructionBefore(Address addr);", "public Address getClosestAddressTo(Depot d) {\n double bestDistance = Double.MAX_VALUE;\n Address bestAddress = null;\n for (Address a : addresses) {\n double distance = a.getCoordinates().companyDistanceTo(d.getCoordinates());\n if (distance < bestDistance) {\n bestAddress = a;\n bestDistance = distance;\n }\n }\n return bestAddress;\n }", "public Shard getLowerNeighbor() {\r\n double middleLat = south + Math.abs(north - south) / 2;\r\n double nextLat = middleLat - Math.abs(north - south);\r\n\r\n return new Shard(new Coordinates(nextLat, coordinates.getLon()), zoom);\r\n }", "public Node closestPrecedingNode(int id);", "public Data getDataAt(Address addr);", "public Data getDefinedDataAt(Address addr);", "protected abstract D getLower(R range);", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "protected ValuePosition getMinimum() {\n\t\t// Calcule la position et la durée d'exécution de la requête la plus courte dans le tableau des requêtes\n\t\tValuePosition minimum = new ValuePosition();\n\t\tminimum.position = 0;\n\t\tfor(int pos=0; pos<requests.length; pos++) {\n\t\t\tRequest request = requests[pos];\n\t\t\tif(request == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minimum.value == null || request.getElapsedTime() < minimum.value) {\n\t\t\t\tminimum.position = pos;\n\t\t\t\tminimum.value = request.getElapsedTime();\n\t\t\t}\n\t\t}\n\t\treturn minimum;\n\t}", "protected static int advanceUntil(CharBuffer array, int pos, int length, char min) {\n int lower = pos + 1;\n\n // special handling for a possibly common sequential case\n if (lower >= length || (array.get(lower)) >= (min)) {\n return lower;\n }\n\n int spansize = 1; // could set larger\n // bootstrap an upper limit\n\n while (lower + spansize < length\n && (array.get(lower + spansize)) < (min)) {\n spansize *= 2; // hoping for compiler will reduce to\n }\n // shift\n int upper = (lower + spansize < length) ? lower + spansize : length - 1;\n\n // maybe we are lucky (could be common case when the seek ahead\n // expected\n // to be small and sequential will otherwise make us look bad)\n if (array.get(upper) == min) {\n return upper;\n }\n\n if ((array.get(upper)) < (min)) {// means\n // array\n // has no\n // item\n // >= min\n // pos = array.length;\n return length;\n }\n\n // we know that the next-smallest span was too small\n lower += (spansize >>> 1);\n\n // else begin binary search\n // invariant: array[lower]<min && array[upper]>min\n while (lower + 1 != upper) {\n int mid = (lower + upper) >>> 1;\n char arraymid = array.get(mid);\n if (arraymid == min) {\n return mid;\n } else if ((arraymid) < (min)) {\n lower = mid;\n } else {\n upper = mid;\n }\n }\n return upper;\n\n }", "public T findMin();", "public int relativePosTo(long addr) {\n\t\t\tif(addr < this.start)\n\t\t\t\treturn -1;\n\t\t\tif(addr > this.end)\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "public String getNearestStreet() {\n String nearestStreet = \"null\";\n CollisionResults results = new CollisionResults();\n float closestDistance = 101f;\n for(float xDir = -1; xDir <= 1; xDir += .1f) {\n for(float yDir = -1; yDir <= 1; yDir += .1f) {\n for(float zDir = -1; zDir <= 1; zDir += .1f) { \n Ray ray = new Ray(loc, new Vector3f(xDir, yDir, zDir));\n world.collideWith(ray, results);\n for (int i = 0; i < results.size(); i++) {\n float dist = results.getCollision(i).getDistance();\n String name = results.getCollision(i).getGeometry().getParent().getName();\n if (name.startsWith(\"R_\") && dist <= 100 && dist < closestDistance) {\n nearestStreet = name;\n closestDistance = dist;\n }\n }\n }\n }\n }\n\n return nearestStreet;\n \n }", "public Point getXLower()\n {\n return (Point)xLow.clone();\n }", "public float getLimit_lin_x_lower() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 32);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 24);\n\t\t}\n\t}", "public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}", "public node_data heapExtractMin(){\n\t\tdouble min = _positiveInfinity;\n\t\tnode_data v=null;\n\t\tif (!isEmpty()){\n\t\t\tv = _a[0];\n\t\t\tmin = v.getWeight();\n\t\t\t_a[0]=_a[_size-1];\n\t\t\t_size = _size-1;\n\t\t\tminHeapify(0, _size);\n\t\t}\n\t\treturn v;\n\t}", "public int getLowerBound() {\r\n return lowerBound;\r\n }", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "private UnconstrainedBidElement getClosest(double demandWatt) {\n UnconstrainedBidElement best = null;\n double bestDistance = Double.MAX_VALUE;\n for (UnconstrainedBidElement e : elements) {\n double distance = Math.abs(demandWatt - e.demandWatt);\n if (best == null || distance < bestDistance) {\n best = e;\n bestDistance = distance;\n }\n }\n return best;\n }", "public O before(O a)\r\n {\r\n int index = indexOf(a);\r\n if (index != -1 && index != 0) //is defined and not first\r\n return get(index-1);\r\n else return null;\r\n }", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "public Location getNearest(Location src)\r\n {\r\n if(Main.ASSERT) Util.assertion(!src.inside(bl, tr));\r\n // cases: \r\n // 3 6 9 \r\n // 2 x 8\r\n // 1 4 7\r\n if(src.getX()<=bl.getX())\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return bl; // case 1\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return tl; // case 3\r\n }\r\n else\r\n {\r\n return new Location.Location2D(bl.getX(), src.getY()); // case 2\r\n }\r\n }\r\n else if(src.getX()>=tr.getX())\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return br; // case 7\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return tr; // case 9\r\n }\r\n else\r\n {\r\n return new Location.Location2D(tr.getX(), src.getY()); // case 8\r\n }\r\n }\r\n else\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return new Location.Location2D(src.getX(), bl.getY()); // case 4\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return new Location.Location2D(src.getX(), tr.getY()); // case 6\r\n }\r\n else\r\n {\r\n throw new RuntimeException(\"get nearest undefined for internal point\");\r\n }\r\n }\r\n }", "Execution getClosestDistance();", "private Node lowestCostThrough(List<Node> openSet, Map<Node, Double> costThrough){\n Node lowest = openSet.get(0);\n\n for(Node n: openSet){\n if(costThrough.get(n) < costThrough.get(lowest)){\n lowest = n;\n }\n }\n return lowest;\n }", "public node_data heapMinimum(){return _a[0];}", "public Resource findNearestResource(){\n\t\tResource nearestResource = null;\n\t\tfloat distanceToCurrentResource = 0f;\n\t\tfor (Resource resource : MapData.getInstance().getResources()) {\n\t\t\tif(resource.isResourceMaxed()) continue;\n\t\t\tif (resource.getCenter().dst2(getCenter()) < 4000000) {\n\t\t\t\tif (nearestResource == null) {\n\t\t\t\t\tnearestResource = resource;\n\t\t\t\t\tdistanceToCurrentResource = nearestResource\n\t\t\t\t\t\t\t.getCenter().dst2(this.getCenter());\n\t\t\t\t} else {\n\t\t\t\t\tfloat distanceToNewResource = resource.getCenter()\n\t\t\t\t\t\t\t.dst2(this.getCenter());\n\t\t\t\t\tnearestResource = (distanceToNewResource < distanceToCurrentResource) ? resource\n\t\t\t\t\t\t\t: nearestResource;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nearestResource;\n\t}", "public final Node getNearestNode(Point p) {\n double minDistanceSq = Double.MAX_VALUE;\n Node minPrimitive = null;\n for (Node n : getData().nodes) {\n if (n.deleted || n.incomplete)\n continue;\n Point sp = getPoint(n.eastNorth);\n double dist = p.distanceSq(sp);\n if (minDistanceSq > dist && dist < snapDistance) {\n minDistanceSq = p.distanceSq(sp);\n minPrimitive = n;\n }\n // prefer already selected node when multiple nodes on one point\n else if(minDistanceSq == dist && n.selected && !minPrimitive.selected)\n {\n minPrimitive = n;\n }\n }\n return minPrimitive;\n }", "private static int minimumPosition(int[] a, int from)\n {\n int minPos = from;\n for (int i = from + 1; i < a.length; i++) \n {\n if (a[i] < a[minPos]) { minPos = i; }\n }\n return minPos;\n }", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "public V getLowerBound();", "public Point ExtractMin() {\n\t\tif (heapSize < 0)\n\t\t\tthrow new RuntimeException(\"MinHeap underflow!\");\n\t\tPoint min = new Point(heapArr[0]);\n\t\theapArr[0] = new Point(heapArr[heapSize - 1]);\n\t\theapSize = heapSize - 1;\n\t\tminHeapify(0);\n\t\treturn min;\n\n\t}", "private T getMinUnvisited(){\n if (unvisited.isEmpty()) return null;\n T min = unvisited.get(0);\n for (int i = 1; i < unvisited.size(); i++){\n T temp = unvisited.get(i);\n if (distances[vertexIndex(temp)] < distances[vertexIndex(min)]){\n min = temp;\n }\n }\n return min;\n }", "public int\ngetNodeIndexMin();", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public int findSmallest() {\n\t/*\n\t Cases:\n\t If last or only node, return datum\n\n\t Otherwise:\n\t Return whatever is smaller: \n\t The datum of the current node,\n\t or the datum of the next node \n\t*/ \n\tif (next == null) return datum; \n\telse {\n\t int nextDatum = next.findSmallest();\n\t if (nextDatum < datum) return nextDatum;\n\t else return datum;\n\t}\n }", "long closest(double lon, double lat) {\n double smallestDist = Double.MAX_VALUE;\n long smallestId = 0;\n Iterable<Node> v = world.values();\n for (Node n : v) {\n double tempLat = n.getLat();\n double tempLon = n.getLon();\n double tempDist = distance(lon, lat, tempLon, tempLat);\n if (tempDist < smallestDist) {\n smallestDist = tempDist;\n smallestId = n.getId();\n }\n }\n return smallestId;\n }", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "public int getLowerBound ()\n\t{\n\t\treturn getRelationshipImpl().getLowerBound();\n\t}", "public static int offset_min() {\n return (56 / 8);\n }", "public Point getLowerPoint() {\n return lower;\n }", "public static Node getLowestDistanceNode(Set<Node> unsettledNodes) {\n Node lowestDistanceNode = null;\n int lowestDistance = Integer.MAX_VALUE;\n for (Node node: unsettledNodes) {\n int nodeDistance = node.distance;\n if (nodeDistance < lowestDistance) {\n lowestDistance = nodeDistance;\n lowestDistanceNode = node;\n }\n }\n return lowestDistanceNode;\n }", "public int nextLessThan(int range) {\n return (0x7fffffff & this.nextInt()) % range;\n }", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "public Criteria andAddressLessThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"address < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "private Point[] nearestPointInArray(Point[] strip){\n\t\tint j = 1; // with each point we measure the distance with the following 6 point's\n\t\tPoint[] currentMinPoints = {strip[0],strip[1]};\n\t\tdouble currentMinDistance = Distance(currentMinPoints[0], currentMinPoints[1]);\n\t\tdouble currentDistance;\t\n\t\tfor (int i=0; i< strip.length; i++){\n\t\t\twhile (j<8 && i+j < strip.length){\n\t\t\t\tcurrentDistance = Distance(strip[i], strip[i+j]);\n\t\t\t\tif (currentDistance<currentMinDistance){\n\t\t\t\t\tcurrentMinDistance = currentDistance;\n\t\t\t\t\tcurrentMinPoints[0] = strip[i];\n\t\t\t\t\tcurrentMinPoints[1] = strip[i+j];\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tj=1;\n\t\t}\n\t\treturn currentMinPoints;\n\t}", "public float getLimit_lin_z_lower() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 48);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 40);\n\t\t}\n\t}", "public RTWLocation firstN(int n);", "private static long getFirstOffset(long currentOffset, int limit) {\n\t\tlong firstOffset = currentOffset;\n\n\t\twhile(firstOffset > limit) {\n\t\t\tfirstOffset -= limit;\n\t\t}\n\n\t\treturn firstOffset;\n\t}", "public NodeEntry<Boolean, Node> find(T data) {\n\t\tif (this.numberOfNodes == 0)\n\t\t\t// Return the header as the second parameter\n\t\t\t// to indicate that the returned false was\n\t\t\t// as a result of querying data to an empty\n\t\t\t// list.\n\t\t\treturn new NodeEntry<Boolean, Node>(false, this.header);\n\n\t\t// Begin with the header and traverse the list\n\t\t// using right pointers at every visited node.\n\t\tNode currentNode = this.header;\n\t\tNode nodeToCompare = null;\n\t\tNode leftNeighbor = null;\n\t\tint currentLevel = this.listLevel;\n\t\twhile (currentLevel > 1) {\n\t\t\tnodeToCompare = currentNode.nextNodes.get(currentLevel);\n\t\t\tif (nodeToCompare != null) {\n\t\t\t\tif (data.compareTo(nodeToCompare.data) > 0) {\n\t\t\t\t\tcurrentNode = nodeToCompare;\n\t\t\t\t} else if (data.compareTo(nodeToCompare.data) < 0) {\n\t\t\t\t\tcurrentLevel--;\n\t\t\t\t} else\n\t\t\t\t\treturn new NodeEntry<Boolean, Node>(true, nodeToCompare);\n\t\t\t} else currentLevel--;\n\t\t}\n\n\t\t// If the query value is found to be the smallest in the\n\t\t// list, we'd hit the bottom of the list through header.\n\t\t// Return the header as the left hand neighbor for the\n\t\t// position where the query data can be inserted later.\n\t\tif (currentNode.equals(this.header) &&\n\t\t\tcurrentNode.nextNodes.get(1).data.compareTo(data) >= 0) {\n\t\t\treturn new NodeEntry<Boolean, Node>(false, this.header);\n\t\t}\n\n\t\t// Otherwise, continue traversing the remaining nodes\n\t\t// until the last visited node's data value is found\n\t\t// to be equal to or greater than the query.\n\t\twhile (!currentNode.equals(this.sentinel)) {\n\t\t\tif (currentNode.data.compareTo(data) > 0) {\n\t\t\t\t// Return the node immediately before the possible\n\t\t\t\t// position where the data could have been found.\n\t\t\t\t// This can be used for inserting a new node to the\n\t\t\t\t// list containing the same data value as the query.\n\t\t\t\treturn new NodeEntry<Boolean, Node>(false, leftNeighbor);\n\t\t\t} else if (currentNode.data.compareTo(data) < 0) {\n\t\t\t\t// This is where we enter this while loop,\n\t\t\t\t// so we protect ourselves from losing the\n\t\t\t\t// track of the immediate left neighbor.\n\t\t\t\tleftNeighbor = currentNode;\n\t\t\t\tcurrentNode = currentNode.nextNodes.get(1);\n\t\t\t} else {\n\t\t\t\treturn new NodeEntry<Boolean, Node>(true, currentNode);\n\t\t\t}\n\t\t}\n\n\t\t// After reaching the sentinel, return the last node\n\t\t// in the list as the position where the data may be\n\t\t// inserted into the list.\n\t\treturn new NodeEntry<Boolean, Node>(false, leftNeighbor);\n\t}", "public static Position getClosest2reference(ArrayList<Position> c, Position reference){\n \t// Gets the closest point to the user's current position\n \tPosition temp;\n \tPosition min = new Position(0,0);\n \tdouble d;\n \tdouble minDistance = 1000;\n \tIterator<Position> t = c.iterator();\n \twhile (t.hasNext()){\n \t\ttemp = (Position) t.next();\n \t\t//System.out.println(\"Checking: \" + temp.getLat() + \",\" + temp.getLon());\n \t\td = Tools.distance(reference, temp);\n \t\tif (d < minDistance){\n \t\t\tmin = temp;\n \t\t\tminDistance = d;\n \t\t}\n \t}\n \treturn min;\n }", "public E returnMinElement(){\r\n if (theData.size() <= 0) return null;\r\n\r\n E min = theData.get(0).getData();\r\n\r\n for (int i = 0; i< theData.size() ; i++){\r\n if (min.compareTo(theData.get(i).getData()) > 0 ){\r\n min = theData.get(i).getData();\r\n }\r\n }\r\n return min;\r\n }", "private StreamEvent findIfActualMin(AttributeDetails latestEvent) {\n int indexCurrentMin = valueStack.indexOf(currentMin);\n int postBound = valueStack.indexOf(latestEvent) - indexCurrentMin;\n // If latest event is at a distance greater than maxPostBound from min, min is not eligible to be sent as output\n if (postBound > maxPostBound) {\n currentMin.notEligibleForRealMin();\n return null;\n }\n // If maxPreBound is 0, no need to check preBoundChange. Send output with postBound value\n if (maxPreBound == 0) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", 0, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n int preBound = 1;\n double dThreshold = currentMin.getValue() + currentMin.getValue() * preBoundChange / 100;\n while (preBound <= maxPreBound && indexCurrentMin - preBound >= 0) {\n if (valueStack.get(indexCurrentMin - preBound).getValue() >= dThreshold) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", preBound, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n ++preBound;\n }\n // Completed iterating through maxPreBound older events. No events which satisfy preBoundChange condition found.\n // Therefore min is not eligible to be sent as output.\n currentMin.notEligibleForRealMin();\n return null;\n }", "public static int lower_bound_equals(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] > key)\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid - 1;\n\t\t}\n\t\treturn low;\n\t}", "TrackingToken lowerBound();", "int getMinX(Long id) throws RemoteException;", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "private void FindMinZ()\r\n\t{\r\n\t\tminimum_Z=Integer.MAX_VALUE;\r\n\t\tfor(Entry<Integer,Node> entry : FutureUpdateList.entrySet())\r\n\t\t{\r\n\t\t\tNode temp=entry.getValue();\r\n\t\t\tif(temp.z<minimum_Z)\r\n\t\t\t{\r\n\t\t\t\tminimum_Z=temp.z;\r\n\t\t\t\tminimum_X=temp.x;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public IORequest SSTF(int deviceNumber, IORequest oldhead) {\n\n IORequest closest = null;\n int min = Integer.MIN_VALUE;\n\n //disk scheduling\n try {\n int hedlo = machine.memory.load(Process_Table[oldhead.prognum].base + Process_Table[oldhead.prognum].acc + 2) + machine.memory.load(Process_Table[oldhead.prognum].base + Process_Table[currentProcess].acc + 3);\n for (IORequest request : waitQ[deviceNumber]) {\n int zzzstart = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 2);\n //System.out.println(zzzstart);\n int distance = Math.abs(hedlo-zzzstart );\n\n //if its the closest to the headlocation \n if (distance > min) {\n closest = request;\n min = distance;\n\n }\n \n }\n waitQ[deviceNumber].remove(closest);\n \n waitQ[deviceNumber].addFirst(closest);\n\n } catch (MemoryFault ex) {\n Logger.getLogger(OperatingSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return closest;\n }", "public static int closestNumber(int p, int high, int low) {\n\t\tif(p>Math.abs(high-p)) {\n\t\t\tp=high;\n\t\t}\n\t\telse {\n\t\t\tp=low;\n\t\t}\n\t\treturn p;\n\t}", "long getAddress(ByteBuffer buffer);", "public static DataType findPointerRelativeInner(DataType base, int offset) {\n\t\tif (base instanceof TypeDef) {\n\t\t\tbase = ((TypeDef) base).getBaseDataType();\n\t\t}\n\t\twhile (base instanceof Structure) {\n\t\t\tDataTypeComponent component = ((Structure) base).getComponentContaining(offset);\n\t\t\tif (component == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbase = component.getDataType();\n\t\t\toffset -= component.getOffset();\n\t\t\tif (offset == 0) {\n\t\t\t\treturn base;\n\t\t\t}\n\t\t}\n\t\treturn Undefined1DataType.dataType;\n\t}", "@Nullable\n protected abstract Map.Entry<K, V> onGetLowestEntry();", "@Test\r\n public void testGetClosestAddressTo() {\r\n System.out.println(\"getClosestAddressTo\");\r\n Customer testCustomer;\r\n testCustomer = new Customer(\"Test Customer\", testAddress4);\r\n \r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress1);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress3);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress2);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertNotEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress2, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n }", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "public double getMinimumDistance() {\n double l = Double.POSITIVE_INFINITY;\n int stop = getDistanceEnd();\n\n calculateDistances();\n\n for (int i = 0; i < stop; i++) {\n l = Math.min(l, distances[i]);\n }\n\n return l;\n }", "public double getMinimumDistance() { return minDistance; }", "private Integer minimumData(Node root) {\n Integer min = root.getData();\n while (root.getLeftChild() != null) {\n min = root.getLeftChild().getData();\n root = root.getLeftChild();\n }\n return min;\n }", "public DataValue getLeastDataByDeviceIdAndSensorType(SensorValue sensorVal) throws Exception;", "public double minValue(DateTime dt1, DateTime dt2) throws Exception {\r\n Candle[] cd = collectCandlesByIndex(find_index(dt1), find_index(dt2));\r\n double min;\r\n if (cd.length > 1) {\r\n min = cd[0].getLow();\r\n for (Candle c : cd) {\r\n if (c.getLow() < min){\r\n min = c.getLow();\r\n }\r\n }\r\n return min;\r\n } else if (cd.length == 1) {\r\n return cd[0].getLow();\r\n } else {\r\n return 0;\r\n }\r\n }", "public Location3D getLowLoc() {\n\t\treturn lowPoint;\n\t}", "private Point getLower() {\n int lowerX;\n int lowerY;\n lowerY = (int) (-gameCanvas.getHeight() + mapOffsetY * 2);\n lowerX = (int) (-gameCanvas.getWidth() + mapOffsetX * 2);\n return new Point(lowerX, lowerY);\n }", "private int getLowerBound(Object problem, int upperbound)\n {\n Graph tsp = (Graph)problem;\n if (weight == null)\n weight = new double[tsp.size()];\n hki = new HeldKarpIterative( tsp, included, includedT, excluded, excludedT, iterations, weight, upperbound);\n hki.compute();\n tour = hki.isTour();\n bound = hki.getBound();\n hasRun = true;\n// System.out.println(hki.debugDump());\n return bound;\n }", "Object getMinimumValue(Object elementID) throws Exception;", "public E extractMin() {\r\n\t\tif (this.size == 0) {\r\n\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\"Heap underflow. Cannot extractMin from an empty heap.\");\r\n\t\t}\r\n\t\tE min = this.objectHeap[0];\r\n\t\tdouble costMin = this.costHeap[0];\r\n\t\tthis.objectHeap[0] = this.objectHeap[this.size - 1];\r\n\t\tthis.costHeap[0] = this.costHeap[this.size - 1];\r\n\t\tthis.size -= 1;\r\n\t\tthis.locations.delete(min);\r\n\t\tthis.locations.put(this.objectHeap[0], 0);\r\n\t\tthis.minHeapify(0);\r\n\t\treturn min;\r\n\t}", "public CodeUnit getCodeUnitBefore(Address addr);", "private static <T extends Comparable <? super T>> int findMinPos(List <T> list, int from, int to){\r\n\t\tif (list.isEmpty()) return -1;\r\n\t\tif (from < 0 || to > list.size()) throw new IllegalArgumentException();\r\n\t\tT currentMin = list.get(from);\r\n\t\tint currentMinPos = from;\r\n\t\tfor (int i = from; i < to; i++){\r\n\t\t\tif (list.get(i).compareTo(currentMin) < 0){\r\n\t\t\t\tcurrentMin = list.get(i);\r\n\t\t\t\tcurrentMinPos = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn currentMinPos;\r\n\t}", "@Override\r\n public Integer minLowerBound() {\r\n return this.getImpl().minLowerBound();\r\n }", "Coordinate getMinX();", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }" ]
[ "0.69619805", "0.58066005", "0.5652275", "0.5614907", "0.55964893", "0.5577153", "0.55026627", "0.5463937", "0.5434421", "0.5375281", "0.5305285", "0.529143", "0.5284568", "0.5248125", "0.52451414", "0.52374786", "0.5228372", "0.5206794", "0.51905257", "0.51852244", "0.5182263", "0.5176861", "0.517422", "0.5172829", "0.51664454", "0.51652575", "0.5148523", "0.51388973", "0.51386607", "0.513381", "0.51206416", "0.5108412", "0.50931853", "0.50898767", "0.507758", "0.50629866", "0.5058168", "0.50364786", "0.5026788", "0.50091195", "0.4978184", "0.49668866", "0.49507132", "0.4928281", "0.49224997", "0.4911325", "0.4902961", "0.48987463", "0.48731422", "0.4869916", "0.48671123", "0.48629093", "0.48488465", "0.48459768", "0.4844146", "0.48425505", "0.48393637", "0.48380816", "0.48317453", "0.48300987", "0.48238033", "0.48124322", "0.47882336", "0.47834066", "0.4768254", "0.47658756", "0.47602576", "0.47459698", "0.47375754", "0.4732954", "0.4724114", "0.47192103", "0.47190183", "0.47142586", "0.47136104", "0.47123376", "0.47083145", "0.47072622", "0.47011083", "0.46988755", "0.4697765", "0.46941566", "0.4694109", "0.46940836", "0.46910426", "0.4689957", "0.46881774", "0.4685247", "0.46734443", "0.46700522", "0.46687177", "0.46676782", "0.46664688", "0.46614733", "0.4656032", "0.46419492", "0.4639336", "0.46350086", "0.46281925", "0.46276006" ]
0.6420698
1
get a Data iterator that will iterate over the entire address space; returning only defined Data objects.
public DataIterator getDefinedData(boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataIterator getDefinedData(Address addr, boolean forward);", "public DataIterator getData(Address addr, boolean forward);", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "Iterator<TabularData> dataIterator();", "public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);", "public DataIterator getCompositeData(Address start, boolean forward);", "@Override\n public Iterator<Long> iterator() {\n Collection<Long> c = new ArrayList<>();\n synchronized (data) {\n for (int i=0; i<data.length; i++)\n c.add(get(i));\n }\n return c.iterator();\n }", "public java.util.List<DataEntry> findAll(int start, int end);", "public Iterable<E> getData(){\n return new Iterable<E>(){\n @Override\n public Iterator<E> iterator() {\n return structure.iterator();\n }\n };\n }", "public Data getDataContaining(Address addr);", "public Iterator<DystoreTuple> iterator()\t{ return tuple_data.iterator(); }", "public Data getDefinedDataContaining(Address addr);", "public Iterator<IDatasetItem> iterateOverDatasetItems();", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "public DataIterator getData(boolean forward);", "public Data getDataAt(Address addr);", "@Override\n\t\t\tpublic Iterator<T> iterator() {\n\t\t\t\treturn convertData(data.iterator(), targetClass);\n\t\t\t}", "@Override\n public Iterator<Entry<Integer, T>> iterator() {\n List<Entry<Integer, T>> pairs = new ArrayList<Entry<Integer, T>>(count);\n\n for(int i = 0; i < count; i++) {\n pairs.add(new MapEntry<T>(extractKey(buckets[i]), (T)data[i]));\n }\n\n return pairs.iterator();\n }", "@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }", "@Override\r\n\tpublic List<Address> findAll() {\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\tList<Address> arrayList = new ArrayList<>();\r\n\t\t\r\n\t\tResultSet array = DAOJDBCModel.multiCallReturn(\"SELECT * FROM address;\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(array.next()) {\r\n\t\t\t\tarrayList.add(new Address(array.getInt(\"id\"), array.getString(\"street\"), array.getString(\"district\"),\r\n\t\t\t\t\t\tarray.getInt(\"number\"), array.getString(\"note\"))); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn arrayList;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "@Override\n public boolean hasNext() {\n if(dataPageIterator.hasNext()) {\n return true;\n }\n while(dataPage.getNextPageId().isValid()) {\n PageId next = dataPage.getNextPageId();\n DBComponent.BUFFER_MANAGER().unpin(dataPageId, false);\n dataPage = getDataPage(next);\n dataPageId = next;\n dataPageIterator = new DataPageIterator(dataPage);\n if(dataPageIterator.hasNext()) return true;\n }\n return false;\n }", "public Iterator<Hex> iterator() {\n return new Iterator<Hex>() {\n private int g = 0;\n private int h = 0;\n @Override\n public boolean hasNext() {\n return g < hexWidth && h < hexHeight;\n }\n @Override\n public Hex next() {\n Hex result = hexes[g][h];\n if (++g == hexWidth) {\n g = 0;\n h++;\n }\n return result;\n }\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }", "@Override\n public Iterator<Object> iterator() {\n return new Iterator<Object>() {\n\n private int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < data.length;\n }\n\n @Override\n public Object next() {\n Object result = data[i];\n i = i + 1;\n return result;\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException(\"Tuples are immutable\");\n }\n };\n }", "public List<Address> getAllAddresses() throws BackendException;", "public UnmodifiableIterator<Entry<K, V>> iterator() {\n return mo8403b().iterator();\n }", "@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}", "public InstructionIterator getInstructions(Address addr, boolean forward);", "public Data getDefinedDataAt(Address addr);", "public ListIterator<T> getAllByRowsIterator() {\n\t\tAllByRowsIterator it = new AllByRowsIterator();\n\t\treturn it;\n\t}", "public interface DataSourceIterator extends Iterator<Data> {\n\n}", "@VisibleForTesting\n public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {\n return map.entrySet().iterator();\n }", "@Override\n public Iterator<Location> iterator() {\n return new NeighborhoodIterator(this, new Location(0, 0));\n }", "@Override\r\n\tpublic Iterator<TableEntry<K, V>> iterator() {\r\n\t\treturn new IteratorImpl();\r\n\t}", "@Override\n public Iterator<Range> iterator() {\n return iterator(defaultValueMapper);\n }", "public Iterator<OpenERPRecord> iterator() {\r\n\t\treturn records.iterator();\r\n\t}", "public Iterator<Entry> iterator() {\n return new ArrayIterator<Entry>(fEntries);\n }", "public Iterator<T> iterator() { return new DLLIterator(); }", "public ListIterator<T> getAllByColumnsIterator() {\n\t\tAllByColumnsIterator it = new AllByColumnsIterator();\n\t\treturn it;\n\t}", "@DISPID(-4) //= 0xfffffffc. The runtime will prefer the VTID if present\r\n @VTID(22)\r\n java.util.Iterator<Com4jObject> iterator();", "@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new ArrayMapIterator<>(this.entries, this.size);\n }", "public Iterator<Coord> iterator() {\n\t\treturn new CoordListIterator(array, index);\n\t}", "@Override\n public Iterator<T> iterator() {\n return new Iterator<T>(){\n private int ci = 0;\n \n /**\n * Checks if ArrayList has next element \n * @return \n */\n public boolean hasNext(){\n return ci < size;\n }\n \n /**\n * Returns next element and moves iterator forward\n * @return \n */\n public T next(){\n return (T)data[ci++];\n }\n \n /**\n * Does nothing\n */\n public void remove(){\n \n }\n };\n }", "public Iterator iterator()\n {\n // optimization\n if (OldOldCache.this.isEmpty())\n {\n return NullImplementation.getIterator();\n }\n\n // complete entry set iterator\n Iterator iter = instantiateIterator();\n\n // filter to get rid of expired objects\n Filter filter = new Filter()\n {\n public boolean evaluate(Object o)\n {\n Entry entry = (Entry) o;\n boolean fExpired = entry.isExpired();\n if (fExpired)\n {\n OldOldCache.this.removeExpired(entry, true);\n }\n return !fExpired;\n }\n };\n\n return new FilterEnumerator(iter, filter);\n }", "@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new ArrayMapIterator<>(this.entries);\n }", "public Iterable<MapElement> elements() {\n return new MapIterator() {\n\n @Override\n public MapElement next() {\n return findNext(true);\n }\n \n };\n }", "public IndexRecord getIterator() {\n return (iter == -1 ? null : data[iter]);\n}", "public Iterator<T> iterator() {\r\n return new DLListIterator<T>();\r\n }", "public native IterableIterator<Tuple<K, V>> entries();", "public Iterator iterator()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n try\r\n {\r\n return new CompositeIterator(new Iterator[] { \r\n spaceMgr.makeComponentSpaceIterator(),\r\n spaceMgr.makeHistorySpaceIterator() });\r\n }\r\n catch (RuntimeException e)\r\n {\r\n e.printStackTrace();\r\n throw e;\r\n }\r\n }", "public Iterator<T> iterator() {\n\t\treturn new ReferentIterator();\n\t}", "abstract public Iterator<BlockReportReplica> iterator();", "public T iterator();", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator(){\n return new ArrayIterator();\n }", "public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }", "public DbIterator iterator() {\n // some code goes here\n ArrayList<Tuple> tuples = new ArrayList<Tuple>();\n for (Field key : m_aggregateData.keySet()) {\n \tTuple nextTuple = new Tuple(m_td);\n \tint recvValue;\n \t\n \tswitch (m_op) {\n \tcase MIN: case MAX: case SUM:\n \t\trecvValue = m_aggregateData.get(key);\n \t\tbreak;\n \tcase COUNT:\n \t\trecvValue = m_count.get(key);\n \t\tbreak;\n \tcase AVG:\n \t\trecvValue = m_aggregateData.get(key) / m_count.get(key);\n \t\tbreak;\n \tdefault:\n \t\trecvValue = setInitData(); // shouldn't reach here\n \t}\n \t\n \tField recvField = new IntField(recvValue);\n \tif (m_gbfield == NO_GROUPING) {\n \t\tnextTuple.setField(0, recvField);\n \t}\n \telse {\n \t\tnextTuple.setField(0, key);\n \t\tnextTuple.setField(1, recvField);\n \t}\n \ttuples.add(nextTuple);\n }\n return new TupleIterator(m_td, tuples);\n }", "public Map<CeloContract, String> allAddresses() {\n for (CeloContract contract : CeloContract.values()) {\n this.addressFor(contract);\n }\n return cache;\n }", "public static List<Address> GetAllRecordsFromTable() {\n\n return SQLite.select().from(Address.class).queryList();\n\n\n }", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public Iterator<Item> iterator() {\n Item[] temp = (Item[]) new Object[size];\n System.arraycopy(array, 0, temp, 0, size);\n return (new RandomIterator(temp));\n }", "public java.util.List<DataEntry> findAll();", "public Iterator<Item> iterator() {\n return new Iterator<Item>() {\n public boolean hasNext() {\n return false;\n }\n\n public Item next() {\n return null;\n }\n };\n }", "public java.util.Iterator<Entry> iterator(){\n\t\treturn new ContentIterator();\n\t}", "public abstract ucar.array.RangeIterator getRangeIterator();", "Iterator<Customer> findAllCustomers()\n throws XmlDocumentReadException, CorruptStorageException;", "@Override // java.util.Collection, java.lang.Iterable\n public final Iterator<C0472aH> iterator() {\n return new C0220Kr(this.A00);\n }", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "public Iterable<DataFeed> feeds() {\n return data_feeds.values();\n }", "public Iterator<Item> iterator() {\n return new AIterator();\n }", "@VTID(11)\r\n java.util.Iterator<Com4jObject> iterator();", "public ListIterator<T> listIterator() {\n\t\tAllByRowsIterator it = new AllByRowsIterator();\n\t\treturn it;\n\t}", "public List<Address> getAddresses()\n\t{\n\t\treturn getAddresses( getSession().getSessionContext() );\n\t}", "public Iterator<Entry<Integer, HashMap<String, Double>>> iterator() {\r\n\t\treturn structure.entrySet().iterator();\r\n\t}", "public Iterator<VirtualMachine> iterator() {\n return mapped_vms.iterator();\n }", "@Override\n public Iterator<Entity> iterator() {\n return entities.iterator();\n }", "@Override\n public Iterator<Space> iterator() {\n return row.iterator();\n }", "@VTID(14)\n java.util.Iterator<Com4jObject> iterator();", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "Iterator<Entry<String, Var>> getIterator() {\n\t\treturn iter;\n\t}", "public Iterator<I> getReservables(){\n IterI iter = new IterI();\n return iter;\n }", "public Data getDefinedDataAfter(Address addr);", "public synchronized Iterator<E> iterator()\n {\n return iteratorUpAll();\n }", "@Parameters\n public static Iterable<Object[]> getData() {\n List<Object[]> obj = new ArrayList<>();\n obj.add(new Object[] {3, 12});\n obj.add(new Object[] {2, 8});\n obj.add(new Object[] {1, 4});\n \n return obj;\n }", "public Iterator<Type> iterator();", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "public Iterator <R> getAllReservations(){\n IterR iter = new IterR();\n return iter;\n }", "public List<Address> findAll();", "public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "public Iterable<HashNode> iterator() {\n\t\treturn bucket;\n\t\t//for(HashTable<Character, Integer>.HashNode x : HT.iterator()) {\n\t}", "private Iterator getEntries(){\r\n\t\tSet entries = items.entrySet();\r\n\t\treturn entries.iterator();\r\n\t}", "public Iterator<Object[]> getIterator()\n\t{\n\t\tinit();\n\t\t\n\t\treturn new SimpleIterator();\n\t}", "public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}", "public Iterator<? extends ICodeBase> auxCodeBaseIterator();", "@GET\n\t\t\t@Path(\"/{id}/address\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getAddressRows(@Context UriInfo uriInfo,@Context HttpHeaders header) {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new WarehouseDao(uriInfo,header).getAddressRows();\n\t\t\t\t} catch (AuthenticationException e) {\n\t\t\t\t\t rows=new TemplateUtility().getFailedMessage(e.getMessage());\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tlogger.info( \"Error calling getAddressRows()\"+ ex.getMessage());\n\t\t\t\t}\n\t\t\t\treturn rows;\n\t\t\t}" ]
[ "0.700332", "0.6861309", "0.6499566", "0.6438549", "0.61134", "0.60342383", "0.6006647", "0.59692645", "0.5874661", "0.58157164", "0.5773736", "0.56678736", "0.56268847", "0.5606191", "0.55854076", "0.55834115", "0.55436164", "0.5533805", "0.54981863", "0.54681754", "0.5393865", "0.5372395", "0.5360456", "0.53227246", "0.53141755", "0.529426", "0.5290846", "0.5271975", "0.5269633", "0.5264338", "0.5264047", "0.5261416", "0.52571625", "0.52539885", "0.5234885", "0.52255577", "0.5221478", "0.520496", "0.51695555", "0.5164082", "0.5150815", "0.5149361", "0.51162636", "0.51154643", "0.5113618", "0.51126665", "0.51124984", "0.51060826", "0.51005334", "0.5100108", "0.5085144", "0.5080364", "0.5064014", "0.50530875", "0.50530875", "0.50530875", "0.50530875", "0.5052893", "0.50527453", "0.5051479", "0.5042268", "0.5041254", "0.50327295", "0.5032345", "0.50275564", "0.5026527", "0.5026304", "0.5024631", "0.50190085", "0.5015306", "0.4994539", "0.49931228", "0.49831948", "0.4982151", "0.4973348", "0.49710116", "0.4955152", "0.49517033", "0.49506342", "0.49461657", "0.4945998", "0.49442986", "0.49436274", "0.49358284", "0.49315292", "0.49271744", "0.49258095", "0.49248016", "0.49236146", "0.49206084", "0.49036664", "0.48907992", "0.48884854", "0.48884854", "0.48827162", "0.4879742", "0.48760143", "0.48701572", "0.48671663", "0.4862519" ]
0.5762759
11
Returns an iterator of the defined data in this listing (in proper sequence), starting at the specified address. The specified address indicates the first defined Data that would be returned by an initial call to the next method. An initial call to the previous method would return the defined Data with an address less than the specified address.
public DataIterator getDefinedData(Address addr, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataIterator getData(Address addr, boolean forward);", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public Data getDataBefore(Address addr);", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "public Data getDefinedDataBefore(Address addr);", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "public Data getDefinedDataAfter(Address addr);", "public DataIterator getCompositeData(Address start, boolean forward);", "public Data getDataAfter(Address addr);", "public IndexRecord getIteratorNext() {\n iter = (iter == next - 1 ? -1: iter + 1);\n return (iter == -1 ? null : data[iter]);\n }", "public DataIterator getData(boolean forward);", "public DataIterator getDefinedData(boolean forward);", "public Data getDefinedDataContaining(Address addr);", "public Data getDataAt(Address addr);", "public InstructionIterator getInstructions(Address addr, boolean forward);", "public Data getDefinedDataAt(Address addr);", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "public Data getDataContaining(Address addr);", "public IndexRecord getIteratorPrev() {\n iter = (iter == 0 ? -1 : iter - 1);\n return (iter == -1 ? null : data[iter]);\n }", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Object next()\n/* */ {\n/* 84 */ if (this.m_offset < this.m_limit) {\n/* 85 */ return this.m_array[(this.m_offset++)];\n/* */ }\n/* 87 */ throw new NoSuchElementException();\n/* */ }", "public HL7DataTree next() {\n final int size = Util.size(this.list), i = this.next == null ? size : this.list.indexOf(this.next) + 1;\n final HL7DataTree curr = this.next;\n \n this.next = i == size ? more() : this.list.get(i);\n \n return curr;\n }", "public ListIterator iterator()\n {\n return new ListIterator(firstLink);\n }", "public Record next() {\n if (hasNext()) {\n if (nextRecord != null) {\n Record out = nextRecord;\n nextRecord = null;\n return out;\n }\n }\n throw new NoSuchElementException();\n //throw new UnsupportedOperationException(\"hw3: TODO\");\n }", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "@Test(expected = NoSuchElementException.class)\n public void testPrevious_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 5, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.previous();\n }", "public AIter next() {\n int p;\n return (p = start + 1) < size ? new Iter(p) : null;\n }", "public LinkedListItr zeroth( )\n {\n return new LinkedListItr( header );\n }", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "public Data nextData()\r\n\t\t{\r\n\t\t\treturn this.nextData;\r\n\t\t}", "public int next() {\n\treturn _current < _last ? _data[_current++] : END;\n }", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);", "public LinkedListIterator<AnyType> zeroth() {\n return new LinkedListIterator<AnyType>(header);\n }", "public Object next()\n/* */ {\n/* 93 */ if (this.m_offset < this.m_array.length) {\n/* 94 */ Object localObject = this.m_array[this.m_offset];\n/* 95 */ advance();\n/* 96 */ return localObject;\n/* */ }\n/* 98 */ throw new NoSuchElementException();\n/* */ }", "public T next()\n\t\t{\n\t\t\tif(hasNext())\n\t\t\t{\n\t\t\t\tT currentData = current.getData(); //the data that will be returned\n\t\t\t\t\n\t\t\t\t// must continue to keep track of the Node that is in front of\n\t\t\t\t// the current Node whose data is must being returned , in case\n\t\t\t\t// its nextNode must be reset to skip the Node whose data is\n\t\t\t\t// just being returned\n\t\t\t\tbeforePrevious = previous;\n\t\t\t\t\n\t\t\t\t// must continue keep track of the Node that is referencing the\n\t\t\t\t// data that was just returned in case the user wishes to remove()\n\t\t\t\t// the data that was just returned\n\t\t\t\t\n\t\t\t\tprevious = current; // get ready to point to the Node with the next data value\n\t\t\t\t\n\t\t\t\tcurrent = current.getNext(); // move to next Node in the chain, get ready to point to the next data item in the list\n\t\t\t\t\n\t\t\t\tthis.removeCalled = false;\n\t\t\t\t// it's now pointing to next value in the list which is not the one that may have been removed\n\t\t\t\t\n\t\t\t\treturn currentData;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\t}\n\t\t}", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "public java.util.List<DataEntry> findAll(int start, int end);", "@Override\r\n public T next() {\r\n if (hasNext()) {\r\n node = node.next();\r\n nextCalled = true;\r\n return node.getData();\r\n }\r\n else {\r\n throw new NoSuchElementException(\"Illegal call to next(); \"\r\n + \"iterator is after end of list.\");\r\n }\r\n }", "public LinkedListIterator<AnyType> first() {\n return new LinkedListIterator<AnyType>(header.next);\n }", "public Z peek() {\n return mNext;\n }", "public Iterator begin()\n\t{\n\t\treturn new LinkedListIterator(head); \n\t}", "public Iterator<T> iterator() {\r\n return new DLListIterator<T>();\r\n }", "public LinkedListIterator(){\n position = null;\n previous = null; \n isAfterNext = false;\n }", "@Nonnull\n public Optional<ENTITY> peekNext()\n {\n return hasNext() ? Optional.of(items.get(index + 1)) : Optional.empty();\n }", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "Iterator<TabularData> dataIterator();", "@Test\n public void testIterator_Forward() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n int i = 0;\n while (instance.hasNext()) {\n assertEquals(baseList.get(i++), instance.next());\n }\n\n }", "public Integer nextOffset() {\n return this.nextOffset;\n }", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "@Test\n public void testPreviousIndex_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n int expResult = -1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "@Override\n public Item next() {\n if(!hasNext()) throw new NoSuchElementException(\"Failed to perform next because hasNext returned false!\");\n Item item = current.data;\n current = current.next;\n return item;\n }", "@Test\n public void testNext_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n Integer expResult = 1;\n Integer result = instance.next();\n assertEquals(expResult, result);\n }", "@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "public Iterator<Item> iterator(){\n return this.doublyLinkedList.iterator();\n }", "public T next()\r\n { \r\n if (next == null)\r\n throw new NoSuchElementException(\"Attempt to\" +\r\n \" call next when there's no next element.\");\r\n\r\n prev = next;\r\n next = next.next;\r\n return prev.data;\r\n }", "@Test\n public void testPrevious_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n Integer expResult = 2;\n Integer result = instance.previous();\n assertEquals(expResult, result);\n }", "@Test\n public void testNextIndex_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n int expResult = 0;\n int result = instance.nextIndex();\n\n assertEquals(expResult, result);\n }", "@Override\n public Iterator<T> iterator() {\n return new Iterator<T>(){\n private int ci = 0;\n \n /**\n * Checks if ArrayList has next element \n * @return \n */\n public boolean hasNext(){\n return ci < size;\n }\n \n /**\n * Returns next element and moves iterator forward\n * @return \n */\n public T next(){\n return (T)data[ci++];\n }\n \n /**\n * Does nothing\n */\n public void remove(){\n \n }\n };\n }", "public Iterator<T> getPageElements();", "@SuppressWarnings(\"unchecked\")\n\t\tpublic T next() throws NoSuchElementException {\n\t\t\ttry {\n//\t\t\t\tT object = (T)data[cursor * numCols + pinnedColumn];\n\t\t\t\tT object = get(cursor, pinnedColumn);\n\t\t\t\tlastRet = cursor++;\n\t\t\t\treturn object;\n\t\t\t} catch ( IndexOutOfBoundsException e ) {\n\t\t\t\tthrow new NoSuchElementException( \"You have iterated past the last element.\" + e.toString() );\n\t\t\t}\n\t\t}", "public K next()\n {\n if (hasNext())\n {\n K currentEntry = arrayDictionary.dictionary[cursor].getKey();\n cursor++;\n nextEntry = currentEntry;\n return currentEntry;\n } \n else\n throw new NoSuchElementException();\n // end if\n }", "public LinkedListItr findPrevious( Object x )\n {\n ListNode itr = header;\n\n while( itr.next != null && !itr.next.element.equals( x ) )\n itr = itr.next;\n\n return new LinkedListItr( itr );\n }", "public V next()\n {\n if (hasNext())\n {\n V currentEntry = arrayDictionary.dictionary[cursor].getValue();\n cursor++;\n nextEntry = currentEntry;\n return currentEntry;\n } \n else\n throw new NoSuchElementException();\n // end if\n }", "@Override // java.util.Iterator\n public final AbstractC01170Rz next() {\n AnonymousClass0pm r4 = this.A01;\n if (r4 != null) {\n AnonymousClass0pm r3 = r4.next;\n while (r3 == null) {\n int i = this.A00;\n AnonymousClass0pm[] r1 = this.A02;\n if (i >= r1.length) {\n break;\n }\n this.A00 = i + 1;\n r3 = r1[i];\n }\n this.A01 = r3;\n return r4.value;\n }\n throw new NoSuchElementException();\n }", "public Iterator iterator () {\n return new MyIterator (first);\n }", "public IndexRecord getIterator() {\n return (iter == -1 ? null : data[iter]);\n}", "public Instruction getInstructionBefore(Address addr);", "public Iterator<K> iterator()\n {\n\treturn new SkipListIterator<K>(this.head);\n }", "IList<T> getNext();", "private E next() {\n\t\tif (hasNext()) {\n\t\t\tE temp = iterator.data;\n\t\t\titerator = iterator.next;\n\t\t\treturn temp;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public Integer next() {\n if (!isPeeked && hasNext())\n return iterator.next();\n int toReturn = peekedElement;\n peekedElement = -1;\n isPeeked = false;\n return toReturn;\n }", "public interface RandomAccessIterator extends BidirectionalIterator\n {\n /**\n * Return the index of my current position.\n */\n public int index();\n\n /**\n * Return true if I'm before a specified iterator.\n * @param iterator The iterator to compare myself against.\n */\n public boolean less( RandomAccessIterator iterator );\n\n /**\n * Return a clone of myself.\n */\n public Object clone();\n }", "public Iterator iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "@Override\n public Map.Entry<K, V> next() {\n if (iter.hasNext()) {\n \n lastItemReturned = iter.next();\n return lastItemReturned;\n } else {\n throw new NoSuchElementException();\n }\n }", "@Test\n public void testSet_After_Previous() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.previous();\n\n instance.set(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public LinkedListIterator<AnyType> findPrevious(AnyType x) {\n ListNode<AnyType> itr = header;\n\n while (itr.next != null && !itr.next.element.equals(x)) {\n itr = itr.next;\n }\n\n return new LinkedListIterator<AnyType>(itr);\n }", "@Override\n public boolean hasNext() {\n if(dataPageIterator.hasNext()) {\n return true;\n }\n while(dataPage.getNextPageId().isValid()) {\n PageId next = dataPage.getNextPageId();\n DBComponent.BUFFER_MANAGER().unpin(dataPageId, false);\n dataPage = getDataPage(next);\n dataPageId = next;\n dataPageIterator = new DataPageIterator(dataPage);\n if(dataPageIterator.hasNext()) return true;\n }\n return false;\n }", "public void testNext() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertTrue(test1.getValue().inRange(0));\n test1.next();\n assertTrue(test1.getValue().inRange(1));\n test1.next();\n assertTrue(test1.getValue().inRange(2));\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n assertEquals(10, test1.currPos());\n }", "public DNode<E> iterator()\n {\n \treturn first;\t\t\n }", "public abstract List<T> findWithOffsetFromPosition(int from, int amount);", "@Override\n public E next() {\n if (this.hasNext()) {\n curr = curr.nextNode;\n return curr.getData();\n }\n else {\n throw new NoSuchElementException();\n }\n }", "public E next() {\r\n\r\n\t\tE result = null;\r\n\t\tif (hasNext()) {\r\n\t\t\tresult = links.get(counter);\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public T next(){\n return (T)data[ci++];\n }", "public Data getUndefinedDataAt(Address addr);", "public T next(){\r\n return itrArr[position++];\r\n }", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public LinkedList<Address> getInputAddressList() {\n assert(invariant());\n return inputAddressList;\n }", "public Item next() {\n\t\t\tif (!hasNext())\n\t\t\t\treturn null;\n lastAccessed = current;\n Item item = current.item;\n current = current.next; \n index++;\n return item;\n\t\t}", "public Item next() {\r\n if (!hasNext()) throw new NoSuchElementException();\r\n lastAccessed = current;\r\n Item item = current.item;\r\n current = current.next;\r\n index++;\r\n return item;\r\n }", "@Override\n public T next() {\n T n = null;\n if (hasNext()) {\n // Give it to them.\n n = next;\n next = null;\n // Step forward.\n it = it.next;\n stop -= 1;\n } else {\n // Not there!!\n throw new NoSuchElementException();\n }\n return n;\n }", "@Override\n public Integer next() {\n if (hasTop) {\n hasTop = false;\n return top;\n }\n return it.next();\n }", "@Test\n public void testAdd_After_Previous() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.previous();\n\n instance.add(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public abstract int getStartIndex();", "@Override\n public Range next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n if (nextStart >= limitCP) {\n // Switch over from iterating normal code point values to\n // doing the alternate lead-surrogate values.\n doingCodePoints = false;\n nextStart = 0xd800;\n }\n int endOfRange = 0;\n int val = 0;\n int mappedVal = 0;\n\n if (doingCodePoints) {\n // Iteration over code point values.\n val = get(nextStart);\n mappedVal = mapper.map(val);\n endOfRange = rangeEnd(nextStart, limitCP, val);\n // Loop once for each range in the Trie2 with the same raw (unmapped) value.\n // Loop continues so long as the mapped values are the same.\n for (;;) {\n if (endOfRange >= limitCP-1) {\n break;\n }\n val = get(endOfRange+1);\n if (mapper.map(val) != mappedVal) {\n break;\n }\n endOfRange = rangeEnd(endOfRange+1, limitCP, val);\n }\n } else {\n // Iteration over the alternate lead surrogate values.\n val = getFromU16SingleLead((char)nextStart);\n mappedVal = mapper.map(val);\n endOfRange = rangeEndLS((char)nextStart);\n // Loop once for each range in the Trie2 with the same raw (unmapped) value.\n // Loop continues so long as the mapped values are the same.\n for (;;) {\n if (endOfRange >= 0xdbff) {\n break;\n }\n val = getFromU16SingleLead((char)(endOfRange+1));\n if (mapper.map(val) != mappedVal) {\n break;\n }\n endOfRange = rangeEndLS((char)(endOfRange+1));\n }\n }\n returnValue.startCodePoint = nextStart;\n returnValue.endCodePoint = endOfRange;\n returnValue.value = mappedVal;\n returnValue.leadSurrogate = !doingCodePoints;\n nextStart = endOfRange+1;\n return returnValue;\n }", "@Test\n public void testListIterator_valid_index_From_Start() {\n int index = 0;\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator(index);\n assertTrue(isEqual(instance, baseList));\n\n }", "@Override\n public Integer next() {\n if (next == null) {\n throw new NoSuchElementException();\n }\n Integer toReturn = next;\n next = null;\n if (peekingIterator.hasNext()) {\n next = peekingIterator.next();\n }\n return toReturn;\n }", "public long getNextBlock(long address){\n int marker = readMarkerLowerBits(address - 1);\n int blocksize;\n if(marker == 0){\n blocksize = readLengthField(address, 1);\n return address + blocksize + 1;\n } else if(marker == 15){\n return address + 1;\n } else {\n if (isBlockUsed(address)) marker -= 8;\n blocksize = readLengthField(address, marker);\n if (isBlockUsed(address)) {\n return address + blocksize + 2 * (marker - 8) + 1;\n }\n return address + blocksize + 1;\n }\n }", "public MapElement next() {\n return findNext(true);\n }" ]
[ "0.67965794", "0.61520094", "0.5969956", "0.58972174", "0.5892964", "0.5873527", "0.5751115", "0.57193357", "0.57161146", "0.55697215", "0.55434567", "0.55203176", "0.5432688", "0.54269505", "0.5384237", "0.5382553", "0.537039", "0.53638846", "0.5307735", "0.5295009", "0.5227245", "0.52193755", "0.52127737", "0.5187144", "0.5173007", "0.51726913", "0.5165867", "0.5164986", "0.5145805", "0.51272255", "0.51264703", "0.51155376", "0.51140064", "0.5113814", "0.51019454", "0.5101487", "0.5094956", "0.5093335", "0.5087257", "0.50810117", "0.50672495", "0.5061826", "0.5051728", "0.49966285", "0.49941212", "0.49879208", "0.49816647", "0.4945804", "0.4926652", "0.4925302", "0.49109954", "0.49087542", "0.49027953", "0.48957384", "0.48818558", "0.48799327", "0.48719832", "0.4868599", "0.48646688", "0.48598018", "0.48595434", "0.48354393", "0.48344195", "0.48285085", "0.48261952", "0.4825997", "0.48226494", "0.48126873", "0.48000708", "0.47987506", "0.47979668", "0.47861475", "0.47816142", "0.4779638", "0.47795376", "0.4775044", "0.47730947", "0.47718453", "0.477167", "0.47656748", "0.4759774", "0.47506532", "0.4748537", "0.47454754", "0.47444552", "0.47443628", "0.47429433", "0.47409034", "0.47371885", "0.47367126", "0.4733643", "0.47321346", "0.47287583", "0.47276253", "0.47225118", "0.47155043", "0.4713453", "0.4711207", "0.47106767", "0.47087815" ]
0.6973135
0
Get an iterator over the address range(s). Only defined data whose start addresses are contained in the given address set will be returned by the iterator.
public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set<T> getRanges();", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "public AddressSetView getAddressSet() {\n\t\treturn new AddressSet(baseAddress, getEndAddress());\n\t}", "public abstract ucar.array.RangeIterator getRangeIterator();", "public Set<String> zrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new NullPointerException();\n TreeSet<Point2D> inRangeSet = new TreeSet<>();\n for (Point2D point : pointSet) {\n if (rect.contains(point)) {\n inRangeSet.add(point);\n }\n }\n return inRangeSet;\n }", "public static AddressSetView getAddressSet(AddressFactory factory, Address start,\n\t\t\tboolean forward) {\n\t\tAddressSet all = factory.getAddressSet();\n\t\tif (forward) {\n\t\t\tAddress max = all.getMaxAddress();\n\t\t\treturn factory.getAddressSet(start, max);\n\t\t}\n\t\tAddress min = all.getMinAddress();\n\t\treturn factory.getAddressSet(min, start);\n\t}", "@Override\n public Iterator<Range> iterator() {\n return iterator(defaultValueMapper);\n }", "public java.util.List<DataEntry> findAll(int start, int end);", "public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}", "public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "public DataIterator getDefinedData(Address addr, boolean forward);", "public SetOfRanges() {\n RangeSet = new Vector();\n }", "@Override\r\n\tpublic Iterator<GIS_layer> iterator() {\n\t\treturn set.iterator();\r\n\t}", "public Iterable<Point2D> range(RectHV rect) {\n ArrayList<Point2D> returnArray = new ArrayList<Point2D>();\n if (rect == null) {\n throw new IllegalArgumentException(\"rect input is null\");\n }\n for (Point2D i : pointsSet) {\n if (rect.contains(i))\n returnArray.add(i);\n }\n return returnArray;\n }", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "public InstructionIterator getInstructions(Address addr, boolean forward);", "public Iterable<Point2D> range(RectHV rect) {\n\n if (rect == null)\n throw new IllegalArgumentException(\"Got null object in range()\");\n \n Queue<Point2D> pointsInside = new Queue<>();\n \n for (Point2D p : point2DSET) {\n \n double x = p.x();\n double y = p.y();\n if (x >= rect.xmin() && x <= rect.xmax() &&\n y >= rect.ymin() && y <= rect.ymax())\n pointsInside.enqueue(p);\n \n }\n \n return pointsInside;\n }", "private AddressSet getMappedIntersection(MemoryBlock mappedBlock, AddressSet set) {\n\t\tAddressSet mappedIntersection = new AddressSet();\n\t\tList<MemoryBlockSourceInfo> sourceInfos = mappedBlock.getSourceInfos();\n\t\t// mapped blocks can only ever have one sourceInfo\n\t\tMemoryBlockSourceInfo info = sourceInfos.get(0);\n\t\tAddressRange range = info.getMappedRange().get();\n\t\tAddressSet resolvedIntersection = set.intersect(new AddressSet(range));\n\t\tfor (AddressRange resolvedRange : resolvedIntersection) {\n\t\t\tAddressRange mappedRange = getMappedRange(mappedBlock, resolvedRange);\n\t\t\tif (mappedRange != null) {\n\t\t\t\tmappedIntersection.add(mappedRange);\n\t\t\t}\n\t\t}\n\t\treturn mappedIntersection;\n\t}", "private List<Integer> allIntegerInRange(int start, int end) {\n\t\tList<Integer> range = new ArrayList<Integer>();\n\n\t\tfor (int i = start; i <= end; i++) {\n\t\t\trange.add(i);\n\t\t}\n\n\t\treturn range;\n\t}", "public AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly,\n\t\t\tTaskMonitor monitor) throws CancelledException;", "public Set<Tuple> zrangeWithScores(final String key, final long start, final long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrangeWithScores(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) {\n throw new IllegalArgumentException();\n }\n SET<Point2D> result = new SET<Point2D>();\n for (Point2D point : points) {\n if (rect.contains(point))\n result.add(point);\n }\n return result;\n }", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfUsedFor(UByte lowerInclusive, UByte upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.USED_FOR, lowerInclusive, upperInclusive);\n }", "public Iterable<Point2D> range(RectHV rect) {\n SET<Point2D> point_list = new SET<Point2D>();\n rangesearch(root, rect, point_list);\n return point_list;\n }", "@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}", "public IntIterator intIterator(final int start, final int end) {\n\t\treturn new BufferedRangeEWAHintIterator(this, start, end);\n\t}", "public Iterator<Range> iterator(ValueMapper mapper) {\n return new Trie2Iterator(mapper);\n }", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfSource(String lowerInclusive, String upperInclusive) {\n return fetchRange(Income.INCOME.SOURCE, lowerInclusive, upperInclusive);\n }", "public HashSet<Edge> rangeQuery(MBR mbr) {\r\n\t\tthrow new UnsupportedOperationException();\r\n\t}", "public boolean allInRange(int start, int end) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tint a=data[i];\n \t\t\tif ((a<start)||(a>=end)) return false;\n \t\t}\n \t\treturn true;\n \t}", "public Map<Range, List<EndPoint>> getRangeToEndpointMap()\n {\n return ssProxy.getRangeToEndPointMap();\n }", "public AddressInfo getRange() {\r\n return range;\r\n }", "@Override\n public CloseableIterator<KVPair> getRange(byte[] minKey, byte[] maxKey, boolean reverse) {\n Preconditions.checkState(!this.closed.get(), \"transaction closed\");\n return new XodusIter(this.store.openCursor(this.tx), minKey, maxKey, reverse);\n }", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new IllegalArgumentException(\n \"Null pointer provided instead of a query rectangle\");\n ptsInside = new SET<Point2D>();\n searchForPoints(root, rect);\n return ptsInside;\n }", "private void getNextInSet() throws CancelledException {\n\t\t// find next address that has a valid block;\n\t\tAddress addr = getNextAddress(nextAddr);\n\n\t\t// if the instruction's start address is in our set\n\t\t// then we have our block\n\t\tif (addr != null && addrSet.contains(addr)) {\n\t\t\tnextBlock = model.getCodeBlockAt(addr, monitor);\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// otherwise we're out of our current address range in\n\t\t// our address range set so we find the next address range\n\t\t// with a min address >= the instructions address and\n\t\t// look for a block there\n\t\t//nextAddr = instr.getMaxAddress();\n\t\twhile (rangeIter.hasNext()) {\n\t\t\tAddressRange range = rangeIter.next();\n\n\t\t\tif (nextAddr.compareTo(range.getMinAddress()) >= 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnextBlock = getFirstInRange(range);\n\t\t\t// if we find a block we're done\n\t\t\tif (nextBlock != null) {\n\t\t\t\tnextAddr = nextBlock.getMaxAddress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if we find no block then there's no block in the\n\t\t\t// current range and we can move on to the next one\n\t\t}\n\t\tnextBlock = null;\n\t}", "@Override\n public Iterator<Set<E>> iterator() {\n return new DisjointSetIterator(theSet);\n }", "public List<Range> getRanges() {\n // Lazy initialization with double-check.\n List<Range> r = this.ranges;\n if (r == null) {\n synchronized (this) {\n r = this.ranges;\n if (r == null) {\n this.ranges = r = new CopyOnWriteArrayList<Range>();\n }\n }\n }\n return r;\n }", "protected abstract Iterable<E> getIntersecting(D lower, D upper);", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfId(ULong lowerInclusive, ULong upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.ID, lowerInclusive, upperInclusive);\n }", "public List<Address> getAddresses()\n\t{\n\t\treturn getAddresses( getSession().getSessionContext() );\n\t}", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfId(UUID lowerInclusive, UUID upperInclusive) {\n return fetchRange(Income.INCOME.ID, lowerInclusive, upperInclusive);\n }", "Set<MacAddress> neighbors();", "public List<com.ims.dataAccess.tables.pojos.User> fetchRangeOfStreetname(String lowerInclusive, String upperInclusive) {\n return fetchRange(User.USER.STREETNAME, lowerInclusive, upperInclusive);\n }", "public Iterator<GPoint> iterator() {\n\t\treturn points.iterator();\n\t}", "List<MemoryBlockDB> getBlocks(Address start, Address end) {\n\t\tList<MemoryBlockDB> list = new ArrayList<>();\n\n\t\tList<MemoryBlockDB> tmpBlocks = blocks;\n\t\tint index = Collections.binarySearch(tmpBlocks, start, BLOCK_ADDRESS_COMPARATOR);\n\t\tif (index < 0) {\n\t\t\tindex = -index - 2;\n\t\t}\n\t\tif (index >= 0) {\n\t\t\tMemoryBlockDB block = tmpBlocks.get(index);\n\t\t\tif (block.contains(start)) {\n\t\t\t\tlist.add(block);\n\t\t\t}\n\t\t}\n\n\t\twhile (++index < tmpBlocks.size()) {\n\t\t\tMemoryBlockDB block = tmpBlocks.get(index);\n\t\t\tif (block.getStart().compareTo(end) > 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlist.add(block);\n\t\t}\n\n\t\treturn list;\n\t}", "public Iterable<Point2D> range(RectHV rect) {\n //rect\n Queue<Point2D> range = new Queue<Point2D>();\n \n for (Point2D p: bst.keys()) {\n if (rect.contains(p)) {\n range.enqueue(p);\n }\n }\n return range; \n }", "public static List <Index> rangeOf(int start, int end) {\r\n FastTable <Index> list = FastTable.newInstance();\r\n for (int i=start; i < end; i++) {\r\n list.add(Index.valueOf(i));\r\n }\r\n return list;\r\n }", "AllUsersAddresses getAllUsersAddresses();", "protected Iterator getNominationsSet() \n {\n return this.nominations.iterator();\n }", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfState(UByte lowerInclusive, UByte upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.STATE, lowerInclusive, upperInclusive);\n }", "public Iterable<Point2D> range(RectHV rect) {\n SET<Point2D> result = new SET<Point2D>();\n if (root == null) {\n return result;\n }\n\n range(root, rect, result);\n return result;\n }", "public Set<String> zrevrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrevrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public java.util.List<DataEntry> findByDataSetId(\n\t\tlong dataSetId, int start, int end);", "public abstract Collection<IRelation> getStartingRelations(String elementUri);", "public DataIterator getCompositeData(Address start, boolean forward);", "@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new SetIterator();\n }", "public Collection<Address> getAddressCollection(){\r\n\t\treturn addressCollection;\r\n\t}", "Set<URI> fetchAllUris(ServicePath service);", "public Set<AddressEntry> getEntry() {\n return entrySet;\n }", "public abstract java.util.Set getLocations();", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfEmailId(ULong lowerInclusive, ULong upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.EMAIL_ID, lowerInclusive, upperInclusive);\n }", "public Iterator iterator()\n {\n return new HashSetIterator();\n }", "public List<String> lrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.lrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public DataIterator getData(Address addr, boolean forward);", "public Range findRangeBounds(CategoryDataset dataset) { return findRangeBounds(dataset, true); }", "abstract public Iterator<BlockReportReplica> iterator();", "public Iterator<T> iterator() {\n return new SetIterator<T>(this.head);\n }", "public <T> List<T> zrange(String key, long start, long end, Class<T> clazz) {\n List<T> result = new ArrayList<T>();\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n Set<byte[]> tempSet = jedis.zrange(key.getBytes(), start, end);\n if (tempSet != null && tempSet.size() > 0) {\n for (byte[] value : tempSet) {\n // result.add((T) HessianSerializer.deserialize(value));\n result.add(fromJsonByteArray(value, clazz));\n }\n return result;\n }\n return null;\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "private static EntityIterator getEntityIterator(Schematic schematic, Location location) {\n var iterator = new EntityIterator();\n\n var world = location.getWorld();\n var offset = new Vector3i(location.getBlockX(), location.getBlockY(), location.getBlockZ());\n offset.sub(schematic.getOrigin());\n\n var min = schematic.getMinimumPoint().add(offset, new Vector3i());\n var max = schematic.getMaximumPoint().add(offset, new Vector3i());\n\n for (var entity : world.getEntities()) {\n var eLoc = entity.getLocation();\n if (isInBounds(eLoc, min, max))\n iterator.addEntity(entity);\n }\n\n return iterator;\n }", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfUserId(ULong lowerInclusive, ULong upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.USER_ID, lowerInclusive, upperInclusive);\n }", "public Iterator<Integer> fromA() {return this.fromA.iterator();}", "public Iterable<Point2D> range(RectHV rect) \n\t {\n\t\t if(rect==null)\n\t\t\t throw new java.lang.NullPointerException();\n\t\t LinkedQueue<Point2D> insidePoints = new LinkedQueue<Point2D>();\n\t\t range(root,rect.xmin(),rect.ymin(),rect.xmax(),rect.ymax(),insidePoints,true);\n\t\t return insidePoints;\n\t }", "Iterator<T> iterator(int start, int limit);", "public LinkedList<Address> getInputAddressList() {\n assert(invariant());\n return inputAddressList;\n }", "public static Automaton.List rangeOf(Automaton automaton,\n\t\t\tAutomaton.Int _start, Automaton.Int _end) {\n\t\t// FIXME: there is a bug here for big integer values.\n\t\tint start = _start.intValue();\n\t\tint end = _end.intValue();\n\t\tint[] children = new int[end - start];\n\t\tfor (int i = 0; i < children.length; ++i, ++start) {\n\t\t\tchildren[i] = automaton.add(new Automaton.Int(start));\n\t\t}\n\t\treturn new Automaton.List(children);\n\t}", "public java.util.List<DataEntry> findByCopiedFrom(\n\t\tlong copiedFrom, int start, int end);", "public Iterable<Point2D> range(RectHV rect) {\n Queue<Point2D> pointsInRect = new Queue<Point2D>();\n range(root, rect, pointsInRect);\n return pointsInRect;\n }", "public java.util.List<ProductSpecificationMapping> findAll(\n\t\tint start, int end);", "public RealRange getReferenceRange(RealRange referenceRange);", "public List<Address> getAllAddresses() throws BackendException;", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "public Iterable<Point2D> range(RectHV rect) {\n TreeSet<Point2D> ret = new TreeSet<Point2D>();\n for (Point2D p: mPoints) {\n if (rect.contains(p)) {\n ret.add(p);\n }\n }\n return ret;\n }", "public List<cn.edu.nju.teamwiki.jooq.tables.pojos.Document> fetchRangeOfSourceId(Integer lowerInclusive, Integer upperInclusive) {\n return fetchRange(Document.DOCUMENT.SOURCE_ID, lowerInclusive, upperInclusive);\n }", "public RangesByEndpoint getAddressReplicas(TokenMetadata metadata)\n {\n RangesByEndpoint.Builder map = new RangesByEndpoint.Builder();\n\n for (Token token : metadata.sortedTokens())\n {\n Range<Token> range = metadata.getPrimaryRangeFor(token);\n for (Replica replica : calculateNaturalReplicas(token, metadata))\n {\n // LocalStrategy always returns (min, min] ranges for it's replicas, so we skip the check here\n Preconditions.checkState(range.equals(replica.range()) || this instanceof LocalStrategy);\n map.put(replica.endpoint(), replica);\n }\n }\n\n return map.build();\n }", "public static void pinAddressesInRange(HashMap<String, Object> argVals,HashMap<String, Object> retVals) \n\t\tthrows IOException, ParserConfigurationException, SAXException{\n\t\t\n\t\tString origin = (String)argVals.get(\"startAddress\");\n\t\tlong range = (java.lang.Long)argVals.get(\"range\");\n\t\tLinkedList<String> addresses = (LinkedList<String>)argVals.get(\"address\");\n\t\tLinkedList<String> comments = (LinkedList<String>)argVals.get(\"addressInfo\");\n\t\tLinkedList<String> survivedComments = new LinkedList<String>();\n\t\tLinkedList<String> survivedAddr = new LinkedList<String>();\n\t\t\n\t\tfor(int i=0;i<addresses.size();i++){\n\t\t\tString addr = addresses.get(i);\n\t\t\tif(getShortestDistance(origin, addr) < range){\n\t\t\t\tsurvivedAddr.add(addr);\n\t\t\t\tif(comments.size()>i)\n\t\t\t\t\tsurvivedComments.add(comments.get(i));\n\t\t\t}\n\t\t}\n\t\tsurvivedAddr.add(origin);\n\t\t\n\t\tString url = \"\";\n\t\t\n\t\tfor(int i=0;i<survivedAddr.size();i++){\n\t\t\tif(survivedAddr.get(i)!=null){\n\t\t\t\tif(i==0){\n\t\t\t\t\turl = ((String)survivedAddr.get(i)).replace(\" \", \"+\")+'&';\n\t\t\t\t}\n\t\t\t\turl += ((String)survivedAddr.get(i)).replace(\" \", \"+\")+'&';\n\t\t\t}\n\t\t}\n\t\tshowMap(survivedAddr,survivedComments,true);\n\t\t\n\t}", "public Iterator<V> get(final K key, final int startIndex, final int endIndex) {\n throwIfNullKey(key);\n if (startIndex < 0) {\n throw new IndexOutOfBoundsException(\"negative indices are not supported\");\n }\n if (startIndex > endIndex) {\n throw new IndexOutOfBoundsException(\"start index exceeds end index\");\n }\n final int count = getCount(key);\n if (count < endIndex) {\n throw new IndexOutOfBoundsException(\"end index \" + endIndex + \" requested but there \"\n + (count == 1 ? \"is\" : \"are\") + \" \" + count + \" \" + (count == 1 ? \"entry\" : \"entries\"));\n }\n return new FCOneToManyRelationIterator<>(associationMap, key, startIndex, endIndex);\n }", "public Iterable<Point2D> range(RectHV rect) {\n checkNull(rect);\n LinkedList<Point2D> pointList = new LinkedList<Point2D>();\n\n range(rect, root, pointList);\n\n return pointList;\n }", "public List<Address> getAddresses() {\r\n\r\n if (this.addresses == null) {\r\n\r\n this.addresses = new ArrayList<Address>();\r\n\r\n }\r\n\r\n return this.addresses;\r\n\r\n }", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new IllegalArgumentException(\"range: RectHV is null\");\n Queue<Point2D> q = new Queue<>();\n rangeSearch(root, rect, q);\n return q;\n }", "protected abstract R getRange(E entry);", "public Iterator getBindings() {\r\n\t\treturn bindings == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(bindings.values());\r\n\t}", "protected static IPRange.RangeSet getIPFilter() {\n if (filterRanges == null) {\n try {\n filterRanges = IPRange.paraseRangeSet(ipFilter);\n } catch (Throwable e) {\n Exceptions.handle()\n .to(LOG)\n .error(e)\n .withSystemErrorMessage(\n \"Error parsing config value: 'http.firewall.filterIPs': %s (%s). Defaulting to localhost!\")\n .handle();\n filterRanges = IPRange.LOCALHOST;\n }\n }\n\n return filterRanges;\n }", "List<Account> findByAddressStartingWith(String startAddress);", "public List<cn.edu.nju.teamwiki.jooq.tables.pojos.Document> fetchRangeOfUrl(String lowerInclusive, String upperInclusive) {\n return fetchRange(Document.DOCUMENT.URL, lowerInclusive, upperInclusive);\n }", "@Override\n\tpublic List<IRange> getRangeList() {\n\t\treturn null;\n\t}" ]
[ "0.6228045", "0.6122643", "0.6074604", "0.58515525", "0.5769331", "0.5703052", "0.56959945", "0.56088835", "0.56042874", "0.55398875", "0.5489035", "0.5438481", "0.5423378", "0.540978", "0.54052395", "0.5360099", "0.5334067", "0.52720433", "0.52549094", "0.52306646", "0.5227572", "0.5222395", "0.51526815", "0.51507413", "0.5102993", "0.50843596", "0.5083499", "0.50707215", "0.50434643", "0.50232637", "0.50220317", "0.50189596", "0.5015786", "0.5015401", "0.50105387", "0.4996413", "0.49919719", "0.499163", "0.49839607", "0.4969396", "0.49626446", "0.49467582", "0.49341044", "0.49275208", "0.49215284", "0.4920189", "0.49160215", "0.4911544", "0.48937866", "0.48835823", "0.48612472", "0.4857401", "0.48534784", "0.48418292", "0.48407653", "0.48354927", "0.48237428", "0.48202524", "0.48144102", "0.48021832", "0.47937185", "0.47887167", "0.4782679", "0.4780384", "0.47803608", "0.47785428", "0.47725567", "0.47714326", "0.47687918", "0.47579873", "0.47555885", "0.47479492", "0.47441003", "0.4738613", "0.4720198", "0.47151354", "0.47119075", "0.46907213", "0.46899042", "0.46867153", "0.46693885", "0.46643692", "0.46631956", "0.4655895", "0.46537808", "0.46480364", "0.46480286", "0.46440396", "0.46416554", "0.46395925", "0.46362358", "0.46344024", "0.46314532", "0.463034", "0.46298382", "0.46254644", "0.462416", "0.46235955", "0.46200392", "0.46179295" ]
0.6290369
0
get the Data (undefined) object that starts at the given address.
public Data getUndefinedDataAt(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data getDataAt(Address addr);", "public Data getDefinedDataAt(Address addr);", "public Data getDataBefore(Address addr);", "public Data getDataAfter(Address addr);", "public Data getDefinedDataAfter(Address addr);", "public Data getDefinedDataBefore(Address addr);", "public Data getDefinedDataContaining(Address addr);", "public Data getDataContaining(Address addr);", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);", "public DataIterator getData(Address addr, boolean forward);", "public byte get(int addr) {\n return data[addr - start];\n }", "public DataIterator getDefinedData(Address addr, boolean forward);", "private LogData getDefaultLogData(long address) {\n ByteBuf b = Unpooled.buffer();\n Serializers.CORFU.serialize(PAYLOAD_DATA.getBytes(), b);\n LogData ld = new LogData(DataType.DATA, b);\n ld.setGlobalAddress(address);\n ld.setEpoch(1L);\n return ld;\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "public abstract byte[] readData(int address, int length);", "public Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);", "AddressI getAddress();", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "protected byte direct_read(int address) {\n return segment_data[address];\n }", "public SelectMapedBufferResult getData(final long offset) {\n return this.getData(offset, (0 == offset ? true : false));\n }", "@Override\n public Pointer addressPointer() {\n val tempPtr = new PagedPointer(ptrDataBuffer.primaryBuffer());\n\n switch (this.type) {\n case DOUBLE: return tempPtr.asDoublePointer();\n case FLOAT: return tempPtr.asFloatPointer();\n case UINT16:\n case SHORT:\n case BFLOAT16:\n case HALF: return tempPtr.asShortPointer();\n case UINT32:\n case INT: return tempPtr.asIntPointer();\n case UBYTE:\n case BYTE: return tempPtr.asBytePointer();\n case UINT64:\n case LONG: return tempPtr.asLongPointer();\n case BOOL: return tempPtr.asBoolPointer();\n default: return tempPtr.asBytePointer();\n }\n }", "long getAddress(ByteBuffer buffer);", "public Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;", "public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }", "public Address getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "public byte get(int address) {\n try {\n return direct_read(address);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "public ByteBuffer read(long address)\n {\n return tryRead(address, null);\n }", "public Address getValue() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "com.google.protobuf.ByteString getAddressBytes();", "public InetSocketAddress getDataAddress()\n {\n return rtpTarget;\n }", "public byte[] searchReturnData(short addressInDataBlock) {\n //take initial and size binary from memory\n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //if 0 no have data\n if (initial == 0 && sizeData == 0) {\n return null;\n }\n\n //return data\n byte[] toReturn = new byte[sizeData];\n \n int j = 0;\n for (short i = initial; i < initial + sizeData; i++) {\n toReturn[j] = serialize[i];\n j++;\n }\n\n return toReturn;\n }", "public synchronized ILogData handleRetrieval(long address) {\n LogData entry = streamLog.read(address);\n log.trace(\"Retrieved[{} : {}]\", address, entry);\n return entry;\n }", "public long getAddress() {\n return origin + originOffset;\n }", "public int getAddress() {\n return address;\n }", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "@Override\r\n\t\tpublic int getAO(int address) throws IOServiceException {\n\t\t\treturn 0;\r\n\t\t}", "Object getData();", "Object getData();", "@Override\n\tpublic Address getAddress() {\n\t\treturn (Address)map.get(ADDRESS);\n\t}", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address, boolean withSum) {\n return getAddressData(address.toString(), withSum);\n }", "public byte get(int addr) throws ProgramException {\n return getSegment(addr, true).get(addr);\n }", "public static int offset_addr() {\n return (0 / 8);\n }", "public InetSocketAddress getAddress ( ) {\n\t\treturn extract ( handle -> handle.getAddress ( ) );\n\t}", "public byte[] getAddress() {\n\t\treturn address;\n\t}", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "db.fennec.proto.FDataEntryProto getData(int index);", "public int getAddress() {\n return mAddress;\n }", "String getStartAddress();", "public int getAddress()\n {\n return address;\n }", "Object firstData() {\n\t\t// por defecto enviamos null\n\t\treturn null;\n\t}", "public Address getDummyAddress(String name) {\n\t\t if(name.equalsIgnoreCase(\"A\")) return new Address(0xAAAAAAAA);\n\t\telse if(name.equalsIgnoreCase(\"B\")) return new Address(0xBBBBBBBB);\n\t\telse if(name.equalsIgnoreCase(\"C\")) return new Address(0xCCCCCCCC);\n\t\telse if(name.equalsIgnoreCase(\"D\")) return new Address(0xDDDDDDDD);\n\t\telse if(name.equalsIgnoreCase(\"E\")) return new Address(0xEEEEEEEE);\n\t\telse if(name.equalsIgnoreCase(\"F\")) return new Address(0xFFFFFFFF);\n\t\treturn new Address(0);\n\t}", "com.google.protobuf.ByteString getData(int index);", "com.google.protobuf.ByteString getData(int index);", "com.google.protobuf.ByteString\n getAddressBytes();", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "public E getData(int pos) {\n\t\tif (pos >= 0 && pos < dataSize()) {\n\t\t\treturn data.get(pos);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "private LogData readEntry(FileHandle fh, long address)\n throws IOException {\n ByteBuffer o = fh.getMapForRegion(64, (int) fh.getChannel().size());\n while (o.hasRemaining()) {\n short magic = o.getShort();\n if (magic != 0x4C45) {\n return null;\n }\n short flags = o.getShort();\n long addr = o.getLong();\n if (address == -1) {\n //Todo(Maithem) : maybe we can move this to getChannelForAddress\n fh.knownAddresses.add(addr);\n }\n int size = o.getInt();\n if (addr != address) {\n o.position(o.position() + size - 16); //skip over (size-20 is what we haven't read).\n log.trace(\"Read address {}, not match {}, skipping. (remain={})\", addr, address, o.remaining());\n } else {\n log.debug(\"Entry at {} hit, reading (size={}).\", address, size);\n if (flags % 2 == 0) {\n log.error(\"Read a log entry but the write was torn, aborting!\");\n throw new IOException(\"Torn write detected!\");\n }\n int metadataMapSize = o.getInt();\n ByteBuf mBuf = Unpooled.wrappedBuffer(o.slice());\n o.position(o.position() + metadataMapSize);\n ByteBuffer dBuf = o.slice();\n dBuf.limit(size - metadataMapSize - 24);\n return new LogData(Unpooled.wrappedBuffer(dBuf),\n ICorfuPayload.enumMapFromBuffer(mBuf, IMetadata.LogUnitMetadataType.class, Object.class));\n }\n }\n return null;\n }", "public NodeRef getDataNode(String ip) {\r\n\t\treturn nodeMap.get(ip);\r\n\t}", "Optional<MemoryAddress> lookup(String name);", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "public A getData()\n\t{\n\t\treturn data;\n\t}", "public static Address getARandomAddress(){\n Address address = RandomAddress.get().next();\n return address;\n }", "E getData(int index);", "public Address getStartAddress() {\n\t\treturn baseAddress;\n\t}", "String getAddress(int type);", "com.google.protobuf.ByteString\n getAddressBytes();", "com.google.protobuf.ByteString\n getAddressBytes();", "com.google.protobuf.ByteString\n getAddressBytes();", "public Data createData(Address addr, DataType dataType, int length)\n\t\t\tthrows CodeUnitInsertionException;", "public java.lang.String getAddress() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.lang.String) __getCache(\"address\")));\n }", "public T getData() {\n return this.first;\n }", "@Nonnull\n public Pointer resolvePointer(@Nonnegative long offset) {\n Pointer address = this.baseAddress;\n\n for (long deepOffset : this.offsets) {\n address = this.readPointer(address).share(deepOffset);\n }\n\n return address.share(offset);\n }", "Object getData() { /* package access */\n\t\treturn data;\n\t}", "public Call<BCExplorerResult<AddressData>> getAddressData(String address, boolean withSum) {\n return getInstantService().balance(address, withSum ? 1 : 0);\n }", "public int getReturnAddressOffset();", "public T getData(int index){\n if(index < 0 || index >= data.size())\n return null;\n\n //give back the data\n return data.get(index);\n }", "public org.xmlsoap.schemas.wsdl.soap.TAddress getAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().find_element_user(ADDRESS$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public Instruction getInstructionAt(Address addr);", "public DeviceData() {\r\n this.rtAddress = 0;\r\n this.subAddress = 0;\r\n this.txRx = 0;\r\n this.data = new short[32];\r\n }", "public static String readDiskMemory(String address){\n\t\treturn memory.get(address);\n\t}", "com.google.protobuf.ByteString getQueryAddress();", "String getAddress();", "String getAddress();", "public Adress getAdress() {\r\n // Bouml preserved body begin 00040C02\r\n\t return adress;\r\n // Bouml preserved body end 00040C02\r\n }", "public DatadogBuilder address(InetSocketAddress address) {\n this.address = address;\n return this;\n }", "public InternetAddress getFromAddress();", "public Object getData();", "public java.lang.String getFromAddress() {\n\t\treturn fromAddress;\n\t}", "public Address getAddress(){\n\t\treturn address;\n\t}", "public DataIterator getCompositeData(Address start, boolean forward);" ]
[ "0.7829817", "0.74704087", "0.7208945", "0.71597904", "0.71210057", "0.70542854", "0.70189935", "0.6931579", "0.6628073", "0.6372534", "0.63447875", "0.6316183", "0.6147194", "0.61142355", "0.60443974", "0.5969283", "0.58910257", "0.5759728", "0.5744401", "0.5696534", "0.5696336", "0.5691126", "0.56859165", "0.55900955", "0.55683964", "0.5567765", "0.5496896", "0.54652876", "0.54368484", "0.5428082", "0.5415116", "0.5390044", "0.5366311", "0.5339091", "0.5279318", "0.5268768", "0.5260408", "0.5253839", "0.52462465", "0.52378947", "0.522501", "0.521906", "0.521906", "0.520924", "0.5207007", "0.51961523", "0.5170874", "0.5168444", "0.5165022", "0.51598644", "0.51485515", "0.5138957", "0.513889", "0.51379925", "0.51361334", "0.51355344", "0.5126503", "0.5126503", "0.511908", "0.5103498", "0.50983226", "0.5095517", "0.5082673", "0.5067771", "0.506642", "0.506642", "0.506642", "0.506642", "0.506642", "0.506642", "0.50646734", "0.50637347", "0.5035505", "0.50085694", "0.500746", "0.49954924", "0.49954924", "0.49954924", "0.49943382", "0.49912432", "0.4987891", "0.49846378", "0.49809518", "0.49637955", "0.49590477", "0.49589616", "0.49559903", "0.49507946", "0.4938277", "0.49309406", "0.49282724", "0.49234056", "0.49234056", "0.49049532", "0.490116", "0.48996264", "0.489555", "0.48893905", "0.4888625", "0.4886734" ]
0.7416704
2
Get the undefined Data object that starts at an address that is greater than the given address. This operation can be slow for large programs so a TaskMonitor is required.
public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data getDefinedDataBefore(Address addr);", "public Data getDataBefore(Address addr);", "public Data getDataAfter(Address addr);", "public Data getDefinedDataAfter(Address addr);", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "public Data getUndefinedDataAt(Address addr);", "public Data getDefinedDataContaining(Address addr);", "public Data getDefinedDataAt(Address addr);", "public Data getDataContaining(Address addr);", "public Data getDataAt(Address addr);", "public DataIterator getDefinedData(Address addr, boolean forward);", "public Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "long getAddress(ByteBuffer buffer);", "public byte get(int addr) {\n return data[addr - start];\n }", "Optional<MemoryAddress> lookup(String name);", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "public long memoryAddress()\r\n/* 143: */ {\r\n/* 144:172 */ throw new UnsupportedOperationException();\r\n/* 145: */ }", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public boolean hasMemoryAddress()\r\n/* 138: */ {\r\n/* 139:167 */ return false;\r\n/* 140: */ }", "public byte[] searchReturnData(short addressInDataBlock) {\n //take initial and size binary from memory\n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //if 0 no have data\n if (initial == 0 && sizeData == 0) {\n return null;\n }\n\n //return data\n byte[] toReturn = new byte[sizeData];\n \n int j = 0;\n for (short i = initial; i < initial + sizeData; i++) {\n toReturn[j] = serialize[i];\n j++;\n }\n\n return toReturn;\n }", "private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }", "public static int offset_addr() {\n return (0 / 8);\n }", "default AddressRange range(Address address, long length) {\n\t\ttry {\n\t\t\treturn new AddressRangeImpl(address, length);\n\t\t}\n\t\tcatch (AddressOverflowException e) {\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "public DataIterator getData(Address addr, boolean forward);", "protected byte direct_read(int address) {\n return segment_data[address];\n }", "public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}", "public byte get(int address) {\n try {\n return direct_read(address);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "static int memory_address_hl(){\n\t\tint hl_address = hexa_to_deci(registers.get('H')+registers.get('L'));\n\t\treturn hl_address;\n\t}", "public ByteBuffer read(long address)\n {\n return tryRead(address, null);\n }", "public Boolean boundaryCheck(int addr) {\r\n\t\t// Make sure address is less than LIMIT and SP, and greater than base\r\n\t\tif (addr < getLIM() && addr < getSP() && addr >= getBASE()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tm_TH.interruptIllegalMemoryAccess(addr);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public int getReturnAddressOffset();", "public Instruction getInstructionContaining(Address addr);", "public static Range<Long> atLeastMaybeScratch(long start) {\n\t\tif (start < 0) {\n\t\t\treturn Range.closed(start, -1L);\n\t\t}\n\t\treturn Range.atLeast(start);\n\t}", "public static int lowerBound(int[] arr, int data) {\n int ans = -1, low = 0, high = arr.length - 1;\n while (low <= high) {\n int mid = (low + high) / 2;\n if (arr[mid] == data) {\n ans = mid;\n high = mid - 1;\n } else if (data < arr[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return ans;\n }", "public Address getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "TrackingToken lowerBound();", "public Instruction getInstructionBefore(Address addr);", "protected RecordHeader getRecordAt(long targetFp) throws IOException {\n for (RecordHeader next : getMemIndex().values()) {\n if (targetFp >= next.dataPointer &&\n targetFp < next.dataPointer + (long)next.dataCapacity) {\n return next;\n }\n }\n return null;\n }", "private int[] findPointer() {\n \n int initialAux = 4095;\n int header = 0;\n \n \n for (int i = 0; i < 4096; i++) {\n String initialBinary = Integer.toBinaryString(0xFF & serialize[i * 4]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[i * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n \n if (initial == 0 && sizeData == 0) {\n header = i*4;\n break;\n }\n //get the higher initial \n if (initialAux > initial){\n initialAux = initial;\n }\n \n }\n\n int[] toReturn = new int[2];\n \n toReturn[0] = header;\n toReturn[1] = initialAux-1;\n \n return toReturn;\n }", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "private WALPointer tailPointer(WALPointer from) throws IgniteCheckedException {\n WALIterator it = cctx.wal().replay(from);\n\n try {\n while (it.hasNextX()) {\n IgniteBiTuple<WALPointer, WALRecord> rec = it.nextX();\n\n if (rec == null)\n break;\n }\n }\n finally {\n it.close();\n }\n\n return it.lastRead().map(WALPointer::next).orElse(null);\n }", "public boolean hasADDRESSIND() {\n return fieldSetFlags()[8];\n }", "public abstract Address getBootHeapStart();", "public int relativePosTo(long addr) {\n\t\t\tif(addr < this.start)\n\t\t\t\treturn -1;\n\t\t\tif(addr > this.end)\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "public static int offsetBits_addr() {\n return 0;\n }", "private LogData readEntry(FileHandle fh, long address)\n throws IOException {\n ByteBuffer o = fh.getMapForRegion(64, (int) fh.getChannel().size());\n while (o.hasRemaining()) {\n short magic = o.getShort();\n if (magic != 0x4C45) {\n return null;\n }\n short flags = o.getShort();\n long addr = o.getLong();\n if (address == -1) {\n //Todo(Maithem) : maybe we can move this to getChannelForAddress\n fh.knownAddresses.add(addr);\n }\n int size = o.getInt();\n if (addr != address) {\n o.position(o.position() + size - 16); //skip over (size-20 is what we haven't read).\n log.trace(\"Read address {}, not match {}, skipping. (remain={})\", addr, address, o.remaining());\n } else {\n log.debug(\"Entry at {} hit, reading (size={}).\", address, size);\n if (flags % 2 == 0) {\n log.error(\"Read a log entry but the write was torn, aborting!\");\n throw new IOException(\"Torn write detected!\");\n }\n int metadataMapSize = o.getInt();\n ByteBuf mBuf = Unpooled.wrappedBuffer(o.slice());\n o.position(o.position() + metadataMapSize);\n ByteBuffer dBuf = o.slice();\n dBuf.limit(size - metadataMapSize - 24);\n return new LogData(Unpooled.wrappedBuffer(dBuf),\n ICorfuPayload.enumMapFromBuffer(mBuf, IMetadata.LogUnitMetadataType.class, Object.class));\n }\n }\n return null;\n }", "public node_data heapMinimum(){return _a[0];}", "public NodeDB.NodeInfo getNodeByInetAddress(InetAddress a) { synchronized (this.nodedb) {\n\t\tfor (NodeInfo ni : this.nodedb.values()) {\n\t\t\tif (ni.nodecomms.getAddress().equals(a))\n\t\t\t\treturn ni;\n\t\t}\n\t\treturn null;\n\t}}", "public Function getFunctionContaining(Address addr);", "public Instruction getInstructionAfter(Address addr);", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "private int checkMemLocation(int location) {\n if (location < memory.length && location >= 0) {\n return location;\n }\n throw new MemoryOutOfBounds(memory.length, location);\n }", "@Override\n public Pointer addressPointer() {\n val tempPtr = new PagedPointer(ptrDataBuffer.primaryBuffer());\n\n switch (this.type) {\n case DOUBLE: return tempPtr.asDoublePointer();\n case FLOAT: return tempPtr.asFloatPointer();\n case UINT16:\n case SHORT:\n case BFLOAT16:\n case HALF: return tempPtr.asShortPointer();\n case UINT32:\n case INT: return tempPtr.asIntPointer();\n case UBYTE:\n case BYTE: return tempPtr.asBytePointer();\n case UINT64:\n case LONG: return tempPtr.asLongPointer();\n case BOOL: return tempPtr.asBoolPointer();\n default: return tempPtr.asBytePointer();\n }\n }", "protected abstract void onAddressAllocated(int logicalAddress);", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "private int findBlock(long addr) {\n\t\t// find cache by splitting addr into multiple segs\n\t\tint setIndex = (int) ((addr & 0x7FC0) >>> 6);\n\t\tlong tag = (addr & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t// search for the set to check for existence\n\t\tfor (int j = 0; j < 8; j++) {\n\t\t\tif (cache[setIndex][j] == tag) {\n\t\t\t\tpolicies[setIndex].updateAt(j);\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t}\n\t\tif(usePrefetch){\n\t\t\t//fetch from memory; preftecher will fetch many other relevant addresses\n\t\t\tArrayList<Long> address = pf.getPrefetchedAddress(addr);\n\t\t\tfor(long add : address) {\n\t\t\t\tsetIndex = (int) ((add & 0x7FC0) >>> 6);\n\t\t\t\ttag = (add & 0x3FFFFFFFFFFF8000l) >>> 15;\n\t\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\t\tcache[setIndex][index] = tag;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tint index = policies[setIndex].getNextIndex();\n\t\t\tcache[setIndex][index] = tag;\n\t\t}\n\t\t// after all, we need to update the entry\n\t\treturn 4;\n\t}", "AddressI getAddress();", "private LogData getDefaultLogData(long address) {\n ByteBuf b = Unpooled.buffer();\n Serializers.CORFU.serialize(PAYLOAD_DATA.getBytes(), b);\n LogData ld = new LogData(DataType.DATA, b);\n ld.setGlobalAddress(address);\n ld.setEpoch(1L);\n return ld;\n }", "private int AbsoluteIndirectSlow()\n\t{\n\t\tint uint16addr2 = GetWord( Immediate16SlowRead() );\n\t\tglobals.OpenBus = uint16addr2 >>> 8;\n\t\treturn uint16addr2;\n\t}", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "public int getLowerBound ();", "public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "private Segment getSegment(int addr, boolean get) throws ProgramException {\n Set<Segment> found = memory.get(addr);\n if (found.isEmpty()) {\n throw new ProgramException(get ? ErrorType.ADDRL : ErrorType.ADDRS);\n }\n return found.iterator().next();\n }", "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "public frameTableElement findVictimLRU(){\n int smallestLastReferenceTime = Integer.MAX_VALUE;\n frameTableElement correspondingElement = null;\n\n for(int i=0; i< frameTable.getSize(); i++){\n frameTableElement currElement = frameTable.getElement(i);\n if(currElement.getLastTimeReferenced() < smallestLastReferenceTime){\n smallestLastReferenceTime = currElement.getLastTimeReferenced();\n correspondingElement = currElement;\n }\n }\n\n return correspondingElement;\n }", "public int rva2offset(Address address) {\n\t\tint offset = -1;\n\t\tfor(IMAGE_SECTION_HEADER section:peFileSections) {\n\t\t\tif(address.getAddr32() >= section.getVirtualAddress()\n\t\t\t&& address.getAddr32() < section.getVirtualAddress() + section.getVirtualSize()) {\n\t\t\t\toffset = address.getAddr32() - section.getVirtualAddress() + section.getPointerToRawData();\n\t\t\t\treturn offset;\n\t\t\t}\n\t\t}\n\t\tif(address.getAddr32() < peOptionalHeader.getSizeOfHeaders())\n\t\t\treturn address.getAddr32();\n\t\treturn offset;\n\t}", "public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }", "static int findraslot(Memory mem, int addr) {\r\n\t\t// afbf0020 sw [sp +32] = ra\r\n\t\tfor (int n = 0; n < 8; n++) {\r\n\t\t\tint isn = mem.load_word(addr + (n * 4));\r\n\t\t\tif ((isn & 0xffff0000) == 0xafbf0000) {\r\n\t\t\t\tshort imm = (short) isn;\r\n\t\t\t\treturn imm;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public abstract Address getBootHeapEnd();", "public boolean isSetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FROMADDRESS$6) != 0;\n }\n }", "boolean isAddressOf(int addr) {\n return addr == mAddress;\n }", "private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }", "public boolean isReadOnlyMemoryAddress(int address) {\n return (address >= 0) && (getMemory(address) instanceof ReadOnlyMemory);\n }", "@Test\n public void testAddressExhaustion() throws Exception {\n mRepo.updateParams(new IpPrefix(TEST_SERVER_ADDR, 28), TEST_EXCL_SET, TEST_LEASE_TIME_MS,\n null /* clientAddr */);\n\n // /28 should have 16 addresses, 14 w/o the first/last, 11 w/o excluded addresses\n requestAddresses((byte) 11);\n verify(mCallbacks, times(11)).onLeasesChanged(any());\n\n try {\n mRepo.getOffer(null, TEST_MAC_2,\n IPV4_ADDR_ANY /* relayAddr */, INETADDR_UNSPEC /* reqAddr */, HOSTNAME_NONE);\n fail(\"Should be out of addresses\");\n } catch (DhcpLeaseRepository.OutOfAddressesException e) {\n // Expected\n }\n verifyNoMoreInteractions(mCallbacks);\n }", "public abstract byte[] readData(int address, int length);", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "public static String readDiskMemory(String address){\n\t\treturn memory.get(address);\n\t}", "public ByteBuffer getUnboundedValue(T key) {\n int index = evaluator.evaluate(key);\n if (index < 0) {\n return null;\n }\n return mappedBuffer.asReadOnlyBuffer().position(offsets[index]).order(ByteOrder.LITTLE_ENDIAN);\n }", "public int getLowerBound() {\r\n return lowerBound;\r\n }", "public CodeUnit getCodeUnitBefore(Address addr);", "public Block allocateAt(long p) {\n for (Block b : freeSpace) {\n if (b.start == p)\n return checkout(b, b.length);\n }\n return null;\n }", "private static long getFirstOffset(long currentOffset, int limit) {\n\t\tlong firstOffset = currentOffset;\n\n\t\twhile(firstOffset > limit) {\n\t\t\tfirstOffset -= limit;\n\t\t}\n\n\t\treturn firstOffset;\n\t}", "public long getAddress() {\n return origin + originOffset;\n }", "int sizeOfAddressHistoryArray();", "public IORequest SSTF(int deviceNumber, IORequest oldhead) {\n\n IORequest closest = null;\n int min = Integer.MIN_VALUE;\n\n //disk scheduling\n try {\n int hedlo = machine.memory.load(Process_Table[oldhead.prognum].base + Process_Table[oldhead.prognum].acc + 2) + machine.memory.load(Process_Table[oldhead.prognum].base + Process_Table[currentProcess].acc + 3);\n for (IORequest request : waitQ[deviceNumber]) {\n int zzzstart = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 2);\n //System.out.println(zzzstart);\n int distance = Math.abs(hedlo-zzzstart );\n\n //if its the closest to the headlocation \n if (distance > min) {\n closest = request;\n min = distance;\n\n }\n \n }\n waitQ[deviceNumber].remove(closest);\n \n waitQ[deviceNumber].addFirst(closest);\n\n } catch (MemoryFault ex) {\n Logger.getLogger(OperatingSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return closest;\n }", "com.google.protobuf.ByteString getQueryAddress();", "public void unsetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FROMADDRESS$6, 0);\n }\n }", "com.google.protobuf.ByteString getAddressBytes();", "public Address getValue() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "@Nonnull\n public Pointer resolvePointer(@Nonnegative long offset) {\n Pointer address = this.baseAddress;\n\n for (long deepOffset : this.offsets) {\n address = this.readPointer(address).share(deepOffset);\n }\n\n return address.share(offset);\n }", "private int AbsoluteIndirect()\n\t{\n\t\tint uint16addr2 = GetWord( Immediate16Read() );\n\t\tglobals.OpenBus = uint16addr2 >>> 8;\n\t\treturn uint16addr2;\n\t}" ]
[ "0.6699853", "0.6694759", "0.66061336", "0.6588254", "0.65068", "0.6422704", "0.6325345", "0.62323815", "0.60694087", "0.59630924", "0.54403585", "0.53468424", "0.5337618", "0.528133", "0.51683694", "0.5164935", "0.5112058", "0.5019222", "0.49726206", "0.49635157", "0.4963291", "0.49327463", "0.49309245", "0.48740822", "0.48509863", "0.48435715", "0.48344162", "0.4822593", "0.4821842", "0.48146033", "0.47643384", "0.47575843", "0.47557306", "0.47497344", "0.46904856", "0.4686029", "0.46676555", "0.46579945", "0.46524042", "0.4623542", "0.46216112", "0.46018934", "0.45991492", "0.4588959", "0.45885307", "0.45855606", "0.45849547", "0.4581049", "0.45587084", "0.45586246", "0.45378792", "0.45191082", "0.45066535", "0.4503824", "0.4501182", "0.44961983", "0.44948024", "0.44834572", "0.44832855", "0.44803697", "0.44767672", "0.44697434", "0.44641298", "0.44641295", "0.44616443", "0.44612247", "0.44608054", "0.44579443", "0.445516", "0.4433729", "0.44266352", "0.44173238", "0.44072804", "0.44062632", "0.4405758", "0.4383537", "0.43805218", "0.43781206", "0.43778306", "0.43774575", "0.43568307", "0.43538594", "0.43510884", "0.43395516", "0.433907", "0.43389776", "0.43375182", "0.4329413", "0.43215698", "0.43211076", "0.43167657", "0.43076506", "0.4307616", "0.4302709", "0.42893302", "0.428765", "0.42872176", "0.4281592", "0.42768037", "0.42749232" ]
0.65052456
5
Get the undefined Data object that falls within the set. This operation can be slow for large programs so a TaskMonitor is required.
public Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long findSet_representative( long data ){\n return findSet( map.get(data) ).data;\n }", "public Data getUndefinedDataAt(Address addr);", "public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "public T getSet( T obj )\n {\n \tNode temp = nodes.get(obj);\n \tif(temp!=null){\n \t\treturn getRoot(temp).data;\n \t}\n // If here, no such data object; throw exception.\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj );\n }", "public E poll() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(0);\r\n\t\tdata.remove(0);\r\n\t\treturn ret;\r\n\t}", "private Set<T> getMemory() { return null; }", "TraceUndefinedDataView undefinedData();", "Object firstData() {\n\t\t// por defecto enviamos null\n\t\treturn null;\n\t}", "@Override\r\n public Entry<K, V> pollFirstEntry() {\n return null;\r\n }", "public DataIterator getDefinedData(boolean forward);", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "public T getData() {\n return null;\n }", "@Override\n public Optional<ScheduledInterview> get(long id) {\n if (data.containsKey(id)) {\n return Optional.of(data.get(id));\n }\n return Optional.empty();\n }", "public T getMaxEntryCountSet() {\n IDataSet iDataSet;\n if (this.mDataSets == null || this.mDataSets.isEmpty()) {\n iDataSet = null;\n return (T)iDataSet;\n } else {\n IDataSet iDataSet2 = (IDataSet)this.mDataSets.get(0);\n Iterator<T> iterator = this.mDataSets.iterator();\n do {\n iDataSet = iDataSet2;\n if (!iterator.hasNext()) return (T)iDataSet;\n iDataSet = (IDataSet)iterator.next();\n if (iDataSet.getEntryCount() <= iDataSet2.getEntryCount()) continue;\n iDataSet2 = iDataSet;\n } while (true);\n }\n }", "public Data getDefinedDataContaining(Address addr);", "public Dataset getEmptyDataset() {\r\n\t\treturn InitialData.emptyClone();\r\n\t}", "@Test\n public void testLookup() {\n \t\n \t//create data set\n final LastWriteWinSet<String> lastWriteWinSet1 = new LastWriteWinSet<>();\n\n lastWriteWinSet1.add(time1, \"java\");\n lastWriteWinSet1.add(time1, \"php\");\n lastWriteWinSet1.add(time1, \"python\");\n lastWriteWinSet1.add(time2, \"scala\");\n\n lastWriteWinSet1.delete(time1, \"scala\");\n lastWriteWinSet1.delete(time2, \"java\");\n\n // run test\n final Set<String> lookup1 = lastWriteWinSet1.getData();\n\n assertTrue(lookup1.size() == 3);\n assertTrue(lookup1.contains(\"php\"));\n assertTrue(lookup1.contains(\"python\"));\n assertTrue(lookup1.contains(\"scala\"));\n \t\n \t//create data set\n final LastWriteWinSet<String> lastWriteWinSet2 = new LastWriteWinSet<>();\n\n lastWriteWinSet2.add(time1, \"java\");\n lastWriteWinSet2.add(time1, \"scala\");\n lastWriteWinSet2.add(time1, \"php\");\n lastWriteWinSet2.add(time1, \"python\");\n\n lastWriteWinSet2.delete(time2, \"scala\");\n lastWriteWinSet2.delete(time2, \"java\");\n\n // run test\n final Set<String> lookup = lastWriteWinSet2.getData();\n\n assertTrue(lookup.size() == 2);\n assertTrue(lookup.contains(\"php\"));\n assertTrue(lookup.contains(\"python\"));\n \n }", "public E pollLast() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(data.size() - 1);\r\n\t\tdata.remove(data.size() - 1);\r\n\t\treturn ret;\r\n\t}", "public IronDome findFreeIronDome() {\n\t\tfor (IronDome ironDome : ironDomeArr) {\n\t\t\tif (!ironDome.getIsBusy())\n\t\t\t\treturn ironDome;\n\t\t}\n\n\t\treturn null;\n\t}", "public AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly,\n\t\t\tTaskMonitor monitor) throws CancelledException;", "public Object readResolve() {\n return new ImmutableRangeSet(this.ranges).asSet(this.domain);\n }", "private int availableFirst() {\n return data.isEmpty() ? 0 : data.getFirst().remaining();\n }", "private V get(K key) {\n\t\t\tif (keySet.contains(key)) {\n\t\t\t\treturn valueSet.get(keySet.indexOf(key));\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public Optional<T> getFirstItem() {\n return getData().stream().findFirst();\n }", "@Override\n\tpublic Instances dataset() {\n\t\treturn null;\n\t}", "public E returnMinElement(){\r\n if (theData.size() <= 0) return null;\r\n\r\n E min = theData.get(0).getData();\r\n\r\n for (int i = 0; i< theData.size() ; i++){\r\n if (min.compareTo(theData.get(i).getData()) > 0 ){\r\n min = theData.get(i).getData();\r\n }\r\n }\r\n return min;\r\n }", "public Node findSet(Node dataNode) {\n // something go wrong here?\n if (dataNode == dataNode.parent) {\n return dataNode;\n }\n dataNode.parent = findSet(dataNode.parent);\n // what is returned is the root, if dataNode is returned then it is the leaf not root\n return dataNode.parent;\n }", "public Set<Map.Entry<String, Object>> entrySet()\n {\n return data.entrySet();\n }", "@Override\r\n public Entry<K, V> pollLastEntry() {\n return null;\r\n }", "public Data getDefinedDataBefore(Address addr);", "@Override\r\n\tpublic E pollFirst() {\n\t\treturn null;\r\n\t}", "Set<T> get(Location loc);", "public Element fittest() {\r\n Map.Entry<Fitness, List<Element>> bestEntry\r\n = elementsByFitness.lastEntry();\r\n if (bestEntry == null) {\r\n return null;\r\n }\r\n List<Element> bestElements = bestEntry.getValue();\r\n assert !bestElements.isEmpty();\r\n Element result = bestElements.get(0);\r\n\r\n return result;\r\n }", "@Override\n public Set<T> asSet() {\n return new AbstractSet<T>() {\n @Override\n public Iterator<T> iterator() {\n return new Iterator<T>() {\n boolean foundNext;\n boolean hasNext;\n T next;\n \n private void findNext() {\n if (!foundNext) {\n hasNext = isPresent();\n if (hasNext) {\n try {\n next = get();\n } catch (NoSuchElementException e) {\n // in case there was a race and the value became absent\n hasNext = false;\n next = null;\n }\n } else {\n next = null;\n }\n foundNext = true;\n }\n }\n \n @Override\n public boolean hasNext() {\n findNext();\n return hasNext;\n }\n\n @Override\n public T next() {\n findNext();\n if (hasNext) {\n // no next after consuming the single present value \n hasNext = false;\n T ret = next;\n next = null;\n return ret;\n }\n throw new NoSuchElementException();\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }\n\n @Override\n public int size() {\n return isPresent() ? 1 : 0;\n }\n };\n }", "T getData() {\n return null;\n }", "protected Object entryInitialFlow() {\n\t\treturn emptySet.clone();\n\t}", "public Data getDefinedDataAt(Address addr);", "protected Set<E> ensureSet()\n {\n Set<E> set = m_set;\n if (set == null)\n {\n set = m_set = new LiteSet<>();\n }\n return set;\n }", "static IntSet empty() {\n if (emptySet == null) {\n emptySet = new EmptySet();\n }\n return emptySet;\n }", "public E poll() {\r\n if (isEmpty()) {\r\n return null;\r\n }\r\n //first element of heap\r\n E result = theData.get(0).data;\r\n\r\n if (theData.size() == 1 && theData.get(theData.size()-1).count == 1 ) {\r\n theData.remove(0);\r\n return result;\r\n }\r\n //deleting first element of heap\r\n if (theData.get(0).count == 1 ){\r\n theData.set(0, theData.remove(theData.size() - 1));\r\n\r\n fixHeap(0);\r\n }else{ //first element of heap if exist more than 1, decreases count\r\n theData.get(0).count-=1;\r\n }\r\n //fixes heap\r\n fixHeap(0);\r\n\r\n return result;\r\n }", "public T getIfPresent()\n\t{\n\t\treturn cache.getIfPresent(KEY);\n\t}", "public Option<E> safeUncons() {\n return safeRemove(0);\n }", "public E pollFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\tE retVal = mHead.next.data;\n\t\tremove(mHead.next);\n\n\t\tmodCount++;\n\t\tmSize--;\n\n\t\treturn retVal;\n\t}", "@Override\n\t@TimeComplexity(\"O(1)\")\n\tpublic Entry<K, V> firstEntry() {\n\t/* TCJ\n\t * Continuous operation: O(1)\n\t */\n\t\treturn safeEntry(0);\n\t}", "@Override\r\n public Entry<K, V> firstEntry() {\n return null;\r\n }", "public Data getDefinedDataAfter(Address addr);", "public T poll() {\n if (this.size > 0) {\n T min = (T) pq[0];\n pq[0] = pq[this.size - 1];\n size--;\n percolateDown(0);\n return min;\n } else {\n return null;\n }\n }", "public DataIterator getDefinedData(Address addr, boolean forward);", "public static java.util.Set singleton(java.lang.Object arg0)\n { return null; }", "static Set createEmpty() {\n return new EmptySet();\n }", "@Test\n public void testLookupRealTime() {\n\t\t//create data set\n\t\t \n final LastWriteWinSet<String> lastWriteWinSet = new LastWriteWinSet<>();\n\n lastWriteWinSet.add(\"java\");\n lastWriteWinSet.add(\"scala\");\n lastWriteWinSet.add(\"php\");\n lastWriteWinSet.add(\"python\");\n try {\n\t\t\tThread.sleep(5);\n\t\t} catch (InterruptedException e) {\n\t\t\t//DO NOTHING\n\t\t}\n lastWriteWinSet.delete(\"scala\");\n lastWriteWinSet.delete(\"java\");\n \n\n // run test\n final Set<String> lookup = lastWriteWinSet.getData();\n\n assertTrue(lookup.size() == 2);\n assertTrue(lookup.contains(\"php\"));\n assertTrue(lookup.contains(\"python\"));\n }", "public long poll() {\n\t\tsuper.lockSingle();\n\t\ttry {\n\t\t\tif (!array.isEmpty()) {\n\t\t\t\treturn array.poll();\n\t\t\t}\n\t\t} catch (Throwable exp) {\n\n\t\t} finally {\n\t\t\tsuper.unlockSingle();\n\t\t}\n\t\treturn 0L;\n\t}", "public EfficientTerminalSet empty() {\n return new EfficientTerminalSet(terminals, indices, new int[data.length]);\n }", "Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}", "V get(K k) throws UndefinedException;", "public T get(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"Data cannot be null.\");\n }\n if (root == null) {\n throw new NoSuchElementException(\"Element does not exist.\");\n }\n T findData = getHelper(data, root);\n if (findData != null) {\n return findData;\n } else {\n throw new NoSuchElementException(\"Element does not exist.\");\n }\n }", "public Object readResolve() {\n if (this.ranges.isEmpty()) {\n return ImmutableRangeSet.of();\n }\n if (this.ranges.equals(ImmutableList.of(Range.all()))) {\n return ImmutableRangeSet.all();\n }\n return new ImmutableRangeSet(this.ranges);\n }", "@SuppressWarnings(\"unchecked\")\n @Nullable\n public T getValue() {\n Object data = mData;\n if (data != NOT_SET) {\n return (T) data;\n }\n return null;\n }", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "public UnManagedProtectionSet getUnManagedProtectionSetLocal() {\n return _unManagedProtectionSet;\n }", "@Override\n\tpublic int isOrNoSet() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic E pollLast() {\n\t\treturn null;\r\n\t}", "public Object removeFirst()\n {\n return ((Node)nodes.remove(0)).data;\n }", "public long getNumDefinedData();", "@Override\r\n\tprotected Object getData() {\n\t\treturn null;\r\n\t}", "public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}", "public synchronized Object peek()\n throws EmptyStackException\n {\n if (empty())\n {\n throw new EmptyStackException();\n }\n\n return dataList.get(0);\n }", "@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}", "public T getData() {\n return this.first;\n }", "public org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty getPresent()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty target = null;\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty)get_store().find_element_user(PRESENT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public E poll() {\n\t\tif (apq.isEmpty())\n\t\t\treturn null;\n\t\tE retValue = apq.get(1);\n\t\tswap(1, apq.size() - 1); // -1 changed, change back if it doesnt work\n\t\tapq.remove(apq.size() - 1); // -1 changed, change back if it doesnt work\n\t\tdownheap(1);\n\t\treturn retValue; // implement this method\n\t}", "public DataStructure() {\n\t\tthis.minx = null;\n\t\tthis.maxx = null;\n\t\tthis.miny = null;\n\t\tthis.maxy = null;\n\t\tthis.current = null;\n\t\tsize = 0;\n\t}", "public boolean isSetData() {\n return this.data != null;\n }", "public int getRandom() {\n Integer ans = null;\n while (ans == null) {\n int r = random.nextInt(size);\n ans = allSet[r];\n if (!realSet.contains(ans)) {\n ans = allSet[r] = null;\n }\n }\n return ans;\n }", "public Subset getLeftMostElement() {\n\t\tSubset res = this;\n\t\twhile(res.left != res) {\n\t\t\tres = res.left;\n\t\t}\n\t\treturn res;\n\t}", "public Set<java.util.Map.Entry<E, V>> entrySet() {\n\t\treturn null;\r\n\t}", "public static Instances getData()\n {\n return data;\n }", "public synchronized Object getData() {\n return data;\n }", "private Set calculateTimeSet() {\n List choices = getDataChoices();\n if (choices.isEmpty()) {\n return null;\n }\n Set newSet = null;\n for (int i = 0; i < choices.size(); i++) {\n try {\n VerticalProfileInfo info = getVPInfo(i);\n GridDataInstance dataInstance = info.getDataInstance();\n Set set = GridUtil.getTimeSet(dataInstance.getGrid());\n //System.out.println(\"di.timeset[\"+i+\"] = \" + set);\n if (set != null) {\n if (newSet == null) {\n newSet = set;\n } else {\n newSet = newSet.merge1DSets(set);\n }\n }\n } catch (Exception e) {\n logger.error(\"Problem calculating TimeSet\", e);\n }\n }\n //System.out.println(\"merged time set = \" + newSet);\n return newSet;\n }", "public Cave getUnoccupiedOpenLocation() {\n\t\tCave tempCave = null;\n\t\tboolean tempBool = true;\n\t\twhile(tempBool) {\n\t\t\tdouble i = Math.random() * row;\n\t\t\tdouble j = Math.random() * columns;\n\t\t\t\ttempCave = caveArray[(int) i][(int) j];\n\t\t\t\tif((int)i == row-1 && (int)j == columns-1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (tempCave.isOccupied() == false && tempCave.isOpen())\n\t\t\t\t\treturn tempCave;\n\t\t\t}\n\t\t\n\t\treturn tempCave;\n\t\t\n\t}", "@Override\n\tpublic ArregloDinamico<V> valueSet() {\n\t\tArregloDinamico<V> respuesta = new ArregloDinamico<V>(N);\n\t\tfor(int i = 0; i<M ; i++)\n\t\t{\n\t\t\tArregloDinamico<NodoTabla<K,V>> temporal = map.darElemento(i).getAll();\n\t\t\tfor(int j=0 ; j < temporal.size() ; j++)\n\t\t\t{\n\t\t\t\tNodoTabla<K,V> elemento = temporal.darElemento(j);\n\t\t\t\tif(elemento != null && elemento.darLlave() != null)\n\t\t\t\t\trespuesta.addLast(elemento.darValor());\t\n\t\t\t}\n\t\t}\n\t\treturn respuesta;\n\t}", "public Event dequeue() {\n\t\tif(timeoutSet.peek() == null && eventSet.peek() == null){\n\t\t\treturn null;\n\t\t}else if(timeoutSet.peek() == null && eventSet.peek() != null){\n\t\t\treturn eventSet.poll();\n\t\t}else if(eventSet.peek() == null && timeoutSet.peek() != null){\n\t\t\treturn timeoutSet.poll();\n\t\t}else if(eventSet.peek().getTime() < timeoutSet.peek().getTime()){\n\t\t\treturn eventSet.poll();\n\t\t}else if(eventSet.peek().getTime() >= timeoutSet.peek().getTime()){\n\t\t\treturn timeoutSet.poll();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public Node<E> getPresentNode(E data){\n for(Node<E> node: nodes.keySet()){\n if(node.data.equals(data)){\n return node;\n }\n }\n return null;\n }", "public Set<Key<?>> keysForTest() {\n return Collections.unmodifiableSet(this.data.keySet());\n }", "public KeyValuePair<Key, Value> getData(int dataNum) {\r\n\t\t\tif (dataNum > data.size()) return null;\r\n\t\t\treturn data.get(dataNum);\r\n\t\t}", "public Set<T> noFollow(T elem) {\n\t\t Set<T> s = rule.get(elem.hashCode());\n\t\t return s == null ? new HashSet<T>() :s; // TODO YOUR CODE HERE\n\t}", "public Value restrictToNotAbsent() {\n checkNotUnknown();\n if (isNotAbsent())\n return this;\n Value r = new Value(this);\n r.flags &= ~ABSENT;\n if (r.var != null && (r.flags & (PRESENT_DATA | PRESENT_ACCESSOR)) == 0)\n r.var = null;\n return canonicalize(r);\n }", "public final HashMap<Integer, T> getData() {\n\t\treturn this.data;\n\t}", "@Override\n\tpublic File top() {\n\t\tcheckState(!isLocked(), \"The inbox is locked.\");\n\n\t\tFile peek = dataSets.peek();\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"InboxPeek=\" + peek);\n\t\t}\n\t\treturn peek;\n\t}", "public AllOOneDataStructure() {\n map = new HashMap<>();\n vals = new HashMap<>();\n maxKey = minKey = \"\";\n max = min = 0;\n }", "public Option<E> safePeek() {\n return safeIndex(0);\n }", "public U getFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(0);\r\n\t }", "public E peek() {\r\n return theData.get(0).getData();\r\n }", "public boolean is_set_data() {\n return this.data != null;\n }", "public boolean is_set_data() {\n return this.data != null;\n }", "public static Value makeAbsent() {\n return theAbsent;\n }" ]
[ "0.58837825", "0.58371025", "0.5665299", "0.5663455", "0.5593164", "0.5589366", "0.54036576", "0.52586377", "0.52332604", "0.5228753", "0.520704", "0.5145212", "0.5136214", "0.5082297", "0.50606525", "0.5047115", "0.5042751", "0.50333154", "0.5018886", "0.5005598", "0.49792665", "0.49416927", "0.4931259", "0.49269605", "0.49243176", "0.49101955", "0.49011832", "0.48821324", "0.4880082", "0.48712677", "0.48634422", "0.4859361", "0.48519632", "0.48432705", "0.48384395", "0.48349366", "0.48248014", "0.4818894", "0.48123783", "0.48122144", "0.48116022", "0.47990036", "0.47975892", "0.47968936", "0.47967392", "0.47896108", "0.47753105", "0.4774366", "0.476816", "0.4758564", "0.47533467", "0.47369015", "0.47191128", "0.47078246", "0.47032413", "0.4695087", "0.46920416", "0.46819788", "0.46773228", "0.46673238", "0.4662769", "0.4651727", "0.46506405", "0.4643865", "0.4642052", "0.46402642", "0.4640028", "0.4639278", "0.4637579", "0.4637579", "0.4637579", "0.4637579", "0.46374297", "0.46362722", "0.46311456", "0.4627736", "0.462696", "0.46239904", "0.46238375", "0.46235088", "0.46225575", "0.46216235", "0.46194962", "0.46192384", "0.46142292", "0.4611777", "0.46089175", "0.46050155", "0.46017754", "0.45903626", "0.4588268", "0.4586116", "0.4578284", "0.45765156", "0.45763057", "0.45722204", "0.45646504", "0.45628232", "0.45628232", "0.4561979" ]
0.7167264
0
get the closest undefined Data object that starts at an address that is less than the given address. This operation can be slow for large programs so a TaskMonitor is required.
public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data getDataBefore(Address addr);", "public Data getDefinedDataBefore(Address addr);", "public Data getDataAfter(Address addr);", "public Data getDefinedDataAfter(Address addr);", "public Data getDefinedDataContaining(Address addr);", "public Data getUndefinedDataAt(Address addr);", "public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "public Data getDataContaining(Address addr);", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public static int lowerBound(int[] arr, int data) {\n int ans = -1, low = 0, high = arr.length - 1;\n while (low <= high) {\n int mid = (low + high) / 2;\n if (arr[mid] == data) {\n ans = mid;\n high = mid - 1;\n } else if (data < arr[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return ans;\n }", "public Data getDefinedDataAt(Address addr);", "public Instruction getInstructionBefore(Address addr);", "private int binarySearchToFindClosest(String overflowName, int bottomRecord, int topRecord) {\n // Base condition for only having two records left to choose from\n if (topRecord - bottomRecord == 1) {\n String topRecordName = getRecordCompanyName(\"normal\", topRecord);\n\n // If the name of the overflow company comes after the company name of the top record, then the top record is the closest\n if (overflowName.compareTo(topRecordName) >= 1) {\n return topRecord;\n // Otherwise, either the top and bottom records are equal length away, or the bottom record is closer, so return the bottom record\n } else {\n return bottomRecord;\n }\n // Base condition for having only 1 record left means that that record is the closest\n } else if (topRecord == bottomRecord) {\n return topRecord;\n }\n\n int middle = (topRecord + bottomRecord) / 2;\n String nameOfNormalRecord = getRecordCompanyName(\"normal\", middle);\n int alphabeticalOrder = overflowName.compareTo(nameOfNormalRecord);\n if (alphabeticalOrder == 0) {\n return middle;\n } else if (alphabeticalOrder < 0) {\n return binarySearchToFindClosest(overflowName, bottomRecord, middle);\n } else {\n return binarySearchToFindClosest(overflowName, middle + 1, topRecord);\n } \n }", "private GlobeAccessPointRecord findNearestGAP(InetAddress srcAddr)\n {\n GlobeAccessPointRecord nearestGAPrec;\n FloatCoordinate coords = null;\n\n // look in our GAP lookup cache. It looks like IE5 ignores our\n // Expires: header so we might really need this for performance \n // reasons.\n synchronized(GlobeRedirector.ip2GAPCache) {\n nearestGAPrec =\n (GlobeAccessPointRecord) GlobeRedirector.ip2GAPCache.get(srcAddr);\n }\n\n /*\n * Return the GAP record if it is in the cache.\n */\n if (nearestGAPrec != null) {\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"(cached) Nearest GAP is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n return nearestGAPrec;\n }\n\n /*\n * There is no {srcAddr, nearest GAP record} pair in the cache. We need\n * the geographical coordinates associated with srcAddr to determine\n * the nearest GAP.\n */\n\n if (_cookieCoords != null) { // client cookie contains coordinates\n coords = _cookieCoords;\n }\n else {\n coords = getCoordinates(srcAddr);\n\n if (coords == null) {\n return null;\n }\n }\n\n /*\n * Calculate which GAP is nearest.\n */\n int i, dist, min = Integer.MAX_VALUE;\n CoordinateImpl srcCoords = new CoordinateImpl((int)coords.lat,\n (int)coords.longi);\n\n for (i = 0; i < _gapList.size(); i++) {\n GlobeAccessPointRecord gaprec = _gapList.get(i);\n dist = gaprec.coords.computeDistance(srcCoords);\n\n if (dist < min) {\n nearestGAPrec = gaprec;\n min = dist;\n }\n }\n\n // Cache the result.\n synchronized(GlobeRedirector.ip2GAPCache) {\n GlobeRedirector.ip2GAPCache.put(srcAddr, nearestGAPrec);\n }\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Nearest GAP of \" + srcAddr.getHostAddress()\n + \" at (\" + (int)coords.lat + \",\" + (int)coords.longi\n + \") is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n\n _cookieCoords = coords;\n return nearestGAPrec;\n }", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "public static int lower_bound(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] >= key)\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid - 1;\n\t\t}\n\t\treturn low;\n\t}", "public int relativePosTo(long addr) {\n\t\t\tif(addr < this.start)\n\t\t\t\treturn -1;\n\t\t\tif(addr > this.end)\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "public Data getDataAt(Address addr);", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}", "public IORequest SSTF(int deviceNumber, IORequest oldhead) {\n\n IORequest closest = null;\n int min = Integer.MIN_VALUE;\n\n //disk scheduling\n try {\n int hedlo = machine.memory.load(Process_Table[oldhead.prognum].base + Process_Table[oldhead.prognum].acc + 2) + machine.memory.load(Process_Table[oldhead.prognum].base + Process_Table[currentProcess].acc + 3);\n for (IORequest request : waitQ[deviceNumber]) {\n int zzzstart = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 2);\n //System.out.println(zzzstart);\n int distance = Math.abs(hedlo-zzzstart );\n\n //if its the closest to the headlocation \n if (distance > min) {\n closest = request;\n min = distance;\n\n }\n \n }\n waitQ[deviceNumber].remove(closest);\n \n waitQ[deviceNumber].addFirst(closest);\n\n } catch (MemoryFault ex) {\n Logger.getLogger(OperatingSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return closest;\n }", "private T getMinUnvisited(){\n if (unvisited.isEmpty()) return null;\n T min = unvisited.get(0);\n for (int i = 1; i < unvisited.size(); i++){\n T temp = unvisited.get(i);\n if (distances[vertexIndex(temp)] < distances[vertexIndex(min)]){\n min = temp;\n }\n }\n return min;\n }", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "public int getLowerBound ();", "public float getLimit_lin_x_lower() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 32);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 24);\n\t\t}\n\t}", "public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}", "protected static int advanceUntil(CharBuffer array, int pos, int length, char min) {\n int lower = pos + 1;\n\n // special handling for a possibly common sequential case\n if (lower >= length || (array.get(lower)) >= (min)) {\n return lower;\n }\n\n int spansize = 1; // could set larger\n // bootstrap an upper limit\n\n while (lower + spansize < length\n && (array.get(lower + spansize)) < (min)) {\n spansize *= 2; // hoping for compiler will reduce to\n }\n // shift\n int upper = (lower + spansize < length) ? lower + spansize : length - 1;\n\n // maybe we are lucky (could be common case when the seek ahead\n // expected\n // to be small and sequential will otherwise make us look bad)\n if (array.get(upper) == min) {\n return upper;\n }\n\n if ((array.get(upper)) < (min)) {// means\n // array\n // has no\n // item\n // >= min\n // pos = array.length;\n return length;\n }\n\n // we know that the next-smallest span was too small\n lower += (spansize >>> 1);\n\n // else begin binary search\n // invariant: array[lower]<min && array[upper]>min\n while (lower + 1 != upper) {\n int mid = (lower + upper) >>> 1;\n char arraymid = array.get(mid);\n if (arraymid == min) {\n return mid;\n } else if ((arraymid) < (min)) {\n lower = mid;\n } else {\n upper = mid;\n }\n }\n return upper;\n\n }", "private Node getMinimumOld() {\n Node tmp = null;\n\n // TODO: optimize by putting in 1 list and\n // provide 'starting offset' for remaining nodes to find mimimum\n // note: see new getMinimum method above\n\n if (null != nodeA) {\n tmp = nodeA;\n if (null != nodeB && tmp.data > nodeB.data) {\n tmp = nodeB;\n }\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeB) {\n tmp = nodeB;\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeC) {\n tmp = nodeC;\n }\n\n // System.out.println(tmp);\n\n if (null == tmp ) {\n // terminating condition\n return null;\n }\n\n if (tmp.equals(nodeA)) {\n nodeA = nodeA.next;\n }\n if (tmp.equals(nodeB)) {\n nodeB = nodeB.next;\n }\n if (tmp.equals(nodeC)) {\n nodeC = nodeC.next;\n }\n\n System.out.println(tmp.data);\n\n return tmp;\n }", "long getAddress(ByteBuffer buffer);", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "public static Node getLowestDistanceNode(Set<Node> unsettledNodes) {\n Node lowestDistanceNode = null;\n int lowestDistance = Integer.MAX_VALUE;\n for (Node node: unsettledNodes) {\n int nodeDistance = node.distance;\n if (nodeDistance < lowestDistance) {\n lowestDistance = nodeDistance;\n lowestDistanceNode = node;\n }\n }\n return lowestDistanceNode;\n }", "private static long getFirstOffset(long currentOffset, int limit) {\n\t\tlong firstOffset = currentOffset;\n\n\t\twhile(firstOffset > limit) {\n\t\t\tfirstOffset -= limit;\n\t\t}\n\n\t\treturn firstOffset;\n\t}", "public O before(O a)\r\n {\r\n int index = indexOf(a);\r\n if (index != -1 && index != 0) //is defined and not first\r\n return get(index-1);\r\n else return null;\r\n }", "protected ValuePosition getMinimum() {\n\t\t// Calcule la position et la durée d'exécution de la requête la plus courte dans le tableau des requêtes\n\t\tValuePosition minimum = new ValuePosition();\n\t\tminimum.position = 0;\n\t\tfor(int pos=0; pos<requests.length; pos++) {\n\t\t\tRequest request = requests[pos];\n\t\t\tif(request == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minimum.value == null || request.getElapsedTime() < minimum.value) {\n\t\t\t\tminimum.position = pos;\n\t\t\t\tminimum.value = request.getElapsedTime();\n\t\t\t}\n\t\t}\n\t\treturn minimum;\n\t}", "@Nullable\n protected abstract Map.Entry<K, V> onGetLowestEntry();", "@NotNull\n private RangeInfo findNearestRangeInfo() {\n final int caretPosition = myView.getCaretPosition();\n\n for (final RangeInfo range : myRangeInfos) {\n if (range.isWithin(caretPosition)) {\n return range;\n }\n if (range.getFrom() > caretPosition) {\n return range; // Ranges are sorted, so we are on the next range. Take it, if caret is not within range\n }\n }\n\n return myRangeInfos.last();\n }", "public Point ExtractMin() {\n\t\tif (heapSize < 0)\n\t\t\tthrow new RuntimeException(\"MinHeap underflow!\");\n\t\tPoint min = new Point(heapArr[0]);\n\t\theapArr[0] = new Point(heapArr[heapSize - 1]);\n\t\theapSize = heapSize - 1;\n\t\tminHeapify(0);\n\t\treturn min;\n\n\t}", "public Shard getLowerNeighbor() {\r\n double middleLat = south + Math.abs(north - south) / 2;\r\n double nextLat = middleLat - Math.abs(north - south);\r\n\r\n return new Shard(new Coordinates(nextLat, coordinates.getLon()), zoom);\r\n }", "public node_data heapExtractMin(){\n\t\tdouble min = _positiveInfinity;\n\t\tnode_data v=null;\n\t\tif (!isEmpty()){\n\t\t\tv = _a[0];\n\t\t\tmin = v.getWeight();\n\t\t\t_a[0]=_a[_size-1];\n\t\t\t_size = _size-1;\n\t\t\tminHeapify(0, _size);\n\t\t}\n\t\treturn v;\n\t}", "public static int getMin(ArrayList<QuoteShort> data, int begin, int end) {\n\t\tint min = 999999999;\r\n\t\tint minIndex = -1;\r\n\t\tif (begin<=0) begin = 0;\r\n\t\tfor (int i=begin;i<=end;i++){\r\n\t\t\tif (data.get(i).getHigh5()<=min){\r\n\t\t\t\tmin = data.get(i).getLow5();\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn minIndex;\r\n\t}", "public static Range<Long> atLeastMaybeScratch(long start) {\n\t\tif (start < 0) {\n\t\t\treturn Range.closed(start, -1L);\n\t\t}\n\t\treturn Range.atLeast(start);\n\t}", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "public Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "public int rva2offset(Address address) {\n\t\tint offset = -1;\n\t\tfor(IMAGE_SECTION_HEADER section:peFileSections) {\n\t\t\tif(address.getAddr32() >= section.getVirtualAddress()\n\t\t\t&& address.getAddr32() < section.getVirtualAddress() + section.getVirtualSize()) {\n\t\t\t\toffset = address.getAddr32() - section.getVirtualAddress() + section.getPointerToRawData();\n\t\t\t\treturn offset;\n\t\t\t}\n\t\t}\n\t\tif(address.getAddr32() < peOptionalHeader.getSizeOfHeaders())\n\t\t\treturn address.getAddr32();\n\t\treturn offset;\n\t}", "private StreamEvent findIfActualMin(AttributeDetails latestEvent) {\n int indexCurrentMin = valueStack.indexOf(currentMin);\n int postBound = valueStack.indexOf(latestEvent) - indexCurrentMin;\n // If latest event is at a distance greater than maxPostBound from min, min is not eligible to be sent as output\n if (postBound > maxPostBound) {\n currentMin.notEligibleForRealMin();\n return null;\n }\n // If maxPreBound is 0, no need to check preBoundChange. Send output with postBound value\n if (maxPreBound == 0) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", 0, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n int preBound = 1;\n double dThreshold = currentMin.getValue() + currentMin.getValue() * preBoundChange / 100;\n while (preBound <= maxPreBound && indexCurrentMin - preBound >= 0) {\n if (valueStack.get(indexCurrentMin - preBound).getValue() >= dThreshold) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", preBound, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n ++preBound;\n }\n // Completed iterating through maxPreBound older events. No events which satisfy preBoundChange condition found.\n // Therefore min is not eligible to be sent as output.\n currentMin.notEligibleForRealMin();\n return null;\n }", "public Point getXLower()\n {\n return (Point)xLow.clone();\n }", "Optional<MemoryAddress> lookup(String name);", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "public frameTableElement findVictimLRU(){\n int smallestLastReferenceTime = Integer.MAX_VALUE;\n frameTableElement correspondingElement = null;\n\n for(int i=0; i< frameTable.getSize(); i++){\n frameTableElement currElement = frameTable.getElement(i);\n if(currElement.getLastTimeReferenced() < smallestLastReferenceTime){\n smallestLastReferenceTime = currElement.getLastTimeReferenced();\n correspondingElement = currElement;\n }\n }\n\n return correspondingElement;\n }", "public node_data heapMinimum(){return _a[0];}", "private static int minimumPosition(int[] a, int from)\n {\n int minPos = from;\n for (int i = from + 1; i < a.length; i++) \n {\n if (a[i] < a[minPos]) { minPos = i; }\n }\n return minPos;\n }", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "TrackingToken lowerBound();", "public int getLowerBound() {\r\n return lowerBound;\r\n }", "public Location3D getLowLoc() {\n\t\treturn lowPoint;\n\t}", "private Node closestUnvisitedNeighbour(HashMap <Node, Integer > shortestPathMap){\n int shortestDistance = Integer.MAX_VALUE;\n Node closestReachableNode = null;\n for (Node node : getNodes()) {\n if (node.isVisited())\n continue;\n\n int currentDistance = shortestPathMap.get(node);\n if (currentDistance == Integer.MAX_VALUE)\n continue;\n\n if (currentDistance < shortestDistance) {\n shortestDistance = currentDistance;\n closestReachableNode = node;\n }\n }\n return closestReachableNode;\n }", "public CodeUnit getCodeUnitBefore(Address addr);", "public Address getClosestAddressTo(Depot d) {\n double bestDistance = Double.MAX_VALUE;\n Address bestAddress = null;\n for (Address a : addresses) {\n double distance = a.getCoordinates().companyDistanceTo(d.getCoordinates());\n if (distance < bestDistance) {\n bestAddress = a;\n bestDistance = distance;\n }\n }\n return bestAddress;\n }", "private int getLowerBound(Object problem, int upperbound)\n {\n Graph tsp = (Graph)problem;\n if (weight == null)\n weight = new double[tsp.size()];\n hki = new HeldKarpIterative( tsp, included, includedT, excluded, excludedT, iterations, weight, upperbound);\n hki.compute();\n tour = hki.isTour();\n bound = hki.getBound();\n hasRun = true;\n// System.out.println(hki.debugDump());\n return bound;\n }", "public T findMin();", "private int minPosition(int from) throws InterruptedException{\n\t\tint minPos = from;\n\t\tfor (int i = from + 1; i < a.length; i++){\n\t\t\tsortStateLock.lock();\n\t\t\ttry{\n\t\t\t\tif (a[i] < a[minPos]) minPos = i;\n\t\t\t // For animation\n\t\t\t markedPosition = i;\n\t\t }\n\t\t\tfinally\n\t\t {\n\t\t\t\tsortStateLock.unlock();\n\t\t }\n\t\t pause(2);\n\t }\n\t return minPos;\n }", "private int[] findPointer() {\n \n int initialAux = 4095;\n int header = 0;\n \n \n for (int i = 0; i < 4096; i++) {\n String initialBinary = Integer.toBinaryString(0xFF & serialize[i * 4]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[i * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n \n if (initial == 0 && sizeData == 0) {\n header = i*4;\n break;\n }\n //get the higher initial \n if (initialAux > initial){\n initialAux = initial;\n }\n \n }\n\n int[] toReturn = new int[2];\n \n toReturn[0] = header;\n toReturn[1] = initialAux-1;\n \n return toReturn;\n }", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "public Instruction getInstructionContaining(Address addr);", "public static int lower_bound_equals(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] > key)\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid - 1;\n\t\t}\n\t\treturn low;\n\t}", "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "public static int offset_addr() {\n return (0 / 8);\n }", "public static DataType findPointerRelativeInner(DataType base, int offset) {\n\t\tif (base instanceof TypeDef) {\n\t\t\tbase = ((TypeDef) base).getBaseDataType();\n\t\t}\n\t\twhile (base instanceof Structure) {\n\t\t\tDataTypeComponent component = ((Structure) base).getComponentContaining(offset);\n\t\t\tif (component == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbase = component.getDataType();\n\t\t\toffset -= component.getOffset();\n\t\t\tif (offset == 0) {\n\t\t\t\treturn base;\n\t\t\t}\n\t\t}\n\t\treturn Undefined1DataType.dataType;\n\t}", "public DataIterator getDefinedData(Address addr, boolean forward);", "public float getLimit_lin_z_lower() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 48);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 40);\n\t\t}\n\t}", "@Nonnull\n public Pointer resolvePointer(@Nonnegative long offset) {\n Pointer address = this.baseAddress;\n\n for (long deepOffset : this.offsets) {\n address = this.readPointer(address).share(deepOffset);\n }\n\n return address.share(offset);\n }", "public Node closestPrecedingNode(int id);", "private void FindMinZ()\r\n\t{\r\n\t\tminimum_Z=Integer.MAX_VALUE;\r\n\t\tfor(Entry<Integer,Node> entry : FutureUpdateList.entrySet())\r\n\t\t{\r\n\t\t\tNode temp=entry.getValue();\r\n\t\t\tif(temp.z<minimum_Z)\r\n\t\t\t{\r\n\t\t\t\tminimum_Z=temp.z;\r\n\t\t\t\tminimum_X=temp.x;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int\ngetNodeIndexMin();", "private Node lowestCostThrough(List<Node> openSet, Map<Node, Double> costThrough){\n Node lowest = openSet.get(0);\n\n for(Node n: openSet){\n if(costThrough.get(n) < costThrough.get(lowest)){\n lowest = n;\n }\n }\n return lowest;\n }", "public byte[] searchReturnData(short addressInDataBlock) {\n //take initial and size binary from memory\n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //if 0 no have data\n if (initial == 0 && sizeData == 0) {\n return null;\n }\n\n //return data\n byte[] toReturn = new byte[sizeData];\n \n int j = 0;\n for (short i = initial; i < initial + sizeData; i++) {\n toReturn[j] = serialize[i];\n j++;\n }\n\n return toReturn;\n }", "public String getNearestStreet() {\n String nearestStreet = \"null\";\n CollisionResults results = new CollisionResults();\n float closestDistance = 101f;\n for(float xDir = -1; xDir <= 1; xDir += .1f) {\n for(float yDir = -1; yDir <= 1; yDir += .1f) {\n for(float zDir = -1; zDir <= 1; zDir += .1f) { \n Ray ray = new Ray(loc, new Vector3f(xDir, yDir, zDir));\n world.collideWith(ray, results);\n for (int i = 0; i < results.size(); i++) {\n float dist = results.getCollision(i).getDistance();\n String name = results.getCollision(i).getGeometry().getParent().getName();\n if (name.startsWith(\"R_\") && dist <= 100 && dist < closestDistance) {\n nearestStreet = name;\n closestDistance = dist;\n }\n }\n }\n }\n }\n\n return nearestStreet;\n \n }", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "protected abstract D getLower(R range);", "public E extractMin() {\r\n\t\tif (this.size == 0) {\r\n\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\"Heap underflow. Cannot extractMin from an empty heap.\");\r\n\t\t}\r\n\t\tE min = this.objectHeap[0];\r\n\t\tdouble costMin = this.costHeap[0];\r\n\t\tthis.objectHeap[0] = this.objectHeap[this.size - 1];\r\n\t\tthis.costHeap[0] = this.costHeap[this.size - 1];\r\n\t\tthis.size -= 1;\r\n\t\tthis.locations.delete(min);\r\n\t\tthis.locations.put(this.objectHeap[0], 0);\r\n\t\tthis.minHeapify(0);\r\n\t\treturn min;\r\n\t}", "@Override\n\t@TimeComplexity(\"O(log n)\")\n\tpublic Entry<K, V> lowerEntry(K key) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t */\n\t\treturn safeEntry(findIndex(key) - 1);\n\t}", "public int getReturnAddressOffset();", "public V getLowerBound();", "public final Node getNearestNode(Point p) {\n double minDistanceSq = Double.MAX_VALUE;\n Node minPrimitive = null;\n for (Node n : getData().nodes) {\n if (n.deleted || n.incomplete)\n continue;\n Point sp = getPoint(n.eastNorth);\n double dist = p.distanceSq(sp);\n if (minDistanceSq > dist && dist < snapDistance) {\n minDistanceSq = p.distanceSq(sp);\n minPrimitive = n;\n }\n // prefer already selected node when multiple nodes on one point\n else if(minDistanceSq == dist && n.selected && !minPrimitive.selected)\n {\n minPrimitive = n;\n }\n }\n return minPrimitive;\n }", "long closest(double lon, double lat) {\n double smallestDist = Double.MAX_VALUE;\n long smallestId = 0;\n Iterable<Node> v = world.values();\n for (Node n : v) {\n double tempLat = n.getLat();\n double tempLon = n.getLon();\n double tempDist = distance(lon, lat, tempLon, tempLat);\n if (tempDist < smallestDist) {\n smallestDist = tempDist;\n smallestId = n.getId();\n }\n }\n return smallestId;\n }", "public static int offset_min() {\n return (56 / 8);\n }", "public DataValue getLeastDataByDeviceIdAndSensorType(SensorValue sensorVal) throws Exception;", "private UnconstrainedBidElement getClosest(double demandWatt) {\n UnconstrainedBidElement best = null;\n double bestDistance = Double.MAX_VALUE;\n for (UnconstrainedBidElement e : elements) {\n double distance = Math.abs(demandWatt - e.demandWatt);\n if (best == null || distance < bestDistance) {\n best = e;\n bestDistance = distance;\n }\n }\n return best;\n }", "public NodeDB.NodeInfo getNodeByInetAddress(InetAddress a) { synchronized (this.nodedb) {\n\t\tfor (NodeInfo ni : this.nodedb.values()) {\n\t\t\tif (ni.nodecomms.getAddress().equals(a))\n\t\t\t\treturn ni;\n\t\t}\n\t\treturn null;\n\t}}", "protected RecordHeader getRecordAt(long targetFp) throws IOException {\n for (RecordHeader next : getMemIndex().values()) {\n if (targetFp >= next.dataPointer &&\n targetFp < next.dataPointer + (long)next.dataCapacity) {\n return next;\n }\n }\n return null;\n }", "public int findSmallest() {\n\t/*\n\t Cases:\n\t If last or only node, return datum\n\n\t Otherwise:\n\t Return whatever is smaller: \n\t The datum of the current node,\n\t or the datum of the next node \n\t*/ \n\tif (next == null) return datum; \n\telse {\n\t int nextDatum = next.findSmallest();\n\t if (nextDatum < datum) return nextDatum;\n\t else return datum;\n\t}\n }", "public Node findPredecessor(int id) {\n\t\tNode n = this;\n\t\twhile (id <= n.getId() || id > n.getSuccessor().getId()) {\n\t\t\tn = n.closestPrecedingFinger(id);\n\t\t}\n\t\treturn n;\n\t}", "public NodeEntry<Boolean, Node> find(T data) {\n\t\tif (this.numberOfNodes == 0)\n\t\t\t// Return the header as the second parameter\n\t\t\t// to indicate that the returned false was\n\t\t\t// as a result of querying data to an empty\n\t\t\t// list.\n\t\t\treturn new NodeEntry<Boolean, Node>(false, this.header);\n\n\t\t// Begin with the header and traverse the list\n\t\t// using right pointers at every visited node.\n\t\tNode currentNode = this.header;\n\t\tNode nodeToCompare = null;\n\t\tNode leftNeighbor = null;\n\t\tint currentLevel = this.listLevel;\n\t\twhile (currentLevel > 1) {\n\t\t\tnodeToCompare = currentNode.nextNodes.get(currentLevel);\n\t\t\tif (nodeToCompare != null) {\n\t\t\t\tif (data.compareTo(nodeToCompare.data) > 0) {\n\t\t\t\t\tcurrentNode = nodeToCompare;\n\t\t\t\t} else if (data.compareTo(nodeToCompare.data) < 0) {\n\t\t\t\t\tcurrentLevel--;\n\t\t\t\t} else\n\t\t\t\t\treturn new NodeEntry<Boolean, Node>(true, nodeToCompare);\n\t\t\t} else currentLevel--;\n\t\t}\n\n\t\t// If the query value is found to be the smallest in the\n\t\t// list, we'd hit the bottom of the list through header.\n\t\t// Return the header as the left hand neighbor for the\n\t\t// position where the query data can be inserted later.\n\t\tif (currentNode.equals(this.header) &&\n\t\t\tcurrentNode.nextNodes.get(1).data.compareTo(data) >= 0) {\n\t\t\treturn new NodeEntry<Boolean, Node>(false, this.header);\n\t\t}\n\n\t\t// Otherwise, continue traversing the remaining nodes\n\t\t// until the last visited node's data value is found\n\t\t// to be equal to or greater than the query.\n\t\twhile (!currentNode.equals(this.sentinel)) {\n\t\t\tif (currentNode.data.compareTo(data) > 0) {\n\t\t\t\t// Return the node immediately before the possible\n\t\t\t\t// position where the data could have been found.\n\t\t\t\t// This can be used for inserting a new node to the\n\t\t\t\t// list containing the same data value as the query.\n\t\t\t\treturn new NodeEntry<Boolean, Node>(false, leftNeighbor);\n\t\t\t} else if (currentNode.data.compareTo(data) < 0) {\n\t\t\t\t// This is where we enter this while loop,\n\t\t\t\t// so we protect ourselves from losing the\n\t\t\t\t// track of the immediate left neighbor.\n\t\t\t\tleftNeighbor = currentNode;\n\t\t\t\tcurrentNode = currentNode.nextNodes.get(1);\n\t\t\t} else {\n\t\t\t\treturn new NodeEntry<Boolean, Node>(true, currentNode);\n\t\t\t}\n\t\t}\n\n\t\t// After reaching the sentinel, return the last node\n\t\t// in the list as the position where the data may be\n\t\t// inserted into the list.\n\t\treturn new NodeEntry<Boolean, Node>(false, leftNeighbor);\n\t}", "@Override\n public UInt256 getPriorStorageValue(final Address address, final UInt256 key) {\n return getStorageValue(address, key);\n }" ]
[ "0.6847229", "0.6574162", "0.58717", "0.57357967", "0.559452", "0.55436844", "0.55419934", "0.5456758", "0.544667", "0.54270625", "0.53948754", "0.5353749", "0.53445023", "0.53206915", "0.5300909", "0.52343076", "0.5208994", "0.51964617", "0.51833665", "0.51662683", "0.51555216", "0.5133225", "0.51022875", "0.50975627", "0.5079985", "0.50788444", "0.5071575", "0.5062624", "0.5061633", "0.5051032", "0.50089014", "0.49981272", "0.49896017", "0.49255875", "0.49160916", "0.4914623", "0.49003556", "0.48995203", "0.4874039", "0.48739323", "0.48680702", "0.48657686", "0.4862173", "0.48610607", "0.48558104", "0.48507956", "0.48377508", "0.48370695", "0.48265052", "0.4824139", "0.4810438", "0.4805749", "0.48002726", "0.47941643", "0.4788794", "0.47872123", "0.47793013", "0.4778438", "0.4773713", "0.47689593", "0.47669935", "0.47661585", "0.47659945", "0.47561905", "0.47532165", "0.47515365", "0.4751526", "0.47291166", "0.47271168", "0.47266427", "0.4719134", "0.47098538", "0.47050506", "0.47037023", "0.47028282", "0.47012505", "0.46962216", "0.46958905", "0.46872136", "0.46866918", "0.4679391", "0.4673996", "0.46651086", "0.4658688", "0.4657218", "0.46504095", "0.46174255", "0.46037644", "0.46027702", "0.45904362", "0.4588502", "0.4583743", "0.4583332", "0.4582464", "0.4567062", "0.4563863", "0.4560918", "0.45592496", "0.45579597", "0.45559266" ]
0.61026365
2
Get the address set which corresponds to all undefined code units within the specified set of address.
public AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly, TaskMonitor monitor) throws CancelledException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}", "public AddressSetView getAddressSet() {\n\t\treturn new AddressSet(baseAddress, getEndAddress());\n\t}", "static Set<Location> generateIrrelevantSet(UnitLocation unitLocation){\n Objects.requireNonNull(unitLocation);\n final SegmentationGraph bsg = generateSegmentationGraph(unitLocation);\n return bsg.irrelevantSet(unitLocation);\n }", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "private Set<String> excludeLoopback(Set<String> localAddr) {\n Set<String> newAddr = new HashSet<>();\n for (String addr : localAddr) {\n if (!Constants.localAddressList.contains(addr.toLowerCase())) {\n newAddr.add(addr);\n }\n }\n return newAddr;\n }", "RegSet[] defined() {\r\n RegSet[] defined = new RegSet[code.length];\r\n for (int i = 0; i < code.length; i++)\r\n\tdefined[i] = code[i].defined();\r\n // Parameters are implicitly defined at top of function\r\n for (String var : params)\r\n\tdefined[0].add(new Id(var));\r\n return defined;\r\n }", "RegSet[] used() {\r\n RegSet[] used = new RegSet[code.length];\r\n for (int i = 0; i < code.length; i++) \r\n\tused[i] = code[i].used();\r\n return used;\r\n }", "public boolean isUndefined(Address start, Address end);", "public void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext);", "private Cache getCacheSet(int blockAddress) {\n int n = Integer.highestOneBit(mCacheSets.length);\n checkState(mCacheSets.length == n, \"number of sets should be a power of 2\");\n int k = Integer.numberOfTrailingZeros(n);\n int address = MemoryUtils.firstAddressOfBlock(blockAddress);\n address = address >>> (32 - (k - 1));\n checkState(address < n, \"set address must be lower than n\");\n return (MOST_SIGNIFICANT_BITS_FOR_SET) ? mCacheSets[address] : mCacheSets[blockAddress % mCacheSets.length];\n }", "Set<MacAddress> neighbors();", "public static Set<String> getRegionCodeSet() {\n // The capacity is set to 321 as there are 241 different entries,\n // and this offers a load factor of roughly 0.75.\n Set<String> regionCodeSet = new HashSet<String>(321);\n\n regionCodeSet.add(\"AC\");\n regionCodeSet.add(\"AD\");\n regionCodeSet.add(\"AE\");\n regionCodeSet.add(\"AF\");\n regionCodeSet.add(\"AG\");\n regionCodeSet.add(\"AI\");\n regionCodeSet.add(\"AL\");\n regionCodeSet.add(\"AM\");\n regionCodeSet.add(\"AO\");\n regionCodeSet.add(\"AR\");\n regionCodeSet.add(\"AS\");\n regionCodeSet.add(\"AT\");\n regionCodeSet.add(\"AU\");\n regionCodeSet.add(\"AW\");\n regionCodeSet.add(\"AX\");\n regionCodeSet.add(\"AZ\");\n regionCodeSet.add(\"BA\");\n regionCodeSet.add(\"BB\");\n regionCodeSet.add(\"BD\");\n regionCodeSet.add(\"BE\");\n regionCodeSet.add(\"BF\");\n regionCodeSet.add(\"BG\");\n regionCodeSet.add(\"BH\");\n regionCodeSet.add(\"BI\");\n regionCodeSet.add(\"BJ\");\n regionCodeSet.add(\"BL\");\n regionCodeSet.add(\"BM\");\n regionCodeSet.add(\"BN\");\n regionCodeSet.add(\"BO\");\n regionCodeSet.add(\"BQ\");\n regionCodeSet.add(\"BR\");\n regionCodeSet.add(\"BS\");\n regionCodeSet.add(\"BT\");\n regionCodeSet.add(\"BW\");\n regionCodeSet.add(\"BY\");\n regionCodeSet.add(\"BZ\");\n regionCodeSet.add(\"CA\");\n regionCodeSet.add(\"CC\");\n regionCodeSet.add(\"CD\");\n regionCodeSet.add(\"CF\");\n regionCodeSet.add(\"CG\");\n regionCodeSet.add(\"CH\");\n regionCodeSet.add(\"CI\");\n regionCodeSet.add(\"CK\");\n regionCodeSet.add(\"CL\");\n regionCodeSet.add(\"CM\");\n regionCodeSet.add(\"CN\");\n regionCodeSet.add(\"CO\");\n regionCodeSet.add(\"CR\");\n regionCodeSet.add(\"CU\");\n regionCodeSet.add(\"CV\");\n regionCodeSet.add(\"CW\");\n regionCodeSet.add(\"CX\");\n regionCodeSet.add(\"CY\");\n regionCodeSet.add(\"CZ\");\n regionCodeSet.add(\"DE\");\n regionCodeSet.add(\"DJ\");\n regionCodeSet.add(\"DK\");\n regionCodeSet.add(\"DM\");\n regionCodeSet.add(\"DO\");\n regionCodeSet.add(\"DZ\");\n regionCodeSet.add(\"EC\");\n regionCodeSet.add(\"EE\");\n regionCodeSet.add(\"EG\");\n regionCodeSet.add(\"EH\");\n regionCodeSet.add(\"ER\");\n regionCodeSet.add(\"ES\");\n regionCodeSet.add(\"ET\");\n regionCodeSet.add(\"FI\");\n regionCodeSet.add(\"FJ\");\n regionCodeSet.add(\"FK\");\n regionCodeSet.add(\"FM\");\n regionCodeSet.add(\"FO\");\n regionCodeSet.add(\"FR\");\n regionCodeSet.add(\"GA\");\n regionCodeSet.add(\"GB\");\n regionCodeSet.add(\"GD\");\n regionCodeSet.add(\"GE\");\n regionCodeSet.add(\"GF\");\n regionCodeSet.add(\"GG\");\n regionCodeSet.add(\"GH\");\n regionCodeSet.add(\"GI\");\n regionCodeSet.add(\"GL\");\n regionCodeSet.add(\"GM\");\n regionCodeSet.add(\"GN\");\n regionCodeSet.add(\"GP\");\n regionCodeSet.add(\"GR\");\n regionCodeSet.add(\"GT\");\n regionCodeSet.add(\"GU\");\n regionCodeSet.add(\"GW\");\n regionCodeSet.add(\"GY\");\n regionCodeSet.add(\"HK\");\n regionCodeSet.add(\"HN\");\n regionCodeSet.add(\"HR\");\n regionCodeSet.add(\"HT\");\n regionCodeSet.add(\"HU\");\n regionCodeSet.add(\"ID\");\n regionCodeSet.add(\"IE\");\n regionCodeSet.add(\"IL\");\n regionCodeSet.add(\"IM\");\n regionCodeSet.add(\"IN\");\n regionCodeSet.add(\"IQ\");\n regionCodeSet.add(\"IR\");\n regionCodeSet.add(\"IS\");\n regionCodeSet.add(\"IT\");\n regionCodeSet.add(\"JE\");\n regionCodeSet.add(\"JM\");\n regionCodeSet.add(\"JO\");\n regionCodeSet.add(\"JP\");\n regionCodeSet.add(\"KE\");\n regionCodeSet.add(\"KG\");\n regionCodeSet.add(\"KH\");\n regionCodeSet.add(\"KI\");\n regionCodeSet.add(\"KM\");\n regionCodeSet.add(\"KN\");\n regionCodeSet.add(\"KP\");\n regionCodeSet.add(\"KR\");\n regionCodeSet.add(\"KW\");\n regionCodeSet.add(\"KY\");\n regionCodeSet.add(\"KZ\");\n regionCodeSet.add(\"LA\");\n regionCodeSet.add(\"LB\");\n regionCodeSet.add(\"LC\");\n regionCodeSet.add(\"LI\");\n regionCodeSet.add(\"LK\");\n regionCodeSet.add(\"LR\");\n regionCodeSet.add(\"LS\");\n regionCodeSet.add(\"LT\");\n regionCodeSet.add(\"LU\");\n regionCodeSet.add(\"LV\");\n regionCodeSet.add(\"LY\");\n regionCodeSet.add(\"MA\");\n regionCodeSet.add(\"MC\");\n regionCodeSet.add(\"MD\");\n regionCodeSet.add(\"ME\");\n regionCodeSet.add(\"MF\");\n regionCodeSet.add(\"MG\");\n regionCodeSet.add(\"MH\");\n regionCodeSet.add(\"MK\");\n regionCodeSet.add(\"ML\");\n regionCodeSet.add(\"MM\");\n regionCodeSet.add(\"MN\");\n regionCodeSet.add(\"MO\");\n regionCodeSet.add(\"MP\");\n regionCodeSet.add(\"MQ\");\n regionCodeSet.add(\"MR\");\n regionCodeSet.add(\"MS\");\n regionCodeSet.add(\"MT\");\n regionCodeSet.add(\"MU\");\n regionCodeSet.add(\"MV\");\n regionCodeSet.add(\"MW\");\n regionCodeSet.add(\"MX\");\n regionCodeSet.add(\"MY\");\n regionCodeSet.add(\"MZ\");\n regionCodeSet.add(\"NA\");\n regionCodeSet.add(\"NC\");\n regionCodeSet.add(\"NE\");\n regionCodeSet.add(\"NF\");\n regionCodeSet.add(\"NG\");\n regionCodeSet.add(\"NI\");\n regionCodeSet.add(\"NL\");\n regionCodeSet.add(\"NO\");\n regionCodeSet.add(\"NP\");\n regionCodeSet.add(\"NR\");\n regionCodeSet.add(\"NU\");\n regionCodeSet.add(\"NZ\");\n regionCodeSet.add(\"OM\");\n regionCodeSet.add(\"PA\");\n regionCodeSet.add(\"PE\");\n regionCodeSet.add(\"PF\");\n regionCodeSet.add(\"PG\");\n regionCodeSet.add(\"PH\");\n regionCodeSet.add(\"PK\");\n regionCodeSet.add(\"PL\");\n regionCodeSet.add(\"PM\");\n regionCodeSet.add(\"PR\");\n regionCodeSet.add(\"PS\");\n regionCodeSet.add(\"PT\");\n regionCodeSet.add(\"PW\");\n regionCodeSet.add(\"PY\");\n regionCodeSet.add(\"QA\");\n regionCodeSet.add(\"RE\");\n regionCodeSet.add(\"RO\");\n regionCodeSet.add(\"RS\");\n regionCodeSet.add(\"RU\");\n regionCodeSet.add(\"RW\");\n regionCodeSet.add(\"SA\");\n regionCodeSet.add(\"SB\");\n regionCodeSet.add(\"SC\");\n regionCodeSet.add(\"SD\");\n regionCodeSet.add(\"SE\");\n regionCodeSet.add(\"SG\");\n regionCodeSet.add(\"SH\");\n regionCodeSet.add(\"SI\");\n regionCodeSet.add(\"SJ\");\n regionCodeSet.add(\"SK\");\n regionCodeSet.add(\"SL\");\n regionCodeSet.add(\"SM\");\n regionCodeSet.add(\"SN\");\n regionCodeSet.add(\"SO\");\n regionCodeSet.add(\"SR\");\n regionCodeSet.add(\"SS\");\n regionCodeSet.add(\"ST\");\n regionCodeSet.add(\"SV\");\n regionCodeSet.add(\"SX\");\n regionCodeSet.add(\"SY\");\n regionCodeSet.add(\"SZ\");\n regionCodeSet.add(\"TC\");\n regionCodeSet.add(\"TD\");\n regionCodeSet.add(\"TG\");\n regionCodeSet.add(\"TH\");\n regionCodeSet.add(\"TJ\");\n regionCodeSet.add(\"TL\");\n regionCodeSet.add(\"TM\");\n regionCodeSet.add(\"TN\");\n regionCodeSet.add(\"TO\");\n regionCodeSet.add(\"TR\");\n regionCodeSet.add(\"TT\");\n regionCodeSet.add(\"TV\");\n regionCodeSet.add(\"TW\");\n regionCodeSet.add(\"TZ\");\n regionCodeSet.add(\"UA\");\n regionCodeSet.add(\"UG\");\n regionCodeSet.add(\"US\");\n regionCodeSet.add(\"UY\");\n regionCodeSet.add(\"UZ\");\n regionCodeSet.add(\"VA\");\n regionCodeSet.add(\"VC\");\n regionCodeSet.add(\"VE\");\n regionCodeSet.add(\"VG\");\n regionCodeSet.add(\"VI\");\n regionCodeSet.add(\"VN\");\n regionCodeSet.add(\"VU\");\n regionCodeSet.add(\"WF\");\n regionCodeSet.add(\"WS\");\n regionCodeSet.add(\"XK\");\n regionCodeSet.add(\"YE\");\n regionCodeSet.add(\"YT\");\n regionCodeSet.add(\"ZA\");\n regionCodeSet.add(\"ZM\");\n regionCodeSet.add(\"ZW\");\n\n return regionCodeSet;\n }", "public Set<Square> validDestinations(Board b);", "public static AddressSetView getAddressSet(AddressFactory factory, Address start,\n\t\t\tboolean forward) {\n\t\tAddressSet all = factory.getAddressSet();\n\t\tif (forward) {\n\t\t\tAddress max = all.getMaxAddress();\n\t\t\treturn factory.getAddressSet(start, max);\n\t\t}\n\t\tAddress min = all.getMinAddress();\n\t\treturn factory.getAddressSet(min, start);\n\t}", "public Set<Long> allPlaceIds() {\n return new HashSet<Long>( );\n }", "private static String getUnsuccessfulAddresses(\n final List<Pair<RelocatedAddress, Integer>> addresses) {\n return getAddressString(addresses, new ICollectionFilter<Pair<RelocatedAddress, Integer>>() {\n @Override\n public boolean qualifies(final Pair<RelocatedAddress, Integer> item) {\n return item.second() != 0;\n }\n });\n }", "public Collection<Address> getAddressCollection(){\r\n\t\treturn addressCollection;\r\n\t}", "public List<PeerAddress> allOverflow() {\n List<PeerAddress> all = new ArrayList<PeerAddress>();\n for (Map<Number160, PeerStatistic> map : peerMapOverflow) {\n synchronized (map) {\n for (PeerStatistic peerStatistic : map.values()) {\n all.add(peerStatistic.peerAddress());\n }\n }\n }\n return all;\n }", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "public org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder clearADDRESSIND() {\n ADDRESS_IND = null;\n fieldSetFlags()[8] = false;\n return this;\n }", "public abstract java.util.Set getLocations();", "public AddressComponent[] getAddressComponents() {\n return addressComponents;\n }", "public static Set<String> getFullLocaleNameSet()\n/* */ {\n/* 406 */ return getFullLocaleNameSet(\"com/ibm/icu/impl/data/icudt48b\", ICU_DATA_CLASS_LOADER);\n/* */ }", "void clearAddress() {\n mAddress = HdmiCec.ADDR_UNREGISTERED;\n }", "public static java.util.List<com.ifl.rapid.customer.model.CRM_Trn_Address> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence().findAll();\n\t}", "public Set<T> m37700a() {\n return new LinkedHashSet();\n }", "public static java.util.Set<java.lang.String> getAvailableIDs(android.icu.util.TimeZone.SystemTimeZoneType zoneType, java.lang.String region, java.lang.Integer rawOffset) { throw new RuntimeException(\"Stub!\"); }", "List<Place> findUnboundLocationPlaceholders();", "Set<Eid> aliases();", "public Data getFirstUndefinedData(AddressSetView set, TaskMonitor monitor);", "List<?> getAddress();", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "public List<PeerAddress> all() {\n final List<PeerAddress> all = new ArrayList<PeerAddress>();\n for (final Map<Number160, PeerStatistic> map : peerMapVerified) {\n synchronized (map) {\n for (PeerStatistic peerStatistic : map.values()) {\n all.add(peerStatistic.peerAddress());\n }\n }\n }\n return all;\n }", "public void resolveAddress(){\n for(int i = 0; i < byteCodeList.size(); i++){\n if(byteCodeList.get(i) instanceof LabelCode){\n LabelCode code = (LabelCode)byteCodeList.get(i);\n labels.put(code.getLabel(), i);\n }else if(byteCodeList.get(i) instanceof LineCode){\n LineCode code = (LineCode)byteCodeList.get(i);\n lineNums.add(code.n);\n }\n }\n \n //walk through byteCodeList and assgin proper address\n for(int i = 0; i < byteCodeList.size(); i++){\n if(byteCodeList.get(i) instanceof GoToCode){\n GoToCode code = (GoToCode)byteCodeList.get(i);\n code.setNum((Integer)labels.get(code.getLabel()));\n }else if(byteCodeList.get(i) instanceof FalseBranchCode){\n FalseBranchCode code = (FalseBranchCode)byteCodeList.get(i);\n code.setNum((Integer)labels.get(code.getLabel()));\n }else if(byteCodeList.get(i) instanceof CallCode){\n CallCode code = (CallCode)byteCodeList.get(i);\n code.setNum((Integer)labels.get(code.getFuncName()));\n }\n }\n }", "public void setAddresses(List<Address> addresses) {\r\n\r\n this.addresses = addresses;\r\n\r\n }", "@Test\n\tpublic void testUnionSLLSetArrayAll0() {\n\n\t\tint[] arr1 = { 0, 0, 0 };\n\t\tint[] arr2 = { 0, 0, 0, 0 };\n\t\tint[] arr3 = { 0, 0 };\n\t\tint[] arr4 = { 0, 0 };\n\t\tSLLSet listObj100 = new SLLSet(arr1);\n\t\tSLLSet listObj99 = new SLLSet(arr2);\n\t\tSLLSet listObj98 = new SLLSet(arr3);\n\t\tSLLSet listObj97 = new SLLSet(arr4);\n\t\tSLLSet listObj96 = new SLLSet();\n\t\tSLLSet[] Array = { listObj100, listObj99, listObj98, listObj97, listObj96 }; // test static SLLSet union(sArray)\n\n\t\tSLLSet listObj23 = SLLSet.union(Array);\n\n\t\tString expected = \"0\";\n\t\tint expectedSize = 1;\n\n\t\tassertEquals(expectedSize, listObj23.getSize());\n\t\tassertEquals(expected, listObj23.toString());\n\n\t}", "public void setAddresses(List<String> addresses) {\n this.addresses = addresses;\n }", "<T> Set<T> lookupAll(Class<T> type);", "public boolean isSetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FROMADDRESS$6) != 0;\n }\n }", "public SetOfRanges() {\n RangeSet = new Vector();\n }", "@Test\n public void restoreIpAddressesBacktrack1Test() {\n String s1 = \"25525511135\";\n Set<String> expected1 = new HashSet<>();\n expected1.add(\"255.255.11.135\");\n expected1.add(\"255.255.111.35\");\n Set<String> actual1 = new HashSet<>(restoreIpAddressesBacktrack1(s1));\n assertEquals(expected1.size(), actual1.size());\n for (String s : expected1) {\n assertTrue(actual1.contains(s));\n }\n /**\n * Example 2:\n * Input: \"010010\"\n * Output: [\"0.10.0.10\",\"0.100.1.0\"]\n */\n String s2 = \"010010\";\n Set<String> expected2 = new HashSet<>();\n expected2.add(\"0.10.0.10\");\n expected2.add(\"0.100.1.0\");\n Set<String> actual2 = new HashSet<>(restoreIpAddressesBacktrack1(s2));\n assertEquals(expected2.size(), actual2.size());\n for (String s : expected2) {\n assertTrue(actual2.contains(s));\n }\n }", "public Data getUndefinedDataAt(Address addr);", "public void unsetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FROMADDRESS$6, 0);\n }\n }", "public Data getDefinedDataContaining(Address addr);", "public Set<Entry> getSet() {\n Set<Entry> litSet = this.litRegister;\n return litSet;\n }", "public List<StudentAddress> listStudentAddress() {\n\t\treturn null;\r\n\t}", "public CodeUnit getCodeUnitContaining(Address addr);", "default Set<T> from(Set<Source> sources){\n return sources.stream()\n .map(this::from)\n .collect(Collectors.toSet());\n }", "public Set<T> getRanges();", "public static void main(String[] args) {\n\t\tSet<Numbers> enumSet = EnumSet.of(Numbers.ONE,Numbers.TWO,Numbers.THREE,Numbers.FOUR,Numbers.FIVE);\n\t\t \n\t\t\tSystem.out.println(\"enumSet: \" + enumSet);\n\t\t\tSystem.out.println(\"contains: \" + enumSet.contains(Numbers.ONE));\n\t\t\tSystem.out.println(\"isEmpty: \" + enumSet.isEmpty());\n\t\t\tSystem.out.println(\"iterator: \" + enumSet.iterator());\n\t\t\tSystem.out.println(\"remove: \" + enumSet.remove(Numbers.THREE));\n\t\t\tSystem.out.println(\"treeSet: \" + enumSet);\n\t\t\tSystem.out.println(\"size: \" + enumSet.size());\n\t\t\tenumSet.clear();\n\t\t\tSystem.out.println(\"treeSet: \" + enumSet);\n\t}", "@Override\r\n\tpublic List<Address> findAll() {\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\tList<Address> arrayList = new ArrayList<>();\r\n\t\t\r\n\t\tResultSet array = DAOJDBCModel.multiCallReturn(\"SELECT * FROM address;\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(array.next()) {\r\n\t\t\t\tarrayList.add(new Address(array.getInt(\"id\"), array.getString(\"street\"), array.getString(\"district\"),\r\n\t\t\t\t\t\tarray.getInt(\"number\"), array.getString(\"note\"))); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn arrayList;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "Set<String> getOsUSet();", "@ZAttr(id=746)\n public Map<String,Object> unsetAdminConsoleCatchAllAddressEnabled(Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraAdminConsoleCatchAllAddressEnabled, \"\");\n return attrs;\n }", "public Set<Coordinate> getAllSurroundingCellsAsCoordinates() {\n Set<MapCoordinate> mapCoordinates = getAllSurroundingCellsAsMapCoordinatesStartingFromTopLeft(1);\n return mapCoordinates\n .stream()\n .map(mapCoordinate -> mapCoordinate.toCoordinate())\n .collect(\n Collectors.toSet()\n );\n }", "public Map<CeloContract, String> allAddresses() {\n for (CeloContract contract : CeloContract.values()) {\n this.addressFor(contract);\n }\n return cache;\n }", "public Set lookupNoAttributes( String lfn ) {\n Set result = new HashSet();\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n result.addAll( catalog.lookupNoAttributes( lfn ) );\n }\n return result;\n }", "public static String[] getAllPrivateAddress() {\n\t\tArrayList<String> a = new ArrayList<String>();\n\t\ttry {\n\t\t\tEnumeration<NetworkInterface> enums = NetworkInterface.getNetworkInterfaces();\n\t\t\twhile (enums.hasMoreElements()) {\n\t\t\t\tNetworkInterface ni = enums.nextElement();\n\t\t\t\tEnumeration<InetAddress> hosts = ni.getInetAddresses();\n\t\t\t\twhile (hosts.hasMoreElements()) {\n\t\t\t\t\tInetAddress local = hosts.nextElement();\n\t\t\t\t\tString localIP = local.getHostAddress();\n\t\t\t\t\tif (IP4Style.isPrivateIP(localIP)) {\n\t\t\t\t\t\ta.add(localIP);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SocketException exp) {\n\n\t\t}\n\t\tif(a.isEmpty()) return null;\n\t\tString[] all = new String[a.size()];\n\t\treturn a.toArray(all);\n\t}", "@Override\n public Iterable<Location> listLocations() {\n return ImmutableSet.<Location>of();\n }", "public LinkedList<Address> getInputAddressList() {\n assert(invariant());\n return inputAddressList;\n }", "public List<Address> getAllAddresses() throws BackendException;", "public Address getDummyAddress(String name) {\n\t\t if(name.equalsIgnoreCase(\"A\")) return new Address(0xAAAAAAAA);\n\t\telse if(name.equalsIgnoreCase(\"B\")) return new Address(0xBBBBBBBB);\n\t\telse if(name.equalsIgnoreCase(\"C\")) return new Address(0xCCCCCCCC);\n\t\telse if(name.equalsIgnoreCase(\"D\")) return new Address(0xDDDDDDDD);\n\t\telse if(name.equalsIgnoreCase(\"E\")) return new Address(0xEEEEEEEE);\n\t\telse if(name.equalsIgnoreCase(\"F\")) return new Address(0xFFFFFFFF);\n\t\treturn new Address(0);\n\t}", "public CodeUnit getDefinedCodeUnitAfter(Address addr);", "private boolean checkAllMapsTo(\n Set<BooleanFormula> from,\n SSAMap startSSA,\n Set<BooleanFormula> to,\n SSAMap finishSSA,\n BooleanFormula transition\n ) throws SolverException, InterruptedException {\n return solver.isUnsat(bfmgr.and(\n fmgr.instantiate(bfmgr.and(from), startSSA),\n transition,\n fmgr.instantiate(bfmgr.not(bfmgr.and(to)), finishSSA)\n ));\n }", "public @Nullable Set<UidRange> getUids() {\n return null == mUids ? null : new ArraySet<>(mUids);\n }", "public final void setAdresses(List<Address> addresses) {\r\n\t\tthis.addresses = addresses;\r\n\t}", "public static Set<Symbol> getLocalSymbols(Traversable t) {\n Set<Symbol> ret = new LinkedHashSet<Symbol>();\n if (t == null) {\n return ret;\n }\n DFIterator<SymbolTable> iter =\n new DFIterator<SymbolTable>(t, SymbolTable.class);\n while (iter.hasNext()) {\n ret.addAll(getSymbols(iter.next()));\n }\n return ret;\n }", "public void setAddressCollection(Collection<Address> addressCollection){\r\n\t\tthis.addressCollection = addressCollection;\r\n\t}", "@Override\r\n\tpublic List<CodeRangeDis> findAll() {\n\t\treturn codeRangeDisMapper.findAll();\r\n\t}", "public Set<AddressEntry> getEntry() {\n return entrySet;\n }", "@GetMapping()\n\t@Override\n\tpublic List<Address> findAll() {\n\t\treturn addressService.findAll();\n\t}", "private IterableSet<AugmentedStmt> get_EntryPoint(IterableSet<AugmentedStmt> nodeList) {\n IterableSet<AugmentedStmt> entryPoints = new IterableSet<AugmentedStmt>();\n\n for (AugmentedStmt as : nodeList) {\n for (AugmentedStmt po : as.cpreds) {\n if (nodeList.contains(po) == false) {\n entryPoints.add(as);\n break;\n }\n }\n }\n\n return entryPoints;\n }", "public Set lookupNoAttributes(String lfn) {\n Set lfns = new HashSet();\n lfns.add( lfn );\n \n Map<String, Set<String>> result = this.lookupNoAttributes( lfns );\n\n if( result == null ){\n return null;\n }\n else{\n Set values = result.get( lfn );\n if( values == null ){\n //JIRA PM-74\n values = new HashSet();\n }\n return values;\n }\n \n }", "public UsState[] findWhereStateAbbrEquals(String stateAbbr) throws UsStateDaoException;", "@Override\r\n\tpublic List<Map<String, String>> selectAddressList() {\n\t\treturn ado.selectAddressList();\r\n\t}", "private static String getSuccessfulAddresses(\n final List<Pair<RelocatedAddress, Integer>> addresses) {\n return getAddressString(addresses, new ICollectionFilter<Pair<RelocatedAddress, Integer>>() {\n @Override\n public boolean qualifies(final Pair<RelocatedAddress, Integer> item) {\n return item.second() == 0;\n }\n });\n }", "public void\n\t registerRedundantSet(SoState state, int mask)\n\t {\n\t }", "public static List<MemoryBlock> getAllMemoryAddresses() {\n\n List<MemoryBlock> addresses = new ArrayList<MemoryBlock>();\n\n for (int i = 0; i <= EEPROM_MAX_ADDRESS; i++) {\n addresses.add(new MemoryBlock(Utils.intToHexString(i), \"\"));\n }\n return addresses;\n }", "static @Nullable ExplicitLocationSet getLocationsForLhs(\n PointerState pPointerInfo, CPointerExpression pPointer) throws UnrecognizedCodeException {\n LocationSet directLocation = PointerTransferRelation.asLocations(pPointer, pPointerInfo);\n if (!(directLocation instanceof ExplicitLocationSet)) {\n LocationSet indirectLocation =\n PointerTransferRelation.asLocations(pPointer.getOperand(), pPointerInfo);\n if ((indirectLocation instanceof ExplicitLocationSet explicitSet)\n && (explicitSet.getSize() == 1)) {\n directLocation = pPointerInfo.getPointsToSet(Iterables.getOnlyElement(explicitSet));\n }\n }\n if (directLocation instanceof ExplicitLocationSet) {\n return (ExplicitLocationSet) directLocation;\n }\n return null;\n }", "public List<String> restoreIpAddresses(String s) {\n backtracking(1, s, 0);\n return ans;\n }", "public static Set<Map.Entry<String, String>> getUndefinedNamespaces(final Element element) {\n\t\tfinal Set<Map.Entry<String, String>> prefixNamespacePairs = new HashSet<>(); //create a new set in which to store name/value pairs of prefixes and namespaces\n\t\tif(!isNamespaceDefined(element, element.getPrefix(), element.getNamespaceURI())) { //if the element doesn't have the needed declarations\n\t\t\tprefixNamespacePairs.add(new AbstractMap.SimpleImmutableEntry<>(element.getPrefix(), element.getNamespaceURI())); //add this prefix and namespace to the list of namespaces needing to be declared\n\t\t}\n\t\tfinal NamedNodeMap attributeNamedNodeMap = element.getAttributes(); //get the map of attributes\n\t\tfinal int attributeCount = attributeNamedNodeMap.getLength(); //find out how many attributes there are\n\t\tfor(int i = 0; i < attributeCount; ++i) { //look at each attribute\n\t\t\tfinal Attr attribute = (Attr)attributeNamedNodeMap.item(i); //get this attribute\n\t\t\t//as attribute namespaces are not inherited, don't check namespace\n\t\t\t// declarations for attributes if they have neither prefix nor\n\t\t\t// namespace declared\n\t\t\tif(attribute.getPrefix() != null || attribute.getNamespaceURI() != null) {\n\t\t\t\tif(!isNamespaceDefined(element, attribute.getPrefix(), attribute.getNamespaceURI())) //if the attribute doesn't have the needed declarations\n\t\t\t\t\tprefixNamespacePairs.add(new AbstractMap.SimpleImmutableEntry<>(attribute.getPrefix(), attribute.getNamespaceURI())); //add this prefix and namespace to the set of namespaces needing to be declared\n\t\t\t}\n\t\t}\n\t\treturn prefixNamespacePairs; //return the prefixes and namespaces we gathered\n\t}", "private void addBlockAddresses(MemoryBlockDB block, boolean addToAll) {\n\t\tAddress start = block.getStart();\n\t\tAddress end = block.getEnd();\n\t\tif (addToAll) {\n\t\t\tallAddrSet.add(start, end);\n\t\t}\n\t\tif (block.isExternalBlock()) {\n\t\t\taddrSetView.externalBlock.add(start, end);\n\t\t}\n\t\telse if (block.isExecute()) {\n\t\t\taddrSetView.execute.add(start, end);\n\t\t}\n\t\tif (block.isMapped()) {\n\t\t\t// Identify source-blocks which block maps onto and add as a mapped-block to each of these\n\t\t\tAddressRange mappedRange = block.getSourceInfos().get(0).getMappedRange().get();\n\t\t\tfor (MemoryBlockDB b : getBlocks(mappedRange.getMinAddress(),\n\t\t\t\tmappedRange.getMaxAddress())) {\n\t\t\t\tif (!b.isMapped()) {\n\t\t\t\t\tb.addMappedBlock(block);\n\t\t\t\t}\n\t\t\t}\n\t\t\tAddressSet mappedSet = getMappedIntersection(block, addrSetView.initialized);\n\t\t\taddrSetView.initialized.add(mappedSet);\n\t\t\taddrSetView.initializedAndLoaded.add(getMappedIntersection(block, addrSetView.initializedAndLoaded));\n\t\t}\n\t\telse if (block.isInitialized()) {\n\t\t\taddrSetView.initialized.add(block.getStart(), block.getEnd());\n\t\t\tif (block.isLoaded()) {\n\t\t\t\taddrSetView.initializedAndLoaded.add(block.getStart(), block.getEnd());\n\t\t\t}\n\t\t}\n\t}", "public final Set<String> mo34356a() {\n HashSet hashSet = new HashSet();\n for (String next : m1026d()) {\n if (!m1025b(next)) {\n hashSet.add(next);\n }\n }\n return hashSet;\n }", "@Test\n public void restoreIpAddressesBacktrack2Test() {\n String s1 = \"25525511135\";\n Set<String> expected1 = new HashSet<>();\n expected1.add(\"255.255.11.135\");\n expected1.add(\"255.255.111.35\");\n Set<String> actual1 = new HashSet<>(restoreIpAddressesBacktrack2(s1));\n assertEquals(expected1.size(), actual1.size());\n for (String s : expected1) {\n assertTrue(actual1.contains(s));\n }\n /**\n * Example 2:\n * Input: \"010010\"\n * Output: [\"0.10.0.10\",\"0.100.1.0\"]\n */\n String s2 = \"010010\";\n Set<String> expected2 = new HashSet<>();\n expected2.add(\"0.10.0.10\");\n expected2.add(\"0.100.1.0\");\n Set<String> actual2 = new HashSet<>(restoreIpAddressesBacktrack2(s2));\n assertEquals(expected2.size(), actual2.size());\n for (String s : expected2) {\n assertTrue(actual2.contains(s));\n }\n }", "public UnicodeSet getUnicodeSet() {\n/* 64 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "protected abstract void getAllUniformLocations();", "private IRingSet getRingSetOfAtom(List ringSystems, IAtom atom) {\n\t\tIRingSet ringSetOfAtom = null;\n\t\tfor (int i = 0; i < ringSystems.size(); i++) {\n\t\t\tif (((IRingSet) ringSystems.get(i)).contains(atom)) {\n\t\t\t\treturn (IRingSet) ringSystems.get(i);\n\t\t\t}\n\t\t}\n\t\treturn ringSetOfAtom;\n\t}", "Collection<? extends String> getHasAddress();", "public List<Address> findAll();", "public ImmutableSet<K> mo8390e() {\n return new C1374b(this, new C1375c(this.f9855g, 0, this.f9856h));\n }", "public List<Address> getAddresses() {\r\n\r\n if (this.addresses == null) {\r\n\r\n this.addresses = new ArrayList<Address>();\r\n\r\n }\r\n\r\n return this.addresses;\r\n\r\n }", "public void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext,\n\t\t\tTaskMonitor monitor) throws CancelledException;", "public String getAddresses()\n {\n return _addresses;\n }", "public BsAddressExample() {\r\n\t\toredCriteria = new ArrayList<Criteria>();\r\n\t}", "@Override\r\n\tpublic Iterable<Estates> findAll() {\n\t\treturn null;\r\n\t}", "io.envoyproxy.envoy.data.dns.v3.DnsTable.AddressList getAddressList();", "boolean hasAddressList();", "abstract CharArraySet build();", "Set<String> getOsPSet();", "Set<String> getRangeLocalNames();", "public boolean hasADDRESSIND() {\n return fieldSetFlags()[8];\n }" ]
[ "0.53790474", "0.5351126", "0.5330697", "0.53080344", "0.5286528", "0.526674", "0.5112858", "0.5008804", "0.49092534", "0.48805788", "0.48698583", "0.48673442", "0.479302", "0.47648495", "0.47428453", "0.47329646", "0.47286442", "0.47195408", "0.47175604", "0.46837047", "0.4655082", "0.4647799", "0.46375534", "0.46280247", "0.46062273", "0.45908296", "0.457967", "0.4570693", "0.45511281", "0.45467442", "0.45397612", "0.45392677", "0.45378402", "0.45377874", "0.4523451", "0.4510881", "0.45089534", "0.44937217", "0.44750065", "0.44622487", "0.44612208", "0.4439317", "0.4437886", "0.44323337", "0.44299594", "0.44255894", "0.44197467", "0.44173872", "0.44001207", "0.4395682", "0.43937823", "0.43934518", "0.4392686", "0.43868923", "0.4379401", "0.4378328", "0.43756536", "0.43754476", "0.43749273", "0.43748665", "0.43660337", "0.43581235", "0.43559793", "0.43541405", "0.43501657", "0.43498838", "0.43424633", "0.43371788", "0.43352965", "0.43279243", "0.4327741", "0.43253273", "0.43232927", "0.43209866", "0.43204552", "0.43199965", "0.43173325", "0.43170986", "0.43166912", "0.4315781", "0.43151808", "0.4310386", "0.42951274", "0.42944774", "0.42913246", "0.4286652", "0.42745218", "0.4274385", "0.42729685", "0.4272674", "0.4270852", "0.42697322", "0.42696217", "0.42651036", "0.42641118", "0.4259714", "0.42523015", "0.4249857", "0.4248561", "0.42395008" ]
0.6237879
0
Returns the next instruction or defined data after the given address;
public CodeUnit getDefinedCodeUnitAfter(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Instruction getInstructionAfter(Address addr);", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public Data getDataAfter(Address addr);", "public Data getDefinedDataAfter(Address addr);", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "public Instruction getInstructionAt(Address addr);", "public Instruction getInstructionBefore(Address addr);", "public Instruction getInstructionContaining(Address addr);", "public long getNextBlock(long address){\n int marker = readMarkerLowerBits(address - 1);\n int blocksize;\n if(marker == 0){\n blocksize = readLengthField(address, 1);\n return address + blocksize + 1;\n } else if(marker == 15){\n return address + 1;\n } else {\n if (isBlockUsed(address)) marker -= 8;\n blocksize = readLengthField(address, marker);\n if (isBlockUsed(address)) {\n return address + blocksize + 2 * (marker - 8) + 1;\n }\n return address + blocksize + 1;\n }\n }", "private SimInstruction getInstruction(Addr address) {\n var inst = decodedInstructions.get(address);\n\n if (inst != null) {\n return inst;\n }\n\n // Try to decode instruction\n var rawInstruction = program.get(address);\n\n // System.out.println(\"INSTRUC: \" + instructions);\n SpecsCheck.checkNotNull(rawInstruction,\n () -> \"No program instruction found at address \" + address.toNumber() + \" (\" +\n address + \")\");\n\n var microCodeInstruction = decoder.decode(rawInstruction, this);\n decodedInstructions.put(address, microCodeInstruction);\n\n return microCodeInstruction;\n }", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Data getDataAt(Address addr);", "public Data getDefinedDataBefore(Address addr);", "public Data getDataBefore(Address addr);", "private Addr nextPC() {\n if (inDelaySlotQueue()) {\n // Next address\n return currentAddr.inc();\n }\n\n // If there is a jump scheduled, return it\n if (jump != null) {\n var jumpAddr = jump;\n jump = null;\n return jumpAddr;\n }\n\n // Next address\n return currentAddr.inc();\n }", "public Data getDefinedDataAt(Address addr);", "public CodeUnit getCodeUnitAfter(Address addr);", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public byte get(int addr) {\n return data[addr - start];\n }", "public Instruction getInstruction(long index){\n\t\tInstruction instruction = null;\n\t\tint effectiveAddress = (int) (index-Constants.START_ADDRESS);\n\t\tif(effectiveAddress>0)\n\t\t{\n\t\t\teffectiveAddress = effectiveAddress/4;\t\t\t\n\t\t}\n\t\tif(instructions.size()>effectiveAddress)\n\t\t\tinstruction = instructions.get(effectiveAddress);\n\t\treturn instruction;\n\t}", "public Instruction nextInstruction() {\n return this.instructionList.next();\t\n }", "public DataIterator getData(Address addr, boolean forward);", "public Data getDefinedDataContaining(Address addr);", "public int read(int address){\n switch (address){\r\n /*\r\n case 0: {\r\n return registers_w[CONTROL_REGISTER_1];\r\n }\r\n\r\n case 3: {\r\n return spriteMemoryCounter;\r\n }\r\n case 5:{\r\n return registers_w[SCROLL_OFFSET];\r\n }\r\n case 6:{\r\n return horizontalTileCounter | (verticalTileCounter << 5) | (horizontalNameCounter << 10) | (verticalNameCounter << 11);\r\n }\r\n */\r\n\t\t\tcase 0: {\r\n\t\t\t\t\t\treturn scanLine;\r\n\t\t\t\t\t\t// hack\r\n\t\t\t}\r\n case 1: {\r\n return registers_w[CONTROL_REGISTER_2];\r\n }\r\n case STATUS_REGISTER:{ // 2\r\n int returnVal = registers_r[STATUS_REGISTER];\r\n registers_r[STATUS_REGISTER] = getBitsUnset(registers_r[STATUS_REGISTER], STATUS_VBLANK); //| STATUS_SPRITE0_HIT);\r\n isFirstWriteToScroll = true;\r\n lastPPUAddressWasHigh = false;\r\n //logger.info(\"Status is: \" + Integer.toHexString(returnVal));\r\n return returnVal;\r\n }\r\n case SPRITE_MEMORY_DATA:{ // 4\r\n return readFromSpriteMemory();\r\n }\r\n case PPU_MEMORY_DATA:{ // 7\r\n int returnVal = 0xFF & registers_r[PPU_MEMORY_DATA]; // buffered read\r\n \r\n //int returnVal = 0xFF & memory.read(ppuMemoryAddress);\r\n\t\t\tint readAddress = horizontalTileCounter \r\n\t\t\t\t\t\t\t\t| (verticalTileCounter << 5)\r\n\t\t\t\t\t\t\t\t| (horizontalNameCounter << 10)\r\n\t\t\t\t\t\t\t\t| (verticalNameCounter << 11)\r\n\t\t\t\t\t\t\t\t| ((fineVerticalCounter & 0x3) << 12);\r\n\r\n\t\t\tif (readAddress == 0x3F10 || readAddress == 0x3F14 || readAddress == 0x3F18 || readAddress == 0x3F1C) {\r\n\t\t\t\treadAddress = readAddress & 0x3F0F;\r\n\t\t\t}\r\n registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(readAddress);\r\n // registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(ppuMemoryAddress);\r\n incrementCounters();\r\n /*\r\n if ((registers_w[CONTROL_REGISTER_1] & CR1_VERTICAL_WRITE) == 0){\r\n ppuMemoryAddress++;\r\n }\r\n else {\r\n ppuMemoryAddress = (ppuMemoryAddress + 32);\r\n }\r\n */\r\n return returnVal;\r\n }\r\n\r\n default: throw new RuntimeException(\"Invalid read attempt: \" + Integer.toHexString(address));\r\n }\r\n }", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "private NasmInst getNextInst(NasmInst previousInst) {\n if (previousInst == null)\n throw new FgException(\"ERROR: Need previous instruction to find the next one\");\n int instIndex = nasm.listeInst.indexOf(previousInst);\n if (instIndex == -1)\n throw new FgException(\"ERROR: Instruction doesn't appear on the NASM\");\n if (instIndex == nasm.listeInst.size() - 1)\n throw new FgException(\"ERROR: No next instruction\");\n return nasm.listeInst.get(instIndex + 1);\n }", "private int getOperandAddress(final CPU6502Instruction instruction) {\r\n // switch address mode\r\n switch (instruction.addressMode) {\r\n case CPU6502Instruction.ZERO:\r\n return this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n case CPU6502Instruction.ZERO_X:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n case CPU6502Instruction.ZERO_Y:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.y) & 0xff;\r\n case CPU6502Instruction.INDIRECT: {\r\n final int lowAddress = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n final int highAddress = (this.memory[this.currentInstructionAddress + 2] & 0xff) << 8;\r\n\r\n return (readByte(highAddress + lowAddress) & 0xff) + ((readByte(highAddress + ((lowAddress + 1) & 0xff)) & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_X: {\r\n final int p = ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n\r\n return (this.memory[p] & 0xff) + ((this.memory[(p + 1) & 0xff] & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_Y: {\r\n // this is the address on the zero page where we read from\r\n final int p = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n\r\n // if over page boundary then do another access => one more cycle\r\n final int lowAddress = (this.memory[p] & 0xff) + this.y;\r\n\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[(p + 1) & 0xff] & 0xff) << 8)) & 0xffff;\r\n }\r\n case CPU6502Instruction.RELATIVE: {\r\n // calculate relative address\r\n final int address = this.memory[this.currentInstructionAddress + 1] + this.pc;\r\n\r\n // add two cycles if crossing page boundary, otherwise one\r\n this.cycles += ((this.pc) & 0xff00) != (address & 0xff00) ? 2 : 1;\r\n return address;\r\n }\r\n case CPU6502Instruction.ABSOLUTE:\r\n return (this.memory[this.currentInstructionAddress + 1] & 0xff) + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8);\r\n case CPU6502Instruction.ABSOLUTE_X:\r\n case CPU6502Instruction.ABSOLUTE_Y: {\r\n // read low-byte of the address\r\n final int lowAddress = (this.memory[this.currentInstructionAddress + 1] & 0xff) + (instruction.addressMode == CPU6502Instruction.ABSOLUTE_Y ? this.y : this.x);\r\n\r\n // if over page boundary then do another access => one more cycle\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8)) & 0xffff;\r\n }\r\n\r\n default:\r\n throw new RuntimeException(\"Illegal address mode for instruction \" + instruction.toString() + \" ($\" + Integer.toHexString(instruction.opCode) + \")\");\r\n }\r\n }", "public DataIterator getDefinedData(Address addr, boolean forward);", "public int rva2offset(Address address) {\n\t\tint offset = -1;\n\t\tfor(IMAGE_SECTION_HEADER section:peFileSections) {\n\t\t\tif(address.getAddr32() >= section.getVirtualAddress()\n\t\t\t&& address.getAddr32() < section.getVirtualAddress() + section.getVirtualSize()) {\n\t\t\t\toffset = address.getAddr32() - section.getVirtualAddress() + section.getPointerToRawData();\n\t\t\t\treturn offset;\n\t\t\t}\n\t\t}\n\t\tif(address.getAddr32() < peOptionalHeader.getSizeOfHeaders())\n\t\t\treturn address.getAddr32();\n\t\treturn offset;\n\t}", "public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}", "public int getReturnAddressOffset();", "@Override protected void fetch() throws MainMemory.InvalidAddressException {\n int pcVal = pc.get();\n UnsignedByte[] ins = mem.read (pcVal, 2);\n byte opCode = (byte) (ins[0].value() >>> 4);\n insOpCode.set (opCode);\n insOp0.set (ins[0].value() & 0x0f);\n insOp1.set (ins[1].value() >>> 4);\n insOp2.set (ins[1].value() & 0x0f);\n insOpImm.set (ins[1].value());\n pcVal += 2;\n switch (opCode) {\n case 0x0:\n case 0xb:\n\tlong opExt = mem.readIntegerUnaligned (pcVal);\n\tpcVal += 4;\n\tinsOpExt.set (opExt);\n\tinstruction.set (ins[0].value() << 40 | ins[1].value() << 32 | opExt);\n\tbreak;\n default:\n\tinsOpExt.set (0);\n\tinstruction.set (ins[0].value() << 40 | ins[1].value() << 32);\n }\n pc.set (pcVal);\n }", "protected byte direct_read(int address) {\n return segment_data[address];\n }", "public byte NEXT() {\r\n\t\t//log(\"Frame.NEXT mp=\"+mp);\r\n\t\tint addr=base+(mp++);\r\n\t\tbyte b=heap.readByte(addr);\r\n\t\t//log(\"Frame.NEXT addr=\"+addr+\"; byte=\"+b+\" \"+hexByte(b));\r\n\t\treturn b;\r\n\t}", "public Address getNextHop()\n {\n return (Address)route.get(getHopCount()+1);\n }", "public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);", "public byte get(int address) {\n try {\n return direct_read(address);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }", "public Data getUndefinedDataAt(Address addr);", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "public Data getDataContaining(Address addr);", "public int getLastInstructionAddress() { return mLastInstructionAddress; }", "@Override\n\tpublic String getNext() throws IOException {\n\t\ttry {\n\t\t\t// Ignore space, tab, newLine, commentary\n\t\t\tint nextVal = reader.read();\n\t\t\tnextVal = this.ignore(nextVal);\n\n\t\t\treturn (!isEndOfFile(nextVal)) ? this.getInstruction(nextVal) : null;\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\n\t}", "public int getInstruction(int index){\n \tif (index % 4 != 0){ //check to see if the index is aligned\n\t\t\tSystem.out.println(\"Wrong number for PC\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\treturn memory[(index / 4)];\n }", "private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }", "public E next(){\r\n E data = node.getData();\r\n node = node.getNext();\r\n return data;\r\n }", "String getNext();", "String getNext();", "Optional<MemoryAddress> lookup(String name);", "public SMTraffic getNext(String nextstate){\n TaskState taskstate = getTaskstates().get(currentrealm + \"_\" + nextstate);\n if (taskstate != null){\n return new SMTraffic(0l, 0l, 0, taskstate.getCallstate(), this.getClass(),\n new VirnaPayload()\n .setObjectType(nextstate)\n .setObject(this)\n .setString(taskstate.getStatecmd())\n );\n }\n return null;\n }", "private String getDeasLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return symbols[key] + \": \";\n }\n return \"\";\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "public byte get(int addr) throws ProgramException {\n return getSegment(addr, true).get(addr);\n }", "public Instruction readNextInstruction() {\n // method -> method's code\n byte[] bytecode = this.getJvmMethod().getCode();\n\n int pc = this.getNextPc();\n BytecodeReader bytecodeReader = new BytecodeReader(Arrays.copyOfRange(bytecode, pc, bytecode.length));\n\n Instruction instruction = Instruction.readInstruction(bytecodeReader);\n logger.debug(\"read instruction: {}\", instruction);\n\n // fetch operands (may fetch nothing)\n instruction.fetchOperands(bytecodeReader);\n\n return instruction;\n }", "public Data nextData()\r\n\t\t{\r\n\t\t\treturn this.nextData;\r\n\t\t}", "public Variable getNext(){\n\t\treturn this.next;\n\t}", "public ByteBuffer read(long address)\n {\n return tryRead(address, null);\n }", "private String getLongInstruction(int nextVal) throws java.io.IOException {\n\t\treadUntilEndOfLine(nextVal);\n\t\treturn next;\n\t}", "public Address getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;", "@Override\n public int read(int address) {\n\n Preconditions.checkBits16(address);\n\n switch (address) {\n\n case AddressMap.REG_DIV:\n return Bits.extract(DIV, Byte.SIZE, Byte.SIZE);\n\n case AddressMap.REG_TIMA:\n return TIMA;\n\n case AddressMap.REG_TMA:\n return TMA;\n\n case AddressMap.REG_TAC:\n return TAC;\n\n default:\n return NO_DATA;\n }\n\n }", "private final byte getOperand(final CPU6502Instruction instruction) {\r\n return instruction.addressMode == CPU6502Instruction.IMMEDIATE\r\n ? this.memory[this.currentInstructionAddress + 1]\r\n : readByte(getOperandAddress(instruction));\r\n }", "public List<DexlibAbstractInstruction> instructionsAfter(DexlibAbstractInstruction instruction) {\n int i = instructions.indexOf(instruction);\n if (i == -1) {\n throw new IllegalArgumentException(\"Instruction\" + instruction + \"not part of this body.\");\n }\n\n return instructions.subList(i + 1, instructions.size());\n }", "public Integer nextOffset() {\n return this.nextOffset;\n }", "public long get_next_index(long number) {\n return ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].getLong((int) (number * POINTER_LENGTH % ptr_parts_size[0] + 13));\n }", "private void findNewNextInStack() {\n if (stack.empty()) {\n next = Chunk.NONE;\n return;\n }\n next = stack.pop();\n long valueReference = INVALID_VALUE_REFERENCE;\n if (next != Chunk.NONE) {\n valueReference = getEntryFieldLong(next, OFFSET.VALUE_REFERENCE);\n }\n while (next != Chunk.NONE && valueReference == INVALID_VALUE_REFERENCE) {\n if (!stack.empty()) {\n next = stack.pop();\n if (next != Chunk.NONE) {\n valueReference = getEntryFieldLong(next, OFFSET.VALUE_REFERENCE);\n }\n } else {\n next = Chunk.NONE;\n return;\n }\n }\n }", "public Address nextReceiveAddress(int acctnum) {\n HDAccount acct = mAccounts.get(acctnum);\n return acct.nextReceiveAddress();\n }", "public T next()\r\n { \r\n if (next == null)\r\n throw new NoSuchElementException(\"Attempt to\" +\r\n \" call next when there's no next element.\");\r\n\r\n prev = next;\r\n next = next.next;\r\n return prev.data;\r\n }", "long getAddress(ByteBuffer buffer);", "public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }", "public abstract byte[] readData(int address, int length);", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "@Field(1) \n\tpublic Pointer<uvc_processing_unit > next() {\n\t\treturn this.io.getPointerField(this, 1);\n\t}", "public CodeUnit getCodeUnitBefore(Address addr);", "public Integer getNextHopAddress(Integer LL3PNetworknumber) {\n\t\tIterator<RouteTableEntry> tableIterator=table.iterator();\n\t\tRouteTableEntry tmp=null;\n\t\t//boolean found=false;\n\t\tInteger nextHop=null;\n\t\twhile(tableIterator.hasNext()){\n\t\t\ttmp=tableIterator.next();\n\t\t\tif (tmp.getNetworkDistancePair().getNetworkNumber().equals(LL3PNetworknumber)){\n\t\t\t\tnextHop=tmp.getNextHOP();\n\t\t\t}\n\t\t}\n\t\treturn nextHop;\n\t }", "public C getNext();", "public CodeUnit getDefinedCodeUnitBefore(Address addr);", "public T next(){\n return (T)data[ci++];\n }", "@Override\r\n\t\tpublic E next() {\n\t\t\tcaret = caret.next();\r\n\t\t\tif (caret == null)\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\tnextIndex++;\r\n\t\t\treturn caret.n.data[caret.idx];\r\n\t\t}", "public Object next()\n/* */ {\n/* 84 */ if (this.m_offset < this.m_limit) {\n/* 85 */ return this.m_array[(this.m_offset++)];\n/* */ }\n/* 87 */ throw new NoSuchElementException();\n/* */ }", "public final int getLine()\n\t{\n\t\treturn address >>> 8 & 0x0F;\n\t}", "public Cell getNext()\n { return next; }", "public byte[] searchReturnData(short addressInDataBlock) {\n //take initial and size binary from memory\n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //if 0 no have data\n if (initial == 0 && sizeData == 0) {\n return null;\n }\n\n //return data\n byte[] toReturn = new byte[sizeData];\n \n int j = 0;\n for (short i = initial; i < initial + sizeData; i++) {\n toReturn[j] = serialize[i];\n j++;\n }\n\n return toReturn;\n }", "public CodeUnit getCodeUnitAt(Address addr);", "private String getLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return \"(\" + symbols[key] + \")\";\n }\n return \"\";\n }", "private long readJumpOffset() throws IOException {\n byte[] sec = new byte[4];\n ins.read(sec);\n return convertByteValueToLong(sec);\n }", "public HDAddressDescription findAddress(Address addr) {\n HDAddressDescription retval = null;\n for (HDAccount acct : mAccounts) {\n retval = acct.findAddress(addr);\n if (retval != null)\n return retval;\n }\n return retval;\n }", "public MessageBitSection next();", "public static Address getARandomAddress(){\n Address address = RandomAddress.get().next();\n return address;\n }", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "public T getNextElement();", "protected final void emulateNextInstruction() {\r\n // we have to check for interrupts?\r\n if (this.isCheckInterrupt) {\r\n serviceIRQorNMI();\r\n }\r\n\r\n // determine address of the next instruction\r\n this.currentInstructionAddress = getPC();\r\n // get the instruction from memory\r\n final CPU6502Instruction instruction = this.instructions[this.memory[this.currentInstructionAddress] & 0xff];\r\n\r\n // interpret the instruction\r\n this.cycles += instruction.cycles;\r\n addPC(instruction.size);\r\n\r\n if (DEBUG_CODE) {\r\n System.out.println(\"A: \" + this.ac + \", X: \" + this.x + \", Y: \" + this.y + \", status: \" + (this.zeroFlag ? \"Z\" : \"-\") + (this.carryFlag ? \"C\" : \"-\") + (this.signFlag ? \"N\" : \"-\"));\r\n System.out.println(\"pc: $\" + Integer.toHexString(this.pc - instruction.size) + \", opCode: $\" + Integer.toHexString(instruction.opCode) + \", ins: \" + disassemble(instruction));\r\n }\r\n\r\n emulateInstruction(instruction);\r\n }", "@SuppressWarnings(\"unchecked\")\n\t\tpublic T next() throws NoSuchElementException {\n\t\t\ttry {\n//\t\t\t\tT object = (T)data[cursor * numCols + pinnedColumn];\n\t\t\t\tT object = get(cursor, pinnedColumn);\n\t\t\t\tlastRet = cursor++;\n\t\t\t\treturn object;\n\t\t\t} catch ( IndexOutOfBoundsException e ) {\n\t\t\t\tthrow new NoSuchElementException( \"You have iterated past the last element.\" + e.toString() );\n\t\t\t}\n\t\t}", "public MainNode getMainNodeNextPointer(MainNode node) {\n return node.mainNext;\n }", "public abstract Position nextPosition(Position position);", "private void nextCode(int code) {\n int r1;\n int r2;\n int r3;\n int label;\n char c;\n String s;\n int constant;\n int length;\n\n // Each case corresponds to a different instruction\n switch (code) {\n case 0:\n break;\n case 1:\n // 1: Clears the contents of r1\n r1 = checkRegister(memory[++pc]);\n register[r1] = 0;\n break;\n case 2:\n // 2: Clears the memory location specified by r1\n r1 = checkRegister(memory[++pc]);\n int memLoc = register[r1];\n checkMemLocation(memLoc);\n memory[memLoc] = 0;\n break;\n case 3:\n // 3: Clears the memory location specified by label\n label = checkMemLocation(memory[++pc]);\n memory[label] = 0;\n break;\n case 4:\n // 4: Clear a block of memory. The starting location is specified by r1, the count is in r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n checkMemLocation(register[1] + register[r2] - 1);\n for (int i = register[r1]; i < register[r2]; i++) {\n memory[i] = 0;\n }\n break;\n case 5:\n // 5: Move the specified constant to register r1\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] = constant;\n break;\n case 6:\n // 6: Move the contents of register r1 to r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] = register[r1];\n break;\n case 7:\n // 7: Move the contents of register r1 to the memory location specified by label;\n r1 = checkRegister(memory[++pc]);\n label = checkMemLocation(memory[++pc]);\n memory[label] = register[r1];\n break;\n case 8:\n // 8: Move the contents of memory location label to register r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] = memory[label];\n break;\n case 9:\n // 9: Move the memory location specified by r1 to r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] = memory[register[r1]];\n break;\n case 10:\n // 10: Move the address of label to register r1\n\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] = label;\n break;\n case 11:\n // 11: Move a block of memory. The source is specified by r1, the destination by r2, the count is in r3\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n r3 = checkRegister(memory[++pc]);\n // check mem locations of first and last elements to be copied\n checkMemLocation(register[r1]);\n checkMemLocation(register[1] + register[r3] - 1);\n int toMove[] = new int[register[r3]];\n int movIndex = 0;\n for (int i = register[r1]; i < toMove.length; i++) {\n toMove[movIndex] = memory[i];\n movIndex++;\n }\n movIndex = 0;\n for (int i = register[r2]; i < toMove.length; i++) {\n memory[i] = toMove[movIndex];\n movIndex++;\n }\n break;\n case 12:\n // 12: add constant 123 to r1\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] += constant;\n\n break;\n case 13:\n // 13: Add the contents of register r1 to r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] += register[r1];\n break;\n case 14:\n // 14: Add the contents of memory location label to r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] += memory[label];\n break;\n case 15:\n // 15: Add the contents of the memory location specified by r1 to r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n register[r2] += memory[register[r1]];\n break;\n case 16:\n // 16: Subtract the constant 123 from r1;\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] -= constant;\n break;\n case 17:\n // 17: Subtract the contents of register r1 from r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] -= register[r1];\n break;\n case 18:\n // 18: Subtract the contents of memory location label from r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] -= memory[label];\n break;\n case 19:\n // 19: Subtract the contents of the memory location specified by r1 from r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n register[r2] -= memory[register[r1]];\n break;\n case 20:\n // 20: Multiply the constant 123 into r1;\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] *= constant;\n break;\n case 21:\n // 21: Multiply the contents of register r1 into r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] *= register[r1];\n break;\n case 22:\n // 22: Multiply the contents of memory location label into r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] *= memory[label];\n break;\n case 23:\n // 23: Multiply the contents of the memory location specified by r1 into r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n register[r2] *= memory[register[r1]];\n break;\n case 24:\n // 24: Divide the constant 123 into r1;\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n register[r1] /= constant;\n break;\n case 25:\n // 25: Divide the contents of register r1 into r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n register[r2] /= register[r1];\n break;\n case 26:\n // 26: Divide the contents of memory location label into r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n register[r1] /= memory[label];\n break;\n case 27:\n // 27: Divide the contents of the memory location specified by r1 into r2\n\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n register[r2] /= memory[register[r1]];\n break;\n case 28:\n // 28: Jump to memory location label\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n break;\n case 29:\n // 29: Subtract one from register r1. Jump to label if result is 0\n r1 = checkRegister(memory[++pc]);\n register[r1]--;\n if (register[r1] == 0) {\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 30:\n // 30: Subtract one from register r1. Jump to label if result is not equal 0\n r1 = checkRegister(memory[++pc]);\n register[r1]--;\n if (register[r1] != 0) {\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 31:\n // 31: Add one to register r1. Jump to label if result is 0\n r1 = checkRegister(memory[++pc]);\n register[r1]++;\n if (register[r1] == 0) {\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 32:\n // 32: Add one to register r1. Jump to label if result is not equal 0\n r1 = checkRegister(memory[++pc]);\n register[r1]++;\n if (register[r1] != 0) {\n label = checkMemLocation(memory[++pc]);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 33:\n // 33: Compares constant to r1. Set status flags\n constant = memory[++pc];\n r1 = checkRegister(memory[++pc]);\n compareRegister = constant - register[r1];\n break;\n case 34:\n // 34: Compares r1 to r2. Set status flags\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n compareRegister = register[r1] - register[r2];\n break;\n case 35:\n // 35: Compares memory location label to r1. Set status flags\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n compareRegister = memory[label] - register[r1];\n break;\n case 36:\n // 36: Jump to label if last compare was negative\n label = checkMemLocation(memory[++pc]);\n if (compareRegister < 0) {\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 37:\n // 37: Jump to label if last compare was zero\n label = checkMemLocation(memory[++pc]);\n if (compareRegister == 0) {\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 38:\n // 38: Jump to label if last compare was positive\n label = checkMemLocation(memory[++pc]);\n if (compareRegister > 0) {\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n case 39:\n // 39: Jump to subroutine label. The contents of registers r5 - r9 are pushed onto the stack\n label = checkMemLocation(memory[++pc]);\n for (int i = 5; i <= 9; i++) {\n stack.push(register[i]);\n }\n stack.push(pc);\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n break;\n case 40:\n // 40: return from subroutine. The contents of registers r5 - r9 are popped from the stack\n pc = stack.pop();\n for (int i = 9; i >= 5; i--) {\n register[i] = stack.pop();\n }\n break;\n case 41:\n // 41: Push r1 onto the stack\n r1 = checkRegister(memory[++pc]);\n stack.push(register[r1]);\n break;\n case 42:\n // 42: Pop the stack onto r1\n r1 = checkRegister(memory[++pc]);\n register[r1] = stack.pop();\n break;\n case 43:\n // 43: Puts stack condition into register r1. 0 - Okay, 1 - Full, 2 - Empty\n if (stack.isEmpty()) {\n stackRegister = STACK_EMPTY;\n } else if (stack.isFull()) {\n stackRegister = STACK_FULL;\n } else {\n stackRegister = STACK_OK;\n }\n r1 = checkRegister(memory[++pc]);\n register[r1] = stackRegister;\n break;\n case 44:\n // 44: Output the character 123 to the console\n c = (char) memory[++pc];\n print(\"\" + c);\n break;\n case 45:\n // 45: Output the character in r1 to the console\n r1 = checkRegister(memory[++pc]);\n c = (char) register[r1];\n print(\"\" + c);\n break;\n case 46:\n // 46: Output the character whose memory location is indicated by r1 to the console\n r1 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n c = (char) memory[register[r1]];\n print(\"\" + c);\n break;\n case 47:\n // 47: Output a block of characters. The starts is indicated by r1, the count by r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n checkMemLocation(register[r1] + register[r2] - 1);\n length = register[r2];\n s = \"\";\n for (int i = register[r1]; i < length; i++) {\n s += (char) memory[i];\n }\n print(s);\n break;\n case 48:\n // 48: read an integer from the console to r1, error code in r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n try {\n register[r1] = nextInt();\n register[r2] = NO_SCAN_ERROR_FOUND;\n } catch (InputMismatchException e) {\n register[r2] = SCAN_ERROR_FOUND;\n }\n break;\n case 49:\n // 49: Print the integer in r1 to the console\n r1 = checkRegister(memory[++pc]);\n print(\"\" + register[r1]);\n break;\n case 50:\n // 50: Read a character from console to r1;\n r1 = checkRegister(memory[++pc]);\n register[r1] = next().charAt(0);\n break;\n case 51:\n // 51: Read a line of text to the memory location starting at label. The count is placed in r1\n label = checkMemLocation(memory[++pc]);\n r1 = checkRegister(memory[++pc]);\n s = nextLine();\n checkMemLocation(label + s.length() - 1);\n for (int i = 0; i < s.length(); i++) {\n memory[label] = s.charAt(i);\n label++;\n }\n register[r1] = s.length();\n break;\n case 52:\n // 52: Break into debugger\n debug();\n break;\n case 53:\n // 53: Move the contents of register r1 into the memory location specified by r2\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r2]);\n memory[register[r2]] = register[r1];\n break;\n case 54:\n // 54: Move the contents of the memory location specified by r1\n r1 = checkRegister(memory[++pc]);\n r2 = checkRegister(memory[++pc]);\n checkMemLocation(register[r1]);\n checkMemLocation(register[r2]);\n memory[register[r2]] = memory[register[r1]];\n break;\n case 55:\n // 55: Output a string stored in label\n label = checkMemLocation(memory[++pc]);\n length = memory[label];\n s = \"\";\n for (int i = 1; i < length + 1; i++) {\n s += (char) memory[label + i];\n }\n print(s);\n break;\n case 56:\n\n // nop: No operation. Does nothing\n break;\n case 57:\n // 57: jump if compare was not equal\n label = checkMemLocation(memory[++pc]);\n if (compareRegister != 0) {\n // subtracts 1 because before every instruction is executed, the pc is automatically incremented\n pc = label - 1;\n }\n break;\n }\n }", "public static FieldBattlePosition nextCheckpoint(Order order) {\n\n FieldBattlePosition nextCheckPoint = null;\n\n if (order.getCheckpoint3()!=null && order.getCheckpoint3().exists() && order.isReachedCheckpoint2()) {\n nextCheckPoint = order.getCheckpoint3();\n } else if (order.getCheckpoint2()!=null && order.getCheckpoint2().exists() && order.isReachedCheckpoint1()) {\n nextCheckPoint = order.getCheckpoint2();\n } else if (order.getCheckpoint1()!=null && order.getCheckpoint1().exists() && !order.isReachedCheckpoint1()) {\n nextCheckPoint = order.getCheckpoint1();\n }\n\n return nextCheckPoint;\n }", "private synchronized void fetch() throws RuntimeException\n {\n clockTick();\n mLastInstructionAddress = mPC;\n if (mPC >= PROGRAM_MEMORY_SIZE)\n throw new RuntimeException(Constants.Error(Constants.UPPER_MEMORY_LIMIT)); \n\n mMBR = program_memory[mPC++];\n mPC %= mMaxPCValue;\n // These instructions are 32bits wide\n // If the current instruction matches these, read the second word\n if (InstructionDecoder.InstructionLength(mMBR) == 32)\n {\n if (mPC >= PROGRAM_MEMORY_SIZE)\n throw new RuntimeException(Constants.Error(Constants.UPPER_MEMORY_LIMIT));\n mMBR2 = program_memory[mPC++];\n mPC %= mMaxPCValue;\n clockTick();\n }\n else\n mMBR2 = 0; \n }", "protected abstract D getNext(D d);", "public ListNode<T> getNext();", "public Z peek() {\n return mNext;\n }" ]
[ "0.7695593", "0.73913443", "0.7006707", "0.6874695", "0.68545187", "0.6589288", "0.6405229", "0.6206432", "0.61825126", "0.61766964", "0.59926236", "0.5979945", "0.5976988", "0.5883806", "0.5802495", "0.5739059", "0.57272846", "0.5696189", "0.56436706", "0.56372046", "0.55639637", "0.5482541", "0.54324347", "0.54242945", "0.54023236", "0.53847003", "0.5381189", "0.53744376", "0.53458637", "0.53437346", "0.5342639", "0.53217584", "0.53058684", "0.5270029", "0.5269797", "0.5260546", "0.5242186", "0.5232124", "0.52292436", "0.5195082", "0.51729363", "0.51388997", "0.5137108", "0.5133484", "0.51101726", "0.5036443", "0.50228643", "0.50228643", "0.50170475", "0.5014219", "0.5011356", "0.50099343", "0.49828804", "0.49790627", "0.49733612", "0.4935263", "0.49314058", "0.49298462", "0.49198505", "0.49167517", "0.49136662", "0.4908053", "0.4907016", "0.49060157", "0.4895504", "0.48887536", "0.48778212", "0.48739618", "0.48661566", "0.48593417", "0.48401582", "0.48224306", "0.4815257", "0.48149157", "0.48132676", "0.4784795", "0.4777393", "0.4761464", "0.47326347", "0.4719822", "0.47083113", "0.4707604", "0.47065818", "0.46914852", "0.46899638", "0.46887153", "0.46744183", "0.4653484", "0.46474698", "0.4646909", "0.46410093", "0.46291026", "0.46240288", "0.46233246", "0.46144977", "0.4612736", "0.46119744", "0.46088642", "0.46025145", "0.459041" ]
0.5578419
20
Returns the closest instruction or defined data that starts before the given address.
public CodeUnit getDefinedCodeUnitBefore(Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Instruction getInstructionBefore(Address addr);", "public Data getDataBefore(Address addr);", "public Data getDefinedDataBefore(Address addr);", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public Instruction getInstructionAfter(Address addr);", "public CodeUnit getCodeUnitBefore(Address addr);", "public Data getDataAfter(Address addr);", "public Data getDefinedDataAfter(Address addr);", "public int rva2offset(Address address) {\n\t\tint offset = -1;\n\t\tfor(IMAGE_SECTION_HEADER section:peFileSections) {\n\t\t\tif(address.getAddr32() >= section.getVirtualAddress()\n\t\t\t&& address.getAddr32() < section.getVirtualAddress() + section.getVirtualSize()) {\n\t\t\t\toffset = address.getAddr32() - section.getVirtualAddress() + section.getPointerToRawData();\n\t\t\t\treturn offset;\n\t\t\t}\n\t\t}\n\t\tif(address.getAddr32() < peOptionalHeader.getSizeOfHeaders())\n\t\t\treturn address.getAddr32();\n\t\treturn offset;\n\t}", "public int addr2offset(Address address) {\n\t\treturn rva2offset(new Address(address.getAddr32()-peOptionalHeader.getImageBase()));\n\t}", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public O before(O a)\r\n {\r\n int index = indexOf(a);\r\n if (index != -1 && index != 0) //is defined and not first\r\n return get(index-1);\r\n else return null;\r\n }", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "public Instruction getInstructionContaining(Address addr);", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "public Instruction getInstructionAt(Address addr);", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "public int getReturnAddressOffset();", "public Node closestPrecedingNode(int id);", "public int relativePosTo(long addr) {\n\t\t\tif(addr < this.start)\n\t\t\t\treturn -1;\n\t\t\tif(addr > this.end)\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "public Data getDefinedDataContaining(Address addr);", "public Data getDefinedDataAt(Address addr);", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "private int binarySearchToFindClosest(String overflowName, int bottomRecord, int topRecord) {\n // Base condition for only having two records left to choose from\n if (topRecord - bottomRecord == 1) {\n String topRecordName = getRecordCompanyName(\"normal\", topRecord);\n\n // If the name of the overflow company comes after the company name of the top record, then the top record is the closest\n if (overflowName.compareTo(topRecordName) >= 1) {\n return topRecord;\n // Otherwise, either the top and bottom records are equal length away, or the bottom record is closer, so return the bottom record\n } else {\n return bottomRecord;\n }\n // Base condition for having only 1 record left means that that record is the closest\n } else if (topRecord == bottomRecord) {\n return topRecord;\n }\n\n int middle = (topRecord + bottomRecord) / 2;\n String nameOfNormalRecord = getRecordCompanyName(\"normal\", middle);\n int alphabeticalOrder = overflowName.compareTo(nameOfNormalRecord);\n if (alphabeticalOrder == 0) {\n return middle;\n } else if (alphabeticalOrder < 0) {\n return binarySearchToFindClosest(overflowName, bottomRecord, middle);\n } else {\n return binarySearchToFindClosest(overflowName, middle + 1, topRecord);\n } \n }", "public Node findPredecessor(int id) {\n\t\tNode n = this;\n\t\twhile (id <= n.getId() || id > n.getSuccessor().getId()) {\n\t\t\tn = n.closestPrecedingFinger(id);\n\t\t}\n\t\treturn n;\n\t}", "public static int offset_addr() {\n return (0 / 8);\n }", "public Location3D getLowLoc() {\n\t\treturn lowPoint;\n\t}", "public CodeUnit getCodeUnitAfter(Address addr);", "private Node locatePrevNode(K key) { \n\t\tNode p = null; \n\t\tNode current = first; \n\t\twhile (current != null && current.getData().getKey().compareTo(key) < 0) {\n\t\t\tp = current; \n\t\t\tcurrent = current.getNext(); \n\t\t}\n\t\treturn p; \n\t}", "private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }", "public CodeUnit getDefinedCodeUnitAfter(Address addr);", "@Override\n public UInt256 getPriorStorageValue(final Address address, final UInt256 key) {\n return getStorageValue(address, key);\n }", "int getLineOffset(int line) throws BadLocationException;", "private int indexOfTop(int stackNum) {\n\t\tint offset = stackNum * stackCapacity;\r\n\t\tint size = sizes[stackNum];\r\n\t\treturn offset+size-1;\r\n\t}", "private int findLineOffset(int line) {\n if (line == 1) {\n return 0;\n }\n if (line > 1 && line <= lineOffsets.size()) {\n return lineOffsets.get(line - 2);\n }\n return -1;\n }", "public int getSourceLine(int pos) {\n unpack();\n int l = 0, r = line_number_table_length - 1;\n if (// array is empty\n r < 0)\n return -1;\n int min_index = -1, min = -1;\n /* Do a binary search since the array is ordered.\n */\n do {\n int i = (l + r) / 2;\n int j = line_number_table[i].getStartPC();\n if (j == pos)\n return line_number_table[i].getLineNumber();\n else if (// else constrain search area\n pos < j)\n r = i - 1;\n else\n // pos > j\n l = i + 1;\n /* If exact match can't be found (which is the most common case)\n * return the line number that corresponds to the greatest index less\n * than pos.\n */\n if (j < pos && j > min) {\n min = j;\n min_index = i;\n }\n } while (l <= r);\n /* It's possible that we did not find any valid entry for the bytecode\n * offset we were looking for.\n */\n if (min_index < 0)\n return -1;\n return line_number_table[min_index].getLineNumber();\n }", "public static DataType findPointerRelativeInner(DataType base, int offset) {\n\t\tif (base instanceof TypeDef) {\n\t\t\tbase = ((TypeDef) base).getBaseDataType();\n\t\t}\n\t\twhile (base instanceof Structure) {\n\t\t\tDataTypeComponent component = ((Structure) base).getComponentContaining(offset);\n\t\t\tif (component == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbase = component.getDataType();\n\t\t\toffset -= component.getOffset();\n\t\t\tif (offset == 0) {\n\t\t\t\treturn base;\n\t\t\t}\n\t\t}\n\t\treturn Undefined1DataType.dataType;\n\t}", "private int getInclusiveTopIndexStartOffset() {\n \n \t\tif (fTextWidget != null && !fTextWidget.isDisposed()) {\n \t\t\tint top= -1;\n \t\t\tif (fSourceViewer instanceof ITextViewerExtension5) {\n \t\t\t\ttop= fTextWidget.getTopIndex();\n \t\t\t\tif ((fTextWidget.getTopPixel() % fTextWidget.getLineHeight()) != 0)\n \t\t\t\t\ttop--;\n \t\t\t\tITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;\n \t\t\t\ttop= extension.widgetLine2ModelLine(top);\n \t\t\t} else {\n \t\t\t\ttop= fSourceViewer.getTopIndex();\n \t\t\t\tif ((fTextWidget.getTopPixel() % fTextWidget.getLineHeight()) != 0)\n \t\t\t\t\ttop--;\n \t\t\t}\n \n \t\t\ttry {\n \t\t\t\tIDocument document= fSourceViewer.getDocument();\n \t\t\t\treturn document.getLineOffset(top);\n \t\t\t} catch (BadLocationException x) {\n \t\t\t}\n \t\t}\n \n \t\treturn -1;\n \t}", "public Alloc getPredecessor() {\n return variant == null ? null : variant.getPredecessor(this);\n }", "public long getNextBlock(long address){\n int marker = readMarkerLowerBits(address - 1);\n int blocksize;\n if(marker == 0){\n blocksize = readLengthField(address, 1);\n return address + blocksize + 1;\n } else if(marker == 15){\n return address + 1;\n } else {\n if (isBlockUsed(address)) marker -= 8;\n blocksize = readLengthField(address, marker);\n if (isBlockUsed(address)) {\n return address + blocksize + 2 * (marker - 8) + 1;\n }\n return address + blocksize + 1;\n }\n }", "private int getOperandAddress(final CPU6502Instruction instruction) {\r\n // switch address mode\r\n switch (instruction.addressMode) {\r\n case CPU6502Instruction.ZERO:\r\n return this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n case CPU6502Instruction.ZERO_X:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n case CPU6502Instruction.ZERO_Y:\r\n return ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.y) & 0xff;\r\n case CPU6502Instruction.INDIRECT: {\r\n final int lowAddress = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n final int highAddress = (this.memory[this.currentInstructionAddress + 2] & 0xff) << 8;\r\n\r\n return (readByte(highAddress + lowAddress) & 0xff) + ((readByte(highAddress + ((lowAddress + 1) & 0xff)) & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_X: {\r\n final int p = ((this.memory[this.currentInstructionAddress + 1] & 0xff) + this.x) & 0xff;\r\n\r\n return (this.memory[p] & 0xff) + ((this.memory[(p + 1) & 0xff] & 0xff) << 8);\r\n }\r\n case CPU6502Instruction.INDIRECT_Y: {\r\n // this is the address on the zero page where we read from\r\n final int p = this.memory[this.currentInstructionAddress + 1] & 0xff;\r\n\r\n // if over page boundary then do another access => one more cycle\r\n final int lowAddress = (this.memory[p] & 0xff) + this.y;\r\n\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[(p + 1) & 0xff] & 0xff) << 8)) & 0xffff;\r\n }\r\n case CPU6502Instruction.RELATIVE: {\r\n // calculate relative address\r\n final int address = this.memory[this.currentInstructionAddress + 1] + this.pc;\r\n\r\n // add two cycles if crossing page boundary, otherwise one\r\n this.cycles += ((this.pc) & 0xff00) != (address & 0xff00) ? 2 : 1;\r\n return address;\r\n }\r\n case CPU6502Instruction.ABSOLUTE:\r\n return (this.memory[this.currentInstructionAddress + 1] & 0xff) + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8);\r\n case CPU6502Instruction.ABSOLUTE_X:\r\n case CPU6502Instruction.ABSOLUTE_Y: {\r\n // read low-byte of the address\r\n final int lowAddress = (this.memory[this.currentInstructionAddress + 1] & 0xff) + (instruction.addressMode == CPU6502Instruction.ABSOLUTE_Y ? this.y : this.x);\r\n\r\n // if over page boundary then do another access => one more cycle\r\n if (instruction.addPageBoundaryCycle && lowAddress > 0xff) {\r\n ++this.cycles;\r\n }\r\n\r\n return (lowAddress + ((this.memory[this.currentInstructionAddress + 2] & 0xff) << 8)) & 0xffff;\r\n }\r\n\r\n default:\r\n throw new RuntimeException(\"Illegal address mode for instruction \" + instruction.toString() + \" ($\" + Integer.toHexString(instruction.opCode) + \")\");\r\n }\r\n }", "public Data getDataContaining(Address addr);", "long getAddress(ByteBuffer buffer);", "public final int getLine()\n\t{\n\t\treturn address >>> 8 & 0x0F;\n\t}", "public Data getDataAt(Address addr);", "protected static int advanceUntil(CharBuffer array, int pos, int length, char min) {\n int lower = pos + 1;\n\n // special handling for a possibly common sequential case\n if (lower >= length || (array.get(lower)) >= (min)) {\n return lower;\n }\n\n int spansize = 1; // could set larger\n // bootstrap an upper limit\n\n while (lower + spansize < length\n && (array.get(lower + spansize)) < (min)) {\n spansize *= 2; // hoping for compiler will reduce to\n }\n // shift\n int upper = (lower + spansize < length) ? lower + spansize : length - 1;\n\n // maybe we are lucky (could be common case when the seek ahead\n // expected\n // to be small and sequential will otherwise make us look bad)\n if (array.get(upper) == min) {\n return upper;\n }\n\n if ((array.get(upper)) < (min)) {// means\n // array\n // has no\n // item\n // >= min\n // pos = array.length;\n return length;\n }\n\n // we know that the next-smallest span was too small\n lower += (spansize >>> 1);\n\n // else begin binary search\n // invariant: array[lower]<min && array[upper]>min\n while (lower + 1 != upper) {\n int mid = (lower + upper) >>> 1;\n char arraymid = array.get(mid);\n if (arraymid == min) {\n return mid;\n } else if ((arraymid) < (min)) {\n lower = mid;\n } else {\n upper = mid;\n }\n }\n return upper;\n\n }", "public RegionLocations findForBeforeRow(byte[] row, int replicaId) {\n boolean isEmptyStopRow = isEmptyStopRow(row);\n Map.Entry<byte[], RegionLocations> entry =\n isEmptyStopRow ? cache.lastEntry() : cache.lowerEntry(row);\n if (entry == null) {\n return null;\n }\n RegionLocations locs = entry.getValue();\n if (locs == null) {\n return null;\n }\n HRegionLocation loc = locs.getRegionLocation(replicaId);\n if (loc == null) {\n return null;\n }\n if (\n isEmptyStopRow(loc.getRegion().getEndKey())\n || (!isEmptyStopRow && Bytes.compareTo(loc.getRegion().getEndKey(), row) >= 0)\n ) {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\"Found {} in cache for {}, row='{}', locateType={}, replicaId={}\", loc, tableName,\n Bytes.toStringBinary(row), RegionLocateType.BEFORE, replicaId);\n }\n return locs;\n } else {\n return null;\n }\n }", "private IAVLNode findPredecessor(IAVLNode node)\r\n\t{\r\n\t\t//minimum node has no predecessor\r\n\t\tif (node == minimum) \r\n\t\t\treturn null; \r\n\t\t\r\n\t\tif (node.getLeft().isRealNode()) \r\n\t\t\treturn maxPointer(node.getLeft()); \r\n\t\telse \r\n\t\t{\r\n\t\t\tIAVLNode parent = node.getParent();\r\n\t\t\twhile ((node == parent.getLeft())&&(parent != null)) \r\n\t\t\t{ \r\n\t\t\t\tnode = parent; \r\n \t\t\t\tparent = parent.getParent() ; \r\n\t\t\t}\r\n\t\t\treturn parent;\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic Position<E> before(Position<E> p) throws IllegalArgumentException {\n\t\tif (this.first() == p) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn convert(p).prev;\n\t}", "private T getPredecessor(BSTNode<T> current) {\n while (current.getRight() != null) {\n current = current.getRight();\n }\n return current.getData();\n }", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public static int offset_min() {\n return (56 / 8);\n }", "SimpleString getPrefix(SimpleString address);", "private String getDeasLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return symbols[key] + \": \";\n }\n return \"\";\n }", "private Place getFromPlace(Element passageElement, ArrayList<Place> places) {\n Place start = null;\n for (int i = 0; i <= places.size() - 1; i++) {\n if (passageElement.getElementsByTagName(\"comeFrom\").item(0).getTextContent()\n .equals(places.get(i).getName())) {\n start = places.get(i);\n }\n }\n return start;\n }", "Node predecessor(T value) {\n Node x = search(value);\n if (x.value.compareTo(value) < 0) return x;\n else return predecessor(x);\n }", "public Data getUndefinedDataAt(Address addr);", "int locationOffset(Location location);", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "int absTopOfStack(int stackNum){\n\treturn stackNum * stackSize + stackPointer[stackNum];\n}", "@NotNull\n private RangeInfo findNearestRangeInfo() {\n final int caretPosition = myView.getCaretPosition();\n\n for (final RangeInfo range : myRangeInfos) {\n if (range.isWithin(caretPosition)) {\n return range;\n }\n if (range.getFrom() > caretPosition) {\n return range; // Ranges are sorted, so we are on the next range. Take it, if caret is not within range\n }\n }\n\n return myRangeInfos.last();\n }", "public IORequest SSTF(int deviceNumber, IORequest oldhead) {\n\n IORequest closest = null;\n int min = Integer.MIN_VALUE;\n\n //disk scheduling\n try {\n int hedlo = machine.memory.load(Process_Table[oldhead.prognum].base + Process_Table[oldhead.prognum].acc + 2) + machine.memory.load(Process_Table[oldhead.prognum].base + Process_Table[currentProcess].acc + 3);\n for (IORequest request : waitQ[deviceNumber]) {\n int zzzstart = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 2);\n //System.out.println(zzzstart);\n int distance = Math.abs(hedlo-zzzstart );\n\n //if its the closest to the headlocation \n if (distance > min) {\n closest = request;\n min = distance;\n\n }\n \n }\n waitQ[deviceNumber].remove(closest);\n \n waitQ[deviceNumber].addFirst(closest);\n\n } catch (MemoryFault ex) {\n Logger.getLogger(OperatingSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return closest;\n }", "private String getLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return \"(\" + symbols[key] + \")\";\n }\n return \"\";\n }", "public String getLineTextBefore(int offset) throws Exception {\n\t\tIRegion l = doc.getLineInformationOfOffset(offset);\n\t\treturn textBetween(l.getOffset(), offset);\n\t}", "public Function getFunctionContaining(Address addr);", "private GlobeAccessPointRecord findNearestGAP(InetAddress srcAddr)\n {\n GlobeAccessPointRecord nearestGAPrec;\n FloatCoordinate coords = null;\n\n // look in our GAP lookup cache. It looks like IE5 ignores our\n // Expires: header so we might really need this for performance \n // reasons.\n synchronized(GlobeRedirector.ip2GAPCache) {\n nearestGAPrec =\n (GlobeAccessPointRecord) GlobeRedirector.ip2GAPCache.get(srcAddr);\n }\n\n /*\n * Return the GAP record if it is in the cache.\n */\n if (nearestGAPrec != null) {\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"(cached) Nearest GAP is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n return nearestGAPrec;\n }\n\n /*\n * There is no {srcAddr, nearest GAP record} pair in the cache. We need\n * the geographical coordinates associated with srcAddr to determine\n * the nearest GAP.\n */\n\n if (_cookieCoords != null) { // client cookie contains coordinates\n coords = _cookieCoords;\n }\n else {\n coords = getCoordinates(srcAddr);\n\n if (coords == null) {\n return null;\n }\n }\n\n /*\n * Calculate which GAP is nearest.\n */\n int i, dist, min = Integer.MAX_VALUE;\n CoordinateImpl srcCoords = new CoordinateImpl((int)coords.lat,\n (int)coords.longi);\n\n for (i = 0; i < _gapList.size(); i++) {\n GlobeAccessPointRecord gaprec = _gapList.get(i);\n dist = gaprec.coords.computeDistance(srcCoords);\n\n if (dist < min) {\n nearestGAPrec = gaprec;\n min = dist;\n }\n }\n\n // Cache the result.\n synchronized(GlobeRedirector.ip2GAPCache) {\n GlobeRedirector.ip2GAPCache.put(srcAddr, nearestGAPrec);\n }\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Nearest GAP of \" + srcAddr.getHostAddress()\n + \" at (\" + (int)coords.lat + \",\" + (int)coords.longi\n + \") is \" + nearestGAPrec.hostport\n + \" at (\" + nearestGAPrec.coords.getLatitude()\n + \",\" + nearestGAPrec.coords.getLongitude() + \")\");\n }\n\n _cookieCoords = coords;\n return nearestGAPrec;\n }", "public List<DexlibAbstractInstruction> instructionsBefore(DexlibAbstractInstruction instruction) {\n int i = instructions.indexOf(instruction);\n if (i == -1) {\n throw new IllegalArgumentException(\"Instruction \" + instruction + \" not part of this body.\");\n }\n\n List<DexlibAbstractInstruction> l = new ArrayList<DexlibAbstractInstruction>();\n l.addAll(instructions.subList(0, i));\n Collections.reverse(l);\n return l;\n }", "public ILocation top()\n {\n EmptyStackException ex = new EmptyStackException();\n if (top <= 0)\n {\n throw ex;\n }\n else\n {\n return stack.get(top - 1);\n }\n }", "private T getPredecessor (BSTNode<T> current) {\n\t\twhile(current.getRight() != null) {\n\t\t\tcurrent = current.getRight();\n\t\t}\n\t\treturn current.getData();\n\n\t}", "public Point getXLower()\n {\n return (Point)xLow.clone();\n }", "public float getLimit_lin_x_lower() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 32);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 24);\n\t\t}\n\t}", "public LinkedListItr findPrevious( Object x )\n {\n ListNode itr = header;\n\n while( itr.next != null && !itr.next.element.equals( x ) )\n itr = itr.next;\n\n return new LinkedListItr( itr );\n }", "int getLineOfOffset(int offset) throws BadLocationException;", "public int getAddressOfEntryPoint()\n throws IOException, EndOfStreamException\n {\n return peFile_.readInt32(relpos(Offsets.ADDRESS_OF_ENTRY_POINT.position));\n }", "private static int minimumPosition(int[] a, int from)\n {\n int minPos = from;\n for (int i = from + 1; i < a.length; i++) \n {\n if (a[i] < a[minPos]) { minPos = i; }\n }\n return minPos;\n }", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "protected short getTLVOffset(byte[] buffer, byte tag, \n short Lc, short occurrence) {\n byte count = 0; // count of occurances\n short offset = firstTLVOffset;\n tag = (byte)(tag & 0x7F);\n while (offset < Lc) {\n if ((byte)(buffer[offset] & 0x7F) == tag) {\n count++;\n if (count != occurrence) {\n continue;\n }\n return offset;\n } else {\n // advance to next TLV\n offset++;\n short length = buffer[offset];\n offset = (short)(offset + length + 1);\n }\n }\n return offset; // not found\n }", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Loc getLoc();", "Position<T> before(Position<T> p) throws IllegalStateException;", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "protected int getStartAddress() {\r\n return (readByte(RESET_VECTOR) & 0xff) + ((readByte(RESET_VECTOR + 1) & 0xff) << 8);\r\n }", "private String before(Stack<String> stack, AtomicInteger index) {\n\t\tint next = index.get() - 1;\n\t\tif (next > 0)\n\t\t\treturn stack.get(next);\n\t\telse\n\t\t\treturn null;\n\t}", "public static <T> T findPredecessor(Node<T> t) {\n if(t == null)\n return null;\n else\n return findMax(t.left);//call to helper method to find the right most node of the left sub-tree\n }", "public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}", "public int GetPosition()\n {\n int position = -1;\n\n double CurrentDistance = GetDistance();\n\n for (int i = 0; i < Positions.length; i++)\n {\n // first get the distance from current to the test point\n double DistanceFromPosition = Math.abs(CurrentDistance\n - Positions[i]);\n\n // then see if that distance is close enough using the threshold\n if (DistanceFromPosition < PositionThreshold)\n {\n position = i;\n break;\n }\n }\n\n return position;\n }", "private long readJumpOffset() throws IOException {\n byte[] sec = new byte[4];\n ins.read(sec);\n return convertByteValueToLong(sec);\n }", "Constant getStartOffsetConstant();", "Optional<MemoryAddress> lookup(String name);", "public Double peekAhead(int in);", "static int findraslot(Memory mem, int addr) {\r\n\t\t// afbf0020 sw [sp +32] = ra\r\n\t\tfor (int n = 0; n < 8; n++) {\r\n\t\t\tint isn = mem.load_word(addr + (n * 4));\r\n\t\t\tif ((isn & 0xffff0000) == 0xafbf0000) {\r\n\t\t\t\tshort imm = (short) isn;\r\n\t\t\t\treturn imm;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);", "private IAddress getFirstAddress(final MemoryMap memoryMap) {\n for (final MemorySection memorySection : memoryMap) {\n return memorySection.getStart();\n }\n\n return new CAddress(0);\n }", "protected ValuePosition getMinimum() {\n\t\t// Calcule la position et la durée d'exécution de la requête la plus courte dans le tableau des requêtes\n\t\tValuePosition minimum = new ValuePosition();\n\t\tminimum.position = 0;\n\t\tfor(int pos=0; pos<requests.length; pos++) {\n\t\t\tRequest request = requests[pos];\n\t\t\tif(request == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minimum.value == null || request.getElapsedTime() < minimum.value) {\n\t\t\t\tminimum.position = pos;\n\t\t\t\tminimum.value = request.getElapsedTime();\n\t\t\t}\n\t\t}\n\t\treturn minimum;\n\t}", "public Criteria andAddressLessThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"address < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "private void findPrev() {\n \tthis.find(false);\n }", "private static int firstPassParse(String line, int offset)\r\n {\r\n String[] tokens = line.split(\"[\\\\s,]+\");\r\n\r\n if(tokens.length <= 0)\r\n {\r\n return offset;\r\n }\r\n \r\n if(!isOpcode(tokens[0]) && !tokens[0].startsWith(\".\"))\r\n {\r\n int address = beginningAddress + offset;\r\n \r\n if(isHex(tokens[0]))\r\n {\r\n throw new AssemblerException(\"Invalid label on line: \" + line);\r\n }\r\n else\r\n {\r\n symbolTable.put(tokens[0], address);\r\n }\r\n }\r\n\r\n return offset + ADDRESS_OFFSET;\r\n }", "public String getNearestStreet() {\n String nearestStreet = \"null\";\n CollisionResults results = new CollisionResults();\n float closestDistance = 101f;\n for(float xDir = -1; xDir <= 1; xDir += .1f) {\n for(float yDir = -1; yDir <= 1; yDir += .1f) {\n for(float zDir = -1; zDir <= 1; zDir += .1f) { \n Ray ray = new Ray(loc, new Vector3f(xDir, yDir, zDir));\n world.collideWith(ray, results);\n for (int i = 0; i < results.size(); i++) {\n float dist = results.getCollision(i).getDistance();\n String name = results.getCollision(i).getGeometry().getParent().getName();\n if (name.startsWith(\"R_\") && dist <= 100 && dist < closestDistance) {\n nearestStreet = name;\n closestDistance = dist;\n }\n }\n }\n }\n }\n\n return nearestStreet;\n \n }", "public byte get(int addr) {\n return data[addr - start];\n }", "public Point getLowerPoint() {\n return lower;\n }", "Position<T> first();" ]
[ "0.724652", "0.71825135", "0.6947881", "0.63523346", "0.6052878", "0.60273933", "0.59276795", "0.585619", "0.5837323", "0.5820251", "0.5731689", "0.56932825", "0.5662745", "0.5629273", "0.5428467", "0.52299833", "0.52155036", "0.5201907", "0.51662976", "0.51563036", "0.51361716", "0.5029308", "0.4989305", "0.49880362", "0.49425653", "0.49383664", "0.49319053", "0.48790434", "0.48775417", "0.4868326", "0.48652816", "0.48556244", "0.4855443", "0.48497283", "0.48495427", "0.48316008", "0.48222142", "0.48200715", "0.48163658", "0.48152322", "0.48080984", "0.48036242", "0.48024875", "0.4799432", "0.47985753", "0.47968417", "0.47950453", "0.4792826", "0.4787389", "0.47814122", "0.47616404", "0.4761628", "0.47585154", "0.4742781", "0.47427654", "0.47425297", "0.47394252", "0.47384524", "0.47361732", "0.47280455", "0.47267157", "0.47261846", "0.47249624", "0.4723401", "0.47189015", "0.4713817", "0.47035998", "0.46933323", "0.46807602", "0.46637553", "0.46624947", "0.46325424", "0.46304268", "0.46302533", "0.46276253", "0.46198314", "0.46112993", "0.46109027", "0.46091095", "0.45917365", "0.45884642", "0.45833406", "0.45833385", "0.45657307", "0.45606422", "0.45573133", "0.4548345", "0.45362616", "0.4530189", "0.45271668", "0.45237887", "0.452034", "0.45167562", "0.45106527", "0.45091948", "0.45065135", "0.44963157", "0.44926307", "0.44766957", "0.44704792" ]
0.58921266
7
Get an iterator over all the composite data objects (Arrays, Structures, and Union) in the program.
public DataIterator getCompositeData(boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VTID(14)\n java.util.Iterator<Com4jObject> iterator();", "@VTID(11)\r\n java.util.Iterator<Com4jObject> iterator();", "public Iterable<E> getData(){\n return new Iterable<E>(){\n @Override\n public Iterator<E> iterator() {\n return structure.iterator();\n }\n };\n }", "public abstract AbstractObjectIterator<LocalAbstractObject> getAllObjects();", "public DataIterator getCompositeData(Address start, boolean forward);", "@DISPID(-4) //= 0xfffffffc. The runtime will prefer the VTID if present\r\n @VTID(22)\r\n java.util.Iterator<Com4jObject> iterator();", "public Iterator<? extends ICodeBase> auxCodeBaseIterator();", "@DISPID(-4)\n @PropGet\n java.util.Iterator<Com4jObject> iterator();", "public final Iterator getProceduralVisualChildInitializerIterator()\n {\n if (root instanceof MovieClip)\n {\n return new FilterIterator(((MovieClip)root).getChildInitializerIterator(), new Predicate()\n {\n public boolean evaluate(Object object)\n {\n ValueInitializer init = (ValueInitializer)object;\n Object value = init.getValue();\n return !(value instanceof Model) || (!((Model)value).isDescribed() && !((Model)value).isStateSpecific());\n }\n });\n }\n else\n {\n return Collections.EMPTY_LIST.iterator();\n }\n }", "public Iterator<Object[]> getIterator()\n\t{\n\t\tinit();\n\t\t\n\t\treturn new SimpleIterator();\n\t}", "public Iterator<T> iterator(){\r\n\t\treturn new ChainedArraysIterator();\r\n\t}", "public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "public Enumeration getObjects()\n {\n if (octs == null)\n {\n return new Enumeration()\n {\n int pos = 0;\n\n public boolean hasMoreElements()\n {\n return pos < string.length;\n }\n\n public Object nextElement()\n {\n if (pos < string.length)\n {\n int length = Math.min(string.length - pos, segmentSize);\n byte[] chunk = new byte[length];\n System.arraycopy(string, pos, chunk, 0, length);\n pos += length;\n return new DEROctetString(chunk);\n }\n throw new NoSuchElementException();\n }\n };\n }\n\n return new Enumeration()\n {\n int counter = 0;\n\n public boolean hasMoreElements()\n {\n return counter < octs.length;\n }\n\n public Object nextElement()\n {\n if (counter < octs.length)\n {\n return octs[counter++];\n }\n throw new NoSuchElementException();\n }\n };\n }", "public Iterator<? extends ICodeBase> appCodeBaseIterator();", "public Iterator<T> byGenerations() {\r\n ArrayIterator<T> iter = new ArrayIterator<T>();\r\n\r\n for (int i = 0; i < SIZE; i++) {\r\n iter.add(tree[i]);\r\n }\r\n\r\n return iter;\r\n }", "Iterator<TabularData> dataIterator();", "public Iterator iterator()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n try\r\n {\r\n return new CompositeIterator(new Iterator[] { \r\n spaceMgr.makeComponentSpaceIterator(),\r\n spaceMgr.makeHistorySpaceIterator() });\r\n }\r\n catch (RuntimeException e)\r\n {\r\n e.printStackTrace();\r\n throw e;\r\n }\r\n }", "public DbIterator iterator() {\n // some code goes here\n if (gbfield == Aggregator.NO_GROUPING) {\n Type[] tp = new Type[1];\n tp[0] = Type.INT_TYPE;\n String[] fn = new String[1];\n fn[0] = aop.toString();\n TupleDesc td = new TupleDesc(tp, fn);\n Tuple t = new Tuple(td);\n t.setField(0, new IntField(gbCount.get(null)));\n ArrayList<Tuple> a = new ArrayList<>();\n a.add(t);\n return new TupleIterator(td, a);\n } else {\n Type[] tp = new Type[2];\n tp[0] = gbfieldtype;\n tp[1] = Type.INT_TYPE;\n String[] fn = new String[2];\n fn[0] = gbname;\n fn[1] = aop.toString();\n TupleDesc td = new TupleDesc(tp, fn);\n ArrayList<Tuple> a = new ArrayList<>();\n for (Field f : gbCount.keySet()) {\n Tuple t = new Tuple(td);\n t.setField(0, f);\n t.setField(1, new IntField(gbCount.get(f)));\n a.add(t);\n }\n return new TupleIterator(td, a);\n }\n }", "@Parameters\n // Método public static que devuelve un elemento iterable de array de objetos\n public static Iterable<Object[]> getData() {\n return Arrays.asList(new Object[][] {\n // Indicamos todas las pruebas {a, b, esperado}\n { 3, 1, 4 }, { 2, 3, 5 }, { 3, 3, 6 } });\n }", "Iterable<CtElement> asIterable();", "public Iterator<DystoreTuple> iterator()\t{ return tuple_data.iterator(); }", "public Iterator<IDatasetItem> iterateOverDatasetItems();", "public final Iterable getChainingIterator() {\n\t// TODO: Implemente the chaining iterator and add generic type to Iterable. I suppose it is this class.\n\tthrow new IllegalAccessError(\"Not implemented yet\");\n }", "public ReactorResult<DataObject> getAllGeneralEncapsulatedObject_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), GENERALENCAPSULATEDOBJECT, DataObject.class);\r\n\t}", "public abstract Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection);", "Iterator<Entry<String, Var>> getIterator() {\n\t\treturn iter;\n\t}", "public Iterable<M> iterateAll();", "public Iterator<WellSetPOJOBigDecimal> iterator() {\n return this.wellsets.iterator();\n }", "public Iterator<MaterialType> iterator() {\n\t\treload();\n\t\treturn new IteratorImpl(); \n\t}", "@Parameters\n public static Iterable<Object[]> getData() {\n List<Object[]> obj = new ArrayList<>();\n obj.add(new Object[] {3, 12});\n obj.add(new Object[] {2, 8});\n obj.add(new Object[] {1, 4});\n \n return obj;\n }", "public interface Program {\n\n\t/**\n\t * The name of the string class\n\t */\n\tpublic static final String STRING_CLASS = \"String\";\n\n\t/**\n\t * The name of the object class\n\t */\n\tpublic static final String OBJECT_CLASS = \"Object\";\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllCodeMembers();\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze, excluding ones from the String and Object classes.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllSubmittedCodeMembers();\n}", "public final Iterator<CodeFragmentList> getDefinitionIterator()\n {\n IteratorList iterList = new IteratorList();\n\n Model.addDefinitionIterators(iterList, getTopLevelInitializerIterator());\n\n Iterator iter = statefulEventInitializers.iterator();\n while (iter.hasNext())\n {\n iterList.add(((Initializer)iter.next()).getDefinitionsIterator());\n }\n \n iterList.add(root.getSubDefinitionsIterator());\n \n if (getVersion() >= 4)\n \titerList.add(statesModel.getSubDefinitionIterators());\n\n return iterList.toIterator();\n }", "public DbIterator iterator() {\n // some code goes here\n ArrayList<Tuple> tuples = new ArrayList<Tuple>();\n for (Field key : m_aggregateData.keySet()) {\n \tTuple nextTuple = new Tuple(m_td);\n \tint recvValue;\n \t\n \tswitch (m_op) {\n \tcase MIN: case MAX: case SUM:\n \t\trecvValue = m_aggregateData.get(key);\n \t\tbreak;\n \tcase COUNT:\n \t\trecvValue = m_count.get(key);\n \t\tbreak;\n \tcase AVG:\n \t\trecvValue = m_aggregateData.get(key) / m_count.get(key);\n \t\tbreak;\n \tdefault:\n \t\trecvValue = setInitData(); // shouldn't reach here\n \t}\n \t\n \tField recvField = new IntField(recvValue);\n \tif (m_gbfield == NO_GROUPING) {\n \t\tnextTuple.setField(0, recvField);\n \t}\n \telse {\n \t\tnextTuple.setField(0, key);\n \t\tnextTuple.setField(1, recvField);\n \t}\n \ttuples.add(nextTuple);\n }\n return new TupleIterator(m_td, tuples);\n }", "public ChainedArraysIterator(){\r\n\t\t\tcurrentNode = beginMarker.next;\r\n\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\tidx = 0;\r\n\t\t\texpectedModCount=modCount;\r\n\t\t}", "public DbIterator iterator() {\n \tTupleDesc td = generateTupleDesc();\n List<Tuple> tuples = new ArrayList<Tuple>();\n if(gbField == NO_GROUPING){\n \tTuple tuple = new Tuple(td);\n \ttuple.setField(0, new IntField(tupleCounts.get(null)));\n \ttuples.add(tuple);\n } else {\n \tfor(Object key : tupleCounts.keySet()){\n \t\tTuple tuple = new Tuple(td);\n \t\ttuple.setField(0, (Field)key);\n \t\ttuple.setField(1, new IntField(tupleCounts.get(key)));\n \t\ttuples.add(tuple);\n \t}\n }\n return new TupleIterator(td, tuples);\n }", "public DbIterator iterator() {\n // some code goes here\n //throw new UnsupportedOperationException(\"please implement me for proj2\");\n List<Tuple> tuparr = new ArrayList<Tuple>();\n Type[] typearr = new Type[]{gbfieldtype, Type.INT_TYPE};\n TupleDesc fortup = new TupleDesc(typearr, new String[]{null, null});\n Object[] keys = groups.keySet().toArray();\n for (int i = 0; i < keys.length; i++) {\n \n int key = (Integer) keys[i];\n \n Tuple tup = new Tuple(fortup);\n if (gbfieldtype == Type.STRING_TYPE) {\n tup.setField(0, hashstr.get(key));\n }\n else {\n tup.setField(0, new IntField(key));\n }\n //tup.setField(0, new IntField(key));\n tup.setField(1, new IntField(groups.get(key)));\n tuparr.add(tup); \n\n }\n List<Tuple> immutable = Collections.unmodifiableList(tuparr);\n TupleIterator tupiter = new TupleIterator(fortup, immutable);\n if (gbfield == NO_GROUPING) {\n List<Tuple> tuparr1 = new ArrayList<Tuple>();\n TupleDesc fortup1 = new TupleDesc(new Type[]{Type.INT_TYPE}, new String[]{null});\n Tuple tup1 = new Tuple(fortup1);\n tup1.setField(0, new IntField(groups.get(-1)));\n tuparr1.add(tup1);\n List<Tuple> immutable1 = Collections.unmodifiableList(tuparr1);\n TupleIterator tupiter1 = new TupleIterator(fortup1, immutable1);\n \n return (DbIterator) tupiter1;\n }\n return (DbIterator) tupiter;\n }", "public static void main( String[] args ) {\n\n\t\tString S = C + \": Main(): \";\n\t\tSystem.out.println( S + \"Starting\" );\n\n\t\tint xsize = 5;\n\t\tint ysize = 10;\n\n\t\tContainer2DImpl<String> con = new Container2DImpl<String>( xsize, ysize );\n\t\tfor ( int x = 0; x < xsize; x++ ) {\n\t\t\tfor ( int y = 0; y < ysize; y++ ) {\n\t\t\t\tcon.set( x, y, \"\" + x + \", \" + y );\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println( S + \"(1,1) = \" + con.get( 1, 1 ) );\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"getRowIterator\" );\n\n\t\tListIterator<String> it = con.getRowIterator( 2 );\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\t\t}\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"getColumnIterator\" );\n\n\t\tit = con.getColumnIterator( 2 );\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\n\t\t}\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"getAllByColumnsIterator\" );\n\n\t\tit = con.getAllByColumnsIterator();\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\n\t\t}\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"getAllByRowsIterator\" );\n\n\t\tit = con.getAllByRowsIterator();\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\n\t\t}\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"List Iterator\" );\n\n\t\tit = con.listIterator();\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\t\t}\n\n\t\tSystem.out.println( S + \"Ending\" );\n\n\t}", "public DbIterator iterator() {\n \t\tArrayList<Tuple> tuples = new ArrayList<Tuple>(); //tuples to return\n TupleDesc desc;\n String[] names;\n\t \tType[] types;\n\t \t// these will be the TupleDesc to return\n\t \tif (gbfield == Aggregator.NO_GROUPING){\n\t \t\tnames = new String[] {\"aggregateVal\"};\n\t \t\ttypes = new Type[] {Type.INT_TYPE};\n\t \t} else {\n\t \t\tnames = new String[] {\"groupVal\", \"aggregateVal\"};\n\t \t\ttypes = new Type[] {gbfieldtype, Type.INT_TYPE};\n\t \t}\n\t \tdesc = new TupleDesc(types, names);\n\t \t\n\t \tTuple toAdd;\n\t \t// iterate over the GROUP BY entries and make the tuples\n\t \tIterator<Map.Entry<Field, Integer>> it = gbcount.entrySet().iterator();\n\t \tMap.Entry<Field, Integer> nextfield;\n\t \tint aggregateVal = 0;\n\t \twhile(it.hasNext()) {\n\t \t\tnextfield = it.next();\n\t \t\taggregateVal = nextfield.getValue();\n\t \t\ttoAdd = new Tuple(desc);\n\t \t\tif(gbfield == Aggregator.NO_GROUPING) {\n\t \t\t\ttoAdd.setField(0, new IntField(aggregateVal));\n\t \t\t} else {\n\t \t\t\ttoAdd.setField(0, nextfield.getKey());\n\t \t\t\ttoAdd.setField(1, new IntField(aggregateVal));\n\t \t\t}\n\t \t\ttuples.add(toAdd);\n\t \t}\n\t \treturn new TupleIterator(desc, tuples);\n }", "@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }", "java.util.List<com.sanqing.sca.message.ProtocolDecode.DataObject> \n getDataObjectList();", "public native IterableIterator<Tuple<K, V>> entries();", "public Iterator<Item> iterator(){\n return new ArrayIterator();\n }", "public Iterator<I> getReservables(){\n IterI iter = new IterI();\n return iter;\n }", "@Override\n public OctreeIterator iterator()\n {\n Stack<CelestialBody> stack = new Stack<>();\n stack = this.root.iterate(stack);\n\n OctreeIterator iterator = new OctreeIterator(stack);\n return iterator;\n }", "public Iterator<Entry<Integer, HashMap<String, Double>>> iterator() {\r\n\t\treturn structure.entrySet().iterator();\r\n\t}", "public Iterable<IAtom> atoms() {\n return new Iterable<IAtom>() {\n \tpublic Iterator<IAtom> iterator() {\n \t\treturn new AtomsIterator();\n \t}\n };\n }", "public abstract Iterator<C17883a<E>> mo45843b();", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public <T> Iterator<T> asIterator(){\n return new NextIterator<T>() {\n @Override\n public T getNext() {\n try{\n return readObject();\n }catch(Exception eof){\n if(eof instanceof EOFException){\n finished = true ;\n }\n return null;\n }\n }\n\n @Override\n protected void close() {\n DeserializationStream.this.close();\n }\n };\n }", "public Iterator iterator() {\n\n return new EnumerationIterator(elements.keys());\n }", "public ListIterator<T> getAllByColumnsIterator() {\n\t\tAllByColumnsIterator it = new AllByColumnsIterator();\n\t\treturn it;\n\t}", "public Iterator<Type> iterator();", "@Override\n public AbstractObjectIterator<LocalAbstractObject> provideObjects() {\n return getAllObjects();\n }", "Iterator features();", "public Iterator<T> iterator() {\r\n return byGenerations();\r\n }", "public Iterator<String> listComplementClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listComplementClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\r\n\t}", "public Iterator<Entry> iterator() {\n return new ArrayIterator<Entry>(fEntries);\n }", "public static Iterator getVersionables(Object o) {\r\n checkVersionable(o);\r\n Collection c = new ArrayList();\r\n Field[] fields = o.getClass().getFields();\r\n for (int i = 0; i < fields.length; i++) {\r\n Field field = fields[i];\r\n if (field.getName().equals(Instrumentor.VERSIONFIELD) ||\r\n field.getType().isPrimitive())\r\n continue;\r\n Object fieldObject;\r\n try {\r\n fieldObject = field.get(o);\r\n } catch (Exception e) {\r\n continue;\r\n }\r\n if (isVersionable(fieldObject)) {\r\n c.add(fieldObject);\r\n }\r\n }\r\n return c.iterator();\r\n }", "public static final Iterator iter (Object ... objects) {\r\n return new ObjectIterator(objects);\r\n }", "private static void iterator() {\n\t\t\r\n\t}", "public Iterator<Shape> iterator(){\n\t\treturn shapes.iterator();\n\t}", "@Override\n\tpublic Iterator<Card> iterator() \n\t{\n\t\treturn card.iterator();\n\t}", "public static void main(String[] args) {\n\t\tConstructor<?>[] constructors = WV_CNN_DataIterator.class.getConstructors();\n\t\tfor(Constructor<?> constructor : constructors){\n\t\t\tClass<?>[] parameterTypes = constructor.getParameterTypes();\n\t\t\tfor(Class<?> pa : parameterTypes){\n\t\t\t\tSystem.out.println(pa.getName());\n\t\t\t}\n\t\t}\n\t}", "@Override // java.util.Collection, java.lang.Iterable\n public final Iterator<C0472aH> iterator() {\n return new C0220Kr(this.A00);\n }", "public Iiterator getIterator() { \n\t\treturn new GameCollectionIterator();\n\t}", "public zzeiu iterator() {\n return new zzeio(this);\n }", "public native IterableIterator<V> values();", "public DbIterator iterator() {\n\t\tif(gbfield==-1)\n\t\t\treturn new AggregateIterator(false);\n\t\treturn new AggregateIterator(true);\n\t}", "public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }", "public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}", "public Iterator getIterator() {\n\t\t\n\t\treturn blocks.iterator();\n\t\t\n\t}", "public UnmodifiableIterator<Entry<K, V>> iterator() {\n return mo8403b().iterator();\n }", "public final FxNodeCursor iterateChildren() {\n FxNode n = currentNode();\n if (n == null) throw new IllegalStateException(\"No current node\");\n if (n.isArray()) { // false since we have already returned START_ARRAY\n return new FxArrayCursor((FxArrayNode) n, this);\n }\n if (n.isObject()) {\n return new FxObjectCursor((FxObjNode) n, this);\n }\n throw new IllegalStateException(\"Current node of type \"+n.getClass().getName());\n }", "@Override\r\n public Iterator<KVPair<K, V>> iterator() {\n return new ChainedIterator<>(this.chains, load);\r\n }", "protected abstract Object[] getComponents();", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "public Iterator<IPessoa> getAtores();", "@Override\n public Iterator<Object> iterator() {\n return new Iterator<Object>() {\n\n private int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < data.length;\n }\n\n @Override\n public Object next() {\n Object result = data[i];\n i = i + 1;\n return result;\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException(\"Tuples are immutable\");\n }\n };\n }", "@Override public java.util.Iterator<Function> iterator() {return new JavaIterator(begin(), end()); }", "public Iterator<T> getIterator();", "@Override\n public IntVec3SubspaceIterator iterator() {\n return new IntVec3SubspaceIterator(this);\n }", "public Iterator<Multiset.Entry<E>> entryIterator() {\n return new EnumMultiset<E>.Itr<Multiset.Entry<E>>() {\n /* access modifiers changed from: package-private */\n public Multiset.Entry<E> output(final int i) {\n return new Multisets.AbstractEntry<E>() {\n public E getElement() {\n return EnumMultiset.this.enumConstants[i];\n }\n\n public int getCount() {\n return EnumMultiset.this.counts[i];\n }\n };\n }\n };\n }", "public interface DataSourceIterator extends Iterator<Data> {\n\n}", "public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "public synchronized Iterator<ProjectFilePart> iterator() {\r\n // make a memory sensitive iterator\r\n Iterator diskIterator = new Iterator() {\r\n\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n // the buffere part\r\n ProjectFilePart pfp = null;\r\n\r\n private void lazyLoad() {\r\n if (fr == null) {\r\n try {\r\n // save the data\r\n saveData();\r\n // make the readers\r\n fr = new FileReader(getToggleFile());\r\n br = new BufferedReader(fr);\r\n } catch (FileNotFoundException ex) {\r\n throw new RuntimeException(\"Can't make iterator\", ex);\r\n }\r\n }\r\n }\r\n\r\n private ProjectFilePart useBuffer() {\r\n lazyLoad();\r\n // no part is buffered, buffer one\r\n if (pfp == null) {\r\n try {\r\n // read the next line\r\n String line = br.readLine();\r\n // null check\r\n if (line == null) {\r\n return null;\r\n }\r\n pfp = convertToProjectFilePart(line);\r\n } catch (IOException ex) {\r\n throw new RuntimeException(\"Can't read next\", ex);\r\n }\r\n }\r\n // return the part\r\n return pfp;\r\n }\r\n\r\n public Object next() {\r\n ProjectFilePart p = useBuffer();\r\n // reset the buffer\r\n pfp = null;\r\n // return the part\r\n return p;\r\n }\r\n\r\n public void remove() {\r\n throw new RuntimeException(\"Remove isn't implemented.\");\r\n }\r\n\r\n public boolean hasNext() {\r\n boolean hasNext = useBuffer() != null;\r\n // auto-teardown at the end\r\n if (!hasNext) {\r\n IOUtil.safeClose(br);\r\n IOUtil.safeClose(fr);\r\n }\r\n return hasNext;\r\n }\r\n };\r\n // return the iterator\r\n return diskIterator;\r\n }", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllGeneralEncapsulatedObject_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), GENERALENCAPSULATEDOBJECT);\r\n\t}", "public Iterable<Object> getObjects(String key);", "public static Iterator iterator(Object o) {\r\n checkSmartContainer(o);\r\n SmartContainer sc = (SmartContainer) o;\r\n return new SmartIterator(sc.getIterator(), VersionableFilters.ALL);\r\n }", "public Interface_EntityIterator() {\n this(OCCwrapJavaJNI.new_Interface_EntityIterator__SWIG_0(), true);\n }", "public Collection getAllAuxClasss();", "public Iterable<HashNode> iterator() {\n\t\treturn bucket;\n\t\t//for(HashTable<Character, Integer>.HashNode x : HT.iterator()) {\n\t}", "public IndexRecord getIterator() {\n return (iter == -1 ? null : data[iter]);\n}", "@Override\n\t\t\tpublic Iterator<T> iterator() {\n\t\t\t\treturn convertData(data.iterator(), targetClass);\n\t\t\t}", "@Override\n public Iterator<Long> iterator() {\n Collection<Long> c = new ArrayList<>();\n synchronized (data) {\n for (int i=0; i<data.length; i++)\n c.add(get(i));\n }\n return c.iterator();\n }", "public Iterator getTypes() {\r\n\t\treturn types == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(types.values());\r\n\t}" ]
[ "0.600518", "0.6000809", "0.5975886", "0.5835278", "0.5827689", "0.57799876", "0.5777036", "0.57039994", "0.5693484", "0.5684818", "0.56756926", "0.5585017", "0.55263096", "0.55006284", "0.5497073", "0.5409722", "0.5389848", "0.5375458", "0.5343668", "0.53259426", "0.5308337", "0.53047484", "0.5267439", "0.526635", "0.5264633", "0.5261448", "0.5259055", "0.52059376", "0.5205734", "0.51979804", "0.51844984", "0.517504", "0.5172411", "0.51688755", "0.5168759", "0.51598555", "0.51549304", "0.5107238", "0.50814617", "0.5081181", "0.508006", "0.50727785", "0.5055284", "0.5054277", "0.50315917", "0.5027462", "0.5020952", "0.50167483", "0.5013424", "0.5013424", "0.5013424", "0.5013424", "0.49903047", "0.4973961", "0.49726322", "0.4966992", "0.4959951", "0.49588862", "0.49572107", "0.4957021", "0.4950393", "0.4944674", "0.4930516", "0.49256074", "0.49251956", "0.49240482", "0.49234492", "0.49205467", "0.49093434", "0.4908781", "0.48934245", "0.48862067", "0.48860052", "0.48704818", "0.4870474", "0.48657528", "0.48648012", "0.4855575", "0.4853208", "0.48496154", "0.48492068", "0.48477024", "0.48454207", "0.48449817", "0.48437485", "0.48368654", "0.4831906", "0.48130557", "0.48124513", "0.48122463", "0.4812043", "0.48109537", "0.48048913", "0.48036095", "0.48019207", "0.47978574", "0.47967362", "0.47949216", "0.4790241", "0.4785602" ]
0.5939176
3
Get an iterator over all the composite data objects (Arrays, Structures, and Union) in the program at or after the given Address.
public DataIterator getCompositeData(Address start, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);", "public Data getDataContaining(Address addr);", "public DataIterator getDefinedData(Address addr, boolean forward);", "public DataIterator getData(Address addr, boolean forward);", "public Data getDefinedDataContaining(Address addr);", "public Data getDataAt(Address addr);", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "@VTID(14)\n java.util.Iterator<Com4jObject> iterator();", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "@VTID(11)\r\n java.util.Iterator<Com4jObject> iterator();", "@DISPID(-4) //= 0xfffffffc. The runtime will prefer the VTID if present\r\n @VTID(22)\r\n java.util.Iterator<Com4jObject> iterator();", "@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}", "public Data getDefinedDataAfter(Address addr);", "public AddressComponent[] getAddressComponents() {\n return addressComponents;\n }", "public Data getDataAfter(Address addr);", "public List<Address> findAll();", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "public Data getDefinedDataAt(Address addr);", "public static <E extends com.matisse.reflect.MtObject> com.matisse.MtObjectIterator<E> ownInstanceIterator(com.matisse.MtDatabase db, int numObjPerBuffer) {\n return getClass(db).<E>ownInstanceIterator(numObjPerBuffer, EmpleadoPlantilla.class);\n }", "public static <E extends com.matisse.reflect.MtObject> com.matisse.MtObjectIterator<E> instanceIterator(com.matisse.MtDatabase db, int numObjPerBuffer) {\n return getClass(db).<E>instanceIterator(numObjPerBuffer, EmpleadoPlantilla.class);\n }", "@DISPID(-4)\n @PropGet\n java.util.Iterator<Com4jObject> iterator();", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);", "public Addressbook[] getAddressbooks() throws RemoteException;", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "@Override\r\n\tpublic List<Address> findAll() {\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\tList<Address> arrayList = new ArrayList<>();\r\n\t\t\r\n\t\tResultSet array = DAOJDBCModel.multiCallReturn(\"SELECT * FROM address;\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(array.next()) {\r\n\t\t\t\tarrayList.add(new Address(array.getInt(\"id\"), array.getString(\"street\"), array.getString(\"district\"),\r\n\t\t\t\t\t\tarray.getInt(\"number\"), array.getString(\"note\"))); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn arrayList;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "private static EntityIterator getEntityIterator(Schematic schematic, Location location) {\n var iterator = new EntityIterator();\n\n var world = location.getWorld();\n var offset = new Vector3i(location.getBlockX(), location.getBlockY(), location.getBlockZ());\n offset.sub(schematic.getOrigin());\n\n var min = schematic.getMinimumPoint().add(offset, new Vector3i());\n var max = schematic.getMaximumPoint().add(offset, new Vector3i());\n\n for (var entity : world.getEntities()) {\n var eLoc = entity.getLocation();\n if (isInBounds(eLoc, min, max))\n iterator.addEntity(entity);\n }\n\n return iterator;\n }", "private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}", "public Iterable<E> getData(){\n return new Iterable<E>(){\n @Override\n public Iterator<E> iterator() {\n return structure.iterator();\n }\n };\n }", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressDescription getControlPersonsArray(int i);", "public Iterator<Record> getRecords() throws Exception {\n\n\n //Parse dbf\n DbfInputStream dbfInputStream = new DbfInputStream(new FileInputStream(dbf));\n columns = dbfInputStream.getColumnNames();\n Iterator<ArrayList<Object>> attributes = dbfInputStream.getRecords();\n\n\n //Parse shp\n Iterator<Geometry> geometries = new ShapeIterator(new FileInputStream(shp));\n\n\n //Return iterator\n return new Iterator<Record>(){\n private int id = 1;\n public Record next(){\n if (!hasNext()) throw new NoSuchElementException();\n\n Geometry geom = geometries.next();\n ArrayList<Object> attr = attributes.next();\n Field[] fields = new Field[attr.size()+2];\n for (int i=0; i<attr.size(); i++){\n Value value = new Value(attr.get(i));\n String name = columns[i];\n Field field = new Field(name, value);\n fields[i+1] = field;\n }\n fields[0] = new Field(\"id*\", id);\n fields[fields.length-1] = new Field(\"geom*\", geom);\n\n\n if (geom!=null){\n if (id-1!=(Integer) geom.getUserData()){\n //Reparse dbf?\n throw new RuntimeException(\"Shp/Dbf Record Mismatch\");\n }\n }\n id++;\n return new Record(fields);\n }\n public boolean hasNext(){\n return geometries.hasNext();\n }\n };\n }", "public Iterator<Coord> iterator() {\n\t\treturn new CoordListIterator(array, index);\n\t}", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "public InstructionIterator getInstructions(Address addr, boolean forward);", "public List<Address> listAddress()\n {\n @SuppressWarnings(\"unchecked\")\n List<Address> result = this.sessionFactory.getCurrentSession().createQuery(\"from AddressImpl as address order by address.id asc\").list();\n\n return result;\n }", "public Iterator<? extends ICodeBase> auxCodeBaseIterator();", "public static List<Address> GetAllRecordsFromTable() {\n\n return SQLite.select().from(Address.class).queryList();\n\n\n }", "public abstract Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection);", "public abstract AbstractObjectIterator<LocalAbstractObject> getAllObjects();", "public void viewAllContacts(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name of whose contact list you want to see\");\n\t\tString addressBookName = obj.next();\n\t\tList<PersonInfo> ContactList = addressBook.getContactList(addressBookName);\n\t\tif (ContactList.isEmpty()) {\n\t\t\tlog.info(\"List is empty\");\n\t\t} else {\n\t\t\tlog.info(\"Contacts in address book \" + addressBookName + \"are :\");\n\t\t\tContactList.stream().forEach((System.out::println));\n\t\t\tlog.info(\"\\n\");\n\t\t}\n\t}", "Iterator<CtElement> descendantIterator();", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public List<UnusualContractInfo> queryUnusualContractList(int chainId, int groupId,\n String contractAddress, Integer pageNumber, Integer pageSize) throws BaseException {\n log.debug(\"start queryUnusualContractList groupId:{} userName:{} pageNumber:{} pageSize:{}\",\n groupId, contractAddress, pageNumber, pageSize);\n\n String tableName = TableName.PARSER.getTableName(chainId, groupId);\n Integer start =\n Optional.ofNullable(pageNumber).map(page -> (page - 1) * pageSize).orElse(null);\n\n List<String> nameList =\n Arrays.asList(\"tableName\", \"groupId\", \"contractAddress\", \"start\", \"pageSize\");\n List<Object> valueList =\n Arrays.asList(tableName, groupId, contractAddress, start, pageSize);\n Map<String, Object> param = CommonTools.buidMap(nameList, valueList);\n\n List<UnusualContractInfo> listOfUnusualContract = parserMapper.listOfUnusualContract(param);\n return listOfUnusualContract;\n }", "public <T> Iterator<T> asIterator(){\n return new NextIterator<T>() {\n @Override\n public T getNext() {\n try{\n return readObject();\n }catch(Exception eof){\n if(eof instanceof EOFException){\n finished = true ;\n }\n return null;\n }\n }\n\n @Override\n protected void close() {\n DeserializationStream.this.close();\n }\n };\n }", "public DataIterator getCompositeData(boolean forward);", "public final Iterator<Entry<FieldDescriptorType, Object>> descendingIterator() {\n if (this.zzaxp) {\n return new zzrq(this.zzaxo.zzrc().iterator());\n }\n return this.zzaxo.zzrc().iterator();\n }", "public List<Address> getAllAddresses() throws BackendException;", "final Iterator<Cluster> iterator(@NotNull final ByteBuffer from) {\n return Iterators.transform(storage.tailMap(from)\n .entrySet().iterator(),\n e -> {\n assert e != null;\n return new Cluster(e.getKey(), e.getValue(), generation);\n });\n }", "private static RegionIterator getChunkIterator(Schematic schematic, Location location) {\n var offset = new Vector3i(location.getBlockX(), location.getBlockY(), location.getBlockZ());\n offset.sub(schematic.getOrigin());\n\n var min = schematic.getMinimumPoint().add(offset, new Vector3i());\n var max = schematic.getMaximumPoint().add(offset, new Vector3i());\n\n blockCoordsToChunkCoords(min);\n blockCoordsToChunkCoords(max);\n\n var mask = new Vector3i(1, 0, 1);\n min.mul(mask);\n max.mul(mask);\n\n return new RegionIterator(min, max);\n }", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "abstract public Iterator<BlockReportReplica> iterator();", "public Collection<Address> getAddressCollection(){\r\n\t\treturn addressCollection;\r\n\t}", "public Iterator<OpenERPRecord> iterator() {\r\n\t\treturn records.iterator();\r\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 Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }", "private List<Address> collectLocationAddresses(APDataCollection apData) {\n\t\tint numLocations = apData.getCount(ICommlAutoConstants.LOCATION_XPATH);\n\t\tList<Address> addresses = new ArrayList<Address>(numLocations);\n\n\t\t// Loop through the Location aggregates in the ap data\n\t\tfor (int locationIndex = 0; locationIndex < numLocations; locationIndex++) {\n\n\t\t\t// Create an Address object for each one (containing just the\n\t\t\t// address information.\n\t\t\tAddress address = new Address(apData, ICommlAutoConstants.LOCATION_XPATH, new int[] { locationIndex });\n\t\t\tString id = apData.getFieldValue(ICommlAutoConstants.LOCATION_ID_XPATH, locationIndex, \"\");\n\n\t\t\t// add an id to any location missing one. We need id's on the\n\t\t\t// location so we can link\n\t\t\t// the vehicles back to them.\n\t\t\tif (isEmpty(id)) {\n\t\t\t\tid = apData.generateUID();\n\t\t\t\tapData.setFieldValue(ICommlAutoConstants.LOCATION_ID_XPATH, locationIndex, id);\n\t\t\t}\n\t\t\taddress.setID(id);\n\t\t\taddresses.add(address);\n\t\t}\n\t\treturn addresses;\n\t}", "public Iterator iterator()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n try\r\n {\r\n return new CompositeIterator(new Iterator[] { \r\n spaceMgr.makeComponentSpaceIterator(),\r\n spaceMgr.makeHistorySpaceIterator() });\r\n }\r\n catch (RuntimeException e)\r\n {\r\n e.printStackTrace();\r\n throw e;\r\n }\r\n }", "public Iterator<? extends ICodeBase> appCodeBaseIterator();", "Iterator<TabularData> dataIterator();", "java.util.List<kr.pik.message.Profile.ProfileMessage.ContactAddress> \n getContactAddressList();", "public Iterator<DystoreTuple> iterator()\t{ return tuple_data.iterator(); }", "public Iterator<T> getPageElements();", "public Data getDataBefore(Address addr);", "public Iterator<T> iterator(){\r\n\t\treturn new ChainedArraysIterator();\r\n\t}", "public HDAddressDescription findAddress(Address addr) {\n HDAddressDescription retval = null;\n for (HDAccount acct : mAccounts) {\n retval = acct.findAddress(addr);\n if (retval != null)\n return retval;\n }\n return retval;\n }", "public Data getDefinedDataBefore(Address addr);", "public Enumeration getObjects()\n {\n if (octs == null)\n {\n return new Enumeration()\n {\n int pos = 0;\n\n public boolean hasMoreElements()\n {\n return pos < string.length;\n }\n\n public Object nextElement()\n {\n if (pos < string.length)\n {\n int length = Math.min(string.length - pos, segmentSize);\n byte[] chunk = new byte[length];\n System.arraycopy(string, pos, chunk, 0, length);\n pos += length;\n return new DEROctetString(chunk);\n }\n throw new NoSuchElementException();\n }\n };\n }\n\n return new Enumeration()\n {\n int counter = 0;\n\n public boolean hasMoreElements()\n {\n return counter < octs.length;\n }\n\n public Object nextElement()\n {\n if (counter < octs.length)\n {\n return octs[counter++];\n }\n throw new NoSuchElementException();\n }\n };\n }", "public List returnAllAddressList(AddressCommonSC criteria) throws DAOException\r\n {\r\n if(criteria.getNbRec() == -1)\r\n {\r\n return getSqlMap().queryForList(\"addressMapper.addressList\", criteria);\r\n }\r\n else\r\n {\r\n DAOHelper.fixGridMaps(criteria, getSqlMap(), \"addressMapper.cifAddressDetailMap\");\r\n return getSqlMap().queryForList(\"addressMapper.allAddressList\", criteria, criteria.getRecToskip(),\r\n criteria.getNbRec());\r\n }\r\n }", "public final FxNodeCursor iterateChildren() {\n FxNode n = currentNode();\n if (n == null) throw new IllegalStateException(\"No current node\");\n if (n.isArray()) { // false since we have already returned START_ARRAY\n return new FxArrayCursor((FxArrayNode) n, this);\n }\n if (n.isObject()) {\n return new FxObjectCursor((FxObjNode) n, this);\n }\n throw new IllegalStateException(\"Current node of type \"+n.getClass().getName());\n }", "public static void main(String[] args) {\n Citizen[] citizens = new Citizen[10];\n citizens[0] = new Citizen(\"Stella\", \"Chima\", new Address(1, \"Street 1\", 122, \"Abuja\"));\n citizens[1] = new Citizen(\"Dominic\", \"Uzoanya\", new Address(2, \"Street 2\", 2323, \"Abuja\"));\n citizens[2] = new Citizen(\"Rita\", \"Chima\", new Address(3, \"Street 3\", 212, \"Abuja\"));\n citizens[3] = new Citizen(\"Obinka\", \"Ogechi\", new Address(4, \"Street 4\", 1331, \"Abuja\"));\n citizens[4] = new Citizen(\"Somto\", \"Zikora\", new Address(5, \"Street 5\", 565, \"Abuja\"));\n citizens[5] = new Citizen(\"Moses\", \"Abunike\", new Address(6, \"Street 6\", 56443, \"Abuja\"));\n citizens[6] = new Citizen(\"Suleiman\", \"Sani\", new Address(7, \"Street 7\", 4545, \"Abuja\"));\n citizens[7] = new Citizen(\"Onyekachi\", \"Okereke\", new Address(8, \"Street 8\", 1212, \"Abuja\"));\n citizens[8] = new Citizen(\"Amarachi\", \"Obinka\", new Address(9, \"Street 9\", 878, \"Abuja\"));\n citizens[9] = new Citizen(\"MaryJane\", \"Uzoanya\", new Address(10, \"Street 10\", 6767, \"Abuja\"));\n\n // for loop through the array to print the citizens' data\n for (int i = 0; i < citizens.length; i++) {\n citizens[i].display();\n }\n\n // The code block below is commonly referred to as an enhanced for loop. It basically is doing the same thing with the one above. It's kind of advanced though.\n // You can comment out the first one and uncomment this one to see that there's no difference.\n// for (Citizen citizen: citizens) {\n// citizen.display();\n// }\n\n }", "@Override\n\tpublic Iterator<? extends SKContact> iterator(long first, long count) {\n\n\t\tList<SKContact> data = new ArrayList<SKContact>(contacts);\n\t\tCollections.sort(data, new Comparator<SKContact>() {\n\t\t\tpublic int compare(SKContact c1, SKContact c2) {\n\t\t\t\treturn c1.getFirstName().compareTo(c2.getFirstName());\n\t\t\t}\n\n\t\t});\n\n\t\treturn data.subList((int) first, (int) data.size()).iterator();\n\t}", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address, boolean withSum) {\n return getAddressData(address.toString(), withSum);\n }", "public abstract byte[] readData(int address, int length);", "Iterator<Customer> findAllCustomers()\n throws XmlDocumentReadException, CorruptStorageException;", "@Override\n public List<UTXO> getOpenTransactionOutputs(List<Address> addresses) throws UTXOProviderException {\n\n List<UTXO> results = new LinkedList<UTXO>();\n for (Address a : addresses) {\n ByteBuffer bb = ByteBuffer.allocate(21);\n bb.put((byte) KeyType.ADDRESS_HASHINDEX.ordinal());\n bb.put(a.getHash160());\n\n ReadOptions ro = new ReadOptions();\n Snapshot sn = db.getSnapshot();\n ro.snapshot(sn);\n\n // Scanning over iterator very fast\n\n DBIterator iterator = db.iterator(ro);\n for (iterator.seek(bb.array()); iterator.hasNext(); iterator.next()) {\n ByteBuffer bbKey = ByteBuffer.wrap(iterator.peekNext().getKey());\n bbKey.get(); // remove the address_hashindex byte.\n byte[] addressKey = new byte[20];\n bbKey.get(addressKey);\n if (!Arrays.equals(addressKey, a.getHash160())) {\n break;\n }\n byte[] hashBytes = new byte[32];\n bbKey.get(hashBytes);\n int index = bbKey.getInt();\n Sha256Hash hash = Sha256Hash.wrap(hashBytes);\n UTXO txout;\n try {\n // TODO this should be on the SNAPSHOT too......\n // this is really a BUG.\n txout = getTransactionOutput(hash, index);\n } catch (BlockStoreException e) {\n throw new UTXOProviderException(\"block store execption\", e);\n }\n if (txout != null) {\n Script sc = txout.getScript();\n Address address = sc.getToAddress(params, true);\n UTXO output = new UTXO(txout.getHash(), txout.getIndex(), txout.getValue(), txout.getHeight(),\n txout.isCoinbase(), txout.getScript(), address.toString());\n results.add(output);\n }\n }\n try {\n iterator.close();\n ro = null;\n sn.close();\n sn = null;\n } catch (IOException e) {\n log.error(\"Error closing snapshot/iterator?\", e);\n }\n }\n return results;\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressWithDeliverability getAddressHistoryArray(int i);", "public Iterator<IPessoa> getAtores();", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "public void listing() {\r\n int count = 1;\r\n for (AdressEntry i : addressEntryList) {\r\n System.out.print(count + \": \");\r\n System.out.println(i);\r\n count++;\r\n }\r\n System.out.println();\r\n }", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "public static <E extends com.matisse.reflect.MtObject> com.matisse.MtObjectIterator<E> ownInstanceIterator(com.matisse.MtDatabase db) {\n return getClass(db).<E>ownInstanceIterator(EmpleadoPlantilla.class);\n }", "java.util.List<com.sanqing.sca.message.ProtocolDecode.DataObject> \n getDataObjectList();", "public ChainedArraysIterator(){\r\n\t\t\tcurrentNode = beginMarker.next;\r\n\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\tidx = 0;\r\n\t\t\texpectedModCount=modCount;\r\n\t\t}", "public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }", "java.util.List<? extends kr.pik.message.Profile.ProfileMessage.ContactAddressOrBuilder> \n getContactAddressOrBuilderList();", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }", "Iterable<CtElement> asIterable();", "public java.util.List<? extends kr.pik.message.Profile.ProfileMessage.ContactAddressOrBuilder> \n getContactAddressOrBuilderList() {\n if (contactAddressBuilder_ != null) {\n return contactAddressBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(contactAddress_);\n }\n }", "public LinkedList<Address> getInputAddressList() {\n assert(invariant());\n return inputAddressList;\n }", "public java.util.List<DataEntry> findAll(int start, int end);", "public AddressDatabase() {\n\t\ttimes=new Vector ();\n\t\tcids=new Vector ();\n\t\taddresses=new Hashtable();\n\t\ttseqnums=new Hashtable();\n\t}", "public CommentHistory[] getCommentHistory(Address addr, int commentType);", "public void iterateProgramList(final String programName);", "public Iterator<Type> iterator();", "public Iterator<Entry<Integer, HashMap<String, Double>>> iterator() {\r\n\t\treturn structure.entrySet().iterator();\r\n\t}", "public List getAddressList() {\r\n System.out.println(\"List Elements :\" + addressList);\r\n return addressList;\r\n }", "@Override\r\n\tpublic ArrayList<BooksClass> readItem(String address) {\n\t\treturn null;\r\n\t}", "public Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\t\treturn CascadingAction.getAllElementsIterator(session, collectionType, collection);\n\t\t}" ]
[ "0.57392675", "0.54105425", "0.5388338", "0.52731556", "0.5232096", "0.50778097", "0.500599", "0.48615202", "0.48614463", "0.48572317", "0.48445547", "0.47898403", "0.47842234", "0.47612074", "0.47483206", "0.47270355", "0.47205335", "0.46911013", "0.46907723", "0.46874624", "0.4684205", "0.46761027", "0.46619442", "0.46602038", "0.4641731", "0.4639849", "0.4616079", "0.45972547", "0.45937195", "0.4560685", "0.45465252", "0.4521187", "0.44894296", "0.44847116", "0.44776407", "0.4475183", "0.4454922", "0.44501758", "0.44286188", "0.44283366", "0.4406944", "0.4399152", "0.43972796", "0.4391933", "0.4385494", "0.4384928", "0.43811834", "0.43631718", "0.4359725", "0.43501213", "0.43437472", "0.43313667", "0.43243727", "0.43182018", "0.43113318", "0.43031365", "0.42908826", "0.42883208", "0.4285801", "0.42850497", "0.42848352", "0.42774427", "0.42773014", "0.42767274", "0.42758632", "0.42728126", "0.4270025", "0.42643842", "0.42638668", "0.42259458", "0.4221585", "0.420613", "0.4197121", "0.4196214", "0.4186148", "0.41779453", "0.4173172", "0.41690576", "0.41672087", "0.41523978", "0.41454214", "0.41433898", "0.41362", "0.41274792", "0.4124847", "0.41216356", "0.41191065", "0.41182223", "0.41176128", "0.4112898", "0.41112188", "0.4105602", "0.41021496", "0.40987206", "0.40955523", "0.40868598", "0.40841606", "0.40840828", "0.40824804", "0.40814763" ]
0.5829769
0
Get an iterator over all the composite data objects (Arrays, Structures, and Union) within the specified address set in the program.
public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataIterator getCompositeData(Address start, boolean forward);", "public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "public abstract AbstractObjectIterator<LocalAbstractObject> getAllObjects();", "public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "public abstract Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection);", "public DataIterator getDefinedData(Address addr, boolean forward);", "public Iterable<E> getData(){\n return new Iterable<E>(){\n @Override\n public Iterator<E> iterator() {\n return structure.iterator();\n }\n };\n }", "public Iterator<? extends ICodeBase> appCodeBaseIterator();", "public Addressbook[] getAddressbooks() throws RemoteException;", "@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}", "public Iterator<? extends ICodeBase> auxCodeBaseIterator();", "public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);", "@VTID(14)\n java.util.Iterator<Com4jObject> iterator();", "public Iterator<T> iterator(){\r\n\t\treturn new ChainedArraysIterator();\r\n\t}", "@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }", "@VTID(11)\r\n java.util.Iterator<Com4jObject> iterator();", "Iterable<CtElement> asIterable();", "public AddressComponent[] getAddressComponents() {\n return addressComponents;\n }", "public CodeUnitIterator getCodeUnits(Address addr, boolean forward);", "@Override\r\n\tpublic List<Address> findAll() {\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\tList<Address> arrayList = new ArrayList<>();\r\n\t\t\r\n\t\tResultSet array = DAOJDBCModel.multiCallReturn(\"SELECT * FROM address;\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(array.next()) {\r\n\t\t\t\tarrayList.add(new Address(array.getInt(\"id\"), array.getString(\"street\"), array.getString(\"district\"),\r\n\t\t\t\t\t\tarray.getInt(\"number\"), array.getString(\"note\"))); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn arrayList;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public Collection<Address> getAddressCollection(){\r\n\t\treturn addressCollection;\r\n\t}", "public DataIterator getCompositeData(boolean forward);", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressDescription getControlPersonsArray(int i);", "public Iterator<Record> getRecords() throws Exception {\n\n\n //Parse dbf\n DbfInputStream dbfInputStream = new DbfInputStream(new FileInputStream(dbf));\n columns = dbfInputStream.getColumnNames();\n Iterator<ArrayList<Object>> attributes = dbfInputStream.getRecords();\n\n\n //Parse shp\n Iterator<Geometry> geometries = new ShapeIterator(new FileInputStream(shp));\n\n\n //Return iterator\n return new Iterator<Record>(){\n private int id = 1;\n public Record next(){\n if (!hasNext()) throw new NoSuchElementException();\n\n Geometry geom = geometries.next();\n ArrayList<Object> attr = attributes.next();\n Field[] fields = new Field[attr.size()+2];\n for (int i=0; i<attr.size(); i++){\n Value value = new Value(attr.get(i));\n String name = columns[i];\n Field field = new Field(name, value);\n fields[i+1] = field;\n }\n fields[0] = new Field(\"id*\", id);\n fields[fields.length-1] = new Field(\"geom*\", geom);\n\n\n if (geom!=null){\n if (id-1!=(Integer) geom.getUserData()){\n //Reparse dbf?\n throw new RuntimeException(\"Shp/Dbf Record Mismatch\");\n }\n }\n id++;\n return new Record(fields);\n }\n public boolean hasNext(){\n return geometries.hasNext();\n }\n };\n }", "@DISPID(-4) //= 0xfffffffc. The runtime will prefer the VTID if present\r\n @VTID(22)\r\n java.util.Iterator<Com4jObject> iterator();", "@DISPID(-4)\n @PropGet\n java.util.Iterator<Com4jObject> iterator();", "private static Iterator getAllElementsIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\treturn collectionType.getElementsIterator(collection, session);\n\t}", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public Data getDataContaining(Address addr);", "public CodeUnitIterator getCommentCodeUnitIterator(int commentType, AddressSetView addrSet);", "public Data getDefinedDataContaining(Address addr);", "public Iterator<T> byGenerations() {\r\n ArrayIterator<T> iter = new ArrayIterator<T>();\r\n\r\n for (int i = 0; i < SIZE; i++) {\r\n iter.add(tree[i]);\r\n }\r\n\r\n return iter;\r\n }", "Iterator<TabularData> dataIterator();", "E[] getAll();", "private static EntityIterator getEntityIterator(Schematic schematic, Location location) {\n var iterator = new EntityIterator();\n\n var world = location.getWorld();\n var offset = new Vector3i(location.getBlockX(), location.getBlockY(), location.getBlockZ());\n offset.sub(schematic.getOrigin());\n\n var min = schematic.getMinimumPoint().add(offset, new Vector3i());\n var max = schematic.getMaximumPoint().add(offset, new Vector3i());\n\n for (var entity : world.getEntities()) {\n var eLoc = entity.getLocation();\n if (isInBounds(eLoc, min, max))\n iterator.addEntity(entity);\n }\n\n return iterator;\n }", "Iterator<Customer> findAllCustomers()\n throws XmlDocumentReadException, CorruptStorageException;", "public List<Address> findAll();", "Iterator<CtElement> descendantIterator();", "public Iterator<IDatasetItem> iterateOverDatasetItems();", "public AddressSetView getAddressSet() {\n\t\treturn new AddressSet(baseAddress, getEndAddress());\n\t}", "public Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\t\treturn CascadingAction.getAllElementsIterator(session, collectionType, collection);\n\t\t}", "public Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\t\treturn CascadingAction.getAllElementsIterator(session, collectionType, collection);\n\t\t}", "public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);", "public Iterator<I> getReservables(){\n IterI iter = new IterI();\n return iter;\n }", "public native IterableIterator<Tuple<K, V>> entries();", "public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);", "public DataIterator getData(Address addr, boolean forward);", "private Iterable getEntrySetFrom(final Object objeto) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {\n\t\tfinal Method entrySetMethod = objeto.getClass().getMethod(\"entrySet\");\n\n\t\tentrySetMethod.setAccessible(true);\n\t\treturn (Iterable)entrySetMethod.invoke(objeto);\n\t}", "@Override\n public AbstractObjectIterator<LocalAbstractObject> provideObjects() {\n return getAllObjects();\n }", "public Collection<T> readAll();", "public Enumeration getObjects()\n {\n if (octs == null)\n {\n return new Enumeration()\n {\n int pos = 0;\n\n public boolean hasMoreElements()\n {\n return pos < string.length;\n }\n\n public Object nextElement()\n {\n if (pos < string.length)\n {\n int length = Math.min(string.length - pos, segmentSize);\n byte[] chunk = new byte[length];\n System.arraycopy(string, pos, chunk, 0, length);\n pos += length;\n return new DEROctetString(chunk);\n }\n throw new NoSuchElementException();\n }\n };\n }\n\n return new Enumeration()\n {\n int counter = 0;\n\n public boolean hasMoreElements()\n {\n return counter < octs.length;\n }\n\n public Object nextElement()\n {\n if (counter < octs.length)\n {\n return octs[counter++];\n }\n throw new NoSuchElementException();\n }\n };\n }", "public Iterable<Object> getObjects(String key);", "private static RegionIterator getChunkIterator(Schematic schematic, Location location) {\n var offset = new Vector3i(location.getBlockX(), location.getBlockY(), location.getBlockZ());\n offset.sub(schematic.getOrigin());\n\n var min = schematic.getMinimumPoint().add(offset, new Vector3i());\n var max = schematic.getMaximumPoint().add(offset, new Vector3i());\n\n blockCoordsToChunkCoords(min);\n blockCoordsToChunkCoords(max);\n\n var mask = new Vector3i(1, 0, 1);\n min.mul(mask);\n max.mul(mask);\n\n return new RegionIterator(min, max);\n }", "public Iterator<DystoreTuple> iterator()\t{ return tuple_data.iterator(); }", "public static <E extends com.matisse.reflect.MtObject> com.matisse.MtObjectIterator<E> instanceIterator(com.matisse.MtDatabase db, int numObjPerBuffer) {\n return getClass(db).<E>instanceIterator(numObjPerBuffer, EmpleadoPlantilla.class);\n }", "java.util.List<com.sanqing.sca.message.ProtocolDecode.DataObject> \n getDataObjectList();", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "@Override\r\n\tpublic Iterator<GIS_layer> iterator() {\n\t\treturn set.iterator();\r\n\t}", "public java.util.List<DataEntry> findAll(int start, int end);", "public ReactorResult<DataObject> getAllGeneralEncapsulatedObject_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), GENERALENCAPSULATEDOBJECT, DataObject.class);\r\n\t}", "public List<Contract> findAll(int startIndex, int fetchSize) {\n\t\treturn null;\r\n\t}", "public Iterator<T> getPageElements();", "public java.util.List<CsclAppointeeMaster> findAll(int start, int end);", "public Iterable<M> iterateAll();", "public List<Address> getAllAddresses() throws BackendException;", "public Iterator<WellSetPOJOBigDecimal> iterator() {\n return this.wellsets.iterator();\n }", "public Iterable<IAtom> atoms() {\n return new Iterable<IAtom>() {\n \tpublic Iterator<IAtom> iterator() {\n \t\treturn new AtomsIterator();\n \t}\n };\n }", "public Iterator<OpenERPRecord> iterator() {\r\n\t\treturn records.iterator();\r\n\t}", "ObjectDeclaration objects( Predicate<? super ObjectAssembly> specification );", "public ListIterator<T> getAllByColumnsIterator() {\n\t\tAllByColumnsIterator it = new AllByColumnsIterator();\n\t\treturn it;\n\t}", "@Override\n public Iterator<Set<E>> iterator() {\n return new DisjointSetIterator(theSet);\n }", "protected abstract void getAllUniformLocations();", "public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}", "public Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\t\treturn CascadingAction.getLoadedElementsIterator(session, collectionType, collection);\n\t\t}", "public ChainedArraysIterator(){\r\n\t\t\tcurrentNode = beginMarker.next;\r\n\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\tidx = 0;\r\n\t\t\texpectedModCount=modCount;\r\n\t\t}", "abstract public Iterator<BlockReportReplica> iterator();", "public static <E extends com.matisse.reflect.MtObject> com.matisse.MtObjectIterator<E> ownInstanceIterator(com.matisse.MtDatabase db, int numObjPerBuffer) {\n return getClass(db).<E>ownInstanceIterator(numObjPerBuffer, EmpleadoPlantilla.class);\n }", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "public Iterable<MapElement> elements() {\n return new MapIterator() {\n\n @Override\n public MapElement next() {\n return findNext(true);\n }\n \n };\n }", "public Iterator iterator()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n try\r\n {\r\n return new CompositeIterator(new Iterator[] { \r\n spaceMgr.makeComponentSpaceIterator(),\r\n spaceMgr.makeHistorySpaceIterator() });\r\n }\r\n catch (RuntimeException e)\r\n {\r\n e.printStackTrace();\r\n throw e;\r\n }\r\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressDescription[] getControlPersonsArray();", "public Iterator<VirtualMachine> iterator() {\n return mapped_vms.iterator();\n }", "@Parameters\n // Método public static que devuelve un elemento iterable de array de objetos\n public static Iterable<Object[]> getData() {\n return Arrays.asList(new Object[][] {\n // Indicamos todas las pruebas {a, b, esperado}\n { 3, 1, 4 }, { 2, 3, 5 }, { 3, 3, 6 } });\n }", "public final Set<MindObject> getComponents(){\n Set<MindObject> components = new HashSet<>();\n\n components.add(this);\n\n for (MindObject subComponent: getDirectSubComponents()){\n components.add(subComponent);\n components.addAll(subComponent.getDirectSubComponents());\n }\n\n return components;\n }", "public Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\t\treturn getLoadedElementsIterator(session, collectionType, collection);\n\t\t}", "public Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\t\treturn getLoadedElementsIterator(session, collectionType, collection);\n\t\t}", "public Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\t\treturn getLoadedElementsIterator(session, collectionType, collection);\n\t\t}", "public Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\t\treturn getLoadedElementsIterator(session, collectionType, collection);\n\t\t}", "public Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\t\treturn getLoadedElementsIterator(session, collectionType, collection);\n\t\t}", "public Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\t\treturn getLoadedElementsIterator(session, collectionType, collection);\n\t\t}", "public Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\t\treturn getLoadedElementsIterator(session, collectionType, collection);\n\t\t}", "@Nonnull\n @jakarta.annotation.Nonnull\n CloseableIterator<Obj> scanAllObjects(\n @Nonnull @jakarta.annotation.Nonnull Set<ObjType> returnedObjTypes);", "public Iterator getBindings() {\r\n\t\treturn bindings == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(bindings.values());\r\n\t}", "public synchronized <T extends EnvironmentalObject> Iterable<T> getEnvironmentalObjects(int x, int y, Class<T> type) {\n\t\treturn new FilteringIterable<>(type, this.grid.getObjects(x, y));\n\t}", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllPartOfSet_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), PARTOFSET);\r\n\t}", "public static void main( String[] args ) {\n\n\t\tString S = C + \": Main(): \";\n\t\tSystem.out.println( S + \"Starting\" );\n\n\t\tint xsize = 5;\n\t\tint ysize = 10;\n\n\t\tContainer2DImpl<String> con = new Container2DImpl<String>( xsize, ysize );\n\t\tfor ( int x = 0; x < xsize; x++ ) {\n\t\t\tfor ( int y = 0; y < ysize; y++ ) {\n\t\t\t\tcon.set( x, y, \"\" + x + \", \" + y );\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println( S + \"(1,1) = \" + con.get( 1, 1 ) );\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"getRowIterator\" );\n\n\t\tListIterator<String> it = con.getRowIterator( 2 );\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\t\t}\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"getColumnIterator\" );\n\n\t\tit = con.getColumnIterator( 2 );\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\n\t\t}\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"getAllByColumnsIterator\" );\n\n\t\tit = con.getAllByColumnsIterator();\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\n\t\t}\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"getAllByRowsIterator\" );\n\n\t\tit = con.getAllByRowsIterator();\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\n\t\t}\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"List Iterator\" );\n\n\t\tit = con.listIterator();\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\t\t}\n\n\t\tSystem.out.println( S + \"Ending\" );\n\n\t}", "<T> void lookupAll(Class<T> type, Collection<T> out);", "public Iterator<Geometry> getGeometries() throws Exception {\n return new ShapeIterator(new FileInputStream(shp));\n }" ]
[ "0.5802472", "0.5593387", "0.5419973", "0.5380113", "0.52812123", "0.50798756", "0.5057958", "0.5049242", "0.5024557", "0.5023874", "0.50214726", "0.50120354", "0.49961352", "0.4981962", "0.4941216", "0.49261838", "0.4917974", "0.4899826", "0.4861332", "0.48412582", "0.48167437", "0.48090556", "0.4791906", "0.47803208", "0.4772334", "0.4769674", "0.47688454", "0.4765744", "0.4762673", "0.4759623", "0.47582638", "0.470667", "0.4692521", "0.46892032", "0.4669259", "0.46648413", "0.46647102", "0.4662317", "0.46528906", "0.4639011", "0.46357277", "0.46221656", "0.46160653", "0.46160653", "0.46111792", "0.46045542", "0.4603972", "0.46006897", "0.4590985", "0.45902607", "0.45755762", "0.4567519", "0.4561017", "0.45575324", "0.45550707", "0.45328513", "0.45304698", "0.45295855", "0.45264748", "0.45115417", "0.45100394", "0.4489308", "0.44795045", "0.44650483", "0.44635403", "0.44631416", "0.44610217", "0.446087", "0.44585413", "0.44506517", "0.44492537", "0.44439223", "0.44291124", "0.44245574", "0.44176832", "0.44108033", "0.44024646", "0.4397569", "0.43964368", "0.43882543", "0.4387624", "0.43868756", "0.43855107", "0.43830737", "0.43687126", "0.43682772", "0.43673897", "0.43673897", "0.43673897", "0.43673897", "0.43673897", "0.43673897", "0.43673897", "0.43571267", "0.43522397", "0.43303642", "0.43285578", "0.4328484", "0.4327472", "0.43245298" ]
0.67392397
0
Returns an iterator over all user defined property names.
public Iterator<String> getUserDefinedProperties();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Iterator<String> getProperties() {\n List<String> list = Collections.emptyList();\n return list.iterator();\n }", "public Iterable<String> getPropertyKeys();", "public synchronized Enumeration<String> getPropertyNames() {\n return PropertyArray.enumerate(props);\n }", "java.util.Enumeration getPropertyNames();", "public Enumeration getPropertyNames() {\r\n return properties.keys();\r\n }", "public String[] getPropertyNames();", "public ArrayList<String> getPropNames()\n {\n return this.prop_names;\n }", "@Override\n public String[] getPropertyNames() {\n final String[] names = new String[this.properties.size()];\n this.properties.keySet().toArray(names);\n return names;\n }", "public String[] getPropertyNames()\n\t{\n\t\treturn _propertyNames;\n\t}", "public Enumeration getPropertyNames()\n {\n Hashtable props = getProperties();\n return (props != null) ? props.keys() : new Vector().elements();\n }", "public Set<String> stringPropertyNames() {\n return userConfig.stringPropertyNames();\n }", "public Enumeration enumeratePropertyNames() {\n return this.attributes.keys();\n }", "@Override\n\t\tpublic Iterable<String> getPropertyKeys() {\n\t\t\treturn null;\n\t\t}", "public Enumeration getPropertyNames()\n {\n final EnumerationUnion eu = new EnumerationUnion();\n if( properties != null )\n {\n eu.add( properties.keys() );\n }\n if( ancestors != null )\n {\n final int size = ancestors.size();\n for( int i = 0; i < size; i++ )\n {\n final ScriptingClass clazz = (ScriptingClass)\n ancestors.elementAt( i );\n eu.add( clazz.getPropertyNames() );\n }\n }\n try\n {\n final ScriptingClass object = getClassLoader().load( \"object\" );\n eu.add( object.getPropertyNames() );\n }\n catch( ScriptingClassNotFoundException e )\n {\n }\n return eu;\n }", "public interface PropertyNamesIteratorOperations\n{\n\t/* constants */\n\t/* operations */\n\tvoid reset();\n\tboolean next_one(org.omg.CORBA.StringHolder property_name);\n\tboolean next_n(int how_many, org.omg.CosPropertyService.PropertyNamesHolder property_names);\n\tvoid destroy();\n}", "String[] getPropertyKeys();", "public List <String> getPropertyNames()\n{\n // Get list from PropertyNamesMap - load if not found\n List <String> list = _propertyNamesMap.get(getClass());\n if(list==null) {\n _propertyNamesMap.put(getClass(), list = new ArrayList()); addPropNames(); }\n return list;\n}", "public Iterator<Character> getDefinedChars() {\n\t\tSortedSet<Character> dest = new TreeSet<Character>();\n\t\tSet<Key<?>> keys = properties.keys(ObservableProperties.DEFAULT);\n\t\tfor (Key<?> key : keys) {\n\t\t\tObject t = properties.get(key);\n\t\t\tif (t instanceof WritingShape && key.toString().length() == 1) {\n\t\t\t\tdest.add(key.toString().charAt(0));\n\t\t\t}\n\t\t}\n\t\treturn dest.iterator();\n\t}", "public Set<String> getStringPropertyNames();", "public final Iterator<PropertyDeclaration> getDeclarationIterator()\n {\n final Type superType = getSuperClass();\n\n return new FilterIterator(declarations.values().iterator(), new Predicate()\n {\n public boolean evaluate(Object object)\n {\n return superType.getProperty(((PropertyDeclaration)object).getName()) == null;\n }\n });\n }", "public Iterator<String> listProperties(String ontClass)\r\n\t{\r\n\t\tOntClass ontR = obtainOntClass(ontClass);\r\n\t\treturn new ToStringIterator<String>(ontR.listDeclaredProperties());\r\n\t}", "public String[] getPropertyNames()\n {\n return ClassAnalyzer.getPropertyNames(m_Source.getClass());\n }", "public final List<String> getPropertiesList()\n {\n\n List<String> allProps = new ArrayList<String>();\n Enumeration<?> e = this.fProp.propertyNames();\n\n while (e.hasMoreElements())\n {\n String key = (String) e.nextElement();\n String value = this.fProp.getProperty(key);\n allProps.add(key + \"=\" + value);\n } // end while\n\n Collections.sort(allProps);\n return allProps;\n\n }", "public Set getPropertyNames(){\n return this.vendorSpecificProperties;\n }", "public Iterator<String> listPropertyRange(String property)\r\n\t{\r\n\t\tOntProperty prop = obtainOntProperty(property);\r\n\t\treturn new ToStringIterator<String>(prop.listRange());\r\n\t}", "public List<NamedThing> getProperties() {\n // TODO this should be changed to AnyProperty type but it as impact everywhere\n List<NamedThing> properties = new ArrayList<>();\n List<Field> propertyFields = getAnyPropertyFields();\n for (Field f : propertyFields) {\n try {\n if (NamedThing.class.isAssignableFrom(f.getType())) {\n f.setAccessible(true);\n Object fValue = f.get(this);\n if (fValue != null) {\n NamedThing se = (NamedThing) fValue;\n properties.add(se);\n } // else not initalized but this is already handled in the initProperties that must be called\n // before the getProperties\n }\n } catch (IllegalAccessException e) {\n throw new TalendRuntimeException(CommonErrorCodes.UNEXPECTED_EXCEPTION, e);\n }\n }\n return properties;\n }", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\t@Transactional(propagation = Propagation.SUPPORTS)\n\tpublic List<Property> findPropertyNames() \n\t{\n\t\tList<Property> details = entityManager.createNamedQuery(\"Property.readPropertyNames\").getResultList();\n\t\tlogger.info(\"Property Details are:\" + details);\n\t\treturn details;\n\t}", "public List<NameValueProperty> getNameValueProperty() {\n\t\treturn nameValuePropertyList;\n\t}", "public static List<String> getAllPropNames(Provider propCat) {\n return PersistenceCfgProperties.getKeys(propCat);\n }", "public Hashtable getUserProperties() {\n PropertyHelper ph = PropertyHelper.getPropertyHelper(this);\n return ph.getUserProperties();\n }", "public Collection<ModuleProperty> getProperties();", "Property[] getProperties();", "public String[] getKeys(){\n int paddingCount = 1;\n List<String> result = new ArrayList<String>();\n String lastKey = null;\n for (Property x : this.getProperties()) {\n String newKey = new String(x.getKey());\n if (lastKey != null && lastKey.equalsIgnoreCase(newKey)){\n newKey = newKey + \"_\" + paddingCount++;\n }\n result.add(newKey);\n lastKey = newKey;\n }\n return result.toArray(new String[]{});\n }", "Iterable<String> getRegisteredNames();", "protected Iterator innerPropertyIterator(String[] propertyKeys) {\n HashMap<String, Property> properties = (HashMap<String, Property>) this.properties.clone();\n\n if (propertyKeys.length > 0)\n return properties.entrySet().stream()\n .filter(entry -> ElementHelper.keyExists(entry.getKey(), propertyKeys))\n .map(Map.Entry::getValue)\n .iterator();\n\n return properties.values().iterator();\n }", "ArrayList<PropertyMetadata> getProperties();", "public Set<String> getKeys() {\n\t\t\treturn properties.keySet();\n\t\t}", "public List<Property> properties(String name)\n\t{\n\t\treturn filter(p -> p.getName().equals(name) && p instanceof Property)\n\t\t\t\t.stream()\n\t\t\t\t\t.map(e -> (Property) e)\n\t\t\t\t\t.collect(Collectors.toList());\n\t}", "public Iterable<String> keys()\r\n { return keysWithPrefix(\"\"); }", "public Iterable<String> keys() { return keysWithPrefix(\"\"); }", "public Iterator<QName> iterateExternalVariables() {\n final Iterator varIterator = env.iterateExternalVariables();\n return new Iterator<QName>() {\n public boolean hasNext() {\n return varIterator.hasNext();\n }\n\n public QName next() {\n return new QName(((XPathVariable) varIterator.next()).getVariableQName());\n }\n\n public void remove() {\n throw new UnsupportedOperationException(\"remove\");\n }\n };\n }", "public Map<String, String> getAllProperties()\n {\n return _propertyEntries;\n }", "public Set<String> keySet() {\n return _properties.keySet();\n }", "public Stream<String> getNames() {\n return names.stream();\n }", "public Enumeration getKeys() {\r\n PropertiesHolder propertiesHolder = this.getMergedProperties(Locale.getDefault());\r\n return propertiesHolder.getProperties().keys();\r\n }", "List<? extends T> getDeclaredProperties();", "public final Iterator<Initializer> getPropertyInitializerIterator()\n {\n\t\treturn new IteratorChain(root.getPropertyInitializerIterator(false),\n getTopLevelInitializerIterator());\n }", "public Set<String> getDeclaredProperties() {\n \t\tfinal Set<String> ret = new HashSet<String>();\n \t\tret.addAll(complexProperties.keySet());\n \t\tret.addAll(simpleProperties.keySet());\n \t\tret.addAll(listProperties.keySet());\n \t\tret.addAll(setProperties.keySet());\n \t\tret.addAll(mapProperties.keySet());\n \t\treturn ret;\n \t}", "public Set<Property> getPropertyKeys() {\n return nodeProperties != null ? nodeProperties.keySet() : Collections.<Property>emptySet();\n }", "public Set<String> getNames() {\n\t\t//\t\tArrayList<String> names = new ArrayList<String>();\n\t\t//\t\tfor (NameSSA n : name.values())\n\t\t//\t\t\tnames.add(n.current());\n\t\treturn name.keySet();\n\t}", "public ArrayList<String> getAllUserNames() {\n return allUserNames;\n }", "public List<String> getPropertyOwners();", "String [] getPropertyNames(Long id) throws RemoteException;", "public Iterable<Properties> getPropertiesSets(String key);", "Collection<String> names();", "public Iterator<String> listInstanceProperties(String instance)\r\n\t{\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tOntResource ontI = obtainOntResource(instance);\r\n\t\tfor(StmtIterator props = ontI.listProperties(); props.hasNext();)\r\n\t\t\tlist.add(props.nextStatement().getPredicate().toString());\r\n\t\treturn list.iterator();\r\n\t}", "public List<String> getAllUserNames()\n\t{\n\t\treturn userDao.findUserNames();\n\t}", "public abstract List<PropertyType> getBuiltInProperties();", "public Iterator<String> fieldIterator() { return flds_lu.keySet().iterator(); }", "Collection<String> getUsernames();", "public List<PropertyMap<?>> getProperties(String owner);", "public abstract List<BeanPropertyDefinition> findProperties();", "StringMap getProperties();", "@Override\n\tpublic List<Property> findAll() {\n\t\treturn pr.findAll();\n\t}", "public Iterator getUserIDs()\n {\n ArrayList temp = new ArrayList();\n \n for (int i = 0; i != ids.size(); i++)\n {\n if (ids.get(i) instanceof String)\n {\n temp.add(ids.get(i));\n }\n }\n \n return temp.iterator();\n }", "private List<PropertyGenerator> getPropertyGenerators() {\n\t\tList<PropertyGenerator.GeneratorFactory> factories = new ArrayList<PropertyGenerator.GeneratorFactory>();\n\t\t// these bindings will not mangle their property names\n\t\tfactories.add(new MethodPropertyGenerator.Factory(AccessorPrefix.NONE));\n\t\tfactories.add(new MethodCallableGenerator.Factory());\n\t\t// these bindings will try to drop their prefix and use a shorter name\n\t\t// (e.g. getFoo -> foo)\n\t\tfactories.add(new MethodPropertyGenerator.Factory(AccessorPrefix.GET));\n\t\tfactories.add(new MethodPropertyGenerator.Factory(AccessorPrefix.HAS));\n\t\tfactories.add(new MethodPropertyGenerator.Factory(AccessorPrefix.IS));\n\t\t// the field binding will use its name or append Field if it was already\n\t\t// taken by get/has/is\n\t\tfactories.add(new FieldPropertyGenerator.Factory());\n\n\t\tSet<String> namesTaken = new HashSet<String>();\n\t\tnamesTaken.add(\"getName\");\n\t\tnamesTaken.add(\"getPath\");\n\t\tnamesTaken.add(\"getType\");\n\t\tnamesTaken.add(\"getParentBinding\");\n\t\tnamesTaken.add(\"getChildBindings\");\n\n\t\tList<Element> elements = this.getAccessibleElements();\n\t\tList<PropertyGenerator> generators = new ArrayList<PropertyGenerator>();\n\n\t\tfor (PropertyGenerator.GeneratorFactory f : factories) {\n\t\t\tfor (Iterator<Element> i = elements.iterator(); i.hasNext();) {\n\t\t\t\tElement enclosed = i.next();\n\t\t\t\ttry {\n\t\t\t\t\tPropertyGenerator pg = f.newGenerator(this.pathBindingClass, this.name, this.element, enclosed,\n\t\t\t\t\t\t\tnamesTaken);\n\t\t\t\t\tif (namesTaken.contains(pg.getPropertyName())) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnamesTaken.add(pg.getPropertyName());\n\t\t\t\t\t}\n\t\t\t\t\ti.remove(); // element is handled, skip any further\n\t\t\t\t\t\t\t\t// generators\n\t\t\t\t\tgenerators.add(pg);\n\t\t\t\t\tthis.sourceElements.add(enclosed);\n\t\t\t\t} catch (WrongGeneratorException e) {\n\t\t\t\t\t// try next\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn generators;\n\t}", "@Test( expected = UnsupportedOperationException.class )\n public void whenCallingPropertyNames() {\n UserParametersStub lStub = new UserParametersStub( USER_ID, PARM_TYPE );\n lStub.propertyNames();\n }", "public Iterator<String> listSpecificProperties(String ontClass)\r\n\t{\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tOntClass ontR = obtainOntClass(ontClass);\r\n\t\tfor(Iterator iter = ontR.listDeclaredProperties(); iter.hasNext();)\r\n\t\t{\r\n\t\t\tOntProperty prop = (OntProperty)iter.next();\r\n\t\t\tStmtIterator si = ONT_MODEL.listStatements(prop, RDFS.domain, ontR);\r\n\t\t\tif(si.hasNext())\r\n\t\t\t\tlist.add(prop.getURI());\r\n\t\t}\r\n\t\treturn list.iterator();\r\n\t}", "public List<IPropertyDescriptor<T>> getProperties();", "public Iterator<String> getUnparsedEntityNames() {\n return underlyingTree.getUnparsedEntityNames();\n }", "@Override\r\n\tpublic Iterator<K> iterator() {\n\t\treturn keys.iterator();\r\n\t}", "public final Iterator<String> parameterNames() {\n return m_parameters.keySet().iterator();\n }", "public List<String> propertyColumns() {\n return this.propertyColumns;\n }", "public String[] getPropertyNames(final String inPrefix) {\n final String[] propertyNames = getPropertyNames();\n\n final String prefix = inPrefix.toLowerCase();\n\n final List<String> names = new ArrayList<>();\n for (final String propertyName : propertyNames) {\n if (propertyName.startsWith(prefix)) {\n names.add(propertyName);\n }\n }\n\n if (names.isEmpty()) {\n return null;\n }\n\n // Copy the strings from the List over to a String array.\n final String[] prefixNames = new String[names.size()];\n names.toArray(prefixNames);\n return prefixNames;\n }", "static public Vector getPropertyValues (Properties props, String propName)\n{\n String propertyDelimiterName = \"property.token.delimiter\";\n String delimiter = props.getProperty (propertyDelimiterName, \"::\");\n\n String listStartTokenName = \"list.startToken\";\n String listStartToken = props.getProperty (listStartTokenName, \"(\");\n\n String listEndTokenName = \"list.endToken\";\n String listEndToken = props.getProperty (listEndTokenName, \")\");\n\n Vector result = new Vector ();\n String propString = props.getProperty (propName);\n if (propString == null)\n return result;\n String propStringTrimmed = propString.trim ();\n String [] tokens = Misc.parseList (propStringTrimmed, listStartToken, listEndToken, delimiter);\n\n for (int i=0; i < tokens.length; i++)\n result.add (tokens [i]);\n\n return result;\n\n}", "public Map<String, String> getProperties() {\n\t\tif (propertiesReader == null) {\n\t\t\tpropertiesReader = new PropertyFileReader();\n\t\t}\n\t\tpropertyMap = propertiesReader.getPropertyMap();\n\t\tlog.info(\"fetched all properties\");\n\t\treturn propertyMap;\n\t}", "public List<TLProperty> getElements();", "@SuppressWarnings(\"serial\")\n\tpublic ArrayList<String> getUsers() throws Exception{\n\t\treturn new ArrayList<String>(){{\n\t\t\tUserRegistry ur = UserRegistry.findOrCreate(doc);\n\t\t\tUsers users = Users.findOrCreate(ur);\n\t\t\tfor(User u:User.list(users))\n\t\t\t\tadd(u.getAttribute(\"name\"));\n\t\t}};\n\t}", "public List<String> listUsers() \n\t{\n\t\treturn this.userList.keys();\n\t\t\n\t}", "List<? extends T> getPropertiesLike(String name);", "public String[] listObjectNames();", "Set<String> getNames();", "public String[] getUsedPropertyKeys() {\n\t\treturn new String[] { IDevice.OFFSET, IDevice.FACTOR, IDevice.REDUCTION };\n\t}", "@Override\n public java.lang.Object getNames() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.NAMES_);\n return (java.lang.Object)retnValue;\n }", "public Set<String> attributeKeys()\r\n\t{\r\n\t\treturn this.attributes.stringPropertyNames();\r\n\t}", "public Set<String> getFieldNames() {\n Set<String> names = new HashSet<String>();\n for (IdentifierProperties field : fields) {\n names.add(field.getName());\n }\n\n return names;\n }", "public Iterator getUnparsedEntityNames() {\n return Collections.EMPTY_LIST.iterator();\n }", "public ImmutableList<String> getMemberNames() {\n return members.stream().map(m -> m.getName()).collect(ImmutableList.toImmutableList());\n }", "public Iterator<String> iterator() {\n return strings.iterator();\n }", "String[] getPropertyNames(String opName) throws RemoteException;", "public Set<Property> getProperties() {\r\n\t\treturn properties;\r\n\t}", "public Iterator<String> listPropertyValue(String instance, String property)\r\n\t{\r\n\t\tOntResource ontI = obtainOntResource(instance);\r\n\t\tProperty prop = obtainOntProperty(property);\r\n\t\treturn new ToStringIterator<String>(ontI.listPropertyValues(prop));\r\n\t}", "public List<String> getNames() {\n return names;\n }", "public String [] getNames () { \n return this.listAttributes(); \n }", "java.util.List<org.apache.calcite.avatica.proto.Responses.DatabasePropertyElement> \n getPropsList();", "@Override\r\n public Iterator<User> iterator() {\r\n return user.iterator();\r\n }", "public Enumeration<String> getPersonList() {\r\n\t\treturn this.persons.keys();\r\n\t}", "public Hashtable getProperties() {\n PropertyHelper ph = PropertyHelper.getPropertyHelper(this);\n return ph.getProperties();\n }", "public static Hub<String> getNameValues(Class clazz, String propertyName) {\n\t\tOAObjectInfo oi = OAObjectInfoDelegate.getOAObjectInfo(clazz);\n\t\tOAPropertyInfo pi = oi.getPropertyInfo(propertyName);\n\t\tif (pi == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn pi.getNameValues();\n\t}", "public ArrayList<String> getUnRequestedProperties()\n\t{\n\t\tArrayList<String> urp = new ArrayList<String>();\n\t\tfor (Object property : super.keySet())\n\t\t\tif (!requestedProperties.containsKey(((String)property).trim()))\n\t\t\t\turp.add(((String)property).trim());\n\t\tCollections.sort(urp);\n\t\treturn urp;\n\t}" ]
[ "0.7432759", "0.7152358", "0.70505327", "0.67656416", "0.66813326", "0.6639679", "0.65566474", "0.65403825", "0.6525061", "0.6524292", "0.6473546", "0.62501264", "0.61934614", "0.6185606", "0.61593556", "0.6145161", "0.6124798", "0.60558885", "0.59488356", "0.59068334", "0.5882737", "0.58625406", "0.5850164", "0.5800839", "0.5790672", "0.5765846", "0.5709342", "0.5674614", "0.5663104", "0.5656218", "0.56440896", "0.5634253", "0.5630116", "0.56281114", "0.5618269", "0.56079525", "0.55868536", "0.5574581", "0.55728847", "0.55264914", "0.55078465", "0.5496975", "0.54851866", "0.5482088", "0.5474689", "0.54519147", "0.5415823", "0.54064906", "0.5406067", "0.54045916", "0.53974444", "0.53918946", "0.53787774", "0.53767276", "0.53760934", "0.53493357", "0.53452057", "0.53399986", "0.53371894", "0.5322887", "0.531357", "0.5309391", "0.53055465", "0.52897865", "0.52776384", "0.526343", "0.5255252", "0.5248716", "0.5242569", "0.5236236", "0.5221459", "0.5217177", "0.52102566", "0.5206317", "0.5200604", "0.51990145", "0.51851887", "0.51777154", "0.5171207", "0.5168806", "0.51612186", "0.5158688", "0.5157413", "0.5157069", "0.5150673", "0.5143649", "0.5142092", "0.5135589", "0.5108964", "0.51036143", "0.5101127", "0.509225", "0.5088449", "0.50871676", "0.5085833", "0.5074858", "0.5073129", "0.50646895", "0.5055022", "0.50471157" ]
0.8063256
0
Removes the entire property from the program
public void removeUserDefinedProperty(String propertyName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PropertiesTask removeAllProperties();", "PropertiesTask removeProperty( String key );", "void clearProperty(String key);", "void clearProperty(String key);", "public void removeProperty(TLProperty element);", "public void reset() {\r\n properties.clear();\r\n }", "void graphRemoveProperty( int propertyKey );", "public void resetProperties ()\n\t{\n\t\tproperties.clear();\n\t}", "Form removeProperty(String key);", "public void removeProperty(Object key) {\r\n\t\tproperties.remove(key);\r\n\t}", "private void resetProp(){\n proposition.clear();\n for (int i = 0; i<tailleCombinaison; i++) {\n proposition.add(\"-1\");\n }\n }", "public void removeRuntimeProperty(String name) {\n if (_properties != null) {\n _properties.remove(name);\n }\n }", "@Override\r\n\tpublic void clearALL() {\n\t\tjavaScriptWindow.propertyTable = null;\r\n\r\n\t}", "public Object removeProperty( String key );", "public static void viewDeleteProperty() {\n\t\tint regNum = Integer.parseInt(getResponseTo(\"Enter registrants number of property to delete: \"));\r\n\t\t// ArrayList<Property> prop_list = rc.listOfProperties(regNum);\r\n\t\tArrayList<Property> prop_list = rc.listOfProperties(regNum);\r\n\t\t// check if the size of ArrayList is 0, else delete the property with given\r\n\t\t// regNum\r\n\r\n\t\tif (prop_list.size() == 0) {\r\n\t\t\tSystem.out.println(\"No properties are associated with that registration number.\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Properties are associated with that registration number are:\\n\");\r\n\t\t\tfor (Property property : prop_list) {\r\n\t\t\t\tSystem.out.println(property);\r\n\t\t\t}\r\n\t\t\tSystem.out.printf(\r\n\t\t\t\t\t\"You are about delete %d properties; do you wish to continue?\\n\" + \"(Enter 'Y' to proceed) \",\r\n\t\t\t\t\tprop_list.size());\r\n\t\t\tString choice = getResponseTo(\"\");\r\n\t\t\tif (choice.equals(\"Y\") || choice.equals(\"y\")) {\r\n\t\t\t\trc.deleteProperties(prop_list);\r\n\t\t\t\tSystem.out.println(\"Property/ies deleted\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Properties are associated with that registration number were not deleted\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void removeProperty(String key) {\n\t\tthis.properties.remove(key);\n\t}", "public void deleteProperties(String sourceInstance, String property)\r\n\t{\r\n\t\tOntResource si = this.obtainOntResource(sourceInstance);\r\n\t\tProperty prop = this.obtainOntProperty(property);\r\n\t\tsi.removeAll(prop);\r\n\t}", "public static void removeProperty(String aKey) {\n checkArgument(!isNullOrEmpty(aKey), \"aKey cannot be null or empty\");\n \n loadPropertiesFile();\n if (props.containsKey(aKey))\n props.remove(aKey);\n storePropsFile();\n }", "public void noPropertyies() {\n\t\tproperties.clear();\r\n\t\tfor(int i = 0; i<groups.length; i++){\r\n\t\t\tgroups[i].clear();\r\n\t\t}\r\n\t}", "public void removeProperty(DAGObject dagObj, String key) {\r\n\r\n\t}", "void nodeRemoveProperty( long nodeId, int propertyKey );", "public String removeStringProperty(String propertyName);", "Property clearAndAddValue(PropertyValue<?, ?> value);", "public void clearProperty( String name )\n {\n if ( config != null )\n {\n config.clearProperty( name );\n }\n else\n {\n LOG.warn( \"clearProperty invalid config, prop name [{}]\", name );\n }\n }", "@Override\n\t\tpublic Object removeProperty(String key) {\n\t\t\treturn null;\n\t\t}", "@Override\npublic void removeAllProperties(VirtualContainer widget) {\n\t\n}", "void relRemoveProperty( long relId, int propertyKey );", "public void clearProperties(){\n\t\tcbDataType.setSelectedIndex(DT_INDEX_NONE);\n\t\tchkVisible.setValue(false);\n\t\tchkEnabled.setValue(false);\n\t\tchkLocked.setValue(false);\n\t\tchkRequired.setValue(false);\n\t\ttxtDefaultValue.setText(null);\n\t\ttxtHelpText.setText(null);\n\t\ttxtText.setText(null);\n\t\ttxtBinding.setText(null);\n\t\ttxtDescTemplate.setText(null);\n\t\ttxtCalculation.setText(null);\n\t\ttxtFormKey.setText(null);\n\t}", "Property removeValue(PropertyValue<?, ?> value);", "public void remove(String key) {\n\t\t\tproperties.remove(key);\n\t\t}", "private void removeTempProperty(final UUID uuid){\n TraversalDescription tempTraversal = this.database.traversalDescription()\n .depthFirst()\n .uniqueness(Uniqueness.RELATIONSHIP_GLOBAL);\n String uuidString = \"flw-\"+uuid.toString();\n Transaction tx = database.beginTx();\n try {\n for(Relationship r : tempTraversal.traverse(this.nSource)\n .relationships()){\n if (r.hasProperty(\"weight\"))\n r.removeProperty(uuidString);\n }\n tx.success();\n } catch (Exception e) {\n System.err.println(\"MaximumFlow.removeTempProperty: \" + e);\n tx.failure();\n } finally {\n tx.close();\n }\n }", "public void removeProperties() {\n HttpSession session = (HttpSession) _currentSession.get();\n if (session != null) {\n \n // Removing the attributes directly throws a ConcurentModificationException in Tomcat\n ArrayList attributeNames = new ArrayList();\n Enumeration enuAttributes = session.getAttributeNames();\n while (enuAttributes.hasMoreElements()) {\n String nextAttribute = (String) enuAttributes.nextElement();\n attributeNames.add(nextAttribute);\n }\n Iterator itAttributes = attributeNames.iterator();\n while (itAttributes.hasNext()) {\n String nextAttribute = (String) itAttributes.next();\n session.removeAttribute(nextAttribute);\n }\n }\n }", "void removePropertyListener(PropertyListener listener);", "void remove(InstanceProperties props) {\n props.remove();\n removeListeners.fireChange();\n }", "void invalidateProperties() {\n super.invalidateProperties();\n token_ = null;\n }", "public boolean removeProperty(String name) {\n for(Pp property : properties){\n if(property.getId().equals(name))\n return removeProperty(property);\n }\n return false;\n }", "private void endProperty()\n {\n\n }", "public Configuration clearPropertiesEntries() {\n this.properties = null;\n return this;\n }", "public void removeConfigPage()\r\n {\r\n getSemanticObject().removeProperty(swpres_configPage);\r\n }", "private void resetAllProperties() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.resetAllProperties():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.resetAllProperties():void\");\n }", "public void removeProperty(String name) {\n HttpSession session = (HttpSession) _currentSession.get();\n if (session != null) {\n session.removeAttribute(name);\n \n // Also remove it from the input parameter list.\n Map inputParameters = (Map) session.getAttribute(\"_inputs\");\n if (inputParameters != null) {\n inputParameters.remove(name);\n }\n }\n }", "public final void clearPropertyCache()\n {\n this.cache.clear();\n }", "public static void deleteAllProperties(Model model,\torg.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\tBase.deleteAllProperties(model, instanceResource);\r\n\t}", "@Override\n\tpublic void removePropertyChangeListener(PropertyChangeListener l) {\n\t\t//do nothing\n\t}", "public void removePropertyChangeListener (PropertyChangeListener l) {\n pcs.removePropertyChangeListener (l);\n }", "void unset() {\n size = min = pref = max = UNSET;\n }", "public static void clear(){\n preferences.edit().clear().apply();\n }", "void systemPropertiesCleared(String consumer);", "public void unsetPrf()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PRF$26, 0);\r\n }\r\n }", "public void removePropertyChangeListener (PropertyChangeListener l)\n { pcs.removePropertyChangeListener (l); }", "void unsetValue();", "void unsetValue();", "public Builder clearProperty() {\n\n property_ = getDefaultInstance().getProperty();\n onChanged();\n return this;\n }", "public void cleanProposition();", "public void removePropertyChangeListener(PropertyChangeListener l);", "public final void zzl() throws RemoteException {\n this.zzar.zzan.clearConditionalUserProperty(this.zzas, this.zzat, this.zzau);\n }", "private void internalRemoveProperty(DavPropertyName propertyName) throws DavException {\n if (!exists()) {\n throw new DavException(DavServletResponse.SC_NOT_FOUND);\n }\n if (JCR_MIXINNODETYPES.equals(propertyName)) {\n // remove all mixin nodetypes\n try {\n Node n = (Node)item;\n for (NodeType mixin : n.getMixinNodeTypes()) {\n n.removeMixin(mixin.getName());\n }\n } catch (RepositoryException e) {\n // NoSuchNodeTypeException, ConstraintViolationException should never occur...\n throw new JcrDavException(e);\n }\n } else {\n // all props except for mixin node types are read-only\n throw new DavException(DavServletResponse.SC_CONFLICT);\n }\n }", "void unsetValueAttachment();", "void systemPropertyRemoved(Object key, String consumer);", "private int RetrieveCleanUpProps()\r\n {\n String[] punctuationFiles = new String[] {\"punctuation.props\"};\r\n FileInputStream input;\r\n String tempStr;\r\n File ftemp;\r\n Collection c = new ArrayList<String>();\r\n\r\n // Get the list of the props file containing the words to remove (not the punctuation)\r\n DirList props = new DirList(inputDir, \"^(?!(punctuation)).*\\\\.props$\", 1);\r\n\t\tArrayList<File> wordsList = props.getListFiles();\r\n//\t\tSystem.out.println(\"props files:\"+wordsList);\r\n //TODO all properties are taken to a single arraylist. does it ok?.\r\n\t\tProperties enProps =new Properties ();\r\n\t\tString propsDir = inputDir.getPath().concat(File.separator).concat(searchdir);\r\n\t\t\r\n\t\t// Init the lists which will contain the words and chars to remove \r\n\t\tcleanUpStrings = new ArrayList<String>();\r\n\t\tcleanUpChars = new ArrayList<String>();\r\n\t\t\r\n\t try {\r\n\t \t// Retrieve words to remove\r\n for (File aWordsList : wordsList) {\r\n ftemp = aWordsList;\r\n if (ftemp.exists()) {\r\n enProps.load(input = new FileInputStream(ftemp.getAbsolutePath()));\r\n input.close();\r\n c = enProps.values();\r\n cleanUpStrings.addAll(c);\r\n enProps.clear();\r\n }\r\n }\r\n\r\n\t \t// Retrieve char to remove (punctuation for ex.)\r\n for (String punctuationFile : punctuationFiles) {\r\n tempStr = propsDir.concat(File.separator).concat(punctuationFile);\r\n ftemp = new File(tempStr);\r\n if (ftemp.exists()) {\r\n enProps.load(input = new FileInputStream(tempStr));\r\n input.close();\r\n c = enProps.values();\r\n cleanUpChars.addAll(c);\r\n enProps.clear();\r\n }\r\n }\r\n\t }\r\n\t catch (IOException e) {\r\n\t e.printStackTrace();\r\n\t return 1;\r\n\t }\r\n \treturn 0;\r\n }", "public void clearProteges(){\n ActiveAndroid.execSQL(\"delete from proteges\");\n }", "void unsetDesc();", "private static void removeUnwantedPropertyValues( Set<String> allowed, Resource S, Property P ) {\n \tboolean hasLanguagedObjects = false;\n \tList<Statement> removes = new ArrayList<Statement>();\n List<Statement> plains = new ArrayList<Statement>();\n for (StmtIterator it = S.listProperties( P ); it.hasNext();) {\n \tStatement s = it.next();\n RDFNode mo = s.getObject();\n Node o = mo.asNode();\n if (isStringLiteral(o)) {\n String lang = o.getLiteralLanguage();\n if (allowed.contains( lang )) hasLanguagedObjects = true; \n else if (lang.equals( \"\" )) plains.add( s ); \n else removes.add( s );\n }\n }\n Model m = S.getModel();\n\t\tif (hasLanguagedObjects) m.remove( plains );\n m.remove( removes ); \n }", "void unsetDescription();", "void unsetDescription();", "@Override\n public void removePropertyChangeListener(PropertyChangeListener listener) {\n\n }", "private void filter() {\n // there is only one forbidden sys prop now so no need yet for fancy\n // data structures to contain the one key/value\n\n // I have seen these 2 values:\n // com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder\n // com.sun.enterprise.ee.admin.AppServerMBeanServerBuilder\n\n final String key = \"javax.management.builder.initial\";\n final String forbiddenStart = \"com.sun.enterprise\";\n final String forbiddenEnd = \"AppServerMBeanServerBuilder\";\n\n String val = sysProps.get(key);\n\n if(val != null && val.startsWith(forbiddenStart) && val.endsWith(forbiddenEnd))\n sysProps.remove(key);\n }", "public boolean removeProperty(Pp property) {\n if(properties.remove(property)){\n //Se property existe, retira o seu parentesco\n if(property != null)\n property.setParent(null);\n\n notifyRemoved(NCLElementSets.PROPERTIES, property);\n return true;\n }\n return false;\n }", "@Override\r\n public void rmValueListener(PropertyChangeListener l) {\n\r\n }", "public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener) {\n }", "void unsetQuick();", "public static void forceReload() {\n properties = null;\n getProperties();\n }", "private void deleteNodeProperties(int nodeIndex) {\n synchronized(AlertCorrelationEngine.class) {\n for (int i = 0; i < propertiesNode[nodeIndex].size(); i++) {\n \n AlertTreeNodeLeaf leaf =\n (AlertTreeNodeLeaf) propertiesNode[nodeIndex].get(i);\n if (leaf != null) {\n propertiesMap.remove(leaf.getPath());\n }\n }\n servicesNode[nodeIndex].clear();\n propertiesNode[nodeIndex].clear();\n }\n }", "public void cleanVisualProperties(GraphicsDirector gDirector) {\n if (!this.isMaster) {\n gDirector.removeDrawable(this.wotCharacter.getDrawable(this));\n if (!getLocation().isTileMap()) {\n gDirector.removeDrawable(this.wotCharacter.getShadow());\n }\n }\n }", "abstract void deleteXMLProperty(XMLName name);", "public void generateUnset(PhpWriter out)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n\n objGen.generate(out);\n out.print(\".unsetField(\");\n out.printIntern(_name);\n out.print(\")\");\n }", "void unsetPurpose();", "void unsetObjectives();", "@Override\n @NoProxy\n @NoDump\n public int removeXproperties(final String val) {\n List<BwXproperty> xs = getXproperties(val);\n\n if (xs.size() == 0) {\n return 0;\n }\n\n for (BwXproperty x: xs) {\n removeXproperty(x);\n }\n\n return xs.size();\n }", "public void deleteOntProperty(String sourceInstance, String property, String destInstance)\r\n\t{\r\n\t\tOntResource si = this.obtainOntResource(sourceInstance);\r\n\t\tOntResource di = this.obtainOntResource(destInstance);\r\n\t\tProperty prop = this.obtainOntProperty(property);\t\r\n\t\tsi.removeProperty(prop, di);\r\n\t}", "public void unsetBase()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(BASE$18);\r\n }\r\n }", "public void removeVariableFromTable(Property remove) {\n\t\tthis.getItems().remove(remove);\n\t\tproperties.remove(remove.getName());\n\t}", "void unsetSpecimen();", "public void unsetValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(VALUE$12);\n }\n }", "void removePropertyChangeListener(PropertyChangeListener listener);", "void removePropertyChangeListener(PropertyChangeListener listener);", "public void removePropertyChangeListener(final PropertyChangeListener thePcl) {\n myPcs.removePropertyChangeListener(thePcl);\n }", "@Override\n public boolean removeProperties(final String id) {\n try {\n return deleteIfExists(sidecarFile(id).toPath());\n } catch (final IOException e) {\n throw new RepositoryRuntimeException(id, e);\n }\n }", "private void removeProfiles()\r\n\t{\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t{\r\n\t\t\tps.setValue(i + PROFILE, \"\");\r\n\t\t}\r\n\t\t\r\n\t\tcount = 0;\r\n\t\tps.setValue(PROFILE_COUNT, count);\r\n\t\t\r\n\t}", "public void clearPrefAddress() {\n\t\tsetPrefAddress( \"\" );\n\t}", "void unsetCombine();", "void unsetWagerMinimum();", "@Override\n public void removeAllValues() {\n Map<String, ?> map = preferences.getAll();\n Iterator<String> iterator = map.keySet().iterator();\n while (iterator.hasNext()) {\n removeValue(iterator.next());\n }\n }", "public static void deleteSettingsFile() {\n File settingsFile = new File(propertyFileName);\n if (settingsFile.exists())\n settingsFile.delete();\n }", "public static String clearSystemProperty(String key, String consumer) {\n String oldValue = System.clearProperty(key);\n systemPropertyQueried(key, oldValue, consumer);\n listener().systemPropertyRemoved(key, consumer);\n return oldValue;\n }", "void unsetAuto();", "public void unsetRegular()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(REGULAR$2, 0);\n }\n }", "public void removePropertyChangeListener(PropertyChangeListener listener);", "void unsetIdentifier();", "void unsetLastrun();" ]
[ "0.7388795", "0.7273034", "0.7187385", "0.7187385", "0.70656276", "0.69072974", "0.6804839", "0.66690046", "0.6557765", "0.6547605", "0.6545119", "0.6536211", "0.65226287", "0.64857507", "0.6478998", "0.64058274", "0.6390632", "0.63805497", "0.6366165", "0.63386786", "0.6327914", "0.63095737", "0.630149", "0.6294911", "0.62730014", "0.6249199", "0.6178459", "0.60588527", "0.60530317", "0.5993362", "0.59559095", "0.5951086", "0.59389377", "0.5912283", "0.5911089", "0.58953303", "0.58935535", "0.58872455", "0.5868551", "0.58505505", "0.57906455", "0.57899374", "0.57828397", "0.57510775", "0.5750547", "0.5749485", "0.57423484", "0.5738717", "0.5727299", "0.5724939", "0.57188237", "0.57188237", "0.5712566", "0.56829613", "0.5681469", "0.56770086", "0.56717134", "0.5635253", "0.56341827", "0.56337017", "0.5618473", "0.5617831", "0.5617008", "0.56168455", "0.56168455", "0.5615737", "0.56086165", "0.5589567", "0.5573025", "0.55612826", "0.55580145", "0.5534313", "0.55218583", "0.55199397", "0.55118", "0.55040884", "0.5503793", "0.55029714", "0.5502535", "0.55024487", "0.55005985", "0.5499118", "0.5496031", "0.5489067", "0.547656", "0.547656", "0.54754066", "0.54698676", "0.54527944", "0.54482245", "0.5440202", "0.54401284", "0.54367626", "0.54363936", "0.5427523", "0.5409185", "0.54052347", "0.5400569", "0.53951144", "0.53898" ]
0.65454215
10
Returns the PropertyMap associated with the given name
public PropertyMap getPropertyMap(String propertyName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConfigMapDTO getMapProperty(final String name) {\n \t\treturn mapProperties.get(name);\n \t}", "@SuppressWarnings(\"unchecked\")\n public Map getMap(String name)\n {\n Object v = getProperty(name);\n return (v == null) ? null : (Map) v;\n }", "public static String getProperty(String name) {\n return propertyMap.getProperty(name);\n }", "public Object getProperty(String name) {\n\t\treturn beanMap.get(name);\n\t}", "public String getProperty(String name)\n {\n return _propertyEntries.get(name);\n }", "public Object getProperty(String name) {\n return properties.get(name);\n }", "public PropertyObject getProperty(String name) {\n return this.properties.get(name);\n }", "@SuppressWarnings(\"unchecked\")\r\n public static <T> T getProperty(String name) {\r\n return (T) propertyMap.get(name);\r\n }", "public Property property(String name)\n\t{\n\t\tList<Element> list = filter(p -> p.getName().equals(name) && p instanceof Property);\n\t\t\n\t\tif (list != null && list.size() > 0)\n\t\t{\n\t\t\tif (list.size() > 1)\n\t\t\t\tSystem.out.println(\"Warning: Returning first of many groups with duplicate names\");\n\t\t\t\n\t\t\treturn (Property) list.get(0);\n\t\t}\n\t\telse return null;\n\t}", "java.util.Map<java.lang.String, java.lang.String>\n getPropertiesMap();", "public Object getProperty(String name)\n {\n return m_props.get(name);\n }", "public Object getProperty(String name) {\n if (properties != null) {\n return properties.get(name);\n }\n return null;\n }", "private String getProperty(\n String name\n ) {\n return properties.getProperty(\n String.format(\"%s%s\", propertiesPrefix, name)\n );\n }", "public String getProperty(String name){\r\n\t\treturn properties.getProperty(name);\r\n\t}", "public static GlobalProperty forName(String name) {\n return GlobalProperties.forName(name);\n }", "public static String getProperty(String name) {\r\n return properties.getProperty(name);\r\n }", "public <T> T getProperty(String name) {\n return properties.get(name);\n }", "public String getProperty(String name);", "@Override\n public Object getProperty(String name) {\n name = name.toLowerCase();\n return this.properties.get(name);\n }", "public static ConfigProperty find(String name) {\n for (ConfigProperty prop : ConfigProperty.values()) {\n if (prop.getName().equals(name)) {\n return prop;\n }\n }\n return null;\n }", "String getProperty(String name);", "Object getProperty(String name);", "public Prostor getProstor(String name){\r\n return mapa.get(name);\r\n }", "public List<Property> properties(String name)\n\t{\n\t\treturn filter(p -> p.getName().equals(name) && p instanceof Property)\n\t\t\t\t.stream()\n\t\t\t\t\t.map(e -> (Property) e)\n\t\t\t\t\t.collect(Collectors.toList());\n\t}", "public String getProperty( String name )\n {\n return getProperty( name, false );\n }", "public Object getProperty(String name)\n {\n return ClassAnalyzer.getProperty(m_Source,name);\n }", "public CacheMapping getCacheMapping(String name) {\n return (CacheMapping)cacheMappings.get(name);\n }", "public String getProperty(String name) {\n return this.getProperty(name, null);\n }", "public NdexPropertyValuePair getPropertyByName(String name) {\n\t\tfor ( NdexPropertyValuePair p : _properties ) {\n\t\t\tif ( p.getPredicateString().equals(name)) {\n\t\t\t\treturn p;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Object get(String aName) { return _attrMap.get(aName); }", "public String runtimeProperty(String name) {\n if (_properties == null) {\n return null;\n }\n return _properties.get(name);\n }", "public Optional<Object> getProperty(String name) {\n return Optional.ofNullable(properties.get(name));\n }", "public ComplexConfigDTO getComplexProperty(final String name) {\n \t\treturn complexProperties.get(name);\n \t}", "public String get(final String name) {\r\n return (String) properties.get(name);\r\n }", "public MetaProperty getMetaProperty(String name) throws XavaException {\n\t\treturn getMetaProperty(name, true);\n\t}", "<K extends Object, V extends Object> Map<K, V> getMap(String mapName);", "public Map<String, Object> getOverlayMap(String name) {\n Sheet sheet = sheetsByName.get(name);\n if (sheet != null) {\n return sheet.getMap();\n } else {\n return null;\n }\n }", "public ConfigListDTO getListProperty(final String name) {\n \t\treturn listProperties.get(name);\n \t}", "public Object getProperty(String name) {\n return null;\n }", "@java.lang.Override\n public java.util.Map<java.lang.String, java.lang.String> getPropertiesMap() {\n return internalGetProperties().getMap();\n }", "public String getPropertyNameMapped(String aName) { return aName; }", "@Override\n\tpublic List<Property> getProperty(String metricName) throws Exception {\n\t\tList<Property> propertyList = propertyCacheDao.getProprties(metricName);\n\t\t\n\t\treturn propertyList;\n\t}", "@java.lang.Override\n public java.util.Map<java.lang.String, java.lang.String> getPropertiesMap() {\n return internalGetProperties().getMap();\n }", "public String getProperty(String name) {\r\n if (name == null) {\r\n throw new IllegalArgumentException(Msg.get(\"Property name == null\", \"portal.illegalargumentexception.property.name.null\"));\r\n }\r\n\r\n return properties.get(name);\r\n }", "public Map getProperties();", "public IMapping getMappingAtLevel(String name) {\n\n // check for class mapping defined at this level\n if (m_classMap != null) {\n \n // check for definition at this level\n int index = m_classMap.find(name);\n if (index >= 0) {\n return (IMapping)m_mappings.get(index);\n }\n }\n return null;\n }", "public String getPropertyMapKeyName() {\n return m_propertyMapKeyName;\n }", "public static CmdProperties getCommandPropertiesFromName(String name) {\n return commandClasses.get(name);\n }", "public Object getProperty(String propertyName){\n return properties.get(propertyName);\n }", "public static Property property(String containerName, String name) {\n\t\treturn property(name(containerName), name);\n\t}", "public PropertyMap createChildPropertyMap(XMLName elementTypeName)\n throws XMLMiddlewareException\n {\n checkState();\n return super.createChildPropertyMap(elementTypeName);\n }", "public PropertyMap createAttributeMap(XMLName attributeName)\n {\n checkState();\n return super.createAttributeMap(attributeName);\n }", "protected NamedThing getLocalProperty(String name) {\n List<NamedThing> properties = getProperties();\n for (NamedThing prop : properties) {\n if (name.equals(prop.getName())) {\n return prop;\n }\n }\n return null;\n }", "private static String getJcoProperties(String name) {\n\t\tif (sapConfigProperties == null) {\n\t\t\tsapConfigProperties = new Properties();\n\t\t\ttry {\n\t\t\t\tsapConfigProperties.load(PorpertiesFile.class.getClassLoader()\t.getResourceAsStream(JCO_SAP_CONFIG));\n\t\t\t\t//return sapConfigProperties;\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tif (sapConfigProperties == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn sapConfigProperties.getProperty(name);\n\n\t}", "protected Map createPropertiesMap() {\n return new HashMap();\n }", "public Object getProperty(QName name) {\n\t\tString n = getFullName(name);\n\t\tObject o = content.getProperty(n);\n\t\tLOGGER.debug(\"-------------- GETTING {} as {} --------------\", n, o);\n\t\treturn o;\n\t}", "private MetaProperty getMetaViewProperty(String name) throws XavaException {\n\t\tif (metaViewProperties == null) \n\t\t\tthrow new ElementNotFoundException(\"view_property_not_found\", name, getName(), getModelName());\n\t\tMetaProperty p = (MetaProperty) metaViewProperties.get(name);\n\t\tif (p == null)\n\t\t\tthrow new ElementNotFoundException(\"view_property_not_found\", name, getName(), getModelName());\n\t\treturn p;\n\t}", "Map<String, Object> getPropertiesAsMap();", "public synchronized String getProperty(String name)\n throws Fault {\n if (props == null) {\n // reconstitute properties\n // this may result in a Fault, which is okay\n reload();\n }\n\n return PropertyArray.get(props, name);\n }", "@Override\n\tpublic PropertyRooms findPropertyRoomByRoomName(String roomName) {\n\t\tList<PropertyRooms> rooms=hibernateTemplate.find(\"from PropertyRooms where roomName=?\",roomName);\n\t\tif(rooms.size()>=1)\n\t\t\treturn rooms.get(0);\n\t\treturn null;\n\t}", "protected ApplicationMap getAppMap(String mapname){\n\t\treturn (ApplicationMap) appmaps.get(mapname.toUpperCase());\n\t}", "Property findProperty(String propertyName);", "@Override\n public Object getProperty(final Object bean,\n final String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {\n\n if (!collections.isEmpty()) {\n final String key = getResolver().getProperty(name);\n Pair<String, Object> collectionInfo = collections.pop();\n if (bean instanceof Map) {\n Map map = (Map) bean;\n if (!map.containsKey(key)) {\n map.put(key, newNamedInstanceForCollection(collectionInfo.getA(), collectionInfo.getB(), key));\n }\n Object value = map.get(key);\n return trackCollectionOrMap(null, value, value);\n } else { // collection\n Object value = findByNameProperty(key, (Collection)bean);\n if (value == null) {\n // create it\n value = newNamedInstanceForCollection(collectionInfo.getA(), collectionInfo.getB(), key);\n ((Collection) bean).add(value);\n }\n return trackCollectionOrMap(null, value, value);\n }\n }\n\n Object resolved = null;\n\n try {\n resolved = getNestedProperty(bean, name);\n } catch (final NoSuchMethodException e) {\n // to avoid it being swallowed by caller wrap\n throw new InvocationTargetException(e, \"Cannot access property with key: \" + name);\n }\n\n return trackCollectionOrMap(name, resolved, bean);\n }", "private static Map<String, PropertyInfo> createPropertyMap()\r\n {\r\n Map<String, PropertyInfo> map = New.map();\r\n PropertyInfo samplingTime = new PropertyInfo(\"http://www.opengis.net/def/property/OGC/0/SamplingTime\", Date.class,\r\n TimeKey.DEFAULT);\r\n PropertyInfo lat = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Latitude\", Float.class, LatitudeKey.DEFAULT);\r\n PropertyInfo lon = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Longitude\", Float.class, LongitudeKey.DEFAULT);\r\n PropertyInfo alt = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Altitude\", Float.class, AltitudeKey.DEFAULT);\r\n map.put(samplingTime.getProperty(), samplingTime);\r\n map.put(lat.getProperty(), lat);\r\n map.put(lon.getProperty(), lon);\r\n map.put(alt.getProperty(), alt);\r\n map.put(\"lat\", lat);\r\n map.put(\"lon\", lon);\r\n map.put(\"alt\", alt);\r\n return Collections.unmodifiableMap(map);\r\n }", "public Map<String, String> getPropValue() {\r\n\t\tMap<String, String> map = new HashMap<String, String>();\r\n\t\tif (prop == null) {\r\n\t\t\tprop = new Properties();\r\n\r\n\t\t\tInputStream in = this.getClass().getClassLoader().getResourceAsStream(\"project.properties\");\r\n\t\t\ttry {\r\n\t\t\t\tprop.load(in);\r\n\t\t\t\tEnumeration<?> e = prop.propertyNames();\r\n\t\t\t\twhile (e.hasMoreElements()) {\r\n\t\t\t\t\tString name = (String) e.nextElement();\r\n\t\t\t\t\tString value = prop.getProperty(name);\r\n\t\t\t\t\tmap.put(name, value);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tEnumeration<?> e = prop.propertyNames();\r\n\t\t\twhile (e.hasMoreElements()) {\r\n\t\t\t\tString name = (String) e.nextElement();\r\n\t\t\t\tString value = prop.getProperty(name);\r\n\t\t\t\tmap.put(name, value);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn map;\r\n\t}", "public List <String> getPropertyNames()\n{\n // Get list from PropertyNamesMap - load if not found\n List <String> list = _propertyNamesMap.get(getClass());\n if(list==null) {\n _propertyNamesMap.put(getClass(), list = new ArrayList()); addPropNames(); }\n return list;\n}", "public String getMapName() {\n return mapName;\n }", "public Object getProperty(String name) {\n HttpSession session = (HttpSession) _currentSession.get();\n if (session == null) {\n return null;\n }\n return session.getAttribute(name);\n }", "public List<PmPropertyBean> getProperties(Map paramter);", "Map<String, String> getProperties();", "Map<String, String> getProperties();", "public ConfigSetDTO getSetProperty(final String name) {\n \t\treturn setProperties.get(name);\n \t}", "public String getProperty(final String iName) {\n return getProperty(iName, null);\n }", "public T get(String name) {\n for (int i = maps.size() - 1; i >= 0; i--) {\n HashMap<String, T> scope = maps.get(i);\n T t = scope.get(name);\n if (t != null) return t; // Found it!\n }\n return null; // Not found\n }", "@Nullable\n @Contract(pure = true)\n public Entry byName(@NotNull String name) {\n return mappingByName.get(name);\n }", "Map<String, String> getTemplateProperties(String elementName) throws IllegalArgumentException;", "public Map instantiateBackingMap(String sName);", "public Map<String, String> getProperties() {\n\t\tif (propertiesReader == null) {\n\t\t\tpropertiesReader = new PropertyFileReader();\n\t\t}\n\t\tpropertyMap = propertiesReader.getPropertyMap();\n\t\tlog.info(\"fetched all properties\");\n\t\treturn propertyMap;\n\t}", "private static Object prop(Map<String, ?> config, BundleContext bundleContext, String name) {\n Object value = bundleContext.getProperty(name);\n if (value != null) {\n return value;\n }\n\n //Fallback to one from config\n return config.get(name);\n }", "public ConfigSimpleValueDTO getSimpleValueProperty(final String name) {\n \t\treturn simpleProperties.get(name);\n \t}", "public synchronized byte[] getPropertyBytes(String name)\n {\n return (byte[]) getProperties().get(name);\n }", "public String getMapName() {\n return mapName;\n }", "public String getMapName() {\n return mapName;\n }", "public String getMapName() {\n return mapName;\n }", "Object getProperty(String key);", "public static Prop lookup(String propName) {\n Prop prop = BY_NAME.get(propName);\n if (prop == null) {\n throw new RuntimeException(\"property \" + propName + \" not found\");\n }\n return prop;\n }", "public static Props props(String name){\n return Props.create(Cinema.class, name);\n }", "public Object getProperty(String attName);", "abstract Object getXMLProperty(XMLName name);", "public String getKeyMapName() {\r\n return keyMapName;\r\n }", "List<? extends T> getPropertiesLike(String name);", "<T> PropertyType<T> getPropertyTypeByName(String propertyTypeName);", "Map<String, String> properties();", "Map<String, String> properties();", "String getProperty(String key);", "String getProperty(String key);", "String getProperty(String key);", "public static Map<String, String> getPropertiesMap(String filename) throws IOException{\n Map<String, String> map = new LinkedHashMap();\n Properties p = new Properties();\n loadProperties(p, filename);\n Set<String> keys = p.stringPropertyNames();\n for (String k : keys) {\n map.put(k, p.getProperty(k));\n }\n return map;\n }", "public Map<String,Object> getGameByGameName(String gameName) {\n\t\tif (StringUtils.isEmpty(gameName))\n return null;\n Map hm = new HashMap();\n String sql = \"select * from t_cgiser_game where STATE = 1 and GAMENAME=?\";\n String[] para = new String[1];\n para[0] = StringUtils.trim(gameName);\n hm = userJdbcTemplate.queryForMap(sql, para);\n return hm;\n\t}", "HashMap<String,Object> getCollectionConfig(String collectionName) {\n if (!this.collections.containsKey(collectionName)) return null;\n return (HashMap<String,Object>)collections.get(collectionName);\n }" ]
[ "0.79068625", "0.77536285", "0.7235254", "0.70060056", "0.6789882", "0.67523783", "0.6554306", "0.6475097", "0.64725137", "0.642892", "0.6422447", "0.63886863", "0.6387532", "0.63612986", "0.6355204", "0.6328682", "0.6326209", "0.6309951", "0.63066185", "0.6228462", "0.6170368", "0.6114741", "0.61021274", "0.60998386", "0.6096854", "0.6085177", "0.6058561", "0.6032337", "0.60134035", "0.5973257", "0.5965531", "0.59602076", "0.5943253", "0.5928974", "0.5914864", "0.58910435", "0.585308", "0.58212626", "0.5811821", "0.5807497", "0.579379", "0.57928115", "0.5766834", "0.57646674", "0.57406116", "0.57402533", "0.57278025", "0.5699213", "0.56918555", "0.56724524", "0.56687945", "0.56618255", "0.56595623", "0.5650363", "0.5596308", "0.55892265", "0.558271", "0.5578884", "0.5570333", "0.5557339", "0.5536897", "0.5526466", "0.55129004", "0.54932016", "0.54669285", "0.54516196", "0.54451627", "0.54305935", "0.54240316", "0.54187036", "0.54187036", "0.5416717", "0.5406813", "0.5404983", "0.540465", "0.5384437", "0.5376486", "0.53662133", "0.5353855", "0.53510743", "0.53454", "0.5343659", "0.5343659", "0.5343659", "0.5317873", "0.5314563", "0.52998054", "0.52857363", "0.5283504", "0.5262906", "0.52615774", "0.5234488", "0.52279705", "0.52279705", "0.5210101", "0.5210101", "0.5210101", "0.52087724", "0.52045757", "0.5201038" ]
0.77179635
2
Creates a complete set of instructions. A preliminary pass will be made checking for code unit conflicts which will be marked within the instructionSet causing dependent blocks to get pruned.
public AddressSetView addInstructions(InstructionSet instructionSet, boolean overwrite) throws CodeUnitInsertionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addInstructions() {\n for (InstructionWrapper instructionWrapper : this.instructions) {\n if (!(instructionWrapper.instruction instanceof LabelInstruction)) {\n this.code.addInstruction(instructionWrapper.instruction);\n }\n }\n }", "public Instructions() {\n\n\t\t// String code = codeIn.trim();\n\t\t// code = code.replaceAll(\"\\\\s+\", \"\");\n\t\t// System.out.println(\"Code In:\\n\" + code);\n\t\t//\n\t\t// int len = code.length();\n\t\t// int chunkLength = 2; // the length of each chunk of code\n\t\t// int i = 0;\n\n\t\t// Create new Memory Array\n\t\tMA = new MemoryArray();\n\n\t\t// traverse entered code and split into 2 digit chunks\n\t\t// for (i = 0; i < len; i += chunkLength) {\n\t\t//\n\t\t// String chunk = code.substring(i, Math.min(len, i + chunkLength));\n\t\t// System.out.println(\"code chunk no. \" + (i / 2) + \" \" + chunk);\n\t\t//\n\t\t// opCode(chunk); // TODO - need to call this from the memory class I\n\t\t// think\n\n\t\tmem = new Memory();\n\n\t\tmemDispalyString();\n\n\t\tproc = new ProcessorLoop();\n\n\t\t// set the memory address and OpCode\n\t\t// mem.setAddress(addr);\n\t\t// // convert to decimal\n\t\t// mem.setOpCode(Integer.parseInt(chunk, 16));\n\t\t// System.out.println(\"oc = \" + (Integer.parseInt(chunk, 16)));\n\t\t//\n\t\t// // add the memory object to the memory array\n\t\t// MA.addMemoryObjects(addr, mem);\n\t\t// System.out.println(\"New memory = \" + mem.getAddress() + \" \"\n\t\t// + mem.getOpCode());\n\t\t// addr++;\n\t\t// }\n\n\t}", "public void compileMutants() {\n\tif (classOp != null && classOp.length > 0) {\n\t Debug.println(\"* Compiling class mutants into bytecode\");\n\t MutationSystem.MUTANT_PATH = MutationSystem.CLASS_MUTANT_PATH;\n\t super.compileMutants();\n\t}\n }", "public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }", "Instruction createInstruction();", "public void insertLoadsAndStores() {\n for (com.debughelper.tools.r8.ir.code.BasicBlock block : code.blocks) {\n com.debughelper.tools.r8.ir.code.InstructionListIterator it = block.listIterator();\n while (it.hasNext()) {\n com.debughelper.tools.r8.ir.code.Instruction current = it.next();\n current.insertLoadAndStores(it, this);\n }\n }\n }", "private ASMInstrumenter() {\n insertMutationProbes = SmartSHARKAdapter.getInstance().getMutationsWithLines();\n\n /*\n insertMutationProbes.put(\"de.ugoe.cs.testproject.A.<init>\", new TreeSet<Integer>(){{add(2);}});\n insertMutationProbes.put(\"de.ugoe.cs.testproject.A.method1\", new TreeSet<Integer>(){{add(25); add(29);}});\n insertMutationProbes.put(\"de.ugoe.cs.testproject.A.method2\", new TreeSet<Integer>(){{add(44);}});\n insertMutationProbes.put(\"de.ugoe.cs.testproject.A.metho5\", new TreeSet<Integer>(){{add(59);}});\n insertMutationProbes.put(\"de.ugoe.cs.testproject.B.method1\", new TreeSet<Integer>(){{add(25);}});\n */\n //System.out.println(insertMutationProbes);\n }", "public Block(){\n\t\tinstns = new ArrayList<Instruction>();\n\t}", "public Interpreter() {\n super();\n instructionsStack.push(new ArrayList<>());\n }", "void genMutants() {\n\tif (comp_unit == null) {\n\t System.err.println(original_file + \" is skipped.\");\n\t}\n\tClassDeclarationList cdecls = comp_unit.getClassDeclarations();\n\n\tif (cdecls == null || cdecls.size() == 0)\n\t return;\n\n\tif (classOp != null && classOp.length > 0) {\n\t Debug.println(\"* Generating class mutants\");\n\t MutationSystem.clearPreviousClassMutants();\n\t MutationSystem.MUTANT_PATH = MutationSystem.CLASS_MUTANT_PATH;\n\t CodeChangeLog.openLogFile();\n\t genClassMutants(cdecls);\n\t CodeChangeLog.closeLogFile();\n\t}\n }", "private void loadInstructions(byte... codes) {\r\n\t\tint instructionLocation = instructionBase;\r\n\t\tfor (int i = -128; i < 128; i++) {\r\n\t\t\tfor (byte code : codes) {\r\n\t\t\t\tcpuBuss.write(instructionLocation++, code);\r\n\t\t\t} // for codes\r\n\t\t\tcpuBuss.write(instructionLocation++, (byte) i);\r\n\t\t} // for\r\n\t\twrs.setProgramCounter(instructionBase);\r\n\t}", "public void generateByteCode(Optimizer opt) {}", "private void createPacking(Code32 code, int opCode, int cond, int Rd, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | opCode | (0xd << 23) | (Rd << 12) | (1 << 4) | Rm;\r\n\t\tcode.incInstructionNum();\r\n\t}", "protected void initializeInstructions() {\r\n // official instruction\r\n addInstruction(new CPU6502Instruction(\"ADC\", 0x6d, ADC, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"ADC\", 0x69, ADC, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"ADC\", 0x61, ADC, CPU6502Instruction.INDIRECT_X, 6));\r\n addInstruction(new CPU6502Instruction(\"ADC\", 0x71, ADC, CPU6502Instruction.INDIRECT_Y, 5, true));\r\n addInstruction(new CPU6502Instruction(\"ADC\", 0x7d, ADC, CPU6502Instruction.ABSOLUTE_X, 4, true));\r\n addInstruction(new CPU6502Instruction(\"ADC\", 0x79, ADC, CPU6502Instruction.ABSOLUTE_Y, 4, true));\r\n addInstruction(new CPU6502Instruction(\"ADC\", 0x65, ADC, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"ADC\", 0x75, ADC, CPU6502Instruction.ZERO_X, 4));\r\n addInstruction(new CPU6502Instruction(\"AND\", 0x2d, AND, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"AND\", 0x29, AND, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"AND\", 0x21, AND, CPU6502Instruction.INDIRECT_X, 6));\r\n addInstruction(new CPU6502Instruction(\"AND\", 0x31, AND, CPU6502Instruction.INDIRECT_Y, 5, true));\r\n addInstruction(new CPU6502Instruction(\"AND\", 0x3d, AND, CPU6502Instruction.ABSOLUTE_X, 4, true));\r\n addInstruction(new CPU6502Instruction(\"AND\", 0x39, AND, CPU6502Instruction.ABSOLUTE_Y, 4, true));\r\n addInstruction(new CPU6502Instruction(\"AND\", 0x25, AND, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"AND\", 0x35, AND, CPU6502Instruction.ZERO_X, 4));\r\n addInstruction(new CPU6502Instruction(\"ASL\", 0x0E, ASL, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"ASL\", 0x0A, ASL, CPU6502Instruction.ACCUMULATOR, 2));\r\n addInstruction(new CPU6502Instruction(\"ASL\", 0x1E, ASL, CPU6502Instruction.ABSOLUTE_X, 7));\r\n addInstruction(new CPU6502Instruction(\"ASL\", 0x06, ASL, CPU6502Instruction.ZERO, 5));\r\n addInstruction(new CPU6502Instruction(\"ASL\", 0x16, ASL, CPU6502Instruction.ZERO_X, 6));\r\n addInstruction(new CPU6502Instruction(\"BCC\", 0x90, BCC, CPU6502Instruction.RELATIVE, 2));\r\n addInstruction(new CPU6502Instruction(\"BCS\", 0xb0, BCS, CPU6502Instruction.RELATIVE, 2));\r\n addInstruction(new CPU6502Instruction(\"BEQ\", 0xf0, BEQ, CPU6502Instruction.RELATIVE, 2));\r\n addInstruction(new CPU6502Instruction(\"BIT\", 0x2c, BIT, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"BIT\", 0x24, BIT, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"BMI\", 0x30, BMI, CPU6502Instruction.RELATIVE, 2));\r\n addInstruction(new CPU6502Instruction(\"BNE\", 0xd0, BNE, CPU6502Instruction.RELATIVE, 2));\r\n addInstruction(new CPU6502Instruction(\"BPL\", 0x10, BPL, CPU6502Instruction.RELATIVE, 2));\r\n addInstruction(new CPU6502Instruction(\"BRK\", 0x00, BRK, CPU6502Instruction.IMPLIED, 7));\r\n addInstruction(new CPU6502Instruction(\"BVC\", 0x50, BVC, CPU6502Instruction.RELATIVE, 2));\r\n addInstruction(new CPU6502Instruction(\"BVS\", 0x70, BVS, CPU6502Instruction.RELATIVE, 2));\r\n addInstruction(new CPU6502Instruction(\"CLC\", 0x18, CLC, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"CLD\", 0xd8, CLD, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"CLI\", 0x58, CLI, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"CLV\", 0xb8, CLV, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"CMP\", 0xcd, CMP, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"CMP\", 0xc9, CMP, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"CMP\", 0xc1, CMP, CPU6502Instruction.INDIRECT_X, 6));\r\n addInstruction(new CPU6502Instruction(\"CMP\", 0xd1, CMP, CPU6502Instruction.INDIRECT_Y, 5, true));\r\n addInstruction(new CPU6502Instruction(\"CMP\", 0xdd, CMP, CPU6502Instruction.ABSOLUTE_X, 4, true));\r\n addInstruction(new CPU6502Instruction(\"CMP\", 0xd9, CMP, CPU6502Instruction.ABSOLUTE_Y, 4, true));\r\n addInstruction(new CPU6502Instruction(\"CMP\", 0xc5, CMP, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"CMP\", 0xd5, CMP, CPU6502Instruction.ZERO_X, 4));\r\n addInstruction(new CPU6502Instruction(\"CPX\", 0xec, CPX, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"CPX\", 0xe0, CPX, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"CPX\", 0xe4, CPX, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"CPY\", 0xcc, CPY, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"CPY\", 0xc0, CPY, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"CPY\", 0xc4, CPY, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"DEC\", 0xce, DEC, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"DEC\", 0xde, DEC, CPU6502Instruction.ABSOLUTE_X, 7));\r\n addInstruction(new CPU6502Instruction(\"DEC\", 0xc6, DEC, CPU6502Instruction.ZERO, 5));\r\n addInstruction(new CPU6502Instruction(\"DEC\", 0xd6, DEC, CPU6502Instruction.ZERO_X, 6));\r\n addInstruction(new CPU6502Instruction(\"DEX\", 0xca, DEX, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"DEY\", 0x88, DEY, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"EOR\", 0x4d, EOR, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"EOR\", 0x49, EOR, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"EOR\", 0x41, EOR, CPU6502Instruction.INDIRECT_X, 6));\r\n addInstruction(new CPU6502Instruction(\"EOR\", 0x51, EOR, CPU6502Instruction.INDIRECT_Y, 5, true));\r\n addInstruction(new CPU6502Instruction(\"EOR\", 0x5d, EOR, CPU6502Instruction.ABSOLUTE_X, 4, true));\r\n addInstruction(new CPU6502Instruction(\"EOR\", 0x59, EOR, CPU6502Instruction.ABSOLUTE_Y, 4, true));\r\n addInstruction(new CPU6502Instruction(\"EOR\", 0x45, EOR, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"EOR\", 0x55, EOR, CPU6502Instruction.ZERO_X, 4));\r\n addInstruction(new CPU6502Instruction(\"INC\", 0xee, INC, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"INC\", 0xfe, INC, CPU6502Instruction.ABSOLUTE_X, 7));\r\n addInstruction(new CPU6502Instruction(\"INC\", 0xe6, INC, CPU6502Instruction.ZERO, 5));\r\n addInstruction(new CPU6502Instruction(\"INC\", 0xf6, INC, CPU6502Instruction.ZERO_X, 6));\r\n addInstruction(new CPU6502Instruction(\"INX\", 0xe8, INX, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"INY\", 0xc8, INY, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"JMP\", 0x4c, JMP, CPU6502Instruction.ABSOLUTE, 3));\r\n addInstruction(new CPU6502Instruction(\"JMP\", 0x6c, JMP, CPU6502Instruction.INDIRECT, 5));\r\n addInstruction(new CPU6502Instruction(\"JSR\", 0x20, JSR, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"LDA\", 0xad, LDA, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"LDA\", 0xa9, LDA, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"LDA\", 0xa1, LDA, CPU6502Instruction.INDIRECT_X, 6));\r\n addInstruction(new CPU6502Instruction(\"LDA\", 0xb1, LDA, CPU6502Instruction.INDIRECT_Y, 5, true));\r\n addInstruction(new CPU6502Instruction(\"LDA\", 0xbd, LDA, CPU6502Instruction.ABSOLUTE_X, 4, true));\r\n addInstruction(new CPU6502Instruction(\"LDA\", 0xb9, LDA, CPU6502Instruction.ABSOLUTE_Y, 4, true));\r\n addInstruction(new CPU6502Instruction(\"LDA\", 0xa5, LDA, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"LDA\", 0xb5, LDA, CPU6502Instruction.ZERO_X, 4));\r\n addInstruction(new CPU6502Instruction(\"LDX\", 0xae, LDX, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"LDX\", 0xa2, LDX, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"LDX\", 0xbe, LDX, CPU6502Instruction.ABSOLUTE_Y, 4, true));\r\n addInstruction(new CPU6502Instruction(\"LDX\", 0xa6, LDX, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"LDX\", 0xb6, LDX, CPU6502Instruction.ZERO_Y, 4));\r\n addInstruction(new CPU6502Instruction(\"LDY\", 0xac, LDY, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"LDY\", 0xa0, LDY, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"LDY\", 0xbc, LDY, CPU6502Instruction.ABSOLUTE_X, 4, true));\r\n addInstruction(new CPU6502Instruction(\"LDY\", 0xa4, LDY, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"LDY\", 0xb4, LDY, CPU6502Instruction.ZERO_X, 4));\r\n addInstruction(new CPU6502Instruction(\"LSR\", 0x4e, LSR, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"LSR\", 0x4a, LSR, CPU6502Instruction.ACCUMULATOR, 2));\r\n addInstruction(new CPU6502Instruction(\"LSR\", 0x5e, LSR, CPU6502Instruction.ABSOLUTE_X, 7));\r\n addInstruction(new CPU6502Instruction(\"LSR\", 0x46, LSR, CPU6502Instruction.ZERO, 5));\r\n addInstruction(new CPU6502Instruction(\"LSR\", 0x56, LSR, CPU6502Instruction.ZERO_X, 6));\r\n addInstruction(new CPU6502Instruction(\"NOP\", 0xea, NOP, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"ORA\", 0x0D, ORA, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"ORA\", 0x09, ORA, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"ORA\", 0x01, ORA, CPU6502Instruction.INDIRECT_X, 6));\r\n addInstruction(new CPU6502Instruction(\"ORA\", 0x11, ORA, CPU6502Instruction.INDIRECT_Y, 5, true));\r\n addInstruction(new CPU6502Instruction(\"ORA\", 0x1D, ORA, CPU6502Instruction.ABSOLUTE_X, 4, true));\r\n addInstruction(new CPU6502Instruction(\"ORA\", 0x19, ORA, CPU6502Instruction.ABSOLUTE_Y, 4, true));\r\n addInstruction(new CPU6502Instruction(\"ORA\", 0x05, ORA, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"ORA\", 0x15, ORA, CPU6502Instruction.ZERO_X, 4));\r\n addInstruction(new CPU6502Instruction(\"PHA\", 0x48, PHA, CPU6502Instruction.IMPLIED, 3));\r\n addInstruction(new CPU6502Instruction(\"PHP\", 0x08, PHP, CPU6502Instruction.IMPLIED, 3));\r\n addInstruction(new CPU6502Instruction(\"PLA\", 0x68, PLA, CPU6502Instruction.IMPLIED, 4));\r\n addInstruction(new CPU6502Instruction(\"PLP\", 0x28, PLP, CPU6502Instruction.IMPLIED, 4));\r\n addInstruction(new CPU6502Instruction(\"ROL\", 0x2e, ROL, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"ROL\", 0x2a, ROL, CPU6502Instruction.ACCUMULATOR, 2));\r\n addInstruction(new CPU6502Instruction(\"ROL\", 0x3e, ROL, CPU6502Instruction.ABSOLUTE_X, 7));\r\n addInstruction(new CPU6502Instruction(\"ROL\", 0x26, ROL, CPU6502Instruction.ZERO, 5));\r\n addInstruction(new CPU6502Instruction(\"ROL\", 0x36, ROL, CPU6502Instruction.ZERO_X, 6));\r\n addInstruction(new CPU6502Instruction(\"ROR\", 0x6e, ROR, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"ROR\", 0x6a, ROR, CPU6502Instruction.ACCUMULATOR, 2));\r\n addInstruction(new CPU6502Instruction(\"ROR\", 0x7e, ROR, CPU6502Instruction.ABSOLUTE_X, 7));\r\n addInstruction(new CPU6502Instruction(\"ROR\", 0x66, ROR, CPU6502Instruction.ZERO, 5));\r\n addInstruction(new CPU6502Instruction(\"ROR\", 0x76, ROR, CPU6502Instruction.ZERO_X, 6));\r\n addInstruction(new CPU6502Instruction(\"RTI\", 0x40, RTI, CPU6502Instruction.IMPLIED, 6));\r\n addInstruction(new CPU6502Instruction(\"RTS\", 0x60, RTS, CPU6502Instruction.IMPLIED, 6));\r\n addInstruction(new CPU6502Instruction(\"SBC\", 0xed, SBC, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"SBC\", 0xe9, SBC, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"SBC\", 0xe1, SBC, CPU6502Instruction.INDIRECT_X, 6));\r\n addInstruction(new CPU6502Instruction(\"SBC\", 0xf1, SBC, CPU6502Instruction.INDIRECT_Y, 5, true));\r\n addInstruction(new CPU6502Instruction(\"SBC\", 0xfd, SBC, CPU6502Instruction.ABSOLUTE_X, 4, true));\r\n addInstruction(new CPU6502Instruction(\"SBC\", 0xf9, SBC, CPU6502Instruction.ABSOLUTE_Y, 4, true));\r\n addInstruction(new CPU6502Instruction(\"SBC\", 0xe5, SBC, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"SBC\", 0xf5, SBC, CPU6502Instruction.ZERO_X, 4));\r\n addInstruction(new CPU6502Instruction(\"SEC\", 0x38, SEC, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"SED\", 0xf8, SED, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"SEI\", 0x78, SEI, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"STA\", 0x8d, STA, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"STA\", 0x81, STA, CPU6502Instruction.INDIRECT_X, 6));\r\n addInstruction(new CPU6502Instruction(\"STA\", 0x91, STA, CPU6502Instruction.INDIRECT_Y, 6));\r\n addInstruction(new CPU6502Instruction(\"STA\", 0x9d, STA, CPU6502Instruction.ABSOLUTE_X, 5));\r\n addInstruction(new CPU6502Instruction(\"STA\", 0x99, STA, CPU6502Instruction.ABSOLUTE_Y, 5));\r\n addInstruction(new CPU6502Instruction(\"STA\", 0x85, STA, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"STA\", 0x95, STA, CPU6502Instruction.ZERO_X, 4));\r\n addInstruction(new CPU6502Instruction(\"STX\", 0x8e, STX, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"STX\", 0x86, STX, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"STX\", 0x96, STX, CPU6502Instruction.ZERO_Y, 4));\r\n addInstruction(new CPU6502Instruction(\"STY\", 0x8c, STY, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"STY\", 0x84, STY, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"STY\", 0x94, STY, CPU6502Instruction.ZERO_X, 4));\r\n addInstruction(new CPU6502Instruction(\"TAX\", 0xaa, TAX, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"TAY\", 0xa8, TAY, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"TSX\", 0xba, TSX, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"TXA\", 0x8a, TXA, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"TXS\", 0x9a, TXS, CPU6502Instruction.IMPLIED, 2));\r\n addInstruction(new CPU6502Instruction(\"TYA\", 0x98, TYA, CPU6502Instruction.IMPLIED, 2));\r\n // undocumentated instructions\r\n addInstruction(new CPU6502Instruction(\"ALR\", 0x4b, ALR, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"ANC\", 0x0b, ANC, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x0b], 0x2b));\r\n addInstruction(new CPU6502Instruction(\"ARR\", 0x6b, ARR, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"ASO\", 0x0F, ASO, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"ASO\", 0x03, ASO, CPU6502Instruction.INDIRECT_X, 8));\r\n addInstruction(new CPU6502Instruction(\"ASO\", 0x13, ASO, CPU6502Instruction.INDIRECT_Y, 8));\r\n addInstruction(new CPU6502Instruction(\"ASO\", 0x1f, ASO, CPU6502Instruction.ABSOLUTE_X, 7));\r\n addInstruction(new CPU6502Instruction(\"ASO\", 0x1b, ASO, CPU6502Instruction.ABSOLUTE_Y, 7));\r\n addInstruction(new CPU6502Instruction(\"ASO\", 0x07, ASO, CPU6502Instruction.ZERO, 5));\r\n addInstruction(new CPU6502Instruction(\"ASO\", 0x17, ASO, CPU6502Instruction.ZERO_X, 6));\r\n addInstruction(new CPU6502Instruction(\"AXS\", 0x8F, AXS, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"AXS\", 0x83, AXS, CPU6502Instruction.INDIRECT_X, 6));\r\n addInstruction(new CPU6502Instruction(\"AXS\", 0x87, AXS, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"AXS\", 0x97, AXS, CPU6502Instruction.ZERO_Y, 4));\r\n addInstruction(new CPU6502Instruction(\"DCM\", 0xCF, DCM, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"DCM\", 0xC3, DCM, CPU6502Instruction.INDIRECT_X, 8));\r\n addInstruction(new CPU6502Instruction(\"DCM\", 0xD3, DCM, CPU6502Instruction.INDIRECT_Y, 8));\r\n addInstruction(new CPU6502Instruction(\"DCM\", 0xdf, DCM, CPU6502Instruction.ABSOLUTE_X, 7));\r\n addInstruction(new CPU6502Instruction(\"DCM\", 0xdb, DCM, CPU6502Instruction.ABSOLUTE_Y, 7));\r\n addInstruction(new CPU6502Instruction(\"DCM\", 0xC7, DCM, CPU6502Instruction.ZERO, 5));\r\n addInstruction(new CPU6502Instruction(\"DCM\", 0xD7, DCM, CPU6502Instruction.ZERO_X, 6));\r\n addInstruction(new CPU6502Instruction(\"INS\", 0xEF, INS, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"INS\", 0xE3, INS, CPU6502Instruction.INDIRECT_X, 8));\r\n addInstruction(new CPU6502Instruction(\"INS\", 0xF3, INS, CPU6502Instruction.INDIRECT_Y, 8));\r\n addInstruction(new CPU6502Instruction(\"INS\", 0xff, INS, CPU6502Instruction.ABSOLUTE_X, 7));\r\n addInstruction(new CPU6502Instruction(\"INS\", 0xfb, INS, CPU6502Instruction.ABSOLUTE_Y, 7));\r\n addInstruction(new CPU6502Instruction(\"INS\", 0xE7, INS, CPU6502Instruction.ZERO, 5));\r\n addInstruction(new CPU6502Instruction(\"INS\", 0xF7, INS, CPU6502Instruction.ZERO_X, 6));\r\n addInstruction(new CPU6502Instruction(\"LAS\", 0xbb, LAS, CPU6502Instruction.ABSOLUTE_Y, 4, true));\r\n addInstruction(new CPU6502Instruction(\"LAX\", 0xAF, LAX, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"LAX\", 0xA3, LAX, CPU6502Instruction.INDIRECT_X, 6));\r\n addInstruction(new CPU6502Instruction(\"LAX\", 0xB3, LAX, CPU6502Instruction.INDIRECT_Y, 5, true));\r\n addInstruction(new CPU6502Instruction(\"LAX\", 0xbf, LAX, CPU6502Instruction.ABSOLUTE_Y, 4));\r\n addInstruction(new CPU6502Instruction(\"LAX\", 0xA7, LAX, CPU6502Instruction.ZERO, 3));\r\n addInstruction(new CPU6502Instruction(\"LAX\", 0xB7, LAX, CPU6502Instruction.ZERO_Y, 4));\r\n addInstruction(new CPU6502Instruction(\"LSE\", 0x4F, LSE, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"LSE\", 0x43, LSE, CPU6502Instruction.INDIRECT_X, 8));\r\n addInstruction(new CPU6502Instruction(\"LSE\", 0x53, LSE, CPU6502Instruction.INDIRECT_Y, 8));\r\n addInstruction(new CPU6502Instruction(\"LSE\", 0x5f, LSE, CPU6502Instruction.ABSOLUTE_X, 7));\r\n addInstruction(new CPU6502Instruction(\"LSE\", 0x5b, LSE, CPU6502Instruction.ABSOLUTE_Y, 7));\r\n addInstruction(new CPU6502Instruction(\"LSE\", 0x47, LSE, CPU6502Instruction.ZERO, 5));\r\n addInstruction(new CPU6502Instruction(\"LSE\", 0x57, LSE, CPU6502Instruction.ZERO_X, 6));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0xea], 0x1a));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0xea], 0x3a));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0xea], 0x5a));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0xea], 0x7a));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0xea], 0xda));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0xea], 0xfa));\r\n addInstruction(new CPU6502Instruction(\"OAL\", 0xab, OAL, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"RLA\", 0x2F, RLA, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"RLA\", 0x23, RLA, CPU6502Instruction.INDIRECT_X, 8));\r\n addInstruction(new CPU6502Instruction(\"RLA\", 0x33, RLA, CPU6502Instruction.INDIRECT_Y, 8));\r\n addInstruction(new CPU6502Instruction(\"RLA\", 0x3f, RLA, CPU6502Instruction.ABSOLUTE_X, 7));\r\n addInstruction(new CPU6502Instruction(\"RLA\", 0x3b, RLA, CPU6502Instruction.ABSOLUTE_Y, 7));\r\n addInstruction(new CPU6502Instruction(\"RLA\", 0x27, RLA, CPU6502Instruction.ZERO, 5));\r\n addInstruction(new CPU6502Instruction(\"RLA\", 0x37, RLA, CPU6502Instruction.ZERO_X, 6));\r\n addInstruction(new CPU6502Instruction(\"RRA\", 0x6F, RRA, CPU6502Instruction.ABSOLUTE, 6));\r\n addInstruction(new CPU6502Instruction(\"RRA\", 0x63, RRA, CPU6502Instruction.INDIRECT_X, 8));\r\n addInstruction(new CPU6502Instruction(\"RRA\", 0x73, RRA, CPU6502Instruction.INDIRECT_Y, 8));\r\n addInstruction(new CPU6502Instruction(\"RRA\", 0x7f, RRA, CPU6502Instruction.ABSOLUTE_X, 7));\r\n addInstruction(new CPU6502Instruction(\"RRA\", 0x7b, RRA, CPU6502Instruction.ABSOLUTE_Y, 7));\r\n addInstruction(new CPU6502Instruction(\"RRA\", 0x67, RRA, CPU6502Instruction.ZERO, 5));\r\n addInstruction(new CPU6502Instruction(\"RRA\", 0x77, RRA, CPU6502Instruction.ZERO_X, 6));\r\n addInstruction(new CPU6502Instruction(\"SAX\", 0xcb, SAX, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"SAY\", 0x9c, SAY, CPU6502Instruction.ABSOLUTE_X, 5));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0xe9], 0xeb));\r\n addInstruction(new CPU6502Instruction(\"AXA\", 0x93, AXA, CPU6502Instruction.INDIRECT_Y, 6));\r\n addInstruction(new CPU6502Instruction(\"AXA\", 0x9f, AXA, CPU6502Instruction.ABSOLUTE_Y, 5));\r\n addInstruction(new CPU6502Instruction(\"SKB\", 0x80, SKB, CPU6502Instruction.IMMEDIATE, 3));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x80], 0x82));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x80], 0xc2));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x80], 0xe2));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x80], 0x04));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x80], 0x14));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x80], 0x34));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x80], 0x44));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x80], 0x54));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x80], 0x64));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x80], 0x74));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x80], 0xd4));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x80], 0xf4));\r\n addInstruction(new CPU6502Instruction(\"SKB\", 0x89, SKB, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"SKW\", 0x0c, SKW, CPU6502Instruction.ABSOLUTE, 4));\r\n addInstruction(new CPU6502Instruction(\"SKW\", 0x1c, SKW, CPU6502Instruction.INDIRECT_X, 4, true));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x1c], 0x3c));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x1c], 0x5c));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x1c], 0x7c));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x1c], 0xdc));\r\n addInstruction(new CPU6502Instruction(this.instructions[ 0x1c], 0xfc));\r\n addInstruction(new CPU6502Instruction(\"TAS\", 0x9b, TAS, CPU6502Instruction.ABSOLUTE_Y, 5));\r\n addInstruction(new CPU6502Instruction(\"XAA\", 0x8b, XAA, CPU6502Instruction.IMMEDIATE, 2));\r\n addInstruction(new CPU6502Instruction(\"XAS\", 0x9e, XAS, CPU6502Instruction.ABSOLUTE_Y, 5));\r\n }", "private List<Action> createInstructions(String line) {\n\t\tLOGGER.info(\"Reads instruction as '{}'\", line);\n\t\tMatcher m = INSTRUCTION_LINE_PATTERN.matcher(line);\n\t\tif (!m.matches()) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\tString.format(\"The line '%s' does not define a correct sequence of mower instructions!\", line));\n\t\t}\n\t\treturn line.chars()\n\t\t\t.mapToObj(c -> Action.valueOf((char)c))\n\t\t\t.collect(Collectors.toList());\n\t}", "private UnifiedAst precompile(PrecompilationContext precompilationContext)\n\t\t\tthrows UnableToCompleteException {\n\t\ttry {\n\t\t\t// (0) Assert preconditions\n\t\t\tif (precompilationContext.getEntryPoints().length\n\t\t\t\t\t+ precompilationContext\n\t\t\t\t\t\t\t.getAdditionalRootTypes().length == 0) {\n\t\t\t\tthrow new IllegalArgumentException(\"entry point(s) required\");\n\t\t\t}\n\t\t\tboolean singlePermutation = precompilationContext\n\t\t\t\t\t.getPermutations().length == 1;\n\t\t\tPrecompilationMetricsArtifact precompilationMetrics = precompilationContext\n\t\t\t\t\t.getPrecompilationMetricsArtifact();\n\t\t\t/*\n\t\t\t * Do not introduce any new pass here unless it is logically a part\n\t\t\t * of one of the 6 defined stages and is physically located in that\n\t\t\t * stage.\n\t\t\t */\n\t\t\t// (1) Initialize local state\n\t\t\tjprogram = new JProgram(compilerContext.getMinimalRebuildCache());\n\t\t\t// Synchronize JTypeOracle with compile optimization behavior.\n\t\t\tjprogram.typeOracle.setOptimize(options\n\t\t\t\t\t.getOptimizationLevel() > OptionOptimize.OPTIMIZE_LEVEL_DRAFT);\n\t\t\tjsProgram = new JsProgram();\n\t\t\t// (2) Construct and unify the unresolved Java AST\n\t\t\tCompilationState compilationState = constructJavaAst(\n\t\t\t\t\tprecompilationContext);\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tJsniRestrictionChecker.exec(logger, jprogram);\n\t\t\tJsInteropRestrictionChecker.exec(logger, jprogram,\n\t\t\t\t\tgetMinimalRebuildCache());\n\t\t\tlogTypeOracleMetrics(precompilationMetrics, compilationState);\n\t\t\tMemory.maybeDumpMemory(\"AstOnly\");\n\t\t\tAstDumper.maybeDumpAST(jprogram);\n\t\t\t// TODO(stalcup): is in wrong place, move to optimization stage\n\t\t\tConfigurationProperties configurationProperties = new ConfigurationProperties(\n\t\t\t\t\tmodule);\n\t\t\tEnumNameObfuscator.exec(jprogram, logger, configurationProperties,\n\t\t\t\t\toptions);\n\t\t\t// (3) Normalize the unresolved Java AST\n\t\t\t// Replace default methods by static implementations.\n\t\t\tDevirtualizeDefaultMethodForwarding.exec(jprogram);\n\t\t\t// Replace calls to native overrides of object methods.\n\t\t\tReplaceCallsToNativeJavaLangObjectOverrides.exec(jprogram);\n\t\t\tFixAssignmentsToUnboxOrCast.exec(jprogram);\n\t\t\tif (options.isEnableAssertions()) {\n\t\t\t\tAssertionNormalizer.exec(jprogram);\n\t\t\t} else {\n\t\t\t\tAssertionRemover.exec(jprogram);\n\t\t\t}\n\t\t\tif (module != null && options.isRunAsyncEnabled()) {\n\t\t\t\tReplaceRunAsyncs.exec(logger, jprogram);\n\t\t\t\tConfigurationProperties config = new ConfigurationProperties(\n\t\t\t\t\t\tmodule);\n\t\t\t\tCodeSplitters.pickInitialLoadSequence(logger, jprogram, config);\n\t\t\t}\n\t\t\tImplementClassLiteralsAsFields.exec(jprogram, shouldOptimize());\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tlogAstTypeMetrics(precompilationMetrics);\n\t\t\t// (4) Construct and return a value.\n\t\t\tEvent createUnifiedAstEvent = SpeedTracerLogger\n\t\t\t\t\t.start(CompilerEventType.CREATE_UNIFIED_AST);\n\t\t\tUnifiedAst result = new UnifiedAst(options,\n\t\t\t\t\tnew AST(jprogram, jsProgram), singlePermutation,\n\t\t\t\t\tRecordRebinds.exec(jprogram));\n\t\t\tcreateUnifiedAstEvent.end();\n\t\t\treturn result;\n\t\t} catch (Throwable e) {\n\t\t\tthrow CompilationProblemReporter.logAndTranslateException(logger,\n\t\t\t\t\te);\n\t\t}\n\t}", "private static Instruction create(byte opcode, boolean wide)\n {\n switch (opcode)\n {\n // Simple instructions.\n case InstructionConstants.OP_NOP:\n case InstructionConstants.OP_ACONST_NULL:\n case InstructionConstants.OP_ICONST_M1:\n case InstructionConstants.OP_ICONST_0:\n case InstructionConstants.OP_ICONST_1:\n case InstructionConstants.OP_ICONST_2:\n case InstructionConstants.OP_ICONST_3:\n case InstructionConstants.OP_ICONST_4:\n case InstructionConstants.OP_ICONST_5:\n case InstructionConstants.OP_LCONST_0:\n case InstructionConstants.OP_LCONST_1:\n case InstructionConstants.OP_FCONST_0:\n case InstructionConstants.OP_FCONST_1:\n case InstructionConstants.OP_FCONST_2:\n case InstructionConstants.OP_DCONST_0:\n case InstructionConstants.OP_DCONST_1:\n\n case InstructionConstants.OP_BIPUSH:\n case InstructionConstants.OP_SIPUSH:\n\n case InstructionConstants.OP_IALOAD:\n case InstructionConstants.OP_LALOAD:\n case InstructionConstants.OP_FALOAD:\n case InstructionConstants.OP_DALOAD:\n case InstructionConstants.OP_AALOAD:\n case InstructionConstants.OP_BALOAD:\n case InstructionConstants.OP_CALOAD:\n case InstructionConstants.OP_SALOAD:\n\n case InstructionConstants.OP_IASTORE:\n case InstructionConstants.OP_LASTORE:\n case InstructionConstants.OP_FASTORE:\n case InstructionConstants.OP_DASTORE:\n case InstructionConstants.OP_AASTORE:\n case InstructionConstants.OP_BASTORE:\n case InstructionConstants.OP_CASTORE:\n case InstructionConstants.OP_SASTORE:\n case InstructionConstants.OP_POP:\n case InstructionConstants.OP_POP2:\n case InstructionConstants.OP_DUP:\n case InstructionConstants.OP_DUP_X1:\n case InstructionConstants.OP_DUP_X2:\n case InstructionConstants.OP_DUP2:\n case InstructionConstants.OP_DUP2_X1:\n case InstructionConstants.OP_DUP2_X2:\n case InstructionConstants.OP_SWAP:\n case InstructionConstants.OP_IADD:\n case InstructionConstants.OP_LADD:\n case InstructionConstants.OP_FADD:\n case InstructionConstants.OP_DADD:\n case InstructionConstants.OP_ISUB:\n case InstructionConstants.OP_LSUB:\n case InstructionConstants.OP_FSUB:\n case InstructionConstants.OP_DSUB:\n case InstructionConstants.OP_IMUL:\n case InstructionConstants.OP_LMUL:\n case InstructionConstants.OP_FMUL:\n case InstructionConstants.OP_DMUL:\n case InstructionConstants.OP_IDIV:\n case InstructionConstants.OP_LDIV:\n case InstructionConstants.OP_FDIV:\n case InstructionConstants.OP_DDIV:\n case InstructionConstants.OP_IREM:\n case InstructionConstants.OP_LREM:\n case InstructionConstants.OP_FREM:\n case InstructionConstants.OP_DREM:\n case InstructionConstants.OP_INEG:\n case InstructionConstants.OP_LNEG:\n case InstructionConstants.OP_FNEG:\n case InstructionConstants.OP_DNEG:\n case InstructionConstants.OP_ISHL:\n case InstructionConstants.OP_LSHL:\n case InstructionConstants.OP_ISHR:\n case InstructionConstants.OP_LSHR:\n case InstructionConstants.OP_IUSHR:\n case InstructionConstants.OP_LUSHR:\n case InstructionConstants.OP_IAND:\n case InstructionConstants.OP_LAND:\n case InstructionConstants.OP_IOR:\n case InstructionConstants.OP_LOR:\n case InstructionConstants.OP_IXOR:\n case InstructionConstants.OP_LXOR:\n\n case InstructionConstants.OP_I2L:\n case InstructionConstants.OP_I2F:\n case InstructionConstants.OP_I2D:\n case InstructionConstants.OP_L2I:\n case InstructionConstants.OP_L2F:\n case InstructionConstants.OP_L2D:\n case InstructionConstants.OP_F2I:\n case InstructionConstants.OP_F2L:\n case InstructionConstants.OP_F2D:\n case InstructionConstants.OP_D2I:\n case InstructionConstants.OP_D2L:\n case InstructionConstants.OP_D2F:\n case InstructionConstants.OP_I2B:\n case InstructionConstants.OP_I2C:\n case InstructionConstants.OP_I2S:\n case InstructionConstants.OP_LCMP:\n case InstructionConstants.OP_FCMPL:\n case InstructionConstants.OP_FCMPG:\n case InstructionConstants.OP_DCMPL:\n case InstructionConstants.OP_DCMPG:\n\n case InstructionConstants.OP_IRETURN:\n case InstructionConstants.OP_LRETURN:\n case InstructionConstants.OP_FRETURN:\n case InstructionConstants.OP_DRETURN:\n case InstructionConstants.OP_ARETURN:\n case InstructionConstants.OP_RETURN:\n\n case InstructionConstants.OP_NEWARRAY:\n case InstructionConstants.OP_ARRAYLENGTH:\n case InstructionConstants.OP_ATHROW:\n\n case InstructionConstants.OP_MONITORENTER:\n case InstructionConstants.OP_MONITOREXIT:\n return new SimpleInstruction();\n\n // Instructions with a contant pool index.\n case InstructionConstants.OP_LDC:\n case InstructionConstants.OP_LDC_W:\n case InstructionConstants.OP_LDC2_W:\n\n case InstructionConstants.OP_GETSTATIC:\n case InstructionConstants.OP_PUTSTATIC:\n case InstructionConstants.OP_GETFIELD:\n case InstructionConstants.OP_PUTFIELD:\n\n case InstructionConstants.OP_INVOKEVIRTUAL:\n case InstructionConstants.OP_INVOKESPECIAL:\n case InstructionConstants.OP_INVOKESTATIC:\n case InstructionConstants.OP_INVOKEINTERFACE:\n case InstructionConstants.OP_INVOKEDYNAMIC:\n\n case InstructionConstants.OP_NEW:\n case InstructionConstants.OP_ANEWARRAY:\n case InstructionConstants.OP_CHECKCAST:\n case InstructionConstants.OP_INSTANCEOF:\n case InstructionConstants.OP_MULTIANEWARRAY:\n return new ConstantInstruction();\n\n // Instructions with a local variable index.\n case InstructionConstants.OP_ILOAD:\n case InstructionConstants.OP_LLOAD:\n case InstructionConstants.OP_FLOAD:\n case InstructionConstants.OP_DLOAD:\n case InstructionConstants.OP_ALOAD:\n case InstructionConstants.OP_ILOAD_0:\n case InstructionConstants.OP_ILOAD_1:\n case InstructionConstants.OP_ILOAD_2:\n case InstructionConstants.OP_ILOAD_3:\n case InstructionConstants.OP_LLOAD_0:\n case InstructionConstants.OP_LLOAD_1:\n case InstructionConstants.OP_LLOAD_2:\n case InstructionConstants.OP_LLOAD_3:\n case InstructionConstants.OP_FLOAD_0:\n case InstructionConstants.OP_FLOAD_1:\n case InstructionConstants.OP_FLOAD_2:\n case InstructionConstants.OP_FLOAD_3:\n case InstructionConstants.OP_DLOAD_0:\n case InstructionConstants.OP_DLOAD_1:\n case InstructionConstants.OP_DLOAD_2:\n case InstructionConstants.OP_DLOAD_3:\n case InstructionConstants.OP_ALOAD_0:\n case InstructionConstants.OP_ALOAD_1:\n case InstructionConstants.OP_ALOAD_2:\n case InstructionConstants.OP_ALOAD_3:\n\n case InstructionConstants.OP_ISTORE:\n case InstructionConstants.OP_LSTORE:\n case InstructionConstants.OP_FSTORE:\n case InstructionConstants.OP_DSTORE:\n case InstructionConstants.OP_ASTORE:\n case InstructionConstants.OP_ISTORE_0:\n case InstructionConstants.OP_ISTORE_1:\n case InstructionConstants.OP_ISTORE_2:\n case InstructionConstants.OP_ISTORE_3:\n case InstructionConstants.OP_LSTORE_0:\n case InstructionConstants.OP_LSTORE_1:\n case InstructionConstants.OP_LSTORE_2:\n case InstructionConstants.OP_LSTORE_3:\n case InstructionConstants.OP_FSTORE_0:\n case InstructionConstants.OP_FSTORE_1:\n case InstructionConstants.OP_FSTORE_2:\n case InstructionConstants.OP_FSTORE_3:\n case InstructionConstants.OP_DSTORE_0:\n case InstructionConstants.OP_DSTORE_1:\n case InstructionConstants.OP_DSTORE_2:\n case InstructionConstants.OP_DSTORE_3:\n case InstructionConstants.OP_ASTORE_0:\n case InstructionConstants.OP_ASTORE_1:\n case InstructionConstants.OP_ASTORE_2:\n case InstructionConstants.OP_ASTORE_3:\n\n case InstructionConstants.OP_IINC:\n\n case InstructionConstants.OP_RET:\n return new VariableInstruction(wide);\n\n // Instructions with a branch offset operand.\n case InstructionConstants.OP_IFEQ:\n case InstructionConstants.OP_IFNE:\n case InstructionConstants.OP_IFLT:\n case InstructionConstants.OP_IFGE:\n case InstructionConstants.OP_IFGT:\n case InstructionConstants.OP_IFLE:\n case InstructionConstants.OP_IFICMPEQ:\n case InstructionConstants.OP_IFICMPNE:\n case InstructionConstants.OP_IFICMPLT:\n case InstructionConstants.OP_IFICMPGE:\n case InstructionConstants.OP_IFICMPGT:\n case InstructionConstants.OP_IFICMPLE:\n case InstructionConstants.OP_IFACMPEQ:\n case InstructionConstants.OP_IFACMPNE:\n case InstructionConstants.OP_GOTO:\n case InstructionConstants.OP_JSR:\n\n case InstructionConstants.OP_IFNULL:\n case InstructionConstants.OP_IFNONNULL:\n\n case InstructionConstants.OP_GOTO_W:\n case InstructionConstants.OP_JSR_W:\n return new BranchInstruction();\n\n // The tableswitch instruction.\n case InstructionConstants.OP_TABLESWITCH:\n return new TableSwitchInstruction();\n\n // The lookupswitch instruction.\n case InstructionConstants.OP_LOOKUPSWITCH:\n return new LookUpSwitchInstruction();\n\n default:\n throw new IllegalArgumentException(\"Unknown instruction opcode [\"+opcode+\"]\");\n }\n }", "static void main(String[] args) {\n int[] instructions = {0x0000,0x01FF,0xF025,0xFFFF};\n for (int i:instructions) {\n //holds the instruction\n int instr;\n //holds the first three bits after the opcode\n int f3Bits;\n //holsd the second three bits after the opcode\n int s3Bits;\n \n // String to hold the code disassembled into a string\n String instruction=\"\";\n\n //makes the instruction only the last 16 bits instead of int natural 32\n i = i&0x0000FFFF; \n\n //separates just the Opcode\n instr = 0xf000 &i;\n \n //Test for each instruction and adds the Call of that instruction to the\n //string\n if(i==0x0000){\n \tinstruction = \"NOP\";\n }\n else if(instr ==0x1000){\n instruction = \"ADD \";\n }\n else if(instr==0x5000){\n \tinstruction = \"AND \";\n }\n else if(instr==0x0000){\n \tinstruction = \"BR \";\n \t//Test for each part of the NZP\n int n = i & 0x0800;\n \tint z = i & 0x0400;\n \tint p = i & 0x0200;\n if(n == 0x0800)\n \tinstruction += \"n\";\n if(z == 0x0400)\n \tinstruction += \"z\";\n if(p == 0x0200)\n \tinstruction += \"p\";\n //Adds the offset to the string\n int offset9 = i & 0x01FF;\n instruction += \" \" + offset9;\n }\n else if(instr==0xC000){\n \tinstruction = \"JMP \";\n \tinstruction += \"R\"+(i&0x01C0);\n }\n else if(instr==0x4000){\n \tinstruction += \"JSR\";\n \tif((i&0x0800) == 0x0800) {\n \t\tinstruction += \" \"+(i&0x07FF);\n \t}\n \telse {\n \t\tinstruction += \"R R\"+(i&0x01C0);\n \t}\n }\n else if(instr==0x2000){\n \tinstruction = \"LD \";\n }\n else if(instr==0xA000){\n instruction = \"LDI \";\n }\n else if(instr==0x6000){\n \tinstruction = \"LDR \";\n }\n else if(instr==0xE000){\n \tinstruction = \"LEA \";\n }\n else if(instr==0x9000){\n \tinstruction = \"NOT \";\n }\n else if(instr==0x3000){\n \tinstruction =\"ST \";\n }\n else if(instr==0xB000){\n \tinstruction = \"STI \";\n }\n else if(instr==0x7000){\n \tinstruction = \"STR \";\n }\n else if(i==0xF025){\n \tinstruction = \"HALT\";\n }\n else {\n \tinstruction = \"ERROR\";\n }\n\n //Grabs the first Register either SR or DR if it is not \n // NOP RET JSR JSRR\n if(instr !=0x0000 || instr != 0xC000 || instr != 0x4000) {\n f3Bits = i & 0x0E00;\n f3Bits= f3Bits >> 9;\n\n // Does the first two Registers for ADD AND LDR STR and NOT\n if(instr==0x1000 || instr==0x5000 || instr==0x6000 || instr==0x9000 || instr==0x7000){\n instruction = instruction + \"R\"+f3Bits+\" \";\n s3Bits = i & 0x01C0;\n s3Bits = s3Bits >> 6;\n instruction = instruction + \"R\"+s3Bits+\" \";\n }\n // Does teh First register and the Offset for LD, LDI, RET, ST, STI\n else if(instr==0x2000 || instr==0xA000 || instr==0xC000 || instr==0x3000 || instr=0xB000){\n instruction = instruction +\"R\"+f3Bits+\" \";\n System.out.printf(\"%x\",i);\n int offset9 = i & 0x01FF;\n instruction = instruction + offset9;\n }\n // DOes the logic for IMM5 or the 3rd REG for ADD and AND\n if(instr==0x1000 || instr==0x5000) {\n int bit4 = i & 0x0020;\n if(bit4 == 0x0020){\n int imm5 = i & 0x001F;\n instruction = instruction + imm5;\n }\n else {\n \t instr = i &0x0007;\n \t instruction = instruction + \"R\" + instr;\n }\n }\n //Computes the Offset for LDR and STR\n else if(instr==0x6000 || instr == 0x7000) {\n int offset6 = i & 0x003F;\n instruction = instruction + offset6;\n }\n }\n System.out.println(instruction);\n }\n }", "boolean generateAutomata()\n{\n empty_calls = new HashSet<JflowMethod>();\n event_calls = new HashSet<JflowMethod>();\n complete_calls = new LinkedHashMap<JflowMethod,ModelMethod>();\n methods_todo = new LinkedHashSet<JflowMethod>();\n return_set = new HashMap<JflowMethod,Boolean>();\n\n start_set = new HashSet<JflowMethod>();\n for (JflowMethod cm : model_master.getStartMethods()) {\n methods_todo.add(cm);\n start_set.add(cm);\n }\n\n while (!methods_todo.isEmpty()) {\n Iterator<JflowMethod> it = methods_todo.iterator();\n if (!it.hasNext()) break;\n JflowMethod cm = it.next();\n it.remove();\n if (!empty_calls.contains(cm) && !complete_calls.containsKey(cm)) {\n\t if (!model_master.checkUseMethod(cm) || !model_master.isMethodAccessible(cm.getMethod()) ||\n\t\tcm.getMethod().isAbstract()) {\n\t if (model_master.doDebug()) {\n\t System.err.println(\"Ignore method: \" + cm.getMethodName() + \" \" +\n\t\t\t\t cm.getMethodSignature() + \" \" +\n\t\t\t\t model_master.checkUseMethod(cm) + \" \" +\n\t\t\t\t model_master.isMethodAccessible(cm.getMethod()));\n\t }\n\t empty_calls.add(cm);\n\t }\n\t else {\n\t ModelBuilder bld = new ModelBuilder(model_master,this,cm);\n\t complete_calls.put(cm,null);\n\t ModelMethod cs = bld.createAutomata();\n\t if (cs == null) empty_calls.add(cm);\n\t else complete_calls.put(cm,cs);\n\t }\n }\n }\n\n Set<JflowMethod> workq = new LinkedHashSet<JflowMethod>();\n for (Map.Entry<JflowMethod,ModelMethod> ent : complete_calls.entrySet()) {\n JflowMethod bm = ent.getKey();\n ModelMethod cs = ent.getValue();\n if (cs == null) continue;\n Set<JflowModel.Node> states = simplify(cs.getStartState());\n int ctr = 0;\n boolean hasrtn = false;\n for (JflowModel.Node st1 : states) {\n\t if (st1.getEvent() != null) event_calls.add(bm);\n\t else if (st1.getFieldSet() != null) event_calls.add(bm);\n\t if (!hasrtn && st1.getReturnValue() != null) hasrtn = true;\n\t JflowMethod cm = st1.getCall();\n\t if (cm != null) {\n\t if (event_calls.contains(cm)) event_calls.add(bm);\n\t else {\n\t ++ctr;\n\t ModelMethod ncs = complete_calls.get(cm);\n\t if (ncs != null) ncs.addUser(bm);\n\t else System.err.println(\"Call to \" + cm.getMethodName() + \" not found\");\n\t }\n\t }\n }\n return_set.put(bm,Boolean.valueOf(hasrtn));\n\n if (model_master.doDebug()) {\n\t System.err.println(\"First pass method \" + bm.getMethodName() + \" \" +\n\t\t\t bm.getMethodSignature() + \" \" + ctr + \" \" +\n\t\t\t states.size() + \" \" + event_calls.contains(bm));\n }\n if (ctr == 0) {\n\t if (!event_calls.contains(bm)) empty_calls.add(bm);\n }\n else {\n\t workq.add(bm);\n }\n }\n if (model_master.doDebug()) System.err.println(\"Work queue size = \" + workq.size());\n if (event_calls.size() == 0) return false;\n\n Set<JflowMethod> returnused = null;\n boolean chng = true;\n while (chng) {\n chng = false;\n returnused = new HashSet<JflowMethod>();\n while (!workq.isEmpty()) {\n\t Iterator<JflowMethod> it = workq.iterator();\n\t if (!it.hasNext()) break;\n\t JflowMethod bm = it.next();\n\t it.remove();\n\t ModelMethod cs = complete_calls.get(bm);\n\t boolean chkit = !event_calls.contains(bm);\n\n\t if (cs == null || empty_calls.contains(bm)) continue;\n\n\t int ctr = 0;\n\t Set<JflowModel.Node> states = simplify(cs.getStartState());\n\t boolean mchng = false;\n\t boolean hasrtn = false;\n\t for (JflowModel.Node st1 : states) {\n\t if (!hasrtn && st1.getReturnValue() != null) hasrtn = true;\n\t JflowMethod cm = st1.getCall();\n\t if (cm != null) {\n\t if (st1.getUseReturn()) returnused.add(cm);\n\t if (!event_calls.contains(cm)) {\n\t\t ++ctr;\n\t\t}\n\t else if (chkit) {\n\t\t if (model_master.doDebug()) {\n\t\t System.err.println(\"Method required: \" + bm.getMethodName() + \" \" +\n\t\t\t\t\t bm.getMethodSignature() + \" :: \" + cm.getMethodName() +\n\t\t\t\t\t \" \" + cm.getMethodSignature());\n\t\t }\n\t\t event_calls.add(bm);\n\t\t chkit = false;\n\t\t mchng = true;\n\t\t}\n\t }\n\t }\n\n\t if (return_set.get(bm) != Boolean.FALSE) {\n\t return_set.put(bm,Boolean.valueOf(hasrtn));\n\t if (!hasrtn) mchng = true;\n\t }\n\n\t if (ctr == 0 && !event_calls.contains(bm)) {\n\t empty_calls.add(bm);\n\t mchng = true;\n\t }\n\n\t if (model_master.doDebug()) System.err.println(\"Consider method \" + bm.getMethodName() + \" \" + bm.getMethodSignature() + \" \" + ctr + \" \" + states.size() + \" \" + mchng);\n\n\t if (mchng) {\n\t for (Iterator<?> it1 = cs.getUsers(); it1.hasNext(); ) {\n\t JflowMethod cm = (JflowMethod) it1.next();\n\t if (model_master.doDebug()) System.err.println(\"\\tQueue \" + cm.getMethodName() + \" \" + cm.getMethodSignature());\n\t workq.add(cm);\n\t }\n\t }\n }\n\n for (Map.Entry<JflowMethod,ModelMethod> ent : complete_calls.entrySet()) {\n\t JflowMethod bm = ent.getKey();\n\t ModelMethod cs = ent.getValue();\n\t if (cs != null && !empty_calls.contains(bm) && !event_calls.contains(bm)) {\n\t empty_calls.add(bm);\n\t chng = true;\n\t for (Iterator<JflowMethod> it1 = cs.getUsers(); it1.hasNext(); ) {\n\t JflowMethod cm = it1.next();\n\t if (model_master.doDebug()) System.err.println(\"\\tQueue \" + cm.getMethodName() + \" \" + cm.getMethodSignature());\n\t workq.add(cm);\n\t }\n\t }\n }\n }\n\n for (JflowMethod cm : empty_calls) {\n complete_calls.remove(cm);\n }\n\n chng = true;\n boolean needsync = true;\n while (chng) {\n chng = false;\n boolean nextsync = false;\n for (ModelMethod em : complete_calls.values()) {\n\t Set<JflowModel.Node> sts = simplify(em.getStartState());\n\t if (!needsync) {\n\t for (JflowModel.Node nms : sts) {\n\t ModelState ms = (ModelState) nms;\n\t if (ms.getWaitType() != ModelWaitType.NONE) {\n\t\t ms.clearCall();\n\t\t chng = true;\n\t\t}\n\t }\n\t }\n\t else if (!nextsync) {\n\t for (JflowModel.Node ms : sts) {\n\t if (ms.getCall() != null && ms.isAsync()) nextsync = true;\n\t }\n\t }\n\t if (return_set.get(em.getMethod()) != Boolean.FALSE && returnused != null && \n\t\t!returnused.contains(em.getMethod())) {\n\t for (JflowModel.Node nms : sts) {\n\t ModelState ms = (ModelState) nms;\n\t if (ms.getReturnValue() != null) {\n\t\t ms.clearCall();\n\t\t chng = true;\n\t\t}\n\t }\n\t return_set.put(em.getMethod(),Boolean.FALSE);\n\t }\n }\n if (nextsync != needsync) chng = true;\n needsync = nextsync;\n }\n\n for (ModelMethod em : complete_calls.values()) {\n ModelMinimizer.minimize(model_master,em.getStartState());\n }\n\n ModelSynch msynch = new ModelSynch(complete_calls.values());\n msynch.establishPartitions();\n\n if (model_master.doDebug()) {\n IvyXmlWriter nxw = new IvyXmlWriter(new OutputStreamWriter(System.err));\n nxw.begin(\"DEBUG\");\n outputEvents(nxw);\n outputProgram(nxw);\n nxw.end();\n nxw.flush();\n }\n\n boolean retfg = true;\n\n Collection<JflowEvent> c = model_master.getRequiredEvents();\n if (c != null && !c.isEmpty()) {\n Set<JflowEvent> evts = new HashSet<JflowEvent>();\n for (ModelMethod cs : complete_calls.values()) {\n\t Set<JflowModel.Node> states = simplify(cs.getStartState());\n\t for (JflowModel.Node ms : states) {\n\t JflowEvent ev = ms.getEvent();\n\t if (ev != null) evts.add(ev);\n\t }\n }\n for (JflowEvent ev : c) {\n\t if (!evts.contains(ev)) {\n\t System.err.println(\"JFLOW: Required event \" + ev + \" not found\");\n\t retfg = false;\n\t break;\n\t }\n }\n }\n\n empty_calls = null;\n event_calls = null;\n methods_todo = null;\n return_set = null;\n\n return retfg;\n}", "public static HashSet<Transition> makeTransitions(Set<Operation> ops, State tail){\n HashSet<Transition> set = new HashSet<Transition>();\n// 调用enabledOperations方法\n Set<Operation> op = enabledOperations(ops , tail);\n// 遍历op\n for(Operation o : op){\n State s = o.execute(tail);\n Transition t = new Transition(o.name , tail , s , 1);\n set.add(t);\n }\n return set ;\n\n\n\n // throw new NotImplementedException();\n }", "@Override\n public Petrinet compose(String id, Set<String> flags, Context context, Petrinet... petrinets) throws CompilationException {\n\n Petrinet x = petrinets[0].reId(\"G\");\n MultiProcessModel model = buildmpmFromPetri(x);\n Map<Multiset<PetriNetPlace>, AutomatonNode> markingToNode = model.getProcessNodesMapping().getMarkingToNode();\n //Map<AutomatonNode, Multiset<PetriNetPlace> > nodeToMarking = model.getProcessNodesMapping().getNodeToMarking();\n\n return composeM(id,flags,context,markingToNode,x);\n }", "private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }", "abstract protected Set<Method> createMethods();", "public ControlFlow build(final PsiElementVisitor visitor, final PsiElement element) {\n startNode(null);\n\n element.acceptChildren(visitor);\n\n // create end pseudo node and close all pending edges\n checkPending(startNode(null));\n\n final List<Instruction> result = instructions;\n return new ControlFlowImpl(result.toArray(new Instruction[result.size()]));\n }", "public void load_cntl_code_1() {\n\n control_memory[0] = new Fetch0();\n control_memory[1] = new Fetch1();\n control_memory[2] = new Fetch2();\n control_memory[5] = new NOP();\n control_memory[10] = new LOADI0();\n\n control_memory[15] = new RSTART(\"ADD\", false);\n control_memory[16] = new ADD(\"ADD\", false);\n control_memory[17] = new RFINISH(\"ADD\");\n\n control_memory[20] = new RSTART(\"SUB\", false);\n control_memory[21] = new SUB(\"SUB\", false);\n control_memory[22] = new RFINISH(\"SUB\");\n\n control_memory[25] = new RSTART(\"ADDS\", false);\n control_memory[26] = new ADD(\"ADDS\", true);\n control_memory[27] = new RFINISH(\"ADDS\");\n\n control_memory[30] = new RSTART(\"SUBS\", false);\n control_memory[31] = new SUB(\"SUBS\", true);\n control_memory[32] = new RFINISH(\"SUBS\");\n\n control_memory[35] = new RSTART(\"AND\", false);\n control_memory[36] = new AND(\"AND\");\n control_memory[37] = new RFINISH(\"AND\");\n\n control_memory[40] = new RSTART(\"ORR\", false);\n control_memory[41] = new ORR(\"ORR\");\n control_memory[42] = new RFINISH(\"ORR\");\n\n control_memory[45] = new RSTART(\"EOR\", false);\n control_memory[46] = new EOR(\"EOR\");\n control_memory[47] = new RFINISH(\"EOR\");\n\n control_memory[50] = new LSL0();\n control_memory[51] = new LSL1();\n control_memory[52] = new RFINISH(\"LSR\");\n\n control_memory[55] = new LSR0();\n control_memory[56] = new LSR1();\n control_memory[57] = new RFINISH(\"LSR\");\n\n control_memory[60] = new BR0();\n control_memory[61] = new BR1();\n\n control_memory[65] = new RSTART(\"ADDI\", true);\n control_memory[66] = new ADD(\"ADDI\", false);\n control_memory[67] = new RFINISH(\"ADDI\");\n\n control_memory[70] = new RSTART(\"SUBI\", true);\n control_memory[71] = new SUB(\"SUBI\", false);\n control_memory[72] = new RFINISH(\"SUBI\");\n\n control_memory[75] = new RSTART(\"ADDIS\", true);\n control_memory[76] = new ADD(\"ADDIS\", true);\n control_memory[77] = new RFINISH(\"ADDIS\");\n\n control_memory[80] = new RSTART(\"SUBIS\", true);\n control_memory[81] = new SUB(\"SUBIS\", true);\n control_memory[82] = new RFINISH(\"SUBIS\");\n\n control_memory[85] = new RSTART(\"ANDI\", true);\n control_memory[86] = new AND(\"ANDI\");\n control_memory[87] = new RFINISH(\"ANDI\");\n\n control_memory[90] = new RSTART(\"ORRI\", true);\n control_memory[91] = new ORR(\"ORRI\");\n control_memory[92] = new RFINISH(\"ORRI\");\n\n control_memory[95] = new RSTART(\"EORI\", true);\n control_memory[96] = new EOR(\"EORI\");\n control_memory[97] = new RFINISH(\"EORI\");\n\n control_memory[100] = new LDUR0();\n control_memory[101] = new LDUR1();\n control_memory[102] = new LDUR2();\n control_memory[103] = new LDUR3();\n control_memory[104] = new LDUR4();\n\n control_memory[105] = new STUR0();\n control_memory[106] = new STUR1();\n control_memory[107] = new STUR2();\n control_memory[108] = new STUR3();\n control_memory[109] = new STUR4();\n\n control_memory[140] = new CBSTART(\"CBZ\");\n control_memory[141] = new CBZ();\n control_memory[142] = new CBFINISH(\"CBZ\");\n\n control_memory[145] = new CBSTART(\"CBNZ\");\n control_memory[146] = new CBNZ();\n control_memory[147] = new CBFINISH(\"CBNZ\");\n\n control_memory[155] = new BCONDSTART(\"BEQ\");\n control_memory[156] = new BEQ();\n control_memory[157] = new BCONDFINISH(\"BEQ\");\n\n control_memory[160] = new BCONDSTART(\"BNE\");\n control_memory[161] = new BNE();\n control_memory[162] = new BCONDFINISH(\"BNE\");\n\n control_memory[165] = new BCONDSTART(\"BLT\");\n control_memory[166] = new BLT();\n control_memory[167] = new BCONDFINISH(\"BLT\");\n\n control_memory[170] = new BCONDSTART(\"BLE\");\n control_memory[171] = new BLE();\n control_memory[172] = new BCONDFINISH(\"BLE\");\n\n control_memory[175] = new BCONDSTART(\"BGT\");\n control_memory[176] = new BGT();\n control_memory[177] = new BCONDFINISH(\"BGT\");\n\n control_memory[180] = new BCONDSTART(\"BGE\");\n control_memory[181] = new BGE();\n control_memory[182] = new BCONDFINISH(\"BGE\");\n\n control_memory[185] = new B0();\n control_memory[186] = new B1();\n control_memory[187] = new B2();\n\n\n }", "public static void generateCode()\n {\n \n }", "private int binaryExecute(int i) {\r\n\t\tif(!(compiler.getInstructionField().containsKey(sim40.memory[i+1]) && compiler.getInstructionField().get(sim40.memory[i+1]).equals(\"insert\")))\r\n\t\t\tthis.errorStream.getErrors().add(new OutputError(this.sim40.lines[sim40.memory[i+1]],\"Must have a matching 'insert' instruction\"));\r\n\r\n\t\telse {\t\t\r\n\t\t\tswitch(sim40.memory[i]) {\r\n\r\n\t\t\t/* insert is 10 but is already performed during compilation */\r\n\r\n\t\t\t/* Binary Instructions */\t\r\n\t\t\tcase 11: /* load */\r\n\t\t\t\tsim40.memory[Simulator.ACCUMULATOR_ADDRESS] = sim40.memory[sim40.memory[++i]];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 12: /* xload */\r\n\t\t\t\tsim40.memory[Simulator.XREG_ADDRESS] = sim40.memory[sim40.memory[++i]];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 13: /* yload */\r\n\t\t\t\tsim40.memory[Simulator.YREG_ADDRESS] = sim40.memory[sim40.memory[++i]]; \r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 14: /* add */\r\n\t\t\t\tsim40.memory[Simulator.ACCUMULATOR_ADDRESS] += sim40.memory[sim40.memory[++i]];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 15: /* sub */\r\n\t\t\t\tsim40.memory[Simulator.ACCUMULATOR_ADDRESS] -= sim40.memory[sim40.memory[++i]];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 16: /* and */\r\n\t\t\t\tsim40.memory[Simulator.ACCUMULATOR_ADDRESS] &= sim40.memory[sim40.memory[++i]];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 17: /* or */\r\n\t\t\t\tsim40.memory[Simulator.ACCUMULATOR_ADDRESS] |= sim40.memory[sim40.memory[++i]];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 18: /* xor */\r\n\t\t\t\tsim40.memory[Simulator.ACCUMULATOR_ADDRESS] ^= sim40.memory[sim40.memory[++i]];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\treturn ++i;\r\n\t}", "private static ArrayList<String> preCompile(ArrayList<CommandNode> cmdNode, ArrayList<MemoryNode> memNode) {\n\t\tfor(int b=0;b<cmdNode.size();b++)\n\t\t\tpreCompileNode(cmdNode.get(b), cmdNode, memNode, b);\n\t\tfor(int b=0;b<memNode.size();b++)\n\t\t\tpreCompileNode(memNode.get(b), cmdNode, memNode, b);\t\t\n\t\treturn preCompileAfter(cmdNode, memNode);\n\t}", "public CodeFormatter(String[] instructionsToTest) {\n this.formattedCode = new ArrayList<>(Arrays.asList(instructionsToTest));\n formatCode();\n }", "public void addInstruction(){\n\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tinstructionEClass = createEClass(INSTRUCTION);\n\n\t\tnamedElementEClass = createEClass(NAMED_ELEMENT);\n\t\tcreateEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);\n\n\t\tgoForwardEClass = createEClass(GO_FORWARD);\n\t\tcreateEAttribute(goForwardEClass, GO_FORWARD__CM);\n\t\tcreateEAttribute(goForwardEClass, GO_FORWARD__INFINITE);\n\n\t\tgoBackwardEClass = createEClass(GO_BACKWARD);\n\t\tcreateEAttribute(goBackwardEClass, GO_BACKWARD__CM);\n\t\tcreateEAttribute(goBackwardEClass, GO_BACKWARD__INFINITE);\n\n\t\tbeginEClass = createEClass(BEGIN);\n\n\t\trotateEClass = createEClass(ROTATE);\n\t\tcreateEAttribute(rotateEClass, ROTATE__DEGREES);\n\t\tcreateEAttribute(rotateEClass, ROTATE__RANDOM);\n\n\t\treleaseEClass = createEClass(RELEASE);\n\n\t\tactionEClass = createEClass(ACTION);\n\n\t\tblockEClass = createEClass(BLOCK);\n\n\t\tendEClass = createEClass(END);\n\n\t\tchoreographyEClass = createEClass(CHOREOGRAPHY);\n\t\tcreateEReference(choreographyEClass, CHOREOGRAPHY__INSTRUCTIONS);\n\t\tcreateEReference(choreographyEClass, CHOREOGRAPHY__EDGE_INSTRUCTIONS);\n\n\t\tedgeInstructionEClass = createEClass(EDGE_INSTRUCTION);\n\t\tcreateEReference(edgeInstructionEClass, EDGE_INSTRUCTION__SOURCE);\n\t\tcreateEReference(edgeInstructionEClass, EDGE_INSTRUCTION__TARGET);\n\n\t\tgrabEClass = createEClass(GRAB);\n\t}", "public void generateCode() {\n\t\tfor (int i = 0; i < AsmGen.codes.size(); i++) generateFunctionASMCode(AsmGen.codes.get(i));\n\t\tgenerateMMIXMainBootstrap();\n\t\tfile.printf(\"\\n\");\n\t}", "public void insertInstructions(int start, int oldLength,\n\t\t\tCollection newInstructions) throws CodeCheckException {\n\t\tint at;\n\t\tint oldPostEnd;\n\t\tint newCount = newInstructions.size();\n\n\t\tif (start == 0)\n\t\t\tat = 0;\n\t\telse {\n\t\t\tInstruction endInstruction = instructions\n\t\t\t\t\t.get(instructions.size() - 1);\n\t\t\tif (start == endInstruction.instructionStart\n\t\t\t\t\t+ endInstruction.getLength())\n\t\t\t\tat = instructions.size();\n\t\t\telse\n\t\t\t\tat = indexAtOffset(new InstructionPointer(start));\n\t\t}\n\n\t\tif (at + oldLength > instructions.size())\n\t\t\tthrow new CodeCheckException(\"Bad instruction insertion point\");\n\t\tif (oldLength == 0) {\n\t\t\toldPostEnd = start;\n\t\t} else {\n\t\t\tInstruction lastInstruction = instructions.get(at + oldLength - 1);\n\t\t\toldPostEnd = lastInstruction.instructionStart\n\t\t\t\t\t+ lastInstruction.getLength();\n\t\t}\n\t\tint newPostEnd = start;\n\t\tfor (Iterator i = newInstructions.iterator(); i.hasNext();) {\n\t\t\tInstruction currentInstruction = (Instruction) i.next();\n\t\t\tcurrentInstruction.instructionStart = newPostEnd;\n\t\t\tnewPostEnd += currentInstruction.getLength();\n\t\t}\n\t\t// Replace the instructions\n\t\tfor (int i = 0; i < oldLength; i++)\n\t\t\tinstructions.remove(at);\n\t\tinstructions.addAll(at, newInstructions);\n\n\t\t// Fix instructions for the opcodes\n\t\tfor (ListIterator<Instruction> i = instructions.listIterator(); i\n\t\t\t\t.hasNext();) {\n\t\t\tint index = i.nextIndex();\n\t\t\tInstruction current = i.next();\n\t\t\tif (index >= at + newCount)\n\t\t\t\tcurrent.opCode.fixStartAddress(current, start, oldPostEnd,\n\t\t\t\t\t\tnewPostEnd);\n\t\t\tif (index < at || index >= at + newCount)\n\t\t\t\tcurrent.opCode.fixDestinationAddress(current, start,\n\t\t\t\t\t\toldPostEnd, newPostEnd);\n\t\t}\n\n\t\t// Fix exception ranges\n\t\tfor (Iterator<CodeException> i = exceptions.iterator(); i.hasNext();) {\n\t\t\tCodeException range = i.next();\n\t\t\tif ((range.start > start && range.start < oldPostEnd)\n\t\t\t\t\t|| (range.end > start && range.end < oldPostEnd)\n\t\t\t\t\t|| (range.handler > start && range.handler < oldPostEnd)) {\n\t\t\t\t// You are allowed to remove an entire try/catch block\n\t\t\t\tif ((range.start > start && range.start < oldPostEnd)\n\t\t\t\t\t\t&& (range.end > start && range.end < oldPostEnd)\n\t\t\t\t\t\t&& (range.handler > start && range.handler < oldPostEnd)) {\n\t\t\t\t\ti.remove();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tthrow new CodeCheckException(\n\t\t\t\t\t\t\"Exception range overlaps inserted code\");\n\t\t\t}\n\t\t\tif (range.start >= oldPostEnd)\n\t\t\t\trange.start += newPostEnd - oldPostEnd;\n\t\t\tif (range.end >= oldPostEnd)\n\t\t\t\trange.end += newPostEnd - oldPostEnd;\n\t\t\tif (range.handler >= oldPostEnd)\n\t\t\t\trange.handler += newPostEnd - oldPostEnd;\n\t\t}\n\n\t\t// Fix line number table offsets\n\t\tLineNumberTableAttribute lineTable = getLineNumberAttribute();\n\t\tif (lineTable != null)\n\t\t\tlineTable.fixOffsets(start, oldPostEnd, newPostEnd);\n\n\t\t// Fix local variable table offsets\n\t\tLocalVariableTableAttribute varTable = getLocalVariableTable();\n\t\tif (varTable != null)\n\t\t\tvarTable.fixOffsets(start, oldPostEnd, newPostEnd);\n\n\t\t/*\n\t\t * At this point everything is fixed, with the significant exception of\n\t\t * *Switch instructions. They now may have an incorrect operand length\n\t\t * because the operands are padded to be on a 4-byte boundary. We now\n\t\t * look for a *Switch after the code change. The first one we find, we\n\t\t * tell it to produce an Instruction that contains the operands it would\n\t\t * have if it were correctly padded. Then we call ourselves (tail\n\t\t * recursion, actually) replacing the current, incorrect instruction\n\t\t * with the new, correct one with a different length.\n\t\t * \n\t\t * Note that jump destinations in the code originally inserted does not\n\t\t * have to and must not take this repad step into account.\n\t\t */\n\t\tfor (ListIterator<Instruction> i = instructions.listIterator(); i\n\t\t\t\t.hasNext();) {\n\t\t\tint index = i.nextIndex();\n\t\t\tInstruction current = i.next();\n\t\t\tif (index >= at + newCount) {\n\t\t\t\tInstruction repadded = current.opCode.repadInstruction(current);\n\t\t\t\tif (repadded != null) {\n\t\t\t\t\tArrayList<Instruction> repad_collection = new ArrayList<Instruction>(\n\t\t\t\t\t\t\t1);\n\t\t\t\t\trepad_collection.add(repadded);\n\t\t\t\t\tinsertInstructions(current.instructionStart, 1,\n\t\t\t\t\t\t\trepad_collection);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void generate()\n {\n System.out.println(\"Initial allocated space for Set: Not supported\");\n// System.out.println(\"Initial allocated space for Set: \" + theMap.capacity());\n final long startTime = TimeUtils.nanoTime();\n Mnemonic m = new Mnemonic(123456789L);\n// GridPoint2 gp = new GridPoint2(0, 0);\n for (int x = -width; x < width; x++) {\n for (int y = -height; y < height; y++) {\n// for (int z = -height; z < height; z++) {\n\n// long z = (x & 0xFFFFFFFFL) << 32 | (y & 0xFFFFFFFFL);\n// z = ((z & 0x00000000ffff0000L) << 16) | ((z >>> 16) & 0x00000000ffff0000L) | (z & 0xffff00000000ffffL);\n// z = ((z & 0x0000ff000000ff00L) << 8 ) | ((z >>> 8 ) & 0x0000ff000000ff00L) | (z & 0xff0000ffff0000ffL);\n// z = ((z & 0x00f000f000f000f0L) << 4 ) | ((z >>> 4 ) & 0x00f000f000f000f0L) | (z & 0xf00ff00ff00ff00fL);\n// z = ((z & 0x0c0c0c0c0c0c0c0cL) << 2 ) | ((z >>> 2 ) & 0x0c0c0c0c0c0c0c0cL) | (z & 0xc3c3c3c3c3c3c3c3L);\n// z = ((z & 0x2222222222222222L) << 1 ) | ((z >>> 1 ) & 0x2222222222222222L) | (z & 0x9999999999999999L);\n// theMap.put(z, null); // uses 23312536 bytes of heap\n// long z = szudzik(x, y);\n// theMap.put(z, null); // uses 18331216 bytes of heap?\n// unSzudzik(pair, z);\n// theMap.put(0xC13FA9A902A6328FL * x ^ 0x91E10DA5C79E7B1DL * y, null); // uses 23312576 bytes of heap\n// theMap.put((x & 0xFFFFFFFFL) << 32 | (y & 0xFFFFFFFFL), null); // uses 28555456 bytes of heap\n theMap.add(new Vector2(x - width * 0.5f, y - height * 0.5f)); // crashes out of heap with 720 Vector2\n// gp.set(x, y);\n// theMap.add(gp.hashCode());\n// long r, s;\n// r = (x ^ 0xa0761d65L) * (y ^ 0x8ebc6af1L);\n// s = 0xa0761d65L * (z ^ 0x589965cdL);\n// r -= r >> 32;\n// s -= s >> 32;\n// r = ((r ^ s) + 0xeb44accbL) * 0xeb44acc8L;\n// theMap.add((int)(r - (r >> 32)));\n\n// theMap.add(m.toMnemonic(szudzik(x, y)));\n }\n }\n// }\n// final GridPoint2 gp = new GridPoint2(x, y);\n// final int gpHash = gp.hashCode(); // uses the updated GridPoint2 hashCode(), not the current GDX code\n// theMap.put(gp, gpHash | 0xFF000000); //value doesn't matter; this was supposed to test ObjectMap\n //theMap.put(gp, (53 * 53 + x + 53 * y) | 0xFF000000); //this is what the hashCodes would look like for the current code\n \n //final int gpHash = x * 0xC13F + y * 0x91E1; // updated hashCode()\n //// In the updated hashCode(), numbers are based on the plastic constant, which is\n //// like the golden ratio but with better properties for 2D spaces. These don't need to be prime.\n \n //final int gpHash = 53 * 53 + x + 53 * y; // equivalent to current hashCode()\n long taken = TimeUtils.timeSinceNanos(startTime);\n System.out.println(taken + \"ns taken, about 10 to the \" + Math.log10(taken) + \" power.\");\n// System.out.println(\"Post-assign allocated space for Set: \" + theMap.capacity());\n System.out.println(\"Post-assign allocated space for Set: Not supported\");\n }", "public interface InstructionSet6502 {\n\n\tint INST_ORA_PRE_INDEXED_INDIRECT = 0x01;\n\tint INST_ORA_ZERO_PAGE = 0x05;\n\tint INST_ASL_ZERO_PAGE = 0x06;\n\tint INST_PHP = 0x08;\n\tint INST_ORA_IMMEDIATE = 0x09;\n\tint INST_ASL_ACCUMULATOR = 0x0a;\n\tint INST_ORA_ABSOLUTE = 0x0d;\n\tint INST_BPL = 0x10;\n\tint INST_ORA_POST_INDEXED_INDIRECT = 0x11;\n\tint INST_ORA_ZERO_PAGE_INDEXED = 0x15;\n\tint INST_CLC = 0x18;\n\tint INST_ORA_INDEXED_Y = 0x19;\n\tint INST_ORA_INDEXED_X = 0x1d;\n\tint INST_JSR = 0x20;\n\tint INST_BIT_ZERO_PAGE = 0x24;\n\tint INST_ROL_ZERO_PAGE = 0x26;\n\tint INST_PLP = 0x28;\n\tint INST_ROL_ACCUMULATOR = 0x2a;\n\tint INST_BIT_ABSOLUTE = 0x2c;\n\tint INST_BMI = 0x30;\n\tint INST_SEC = 0x38;\n\tint INST_EOR_PRE_INDEXED_INDIRECT = 0x41;\n\tint INST_EOR_ZERO_PAGE = 0x45;\n\tint INST_PHA = 0X48;\n\tint INST_EOR_IMMEDIATE = 0x49;\n\tint INST_LSR_ACCUMULATOR = 0x4a;\n\tint INST_JMP_ABSOLUTE = 0x4c;\n\tint INST_EOR_ABSOLUTE = 0x4d;\n\tint INST_EOR_POST_INDEXED_INDIRECT = 0x51;\n\tint INST_EOR_INDEXED_Y = 0x59;\n\tint INST_EOR_ZERO_PAGE_INDEXED = 0x55;\n\tint INST_EOR_INDEXED_X = 0x5d;\n\tint INST_RTS = 0x60;\n\tint INST_ADC_PRE_INDEXED_INDIRECT = 0x61;\n\tint INST_ADC_ZERO_PAGE = 0x65;\n\tint INST_ROR_ZERO_PAGE = 0x66;\n\tint INST_PLA = 0x68;\n\tint INST_ADC_IMMEDIATE = 0x69;\n\tint INST_ROR_ACCUMULATOR = 0x6a;\n\tint INST_JMP_INDIRECT = 0x6c;\n\tint INST_ADC_ABSOLUTE = 0x6d;\n\tint INST_ROR_ABSOLUTE = 0x6e;\n\tint INST_ADC_POST_INDEXED_INDIRECT = 0x71;\n\tint INST_ADC_ZERO_PAGE_INDEXED = 0x75;\n\tint INST_ROR_ZERO_PAGE_INDEXED = 0x76;\n\tint INST_SEI = 0x78;\n\tint INST_ADC_INDEXED_Y = 0x79;\n\tint INST_ADC_INDEXED_X = 0x7d;\n\tint INST_ROR_INDEXED_X = 0x7e;\n\tint INST_STA_PRE_INDEXED_INDIRECT = 0x81;\n\tint INST_STY_ZERO_PAGE = 0x84;\n\tint INST_STA_ZERO_PAGE = 0x85;\n\tint INST_STX_ZERO_PAGE = 0x86;\n\tint INST_DEY = 0x88;\n\tint INST_TXA = 0x8a;\n\tint INST_STY_ABSOLUTE = 0x8c;\n\tint INST_STA_ABSOLUTE = 0x8d;\n\tint INST_STX_ABSOLUTE = 0x8e;\n\tint INST_BCC = 0x90;\n\tint INST_STA_POST_INDEXED_INDIRECT = 0x91;\n\tint INST_STY_ZERO_PAGE_INDEXED = 0x94;\n\tint INST_STA_ZERO_PAGE_INDEXED = 0x95;\n\tint INST_TYA = 0x98;\n\tint INST_STA_INDEXED_Y = 0x99;\n\tint INST_TXS_IMPLIED = 0x9a;\n\tint INST_STA_INDEXED_X = 0x9d;\n\tint INST_LDY_IMMEDIATE = 0xa0;\n\tint INST_LDA_PRE_INDEXED_INDIRECT = 0xa1;\n\tint INST_LDX_IMMEDIATE = 0xa2;\n\tint INST_LDY_ZERO_PAGE = 0xa4;\n\tint INST_LDA_ZERO_PAGE = 0xa5;\n\tint INST_LDX_ZERO_PAGE = 0xa6;\n\tint INST_TAY = 0xa8;\n\tint INST_LDA_IMMEDIATE = 0xa9;\n\tint INST_TAX = 0xaa;\n\tint INST_LDY_ABSOLUTE = 0xac;\n\tint INST_LDA_ABSOLUTE = 0xad;\n\tint INST_LDX_ABSOLUTE = 0xae;\n\tint INST_BCS = 0xb0;\n\tint INST_LDA_POST_INDEXED_INDIRECT = 0xb1;\n\tint INST_LDY_ZERO_PAGE_INDEXED = 0xb4;\n\tint INST_LDA_ZERO_PAGE_INDEXED = 0xb5;\n\tint INST_LDX_ZERO_PAGE_INDEXED = 0xb6;\n\tint INST_LDA_INDEXED_Y = 0xb9;\n\tint INST_TSX = 0xba;\n\tint INST_LDY_INDEXED_X = 0xbc;\n\tint INST_LDA_INDEXED_X = 0xbd;\n\tint INST_LDX_INDEXED_Y = 0xbe;\n\tint INST_CPY_IMMEDIATE = 0xc0;\n\tint INST_CMP_PRE_INDEXED_INDIRECT = 0xc1;\n\tint INST_CPY_ZERO_PAGE = 0xc4;\n\tint INST_CMP_ZERO_PAGE = 0xc5;\n\tint INST_INY = 0xc8;\n\tint INST_CMP_IMMEDIATE = 0xc9;\n\tint INST_DEX = 0xca;\n\tint INST_CPY_ABSOLUTE = 0xcc;\n\tint INST_CMP_ABSOLUTE = 0xcd;\n\tint INST_BNE = 0xd0;\n\tint INST_CMP_POST_INDEXED_INDIRECT = 0xd1;\n\tint INST_CMP_ZERO_PAGE_INDEXED = 0xd5;\n\tint INST_CLD = 0xd8;\n\tint INST_CMP_INDEXED_Y = 0xd9;\n\tint INST_CMP_INDEXED_X = 0xdd;\n\tint INST_CPX_IMMEDIATE = 0xe0;\n\tint INST_CPX_ZERO_PAGE = 0xe4;\n\tint INST_INC_ZERO_PAGE = 0xe6;\n\tint INST_INX = 0xe8;\n\tint INST_SBC_IMMEDIATE = 0xe9;\n\tint INST_CPX_ABSOLUTE = 0xec;\n\tint INST_INC_ABSOLUTE = 0xee;\n\tint INST_BEQ = 0xf0;\n\tint INST_INC_ZERO_PAGE_INDEXED = 0xf6;\n\tint INST_SED = 0xf8;\n\tint INST_SBC_INDEXED_Y = 0xf9;\n\tint INST_SBC_INDEXED_X = 0xfd;\n\tint INST_INC_INDEXED = 0xfe;\n\n}", "@Test\n\tpublic void prepSourceFile() throws Exception {\n\t\t\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"source/source.txt\"));\n\t\tfor (int i = 0; i < 125; i++) {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"source/small-source.txt\"));\n\t\t\tfor (int j = 0; j < 80000; j++) {\n\t\t\t\tbw.write(br.readLine() + \"\\n\");\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tbw.close();\n\t}", "public Map<UnitPlus, List<UnitPlus>> createCFG() {\n\t\t// try {\n\t\t// Class<?> classType = Class.forName(classNameString);\n\t\t// methods = classType.getDeclaredMethods();\n\t\t// for (Method method : methods) {\n\t\t// Class<?>[] parameterTypes = method.getParameterTypes();\n\t\t// List<Class<?>> parameterList = new ArrayList<>();\n\t\t// for(Class<?> parameterType:parameterTypes){\n\t\t// parameterList.add(parameterType);\n\t\t// System.out.println(parameterType);\n\t\t// }\n\t\t// SootMethod sootmethod = sootclass.getMethod(method.getName(),\n\t\t// parameterList);\n\t\t// Body body = sootmethod.retrieveActiveBody();\n\t\t// UnitGraph unitGraph = new ExceptionalUnitGraph(body);\n\t\t// methodToUnitGraph.put(methodName, unitGraph);\n\n\t\tList<SootMethod> sootMethods = sootclass.getMethods();\n\t\tfor (SootMethod sootMethod : sootMethods) {\n\t\t\tBody body = sootMethod.retrieveActiveBody();\n\t\t\tUnitGraph unitGraph = new ExceptionalUnitGraph(body);\n\t\t\tList<Type> parameterList = sootMethod.getParameterTypes();\n\t\t\tMethodPlus Method = new MethodPlus(sootMethod.getName(), classNameString,\n\t\t\t\t\tparameterList);\n\t\t\tMethods.add(Method);\n\t\t\tmethodToUnitGraph.put(Method, unitGraph);\n\t\t\tthis.createCFGsForMethod(unitGraph, Method);\n\t\t}\n\n\t\t// }\n\t\t// } catch (ClassNotFoundException e) {\n\t\t// e.printStackTrace();\n\t\t// }\n\t\tthis.createCompleteCFG();\n\t\tthis.combineAllCFGs();\n\n\t\treturn completeCFG;\n\t}", "public interface InstructionCodes {\n\n int NOP = 0;\n int ICONST = 2;\n int FCONST = 3;\n int SCONST = 4;\n int ICONST_0 = 5;\n int ICONST_1 = 6;\n int ICONST_2 = 7;\n int ICONST_3 = 8;\n int ICONST_4 = 9;\n int ICONST_5 = 10;\n int FCONST_0 = 11;\n int FCONST_1 = 12;\n int FCONST_2 = 13;\n int FCONST_3 = 14;\n int FCONST_4 = 15;\n int FCONST_5 = 16;\n int BCONST_0 = 17;\n int BCONST_1 = 18;\n int RCONST_NULL = 19;\n int BICONST = 20;\n int DCONST = 21;\n\n int IMOVE = 22;\n int FMOVE = 23;\n int SMOVE = 24;\n int BMOVE = 25;\n int RMOVE = 26;\n int BIALOAD = 27;\n int IALOAD = 28;\n int FALOAD = 29;\n int SALOAD = 30;\n int BALOAD = 31;\n int RALOAD = 32;\n int JSONALOAD = 33;\n\n int IGLOAD = 34;\n int FGLOAD = 35;\n int SGLOAD = 36;\n int BGLOAD = 37;\n int RGLOAD = 38;\n\n int CHNRECEIVE = 39;\n int CHNSEND = 40;\n\n int MAPLOAD = 41;\n int JSONLOAD = 42;\n\n int COMPENSATE = 43;\n\n int BIASTORE = 44;\n int IASTORE = 45;\n int FASTORE = 46;\n int SASTORE = 47;\n int BASTORE = 48;\n int RASTORE = 49;\n int JSONASTORE = 50;\n\n int BIAND = 51;\n int IAND = 52;\n int BIOR = 53;\n int IOR = 54;\n\n int IGSTORE = 55;\n int FGSTORE = 56;\n int SGSTORE = 57;\n int BGSTORE = 58;\n int RGSTORE = 59;\n\n int IS_LIKE = 60;\n\n int STAMP = 62;\n\n int FREEZE = 63;\n int IS_FROZEN = 64;\n\n int ERROR = 65;\n int PANIC = 66;\n int REASON = 67;\n int DETAIL = 68;\n\n int MAPSTORE = 69;\n int JSONSTORE = 70;\n\n int IADD = 71;\n int FADD = 72;\n int SADD = 73;\n int DADD = 74;\n\n int SCOPE_END = 75;\n int LOOP_COMPENSATE = 76;\n\n int XMLADD = 77;\n int ISUB = 78;\n int FSUB = 79;\n int DSUB = 80;\n int IMUL = 81;\n int FMUL = 82;\n int DMUL = 83;\n int IDIV = 84;\n int FDIV = 85;\n int DDIV = 86;\n int IMOD = 87;\n int FMOD = 88;\n int DMOD = 89;\n int INEG = 90;\n int FNEG = 91;\n int DNEG = 92;\n int BNOT = 93;\n\n int IEQ = 94;\n int FEQ = 95;\n int SEQ = 96;\n int BEQ = 97;\n int DEQ = 98;\n int REQ = 99;\n int REF_EQ = 100;\n\n int INE = 101;\n int FNE = 102;\n int SNE = 103;\n int BNE = 104;\n int DNE = 105;\n int RNE = 106;\n int REF_NEQ = 107;\n\n int IGT = 108;\n int FGT = 109;\n int DGT = 110;\n\n int IGE = 111;\n int FGE = 112;\n int DGE = 113;\n\n int ILT = 114;\n int FLT = 115;\n int DLT = 116;\n\n int ILE = 117;\n int FLE = 118;\n int DLE = 119;\n\n int REQ_NULL = 120;\n int RNE_NULL = 121;\n\n int BR_TRUE = 122;\n int BR_FALSE = 123;\n\n int GOTO = 124;\n int HALT = 125;\n int TR_RETRY = 126;\n int CALL = 127;\n int VCALL = 128;\n int FPCALL = 129;\n int FPLOAD = 130;\n int VFPLOAD = 131;\n\n // Type Conversion related instructions\n int I2F = 132;\n int I2S = 133;\n int I2B = 134;\n int I2D = 135;\n int F2I = 136;\n int F2S = 137;\n int F2B = 138;\n int F2D = 139;\n int S2I = 140;\n int S2F = 141;\n int S2B = 142;\n int S2D = 143;\n int B2I = 144;\n int B2F = 145;\n int B2S = 146;\n int B2D = 147;\n int D2I = 148;\n int D2F = 149;\n int D2S = 150;\n int D2B = 151;\n int DT2JSON = 152;\n int DT2XML = 153;\n int T2MAP = 154;\n int T2JSON = 155;\n int MAP2T = 156;\n int JSON2T = 157;\n int XML2S = 158;\n\n int BILSHIFT = 159;\n int BIRSHIFT = 160;\n int ILSHIFT = 161;\n int IRSHIFT = 162;\n\n // Type cast\n int I2ANY = 163;\n int F2ANY = 164;\n int S2ANY = 165;\n int B2ANY = 166;\n\n int TYPE_ASSERTION = 167;\n\n int ANY2I = 168;\n int ANY2F = 169;\n int ANY2S = 170;\n int ANY2B = 171;\n int ANY2D = 172;\n int ANY2JSON = 173;\n int ANY2XML = 174;\n int ANY2MAP = 175;\n int ANY2STM = 176;\n int ANY2DT = 177;\n int ANY2SCONV = 178;\n int ANY2BI = 179;\n int BI2ANY = 180;\n int ANY2E = 181;\n int ANY2T = 182;\n int ANY2C = 183;\n int CHECKCAST = 184;\n\n int ANY2TYPE = 185;\n\n int LOCK = 186;\n int UNLOCK = 187;\n\n // Transactions\n int TR_BEGIN = 188;\n int TR_END = 189;\n\n int WRKSEND = 190;\n int WRKRECEIVE = 191;\n\n int WORKERSYNCSEND = 192;\n int WAIT = 193;\n\n int MAP2JSON = 194;\n int JSON2MAP = 195;\n\n int IS_ASSIGNABLE = 196;\n int O2JSON = 197;\n\n int ARRAY2JSON = 198;\n int JSON2ARRAY = 199;\n\n int BINEWARRAY = 200;\n int INEWARRAY = 201;\n int FNEWARRAY = 202;\n int SNEWARRAY = 203;\n int BNEWARRAY = 204;\n int RNEWARRAY = 205;\n\n int CLONE = 206;\n\n int FLUSH = 207;\n\n int LENGTHOF = 208;\n int WAITALL = 209;\n\n int NEWSTRUCT = 210;\n int NEWMAP = 212;\n int NEWTABLE = 215;\n int NEWSTREAM = 217;\n \n int CONVERT = 218;\n\n int ITR_NEW = 219;\n int ITR_NEXT = 221;\n int INT_RANGE = 222;\n\n int I2BI = 223;\n int BI2I = 224;\n int BIXOR = 225;\n int IXOR = 226;\n int BACONST = 227;\n int IURSHIFT = 228;\n\n int IRET = 229;\n int FRET = 230;\n int SRET = 231;\n int BRET = 232;\n int DRET = 233;\n int RRET = 234;\n int RET = 235;\n\n int XML2XMLATTRS = 236;\n int XMLATTRS2MAP = 237;\n int XMLATTRLOAD = 238;\n int XMLATTRSTORE = 239;\n int S2QNAME = 240;\n int NEWQNAME = 241;\n int NEWXMLELEMENT = 242;\n int NEWXMLCOMMENT = 243;\n int NEWXMLTEXT = 244;\n int NEWXMLPI = 245;\n int XMLSEQSTORE = 246;\n int XMLSEQLOAD = 247;\n int XMLLOAD = 248;\n int XMLLOADALL = 249;\n int NEWXMLSEQ = 250;\n\n int TYPE_TEST = 251;\n int TYPELOAD = 252;\n\n int TEQ = 253;\n int TNE = 254;\n\n int INSTRUCTION_CODE_COUNT = 255;\n}", "public CheckedInstruction[] codeCheck() throws CodeCheckException {\n\t\tLinkedList next = new LinkedList();\n\t\tCheckedInstruction[] stackArray = new CheckedInstruction[instructions\n\t\t\t\t.size()];\n\n\t\t/*\n\t\t * Initialize next collection with the start point of the method and\n\t\t * with any exception handlers\n\t\t */\n\t\tnext.add(new InstructionPointer(0));\n\t\tstackArray[0] = new CheckedInstruction(instructions.get(0), new Stack());\n\t\tfor (Iterator<CodeException> i = exceptions.iterator(); i.hasNext();) {\n\t\t\tint handler = i.next().handler;\n\t\t\tInstructionPointer ip = new InstructionPointer(handler);\n\t\t\tnext.add(ip);\n\t\t\tint index = indexAtOffset(ip);\n\t\t\tstackArray[index] = new CheckedInstruction(instructions.get(index),\n\t\t\t\t\tnew Stack());\n\t\t\tstackArray[index].stack.push(ProcessStack.CAT1);\n\t\t}\n\t\twhile (!next.isEmpty()) {\n\t\t\tInstructionPointer ip = (InstructionPointer) next.getFirst();\n\t\t\tnext.removeFirst();\n\t\t\ttry {\n\t\t\t\tint index = indexAtOffset(ip);\n\t\t\t\tCheckedInstruction currentCheckedInstruction = stackArray[index];\n\t\t\t\tif (currentCheckedInstruction == null) {\n\t\t\t\t\tthrow new CodeCheckException(\n\t\t\t\t\t\t\t\"Instruction with undefined stack\");\n\t\t\t\t}\n\t\t\t\tStack old_stack = currentCheckedInstruction.stack;\n\t\t\t\tInstruction instruction = currentCheckedInstruction.instruction;\n\t\t\t\tStack new_stack = instruction.opCode.stackUpdate(instruction,\n\t\t\t\t\t\told_stack, this);\n\t\t\t\tArrayList new_pointers = new ArrayList(20);\n\t\t\t\tinstruction.opCode.traverse(instruction, new_pointers, this);\n\t\t\t\tfor (Iterator i = new_pointers.iterator(); i.hasNext();) {\n\t\t\t\t\tip = (InstructionPointer) i.next();\n\t\t\t\t\tindex = indexAtOffset(ip);\n\t\t\t\t\tif (stackArray[index] == null) {\n\t\t\t\t\t\tstackArray[index] = new CheckedInstruction(instructions\n\t\t\t\t\t\t\t\t.get(index), new_stack);\n\t\t\t\t\t\tnext.add(ip);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!new_stack.equals(stackArray[index].stack))\n\t\t\t\t\t\t\tthrow new CodeCheckException(\"Stacks don't match\");\n\t\t\t\t\t}\n\t\t\t\t\tstackArray[index].previousCheckedInstructions\n\t\t\t\t\t\t\t.add(currentCheckedInstruction);\n\t\t\t\t}\n\t\t\t\t// Special processing for jsr opcodes\n\t\t\t\tif (instruction.opCode.getMnemonic().startsWith(\"jsr\")) {\n\t\t\t\t\tip = new InstructionPointer(instruction\n\t\t\t\t\t\t\t.getOffsetDestination());\n\t\t\t\t\tindex = indexAtOffset(ip);\n\t\t\t\t\tif (stackArray[index] == null) {\n\t\t\t\t\t\tnew_stack = (Stack) new_stack.clone();\n\t\t\t\t\t\tnew_stack.push(ProcessStack.CAT1);\n\t\t\t\t\t\tstackArray[index] = new CheckedInstruction(instructions\n\t\t\t\t\t\t\t\t.get(index), new_stack);\n\t\t\t\t\t\tnext.add(ip);\n\t\t\t\t\t}\n\t\t\t\t\tstackArray[index].previousCheckedInstructions\n\t\t\t\t\t\t\t.add(currentCheckedInstruction);\n\t\t\t\t}\n\t\t\t} catch (CodeCheckException cce) {\n\t\t\t\tcce.printStackTrace();\n\t\t\t\tthrow new CodeCheckException(cce.getMessage() + \" at offset \"\n\t\t\t\t\t\t+ ip.currentPos);\n\t\t\t}\n\t\t}\n\t\tint max_stack = 0;\n\t\tfor (int i = 0; i < stackArray.length; i++) {\n\t\t\tif (stackArray[i] == null)\n\t\t\t\tthrow new CodeCheckException(\"Unvisited opcode at offset \"\n\t\t\t\t\t\t+ instructions.get(i).instructionStart);\n\t\t\tint depth = stackArray[i].getStackDepth();\n\t\t\tif (depth > max_stack)\n\t\t\t\tmax_stack = depth;\n\t\t}\n\t\tmaxStack = max_stack;\n\n\t\treturn stackArray;\n\t}", "@Before\n public void createOpCode() {\n opCode = new OpCodeEXA1();\n }", "protected void preassemble(ConstantPool pool)\n {\n // register constants used by the class\n pool.registerConstant(m_clzName);\n if (m_clzSuper != null)\n {\n pool.registerConstant(m_clzSuper);\n }\n\n Enumeration enmr = m_tblInterface.elements();\n while (enmr.hasMoreElements())\n {\n pool.registerConstant((ClassConstant) enmr.nextElement());\n }\n\n // the constant pool doesn't have to register itself\n // m_pool.preassemble(pool);\n\n // register constants used by the fields, methods, and attributes\n StringTable[] atbl = CONTAINED_TABLE;\n for (int i = 0; i < atbl.length; ++i)\n {\n StringTable tbl = atbl[i];\n enmr = tbl.elements();\n while (enmr.hasMoreElements())\n {\n ((VMStructure) enmr.nextElement()).preassemble(pool);\n }\n }\n }", "public void doElimination() {\n IR ir;\n\tIR defCode;\n\tIR useCode;\n int i, j, countOperand;\n JavaVariable v1, v2;\n short shortOpcode;\n short shortOpcode2;\n boolean singleDefCondition;\n BitSet[] reachingDef = cfg.getReachingDef();\n\n Iterator it = cfg.iterator();\n\twhile(it.hasNext()) {\n ir = (IR) it.next();\n //System.out.println(ir);\n countOperand = ir.getNumOfOperands();\n if (ir.hasAttribute(IRAttribute.ELIMINATED)) {\n // Removed code can't remove other code\n continue; \n }\n // eliminate single def. single use. (aload)\n for (i = 0; i < countOperand; i++) {\n if (ir.getNumOfDefs(i) ==1 && ir.getShortOpcode() != OpcodeConst.opc_areturn) { // single def\n defCode = cfg.getIRAtBpc (ir.getDefOfOperand(i, 0));\n if (defCode.hasAttribute(IRAttribute.ELIMINATED)) {\n // Eliminated code can't remove other codes\n continue;\n } \n\t shortOpcode= defCode.getShortOpcode();\n if (shortOpcode == OpcodeConst.opc_aload ||\n (shortOpcode >= OpcodeConst.opc_aload_0 && shortOpcode <= OpcodeConst.opc_aload_3)) {\n singleDefCondition = false;\n for (j = 0; j < defCode.getNumOfUses(0); j++) {\n singleDefCondition = true;\n // if the def is the only def for every the uses it can reach\n useCode = cfg.getIRAtBpc(defCode.getUseOfTarget(0, j));\n if (useCode.getNumOfDefs(defCode.getTarget(0)) != 1) {\n singleDefCondition = false;\n break;\n }\n if (cfg.getIRAtBpc(useCode.getDefOfOperand(defCode.getTarget(0), 0)).compareTo(defCode) != 0) {\n singleDefCondition = false;\n break;\n }\n // For dup\n // The Reaching Def of the operand of the copy and the Reaching Def of the operand of the useCode\n // should be the same.\n int reachToCopyCode, reachToUseCode;\n reachToCopyCode = getUniqueReachOfVariable(reachingDef[defCode.getBpc()], defCode.getOperand(0));\n reachToUseCode = getUniqueReachOfVariable(reachingDef[useCode.getBpc()], defCode.getOperand(0));\n if (reachToCopyCode != reachToUseCode) {\n singleDefCondition = false;\n break;\n }\n }\n if (singleDefCondition == true) {\n for (j = 0; j < defCode.getNumOfUses(0); j++) {\n useCode = cfg.getIRAtBpc(defCode.getUseOfTarget(0, j));\n if (useCode.hasAttribute(IRAttribute.ELIMINATED) \n /*|| defCode.hasAttribute(IRAttribute.ELIMINATED)*/) {\n continue;\n }\n //System.out.println(\"useCode:\" + useCode + \" defCode:\" + defCode);\n //System.out.println(\"Try to change usecode's operand from \" + defCode.getTarget(0) +\n // \" to \" + defCode.getOperand(0));\n useCode.changeOperand(defCode.getTarget(0), defCode.getOperand(0));\n defCode.setAttribute(IRAttribute.ELIMINATED);\n defCode.addDebugInfoString(\"Eliminated by BPC:\" + ir.getBpc());\n }\n }\n }\n }\n }\n\n // elimination of single use. single def. (astore)\n if (ir.getNumOfTargets() == 1) {\n if (ir.getNumOfUses(0) == 1) {\n v1 = ir.getTarget(0);\n useCode = cfg.getIRAtBpc(ir.getUseOfTarget(0, 0));\n if (useCode.hasAttribute(IRAttribute.ELIMINATED)) {\n // Removed code can't remove other code\n continue; \n }\n countOperand = useCode.getNumOfOperands();\n for (i = 0; i < countOperand; i++) {\n v2 = useCode.getOperand(i);\n if ((v1.compareTo(v2) == 0) && (useCode.getNumOfDefs(i) == 1)) {\n\t //shortOpcode=CFG.makeShortVal((byte)0,useCode.getBytecode().getOpcode());\n shortOpcode = useCode.getShortOpcode();\n if (shortOpcode == OpcodeConst.opc_astore\n || (shortOpcode >= OpcodeConst.opc_astore_0 && shortOpcode <= OpcodeConst.opc_astore_3)) {\n //System.out.println(useCode + \" can be absorbed by \" + ir);\n // 1. substitute the target of bytecode for the target of astore.\n ir.changeTarget(0, useCode.getTarget(0));\n // 2. and remove the astore operation\n useCode.setAttribute(IRAttribute.ELIMINATED);\n useCode.addDebugInfoString(\"Eliminated by BPC:\" + ir.getBpc());\n }\n }\n }\n }\n } \n }\n\n }", "void genClassMutants1(ClassDeclarationList cdecls) {\n\n\tfor (int j = 0; j < cdecls.size(); ++j) {\n\t ClassDeclaration cdecl = cdecls.get(j);\n\n\t if (cdecl.getName().equals(MutationSystem.CLASS_NAME)) {\n\t\tString qname = file_env.toQualifiedName(cdecl.getName());\n\t\ttry {\n\t\t mujava.op.util.Mutator mutant_op;\n\n\t\t if (hasOperator(classOp, \"AMC\")) {\n\t\t\tDebug.println(\" Applying AMC ... ... \");\n\t\t\tmutant_op = new AMC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"IOR\")) {\n\t\t\tDebug.println(\" Applying IOR ... ... \");\n\t\t\ttry {\n\t\t\t Class parent_class = Class.forName(qname).getSuperclass();\n\t\t\t if (!(parent_class.getName().equals(\"java.lang.Object\"))) {\n\t\t\t\tString temp_str = parent_class.getName();\n\t\t\t\tString result_str = \"\";\n\n\t\t\t\tfor (int k = 0; k < temp_str.length(); k++) {\n\t\t\t\t char c = temp_str.charAt(k);\n\t\t\t\t if (c == '.') {\n\t\t\t\t\tresult_str = result_str + \"/\";\n\t\t\t\t } else {\n\t\t\t\t\tresult_str = result_str + c;\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\tFile f = new File(MutationSystem.SRC_PATH, result_str + \".java\");\n\t\t\t\tif (f.exists()) {\n\t\t\t\t CompilationUnit[] parent_comp_unit = new CompilationUnit[1];\n\t\t\t\t FileEnvironment[] parent_file_env = new FileEnvironment[1];\n\t\t\t\t this.generateParseTree(f, parent_comp_unit, parent_file_env);\n\t\t\t\t this.initParseTree(parent_comp_unit, parent_file_env);\n\t\t\t\t mutant_op = new IOR(file_env, cdecl, comp_unit);\n\t\t\t\t ((IOR) mutant_op).setParentEnv(parent_file_env[0], parent_comp_unit[0]);\n\t\t\t\t comp_unit.accept(mutant_op);\n\t\t\t\t}\n\t\t\t }\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t System.out\n\t\t\t\t .println(\" Exception at generating IOR mutant. file : AllMutantsGenerator.java \");\n\t\t\t} catch (NullPointerException e1) {\n\t\t\t System.out.print(\" IOP ^^; \");\n\t\t\t}\n\t\t }\n\n\t\t if (hasOperator(classOp, \"ISD\")) {\n\t\t\tDebug.println(\" Applying ISD ... ... \");\n\t\t\tmutant_op = new ISD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"IOP\")) {\n\t\t\tDebug.println(\" Applying IOP ... ... \");\n\t\t\tmutant_op = new IOP(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"IPC\")) {\n\t\t\tDebug.println(\" Applying IPC ... ... \");\n\t\t\tmutant_op = new IPC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PNC\")) {\n\t\t\tDebug.println(\" Applying PNC ... ... \");\n\t\t\tmutant_op = new PNC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PMD\")) {\n\t\t\tDebug.println(\" Applying PMD ... ... \");\n\t\t\t// if(existIHD){\n\t\t\tmutant_op = new PMD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t\t// }\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PPD\")) {\n\t\t\tDebug.println(\" Applying PPD ... ... \");\n\t\t\t// if(existIHD){\n\t\t\tmutant_op = new PPD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t\t// }\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PRV\")) {\n\t\t\tDebug.println(\" Applying PRV ... ... \");\n\t\t\tmutant_op = new PRV(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PCI\")) {\n\t\t\tDebug.println(\" Applying PCI ... ... \");\n\t\t\tmutant_op = new PCI(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PCC\")) {\n\t\t\tDebug.println(\" Applying PCC ... ... \");\n\t\t\tmutant_op = new PCC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PCD\")) {\n\t\t\tDebug.println(\" Applying PCD ... ... \");\n\t\t\tmutant_op = new PCD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JSD\")) {\n\t\t\tDebug.println(\" Applying JSC ... ... \");\n\t\t\tmutant_op = new JSD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JSI\")) {\n\t\t\tDebug.println(\" Applying JSI ... ... \");\n\t\t\tmutant_op = new JSI(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JTD\")) {\n\t\t\tDebug.println(\" Applying JTD ... ... \");\n\t\t\tmutant_op = new JTD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JTI\")) {\n\t\t\tDebug.println(\" Applying JTI ... ... \");\n\t\t\tmutant_op = new JTI(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JID\")) {\n\t\t\tDebug.println(\" Applying JID ... ... \");\n\t\t\tmutant_op = new JID(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"OAN\")) {\n\t\t\tDebug.println(\" Applying OAN ... ... \");\n\t\t\tmutant_op = new OAN(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"EOA\")) {\n\t\t\tDebug.println(\" Applying EOA ... ... \");\n\t\t\tmutant_op = new EOA(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"EOC\")) {\n\t\t\tDebug.println(\" Applying EOC ... ... \");\n\t\t\tmutant_op = new EOC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"EAM\")) {\n\t\t\tDebug.println(\" Applying EAM ... ... \");\n\t\t\tmutant_op = new EAM(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"EMM\")) {\n\t\t\tDebug.println(\" Applying EMM ... ... \");\n\t\t\tmutant_op = new EMM(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t} catch (ParseTreeException e) {\n\t\t System.err.println(\"Encountered errors during generating mutants.\");\n\t\t e.printStackTrace();\n\t\t}\n\t }\n\t}\n }", "private static void preCompileNode(Node n, ArrayList<CommandNode> cmdNode, ArrayList<MemoryNode> memNode, int b) {\n\t\tn.preCompile(cmdNode, memNode, b);\n\t}", "private static void execute1()\n\t{\n\t\tboolean flushRegisterValues = false;\n\t\tboolean branchFUflag = false;\n\t\tExecutionOfOpcode functionUnit = new ExecutionOfOpcode();\n\t\tString controlFlowInstruction = TypesOfOperations.BNZ + \"|\" + TypesOfOperations.BZ + \"|\"\n\t\t\t\t+ TypesOfOperations.JUMP + \"|\" + TypesOfOperations.BAL + \"|\" + TypesOfOperations.HALT;\n\n\t\tif (latches.containsKey(\"D\"))\n\t\t{\n\t\t\tif (!latches.get(\"D\").isNOP())\n\t\t\t{\n\t\t\t\t// Check if the instruction in Decode stage is not Control flow\n\t\t\t\t// instruction\n\t\t\t\tif (!controlFlowInstruction.contains(latches.get(\"D\").getOperation()))\n\t\t\t\t{\n\t\t\t\t\tInstruction instructionEx = latches.get(\"D\");\n\t\t\t\t\t// TODO check the src 1 and src 2 with forwarding registers\n\t\t\t\t\tif ((forwardingReg != null) && (forwardingRegMEMtoEX != null)\n\t\t\t\t\t\t\t&& forwardingReg.getKey().equals(forwardingRegMEMtoEX.getKey()))\n\t\t\t\t\t{\n\t\t\t\t\t\tforwardingRegMEMtoEX.setValue(forwardingReg.getValue());\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((instructionEx.getSrc1() != null)\n\t\t\t\t\t\t\t&& (instructionEx.getSrc1().getKey().equals(forwardingReg.getKey())))\n\t\t\t\t\t\tinstructionEx.setSrc1(forwardingReg.getValue());\n\t\t\t\t\tif ((instructionEx.getSrc2() != null)\n\t\t\t\t\t\t\t&& (instructionEx.getSrc2().getKey().equals(forwardingReg.getKey())))\n\t\t\t\t\t\tinstructionEx.setSrc2(forwardingReg.getValue());\n\t\t\t\t\tif ((instructionEx.getSrc1() != null)\n\t\t\t\t\t\t\t&& (instructionEx.getSrc1().getKey().equals(forwardingRegMEMtoEX.getKey())))\n\t\t\t\t\t{\n\t\t\t\t\t\tinstructionEx.setSrc1(forwardingRegMEMtoEX.getValue());\n\t\t\t\t\t}\n\t\t\t\t\tif ((instructionEx.getSrc2() != null)\n\t\t\t\t\t\t\t&& (instructionEx.getSrc2().getKey().equals(forwardingRegMEMtoEX.getKey())))\n\t\t\t\t\t{\n\n\t\t\t\t\t\tinstructionEx.setSrc2(forwardingRegMEMtoEX.getValue());\n\t\t\t\t\t}\n\n\t\t\t\t\tlatches.put(\"D\", functionUnit.executeInstruction(latches.get(\"D\")));\n\t\t\t\t} else\n\t\t\t\t// Here we have the branch instruction\n\t\t\t\t{\n\t\t\t\t\tbranchFUflag = true;\n\t\t\t\t\tlatches.put(\"E\", stages.get(\"E\"));\n\t\t\t\t\tstages.put(\"E\", new Instruction()); // Add NOP in the ALU1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!branchFUflag)\n\t\t\t{\n\t\t\t\tmoveInstruction(\"E\", \"D\");\n\t\t\t\tif (flushRegisterValues)\n\t\t\t\t\tflushRegister();\n\t\t\t}\n\t\t}\n\t}", "public SmallSet<CFGNode> interceptedAbruptStmts() {\n ASTNode$State state = state();\n try {\n \t\tSmallSet<CFGNode> branches = emptySmallSet();\n \t\tIterator itr = super.interceptedAbruptStmts().iterator();\n \t\twhile (itr.hasNext()) {\n \t\t\tStmt stmt = (Stmt)itr.next();\n \t\t\tif (stmt.isBreakStmt() && potentialTargetOf((BreakStmt)stmt) || \n \t\t\t\tstmt.isContinueStmt() && potentialTargetOf((ContinueStmt)stmt)) {\n \t\t\t\tcontinue;\n \t\t\t} \n \t\t\tbranches = branches.union(stmt);\n \t\t}\n \t\treturn branches;\n \t}\n finally {\n }\n }", "private void compile(SSAProgram prog, SSAMethod m, String name) {\n // beginning of the prologue\n sb.append(name);\n sb.append(\":\\n\");\n sb.append(\" add $sp, $sp, -\");\n sb.append(wordSize);\n sb.append(\"\\n\");\n sb.append(\" sw $fp, ($sp)\\n\");\n sb.append(\" move $fp, $sp\\n\");\n\n // pin registers\n for (SSAStatement s : m.getBody()) {\n if (s.getOp() == SSAStatement.Op.Parameter) {\n int paramNum = ((Integer) s.getSpecial()).intValue();\n if (paramNum < argRegisters.length)\n s.pinRegister(argFreeRegisters[paramNum]);\n }\n\n if (s.getOp() == SSAStatement.Op.Arg) {\n int argNum = ((Integer) s.getSpecial()).intValue();\n if (argNum < argRegisters.length)\n s.pinRegister(argFreeRegisters[argNum]);\n else\n s.pinRegister(-1); // pin to -1 to do this at Call time\n }\n }\n\n // FILLIN: perform register allocation\n RegisterAllocator.alloc(m, freeRegisters.length);\n int totalSpace = 0;\n // FILLIN: figure out how much space we need to reserve for spills\n int spillSpace = 0;\n spillSpace += findMax(m.getBody());\n spills = spillSpace;\n // FILLIN: and perhaps any other space we need to reserve (saved registers?)\n \n // Add space for v0 and v1 if not already\n List<Integer> cesaved = new ArrayList<Integer>();\n \n sortOnInsert(crsaved, callerSavedRegisters[0]);\n sortOnInsert(crsaved, callerSavedRegisters[1]);\n sortOnInsert(cesaved, calleeSavedRegisters[9]);\n \n int extraArgs = 0;\n for(SSAStatement s : m.getBody()) {\n if(s.getRegister() < 0) {\n extraArgs++;\n continue;\n }\n if(!crsaved.contains(freeReg(s)) && (Arrays.binarySearch(callerSavedRegisters, freeReg(s)) > -1)){\n sortOnInsert(crsaved, freeReg(s));\n } else if (!cesaved.contains(freeReg(s)) && Arrays.binarySearch(calleeSavedRegisters, freeReg(s)) > -1){\n sortOnInsert(cesaved, freeReg(s));\n }\n }\n \n // FILLIN: reserve space\n totalSpace+= crsaved.size() + spillSpace; \n sb.append(\" add $sp, $sp, -\");\n sb.append(wordSize*(totalSpace));\n sb.append(\"\\n\");\n // reserve $ra space\n\n StringBuilder cestores = new StringBuilder();\n StringBuilder celoads = new StringBuilder();\n for(int i = 0; i < cesaved.size(); i++) {\n int reg = cesaved.get(i);\n cestores.append(\" add $sp, $sp, -\" + (wordSize) + \"\\n\");\n cestores.append(\" sw $\");\n cestores.append(registers[reg]);\n cestores.append(\", ($sp)\\n\"); \n reg = cesaved.get(((cesaved).size()-1) - i);\n celoads.append(\" lw $\");\n celoads.append(registers[reg]);\n celoads.append(\", ($sp)\\n\");\n celoads.append(\" add $sp, $sp, \" + (wordSize) + \"\\n\");\n \n }\n\n // FILLIN: save the callee-saved registers, anything else that needs to be callee-saved\n sb.append(cestores);\n if(extraArgs > 0) {\n sb.append(\" add $sp, $sp, -\");\n sb.append(wordSize*(extraArgs));\n sb.append(\"\\n\");\n }\n // now write the code\n for (SSAStatement s : m.getBody()) {\n compile(prog, name, s);\n }\n\n // the epilogue starts here\n sb.append(\" .ret_\");\n sb.append(name);\n sb.append(\":\\n\");\n\n // FILLIN: restore the callee-saved registers (anything else?)\n if(extraArgs > 0) {\n sb.append(\" add $sp, $sp, \");\n sb.append(wordSize*(extraArgs));\n sb.append(\"\\n\");\n } \n sb.append(celoads);\n \n // and the rest of the epilogue\n sb.append(\" move $sp, $fp\\n\");\n sb.append(\" lw $fp, ($sp)\\n\");\n sb.append(\" add $sp, $sp, \");\n sb.append(wordSize);\n sb.append(\"\\n\");\n sb.append(\" j $ra\\n\");\n\n crsaved.clear();\n crstores.setLength(0);\n crloads.setLength(0);\n }", "public List<DexlibAbstractInstruction> instructionsBefore(DexlibAbstractInstruction instruction) {\n int i = instructions.indexOf(instruction);\n if (i == -1) {\n throw new IllegalArgumentException(\"Instruction \" + instruction + \" not part of this body.\");\n }\n\n List<DexlibAbstractInstruction> l = new ArrayList<DexlibAbstractInstruction>();\n l.addAll(instructions.subList(0, i));\n Collections.reverse(l);\n return l;\n }", "public void addToBlock(Instruction instn){\n\t\tinstns.add(instn);\n\t}", "public void executeSTI(){\n\t\tBitString sourceBS = mIR.substring(4, 3);\n\t\tBitString pcOffset = mIR.substring(7, 9);\n\n\t\tBitString wantedAdr = mMemory[mPC.getValue() + pcOffset.getValue2sComp()];\n\t\tmMemory[wantedAdr.getValue()] = mRegisters[sourceBS.getValue()];\n\n\t\t//STI doesn't set CC\n\t}", "public Assembler() {\r\n // Instantiate internals\r\n instructionMap = new HashMap<String, Method>();\r\n instructionSpec = new HashMap<String, Processor>();\r\n codeSectionList = new LinkedList<Section>();\r\n // Regular expressions\r\n patternInstruction = Pattern.compile(\"\\\\s*(?:(\\\\w+):)?\\\\s*(?:(\\\\w+)(?:\\\\s+(.*))?)?\");\r\n patternSection = Pattern.compile(\"\\\\s*SECTION\\\\s+(\\\\.\\\\w+)\\\\s*\", Pattern.CASE_INSENSITIVE);\r\n patternOpBoolean = Pattern.compile(\"\\\\$true|\\\\$false\", Pattern.CASE_INSENSITIVE);\r\n patternOpString = Pattern.compile(\"\\\"[^\\\"]*\\\"\");\r\n patternOpLabel = Pattern.compile(\"[a-zA-Z_]\\\\w*\");\r\n // Instantiate the code emitter\r\n codeEmitter = new AssemblerIREmitter();\r\n // Populate instruction processors\r\n populateProcessors();\r\n }", "public void execute(){\n\t\tfor(Instruction currentInstn:this.instns){\n\t\t\tcurrentInstn.execute();\n\t\t}\n\t}", "private void createBranchReg(Code32 code, int op, int cond, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rm << 0);\r\n\t\tcode.incInstructionNum();\r\n\t}", "private void loadInstructions(int count, byte... codes) {\r\n\t\tint instructionLocation = instructionBase;\r\n\t\tfor (int i = 0; i < count; i++) {\r\n\t\t\tfor (byte code : codes) {\r\n\t\t\t\tcpuBuss.write(instructionLocation++, code);\r\n\t\t\t} // for codes\r\n\t\t} // for\r\n\t\twrs.setProgramCounter(instructionBase);\r\n\t}", "private static BitSet makeBitSet( int... args ) {\n\tBitSet result = new BitSet( MAX_OPCODE + 1 ) ;\n\tfor (int value : args )\n\t result.set( value ) ;\n\treturn result ;\n }", "public Minimizer(Set<Integer> mintermSet, Set<Integer> dontCareSet, List<String> variables) {\n\t\tif (!checkNonOverlapping(mintermSet, dontCareSet)) {\n\t\t\tthrow new IllegalArgumentException(\"Error: set of minterms and don't cares is not disjunct.\");\n\t\t}\n\t\tif (!checkIllegallIndexes(mintermSet, dontCareSet, variables.size())) {\n\t\t\tthrow new IllegalArgumentException(\"There are more than allowed variables.\");\n\t\t}\n\n\t\tthis.mintermSet = mintermSet;\n\t\tthis.dontCareSet = dontCareSet;\n\t\tthis.variables = variables;\n\n\t\tif (mintermSet.size() > 0) {\n\t\t\tSet<Mask> primCover = findPrimaryImplicants();\n\t\t\tminimalForms = chooseMinimalCover(primCover);\n\t\t}\n\n\t}", "public JasminBytecode addAll( List<String> lines ) {\n jasminCode.addAll(lines);\n return this;\n }", "protected abstract void initHardwareInstructions();", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tblockEClass = createEClass(BLOCK);\n\t\tcreateEReference(blockEClass, BLOCK__STMTS);\n\n\t\tstmtEClass = createEClass(STMT);\n\n\t\tarithEClass = createEClass(ARITH);\n\n\t\talVarRefEClass = createEClass(AL_VAR_REF);\n\t\tcreateEAttribute(alVarRefEClass, AL_VAR_REF__NAME);\n\n\t\tarithLitEClass = createEClass(ARITH_LIT);\n\t\tcreateEAttribute(arithLitEClass, ARITH_LIT__VAL);\n\n\t\tarithOpEClass = createEClass(ARITH_OP);\n\t\tcreateEReference(arithOpEClass, ARITH_OP__LHS);\n\t\tcreateEReference(arithOpEClass, ARITH_OP__RHS);\n\n\t\tarithPlusEClass = createEClass(ARITH_PLUS);\n\n\t\tarithMinusEClass = createEClass(ARITH_MINUS);\n\n\t\tprintEClass = createEClass(PRINT);\n\t\tcreateEAttribute(printEClass, PRINT__NAME);\n\n\t\tassignEClass = createEClass(ASSIGN);\n\t\tcreateEAttribute(assignEClass, ASSIGN__NAME);\n\t\tcreateEReference(assignEClass, ASSIGN__VAL);\n\n\t\tifStmtEClass = createEClass(IF_STMT);\n\t\tcreateEReference(ifStmtEClass, IF_STMT__IF_BRANCH);\n\t\tcreateEReference(ifStmtEClass, IF_STMT__ELSE_BRANCH);\n\t\tcreateEReference(ifStmtEClass, IF_STMT__TEST);\n\n\t\trandRangeEClass = createEClass(RAND_RANGE);\n\t\tcreateEAttribute(randRangeEClass, RAND_RANGE__MIN);\n\t\tcreateEAttribute(randRangeEClass, RAND_RANGE__MAX);\n\n\t\tequalityTestEClass = createEClass(EQUALITY_TEST);\n\t\tcreateEReference(equalityTestEClass, EQUALITY_TEST__LHS);\n\t\tcreateEReference(equalityTestEClass, EQUALITY_TEST__RHS);\n\t}", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public static void main(String []args) {\n ConstantNode ten = new ConstantNode(10);\n ExprNode tree = ten.into(20).plus(30);\n// ExprNode exprNode = new AddOperator(\n// new MultiplyOperator(\n// new ConstantNode(10),\n// new ConstantNode(20)),\n// new ConstantNode(30));\n tree.genCode();\n }", "public static void main(String[] args) {\n //Ersetzt jetzt mal unseren Parser, Stell Dir vor\n // das Ding liest das Beispiel da oben ^^.\n final StatementNode[] statementNodes = readStatements();\n \n //Zustände:\n // - FillSymbolTable (was für Symbole [variablen, ...] gibt es)\n // - TypInferenz (Was für Typen haben die Expressions und sind die eingaben semantisch korrekt)\n // - CodeGenerierung oder Ausführung (ersetzen wir mit \"schreibe die Werte aller Variablen nach Ende der Ausführung\")\n \n \n final SymbolTabelle symbolTabelle = new SymbolTabelle();\n //IDEE 2:\n //Ich gebe Statements und Expressions nur eine Methode mit Visitor als Callback\n final StatementVisitorSymbolTabelle statementVisitorSymbolTabelle = new StatementVisitorSymbolTabelle(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorSymbolTabelle);\n }\n \n final StatementVisitorTypInferenz statementVisitorTypInferenz = new StatementVisitorTypInferenz(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorTypInferenz);\n }\n \n PseudoLaufContext laufContext = new PseudoLaufContext();\n final StatementVisitorCodeGen statementVisitorCodeGen = new StatementVisitorCodeGen(laufContext);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorCodeGen);\n }\n \n laufContext.druckeVariablen();\n \n //Zusammenfassung:\n //Reduktion des Problems darauf, den Code nur noch von einem Abhängig zu machen\n //Jetzt nur noch abhängig vom Typ des Statements\n \n \n //Problem hierbei:\n //Ich muss selbst angeben, in welchem Zustand ich bin\n //Code-Duplizierung\n }", "@Test\n public void testSetCodeExamples() {\n logger.info(\"Beginning testSetCodeExamples()...\");\n\n // Create some sets\n Set<Integer> emptySet = new Set<>();\n\n Integer[] first = { 1, 2, 3, 4 };\n Set<Integer> firstSet = new Set<>(first);\n\n Integer[] second = { 3, 4, 5, 6 };\n Set<Integer> secondSet = new Set<>(second);\n\n Integer[] third = { 3, 4 };\n Set<Integer> thirdSet = new Set<>(third);\n\n Integer[] fourth = { 1, 2 };\n Set<Integer> fourthSet = new Set<>(fourth);\n\n Integer[] fifth = { 1, 2, 3, 4, 5, 6 };\n Set<Integer> fifthSet = new Set<>(fifth);\n\n Integer[] sixth = { 1, 2, 5, 6 };\n Set<Integer> sixthSet = new Set<>(sixth);\n\n // Find the logical \"and\" with an empty set\n Set<Integer> set = Set.and(emptySet, firstSet);\n assert set.isEmpty();\n logger.info(\"{} and {} yields {}\", emptySet, firstSet, set);\n\n // Find the logical \"and\" with non-empty sets\n set = Set.and(firstSet, secondSet);\n assert set.equals(thirdSet);\n logger.info(\"{} and {} yields {}\", firstSet, secondSet, set);\n\n // Find the logical \"sans\" (same as \"a and not b\")\n set = Set.sans(firstSet, secondSet);\n assert set.equals(fourthSet);\n logger.info(\"{} sans {} yields {}\", firstSet, secondSet, set);\n\n // Find the logical \"or\" with an empty set\n set = Set.or(emptySet, firstSet);\n assert !set.isEmpty();\n logger.info(\"{} or {} yields {}\", emptySet, firstSet, set);\n\n // Find the logical \"or\" with non-empty sets\n set = Set.or(firstSet, secondSet);\n assert set.equals(fifthSet);\n logger.info(\"{} or {} yields {}\", firstSet, secondSet, set);\n\n // Find the logical \"xor\" (same as \"(a and not b) or (not a and b)\")\n set = Set.xor(firstSet, secondSet);\n assert set.equals(sixthSet);\n logger.info(\"{} xor {} yields {}\", firstSet, secondSet, set);\n\n logger.info(\"Completed testSetCodeExamples().\\n\");\n }", "private void adjustFactory(IFile iFile, ResourceSet resourceSet) {\n\t\tIJavaProject javaProject = JavaCore.create(iFile.getProject());\r\n\t\ttry {\r\n\t\t\tfor (IClasspathEntry cpEntry : javaProject.getRawClasspath()) {\r\n\t\t\t\tif (cpEntry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {\r\n\t\t\t\t\t//to register newly generated code;\r\n\t\t\t\t\tupdateClaspath(new File(iFile.getWorkspace().getRoot().getLocation().toString() + \r\n\t\t\t\t\t\t\tcpEntry.getPath().toString()), \"\", resourceSet);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (JavaModelException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected CodeStub() {\n entry = new Label();\n continuation = new Label();\n }", "@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }", "public void executeAdd(){\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString firstOperand = mIR.substring(7, 3);\n\t\tint sum;\n\t\tif(mIR.substring(10, 1).getValue() == 1){\n\t\t\tint imma5 = mIR.substring(11, 5).getValue2sComp();\n\t\t\tsum = imma5 + mRegisters[firstOperand.getValue()].getValue2sComp();\n\t\t} else {\n\t\t\tBitString secondOperand = mIR.substring(13, 3);\n\t\t\tsum = mRegisters[secondOperand.getValue()].getValue2sComp() + mRegisters[firstOperand.getValue()].getValue2sComp();\n\t\t}\n\n\t\tmRegisters[destBS.getValue()].setValue(sum);\n\n\t\tsetConditionalCode(mRegisters[destBS.getValue()]);\n\n\n\t}", "@Before\n\tpublic void setUp() {\n\t\tthis.opcode = \"101011\"; //sw\n\t\tthis.opcodeArgs = \"00000010010000000000011000\"; //sw R9,24(R0)\n\t\tthis.instr = new InstrucaoSw(opcode + opcodeArgs);\n\t}", "private State createStates( Grammar grammar, Collection<LR1ItemSet> itemSets)\n {\n itemSetMap = new HashMap<State, LR1ItemSet>();\n \n for( LR1ItemSet itemSet: itemSets) \n {\n log.debugf( \"\\n%s\", itemSet);\n itemSet.state = new State();\n itemSet.state.index = counter++;\n itemSetMap.put( itemSet.state, itemSet);\n }\n \n for( LR1ItemSet itemSet: itemSets)\n {\n Set<String> ts = new HashSet<String>();\n Set<String> nts = new HashSet<String>();\n \n List<Action> tshifts = new ArrayList<Action>();\n List<Action> ntshifts = new ArrayList<Action>();\n \n for( LR1Item item: itemSet.items)\n {\n if ( item.complete())\n {\n if ( item.rule == grammar.rules().get( 0))\n {\n if ( item.laList.contains( Grammar.terminus))\n {\n int[] terminal = new int[] { Grammar.terminusChar};\n tshifts.add( new Action( Action.Type.accept, terminal, item));\n }\n }\n else\n {\n for( String la: item.laList)\n {\n int[] terminal = grammar.toTerminal( la);\n tshifts.add( new Action( Action.Type.reduce, terminal, item));\n }\n }\n }\n else\n {\n if ( !grammar.isTerminal( item.symbol()))\n {\n nts.add( item.symbol());\n }\n else\n {\n Set<String> first = item.first( grammar);\n LR1ItemSet successor = itemSet.successors.get( item.symbol());\n if ( successor != null)\n {\n for( String symbol: first)\n {\n if ( ts.add( symbol))\n {\n int[] terminal = grammar.toTerminal( symbol);\n tshifts.add( new Action( Action.Type.tshift, terminal, successor));\n }\n }\n }\n }\n }\n }\n \n for( String symbol: nts)\n {\n LR1ItemSet successor = itemSet.successors.get( symbol);\n if ( successor != null)\n {\n List<Rule> rules = grammar.lhs( symbol);\n for( Rule rule: rules)\n {\n Action action = new Action( Action.Type.ntshift, new int[] { rule.symbol()}, successor);\n ntshifts.add( action);\n }\n }\n }\n \n buildActionTable( grammar, itemSet.state, tshifts, ntshifts);\n }\n \n return itemSets.iterator().next().state;\n }", "private CompilationObject compile(AbstractSyntaxTree ast, String code,\n com.microsoft.z3.Context z3Context,\n BlockingQueue<Object> messageQueue,\n Supplier< Boolean> symb)\n throws CompilationException, InterruptedException, ExecutionException {\n HashMap<String, ProcessNode> processNodeMap = new HashMap<>();\n // HashMap<String, ProcessNode> dependencyMap = new HashMap<>();\n\n //System.out.println(\"\\nCOMPILER \"+ast.myString()+\" symb \"+symb.get()+\"\\n\");\n for (ProcessNode node : ast.getProcesses()) {\n //messageQueue.add(new LogMessage(\"Compile starting \"+node.getIdentifier()+\" s \"+symb.get()));\n //System.out.println(\"**COMPILER** Compiler Start node = \"+ node.myString());\n processNodeMap.put(node.getIdentifier(), (ProcessNode) node.copy());\n // dependencyMap.put(node.getIdentifier(), node);\n }\n\n AbstractSyntaxTree symbAST = ast.copy(); // to be used to build symbolic models\n //??????\n\n //System.out.println(\"symb \"+symb.get());\n if (!symb.get()) {\n ast = processAtomicAST(ast, z3Context, messageQueue);\n } else {\n //expander.expand(ast, messageQueue, z3Context); // use for error detection\n ast = symbAST;\n //ast = expander.expand(ast, messageQueue, z3Context);\n //System.out.println(\" COMPILER Before ReferenceReplacer \"+ast.processes2String());\n //ast = replacer.replaceReferences(ast, messageQueue);\n // If we replace the references then we lose the assignment information\n //System.out.println(\" COMPILER After ReferenceReplacer \"+ast.processes2String());\n\n }\n //\n //\n // ??????\n //store alphabet\n Set<String> alpha = ast.getAlphabet().stream().map(x -> x.getAction()).collect(Collectors.toSet());\n //System.out.println(\"Compiler alph = \"+alpha);\n\n //Having built the final AST now build the processes\n /*System.out.println(\"**COMPILER** Entering interpreter with ast for processes -> Types \"+\n ast.getProcesses().stream().map(x->\"\\n\"+x.getIdentifier()+\"->\"+x.getType())\n .reduce(\"\",(x,y)->x+\" \"+y)); */\n Interpreter.ProcessMapFull pmf = interpreter.interpret(ast,\n messageQueue, z3Context, alpha, symb.get());\n // Optional<Map<String, ProcessModel>> processMap = interpreter.interpret(ast,\n // messageQueue, z3Context, alpha, symb.get());\n\n //System.out.println(\" **COMPILER** before operation evaluation \"+processMap.keySet());\n List<OperationResult> opResults = new ArrayList<>();\n EquationEvaluator.EquationReturn eqResults = new EquationEvaluator.EquationReturn();\n if (pmf.getIsFull()) {\n\n //System.out.println(\" isPresent \"+pmf.getProcessMap().size()+\" \"+ast.getProcesses().size());\n // if (ast.getProcesses().size() <= processMap.get().size()) {\n //System.out.println(\"equal size\"); // not sure why <= and not ==\n opResults = evaluator.evaluateOperations(\n ast.getOperations(), pmf.getProcessMap(),\n interpreter.getpetrinetInterpreter(), code, z3Context, messageQueue, alpha);\n //System.out.println(\" **COMPILER** before equation evaluation \"+processMap.keySet());\n\n // HEAVY LIFTING need thread pool\n this.eqEvaluator = new EquationEvaluator(); // need to reset equationEvaluator else !!!!\n eqResults = eqEvaluator.evaluateEquations(\n pmf.getProcessMap(),\n interpreter.getpetrinetInterpreter(),\n ast.getEquations(), // one entry per equation\n z3Context, messageQueue, alpha);\n }\n\n\n //System.out.println(\"Compiler built pn \"+ pmf.getProcessMap().size());\n return new CompilationObject(pmf.getProcessMap(), opResults, eqResults.getResults());\n }", "private void prepareMethodsToInstrument(\r\n\t\t\tboolean useInlinedVersion,\r\n\t\t\tboolean useCaller, // Compressor.compress\r\n\t\t\tboolean useCallee1, // CodeTable.of\r\n\t\t\tboolean useCallee2, // CodeTable.set\r\n\t\t\tboolean useCallee3, // HashTable.clear\r\n\t\t\tboolean useCallee4, // HashTable.hsize\r\n\t\t\tboolean useCallee5, // HashTable.of_hash\r\n\t\t\tboolean useCallee6, // HashTable.set_hash\r\n\t\t\tboolean useCallee7, // Compressor.clblock\r\n\t\t\tboolean useCallee8, // Compressor.output\r\n\t\t\tboolean useCallee9, // InputBuffer.readByte\r\n\t\t\tboolean useCalleeA, // Compressor.getMaxCode\r\n\t\t\tboolean useCalleeB, // OutputBuffer.writeByte\r\n\t\t\tboolean useCalleeC, // OutputBuffer.writeBytes\r\n\t\t\tString packageName,\r\n\t\t\tList<MethodDescriptor> methodsToInstrument\r\n\t\t) {\r\n\t\tMethodDescriptor caller = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor\", //Compressor is not an inner class! thus, do not try Compress$Compressor!\r\n\t\t\t\t\"public void compress()\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_COUNTED_SEPARATELY\r\n\t\t\t\t); \r\n\t\tcaller.setContext(new UUID(System.currentTimeMillis(),System.currentTimeMillis()));\r\n\t\t\r\n\t\tMethodDescriptor callee1 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".CodeTable\", \r\n\t\t\t\t\"public int of(int i)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee1.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee2 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".CodeTable\", \r\n\t\t\t\t\"public void set(int i, int v)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee2.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee3;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tcallee3 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public void clear()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,//\"size\" always 69001... \r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee3 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public void clear()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,//\"size\" always 69001...\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee3.setContext(caller.getContext());\r\n\r\n\t\tMethodDescriptor callee4;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tcallee4 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public int hsize()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee4 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public int hsize()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee4.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee5;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tlog.error(\"Inlined version of callee6 still with a problematic method name of\");\r\n\t\t\tcallee5 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public int of(int i)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee5 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public int of_hash(int i)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee5.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee6;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tlog.error(\"Inlined version of callee6 still with a problematic method name set\");\r\n\t\t\tcallee6 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public void set(int i, int v)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee6 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public void set_hash(int i, int v)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee6.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee7 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor\", \r\n\t\t\t\t\"public void clBlock()\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_COUNTED_SEPARATELY\r\n\t\t\t\t); //I had an error here\r\n\t\tcallee7.setContext(caller.getContext());\r\n\t\t\r\n\t\tSystem.err.println(\"Callee 8 (Compressor.output) not inlined - may be a scalability issue (see prepareMethodsToInstrument)\");\r\n\t\tMethodDescriptor callee8 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor\", \r\n\t\t\t\t\"public void output(int code)\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee8.setContext(caller.getContext());\r\n\t\t\r\n\t\tSystem.err.println(\"Callee 9 (InputBuffer.readByte) not inlined - may be a scalability issue (see prepareMethodsToInstrument)\");\r\n\t\tMethodDescriptor callee9 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".InputBuffer\",\r\n\t\t\t\t\"public int readByte()\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee9.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\t//called from Compressor.output, implemented in Compressor's superclass (CompBase)\r\n\t\t//does not call other methods\r\n\t\tlog.warn(\"For instrumenting getMaxCode: replaced Compressor with CompBase, but only in prepareMethodsToInstrument\");\r\n\t\tMethodDescriptor calleeA = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".CompBase\",\r\n\t\t\t\t\"public int getMaxCode()\",//TODO inherited but not overwritten method!!!\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcalleeA.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\t//called from Compressor.output\r\n\t\t//does not call other methods\r\n\t\tMethodDescriptor calleeB = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".OutputBuffer\",\r\n\t\t\t\t\"public void writeByte(byte c)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcalleeB.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\t//called from Compressor.output\r\n\t\t//does not call other methods\r\n\t\tMethodDescriptor calleeC = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".OutputBuffer\",\r\n\t\t\t\t\"public void writebytes(byte[] buf, int n)\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcalleeC.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\tif(useCaller){\r\n\t\t\tmethodsToInstrument.add(caller);\r\n\t\t}\r\n\t\tif(useCallee1){\r\n\t\t\tmethodsToInstrument.add(callee1);\r\n\t\t}\r\n\t\tif(useCallee2){\r\n\t\t\tmethodsToInstrument.add(callee2);\r\n\t\t}\r\n\t\tif(useCallee3){\r\n\t\t\tmethodsToInstrument.add(callee3);\r\n\t\t}\r\n\t\tif(useCallee4){\r\n\t\t\tmethodsToInstrument.add(callee4);\r\n\t\t}\r\n\t\tif(useCallee5){\r\n\t\t\tmethodsToInstrument.add(callee5);\r\n\t\t}\r\n\t\tif(useCallee6){\r\n\t\t\tmethodsToInstrument.add(callee6);\r\n\t\t}\r\n\t\tif(useCallee7){\r\n\t\t\tmethodsToInstrument.add(callee7);\r\n\t\t}\r\n\t\tif(useCallee8){\r\n\t\t\tmethodsToInstrument.add(callee8);\r\n\t\t}\r\n\t\tif(useCallee9){\r\n\t\t\tmethodsToInstrument.add(callee9);\r\n\t\t}\r\n\t\tif(useCalleeA){\r\n\t\t\tmethodsToInstrument.add(calleeA);\r\n\t\t}\r\n\t\tif(useCalleeB){\r\n\t\t\tmethodsToInstrument.add(calleeB);\r\n\t\t}\r\n\t\tif(useCalleeC){\r\n\t\t\tmethodsToInstrument.add(calleeC);\r\n\t\t}\r\n\t}", "public static void create(int steps) {\n\t\tlocalPlaces = 40;\n\t\toutPlaces = 3;\n\n\t\t// Initial marking: \n\t\tinitPlaces = new int[] {0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0};\n\t\ttileInitPlaces = 20;\n\n\t\t// Output mapping:\n\t\tint offs = 0;\n\t\ttOutMap = new OutMap[outPlaces];\n\t\ttOutMap[offs++] = new OutMap(-1, 37);\n\t\ttOutMap[offs++] = new OutMap(-1, 35);\n\t\ttOutMap[offs++] = new OutMap(1, 0);\n\n\t\t// Transitions:\n\t\toffs = 0;\n\t\ttransitions = 24; // (12 aligned to 4) x 2 steps\n\t\ttmap = new Transition[transitions];\n\n\t\t// {0xoi, inp-s, outp-s}\n\t\ttmap[offs++] = new Transition(0x22, 4, 1, 41 /* out */ , 40 /* out */ ); // 0: ccw_take_left_fork *choice\n\t\ttmap[offs++] = new Transition(0x22, 4, 12, 9, 5); // 1: take_right_fork *choice\n\t\ttmap[offs++] = new Transition(0x21, 0, 1, 4); // 2: ccw_put_left_fork\n\t\ttmap[offs++] = new Transition(0x21, 10, 11, 3); // 3: put_left_fork\n\n\t\ttmap[offs++] = new Transition(0x31, 7, 10, 2, 8); // 4: start_thinking\n\t\ttmap[offs++] = new Transition(0x13, 9, 6, 8, 7); // 5: start_eating\n\t\ttmap[offs++] = new Transition(0x21, 2, 4, 12); // 6: put_right_fork\n\t\ttmap[offs++] = new Transition(0x31, 13, 20 /* next */ , 18, 14); // 7: cw_start_thinking\n\n\t\ttmap[offs++] = new Transition(0x13, 11, 3, 5, 6); // 8: take_left_fork *choice\n\t\ttmap[offs++] = new Transition(0x13, 11, 16, 17, 19); // 9: cw_take_right_fork *choice\n\t\ttmap[offs++] = new Transition(0x21, 18, 16, 11); // 10: cw_put_right_fork\n\t\ttmap[offs++] = new Transition(0x13, 14, 19, 15, 13); // 11: cw_start_eating\n\n\t\ttmap[offs++] = new Transition(0x22, 24, 21, 15 /* prev */ , 17 /* prev */ ); // 0: ccw_take_left_fork *choice\n\t\ttmap[offs++] = new Transition(0x22, 24, 32, 29, 25); // 1: take_right_fork *choice\n\t\ttmap[offs++] = new Transition(0x21, 20, 21, 24); // 2: ccw_put_left_fork\n\t\ttmap[offs++] = new Transition(0x21, 30, 31, 23); // 3: put_left_fork\n\n\t\ttmap[offs++] = new Transition(0x31, 27, 30, 22, 28); // 4: start_thinking\n\t\ttmap[offs++] = new Transition(0x13, 29, 26, 28, 27); // 5: start_eating\n\t\ttmap[offs++] = new Transition(0x21, 22, 24, 32); // 6: put_right_fork\n\t\ttmap[offs++] = new Transition(0x31, 33, 42 /* out */ , 38, 34); // 7: cw_start_thinking\n\n\t\ttmap[offs++] = new Transition(0x13, 31, 23, 25, 26); // 8: take_left_fork *choice\n\t\ttmap[offs++] = new Transition(0x13, 31, 36, 37, 39); // 9: cw_take_right_fork *choice\n\t\ttmap[offs++] = new Transition(0x21, 38, 36, 31); // 10: cw_put_right_fork\n\t\ttmap[offs++] = new Transition(0x13, 34, 39, 35, 33); // 11: cw_start_eating\n\n\t\tif(PPNDevice.logMessages)\n\t\t\tSystem.out.printf(\"localPlaces: %d\\ntransitions: %d\\n\", localPlaces, transitions);\n\t}", "public static Graph makeMeAGraph(Set<Operation> operations, State init){\n Graph graph = new implementGraph(operations , init) ;\n return graph;\n\n\t //\t throw new NotImplementedException();\n }", "public void generatePopulation() {\n\t\t\n\t\tif (SCType.getScLayers() <= 2)\n\t\t\tLogger.logError(\"To few supply chain layers, minimum of 3 required:\" + SCType.getScLayers());\n\t\t\n\t\tArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class);\t\t\n\t\tfor (CountryAgent country : countryAgents) {\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.PRODUCER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_PRODUCERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.PRODUCER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.INTERNATIONAL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_INTERNATIONALS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.INTERNATIONAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.WHOLESALER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_WHOLESALERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.WHOLESALER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.RETAIL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_RETAILERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.RETAIL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.CONSUMER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_CONSUMERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.CONSUMER);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set possible new suppliers and clients\n\t\tfor (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) {\n\t\t\tagent.setPossibleNewSuppliersAndClients();\n\t\t}\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "public BasicBlock add (Instruction i) {\n list.add(i);\n for(Address a : i.operands) {\n if(a.kind == Address.Kind.CONST && a.type == Type.STRING) {\n strings.put(a.value, nextStringNum++);\n }\n }\n return this;\n }", "Set<? extends IRBasicBlock> getBlocks();", "private SortedSet<NodeStation> generateNodeStations() throws GenerationException {\n // create Set of NodeStations\n SortedSet<NodeStation> nodeStations = new TreeSet<>();\n for (ReferenceStation referenceStation : referenceStations) {\n nodeStationGenerator.referenceStation(referenceStation).generate()\n .ifPresent(nodeStations::add);\n }\n return nodeStations;\n }", "public WorkResult execute() {\n source = new SimpleFileCollection(source.getFiles());\n classpath = new SimpleFileCollection(Lists.newArrayList(classpath));\n\n for (File file : source) {\n if (!file.getName().endsWith(\".java\")) {\n throw new InvalidUserDataException(String.format(\"Cannot compile non-Java source file '%s'.\", file));\n }\n }\n configure(compiler);\n return compiler.execute();\n }", "static Set<Location> generateIrrelevantSet(UnitLocation unitLocation){\n Objects.requireNonNull(unitLocation);\n final SegmentationGraph bsg = generateSegmentationGraph(unitLocation);\n return bsg.irrelevantSet(unitLocation);\n }", "private void generateSteps() {\n for (GlobalState g : this.globalStates) {\n List<String> faults = g.getPendingFaults(); \n if(faults.isEmpty()) {\n // Identifying all available operation transitions (when there \n // are no faults), and adding them as steps\n List<String> gSatisfiableReqs = g.getSatisfiableReqs();\n \n for(Node n : nodes) {\n String nName = n.getName();\n String nState = g.getStateOf(nName);\n List<Transition> nTau = n.getProtocol().getTau().get(nState);\n for(Transition t : nTau) {\n boolean firable = true;\n for(String req : t.getRequirements()) {\n if(!(gSatisfiableReqs.contains(n.getName() + \"/\" + req)))\n firable = false;\n }\n if(firable) {\n // Creating a new mapping for the actual state of n\n Map<String,String> nextMapping = new HashMap();\n nextMapping.putAll(g.getMapping());\n nextMapping.put(nName, t.getTargetState());\n // Searching the ref to the corresponding global \n // state in the list globalStates\n GlobalState next = search(nextMapping);\n // Adding the step to list of steps in g\n g.addStep(new Step(nName,t.getOperation(),next));\n }\n }\n }\n } else {\n // Identifying all settling handlers for handling the faults\n // pending in this global state\n for(Node n: nodes) {\n // Computing the \"targetState\" of the settling handler for n\n String targetState = null;\n \n String nName = n.getName();\n String nState = g.getStateOf(nName);\n Map<String,List<String>> nRho = n.getProtocol().getRho();\n \n List<String> nFaults = new ArrayList();\n for(String req : nRho.get(nState)) {\n if(faults.contains(nName + \"/\" + req)) \n nFaults.add(req);\n }\n\n // TODO : Assuming handlers to be complete \n\n if(nFaults.size() > 0) {\n Map<String,List<String>> nPhi = n.getProtocol().getPhi();\n for(String handlingState : nPhi.get(nState)) {\n // Check if handling state is handling all faults\n boolean handles = true;\n for(String req : nRho.get(handlingState)) {\n if(nFaults.contains(req))\n handles = false;\n }\n\n // TODO : Assuming handlers to be race-free\n\n // Updating targetState (if the handlingState is \n // assuming a bigger set of requirements)\n if(handles) {\n if(targetState == null || nRho.get(handlingState).size() > nRho.get(targetState).size())\n targetState = handlingState;\n }\n }\n // Creating a new mapping for the actual state of n\n Map<String,String> nextMapping = new HashMap();\n nextMapping.putAll(g.getMapping());\n nextMapping.put(nName, targetState);\n // Searching the ref to the corresponding global \n // state in the list globalStates\n GlobalState next = search(nextMapping);\n // Adding the step to list of steps in g\n g.addStep(new Step(nName,next));\n }\n }\n }\n }\n }", "private void createBlockDataTransfer(Code32 code, int opCode, int cond, int Rn, int regList, int W) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | opCode | (Rn << 16) | regList | (W << 21);\r\n\t\tcode.incInstructionNum();\r\n\t}", "private static void initBaseSet() {\r\n KEYS.add(\"0\");\r\n SET.put(\"0\", new Module(new int[]{1, 1, 1, 2, 2, 1, 2, 1, 1}));\r\n KEYS.add(\"1\");\r\n SET.put(\"1\", new Module(new int[]{2, 1, 1, 2, 1, 1, 1, 1, 2}));\r\n KEYS.add(\"2\");\r\n SET.put(\"2\", new Module(new int[]{1, 1, 2, 2, 1, 1, 1, 1, 2}));\r\n KEYS.add(\"3\");\r\n SET.put(\"3\", new Module(new int[]{2, 1, 2, 2, 1, 1, 1, 1, 1}));\r\n KEYS.add(\"4\");\r\n SET.put(\"4\", new Module(new int[]{1, 1, 1, 2, 2, 1, 1, 1, 2}));\r\n KEYS.add(\"5\");\r\n SET.put(\"5\", new Module(new int[]{2, 1, 1, 2, 2, 1, 1, 1, 1}));\r\n KEYS.add(\"6\");\r\n SET.put(\"6\", new Module(new int[]{1, 1, 2, 2, 2, 1, 1, 1, 1}));\r\n KEYS.add(\"7\");\r\n SET.put(\"7\", new Module(new int[]{1, 1, 1, 2, 1, 1, 2, 1, 2}));\r\n KEYS.add(\"8\");\r\n SET.put(\"8\", new Module(new int[]{2, 1, 1, 2, 1, 1, 2, 1, 1}));\r\n KEYS.add(\"9\");\r\n SET.put(\"9\", new Module(new int[]{1, 1, 2, 2, 1, 1, 2, 1, 1}));\r\n KEYS.add(\"A\");\r\n SET.put(\"A\", new Module(new int[]{2, 1, 1, 1, 1, 2, 1, 1, 2}));\r\n KEYS.add(\"B\");\r\n SET.put(\"B\", new Module(new int[]{1, 1, 2, 1, 1, 2, 1, 1, 2}));\r\n KEYS.add(\"C\");\r\n SET.put(\"C\", new Module(new int[]{2, 1, 2, 1, 1, 2, 1, 1, 1}));\r\n KEYS.add(\"D\");\r\n SET.put(\"D\", new Module(new int[]{1, 1, 1, 1, 2, 2, 1, 1, 2}));\r\n KEYS.add(\"E\");\r\n SET.put(\"E\", new Module(new int[]{2, 1, 1, 1, 2, 2, 1, 1, 1}));\r\n KEYS.add(\"F\");\r\n SET.put(\"F\", new Module(new int[]{1, 1, 2, 1, 2, 2, 1, 1, 1}));\r\n KEYS.add(\"G\");\r\n SET.put(\"G\", new Module(new int[]{1, 1, 1, 1, 1, 2, 2, 1, 2}));\r\n KEYS.add(\"H\");\r\n SET.put(\"H\", new Module(new int[]{2, 1, 1, 1, 1, 2, 2, 1, 1}));\r\n KEYS.add(\"I\");\r\n SET.put(\"I\", new Module(new int[]{1, 1, 2, 1, 1, 2, 2, 1, 1}));\r\n KEYS.add(\"J\");\r\n SET.put(\"J\", new Module(new int[]{1, 1, 1, 1, 2, 2, 2, 1, 1}));\r\n KEYS.add(\"K\");\r\n SET.put(\"K\", new Module(new int[]{2, 1, 1, 1, 1, 1, 1, 2, 2}));\r\n KEYS.add(\"L\");\r\n SET.put(\"L\", new Module(new int[]{1, 1, 2, 1, 1, 1, 1, 2, 2}));\r\n KEYS.add(\"M\");\r\n SET.put(\"M\", new Module(new int[]{2, 1, 2, 1, 1, 1, 1, 2, 1}));\r\n KEYS.add(\"N\");\r\n SET.put(\"N\", new Module(new int[]{1, 1, 1, 1, 2, 1, 1, 2, 2}));\r\n KEYS.add(\"O\");\r\n SET.put(\"O\", new Module(new int[]{2, 1, 1, 1, 2, 1, 1, 2, 1}));\r\n KEYS.add(\"P\");\r\n SET.put(\"P\", new Module(new int[]{1, 1, 2, 1, 2, 1, 1, 2, 1}));\r\n KEYS.add(\"Q\");\r\n SET.put(\"Q\", new Module(new int[]{1, 1, 1, 1, 1, 1, 2, 2, 2}));\r\n KEYS.add(\"R\");\r\n SET.put(\"R\", new Module(new int[]{2, 1, 1, 1, 1, 1, 2, 2, 1}));\r\n KEYS.add(\"S\");\r\n SET.put(\"S\", new Module(new int[]{1, 1, 2, 1, 1, 1, 2, 2, 1}));\r\n KEYS.add(\"T\");\r\n SET.put(\"T\", new Module(new int[]{1, 1, 1, 1, 2, 1, 2, 2, 1}));\r\n KEYS.add(\"U\");\r\n SET.put(\"U\", new Module(new int[]{2, 2, 1, 1, 1, 1, 1, 1, 2}));\r\n KEYS.add(\"V\");\r\n SET.put(\"V\", new Module(new int[]{1, 2, 2, 1, 1, 1, 1, 1, 2}));\r\n KEYS.add(\"W\");\r\n SET.put(\"W\", new Module(new int[]{2, 2, 2, 1, 1, 1, 1, 1, 1}));\r\n KEYS.add(\"X\");\r\n SET.put(\"X\", new Module(new int[]{1, 2, 1, 1, 2, 1, 1, 1, 2}));\r\n KEYS.add(\"Y\");\r\n SET.put(\"Y\", new Module(new int[]{2, 2, 1, 1, 2, 1, 1, 1, 1}));\r\n KEYS.add(\"Z\");\r\n SET.put(\"Z\", new Module(new int[]{1, 2, 2, 1, 2, 1, 1, 1, 1}));\r\n KEYS.add(\"-\");\r\n SET.put(\"-\", new Module(new int[]{1, 2, 1, 1, 1, 1, 2, 1, 2}));\r\n KEYS.add(\".\");\r\n SET.put(\".\", new Module(new int[]{2, 2, 1, 1, 1, 1, 2, 1, 1}));\r\n KEYS.add(\" \");\r\n SET.put(\" \", new Module(new int[]{1, 2, 2, 1, 1, 1, 2, 1, 1}));\r\n KEYS.add(\"$\");\r\n SET.put(\"$\", new Module(new int[]{1, 2, 1, 2, 1, 2, 1, 1, 1}));\r\n KEYS.add(\"/\");\r\n SET.put(\"/\", new Module(new int[]{1, 2, 1, 2, 1, 1, 1, 2, 1}));\r\n KEYS.add(\"+\");\r\n SET.put(\"+\", new Module(new int[]{1, 2, 1, 1, 1, 2, 1, 2, 1}));\r\n KEYS.add(\"%\");\r\n SET.put(\"%\", new Module(new int[]{1, 1, 1, 2, 1, 2, 1, 2, 1}));\r\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tontologicalStructureEClass = createEClass(ONTOLOGICAL_STRUCTURE);\n\t\tcreateEReference(ontologicalStructureEClass, ONTOLOGICAL_STRUCTURE__ONTOLOGICAL_CONCEPTS);\n\t\tcreateEReference(ontologicalStructureEClass, ONTOLOGICAL_STRUCTURE__CONDITIONS);\n\t\tcreateEReference(ontologicalStructureEClass, ONTOLOGICAL_STRUCTURE__PROPERTIES);\n\n\t\tontologicalConceptEClass = createEClass(ONTOLOGICAL_CONCEPT);\n\t\tcreateEAttribute(ontologicalConceptEClass, ONTOLOGICAL_CONCEPT__LABEL);\n\t\tcreateEAttribute(ontologicalConceptEClass, ONTOLOGICAL_CONCEPT__URI);\n\n\t\tconditionEClass = createEClass(CONDITION);\n\t\tcreateEAttribute(conditionEClass, CONDITION__LABEL);\n\n\t\tlogicalConditionEClass = createEClass(LOGICAL_CONDITION);\n\n\t\tnaturalLangConditionEClass = createEClass(NATURAL_LANG_CONDITION);\n\t\tcreateEAttribute(naturalLangConditionEClass, NATURAL_LANG_CONDITION__STATEMENT);\n\n\t\tmathConditionEClass = createEClass(MATH_CONDITION);\n\n\t\tnegformulaEClass = createEClass(NEGFORMULA);\n\t\tcreateEReference(negformulaEClass, NEGFORMULA__CONDITION_STATEMENT);\n\n\t\toRformulaEClass = createEClass(ORFORMULA);\n\t\tcreateEReference(oRformulaEClass, ORFORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(oRformulaEClass, ORFORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tanDformulaEClass = createEClass(AN_DFORMULA);\n\t\tcreateEReference(anDformulaEClass, AN_DFORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(anDformulaEClass, AN_DFORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tequalFormulaEClass = createEClass(EQUAL_FORMULA);\n\t\tcreateEReference(equalFormulaEClass, EQUAL_FORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(equalFormulaEClass, EQUAL_FORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tmoreEqformulaEClass = createEClass(MORE_EQFORMULA);\n\t\tcreateEReference(moreEqformulaEClass, MORE_EQFORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(moreEqformulaEClass, MORE_EQFORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tlessformulaEClass = createEClass(LESSFORMULA);\n\t\tcreateEReference(lessformulaEClass, LESSFORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(lessformulaEClass, LESSFORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tpropertyEClass = createEClass(PROPERTY);\n\t\tcreateEAttribute(propertyEClass, PROPERTY__LABEL);\n\n\t\tnumberPropertyEClass = createEClass(NUMBER_PROPERTY);\n\t\tcreateEAttribute(numberPropertyEClass, NUMBER_PROPERTY__VALUE);\n\n\t\tbooleanPropertyEClass = createEClass(BOOLEAN_PROPERTY);\n\t\tcreateEAttribute(booleanPropertyEClass, BOOLEAN_PROPERTY__VALUE);\n\n\t\tstringPropertyEClass = createEClass(STRING_PROPERTY);\n\t\tcreateEAttribute(stringPropertyEClass, STRING_PROPERTY__VALUE);\n\t}", "public static void main(String [] args){\n time = 0;\n waitingList = new ArrayList<>();\n removeSet = new HashSet<>();\n\n String fileName = args[0];\n Scanner sc = new Scanner(System.in);\n\n // try creating a file scanner\n try{\n sc = new Scanner(new File(fileName));\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n\n // we include two tasklists because we will have duplicates of each task object, one to be used with bankers, the other for naive\n taskList = new ArrayList<>();\n bankersTaskList = new ArrayList<>();\n int numTasks = sc.nextInt();\n numResources = sc.nextInt();\n\n resourceArr = new int [numResources];\n maxResourceArr = new int [numResources];\n\n taskPointers = new int [numTasks];\n\n // creating tasks from input file and adding to task list\n for(int i = 1; i <= numTasks; i ++){\n Task t = new Task(i);\n Task bt = new Task(i);\n taskList.add(t);\n bankersTaskList.add(bt);\n }\n\n int curr = 0;\n // determining how many resources we have of each type\n while(curr < numResources){\n int resourceNum = sc.nextInt();\n resourceArr[curr] = resourceNum;\n maxResourceArr[curr] = resourceNum;\n curr ++;\n }\n\n releaseArr = new int [numResources];\n\n // Parsing through the instructions, and adding each one to respective task we made earlier\n while(sc.hasNext()){\n String instType = sc.next();\n int taskNumber = sc.nextInt();\n\n Task currTask = taskList.get(taskNumber - 1);\n Task currBankersTask = bankersTaskList.get(taskNumber - 1);\n Type instructionType = Type.valueOf(instType);\n\n int resourceType = sc.nextInt();\n int resourceAmount = sc.nextInt();\n\n // create a duplicate of the instruction object so we can use it for bankers\n Instruction i = new Instruction(instructionType, taskNumber, resourceType, resourceAmount, false);\n Instruction bI = new Instruction(instructionType, taskNumber, resourceType, resourceAmount, true);\n currTask.addInstruction(i);\n currBankersTask.addInstruction(bI);\n }\n\n // deploy the fifo (naive) allocator\n naive(numResources);\n System.out.println();\n System.out.println(\"*****FIFO*****\");\n printTasks();\n\n\n // reset our global variables so Bankers can be deployed\n resetGlobals(numTasks);\n System.out.println(\"\\n\");\n\n // deploy the bankers allocator\n banker();\n System.out.println(\"*****BANKERS*****\");\n printTasks();\n\n }", "private void calculateStatesStatesPruning(int iNode1, int iNode2, int iNode3) {\n\t\t// prepare the stack\n\t\tm_nOperation[m_nTopOfStack] = OPERATION_SS;\n\t\tif (m_fPartials[m_iCurrentPartials[iNode1]][iNode1] != null && m_fPartials[m_iCurrentPartials[iNode2]][iNode2] != null) {\n\t\t\t// for handling ambiguities\n\t\t\tm_nOperation[m_nTopOfStack] = OPERATION_PP;\n\t\t}\n\t\t\n\t\tm_nNode1[m_nTopOfStack] = iNode1;\n\t\tm_nNode2[m_nTopOfStack] = iNode2;\n\t\tm_nNode3[m_nTopOfStack] = iNode3;\n\t\tm_nTopOfStack++;\n\t}", "public void generate() {\n prepareConfiguration();\n\n boolean hasElse = expression.getElseExpression() != null;\n\n // if there is no else-entry and it's statement then default --- endLabel\n defaultLabel = (hasElse || !isStatement || isExhaustive) ? elseLabel : endLabel;\n\n generateSubject();\n\n generateSwitchInstructionByTransitionsTable();\n\n generateEntries();\n\n // there is no else-entry but this is not statement, so we should return Unit\n if (!hasElse && (!isStatement || isExhaustive)) {\n v.visitLabel(elseLabel);\n codegen.putUnitInstanceOntoStackForNonExhaustiveWhen(expression, isStatement);\n }\n\n codegen.markLineNumber(expression, isStatement);\n v.mark(endLabel);\n }", "public void build() {\n boolean debugGates = this.debugDepth > 0 ? this.inDebuggerMode : false;\n if (this.outputs.size() != 1 << this.input.getSize()) {\n throw new BitStreamInputSizeMismatch(this);\n }\n\n List<BitStream> splitterInput = new ArrayList<>();\n splitterInput.add(this.input);\n\n List<BitStream> splitterOutput = new ArrayList<>();\n for (int i = 0; i < this.input.getSize(); i++) {\n splitterOutput.add(new BitStream(1));\n }\n\n Splitter inputSplitter = new Splitter(splitterInput, splitterOutput, \"inputSplitter\", debugGates);\n\n for (int i = 0; i < this.outputs.size(); i++) {\n List<BitStream> andInputs = new ArrayList<>();\n for (BitStream splitterOut : splitterOutput) {\n andInputs.add(splitterOut);\n }\n\n String indexInBinary = DataConverter.convertUnsignedDecToBin(i);\n indexInBinary = this.padZeros(indexInBinary, this.input.getSize());\n\n for (int j = indexInBinary.length() - 1; j >= 0; j--) {\n if (indexInBinary.charAt(j) == '0') {\n BitStream notOut = new BitStream(1);\n NOT not = new NOT(andInputs.get(j), notOut,\n \"not\" + i + (indexInBinary.length() - 1 - j), debugGates);\n andInputs.set(j, notOut);\n }\n }\n\n MultiAND and = new MultiAND(andInputs, this.outputs.get(i), \"and\" + i, debugGates);\n }\n }", "public void generatePropositions() {\r\n propositions.clear();\r\n\r\n\t\t// holds alternative options for each constituents (obtained by\r\n // processing coordinated conjunctions and xcomps)\r\n final List<List<Constituent>> constituents = new ArrayList<List<Constituent>>();\r\n\r\n // which of the constituents are required?\r\n final List<Flag> flags = new ArrayList<Flag>();\r\n final List<Boolean> include = new ArrayList<Boolean>();\r\n\r\n\t\t// holds all valid combination of constituents for which a proposition\r\n // is to be generated\r\n final List<List<Boolean>> includeConstituents = new ArrayList<List<Boolean>>();\r\n\r\n // let's start\r\n for (Clause clause : clauses) {\r\n // process coordinating conjunctions\r\n constituents.clear();\r\n for (int i = 0; i < clause.constituents.size(); i++) {\r\n\t\t\t\t// if(xcomp && clause.subject == i) continue; //An xcomp does\r\n // not have an internal subject so should not be processed here\r\n Constituent constituent = clause.constituents.get(i);\r\n List<Constituent> alternatives;\r\n if (!(xcomp && clause.subject == i)\r\n && constituent instanceof IndexedConstituent\r\n // the processing of the xcomps is done in Default\r\n // proposition generator. \r\n // Otherwise we get duplicate propositions.\r\n && !clause.xcomps.contains(i)\r\n && ((i == clause.verb && options.processCcAllVerbs) || (i != clause.verb && options.processCcNonVerbs))) {\r\n alternatives = ProcessConjunctions.processCC(depTree,\r\n clause, constituent, i);\r\n } else if (!(xcomp && clause.subject == i)\r\n && clause.xcomps.contains(i)) {\r\n alternatives = new ArrayList<Constituent>();\r\n ClausIE xclausIE = new ClausIE(options);\r\n xclausIE.semanticGraph = semanticGraph;\r\n xclausIE.depTree = depTree;\r\n xclausIE.xcomp = true;\r\n xclausIE.clauses = ((XcompConstituent) clause.constituents\r\n .get(i)).getClauses();\r\n xclausIE.generatePropositions();\r\n for (Proposition p : xclausIE.propositions) {\r\n StringBuilder sb = new StringBuilder();\r\n String sep = \"\";\r\n for (int j = 0; j < p.constituents.size(); j++) {\r\n if (j == 0) // to avoid including the subjecct, We\r\n {\r\n continue; // could also generate the prop\r\n }\t\t\t\t\t\t\t // without the subject\t\t\t\t\t\t\t\t\t\t\t\r\n sb.append(sep);\r\n sb.append(p.constituents.get(j));\r\n sep = \" \";\r\n }\r\n alternatives.add(new TextConstituent(sb.toString(),\r\n constituent.type));\r\n }\r\n } else {\r\n alternatives = new ArrayList<Constituent>(1);\r\n alternatives.add(constituent);\r\n }\r\n constituents.add(alternatives);\r\n }\r\n\r\n\t\t\t// create a list of all combinations of constituents for which a\r\n // proposition should be generated\r\n includeConstituents.clear();\r\n flags.clear();\r\n include.clear();\r\n for (int i = 0; i < clause.constituents.size(); i++) {\r\n Flag flag = clause.getFlag(i, options);\r\n flags.add(flag);\r\n include.add(!flag.equals(Flag.IGNORE));\r\n }\r\n if (options.nary) {\r\n\t\t\t\t// we always include all constituents for n-ary ouput \r\n // (optional parts marked later)\r\n includeConstituents.add(include);\r\n } else {\r\n // triple mode; determine which parts are required\r\n for (int i = 0; i < clause.constituents.size(); i++) {\r\n include.set(i, flags.get(i).equals(Flag.REQUIRED));\r\n }\r\n\r\n // create combinations of required/optional constituents\r\n new Runnable() {\r\n int noOptional;\r\n\r\n // @Override\r\n public void run() {\r\n noOptional = 0;\r\n for (Flag f : flags) {\r\n if (f.equals(Flag.OPTIONAL)) {\r\n noOptional++;\r\n }\r\n }\r\n run(0, 0, new ArrayList<Boolean>());\r\n }\r\n\r\n private void run(int pos, int selected, List<Boolean> prefix) {\r\n if (pos >= include.size()) {\r\n if (selected >= Math.min(options.minOptionalArgs,\r\n noOptional)\r\n && selected <= options.maxOptionalArgs) {\r\n includeConstituents.add(new ArrayList<Boolean>(\r\n prefix));\r\n }\r\n return;\r\n }\r\n prefix.add(true);\r\n if (include.get(pos)) {\r\n run(pos + 1, selected, prefix);\r\n } else {\r\n if (!flags.get(pos).equals(Flag.IGNORE)) {\r\n run(pos + 1, selected + 1, prefix);\r\n }\r\n prefix.set(prefix.size() - 1, false);\r\n run(pos + 1, selected, prefix);\r\n }\r\n prefix.remove(prefix.size() - 1);\r\n }\r\n }.run();\r\n }\r\n\r\n // create a temporary clause for which to generate a proposition\r\n final Clause tempClause = clause.clone();\r\n\r\n // generate propositions\r\n new Runnable() {\r\n public void run() {\r\n // select which constituents to include\r\n for (List<Boolean> include : includeConstituents) {\r\n // now select an alternative for each constituent\r\n selectConstituent(0, include);\r\n }\r\n }\r\n\r\n void selectConstituent(int i, List<Boolean> include) {\r\n if (i < constituents.size()) {\r\n if (include.get(i)) {\r\n List<Constituent> alternatives = constituents\r\n .get(i);\r\n for (int j = 0; j < alternatives.size(); j++) {\r\n tempClause.constituents.set(i,\r\n alternatives.get(j));\r\n selectConstituent(i + 1, include);\r\n }\r\n } else {\r\n selectConstituent(i + 1, include);\r\n }\r\n } else {\r\n // everything selected; generate\r\n propositionGenerator.generate(propositions, tempClause,\r\n include);\r\n }\r\n }\r\n }.run();\r\n }\r\n }", "private void createSourceFiles(ArrayList<TagNode> tags) {\n\t\tfor (Iterator<TagNode> iter = tags.iterator(); iter.hasNext();) {\n\t\t\tif (monitor.isCanceled()) { // return if cancel is requested\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tASTEngine engine = new ASTEngine(this, mode, pattern);\n\t\t\tengine.createSourceFile(iter.next(), status);\n\t\t\tmonitor.worked(1);\n\t\t}\n\t}", "public void createPackageContents() {\n if (this.isCreated) {\n return;\n }\n this.isCreated = true;\n\n // Create classes and their features\n this.systemSpecifiedExecutionTimeEClass = this.createEClass(SYSTEM_SPECIFIED_EXECUTION_TIME);\n\n this.specifiedExecutionTimeEClass = this.createEClass(SPECIFIED_EXECUTION_TIME);\n this.createEReference(this.specifiedExecutionTimeEClass,\n SPECIFIED_EXECUTION_TIME__SPECIFICATION_SPECIFIED_EXECUTION_TIME);\n\n this.componentSpecifiedExecutionTimeEClass = this.createEClass(COMPONENT_SPECIFIED_EXECUTION_TIME);\n this.createEReference(this.componentSpecifiedExecutionTimeEClass,\n COMPONENT_SPECIFIED_EXECUTION_TIME__ASSEMBLY_CONTEXT_COMPONENT_SPECIFIED_EXECUTION_TIME);\n }", "protected void scanStatements() {\n\t\tmakToStatementMap = scanStructuredBlocks(\r\n\t\t\t\tbldInfView.makToStatementMap, statementToMakMap, \r\n\t\t\t\tbldInfView.getMakMakeReferences(), IASTBldInfPrjMmpfilesBlockStatement.class,\r\n\t\t\t\tnew MakListConverter(bldInfView, BldInfView.PRJ_MMPFILES_KEYWORD));\r\n\t\ttestMakToStatementMap = scanStructuredBlocks(\r\n\t\t\t\tbldInfView.testMakToStatementMap, statementToTestMakMap, \r\n\t\t\t\tbldInfView.getTestMakMakeReferences(), IASTBldInfPrjMmpfilesBlockStatement.class,\r\n\t\t\t\tnew MakListConverter(bldInfView, BldInfView.PRJ_TESTMMPFILES_KEYWORD));\r\n\t\texportToStatementMap = scanStructuredBlocks(\r\n\t\t\t\tbldInfView.exportToStatementMap, statementToExportMap, \r\n\t\t\t\tbldInfView.getExports(), IASTBldInfPrjExportsBlockStatement.class,\r\n\t\t\t\tnew ExportListConverter(bldInfView, BldInfView.PRJ_EXPORTS_KEYWORD));\r\n\t\ttestExportToStatementMap = scanStructuredBlocks(\r\n\t\t\t\tbldInfView.testExportToStatementMap, statementToTestExportMap, \r\n\t\t\t\tbldInfView.getTestExports(), IASTBldInfPrjExportsBlockStatement.class,\r\n\t\t\t\tnew ExportListConverter(bldInfView, BldInfView.PRJ_TESTEXPORTS_KEYWORD));\r\n\t\textensionToStatementMap = scanStructuredBlocks(\r\n\t\t\t\tbldInfView.extensionToStatementMap, statementToExtensionsMap, \r\n\t\t\t\tbldInfView.getExtensions(), IASTBldInfPrjExtensionsBlockStatement.class,\r\n\t\t\t\tnew ExtensionListConverter(bldInfView, BldInfView.PRJ_EXTENSIONS_KEYWORD));\r\n\t\ttestExtensionToStatementMap = scanStructuredBlocks(\r\n\t\t\t\tbldInfView.testExtensionToStatementMap, statementToTestExtensionsMap, \r\n\t\t\t\tbldInfView.getTestExtensions(), IASTBldInfPrjExtensionsBlockStatement.class,\r\n\t\t\t\tnew ExtensionListConverter(bldInfView, BldInfView.PRJ_TESTEXTENSIONS_KEYWORD));\r\n\t}", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n modelEClass = createEClass(MODEL);\n createEReference(modelEClass, MODEL__STMTS);\n\n simpleStatementEClass = createEClass(SIMPLE_STATEMENT);\n\n assignmentEClass = createEClass(ASSIGNMENT);\n createEReference(assignmentEClass, ASSIGNMENT__LEFT_HAND_SIDE);\n createEReference(assignmentEClass, ASSIGNMENT__RIGHT_HAND_SIDE);\n\n expressionEClass = createEClass(EXPRESSION);\n\n unaryMinusExpressionEClass = createEClass(UNARY_MINUS_EXPRESSION);\n createEReference(unaryMinusExpressionEClass, UNARY_MINUS_EXPRESSION__SUB);\n\n unaryPlusExpressionEClass = createEClass(UNARY_PLUS_EXPRESSION);\n createEReference(unaryPlusExpressionEClass, UNARY_PLUS_EXPRESSION__SUB);\n\n logicalNegationExpressionEClass = createEClass(LOGICAL_NEGATION_EXPRESSION);\n createEReference(logicalNegationExpressionEClass, LOGICAL_NEGATION_EXPRESSION__SUB);\n\n bracketExpressionEClass = createEClass(BRACKET_EXPRESSION);\n createEReference(bracketExpressionEClass, BRACKET_EXPRESSION__SUB);\n\n pointerCallEClass = createEClass(POINTER_CALL);\n\n variableCallEClass = createEClass(VARIABLE_CALL);\n createEAttribute(variableCallEClass, VARIABLE_CALL__NAME);\n\n arraySpecifierEClass = createEClass(ARRAY_SPECIFIER);\n\n unarySpecifierEClass = createEClass(UNARY_SPECIFIER);\n createEAttribute(unarySpecifierEClass, UNARY_SPECIFIER__INDEX);\n\n rangeSpecifierEClass = createEClass(RANGE_SPECIFIER);\n createEAttribute(rangeSpecifierEClass, RANGE_SPECIFIER__FROM);\n createEAttribute(rangeSpecifierEClass, RANGE_SPECIFIER__TO);\n\n ioFunctionsEClass = createEClass(IO_FUNCTIONS);\n createEAttribute(ioFunctionsEClass, IO_FUNCTIONS__FILE_NAME);\n\n infoFunctionsEClass = createEClass(INFO_FUNCTIONS);\n\n manipFunctionsEClass = createEClass(MANIP_FUNCTIONS);\n\n arithFunctionsEClass = createEClass(ARITH_FUNCTIONS);\n createEReference(arithFunctionsEClass, ARITH_FUNCTIONS__EXPRESSION);\n createEReference(arithFunctionsEClass, ARITH_FUNCTIONS__FIELD);\n createEReference(arithFunctionsEClass, ARITH_FUNCTIONS__WHERE_EXPRESSION);\n\n loadEClass = createEClass(LOAD);\n\n storeEClass = createEClass(STORE);\n createEReference(storeEClass, STORE__EXPRESSION);\n\n exportEClass = createEClass(EXPORT);\n createEReference(exportEClass, EXPORT__EXPRESSION);\n\n printEClass = createEClass(PRINT);\n createEReference(printEClass, PRINT__EXPRESSION);\n\n depthEClass = createEClass(DEPTH);\n createEReference(depthEClass, DEPTH__EXPRESSION);\n\n fieldInfoEClass = createEClass(FIELD_INFO);\n createEReference(fieldInfoEClass, FIELD_INFO__EXPRESSION);\n\n containsEClass = createEClass(CONTAINS);\n createEReference(containsEClass, CONTAINS__KEYS);\n createEReference(containsEClass, CONTAINS__RIGHT);\n\n selectEClass = createEClass(SELECT);\n createEReference(selectEClass, SELECT__FIELDS);\n createEReference(selectEClass, SELECT__FROM_EXPRESSION);\n createEReference(selectEClass, SELECT__WHERE_EXPRESSION);\n\n lengthEClass = createEClass(LENGTH);\n createEReference(lengthEClass, LENGTH__EXPRESSION);\n\n sumEClass = createEClass(SUM);\n\n productEClass = createEClass(PRODUCT);\n\n constantEClass = createEClass(CONSTANT);\n\n primitiveEClass = createEClass(PRIMITIVE);\n createEAttribute(primitiveEClass, PRIMITIVE__STR);\n createEAttribute(primitiveEClass, PRIMITIVE__INT_NUM);\n createEAttribute(primitiveEClass, PRIMITIVE__FLOAT_NUM);\n createEAttribute(primitiveEClass, PRIMITIVE__BOOL);\n createEAttribute(primitiveEClass, PRIMITIVE__NIL);\n\n arrayEClass = createEClass(ARRAY);\n createEReference(arrayEClass, ARRAY__VALUES);\n\n jSonObjectEClass = createEClass(JSON_OBJECT);\n createEReference(jSonObjectEClass, JSON_OBJECT__FIELDS);\n\n fieldEClass = createEClass(FIELD);\n createEReference(fieldEClass, FIELD__KEY);\n createEReference(fieldEClass, FIELD__VALUE);\n\n disjunctionExpressionEClass = createEClass(DISJUNCTION_EXPRESSION);\n createEReference(disjunctionExpressionEClass, DISJUNCTION_EXPRESSION__LEFT);\n createEReference(disjunctionExpressionEClass, DISJUNCTION_EXPRESSION__RIGHT);\n\n conjunctionExpressionEClass = createEClass(CONJUNCTION_EXPRESSION);\n createEReference(conjunctionExpressionEClass, CONJUNCTION_EXPRESSION__LEFT);\n createEReference(conjunctionExpressionEClass, CONJUNCTION_EXPRESSION__RIGHT);\n\n equalityExpressionEClass = createEClass(EQUALITY_EXPRESSION);\n createEReference(equalityExpressionEClass, EQUALITY_EXPRESSION__LEFT);\n createEReference(equalityExpressionEClass, EQUALITY_EXPRESSION__RIGHT);\n\n inequalityExpressionEClass = createEClass(INEQUALITY_EXPRESSION);\n createEReference(inequalityExpressionEClass, INEQUALITY_EXPRESSION__LEFT);\n createEReference(inequalityExpressionEClass, INEQUALITY_EXPRESSION__RIGHT);\n\n superiorExpressionEClass = createEClass(SUPERIOR_EXPRESSION);\n createEReference(superiorExpressionEClass, SUPERIOR_EXPRESSION__LEFT);\n createEReference(superiorExpressionEClass, SUPERIOR_EXPRESSION__RIGHT);\n\n superiorOrEqualExpressionEClass = createEClass(SUPERIOR_OR_EQUAL_EXPRESSION);\n createEReference(superiorOrEqualExpressionEClass, SUPERIOR_OR_EQUAL_EXPRESSION__LEFT);\n createEReference(superiorOrEqualExpressionEClass, SUPERIOR_OR_EQUAL_EXPRESSION__RIGHT);\n\n inferiorExpressionEClass = createEClass(INFERIOR_EXPRESSION);\n createEReference(inferiorExpressionEClass, INFERIOR_EXPRESSION__LEFT);\n createEReference(inferiorExpressionEClass, INFERIOR_EXPRESSION__RIGHT);\n\n inferiorOrEqualExpressionEClass = createEClass(INFERIOR_OR_EQUAL_EXPRESSION);\n createEReference(inferiorOrEqualExpressionEClass, INFERIOR_OR_EQUAL_EXPRESSION__LEFT);\n createEReference(inferiorOrEqualExpressionEClass, INFERIOR_OR_EQUAL_EXPRESSION__RIGHT);\n\n additionExpressionEClass = createEClass(ADDITION_EXPRESSION);\n createEReference(additionExpressionEClass, ADDITION_EXPRESSION__LEFT);\n createEReference(additionExpressionEClass, ADDITION_EXPRESSION__RIGHT);\n\n substractionExpressionEClass = createEClass(SUBSTRACTION_EXPRESSION);\n createEReference(substractionExpressionEClass, SUBSTRACTION_EXPRESSION__LEFT);\n createEReference(substractionExpressionEClass, SUBSTRACTION_EXPRESSION__RIGHT);\n\n multiplicationExpressionEClass = createEClass(MULTIPLICATION_EXPRESSION);\n createEReference(multiplicationExpressionEClass, MULTIPLICATION_EXPRESSION__LEFT);\n createEReference(multiplicationExpressionEClass, MULTIPLICATION_EXPRESSION__RIGHT);\n\n divisionExpressionEClass = createEClass(DIVISION_EXPRESSION);\n createEReference(divisionExpressionEClass, DIVISION_EXPRESSION__LEFT);\n createEReference(divisionExpressionEClass, DIVISION_EXPRESSION__RIGHT);\n\n moduloExpressionEClass = createEClass(MODULO_EXPRESSION);\n createEReference(moduloExpressionEClass, MODULO_EXPRESSION__LEFT);\n createEReference(moduloExpressionEClass, MODULO_EXPRESSION__RIGHT);\n\n arrayCallEClass = createEClass(ARRAY_CALL);\n createEReference(arrayCallEClass, ARRAY_CALL__CALLEE);\n createEReference(arrayCallEClass, ARRAY_CALL__SPECIFIER);\n\n fieldCallEClass = createEClass(FIELD_CALL);\n createEReference(fieldCallEClass, FIELD_CALL__CALLEE);\n createEAttribute(fieldCallEClass, FIELD_CALL__FIELD);\n }", "private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }", "@org.jetbrains.annotations.NotNull\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static /* synthetic */ com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection copy$default(com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection r4, com.bitcoin.mwallet.core.models.slp.Slp r5, java.util.List<kotlin.ULong> r6, com.bitcoin.bitcoink.p008tx.Satoshis r7, com.bitcoin.bitcoink.p008tx.Satoshis r8, java.util.List<com.bitcoin.mwallet.core.models.p009tx.utxo.Utxo> r9, com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.Error r10, int r11, java.lang.Object r12) {\n /*\n r12 = r11 & 1\n if (r12 == 0) goto L_0x0006\n com.bitcoin.mwallet.core.models.slp.Slp r5 = r4.token\n L_0x0006:\n r12 = r11 & 2\n if (r12 == 0) goto L_0x000c\n java.util.List<kotlin.ULong> r6 = r4.quantities\n L_0x000c:\n r12 = r6\n r6 = r11 & 4\n if (r6 == 0) goto L_0x0013\n com.bitcoin.bitcoink.tx.Satoshis r7 = r4.fee\n L_0x0013:\n r0 = r7\n r6 = r11 & 8\n if (r6 == 0) goto L_0x001a\n com.bitcoin.bitcoink.tx.Satoshis r8 = r4.change\n L_0x001a:\n r1 = r8\n r6 = r11 & 16\n if (r6 == 0) goto L_0x0021\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r9 = r4.utxos\n L_0x0021:\n r2 = r9\n r6 = r11 & 32\n if (r6 == 0) goto L_0x0028\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r10 = r4.error\n L_0x0028:\n r3 = r10\n r6 = r4\n r7 = r5\n r8 = r12\n r9 = r0\n r10 = r1\n r11 = r2\n r12 = r3\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection r4 = r6.copy(r7, r8, r9, r10, r11, r12)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.copy$default(com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection, com.bitcoin.mwallet.core.models.slp.Slp, java.util.List, com.bitcoin.bitcoink.tx.Satoshis, com.bitcoin.bitcoink.tx.Satoshis, java.util.List, com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error, int, java.lang.Object):com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection\");\n }", "private void addStackBlocks() {\n\n for (int x = numBlocks; x > 0; x--) {\n\n double blockHeight = totalBLockHeight / numBlocks;\n double blockWidthChange = (maxBlockWidth - minBlockWidth) / numBlocks;\n double blockWidth = minBlockWidth + ((x - 1) * blockWidthChange);\n\n TowerBlock newBlock = new TowerBlock(blockWidth, blockHeight, x);\n towerOne.push(newBlock);\n\n }\n addBlocks = false;\n\n }", "public OperationType[] createOperationTypes() {\n int[] op1v1 = new int[]{2, 3, 4, 6};\n OperationType op1 = new OperationType(1, op1v1, null, null, 2\n , 0, 17520, 730, 8, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Transport net before operation\");\n int[] op2v1 = new int[]{2, 3, 4, 6};\n int[] op2v2 = new int[]{2, 3, 4, 6};\n OperationType op2 = new OperationType(2, op2v1, op2v2, null,\n 3, 1, 17520, 730, 4, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Install net\");\n int[] op3v1 = new int[]{2, 3, 4, 6};\n OperationType op3 = new OperationType(3, op3v1, null,\n null, 0, 2, 17520, 730, 8, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Transport net after operation\");\n int[] op4v1 = new int[]{5};\n int[] op4v2 = new int[]{2, 3, 4, 6};\n OperationType op4 = new OperationType(4, op4v1, op4v2, null,\n 0, 0, 1152, 192, 5, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 8, \"Delousing\");\n int[] op5v1 = new int[]{2, 3, 4};\n int[] op5v2 = new int[]{2, 3, 4};\n int[] op5BT = new int[]{6};\n OperationType op5 = new OperationType(5, op5v1, op5v2, op5BT,\n 0, 0, 8760, 360, 40, DataGenerator.costPenalty * DataGenerator.maxSailingTime, \"Large inspection of the facility\");\n int[] op6v1 = new int[]{2};\n OperationType op6 = new OperationType(6, op6v1, null, null,\n 0, 0, 5110, 730, 5, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Wash the net\");\n int[] op7v1 = new int[]{4, 6};\n OperationType op7 = new OperationType(7, op7v1, null, null,\n 0, 0, 8760, 360, 48, DataGenerator.costPenalty * DataGenerator.maxSailingTime, \"tightening anchor lines\");\n int[] op8v1 = new int[]{2, 3, 4, 6};\n int[] op8v2 = new int[]{2, 3, 4, 6};\n OperationType op8 = new OperationType(8, op8v1, op8v2, null,\n 0, 9, 8760, 360, 3, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Small installation facility\");\n int[] op9v1 = new int[]{2, 3, 4, 6};\n OperationType op9 = new OperationType(9, op9v1, null, null,\n 8, 0, 8760, 360, 6, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Easy transport of equipment to facility\");\n int[] op10v1 = new int[]{2, 3, 4, 6};\n OperationType op10 = new OperationType(10, op10v1, null, null,\n 0, 0, 720, 100, 2, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Remove dead fish\");\n int[] op11v1 = new int[]{2, 3, 4, 6};\n OperationType op11 = new OperationType(11, op11v1, null, null,\n 0, 0, 720, 100, 4, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 8, \"Support wellboat\");\n int[] op12v1 = new int[]{1, 2, 3, 4, 6};\n OperationType op12 = new OperationType(12, op12v1, null, null,\n 0, 0, 720, 100, 5, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Inspect net ROV\");\n int[] op13v1 = new int[]{1, 3};\n OperationType op13 = new OperationType(13, op13v1, null, null,\n 0, 0, 8760, 360, 4, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Inspect net diver\");\n int[] op14v1 = new int[]{2};\n OperationType op14 = new OperationType(14, op14v1, null, null,\n 0, 0, 8760, 360, 4, DataGenerator.costPenalty * DataGenerator.maxSailingTime, \"Wash bottom ring and floating collar\");\n int[] op15v1 = new int[]{2, 3, 4, 6};\n OperationType op15 = new OperationType(15, op15v1, null, null,\n 0, 0, 168, 24, 3, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Support working boat\");\n return new OperationType[]{op1, op2, op3, op4, op5, op6, op7, op8, op9, op10, op11, op12, op13, op14, op15};\n }", "private void setupSettlementCost(){\n\t\tsettlementCost.put(ResourceKind.WOOL, 1);\n\t\tsettlementCost.put(ResourceKind.WOOD, 1);\n\t\tsettlementCost.put(ResourceKind.BRICK, 1);\n\t\tsettlementCost.put(ResourceKind.GRAIN, 1);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttaskModelEClass = createEClass(TASK_MODEL);\n\t\tcreateEReference(taskModelEClass, TASK_MODEL__ROOT);\n\t\tcreateEReference(taskModelEClass, TASK_MODEL__TASKS);\n\t\tcreateEAttribute(taskModelEClass, TASK_MODEL__NAME);\n\n\t\ttaskEClass = createEClass(TASK);\n\t\tcreateEAttribute(taskEClass, TASK__ID);\n\t\tcreateEAttribute(taskEClass, TASK__NAME);\n\t\tcreateEReference(taskEClass, TASK__OPERATOR);\n\t\tcreateEReference(taskEClass, TASK__SUBTASKS);\n\t\tcreateEReference(taskEClass, TASK__PARENT);\n\t\tcreateEAttribute(taskEClass, TASK__MIN);\n\t\tcreateEAttribute(taskEClass, TASK__MAX);\n\t\tcreateEAttribute(taskEClass, TASK__ITERATIVE);\n\n\t\tuserTaskEClass = createEClass(USER_TASK);\n\n\t\tapplicationTaskEClass = createEClass(APPLICATION_TASK);\n\n\t\tinteractionTaskEClass = createEClass(INTERACTION_TASK);\n\n\t\tabstractionTaskEClass = createEClass(ABSTRACTION_TASK);\n\n\t\tnullTaskEClass = createEClass(NULL_TASK);\n\n\t\ttemporalOperatorEClass = createEClass(TEMPORAL_OPERATOR);\n\n\t\tchoiceOperatorEClass = createEClass(CHOICE_OPERATOR);\n\n\t\torderIndependenceOperatorEClass = createEClass(ORDER_INDEPENDENCE_OPERATOR);\n\n\t\tinterleavingOperatorEClass = createEClass(INTERLEAVING_OPERATOR);\n\n\t\tsynchronizationOperatorEClass = createEClass(SYNCHRONIZATION_OPERATOR);\n\n\t\tparallelOperatorEClass = createEClass(PARALLEL_OPERATOR);\n\n\t\tdisablingOperatorEClass = createEClass(DISABLING_OPERATOR);\n\n\t\tsequentialEnablingInfoOperatorEClass = createEClass(SEQUENTIAL_ENABLING_INFO_OPERATOR);\n\n\t\tsequentialEnablingOperatorEClass = createEClass(SEQUENTIAL_ENABLING_OPERATOR);\n\n\t\tsuspendResumeOperatorEClass = createEClass(SUSPEND_RESUME_OPERATOR);\n\t}", "protected void extractDexInstructions(MethodImplementation code) {\n int address = 0;\n for (Instruction instruction : code.getInstructions()) {\n DexlibAbstractInstruction dexInstruction = fromInstruction(instruction, address);\n instructions.add(dexInstruction);\n instructionAtAddress.put(address, dexInstruction);\n address += instruction.getCodeUnits();\n }\n }", "private void createExecutableFile() throws IOException {\r\n //if (report.getErrorList() == null)\r\n //{\r\n System.out.println(\"Currently generating the executable file.....\");\r\n executableFile = new File(sourceName + \".lst\");\r\n // if creating the lst file is successful, then you can start to write in the lst file\r\n executableFile.delete();\r\n if (executableFile.createNewFile()) {\r\n writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(sourceName + \".asm\"), \"utf-8\")); //create an object to write into the lst file\r\n\r\n String [] hex = generate.split(\" \");\r\n\r\n for (int index = 0; index < hex.length; index++) {\r\n String hex1 = hex[index].trim();\r\n System.out.println(hex1);\r\n\r\n int i = Integer.parseInt(hex1, 16);\r\n String bin = Integer.toBinaryString(i);\r\n System.out.println(bin);\r\n\r\n writer.write(bin); // once the instruction is converted to binary it is written into the exe file\r\n }\r\n\r\n writer.close();\r\n\r\n }\r\n }" ]
[ "0.56319827", "0.52220255", "0.49971223", "0.49337417", "0.48289558", "0.48083666", "0.4779197", "0.47122005", "0.47098708", "0.47081456", "0.46997643", "0.4678818", "0.4675215", "0.46314576", "0.4611534", "0.4583314", "0.45827976", "0.4566175", "0.45567468", "0.45450586", "0.44687545", "0.44489715", "0.44346532", "0.44168377", "0.44024187", "0.44019565", "0.43799824", "0.4371763", "0.43657184", "0.4362264", "0.43547046", "0.43461725", "0.43367735", "0.43276647", "0.4320341", "0.43131152", "0.4311305", "0.43097827", "0.43016005", "0.42978373", "0.42947388", "0.42944905", "0.42849368", "0.4273536", "0.42634556", "0.4254305", "0.42535967", "0.42527276", "0.42436624", "0.42340726", "0.42337945", "0.42286098", "0.42246535", "0.4220204", "0.4219162", "0.42186928", "0.4215902", "0.4210996", "0.4202945", "0.41912237", "0.41847822", "0.4178778", "0.4175993", "0.41739848", "0.41677183", "0.41587502", "0.4152288", "0.4149965", "0.4137729", "0.41308862", "0.4130335", "0.41300672", "0.4129362", "0.41221362", "0.4112848", "0.4107749", "0.41069844", "0.41044593", "0.41022724", "0.41004673", "0.40979186", "0.40859404", "0.4085609", "0.40828133", "0.40790418", "0.40787974", "0.407778", "0.40754464", "0.40730754", "0.40688127", "0.4066194", "0.40577185", "0.40558818", "0.40545586", "0.40525758", "0.40523136", "0.40497324", "0.40490437", "0.4040253", "0.4039983" ]
0.4863918
4
Creates a new defined Data object of a given length at the given address. This ignores the bytes that are present
public Data createData(Address addr, DataType dataType, int length) throws CodeUnitInsertionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract byte[] readData(int address, int length);", "public Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;", "public Data getDataAt(Address addr);", "public abstract int writeData(int address, byte[] buffer, int length);", "public Data getUndefinedDataAt(Address addr);", "protected BaseAuroraDataBuffer(long length) {\n this(length, true);\n }", "public Data getDefinedDataAt(Address addr);", "private LogData getDefaultLogData(long address) {\n ByteBuf b = Unpooled.buffer();\n Serializers.CORFU.serialize(PAYLOAD_DATA.getBytes(), b);\n LogData ld = new LogData(DataType.DATA, b);\n ld.setGlobalAddress(address);\n ld.setEpoch(1L);\n return ld;\n }", "public DatagramPacket createDatagramPacket(InetAddress address, Integer port) {\n byte[] message = this.buildBytes();\n return new DatagramPacket(message, message.length, address, port);\n }", "public void setDataLength(int length) {\n // should be below 255, check!\n m_DataLength = length + 2;\n }", "public Data getDataAfter(Address addr);", "public RoutePacket(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "private static MessageHeader createDataHeader(byte[] bufferBytes, int length) {\n\n\t\tObject[] iov = new Object[1];\n\n\t\tif (length != BUFFER_SIZE) {\n\t\t\tbyte[] lastBuffer = new byte[length];\n\t\t\tSystem.arraycopy(bufferBytes, 0, lastBuffer, 0, length);\n\t\t\tbufferBytes = lastBuffer;\n\t\t}\n\t\tiov[0] = bufferBytes;\n\n\t\tMessageHeader mh = new MessageHeader();\n\t\tmh.setIov(iov);\n\n\t\treturn mh;\n\t}", "public DeviceData() {\r\n this.rtAddress = 0;\r\n this.subAddress = 0;\r\n this.txRx = 0;\r\n this.data = new short[32];\r\n }", "default AddressRange range(Address address, long length) {\n\t\ttry {\n\t\t\treturn new AddressRangeImpl(address, length);\n\t\t}\n\t\tcatch (AddressOverflowException e) {\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}", "public IPv4Address(byte[] bytes) throws AddressValueException {\n\t\tthis(bytes, null);\n\t}", "@Override\n protected long read0(long addr, @Positive long length) throws IOException {\n int count = toInt(min(this.delegate.remaining(), length));\n if (count <= 0) {\n return RESULT_EOF;\n }\n\n //we don't have direct access to the array, so we'll have to fall back to copying one byte at a time\n // (JIT might be smart enough to optimize this into a sequential memory copy, but don't bank on it - that's why we have ArrayHeapBufferIn)\n int position = PNioBuffers.skipForRead(this.delegate, count);\n for (int i = 0; i < count; i++) {\n PUnsafe.putByte(addr + i, this.delegate.get(position + i));\n }\n\n return count;\n }", "public Data getDefinedDataAfter(Address addr);", "public Data getDataBefore(Address addr);", "public DatadogBuilder address(InetSocketAddress address) {\n this.address = address;\n return this;\n }", "public Data getDefinedDataContaining(Address addr);", "public IndividualAddress(final byte[] address)\n\t{\n\t\tsuper(address);\n\t}", "public ByteBuffer read(long address)\n {\n return tryRead(address, null);\n }", "abstract public Address createAddress(String addr);", "public Packet(String data, String checksum) {\n\t\t\tthis.data = data;\n\t\t\tthis.checksum = checksum;\n\t\t}", "private BytesReference newBytesReference(int length, int offset) throws IOException {\n final BytesStreamOutput out = new BytesStreamOutput(length + offset);\n for (int i = 0; i < length + offset; i++) {\n out.writeByte((byte) random().nextInt(1 << 8));\n }\n assertEquals(length + offset, out.size());\n BytesArray ref = new BytesArray(out.bytes().toBytesRef().bytes, offset, length);\n assertEquals(length, ref.length());\n assertTrue(ref instanceof BytesArray);\n assertThat(ref.length(), Matchers.equalTo(length));\n return ref;\n }", "public DataBuffer createDataBuffer() {\n DataBuffer dataBuffer = null;\n\n int size = getBufferSize();\n switch (dataType) {\n case DataBuffer.TYPE_BYTE:\n dataBuffer = new DataBufferByte(size, numBanks);\n break;\n case DataBuffer.TYPE_USHORT:\n dataBuffer = new DataBufferUShort(size, numBanks);\n break;\n case DataBuffer.TYPE_SHORT:\n dataBuffer = new DataBufferShort(size, numBanks);\n break;\n case DataBuffer.TYPE_INT:\n dataBuffer = new DataBufferInt(size, numBanks);\n break;\n case DataBuffer.TYPE_FLOAT:\n dataBuffer = new DataBufferFloat(size, numBanks);\n break;\n case DataBuffer.TYPE_DOUBLE:\n dataBuffer = new DataBufferDouble(size, numBanks);\n break;\n }\n\n return dataBuffer;\n }", "public TextObjectBaseRecord(short id, short size, byte [] data, int offset)\n {\n super(id, size, data, offset);\n \n }", "public ManufacturerSpecificData(@NonNull byte[] data, int offset, int length) {\n\t\tsuper(length);\n\n\t\t// Company Identifier Code\n\t\tmCompanyIdentifier = BLEUtils.createUInt16(data, offset + 2);\n\n\t\t// Manufacturer Specific Data\n\t\tmManufacturerSpecificData = new byte[length - 3];\n\t\tif (mManufacturerSpecificData.length > 0) {\n\t\t\tSystem.arraycopy(data, offset + 4, mManufacturerSpecificData, 0, mManufacturerSpecificData.length);\n\t\t}\n\t}", "public Data getDataContaining(Address addr);", "public static void setOutBufferData(short length) {\n setAPDUBuffer(length);\n SATAccessor.setOutBufferData(length);\n }", "abstract public Buffer createBufferFromData(byte[] data, int size);", "public Address createAddress(String address);", "public DataBlock() {\n headerPointer = 0;\n datasPointer = size - 1;\n serialize = new byte[size];\n }", "public void testLongEthernetAddressConstructor()\n {\n // let's test that creating a EthernetAddress from an zero long\n // gives us a null EthernetAddress (definition of null EthernetAddress)\n EthernetAddress ethernet_address =\n new EthernetAddress(0x0000000000000000L);\n assertEquals(\n \"EthernetAddress(long) did not create expected EthernetAddress\",\n NULL_ETHERNET_ADDRESS_LONG,\n ethernet_address.toLong());\n \n // let's test creating an array from a good long\n ethernet_address = new EthernetAddress(VALID_ETHERNET_ADDRESS_LONG);\n assertEquals(\n \"EthernetAddress(long) did not create expected EthernetAddress\",\n VALID_ETHERNET_ADDRESS_LONG,\n ethernet_address.toLong());\n }", "@Override\n\t\t\t public void getData(final int length) throws Exception {\n\t\t\t\t if (self.state.masked) {\n\t\t\t\t\t /*\n\t\t\t self.expectHeader(4, function(data) {\n\t\t\t var mask = data;\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['8'].finish.call(self, mask, data);\n\t\t\t });\n\t\t\t });*/\n\t\t\t\t\t self.expectHeader(4, new PacketHandler(){\n\n\t\t\t\t\t\t @Override\n\t\t\t\t\t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t\t\t\t\t final byte[] mask = new byte[4]; ///data.array();\n\t\t\t\t\t\t\t mask[0] = data.get(0);\n\t\t\t\t\t\t\t mask[1] = data.get(1);\n\t\t\t\t\t\t\t mask[2] = data.get(2);\n\t\t\t\t\t\t\t mask[3] = data.get(3);\n\n\t\t\t\t\t\t\t self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t\t public void onPacket(ByteBuffer data2)\n\t\t\t\t\t\t\t\t\t\t throws Exception {\n\t\t\t\t\t\t\t\t\t finish(mask, data2);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t }\n\n\t\t\t\t\t });\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t /*self.expectData(length, function(data) {\n\t\t\t\t\t\t opcodes['8'].finish.call(self, null, data);\n\t\t\t\t\t });*/\n\t\t\t\t\t self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onPacket(ByteBuffer data) throws Exception {\n finish(null, data);\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 }", "@Override\n\t\t\t public void getData(final int length) throws Exception {\n\t\t\t if (self.state.masked) {\n\t\t\t \t /*\n\t\t\t this.expectHeader(4, function(data) {\n\t\t\t var mask = data;\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['10'].finish.call(self, mask, data);\n\t\t\t });\n\t\t\t });*/\n\t\t\t \t self.expectHeader(4, new PacketHandler(){\n\n\t\t\t \t\t @Override\n\t\t\t \t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t \t\t\t final byte[] mask = new byte[4]; ///data.array();\n\t\t\t \t\t\t mask[0] = data.get(0);\n\t\t\t \t\t\t mask[1] = data.get(1);\n\t\t\t \t\t\t mask[2] = data.get(2);\n\t\t\t \t\t\t mask[3] = data.get(3);\n\t\t\t \t\t\t\n\t\t\t \t\t\t self.expectData(length, new PacketHandler(){\n\t\t\t \t\t\t\t @Override\n\t\t\t\t\t \t\t public void onPacket(ByteBuffer data2) throws Exception {\n\t\t\t \t\t\t\t\t finish(mask, data2);\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 });\n\t\t\t }\n\t\t\t else {\n\t\t\t \t /*\n\t\t\t this.expectData(length, function(data) {\n\t\t\t opcodes['10'].finish.call(self, null, data);\n\t\t\t });*/\n\t\t\t \t self.expectData(length, new PacketHandler(){\n\t\t\t \t\t \n\t\t\t \t\t @Override\n\t\t\t \t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t\t \t\t finish(null, data);\n\t\t\t \t\t }\n\n\t\t\t \t });\n\t\t\t }\n\t\t\t }", "public void testByteArrayEthernetAddressConstructor()\n {\n // lets test some error cases\n // first, passing null\n try\n {\n /*EthernetAddress ethernet_address =*/\n new EthernetAddress((byte[])null);\n // if we reached here we failed because we didn't get an exception\n fail(\"Expected exception not caught\");\n }\n catch (NullPointerException ex)\n {\n // this is the success case so do nothing\n }\n catch (Exception ex)\n {\n fail(\"Caught unexpected exception: \" + ex);\n }\n \n // now an array that is too small\n try\n {\n /*EthernetAddress ethernet_address =*/\n new EthernetAddress(\n new byte[ETHERNET_ADDRESS_ARRAY_LENGTH - 1]);\n // if we reached here we failed because we didn't get an exception\n fail(\"Expected exception not caught\");\n }\n catch (NumberFormatException ex)\n {\n // this is the success case so do nothing\n }\n catch (Exception ex)\n {\n fail(\"Caught unexpected exception: \" + ex);\n }\n\n // now an array that is too big\n try {\n /*EthernetAddress ethernet_address =*/\n new EthernetAddress(\n new byte[ETHERNET_ADDRESS_ARRAY_LENGTH + 1]);\n // if we reached here we failed because we didn't get an exception\n fail(\"Expected exception not caught\");\n } catch (NumberFormatException ex) {\n // this is the success case so do nothing\n } catch (Exception ex) {\n fail(\"Caught unexpected exception: \" + ex);\n }\n\n // let's test that creating a EthernetAddress from an zero'd array\n // gives us a null EthernetAddress (definition of null EthernetAddress)\n EthernetAddress ethernet_address =\n new EthernetAddress(new byte[ETHERNET_ADDRESS_ARRAY_LENGTH]);\n assertEquals(\n \"EthernetAddress(byte[]) did not create expected EthernetAddress\",\n NULL_ETHERNET_ADDRESS_LONG,\n ethernet_address.toLong());\n \n // let's test creating an array from a good byte array\n ethernet_address =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertEquals(\n \"EthernetAddress(byte[]) did not create expected EthernetAddress\",\n VALID_ETHERNET_ADDRESS_LONG,\n ethernet_address.toLong());\n }", "public Packet createPacket() {\n\t\treturn new Packet((ByteBuffer) buffer.flip());\n\t}", "public DataBlock(byte[] serialize) {\n this.serialize = serialize;\n int[] pointers = findPointer();\n headerPointer = pointers[0];\n datasPointer = pointers[1];\n }", "ITaggedData Create(short tag, byte[] data, int offset, int count);", "public Data getDefinedDataBefore(Address addr);", "public RoutePacket(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "@Override\n\t\t\t public void getData(final int length) throws Exception {\n\t\t\t if (self.state.masked) {\n\t\t\t \t /*\n\t\t\t self.expectHeader(4, function(data) {\n\t\t\t var mask = data;\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['9'].finish.call(self, mask, data);\n\t\t\t });\n\t\t\t });*/\n\t\t\t \t self.expectHeader(4, new PacketHandler(){\n\n\t\t\t \t\t @Override\n\t\t\t \t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t \t\t\t final byte[] mask = new byte[4]; ///data.array();\n\t\t\t \t\t\t mask[0] = data.get(0);\n\t\t\t \t\t\t mask[1] = data.get(1);\n\t\t\t \t\t\t mask[2] = data.get(2);\n\t\t\t \t\t\t mask[3] = data.get(3);\n\n\t\t\t \t\t\t self.expectData(length, new PacketHandler(){\n\n\t\t\t \t\t\t\t @Override\n\t\t\t \t\t\t\t public void onPacket(ByteBuffer data2)\n\t\t\t \t\t\t\t\t\t throws Exception {\n\t\t\t \t\t\t\t\t finish(mask, data2);\t\t\t\t\t\t\t\t\t\n\t\t\t \t\t\t\t }\n\n\t\t\t \t\t\t });\n\t\t\t \t\t }\n\n\t\t\t \t });\n\t\t\t }\n\t\t\t else {\n\t\t\t \t /*\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['9'].finish.call(self, null, data);\n\t\t\t });*/\n\t\t\t \t self.expectData(length, new PacketHandler(){\n\n\t\t\t \t\t @Override\n\t\t\t \t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t \t\t\t finish(null, data);\t\t\t\t\t\t\t\n\t\t\t \t\t }\n\n\t\t\t \t });\n\t\t\t }\n\t\t\t }", "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}", "@Override\n\t\t\t public void getData(final int length) throws Exception {\n\t\t\t\t if (self.state.masked) {\n\t\t\t\t\t /*self.expectHeader(4, function(data) {\n\t\t\t var mask = data;\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['2'].finish.call(self, mask, data);\n\t\t\t });\n\t\t\t });*/\n\t\t\t\t\t self.expectHeader(4, new PacketHandler(){\n\n\t\t\t\t\t\t @Override\n\t\t\t\t\t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t\t\t\t\t final byte[] mask = new byte[4]; ///data.array();\n\t\t\t\t\t\t\t mask[0] = data.get(0);\n\t\t\t\t\t\t\t mask[1] = data.get(1);\n\t\t\t\t\t\t\t mask[2] = data.get(2);\n\t\t\t\t\t\t\t mask[3] = data.get(3);\n\n\t\t\t\t\t\t\t self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t\t public void onPacket(ByteBuffer data2)\n\t\t\t\t\t\t\t\t\t\t throws Exception {\n\t\t\t\t\t\t\t\t\t finish(mask, data2);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t }\n\n\t\t\t\t\t });\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t /*\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['2'].finish.call(self, null, data);\n\t\t\t });*/\n\t\t\t\t\t self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t @Override\n\t\t\t\t\t\t public void onPacket(ByteBuffer data) throws Exception {\n\t\t\t\t\t\t\t finish(null, data);\t\t\t\t\t\t\t\n\t\t\t\t\t\t }\n\n\t\t\t\t\t });\n\t\t\t\t }\n\t\t\t }", "@Override\n public DataBuffer reallocate(long length) {\n val oldPointer = ptrDataBuffer.primaryBuffer();\n\n if (isAttached()) {\n val capacity = length * getElementSize();\n val nPtr = getParentWorkspace().alloc(capacity, dataType(), false);\n this.ptrDataBuffer.setPrimaryBuffer(new PagedPointer(nPtr, 0), length);\n\n switch (dataType()) {\n case BOOL:\n pointer = nPtr.asBoolPointer();\n indexer = new DeviceBooleanIndexer((BooleanPointer) pointer);\n break;\n case UTF8:\n case BYTE:\n case UBYTE:\n pointer = nPtr.asBytePointer();\n indexer = new DeviceByteIndexer((BytePointer) pointer);\n break;\n case UINT16:\n case SHORT:\n pointer = nPtr.asShortPointer();\n indexer = new DeviceShortIndexer((ShortPointer) pointer);\n break;\n case UINT32:\n pointer = nPtr.asIntPointer();\n indexer = new DeviceUIntIndexer((IntPointer) pointer);\n break;\n case INT:\n pointer = nPtr.asIntPointer();\n indexer = new DeviceIntIndexer((IntPointer) pointer);\n break;\n case DOUBLE:\n pointer = nPtr.asDoublePointer();\n indexer = new DeviceDoubleIndexer((DoublePointer) pointer);\n break;\n case FLOAT:\n pointer = nPtr.asFloatPointer();\n indexer = new DeviceFloatIndexer((FloatPointer) pointer);\n break;\n case HALF:\n pointer = nPtr.asShortPointer();\n indexer = new DeviceHalfIndexer((ShortPointer) pointer);\n break;\n case BFLOAT16:\n pointer = nPtr.asShortPointer();\n indexer = new DeviceBfloat16Indexer((ShortPointer) pointer);\n break;\n case UINT64:\n case LONG:\n pointer = nPtr.asLongPointer();\n indexer = new DeviceLongIndexer((LongPointer) pointer);\n break;\n }\n\n nativeOps.memcpySync(pointer, oldPointer, this.length() * getElementSize(), 3, null);\n workspaceGenerationId = getParentWorkspace().getGenerationId();\n } else {\n this.ptrDataBuffer.expand(length);\n val nPtr = new PagedPointer(this.ptrDataBuffer.primaryBuffer(), length);\n\n switch (dataType()) {\n case BOOL:\n pointer = nPtr.asBoolPointer();\n indexer = new DeviceBooleanIndexer((BooleanPointer) pointer);\n break;\n case UTF8:\n case BYTE:\n case UBYTE:\n pointer = nPtr.asBytePointer();\n indexer = new DeviceByteIndexer((BytePointer) pointer);\n break;\n case UINT16:\n case SHORT:\n pointer = nPtr.asShortPointer();\n indexer = new DeviceShortIndexer((ShortPointer) pointer);\n break;\n case UINT32:\n pointer = nPtr.asIntPointer();\n indexer = new DeviceUIntIndexer((IntPointer) pointer);\n break;\n case INT:\n pointer = nPtr.asIntPointer();\n indexer = new DeviceIntIndexer((IntPointer) pointer);\n break;\n case DOUBLE:\n pointer = nPtr.asDoublePointer();\n indexer = new DeviceDoubleIndexer((DoublePointer) pointer);\n break;\n case FLOAT:\n pointer = nPtr.asFloatPointer();\n indexer = new DeviceFloatIndexer((FloatPointer) pointer);\n break;\n case HALF:\n pointer = nPtr.asShortPointer();\n indexer = new DeviceHalfIndexer((ShortPointer) pointer);\n break;\n case BFLOAT16:\n pointer = nPtr.asShortPointer();\n indexer = new DeviceBfloat16Indexer((ShortPointer) pointer);\n break;\n case UINT64:\n case LONG:\n pointer = nPtr.asLongPointer();\n indexer = new DeviceLongIndexer((LongPointer) pointer);\n break;\n }\n }\n\n this.underlyingLength = length;\n this.length = length;\n return this;\n }", "private Account createAccount(byte[] address) {\n return new Account(address);\n }", "Address createAddress();", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n address_ = value;\n onChanged();\n return this;\n }", "public RoutePacket(int data_length, int base_offset) {\n super(data_length, base_offset);\n amTypeSet(AM_TYPE);\n }", "public BufferedDataInputStream(InputStream o, int bufLength) {\n\t\tsuper(o, bufLength);\n\t}", "public void delete(short addressInDataBlock) {\n \n //transform 2 bytes in 1 short \n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //delete the data\n serialize[addressInDataBlock * 4] = 0x00;\n serialize[addressInDataBlock * 4 + 1] = 0x00;\n serialize[addressInDataBlock * 4 + 2] = 0x00;\n serialize[addressInDataBlock * 4 + 3] = 0x00;\n\n for (short i = initial; i < initial + sizeData; i++) {\n serialize[i] = 0x00;\n }\n }", "private static byte[] createDataBA(byte[] dataRead) {\n\t\t//Creating byte and adding content to byte[]\n\t\tbyte[] data = new byte[SIZE_PACKET];\n\t\tByteBuffer b = ByteBuffer.wrap(data);\n\t\tb.clear();\n\t\t\n\t\t//Adding content of byte[] to data byte[]\n\t\tfor(int a = 0; a < dataRead.length; a++) {\n\t\t\tdata[a + INDEX_CONTENT] = dataRead[a]; \n\t\t}\n\n\t\t//Adding headers to the byte[]\n\t\tb.rewind();\n\t\tb.putLong(0);\n\t\tb.putInt(seqNumber);\n\t\tb.putInt(PACKET_DATA);\n\t\tb.putInt(dataRead.length);\n\n\t\t//Calculating checksum and adding to byte[]\n\t\tchecksum = new CRC32();\n\t\tchecksum.reset();\n\t\tchecksum.update(data, INDEX_SEQ, data.length-INDEX_SEQ);\n\t\tlong chksum = checksum.getValue();\n\t\tb.rewind();\n\t\tb.putLong(chksum);\n\n\t\t//Return data byte[]\n\t\treturn data;\n\t}", "public void read(long address, ByteBuffer destination)\n {\n tryRead(address, destination);\n }", "public abstract Packet create(final int[] data,\n final int identifier);", "public DiscreteTag(String tagAddress, String tagName, int dataSize){\n\n mTagAddress = tagAddress;\n mTagName = tagName;\n mAddedToReadTable = false;\n mFoundOnPLC = false;\n\n mDataType = BaseTag.DATA_TYPE_DISCRETE;\n mDataSize = dataSize;\n mChildTags = createChildes(dataSize);\n\n }", "public static void setAPDUBuffer(short length) {\n setAPDUBuffer(currentTI.getAPDUBuffer(), length);\n }", "void setDP1( byte[] buffer, short offset, short length) throws CryptoException;", "protected abstract void createPacketData();", "private static DatagramPacket createPacket(byte[] data, SocketAddress remote) {\r\n\t\tDatagramPacket packet = new DatagramPacket(data, data.length, remote);\r\n\t\treturn packet;\r\n\t}", "@Override\n\t\t\t public void getData(final int length) throws Exception {\n\t\t\t if (self.state.masked) {\n\t\t\t /*self.expectHeader(4, function(data) {\n\t\t\t var mask = data;\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['1'].finish.call(self, mask, data);\n\t\t\t });\n\t\t\t });*/\n\t\t\t \t self.expectHeader(4, new PacketHandler(){\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onPacket(ByteBuffer data) throws Exception {\n final byte[] mask = new byte[4]; ///data.array();\n mask[0] = data.get(0);\n mask[1] = data.get(1);\n mask[2] = data.get(2);\n mask[3] = data.get(3);\n \n Log.d(TAG, \"mask: \"+mask[0]+\" \"+mask[1]+\" \"+mask[2]+\" \"+mask[3]);\n\n self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onPacket(ByteBuffer data2) throws Exception {\n finish(mask, data2);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n \t\n });\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\t else {\n\t\t\t /*self.expectData(length, function(data) {\n\t\t\t opcodes['1'].finish.call(self, null, data);\n\t\t\t });*/\n self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onPacket(ByteBuffer data) throws Exception {\n finish(null, data);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n \t \n });\n\t\t\t }\n\t\t\t }", "public static Address createInvalidAddressFixture() {\n Map<String, Object> objectMap = new HashMap<String, Object>();\n objectMap.put(\"name\", \"Undefault New Wu\");\n objectMap.put(\"street1\", \"Clayton St.\");\n objectMap.put(\"street_no\", \"215215\");\n objectMap.put(\"street2\", null);\n objectMap.put(\"city\", \"San Francisco\");\n objectMap.put(\"state\", \"CA\");\n objectMap.put(\"zip\", \"94117\");\n objectMap.put(\"country\", \"US\");\n objectMap.put(\"phone\", \"+1 555 341 9393\");\n objectMap.put(\"email\", \"[email protected]\");\n objectMap.put(\"is_residential\", false);\n objectMap.put(\"metadata\", \"Customer ID 123456\");\n objectMap.put(\"validate\", true);\n\n try {\n return Address.create(objectMap);\n } catch (ShippoException e) {\n e.printStackTrace();\n }\n return null;\n }", "public @NotNull Address newAddress(@NotNull @Size(min = 1, max = 255) final String street,\r\n\t\t\t@NotNull @Size(min = 1, max = 255) final String city, @NotNull final State state, @NotNull Integer zipcode);", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public WorkDataFile(int length)\n\t{\n\t\tsuper(length);\n\t}", "private void expectData(int length, PacketHandler handler) throws Exception {\n\t\tLog.d(TAG, \"expectData, length:\"+length+\",handler:\"+handler);\n\n\t\tif (length == 0) {\n\t\t\thandler.onPacket(null);\n\t\t\treturn;\n\t\t}\n\t\tthis.expectBuffer = this.allocateFromPool(length, this.state.fragmentedOperation);\n\t\tthis.expectHandler = handler;\n\t\tint toRead = length;\n\t\twhile (toRead > 0 && this.overflow.size() > 0) {\n\t\t\tByteBuffer fromOverflow = this.overflow.remove(this.overflow.size() - 1); ///this.overflow.pop();\n\t\t\tif (toRead < fromOverflow.capacity()) this.overflow.add((ByteBuffer) Util.chunkSlice(fromOverflow, toRead, fromOverflow.capacity())/*fromOverflow.slice(toRead)*/);\n\t\t\tint read = Math.min(fromOverflow.capacity(), toRead);\n\n\t\t\tBufferUtil.fastCopy(read, fromOverflow, this.expectBuffer, this.expectOffset);\n\n\t\t\tthis.expectOffset += read;\n\t\t\ttoRead -= read;\n\t\t}\n\t\t\n\t\tLog.d(TAG, \"expectData, expectBuffer:\"+expectBuffer+\",expectOffset:\"+expectOffset);\n\t\t\n\t}", "public @NotNull Address newAddress();", "public static Address newAddress(final String address) throws AddressException,\r\n\t\tUnsupportedEncodingException\r\n\t{\r\n\t\treturn newAddress(address, null, null);\r\n\t}", "protected RecordHeader allocateRecord(String key, int dataLength) throws IOException {\n // search for empty space\n RecordHeader newRecord = null;\n\n for (RecordHeader next : getMemIndex().values()) {\n int free = next.getFreeSpace();\n if (dataLength <= next.getFreeSpace()) {\n newRecord = next.split();\n writeRecordHeaderToIndex(next);\n break;\n }\n }\n if (newRecord == null) {\n // append record to end of file - grows file to allocate space\n long fp = getFileLength();\n setFileLength(fp + dataLength);\n newRecord = new RecordHeader(fp, dataLength);\n }\n return newRecord;\n }", "public RxTxMonitoringMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "Length createLength();", "public static byte[] createPacket(byte[] data) {\r\n byte[] header = createHeader(seqNo);\r\n byte[] packet = new byte[data.length + header.length]; // data + header\r\n System.arraycopy(header, 0, packet, 0, header.length);\r\n System.arraycopy(data, 0, packet, header.length, data.length);\r\n seqNo = seqNo + 1;\r\n return packet;\r\n }", "public void setData(int address, String data, int size, String comment) {\n\t\tint bank = address % numOfbank;\n\t\t\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\td.setData(data);\n\t\t\td.setType(MemoryType.DATA);\n\t\t\td.setSize(size);\n\t\t\tlogger.info(\"data memory update, bank:\" + bank +\", address:\"+ address);\n\t\t\tpublishUpdate(address, data,comment);\n\t\t} else{\n\t\t\tlogger.error(\"invalid data memory address \" + address + \" in bank \" + bank);\n\t\t}\n\t}", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n address_ = value;\n onChanged();\n return this;\n }", "public TextObjectBaseRecord(short id, short size, byte [] data)\n {\n super(id, size, data);\n \n }", "public byte[] createReplyData(byte[] receivedData) {\r\n return findableAddress.getAddress().getAddress();\r\n }", "public static byte padDataLength(byte length) {\n if (length > 48) {\n return 64;\n }\n return paddedDataLengthLookup[length];\n }", "public TagData(byte[] epc)\n {\n this(epc, null);\n }", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) { throw new NullPointerException(); }\n checkByteStringIsUtf8(value);\n address_ = value;\n bitField0_ |= 0x00000020;\n onChanged();\n return this;\n }", "@Test\n public void testValueOfByteArrayOffsetIPv4() {\n Ip4Address ipAddress;\n byte[] value;\n\n value = new byte[] {11, 22, 33, // Preamble\n 1, 2, 3, 4,\n 44, 55}; // Extra bytes\n ipAddress = Ip4Address.valueOf(value, 3);\n assertThat(ipAddress.toString(), is(\"1.2.3.4\"));\n\n value = new byte[] {11, 22, // Preamble\n 0, 0, 0, 0,\n 33}; // Extra bytes\n ipAddress = Ip4Address.valueOf(value, 2);\n assertThat(ipAddress.toString(), is(\"0.0.0.0\"));\n\n value = new byte[] {11, 22, // Preamble\n (byte) 0xff, (byte) 0xff,\n (byte) 0xff, (byte) 0xff,\n 33}; // Extra bytes\n ipAddress = Ip4Address.valueOf(value, 2);\n assertThat(ipAddress.toString(), is(\"255.255.255.255\"));\n }", "public XioClient newInstance( InetSocketAddress address);", "private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }", "public Address(NetworkParameters params, byte[] hash160) {\n\t\tsuper(params.getAddressHeader(), hash160);\n\t\tcheckArgument(hash160.length == 20, \"Addresses are 160-bit hashes, so you must provide 20 bytes\");\n\t}", "public IPV4Address()\n {\n address = new int[4];\n\n address[0] = 0;\n address[1] = 0;\n address[2] = 0;\n address[3] = 0;\n }", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n address_ = value;\n onChanged();\n return this;\n }", "@Nonnull\n public Memory read(@Nonnegative long offset, @Nonnegative int length) {\n return this.read(this.resolvePointer(offset), length);\n }", "public BinaryNumber(int length) {\n\t\tdata = new int[length];\n\t\tfor(int i = 0;i < length;i++) {\n\t\t\tdata[i] = 0;\n\t\t}\n\t}", "public Address(Short addressId, String address, String address2, String district, Short cityId, String postalCode, String phone, Date lastUpdate, byte[] location) {\r\n this.addressId = addressId;\r\n this.address = address;\r\n this.address2 = address2;\r\n this.district = district;\r\n this.cityId = cityId;\r\n this.postalCode = postalCode;\r\n this.phone = phone;\r\n this.lastUpdate = lastUpdate;\r\n this.location = location;\r\n }", "protected abstract D createData();", "public void fromBytes(ByteBuffer buffer) {\n }", "private FullExtTcpPacket createPacket(\n long dataSizeByte,\n long sequenceNumber,\n long ackNumber,\n boolean ACK,\n boolean SYN,\n boolean ECE\n ) {\n return new FullExtTcpPacket(\n flowId, dataSizeByte, sourceId, destinationId,\n 100, 80, 80, // TTL, source port, destination port\n sequenceNumber, ackNumber, // Seq number, Ack number\n false, false, ECE, // NS, CWR, ECE\n false, ACK, false, // URG, ACK, PSH\n false, SYN, false, // RST, SYN, FIN\n congestionWindow, 0 // Window size, Priority\n );\n }", "public Address() {}", "public void setData(ByteBuffer buffer)\r\n\t\tthrows PDUException, NotEnoughDataInByteBufferException, TerminatingZeroNotFoundException {\r\n\t\tbyte[] messageData = null;\r\n\t\tint length = 0;\r\n\t\tif (buffer != null) {\r\n\t\t\tmessageData = buffer.getBuffer();\r\n\t\t\tlength = messageData == null ? 0 : messageData.length;\r\n\t\t\tcheckString(minLength, length, maxLength);\r\n\t\t}\r\n\t\tthis.message = null;\r\n\t\tthis.messageData = messageData;\r\n\t\tthis.length = length;\r\n\t}", "public Paquet(byte []datainitiale) {\n\t\t\n\t\t\n\t\tsuper();\n\t\t\n\t\t_instance_id++;\n\t\tSystem.out.print(\"\\nmnb = \"+_instance_id);\n\n\t\tshort header = (short) ((datainitiale[0] & 255)<<8 | (datainitiale[1] & 255 )) ;\n\t\t\t\n\t\tthis.id = (short) (header >> 2);\n\t\tsizeofsize = (byte) (header & 3);\n\t\t\n\t\tswitch(sizeofsize)\n\t\t{\n\t\t\tcase 0 \t: \tsize = 0;break;\n\t\t\tcase 1 \t:\tsize = datainitiale[2] & 255;break;\n\t\t\tcase 2\t:\tsize = ((datainitiale[2] & 255)<<8 | datainitiale[3]& 255);break;\n\t\t\tdefault :\tsize = (((datainitiale[2] & 255 )<< 16 | (datainitiale[3]& 255) << 8) | datainitiale[4] & 255);\t\n\t\t}\n\t\tint t;\n\tif(size<8192)\n\t\t{this.data = new byte[size];\n\t\tt=size;\n\t\tfor(int i = 0; i < t ; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\tfor(int i = 0; i < datainitiale.length-(t+2+sizeofsize) ; i++)\n\t\t\tdatainitiale[i]=datainitiale[i+t+2+sizeofsize];\n\t\t}\n\telse \n\t\t{this.data=new byte[datainitiale.length-sizeofsize-2];\n\t\tt=datainitiale.length;\n\t\tfor(int i = 0; i <datainitiale.length-sizeofsize-2; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t}", "public DataHandler(int port, int receiveLength, int sendLength) {\r\n\r\n\t\ttry {\r\n\t\t\tserverSocket = new DatagramSocket(port);\r\n\t\t} catch (SocketException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t\t//Exit Program is another instance is running, it throws error when trying to take a socket\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Another instance is already running\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\treceiveData = new byte[receiveLength];\r\n\t\tthread = new ListenThread(this);\r\n\t\t\r\n\t}", "public AIDProxy(byte bArray[], short offset, byte length)\n throws SystemException, NullPointerException, ArrayIndexOutOfBoundsException, SecurityException {\n if (length < 5 || length > 16) {\n SystemException.throwIt(SystemException.ILLEGAL_VALUE);\n }\n aid = new byte[length];\n Util.arrayCopy(bArray, offset, aid, (short) 0, length);\n }" ]
[ "0.6877047", "0.6344325", "0.59732896", "0.5944565", "0.5918106", "0.5660998", "0.5578372", "0.55409205", "0.53267366", "0.5323421", "0.5287356", "0.52756196", "0.52738625", "0.52256626", "0.5204539", "0.51586634", "0.51482236", "0.51355386", "0.5100706", "0.50714666", "0.5066868", "0.5052335", "0.5036731", "0.5019077", "0.50169134", "0.5010365", "0.49988657", "0.4987318", "0.49871188", "0.49843442", "0.49805033", "0.49775073", "0.4972888", "0.496738", "0.4963061", "0.49605355", "0.49577573", "0.49559876", "0.49505153", "0.4943212", "0.49423987", "0.49350697", "0.49328032", "0.49254456", "0.49209762", "0.4912734", "0.49106207", "0.48920557", "0.48818877", "0.48776042", "0.48762068", "0.48422298", "0.48326892", "0.4829309", "0.48241803", "0.4816038", "0.4815391", "0.48095155", "0.47994715", "0.4787419", "0.47864813", "0.47731867", "0.4772796", "0.47706875", "0.47670412", "0.47473842", "0.47418347", "0.47389922", "0.4735389", "0.47218388", "0.47169128", "0.47058743", "0.46915478", "0.46901646", "0.46841487", "0.46841487", "0.468406", "0.46820718", "0.46816468", "0.46707505", "0.46688712", "0.46662542", "0.4655208", "0.46523407", "0.46479136", "0.46467766", "0.4646706", "0.46415824", "0.46415824", "0.4641543", "0.46236736", "0.46214423", "0.46208778", "0.46200305", "0.46151897", "0.4609881", "0.45965764", "0.45962507", "0.45960346", "0.45957473" ]
0.69304454
0
Creates a new defined Data object at the given address. This ignores the bytes that are present
public Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data createData(Address addr, DataType dataType, int length)\n\t\t\tthrows CodeUnitInsertionException;", "public Data getUndefinedDataAt(Address addr);", "public Data getDataAt(Address addr);", "public Data getDefinedDataAt(Address addr);", "public abstract byte[] readData(int address, int length);", "private LogData getDefaultLogData(long address) {\n ByteBuf b = Unpooled.buffer();\n Serializers.CORFU.serialize(PAYLOAD_DATA.getBytes(), b);\n LogData ld = new LogData(DataType.DATA, b);\n ld.setGlobalAddress(address);\n ld.setEpoch(1L);\n return ld;\n }", "public DeviceData() {\r\n this.rtAddress = 0;\r\n this.subAddress = 0;\r\n this.txRx = 0;\r\n this.data = new short[32];\r\n }", "abstract public Address createAddress(String addr);", "public static Address createInvalidAddressFixture() {\n Map<String, Object> objectMap = new HashMap<String, Object>();\n objectMap.put(\"name\", \"Undefault New Wu\");\n objectMap.put(\"street1\", \"Clayton St.\");\n objectMap.put(\"street_no\", \"215215\");\n objectMap.put(\"street2\", null);\n objectMap.put(\"city\", \"San Francisco\");\n objectMap.put(\"state\", \"CA\");\n objectMap.put(\"zip\", \"94117\");\n objectMap.put(\"country\", \"US\");\n objectMap.put(\"phone\", \"+1 555 341 9393\");\n objectMap.put(\"email\", \"[email protected]\");\n objectMap.put(\"is_residential\", false);\n objectMap.put(\"metadata\", \"Customer ID 123456\");\n objectMap.put(\"validate\", true);\n\n try {\n return Address.create(objectMap);\n } catch (ShippoException e) {\n e.printStackTrace();\n }\n return null;\n }", "public Address createAddress(String address);", "Address createAddress();", "public Data getDefinedDataContaining(Address addr);", "public Data getDefinedDataAfter(Address addr);", "public IndividualAddress(final byte[] address)\n\t{\n\t\tsuper(address);\n\t}", "public Data getDataBefore(Address addr);", "private Account createAccount(byte[] address) {\n return new Account(address);\n }", "public Data getDataAfter(Address addr);", "public DataBlock(byte[] serialize) {\n this.serialize = serialize;\n int[] pointers = findPointer();\n headerPointer = pointers[0];\n datasPointer = pointers[1];\n }", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n address_ = value;\n onChanged();\n return this;\n }", "public Data getDefinedDataBefore(Address addr);", "public DataBlock() {\n headerPointer = 0;\n datasPointer = size - 1;\n serialize = new byte[size];\n }", "protected abstract D createData();", "public static Address newAddress(final String address) throws AddressException,\r\n\t\tUnsupportedEncodingException\r\n\t{\r\n\t\treturn newAddress(address, null, null);\r\n\t}", "protected O bytesToObject(byte[] data) throws OBException,\r\n InstantiationException, IllegalAccessException, IllegalIdException {\r\n O res = type.newInstance();\r\n try {\r\n res.load(data);\r\n } catch (IOException e) {\r\n throw new OBException(e);\r\n }\r\n return res;\r\n }", "public abstract int writeData(int address, byte[] buffer, int length);", "public Address() {}", "public DatagramPacket createDatagramPacket(InetAddress address, Integer port) {\n byte[] message = this.buildBytes();\n return new DatagramPacket(message, message.length, address, port);\n }", "public DatadogBuilder address(InetSocketAddress address) {\n this.address = address;\n return this;\n }", "public IPv4Address(byte[] bytes) throws AddressValueException {\n\t\tthis(bytes, null);\n\t}", "public Data getDataContaining(Address addr);", "public Data() {}", "public @NotNull Address newAddress();", "public TagData(byte[] epc)\n {\n this(epc, null);\n }", "protected abstract void createPacketData();", "public DataBuffer createDataBuffer() {\n DataBuffer dataBuffer = null;\n\n int size = getBufferSize();\n switch (dataType) {\n case DataBuffer.TYPE_BYTE:\n dataBuffer = new DataBufferByte(size, numBanks);\n break;\n case DataBuffer.TYPE_USHORT:\n dataBuffer = new DataBufferUShort(size, numBanks);\n break;\n case DataBuffer.TYPE_SHORT:\n dataBuffer = new DataBufferShort(size, numBanks);\n break;\n case DataBuffer.TYPE_INT:\n dataBuffer = new DataBufferInt(size, numBanks);\n break;\n case DataBuffer.TYPE_FLOAT:\n dataBuffer = new DataBufferFloat(size, numBanks);\n break;\n case DataBuffer.TYPE_DOUBLE:\n dataBuffer = new DataBufferDouble(size, numBanks);\n break;\n }\n\n return dataBuffer;\n }", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n address_ = value;\n onChanged();\n return this;\n }", "public Packet createPacket() {\n\t\treturn new Packet((ByteBuffer) buffer.flip());\n\t}", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n address_ = value;\n onChanged();\n return this;\n }", "public Address() {\r\n\t\tsuper();\r\n\t}", "public Packet(String data, String checksum) {\n\t\t\tthis.data = data;\n\t\t\tthis.checksum = checksum;\n\t\t}", "public Builder setAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) { throw new NullPointerException(); }\n checkByteStringIsUtf8(value);\n address_ = value;\n bitField0_ |= 0x00000020;\n onChanged();\n return this;\n }", "public Address() {\n\t\tsuper();\n\n\t}", "DataHRecordData() {}", "DataElement createDataElement();", "public Address() {\n \t\n }", "public StreamData(String name)\n {\n _data = new LinkedList<byte[]>();\n this.Name = name;\n this.Length = 0;\n }", "public MulticastDataBackup(String address, int mport) {\n mscastAdress = address;\n mcastPort = mport;\n peerID = Peer.getPeerId();\n }", "public void fromBytes(ByteBuffer buffer) {\n }", "private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }", "public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}", "public Address() {\n\t}", "private static DatagramPacket createPacket(byte[] data, SocketAddress remote) {\r\n\t\tDatagramPacket packet = new DatagramPacket(data, data.length, remote);\r\n\t\treturn packet;\r\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:13.509 -0500\", hash_original_method = \"F3F9FDCE1484676B88E382A49EC8877F\", hash_generated_method = \"E98CBD85708A9D853A0E84BBC5FA6CF1\")\n \npublic static ASN1Object fromByteArray(byte[] data)\n throws IOException\n {\n ASN1InputStream aIn = new ASN1InputStream(data);\n\n try\n {\n return (ASN1Object)aIn.readObject();\n }\n catch (ClassCastException e)\n {\n throw new IOException(\"cannot recognise object in stream\"); \n }\n }", "public Contact createUnresolvedContact(String address,\n String persistentData)\n {\n return createUnresolvedContact( address\n , persistentData\n , getServerStoredContactListRoot());\n }", "public Address getDummyAddress(String name) {\n\t\t if(name.equalsIgnoreCase(\"A\")) return new Address(0xAAAAAAAA);\n\t\telse if(name.equalsIgnoreCase(\"B\")) return new Address(0xBBBBBBBB);\n\t\telse if(name.equalsIgnoreCase(\"C\")) return new Address(0xCCCCCCCC);\n\t\telse if(name.equalsIgnoreCase(\"D\")) return new Address(0xDDDDDDDD);\n\t\telse if(name.equalsIgnoreCase(\"E\")) return new Address(0xEEEEEEEE);\n\t\telse if(name.equalsIgnoreCase(\"F\")) return new Address(0xFFFFFFFF);\n\t\treturn new Address(0);\n\t}", "public static AddressableDataFile getEmptyImmutableDataFile() {\n return new EmptyDataFile();\n }", "protected O bytesToObject(ByteBuffer data) throws OBException,\r\n InstantiationException, IllegalAccessException, IllegalIdException {\r\n return bytesToObject(data.array());\r\n }", "private FullExtTcpPacket createPacket(\n long dataSizeByte,\n long sequenceNumber,\n long ackNumber,\n boolean ACK,\n boolean SYN,\n boolean ECE\n ) {\n return new FullExtTcpPacket(\n flowId, dataSizeByte, sourceId, destinationId,\n 100, 80, 80, // TTL, source port, destination port\n sequenceNumber, ackNumber, // Seq number, Ack number\n false, false, ECE, // NS, CWR, ECE\n false, ACK, false, // URG, ACK, PSH\n false, SYN, false, // RST, SYN, FIN\n congestionWindow, 0 // Window size, Priority\n );\n }", "public XioClient newInstance( InetSocketAddress address);", "public Data(byte[] bytes) {\r\n try {\r\n this.read_data_header(bytes);\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "private static MessageHeader createDataHeader(byte[] bufferBytes, int length) {\n\n\t\tObject[] iov = new Object[1];\n\n\t\tif (length != BUFFER_SIZE) {\n\t\t\tbyte[] lastBuffer = new byte[length];\n\t\t\tSystem.arraycopy(bufferBytes, 0, lastBuffer, 0, length);\n\t\t\tbufferBytes = lastBuffer;\n\t\t}\n\t\tiov[0] = bufferBytes;\n\n\t\tMessageHeader mh = new MessageHeader();\n\t\tmh.setIov(iov);\n\n\t\treturn mh;\n\t}", "public void testByteArrayEthernetAddressConstructor()\n {\n // lets test some error cases\n // first, passing null\n try\n {\n /*EthernetAddress ethernet_address =*/\n new EthernetAddress((byte[])null);\n // if we reached here we failed because we didn't get an exception\n fail(\"Expected exception not caught\");\n }\n catch (NullPointerException ex)\n {\n // this is the success case so do nothing\n }\n catch (Exception ex)\n {\n fail(\"Caught unexpected exception: \" + ex);\n }\n \n // now an array that is too small\n try\n {\n /*EthernetAddress ethernet_address =*/\n new EthernetAddress(\n new byte[ETHERNET_ADDRESS_ARRAY_LENGTH - 1]);\n // if we reached here we failed because we didn't get an exception\n fail(\"Expected exception not caught\");\n }\n catch (NumberFormatException ex)\n {\n // this is the success case so do nothing\n }\n catch (Exception ex)\n {\n fail(\"Caught unexpected exception: \" + ex);\n }\n\n // now an array that is too big\n try {\n /*EthernetAddress ethernet_address =*/\n new EthernetAddress(\n new byte[ETHERNET_ADDRESS_ARRAY_LENGTH + 1]);\n // if we reached here we failed because we didn't get an exception\n fail(\"Expected exception not caught\");\n } catch (NumberFormatException ex) {\n // this is the success case so do nothing\n } catch (Exception ex) {\n fail(\"Caught unexpected exception: \" + ex);\n }\n\n // let's test that creating a EthernetAddress from an zero'd array\n // gives us a null EthernetAddress (definition of null EthernetAddress)\n EthernetAddress ethernet_address =\n new EthernetAddress(new byte[ETHERNET_ADDRESS_ARRAY_LENGTH]);\n assertEquals(\n \"EthernetAddress(byte[]) did not create expected EthernetAddress\",\n NULL_ETHERNET_ADDRESS_LONG,\n ethernet_address.toLong());\n \n // let's test creating an array from a good byte array\n ethernet_address =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertEquals(\n \"EthernetAddress(byte[]) did not create expected EthernetAddress\",\n VALID_ETHERNET_ADDRESS_LONG,\n ethernet_address.toLong());\n }", "public @NotNull Address newAddress(@NotNull @Size(min = 1, max = 255) final String street,\r\n\t\t\t@NotNull @Size(min = 1, max = 255) final String city, @NotNull final State state, @NotNull Integer zipcode);", "public TextObjectBaseRecord(short id, short size, byte [] data, int offset)\n {\n super(id, size, data, offset);\n \n }", "public abstract DataType<T> newInstance();", "public Data getUndefinedDataBefore(Address addr, TaskMonitor monitor);", "public static AsonValue CreateFrom(byte data[]) throws java.io.IOException {\n if((data[0]&0x80)!=0) return new AsonParser().parse(new ByteArrayInputStream(data));\n return new JsonParser().parse(new String(data,\"UTF-8\"));\n }", "public DiscreteTag(String tagAddress, String tagName, int dataSize){\n\n mTagAddress = tagAddress;\n mTagName = tagName;\n mAddedToReadTable = false;\n mFoundOnPLC = false;\n\n mDataType = BaseTag.DATA_TYPE_DISCRETE;\n mDataSize = dataSize;\n mChildTags = createChildes(dataSize);\n\n }", "private Datagram makeFIN(Datagram datagram) {\n Datagram dataToSend = new Datagram();\n dataToSend.setSrcaddr(datagram.getDstaddr());\n dataToSend.setSrcport(datagram.getDstport());\n dataToSend.setDstaddr(datagram.getSrcaddr());\n dataToSend.setDstport(datagram.getSrcport());\n PayLoad data = new PayLoad();\n data.setFIN(true);\n dataToSend.setData(data);\n\n // Calculate checksum for the data to send to client.\n short checkSum = CheckSumService.generateCheckSum(dataToSend);\n dataToSend.setChecksum(checkSum);\n\n return dataToSend;\n }", "public StreetAddress() {}", "public Data getUndefinedDataAfter(Address addr, TaskMonitor monitor);", "private static byte[] createDataBA(byte[] dataRead) {\n\t\t//Creating byte and adding content to byte[]\n\t\tbyte[] data = new byte[SIZE_PACKET];\n\t\tByteBuffer b = ByteBuffer.wrap(data);\n\t\tb.clear();\n\t\t\n\t\t//Adding content of byte[] to data byte[]\n\t\tfor(int a = 0; a < dataRead.length; a++) {\n\t\t\tdata[a + INDEX_CONTENT] = dataRead[a]; \n\t\t}\n\n\t\t//Adding headers to the byte[]\n\t\tb.rewind();\n\t\tb.putLong(0);\n\t\tb.putInt(seqNumber);\n\t\tb.putInt(PACKET_DATA);\n\t\tb.putInt(dataRead.length);\n\n\t\t//Calculating checksum and adding to byte[]\n\t\tchecksum = new CRC32();\n\t\tchecksum.reset();\n\t\tchecksum.update(data, INDEX_SEQ, data.length-INDEX_SEQ);\n\t\tlong chksum = checksum.getValue();\n\t\tb.rewind();\n\t\tb.putLong(chksum);\n\n\t\t//Return data byte[]\n\t\treturn data;\n\t}", "public void setData(int address, String data, int size, String comment) {\n\t\tint bank = address % numOfbank;\n\t\t\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\td.setData(data);\n\t\t\td.setType(MemoryType.DATA);\n\t\t\td.setSize(size);\n\t\t\tlogger.info(\"data memory update, bank:\" + bank +\", address:\"+ address);\n\t\t\tpublishUpdate(address, data,comment);\n\t\t} else{\n\t\t\tlogger.error(\"invalid data memory address \" + address + \" in bank \" + bank);\n\t\t}\n\t}", "public Address(Short addressId, String address, String address2, String district, Short cityId, String postalCode, String phone, Date lastUpdate, byte[] location) {\r\n this.addressId = addressId;\r\n this.address = address;\r\n this.address2 = address2;\r\n this.district = district;\r\n this.cityId = cityId;\r\n this.postalCode = postalCode;\r\n this.phone = phone;\r\n this.lastUpdate = lastUpdate;\r\n this.location = location;\r\n }", "public ByteBuffer read(long address)\n {\n return tryRead(address, null);\n }", "public byte[] createReplyData(byte[] receivedData) {\r\n return findableAddress.getAddress().getAddress();\r\n }", "protected NumericData<?> createData(long numPixels) {\n long bufferLength = numPixels * header.getChannels().size();\n\n switch (header.getChannels().get(0).getFormat()) {\n case UINT:\n return new CustomBinaryData<>(Data.UINT32, dataFactory.newIntData(bufferLength));\n case HALF:\n return new CustomBinaryData<>(Data.SFLOAT16, dataFactory.newShortData(bufferLength));\n case FLOAT:\n return dataFactory.newFloatData(bufferLength);\n default:\n // Should not happen unless this code hasn't been updated after a new ChannelFormat is added\n throw new UnsupportedOperationException(\n \"Unrecognized channel pixel format: \" + header.getChannels().get(0).getFormat());\n }\n }", "public Address() {\n }", "public Address() {\n }", "public RoutePacket(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public static AddressErrors deserialize(java.nio.ByteBuffer data) {\n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "DataType createDataType();", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "abstract public Buffer createBufferFromData(byte[] data, int size);", "public static byte[] createPacket(byte[] data) {\r\n byte[] header = createHeader(seqNo);\r\n byte[] packet = new byte[data.length + header.length]; // data + header\r\n System.arraycopy(header, 0, packet, 0, header.length);\r\n System.arraycopy(data, 0, packet, header.length, data.length);\r\n seqNo = seqNo + 1;\r\n return packet;\r\n }", "public Builder setAddressBytes(\n\t\t\t\t\t\tcom.google.protobuf.ByteString value) {\n\t\t\t\t\tif (value == null) {\n\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t}\n\t\t\t\t\tcheckByteStringIsUtf8(value);\n\n\t\t\t\t\taddress_ = value;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}", "abstract public Buffer createBufferFromString(String data);", "public void delete(short addressInDataBlock) {\n \n //transform 2 bytes in 1 short \n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //delete the data\n serialize[addressInDataBlock * 4] = 0x00;\n serialize[addressInDataBlock * 4 + 1] = 0x00;\n serialize[addressInDataBlock * 4 + 2] = 0x00;\n serialize[addressInDataBlock * 4 + 3] = 0x00;\n\n for (short i = initial; i < initial + sizeData; i++) {\n serialize[i] = 0x00;\n }\n }", "public IndividualAddress(final int address)\n\t{\n\t\tsuper(address);\n\t}", "void loadNodeData(byte[] data) throws Exception;", "public static Buffer createBuffer(byte[] data)\n throws BadParameterException, NoSuccessException {\n\treturn createBuffer(null, data);\n }", "public abstract DataType<T> newInstance(String format);", "public RoutePacket(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }", "public void setInternalAddress(String address);", "public UUID(ByteBuffer byteArray) {\n data = new byte[16];\n byteArray.get(data);\n }", "public static OrderData createAddressData(Action action, String externalKey, OrderDataType type) {\n return new OrderData(OrderDataLevel.ADDRESS, action, externalKey, type);\n }", "ITaggedData Create(short tag, byte[] data, int offset, int count);" ]
[ "0.65660197", "0.64030486", "0.632673", "0.6041307", "0.603932", "0.5943755", "0.56721175", "0.5568642", "0.55500424", "0.55012405", "0.5490273", "0.547927", "0.5460374", "0.54500043", "0.5446275", "0.5443698", "0.5436882", "0.5389645", "0.53822625", "0.5381421", "0.53785545", "0.5372444", "0.53573525", "0.5350515", "0.53382725", "0.52963096", "0.5285234", "0.52816", "0.52780604", "0.5265785", "0.52598894", "0.5217458", "0.52053666", "0.52008474", "0.5192896", "0.5192185", "0.5192185", "0.51775146", "0.51640946", "0.51519483", "0.51519483", "0.5151312", "0.5144576", "0.5134823", "0.50990105", "0.5075838", "0.5067999", "0.50635356", "0.5062601", "0.5049166", "0.50397325", "0.50072426", "0.50002736", "0.49969828", "0.49906543", "0.4972131", "0.49714878", "0.496978", "0.4963719", "0.49497786", "0.4930148", "0.4915306", "0.49133098", "0.49044916", "0.48991677", "0.4894639", "0.48946136", "0.4878554", "0.48679534", "0.48609635", "0.48559192", "0.48545313", "0.48539236", "0.4844946", "0.4837082", "0.4836679", "0.4836516", "0.48320654", "0.4824407", "0.48213175", "0.48108461", "0.48108461", "0.4793659", "0.47792086", "0.47692898", "0.476251", "0.47618824", "0.47614017", "0.4760012", "0.47578272", "0.4749504", "0.47425902", "0.47373888", "0.47372624", "0.47175372", "0.4701478", "0.4700303", "0.47001702", "0.46946695", "0.46928397" ]
0.70011246
0
Clears any code units in the given range returning everything to "db"s, and removing any references in the affected area. Note that the module and fragment structure is unaffected. If part of a code unit is contained in the given address range then the whole code unit will be cleared.
public void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext,\n\t\t\tTaskMonitor monitor) throws CancelledException;", "public void clearComments(Address startAddr, Address endAddr);", "public void clearAll() {\n rangeMap.clear();\n }", "void clearPowertypeRanges();", "void clearOffset();", "public void clearVariable(int offset);", "public void clearAreaReset() {\n for(int x = 0; x < buildSize; x++) {\n for(int y = 4; y < 7; y++) {\n for(int z = 0; z < buildSize; z++) {\n myIal.removeBlock(x, y, z);\n }\n }\n }\n\n myIal.locx = 0; myIal.locy = 0; myIal.locz = 0;\n my2Ial.locx = 0; my2Ial.locy = 0; my2Ial.locz = 0;\n }", "public static void clearWorld() {\r\n \tbabies.clear();\r\n \tpopulation.clear();\r\n }", "public void clearAllDefinitionMappings()\n {\n _lovItemMappings.clear();\n }", "public native void clearReferent();", "void clearAddress() {\n mAddress = HdmiCec.ADDR_UNREGISTERED;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 452,\n FQN=\"llvm::Module::dropAllReferences\", NM=\"_ZN4llvm6Module17dropAllReferencesEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17dropAllReferencesEv\")\n //</editor-fold>\n public void dropAllReferences() {\n for (final Function /*&*/ F : /*Deref*/this) {\n F.dropAllReferences();\n }\n \n for (final GlobalVariable /*&*/ GV : globals()) {\n GV.dropAllReferences();\n }\n \n for (final GlobalAlias /*&*/ GA : aliases()) {\n GA.dropAllReferences();\n }\n \n for (final GlobalIFunc /*&*/ GIF : ifuncs()) {\n GIF.dropAllReferences();\n }\n }", "public void unsetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FROMADDRESS$6, 0);\n }\n }", "public static void clearWorld() {\n\t\t// Complete this method.\n\t\tfor(Critter i: population){\n\t\t\tpopulation.remove(i);\n\t\t}\n\t\tfor(Critter j: babies){\n\t\t\tbabies.remove(j);\n\t\t}\n\t\tpopulation.clear();\n\t\tbabies.clear();\n\n\n\t}", "public static void resetBitmapRange(LongBuffer bitmap, int start, int end) {\n if (isBackedBySimpleArray(bitmap)) {\n Util.resetBitmapRange(bitmap.array(), start, end);\n return;\n }\n if (start == end) {\n return;\n }\n int firstword = start / 64;\n int endword = (end - 1) / 64;\n if (firstword == endword) {\n bitmap.put(firstword, bitmap.get(firstword) & ~((~0L << start) & (~0L >>> -end)));\n return;\n }\n bitmap.put(firstword, bitmap.get(firstword) & (~(~0L << start)));\n for (int i = firstword + 1; i < endword; i++) {\n bitmap.put(i, 0L);\n }\n bitmap.put(endword, bitmap.get(endword) & (~(~0L >>> -end)));\n }", "void unsetBranchOfficeList();", "void DevClear (int boardID, short addr);", "public void clearGotoFloor();", "public static void RegUnlockAll() {\n\t\tfor (int i = 0; i < TargetCode.methods.size(); i++) {\n\t\t\tTargetCode nowTargetCode = TargetCode.methods.get(i);\n\t\t\tRegUnlock(nowTargetCode);\n\t\t}\n\t}", "void DevClearList (int boardID, short[] addrlist);", "static void wipeLocations(){\n\t \tfor (int i= 0; i < places.length; i++){\n\t\t\t\tfor (int j = 0; j < places[i].items.size(); j++)\n\t\t\t\t\tplaces[i].items.clear();\n\t\t\t\tfor (int k = 0; k < places[i].receptacle.size(); k++)\n\t\t\t\t\tplaces[i].receptacle.clear();\n\t \t}\n\t \tContainer.emptyContainer();\n\t }", "void clearAll();", "void clearAll();", "public static void clearWorld() {\n // TODO: Complete this method\n population.clear();\n babies.clear();\n }", "public void clearAll();", "public void clearAll();", "@Override\n\tpublic void deleteAddressRange(Address startAddr, Address endAddr, TaskMonitor monitor)\n\t\t\tthrows CancelledException {\n\t}", "protected void unloadSections() {\n\t\tcoff.close();//make sure to close the file\n\t\tfor(int i=0; i < numPages; i++){\n\t\t\tUserKernel.addPhysicalPage(pageTable[i].ppn);\n\t\t\tpageTable[i] = null;\n\t\t}\n\t\tpageTable = null;\n\t}", "void unsetCompanyBaseData();", "public static void clearWorld() {\n\t\tpopulation.clear();\n\t}", "public void clearLand(String owner, int plotNumber){\n Connection conn = controller.getConnection();\n PreparedStatement stmt = null;\n String sql = \"DELETE FROM magnet.land WHERE owner = ? AND plotNumber = ?\";\n\n try {\n stmt = conn.prepareStatement(sql);\n stmt.setString(1, owner);\n stmt.setInt(2, plotNumber);\n stmt.executeUpdate();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "void clearAllIndexes();", "void unsetOffset();", "private void removeQueryBoundsFromGeometryRegistry(QueryRegion region)\r\n {\r\n myToolbox.getGeometryRegistry().removeGeometriesForSource(this, new HashSet<Geometry>(region.getGeometries()));\r\n }", "public void clearAll()\n {\n textureMap.clear();\n componentMap.clear();\n }", "protected void clearRangeTest() {\n\tneedRangeTest = false;\n }", "public void\tclear() {\n\t\tmap.clear();\n\t}", "void unsetRawOffset();", "protected abstract void clearAll();", "public void clearLookups() {\n diseaseMap = null;\n feedMap = null;\n healthMapProvenance = null;\n }", "void unsetRegisteredOfficeCity();", "public void removeRange(Range range) {\n ranges.remove(range);\n }", "public void clearFirePort();", "public void clear() {\r\n iFormatter = null;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[15]++;\r\n iElementPairs.clear();\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[16]++;\r\n }", "public void clearMappings() {\n if (mappings != null) {\n mappings.clear();\n }\n }", "public void clearAll() {\r\n msgMapping.clear();\r\n }", "public void remDefinedInModule(){\n ((MvwDefinitionDMO) core).remDefinedInModule();\n }", "public static void reset() {\n Set<Map.Entry<Class<?>, DatabaseDefinition>> entrySet = globalDatabaseHolder.databaseClassLookupMap.entrySet();\n for (Map.Entry<Class<?>, DatabaseDefinition> value : entrySet) {\n value.getValue().reset(getContext());\n }\n globalDatabaseHolder.reset();\n loadedModules.clear();\n }", "public void unsetSwiftCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SWIFTCODE$8, 0);\n }\n }", "public Builder clearAddr() {\n \n addr_ = 0;\n onChanged();\n return this;\n }", "public final synchronized void mo47208b() {\n this.f49753d.clear();\n C18331bb.m60419a(this.f49751b);\n this.f49750a.edit().clear().commit();\n }", "public final synchronized void mo27313a() {\n this.f10289c.clear();\n this.f10287a.edit().clear().commit();\n }", "public void clearDirtyAreas() {\n synchronized (dirtyAreas) {\n dirtyAreas.clear();\n }\n renderedAreas.clear();\n fullUpdate = false;\n dirtyAreaCounter = 0;\n }", "void unsetOrganizationPositionList();", "public void cleanUp(){\n\t\t//offset(-1*bounds.left, -1*bounds.top);\n\t}", "void\tclear();", "public void clear() {\n\t\tlocation.clear();\n\t\theap.clear();\n\t}", "public void clearBits(int[][] bits, int start, int len) {\n\t\tint left = start; \n\t\tint right = start + len - 1; \n\t\tfor (int i = 0; i < bits.length; i++) {\n\t\t\tfor (int j = left; j <= right; j++) {\n\t\t\t\tbits[i][j] = 0;\n\t\t\t}\n\t\t\tleft = left / 2;\n\t\t\tright = right / 2;\n\t\t}\n\t}", "void clearSpecifiedEnds();", "public final void clear() { _map.clear(); }", "public void clearInstructions(){\n\t\tinstructions.clear();\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t\tsuperset.removeRange(lower, upper, fromInclusive, toInclusive);\n\t\t\n\t\t//Alternative direct implementation:\n\t\t//while (pollFirst() != null) {\n\t\t//}\n\t\t\n\t}", "public org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder clearADDRESSIND() {\n ADDRESS_IND = null;\n fieldSetFlags()[8] = false;\n return this;\n }", "void removeReferenceRange(int i);", "private void clearLocals() {\n this.map = null;\n this.inputName = null;\n }", "public void unsetCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(CODE$6, 0);\n }\n }", "public void clear() {\n\t\tmap.clear();\n\t}", "public Builder clearAddress() {\n if (addressBuilder_ == null) {\n address_ = null;\n onChanged();\n } else {\n address_ = null;\n addressBuilder_ = null;\n }\n\n return this;\n }", "public void clear() {\n/* 103 */ this.texturesLinear.clear();\n/* 104 */ this.texturesNearest.clear();\n/* */ }", "public void clear() { \r\n\t\tmap.clear();\r\n\t}", "public void unsetPdb()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PDB$28, 0);\r\n }\r\n }", "public void clear(){\n this.entities.clear();\n /*for(QuadTree node: this.getNodes()){\n node.clear();\n this.getNodes().remove(node);\n }*/\n this.nodes.clear();\n }", "public void clear() {\n map.clear();\n }", "public void clearOperands();", "public int deleteByRange(TypeData type, long minimumId, long maximumId);", "public Builder clearCode() {\n\n code_ = 0;\n onChanged();\n return this;\n }", "private void reset() {\n clearSolutions();\n clearHeapUsages(this.pm_heap);\n placeMappings(this.pm_heap, this.instance.getPhysicalMachines(), this.mappings);\n }", "public void remove(String address) {\n\t\tif (tseqnums.containsKey(address)) {\n\t\t\tint tseq=((Integer)tseqnums.remove(address)).intValue();\n\t\t\tString cid=(String)cids.elementAt(tseq);\n\t\t\tcids.removeElementAt(tseq);\n\t\t\ttimes.removeElementAt(tseq);\n\t\t\taddresses.remove(cid);\n\t\t\tfor (int i=tseq; i<times.size(); i++)\n\t\t\t\ttseqnums.put(addresses.get(cids.get(i)), new Integer(i));\n\t\t}\n\t}", "public void unsetAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(ADDRESS$2);\n }\n }", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (CreditAppBankReference creditAppBankReference : findAll()) {\n\t\t\tremove(creditAppBankReference);\n\t\t}\n\t}", "public void clear() {\r\n this.map.clear();\r\n }", "protected void clearAll() {\n for (int i=0; i <= (Numbers.INTEGER_WIDTH*8-2); i++) {\n \tthis.clearBitAt(i);\n } \t\n }", "public Builder clearBlockNumbers() {\n blockNumbers_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000004);\n onChanged();\n return this;\n }", "public Gel_BioInf_Models.VirtualPanel.Builder clearRelevantRegions() {\n relevantRegions = null;\n fieldSetFlags()[6] = false;\n return this;\n }", "public void clear() {\n map.clear();\n }", "public void delete(short addressInDataBlock) {\n \n //transform 2 bytes in 1 short \n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //delete the data\n serialize[addressInDataBlock * 4] = 0x00;\n serialize[addressInDataBlock * 4 + 1] = 0x00;\n serialize[addressInDataBlock * 4 + 2] = 0x00;\n serialize[addressInDataBlock * 4 + 3] = 0x00;\n\n for (short i = initial; i < initial + sizeData; i++) {\n serialize[i] = 0x00;\n }\n }", "public void clear()\r\n {\r\n result = null;\r\n leftOperand = null;\r\n rightOperand = null;\r\n operator = null;\r\n resultDoubles = null;\r\n }", "public void reset() {\n aCollection = this.asciiMathLibraryBlock.getOwnedElement().stream().filter(e -> e instanceof NamedElement).collect(Collectors.toList());\n cCollection = this.customFuncBlock.getOwnedElement().stream().filter(e -> e instanceof NamedElement).collect(Collectors.toList());\n }", "@Transactional\r\n\t@Override\r\n\tpublic long deleteCode(Map<String, String[]> map) throws SQLException {\n\r\n\t\tQCode code = QCode.code;\r\n\t\t\r\n\t\tJPADeleteClause deleteClause = new JPADeleteClause(entityManager, code);\r\n\t\tlong result = 0;\r\n\t\tif(map.get(\"gbn\")[0].equals(\"upr\")) {\r\n\t\t\tresult = deleteClause.where(code.upr_cd.eq(\"*\").and(code.cd.eq(map.get(\"cd\")[0]))).execute();\r\n\t\t} else {\r\n\t\t\tresult = deleteClause.where(code.upr_cd.eq(map.get(\"upr_cd\")[0]).and(code.cd.eq(map.get(\"cd\")[0]))).execute();\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public void unbindAll() {\n\t\tmGlobalCallbacks.clear();\n\t\t/* remove all local callback lists, that is removes all local callbacks */\n\t\tmLocalCallbacks.clear();\n\t}", "public void opbClearState() {\r\n final String methodName = \"opbClearState()\";\r\n\r\n logger.entering(CLASS_NAME, methodName);\r\n\r\n // set all fields to their initial values\r\n a = null;\r\n aDataSourceValue = null;\r\n\r\n aVarchar = null;\r\n aVarcharDataSourceValue = null;\r\n\r\n aNumber = null;\r\n aNumberDataSourceValue = null;\r\n\r\n aInteger = 8L;\r\n aIntegerDataSourceValue = 8L;\r\n\r\n aDate = null;\r\n aDateDataSourceValue = null;\r\n\r\n aRo = null;\r\n\r\n\r\n }", "public static List<HomologousRange> analyzeRegions(Fasta queryFasta, Fasta targetFasta,\n List<HomologousRange> ranges) {\n for (ListIterator<HomologousRange> iterator = ranges.listIterator(); iterator.hasNext();) {\n HomologousRange currRange = iterator.next();\n RegionType regionType = getRegionType(currRange, queryFasta, targetFasta);\n\n if (regionType == RegionType.UNKNOWN_REGION_TYPE) {\n iterator.remove();\n } else {\n iterator.set(HomologousRange.newBuilder(currRange).setRegionType(regionType).build());\n }\n }\n\n return ranges;\n }", "public abstract void clearAllSelections();", "public void deleteAllMappings() {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tdb.delete(TABLE_APP, null, null);\n\t\t\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\n\t}", "public void resetWorld() {\n \t\tmyForces.clear();\n \t\t\n \t\tfor (CollidableObject obj : myObjects) {\n \t\t\tobj.detach();\n \t\t}\n \t\tmyObjects.clear();\n \t\t\n \t\taddHalfspaces();\n \t}", "public void Clear() {\n OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_Clear(swigCPtr, this);\n }", "public Builder clearRegion() {\n \n region_ = 0;\n onChanged();\n return this;\n }", "void deleteAllCopiedComponent(RecordSet compRs);", "public void setRanges(List<Range> ranges) {\n this.ranges = ranges;\n }", "void unbindAll();" ]
[ "0.63901705", "0.5725959", "0.57245284", "0.5282238", "0.50799173", "0.5012508", "0.4966455", "0.49011388", "0.4898878", "0.48303753", "0.48229486", "0.47950876", "0.47919172", "0.47885388", "0.4784364", "0.47835678", "0.4781957", "0.47808143", "0.4768494", "0.47671154", "0.47468904", "0.47401017", "0.47401017", "0.47364518", "0.47242036", "0.47242036", "0.47235483", "0.4710896", "0.4710832", "0.46649277", "0.4657103", "0.46547306", "0.46536976", "0.4641555", "0.46347538", "0.4619184", "0.45934743", "0.45840737", "0.45671126", "0.456704", "0.45644903", "0.45627508", "0.45453903", "0.45451754", "0.45337537", "0.45336676", "0.4532128", "0.45308432", "0.45251992", "0.4517518", "0.4516197", "0.45112103", "0.45060778", "0.4491742", "0.44853306", "0.4480796", "0.4479269", "0.44744346", "0.44744325", "0.44734523", "0.44667503", "0.4464897", "0.4463172", "0.44592968", "0.44580734", "0.44545045", "0.44542077", "0.44514543", "0.4450381", "0.44465318", "0.4445961", "0.4444206", "0.44421357", "0.44272837", "0.44257233", "0.44112232", "0.44096506", "0.44077748", "0.44010153", "0.44009748", "0.44008923", "0.43972057", "0.4395396", "0.43952945", "0.4394557", "0.43940696", "0.43897322", "0.43744108", "0.43685466", "0.43656802", "0.43637115", "0.43627322", "0.43534455", "0.43531713", "0.43512154", "0.43510118", "0.43505272", "0.434616", "0.4341298", "0.4339993" ]
0.7162968
0
Clears any code units in the given range returning everything to "db"s, and removing any references in the affected area. Note that the module and fragment structure is unaffected. If part of a code unit is contained in the given address range then the whole code unit will be cleared.
public void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext, TaskMonitor monitor) throws CancelledException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext);", "public void clearComments(Address startAddr, Address endAddr);", "public void clearAll() {\n rangeMap.clear();\n }", "void clearPowertypeRanges();", "void clearOffset();", "public void clearVariable(int offset);", "public void clearAreaReset() {\n for(int x = 0; x < buildSize; x++) {\n for(int y = 4; y < 7; y++) {\n for(int z = 0; z < buildSize; z++) {\n myIal.removeBlock(x, y, z);\n }\n }\n }\n\n myIal.locx = 0; myIal.locy = 0; myIal.locz = 0;\n my2Ial.locx = 0; my2Ial.locy = 0; my2Ial.locz = 0;\n }", "public static void clearWorld() {\r\n \tbabies.clear();\r\n \tpopulation.clear();\r\n }", "public void clearAllDefinitionMappings()\n {\n _lovItemMappings.clear();\n }", "public native void clearReferent();", "void clearAddress() {\n mAddress = HdmiCec.ADDR_UNREGISTERED;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 452,\n FQN=\"llvm::Module::dropAllReferences\", NM=\"_ZN4llvm6Module17dropAllReferencesEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17dropAllReferencesEv\")\n //</editor-fold>\n public void dropAllReferences() {\n for (final Function /*&*/ F : /*Deref*/this) {\n F.dropAllReferences();\n }\n \n for (final GlobalVariable /*&*/ GV : globals()) {\n GV.dropAllReferences();\n }\n \n for (final GlobalAlias /*&*/ GA : aliases()) {\n GA.dropAllReferences();\n }\n \n for (final GlobalIFunc /*&*/ GIF : ifuncs()) {\n GIF.dropAllReferences();\n }\n }", "public void unsetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FROMADDRESS$6, 0);\n }\n }", "public static void clearWorld() {\n\t\t// Complete this method.\n\t\tfor(Critter i: population){\n\t\t\tpopulation.remove(i);\n\t\t}\n\t\tfor(Critter j: babies){\n\t\t\tbabies.remove(j);\n\t\t}\n\t\tpopulation.clear();\n\t\tbabies.clear();\n\n\n\t}", "public static void resetBitmapRange(LongBuffer bitmap, int start, int end) {\n if (isBackedBySimpleArray(bitmap)) {\n Util.resetBitmapRange(bitmap.array(), start, end);\n return;\n }\n if (start == end) {\n return;\n }\n int firstword = start / 64;\n int endword = (end - 1) / 64;\n if (firstword == endword) {\n bitmap.put(firstword, bitmap.get(firstword) & ~((~0L << start) & (~0L >>> -end)));\n return;\n }\n bitmap.put(firstword, bitmap.get(firstword) & (~(~0L << start)));\n for (int i = firstword + 1; i < endword; i++) {\n bitmap.put(i, 0L);\n }\n bitmap.put(endword, bitmap.get(endword) & (~(~0L >>> -end)));\n }", "void unsetBranchOfficeList();", "void DevClear (int boardID, short addr);", "public void clearGotoFloor();", "public static void RegUnlockAll() {\n\t\tfor (int i = 0; i < TargetCode.methods.size(); i++) {\n\t\t\tTargetCode nowTargetCode = TargetCode.methods.get(i);\n\t\t\tRegUnlock(nowTargetCode);\n\t\t}\n\t}", "void DevClearList (int boardID, short[] addrlist);", "static void wipeLocations(){\n\t \tfor (int i= 0; i < places.length; i++){\n\t\t\t\tfor (int j = 0; j < places[i].items.size(); j++)\n\t\t\t\t\tplaces[i].items.clear();\n\t\t\t\tfor (int k = 0; k < places[i].receptacle.size(); k++)\n\t\t\t\t\tplaces[i].receptacle.clear();\n\t \t}\n\t \tContainer.emptyContainer();\n\t }", "void clearAll();", "void clearAll();", "public static void clearWorld() {\n // TODO: Complete this method\n population.clear();\n babies.clear();\n }", "public void clearAll();", "public void clearAll();", "@Override\n\tpublic void deleteAddressRange(Address startAddr, Address endAddr, TaskMonitor monitor)\n\t\t\tthrows CancelledException {\n\t}", "void unsetCompanyBaseData();", "protected void unloadSections() {\n\t\tcoff.close();//make sure to close the file\n\t\tfor(int i=0; i < numPages; i++){\n\t\t\tUserKernel.addPhysicalPage(pageTable[i].ppn);\n\t\t\tpageTable[i] = null;\n\t\t}\n\t\tpageTable = null;\n\t}", "public static void clearWorld() {\n\t\tpopulation.clear();\n\t}", "public void clearLand(String owner, int plotNumber){\n Connection conn = controller.getConnection();\n PreparedStatement stmt = null;\n String sql = \"DELETE FROM magnet.land WHERE owner = ? AND plotNumber = ?\";\n\n try {\n stmt = conn.prepareStatement(sql);\n stmt.setString(1, owner);\n stmt.setInt(2, plotNumber);\n stmt.executeUpdate();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "void clearAllIndexes();", "void unsetOffset();", "private void removeQueryBoundsFromGeometryRegistry(QueryRegion region)\r\n {\r\n myToolbox.getGeometryRegistry().removeGeometriesForSource(this, new HashSet<Geometry>(region.getGeometries()));\r\n }", "public void clearAll()\n {\n textureMap.clear();\n componentMap.clear();\n }", "protected void clearRangeTest() {\n\tneedRangeTest = false;\n }", "public void\tclear() {\n\t\tmap.clear();\n\t}", "void unsetRawOffset();", "protected abstract void clearAll();", "public void clearLookups() {\n diseaseMap = null;\n feedMap = null;\n healthMapProvenance = null;\n }", "void unsetRegisteredOfficeCity();", "public void removeRange(Range range) {\n ranges.remove(range);\n }", "public void clear() {\r\n iFormatter = null;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[15]++;\r\n iElementPairs.clear();\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[16]++;\r\n }", "public void clearFirePort();", "public void clearAll() {\r\n msgMapping.clear();\r\n }", "public void clearMappings() {\n if (mappings != null) {\n mappings.clear();\n }\n }", "public void remDefinedInModule(){\n ((MvwDefinitionDMO) core).remDefinedInModule();\n }", "public static void reset() {\n Set<Map.Entry<Class<?>, DatabaseDefinition>> entrySet = globalDatabaseHolder.databaseClassLookupMap.entrySet();\n for (Map.Entry<Class<?>, DatabaseDefinition> value : entrySet) {\n value.getValue().reset(getContext());\n }\n globalDatabaseHolder.reset();\n loadedModules.clear();\n }", "public void unsetSwiftCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SWIFTCODE$8, 0);\n }\n }", "public final synchronized void mo47208b() {\n this.f49753d.clear();\n C18331bb.m60419a(this.f49751b);\n this.f49750a.edit().clear().commit();\n }", "public Builder clearAddr() {\n \n addr_ = 0;\n onChanged();\n return this;\n }", "public final synchronized void mo27313a() {\n this.f10289c.clear();\n this.f10287a.edit().clear().commit();\n }", "public void clearDirtyAreas() {\n synchronized (dirtyAreas) {\n dirtyAreas.clear();\n }\n renderedAreas.clear();\n fullUpdate = false;\n dirtyAreaCounter = 0;\n }", "void unsetOrganizationPositionList();", "public void cleanUp(){\n\t\t//offset(-1*bounds.left, -1*bounds.top);\n\t}", "void\tclear();", "public void clear() {\n\t\tlocation.clear();\n\t\theap.clear();\n\t}", "public void clearBits(int[][] bits, int start, int len) {\n\t\tint left = start; \n\t\tint right = start + len - 1; \n\t\tfor (int i = 0; i < bits.length; i++) {\n\t\t\tfor (int j = left; j <= right; j++) {\n\t\t\t\tbits[i][j] = 0;\n\t\t\t}\n\t\t\tleft = left / 2;\n\t\t\tright = right / 2;\n\t\t}\n\t}", "void clearSpecifiedEnds();", "public final void clear() { _map.clear(); }", "public void clearInstructions(){\n\t\tinstructions.clear();\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t\tsuperset.removeRange(lower, upper, fromInclusive, toInclusive);\n\t\t\n\t\t//Alternative direct implementation:\n\t\t//while (pollFirst() != null) {\n\t\t//}\n\t\t\n\t}", "public org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder clearADDRESSIND() {\n ADDRESS_IND = null;\n fieldSetFlags()[8] = false;\n return this;\n }", "void removeReferenceRange(int i);", "private void clearLocals() {\n this.map = null;\n this.inputName = null;\n }", "public void unsetCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(CODE$6, 0);\n }\n }", "public void clear() {\n\t\tmap.clear();\n\t}", "public void clear() {\n/* 103 */ this.texturesLinear.clear();\n/* 104 */ this.texturesNearest.clear();\n/* */ }", "public Builder clearAddress() {\n if (addressBuilder_ == null) {\n address_ = null;\n onChanged();\n } else {\n address_ = null;\n addressBuilder_ = null;\n }\n\n return this;\n }", "public void unsetPdb()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PDB$28, 0);\r\n }\r\n }", "public void clear() { \r\n\t\tmap.clear();\r\n\t}", "public void clear(){\n this.entities.clear();\n /*for(QuadTree node: this.getNodes()){\n node.clear();\n this.getNodes().remove(node);\n }*/\n this.nodes.clear();\n }", "public void clear() {\n map.clear();\n }", "public void clearOperands();", "public int deleteByRange(TypeData type, long minimumId, long maximumId);", "public Builder clearCode() {\n\n code_ = 0;\n onChanged();\n return this;\n }", "private void reset() {\n clearSolutions();\n clearHeapUsages(this.pm_heap);\n placeMappings(this.pm_heap, this.instance.getPhysicalMachines(), this.mappings);\n }", "public void remove(String address) {\n\t\tif (tseqnums.containsKey(address)) {\n\t\t\tint tseq=((Integer)tseqnums.remove(address)).intValue();\n\t\t\tString cid=(String)cids.elementAt(tseq);\n\t\t\tcids.removeElementAt(tseq);\n\t\t\ttimes.removeElementAt(tseq);\n\t\t\taddresses.remove(cid);\n\t\t\tfor (int i=tseq; i<times.size(); i++)\n\t\t\t\ttseqnums.put(addresses.get(cids.get(i)), new Integer(i));\n\t\t}\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (CreditAppBankReference creditAppBankReference : findAll()) {\n\t\t\tremove(creditAppBankReference);\n\t\t}\n\t}", "public void unsetAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(ADDRESS$2);\n }\n }", "public void clear() {\r\n this.map.clear();\r\n }", "protected void clearAll() {\n for (int i=0; i <= (Numbers.INTEGER_WIDTH*8-2); i++) {\n \tthis.clearBitAt(i);\n } \t\n }", "public Builder clearBlockNumbers() {\n blockNumbers_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000004);\n onChanged();\n return this;\n }", "public Gel_BioInf_Models.VirtualPanel.Builder clearRelevantRegions() {\n relevantRegions = null;\n fieldSetFlags()[6] = false;\n return this;\n }", "public void delete(short addressInDataBlock) {\n \n //transform 2 bytes in 1 short \n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //delete the data\n serialize[addressInDataBlock * 4] = 0x00;\n serialize[addressInDataBlock * 4 + 1] = 0x00;\n serialize[addressInDataBlock * 4 + 2] = 0x00;\n serialize[addressInDataBlock * 4 + 3] = 0x00;\n\n for (short i = initial; i < initial + sizeData; i++) {\n serialize[i] = 0x00;\n }\n }", "public void clear() {\n map.clear();\n }", "public void clear()\r\n {\r\n result = null;\r\n leftOperand = null;\r\n rightOperand = null;\r\n operator = null;\r\n resultDoubles = null;\r\n }", "public void reset() {\n aCollection = this.asciiMathLibraryBlock.getOwnedElement().stream().filter(e -> e instanceof NamedElement).collect(Collectors.toList());\n cCollection = this.customFuncBlock.getOwnedElement().stream().filter(e -> e instanceof NamedElement).collect(Collectors.toList());\n }", "@Transactional\r\n\t@Override\r\n\tpublic long deleteCode(Map<String, String[]> map) throws SQLException {\n\r\n\t\tQCode code = QCode.code;\r\n\t\t\r\n\t\tJPADeleteClause deleteClause = new JPADeleteClause(entityManager, code);\r\n\t\tlong result = 0;\r\n\t\tif(map.get(\"gbn\")[0].equals(\"upr\")) {\r\n\t\t\tresult = deleteClause.where(code.upr_cd.eq(\"*\").and(code.cd.eq(map.get(\"cd\")[0]))).execute();\r\n\t\t} else {\r\n\t\t\tresult = deleteClause.where(code.upr_cd.eq(map.get(\"upr_cd\")[0]).and(code.cd.eq(map.get(\"cd\")[0]))).execute();\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public void unbindAll() {\n\t\tmGlobalCallbacks.clear();\n\t\t/* remove all local callback lists, that is removes all local callbacks */\n\t\tmLocalCallbacks.clear();\n\t}", "public void opbClearState() {\r\n final String methodName = \"opbClearState()\";\r\n\r\n logger.entering(CLASS_NAME, methodName);\r\n\r\n // set all fields to their initial values\r\n a = null;\r\n aDataSourceValue = null;\r\n\r\n aVarchar = null;\r\n aVarcharDataSourceValue = null;\r\n\r\n aNumber = null;\r\n aNumberDataSourceValue = null;\r\n\r\n aInteger = 8L;\r\n aIntegerDataSourceValue = 8L;\r\n\r\n aDate = null;\r\n aDateDataSourceValue = null;\r\n\r\n aRo = null;\r\n\r\n\r\n }", "public static List<HomologousRange> analyzeRegions(Fasta queryFasta, Fasta targetFasta,\n List<HomologousRange> ranges) {\n for (ListIterator<HomologousRange> iterator = ranges.listIterator(); iterator.hasNext();) {\n HomologousRange currRange = iterator.next();\n RegionType regionType = getRegionType(currRange, queryFasta, targetFasta);\n\n if (regionType == RegionType.UNKNOWN_REGION_TYPE) {\n iterator.remove();\n } else {\n iterator.set(HomologousRange.newBuilder(currRange).setRegionType(regionType).build());\n }\n }\n\n return ranges;\n }", "public abstract void clearAllSelections();", "public void deleteAllMappings() {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tdb.delete(TABLE_APP, null, null);\n\t\t\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\n\t}", "public void Clear() {\n OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_Clear(swigCPtr, this);\n }", "public void resetWorld() {\n \t\tmyForces.clear();\n \t\t\n \t\tfor (CollidableObject obj : myObjects) {\n \t\t\tobj.detach();\n \t\t}\n \t\tmyObjects.clear();\n \t\t\n \t\taddHalfspaces();\n \t}", "public Builder clearRegion() {\n \n region_ = 0;\n onChanged();\n return this;\n }", "void deleteAllCopiedComponent(RecordSet compRs);", "public void setRanges(List<Range> ranges) {\n this.ranges = ranges;\n }", "void unbindAll();" ]
[ "0.7162856", "0.57252496", "0.57245255", "0.52829957", "0.5078819", "0.50114465", "0.49663717", "0.49010488", "0.4898568", "0.48299873", "0.4821856", "0.4795844", "0.47919247", "0.4788433", "0.47846502", "0.4782789", "0.4781453", "0.4779768", "0.47695056", "0.4766628", "0.47471642", "0.47405094", "0.47405094", "0.4736241", "0.47248247", "0.47248247", "0.47222188", "0.47121516", "0.47109342", "0.46645653", "0.465607", "0.4655197", "0.4653266", "0.46418622", "0.4635719", "0.46193746", "0.4593006", "0.45840374", "0.45680028", "0.4567333", "0.45633635", "0.45626956", "0.45458096", "0.4544695", "0.4533617", "0.45334092", "0.45330712", "0.4532445", "0.45264053", "0.45166668", "0.45159194", "0.45106447", "0.4506478", "0.4492093", "0.44847786", "0.44804114", "0.44792512", "0.44754675", "0.44750482", "0.44731784", "0.4467259", "0.4466366", "0.44614714", "0.4458985", "0.44577587", "0.4455979", "0.44538587", "0.44513422", "0.44509447", "0.44466582", "0.4446155", "0.44458604", "0.44417506", "0.44271207", "0.44257525", "0.44119477", "0.44098055", "0.44071594", "0.4402156", "0.4400996", "0.44007814", "0.43982226", "0.4396545", "0.4396136", "0.43944025", "0.43942106", "0.43902737", "0.43741375", "0.43688944", "0.43667242", "0.43648458", "0.43620563", "0.43547928", "0.43532443", "0.43519074", "0.43512613", "0.4350631", "0.4346787", "0.4340959", "0.43401492" ]
0.6389814
1
Checks if the given ranges consists entirely of undefined data.
public boolean isUndefined(Address start, Address end);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isRangeValid() {\n\n\t\tboolean valid = true;\n\n\t\tif (getRange() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tLong.parseLong(getRange());\n\t\t} catch (NumberFormatException nfe) {\n\t\t\tvalid = false;\n\t\t}\n\n\t\tvalid = valid || getRange().compareToIgnoreCase(CCLConstants.INDIRECT_RANGE_ALL) == 0;\n\n\t\treturn valid;\n\t}", "public boolean hasMissingValues() {\n\n for (int i = 0; i < getNumColumns(); i++) {\n\n for (int j = 0; j < getNumRows(); j++) {\n\n if (isValueMissing(j, i)) {\n return true;\n }\n }\n }\n\n return false;\n }", "public boolean isEmpty() {\r\n\t\tfor (double d : values) {\r\n\t\t\tif (!Double.isNaN(d)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean isEmptyInterval(){\n\t\tif (leftbound<0)\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "public boolean checkIsEmpty() {\n return isEmpty(minimumInstances) && isEmpty(maximumInstances) && isEmpty(dependentProfiles);\n }", "boolean hasDestRange();", "public boolean hasUnderflow() {\r\n\t\t\treturn (data.size() <= 0);\r\n\t\t}", "public boolean containsRange(Range range) {\n/* 317 */ if (range == null) {\n/* 318 */ return false;\n/* */ }\n/* 320 */ return (containsLong(range.getMinimumLong()) && containsLong(range.getMaximumLong()));\n/* */ }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n Range range0 = Range.ofLength(360L);\n assertFalse(range0.isEmpty());\n }", "public boolean isEmpty() {\r\n return (Double.isNaN(x) && Double.isNaN(y));\r\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n Range range1 = Range.of(1845L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n assertFalse(boolean0);\n \n range0.getBegin();\n assertTrue(range0.isEmpty());\n }", "public boolean existsAnyMissingValue(){\r\n\t\treturn (anyMissingValue[0] || anyMissingValue[1]);\r\n\t}", "@Override\r\n \tpublic final boolean hasNoSourceRangeInfo() {\r\n \t\treturn !hasSourceRangeInfo();\r\n \t}", "public boolean valid() {\n return start != null && ends != null && weavingRegion != null;\n }", "@java.lang.Override\n public boolean hasCohortsRange() {\n return cohortsRange_ != null;\n }", "public boolean isEmpty() {\n return lo > hi;\n }", "public boolean outOfRange(){\r\n\t\t\treturn (shape.x <=0 ? true : false);\r\n\t\t}", "public void addNonBmpRanges(List ranges) {\n }", "public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }", "public boolean isEveryDayRange() {\n int totalLength = MAX - MIN + 1;\n return isFullRange(totalLength);\n }", "boolean HasRange() {\r\n\t\treturn hasRange;\r\n\t}", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n Range range0 = Range.of((-81L));\n boolean boolean0 = range0.equals((Object) null);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test014() throws Throwable {\n Range range0 = Range.ofLength(581L);\n assertFalse(range0.isEmpty());\n }", "private boolean hasValidBounds() {\n\n\n\n return false;\n }", "public boolean isMissing() {\n return ((slat == GempakConstants.IMISSD) || (slon == GempakConstants.IMISSD));\n }", "public boolean hasRangeVariableDeclaration() {\r\n\t\treturn rangeVariableDeclaration != null &&\r\n\t\t !rangeVariableDeclaration.isNull();\r\n\t}", "boolean isEmpty() {\n return (bottom < top.getReference());\n }", "public boolean isEmpty() {\r\n\tfor (int i = 0; i < this.size; i++) {\r\n\t if (this.territory[0][i] != 0 || this.territory[1][i] != 0) {\r\n\t\treturn false;\r\n\t }\r\n\t}\r\n\r\n\treturn true;\r\n }", "public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }", "private static boolean tilesAreNotFilled(int[][] grid) {\n\t\tfor(int i = 0; i < BOUNDARY; i++) {\n\t\t\tfor(int j = 0; j < BOUNDARY; j++) {\n\t\t\t\tif(grid[i][j] == 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Test(timeout = 4000)\n public void test076() throws Throwable {\n Range range0 = Range.ofLength(0L);\n Object object0 = new Object();\n boolean boolean0 = range0.equals((Object) null);\n assertFalse(boolean0);\n assertTrue(range0.isEmpty());\n }", "public boolean existsInputMissingValues(){\r\n\t\treturn anyMissingValue[0];\r\n\t}", "public boolean hasMissingValues(int columnIndex) {\n\n for (int j = 0; j < getNumRows(); j++) {\n\n if (isValueMissing(j, columnIndex)) {\n return true;\n }\n }\n\n return false;\n }", "public boolean isPracticallyEmpty() {\n\treturn getDimension()==0 ||\n\t getDimension()==1 && id2label.elementAt(0).equals(DUMMY_LABEL);\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n Range range0 = Range.of((-2147483660L));\n assertFalse(range0.isEmpty());\n }", "@Override\n public boolean isLocationEmpty(XYCoord coords)\n {\n return isLocationEmpty(null, coords.xCoord, coords.yCoord);\n }", "private boolean checkFull() {\n\t\treturn this.array.length - 1 == this.lastNotNull();\n\t}", "public boolean isEmpty() {\n return (first == null || last == null);\n }", "private boolean isValid() {\n // If start is greater or equal to end then it's invalid\n return !(start.compareTo(end) >= 0);\n }", "public static MissingRangesStatistics getMissingRangeStatistics(TreeMap<LocalDateTime, Consumption> data, int interval) {\n return getMissingRangeStatistics(data, data.firstKey(), data.lastKey(), interval);\n }", "public static List<MissingDataInterval> getMissingRanges(TreeMap<LocalDateTime, Consumption> data, LocalDateTime start, LocalDateTime end, int interval) {\n List<MissingDataInterval> result = new ArrayList<>();\n boolean inMissing = false;\n LocalDateTime lastStart = null;\n\n LocalDateTime time = start;\n while (!time.isAfter(end)) {\n if (!inMissing && !data.containsKey(time)) {\n inMissing = true;\n lastStart = time;\n }\n if (inMissing && data.containsKey(time)) {\n inMissing = false;\n result.add(new MissingDataInterval(lastStart, time.minusSeconds(interval)));\n lastStart = null;\n }\n time = time.plusSeconds(interval);\n }\n if (inMissing) {\n result.add(new MissingDataInterval(lastStart, time.minusSeconds(interval)));\n }\n return result;\n }", "public boolean hasCohortsRange() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "public boolean allInRange(int start, int end) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tint a=data[i];\n \t\t\tif ((a<start)||(a>=end)) return false;\n \t\t}\n \t\treturn true;\n \t}", "public boolean checkAllNull() {\n return (locationFilterCriteria == null || locationFilterCriteria.checkAllNull()) &&\n minPricePerM2 == null && maxPricePerM2 == null &&\n sizeInM2LowerBound == null &&\n sizeInM2UpperBound == null && roofed == null &&\n leasingTimeFrom == null && leasingTimeTo == null &&\n keywords == null && electricity == null && water == null &&\n high == null && glassHouse == null;\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n Range range0 = Range.ofLength(2147517148L);\n Object object0 = new Object();\n boolean boolean0 = range0.equals((Object) null);\n assertFalse(range0.isEmpty());\n assertFalse(boolean0);\n }", "public boolean isEmpty() {\n return points.isEmpty();\n }", "@Test(timeout = 4000)\n public void test039() throws Throwable {\n Range range0 = Range.ofLength(0L);\n boolean boolean0 = range0.startsBefore(range0);\n assertFalse(boolean0);\n assertTrue(range0.isEmpty());\n }", "public boolean validDateRange() {\n\t\treturn dateEnd.compareTo(dateStart) > 0;\n\t}", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-1L));\n boolean boolean0 = range0.equals(range1);\n assertFalse(boolean0);\n \n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertEquals((-81L), long0);\n \n List<Range> list0 = range1.complement(range0);\n assertFalse(range1.isEmpty());\n assertTrue(list0.contains(range1));\n }", "public AddressSetView getUndefinedRanges(AddressSetView set, boolean initializedMemoryOnly,\n\t\t\tTaskMonitor monitor) throws CancelledException;", "public boolean isInvalid() {\n\t\treturn Double.isNaN(x) || Double.isNaN(y) || Double.isNaN(z);\n\t}", "public boolean isEmpty( ){\r\n\t\treturn beginMarker.next==endMarker;\r\n\t}", "@Override\n public boolean isLocationEmpty(Unit unit, XYCoord coords)\n {\n return isLocationEmpty(unit, coords.xCoord, coords.yCoord);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-2147483648L), 1146L);\n long long0 = range0.getBegin();\n assertEquals((-2147483648L), long0);\n \n boolean boolean0 = range0.equals(\"number of entries must be <= Integer.MAX_VALUE\");\n assertFalse(boolean0);\n \n Range range1 = Range.of((-2147483648L));\n List<Range> list0 = range1.complement(range0);\n assertEquals(0, list0.size());\n }", "public boolean existsOutputMissingValues(){\r\n\t\treturn anyMissingValue[1];\r\n\t}", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.getEnd();\n long long0 = 0L;\n // Undeclared exception!\n try { \n range0.isSubRangeOf((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // range can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private boolean isEmpty() {\n return dataSize == 0;\n }", "public boolean isEmpty() {\n return values.isEmpty();\n }", "@Override\r\n public boolean checkElements(SequenceConstructionExpression owner) {\r\n SequenceRange self = this.getSelf();\r\n Expression rangeLower = self.getRangeLower();\r\n Expression rangeUpper = self.getRangeUpper();\r\n ElementReference rangeLowerType = rangeLower == null? null: rangeLower.getType();\r\n ElementReference rangeUpperType = rangeUpper == null? null: rangeUpper.getType();\r\n return (rangeLowerType == null || rangeLowerType.getImpl().isInteger()) && \r\n (rangeUpperType == null || rangeUpperType.getImpl().isInteger());\r\n }", "public boolean isMissingData() {\n return myModel.getRealtimeTimestamp() == 0;\n }", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n long long0 = range0.getBegin();\n assertEquals((-2147483648L), long0);\n \n boolean boolean0 = range0.equals((Object) null);\n assertTrue(range0.isEmpty());\n assertFalse(boolean0);\n }", "public boolean isEmpty() {\n return mPoints.isEmpty();\n }", "public boolean isAlwaysNonEmpty() {\n final RexWindowBound lower;\n final RexWindowBound upper;\n if (lowerBound == null) {\n if (upperBound == null) {\n lower = RexWindowBounds.UNBOUNDED_PRECEDING;\n } else {\n lower = RexWindowBounds.CURRENT_ROW;\n }\n } else if (lowerBound instanceof SqlLiteral) {\n lower = RexWindowBounds.create(lowerBound, null);\n } else {\n return false;\n }\n if (upperBound == null) {\n upper = RexWindowBounds.CURRENT_ROW;\n } else if (upperBound instanceof SqlLiteral) {\n upper = RexWindowBounds.create(upperBound, null);\n } else {\n return false;\n }\n return isAlwaysNonEmpty(lower, upper);\n }", "@Override\n public boolean isRange() {\n return false;\n }", "protected void clearRangeTest() {\n\tneedRangeTest = false;\n }", "public boolean isEmpty() {\n return pointsSet.isEmpty();\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n Range range0 = Range.ofLength(0L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ 0 .. -1 ]/0B\", string0);\n \n Range range1 = Range.of(0L, 0L);\n long long0 = range0.getLength();\n assertEquals(0L, long0);\n \n range1.complement(range0);\n assertFalse(range1.isEmpty());\n \n Range.Comparators.values();\n Range.Builder range_Builder0 = new Range.Builder(range0);\n range_Builder0.expandBegin(0L);\n range_Builder0.contractBegin(0L);\n assertTrue(range0.isEmpty());\n }", "public boolean isEmpty()\n {\n return !(((this.gatewayIPAddress != null && this.gatewayPort != null)\n || (this.serialParameters != null)) && (this.address >= 0)\n && (this.slaveId > 0) && (this.xlator != null));\n }", "public static List<MissingDataInterval> getMissingRanges(TreeMap<LocalDateTime, Consumption> data, int interval) {\n return getMissingRanges(data, data.firstKey(), data.lastKey(), interval);\n }", "private boolean priorsGotNegativeValues(NumericDataset priors) {\n for (FeatureSequenceData data:priors.getAllSequences()) {\n NumericSequenceData priorsequence=(NumericSequenceData)data;\n for (int i=0;i<priorsequence.getSize();i++) {\n if (priorsequence.getValueAtRelativePosition(i)<0) return true;\n }\n }\n return false;\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-23L), (-23L));\n Range.Builder range_Builder0 = new Range.Builder(range0);\n range_Builder0.expandBegin((-23L));\n range_Builder0.shift((-23L));\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n linkedList0.add(range0);\n List<Range> list0 = range0.complementFrom(linkedList0);\n assertEquals(0, list0.size());\n \n Range range1 = Range.of(9223372036854775807L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Long> consumer0 = (Consumer<Long>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.ZERO_BASED;\n range_CoordinateSystem2.toString();\n range0.equals(\"Zero Based\");\n range_CoordinateSystem1.toString();\n boolean boolean1 = range1.endsBefore(range0);\n assertTrue(boolean1 == boolean0);\n assertFalse(boolean1);\n }", "boolean impliedByUpperBound(InfinitNumber ubound) {\n\t\treturn ubound.lesseq(mBound);\n\t}", "public boolean isRangeUnavailable()\r\n {\r\n return statusObj.value == STATUS_CANDIDATE_RANGE_UNAVAILABLE;\r\n }", "public boolean isNilEndpoints()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas.xrm._2014.contracts.EndpointCollection target = null;\r\n target = (com.microsoft.schemas.xrm._2014.contracts.EndpointCollection)get_store().find_element_user(ENDPOINTS$0, 0);\r\n if (target == null) return false;\r\n return target.isNil();\r\n }\r\n }", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n boolean boolean0 = range0.equals(range0);\n assertTrue(boolean0);\n assertFalse(range0.isEmpty());\n }", "public boolean isEmpty() {\r\n return lastCursor - firstCursor == 1;\r\n }", "@Override\r\n\tpublic boolean isempty() {\n\t\treturn count<=0;\r\n\t\t\r\n\t}", "protected final boolean rangeTestFailed(int value) {\n\tboolean test1 =\n\t (reqminSet && (reqminClosed? (value < reqmin): (value <= reqmin)))\n\t || (minSet && (minClosed? (value < min): (value <= min)));\n\tboolean test2 =\n\t (reqmaxSet && (reqmaxClosed? (value > reqmax): (value >= reqmax)))\n\t || (maxSet && (maxClosed? (value > max): (value >= max)));\n\treturn (test1 || test2);\n }", "public boolean isWhitelisted(Range<Integer> range) {\n return this.meta.encloses(range);\n }", "private static boolean verifyInvalidRegionsHaveNoHVEdges(\n LogManager pLogger, UnmodifiableSMG pSmg) {\n for (SMGObject obj : pSmg.getObjects()) {\n if (pSmg.isObjectValid(obj) || pSmg.isObjectExternallyAllocated(obj)) {\n continue;\n }\n // Verify that the HasValue edge set for this invalid object is empty\n SMGEdgeHasValueFilterByObject filter = SMGEdgeHasValueFilter.objectFilter(obj);\n\n if (!pSmg.getHVEdges(filter).isEmpty()) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: invalid object has a HVEdge\");\n return false;\n }\n }\n\n return true;\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n long long0 = new Long(0L);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 259L);\n Range range3 = Range.of(1L);\n Range range4 = Range.of((-32768L), 0L);\n range4.equals(range2);\n range0.complement(range3);\n Range range5 = range_Builder1.build();\n assertFalse(range5.equals((Object)range4));\n }", "private static Boolean isFilled() \n\t{\n\t\tfor(Cells[] cellList : board)\n\t\t{\n\t\t\tfor(Cells cell : cellList)\n\t\t\t{\n\t\t\t\tif(cell==Cells.VOID)\n\t\t\t\t{\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 final boolean hasSourceRangeInfo() {\r\n \t\treturn this.sourceStart != -1;\r\n \t}", "public boolean checkEmpty(){\n if (history.empty() || historyValues.empty()){\n return true;\n }\n else {\n return false;\n }\n }", "private boolean isEmpty()\n {\n return dimensions.isEmpty();\n }", "public List<String> findMissingRanges(int[] nums, int lower, int upper) {\n List<String> res = new ArrayList<>();\n if (nums == null || nums.length == 0) {\n if (lower == upper) {\n res.add(\"\" + lower);\n } else {\n res.add(lower + \"->\" + upper);\n }\n return res;\n }\n\n if (nums[0] > lower) {\n if (nums[0] - 1 == lower) {\n res.add(\"\" + lower);\n } else {\n res.add(lower + \"->\" + (nums[0] - 1));\n }\n }\n\n for (int i = 0; i < nums.length - 1; i++) {\n if ((nums[i + 1] == nums[i] + 1) || nums[i] == nums[i + 1]) {\n continue;\n }\n if (nums[i + 1] - nums[i] == 2) {\n res.add(\"\" + (nums[i] + 1));\n } else {\n res.add((nums[i] + 1) + \"->\" + (nums[i + 1] - 1));\n }\n }\n\n if (nums[nums.length - 1] < upper) {\n if (upper - 1 == nums[nums.length - 1]) {\n res.add(\"\" + upper);\n } else {\n res.add((nums[nums.length - 1] + 1) + \"->\" + upper);\n }\n }\n\n return res;\n\n }", "boolean validateOffset() {\n\t\t\tint num = entriesByIndex.size() + 1; // assuming 0, plus 1-N)\n\t\t\tfor (int index : entriesByIndex.keySet()) {\n\t\t\t\tif (index > num || index < 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "private boolean checkRange() {\n String notInRange = \"\"; //used for displaying error message\n \n double a = Double.valueOf(ampBox.getText());\n int d = Integer.valueOf(durBox.getText());\n int f = Integer.valueOf(freqBox.getText());\n int ow = Integer.valueOf(owBox.getText());\n \n if(a>8.128 || a<0) notInRange += \"Amplitude not in range [0mA,8.128mA]\\n\";\n if(d>423 || d<0) notInRange += \"Pulse duration not in range [0uS,423uS]\\n\";\n if(f>100 || f<0) notInRange += \"Frequency not in range [0Hz,100Hz]\\n\";\n if(ow>60 || ow<0) notInRange += \"ON-WAVE duration not in range [0sec,60sec]\\n\";\n \n if(notInRange.length()>0) {\n notInRange += \"\\nInput within proper ranges and try again\";\n JOptionPane.showMessageDialog(null, \n notInRange, \n \"Error\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n else {\n return true;\n }\n }", "boolean isValidRangeReading(double dist) {\n return ( !Double.isNaN(dist) && dist>MIN_RANGE_DIST && dist<MAX_RANGE_DIST ) ;\n }", "@Override\n public boolean isEmpty(){\n return points.isEmpty();\n }", "public boolean isRangeValid()\n {\n return isRangeValid(((AnalogInput)m_echoChannel).getVoltage());\n }", "public boolean isInfinite() {\n\t\treturn length() > BIG_NUMBER;\n\t}", "private boolean rangeHasChanged() {\n\t\tboolean tester = true;\n\t\t\n\t\ttester &= plotSheet.getxRange()[0] == this.xrange[0];\n\t\ttester &= plotSheet.getxRange()[1] == this.xrange[1];\n\t\ttester &= plotSheet.getyRange()[0] == this.yrange[0];\n\t\ttester &= plotSheet.getyRange()[1] == this.yrange[1];\n\t\t\n\t\tif(!tester) {\n\t\t\tthis.xrange = plotSheet.getxRange().clone();\n\t\t\tthis.yrange = plotSheet.getyRange().clone();\n\t\t}\n\t\t\n\t\treturn !tester || this.depthSearchAborted;\n\t}", "private boolean noangles() {\r\n return OPT(GO() && NOT(GO() && CHAR('>')) && literal() && noangles());\r\n }", "public boolean isMaybeAbsent() {\n checkNotUnknown();\n return (flags & ABSENT) != 0;\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n Object object0 = new Object();\n range0.equals(\"[ 0 .. -1 ]/0B\");\n // Undeclared exception!\n try { \n range0.endsBefore((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Null Range used in range comparison operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private boolean isFull() {\n for (int i = 0; i < 6; i++)\n for (int j = 0; j < 7; j++)\n if (cell[i][j] == ' ')\n return false; // At least one cell is not filled\n\n // All cells are filled\n return true;\n }", "private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n Range range0 = Range.ofLength(127L);\n boolean boolean0 = range0.equals(range0);\n assertTrue(boolean0);\n assertFalse(range0.isEmpty());\n }", "private static boolean checkZero(int[] count) {\n\t\tfor (int i = 0; i < count.length; i++) {\n\t\t\tif (count[i] != 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}" ]
[ "0.64775", "0.6317302", "0.61622494", "0.6160545", "0.6139302", "0.6089223", "0.6065879", "0.6024376", "0.60173404", "0.60073227", "0.5926235", "0.5917633", "0.5900326", "0.58861053", "0.58715093", "0.5849167", "0.5828703", "0.5827876", "0.58094406", "0.580581", "0.57875824", "0.57845783", "0.5770339", "0.57461405", "0.57208663", "0.57125545", "0.5710036", "0.56834584", "0.566858", "0.56636906", "0.56566846", "0.56530315", "0.5617375", "0.56095093", "0.5603901", "0.5601999", "0.55789953", "0.5567773", "0.55669516", "0.5564799", "0.555918", "0.55556375", "0.5543945", "0.55404615", "0.55383515", "0.55316556", "0.552069", "0.55181384", "0.5515638", "0.5514588", "0.5506759", "0.5506096", "0.5505318", "0.5502989", "0.55028254", "0.55010176", "0.5483592", "0.5481737", "0.5477054", "0.54762334", "0.5474855", "0.5470405", "0.5468539", "0.54668355", "0.5465691", "0.5463229", "0.54626703", "0.5462032", "0.5457795", "0.54441905", "0.543758", "0.5429065", "0.54221493", "0.54201114", "0.5409423", "0.54091614", "0.5391858", "0.5390596", "0.5390297", "0.5387475", "0.5387144", "0.5379966", "0.5377364", "0.5376532", "0.53719676", "0.53613544", "0.53581893", "0.5353046", "0.53471637", "0.5338205", "0.5326209", "0.5326157", "0.5324818", "0.53129756", "0.53094923", "0.5306443", "0.5305452", "0.53014916", "0.53011817", "0.5295432" ]
0.73208135
0
Clears the comments in the given range.
public void clearComments(Address startAddr, Address endAddr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void unsetComments();", "@Override\n\tpublic void clear() {\n\t\t\n\t\tsuperset.removeRange(lower, upper, fromInclusive, toInclusive);\n\t\t\n\t\t//Alternative direct implementation:\n\t\t//while (pollFirst() != null) {\n\t\t//}\n\t\t\n\t}", "public void clearAll() {\n rangeMap.clear();\n }", "public Builder clearComments() {\n bitField0_ = (bitField0_ & ~0x00000001);\n comments_ = getDefaultInstance().getComments();\n onChanged();\n return this;\n }", "public Builder clearCohortsRange() {\n bitField0_ = (bitField0_ & ~0x00000002);\n cohortsRange_ = null;\n if (cohortsRangeBuilder_ != null) {\n cohortsRangeBuilder_.dispose();\n cohortsRangeBuilder_ = null;\n }\n onChanged();\n return this;\n }", "public void removeRange(Range range) {\n ranges.remove(range);\n }", "private void clearCommentsCount() {\n \n commentsCount_ = 0;\n }", "private void clearDisableComment() {\n \n disableComment_ = 0;\n }", "void clearSpecifiedEnds();", "protected void clearRangeTest() {\n\tneedRangeTest = false;\n }", "public void removeAllComments() {\r\n\t\tBase.removeAll(this.model, this.getResource(), COMMENTS);\r\n\t}", "public Builder clearComment() {\n bitField0_ = (bitField0_ & ~0x00000020);\n comment_ = getDefaultInstance().getComment();\n onChanged();\n return this;\n }", "public void deleteComment() {\n text = null;\n authorName = null;\n timestamp = null;\n }", "void clearPowertypeRanges();", "public void removeRange(int fromIndex, int toIndex) {\n\t\tpoints.subList(fromIndex, toIndex).clear();\n\t}", "void clearOffset();", "public void clear() {\n // Don't reuse buffers, reclaim memory so we don't run out\n start = new IntArrayList();\n end = new IntArrayList();\n\n for (AnnotationWriter p : annotations.values()) {\n p.clear();\n }\n }", "public Builder clearCommentsCount() {\n copyOnWrite();\n instance.clearCommentsCount();\n return this;\n }", "public void clear() {\r\n iFormatter = null;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[15]++;\r\n iElementPairs.clear();\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[16]++;\r\n }", "public void removeComment() { \n\t LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"removeComment() \" );\n Via via=(Via)sipHeader;\n via.removeComment();\n }", "public void setRange(Range range) { setRange(range, true, true); }", "public void clearComments(String key)\n {\n this.comments.remove(key);\n }", "public Builder clearContact() {\n \n contact_ = 0;\n onChanged();\n return this;\n }", "public void clear_defineSetupPage_comments() {\r\n\t\tClearText(DefineSetup_Cmnts_txtBx);\r\n\t}", "public void clear() {\n mComments.clear();\n notifyDataSetChanged();\n }", "public void clear()\r\n {\r\n first = null;\r\n last = null;\r\n count = 0;\r\n }", "public void clearNotes() {\n cursor = 0;\n controller.setSelected(cursor);\n\n sequence = new MidiSequence();\n controller.setMidiSequence(sequence);\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n this.offset= 0;\n this.limit= Integer.MAX_VALUE;\n this.sumCol=null;\n this.groupSelClause=null;\n this.groupByClause=null;\n }", "void clear() {\n\t\tif (textArea!=null) {\n\t\t\tRSyntaxTextAreaHighlighter h = (RSyntaxTextAreaHighlighter)\n\t\t\t\t\t\t\t\t\t\t\t\t\ttextArea.getHighlighter();\n\t\t\th.clearMarkOccurrencesHighlights();\n\t\t}\n\t}", "public void clear() {\n this.updateComment(\"\");\n this.mdlCtrlr.clearTable();\n this.repaint();\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n this.offset= 0;\n this.limit= Integer.MAX_VALUE;\n this.sumCol=null;\n this.groupSelClause=null;\n this.groupByClause=null;\n this.forUpdate=false;\n }", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "private void clear() {\n }", "public void clear(int gnum);", "public void clear()\n {\n keys.clear();\n comments.clear();\n data.clear();\n }", "private void clearCursor() {\n \n cursor_ = getDefaultInstance().getCursor();\n }", "public String clear();", "public void clear() {\n }", "public void clear() {\n\t\twhere = null;\n\t}", "public void setRange(AddressInfo range) {\r\n this.range = range;\r\n }", "public void clear() {\n }", "public void clear() {\n }", "public Builder clearOffset() {\n \n offset_ = 0;\n onChanged();\n return this;\n }", "public static void clear() {\n doEdit();\n mEditor.clear();\n doCommit();\n }", "public void clear()\n {\n rst = \"\";\n indent = 0;\n lastLineLength = 0;\n rawInlineHtmlEnabled = false;\n }", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public abstract void clear();", "public abstract void clear();", "public abstract void clear();", "public abstract void clear();", "public void clear(){\r\n NotesList.clear();\r\n }", "public void clear() {\r\n this.line.clear();\r\n }", "public Builder clearBlockNumbers() {\n blockNumbers_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000004);\n onChanged();\n return this;\n }", "public void clear() {\n payload = null;\n // Leave termBuffer to allow re-use\n termLength = 0;\n termText = null;\n positionIncrement = 1;\n flags = 0;\n // startOffset = endOffset = 0;\n // type = DEFAULT_TYPE;\n }", "public void clear() {\n\t\ttextArea.setText(\"\");\n\t}", "public Builder clearDisableComment() {\n copyOnWrite();\n instance.clearDisableComment();\n return this;\n }", "public void clear() {\r\n\t\toredCriteria.clear();\r\n\t\torderByClause = null;\r\n\t\tdistinct = false;\r\n\t}" ]
[ "0.6069097", "0.5688562", "0.56060004", "0.5583865", "0.55397", "0.5471715", "0.546043", "0.54464716", "0.5424711", "0.53502977", "0.5268802", "0.52462965", "0.51700723", "0.51535064", "0.5106076", "0.510587", "0.50740266", "0.50684446", "0.50319546", "0.49856755", "0.49796733", "0.49132344", "0.49021512", "0.49004865", "0.48912132", "0.4881557", "0.4863692", "0.48369417", "0.4827502", "0.48117867", "0.47882417", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.4787641", "0.47616693", "0.47543335", "0.4733188", "0.47308683", "0.47197172", "0.4719149", "0.47175094", "0.4717226", "0.47123462", "0.47123462", "0.47102728", "0.4702752", "0.4701194", "0.4699638", "0.4699638", "0.4699638", "0.4699638", "0.4699638", "0.4699638", "0.4699638", "0.4699638", "0.4699638", "0.4699638", "0.4699638", "0.46972546", "0.46972546", "0.46972546", "0.46972546", "0.46942863", "0.46840793", "0.46713984", "0.46568826", "0.46566337", "0.46557522", "0.46527672" ]
0.748082
0
Clears the properties in the given range.
public void clearProperties(Address startAddr, Address endAddr, TaskMonitor monitor) throws CancelledException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearAll() {\n rangeMap.clear();\n }", "@Override\n\tpublic void clear() {\n\t\t\n\t\tsuperset.removeRange(lower, upper, fromInclusive, toInclusive);\n\t\t\n\t\t//Alternative direct implementation:\n\t\t//while (pollFirst() != null) {\n\t\t//}\n\t\t\n\t}", "void clearPowertypeRanges();", "public void removeRange(Range range) {\n ranges.remove(range);\n }", "public void setRange(Range range) { setRange(range, true, true); }", "public void resetProperties ()\n\t{\n\t\tproperties.clear();\n\t}", "protected void clearRangeTest() {\n\tneedRangeTest = false;\n }", "public void reset() {\r\n properties.clear();\r\n }", "PropertiesTask removeAllProperties();", "void unset() {\n size = min = pref = max = UNSET;\n }", "public Builder clearCohortsRange() {\n bitField0_ = (bitField0_ & ~0x00000002);\n cohortsRange_ = null;\n if (cohortsRangeBuilder_ != null) {\n cohortsRangeBuilder_.dispose();\n cohortsRangeBuilder_ = null;\n }\n onChanged();\n return this;\n }", "void clearProperty(String key);", "void clearProperty(String key);", "Property clearAndAddValue(PropertyValue<?, ?> value);", "public Configuration clearPropertiesEntries() {\n this.properties = null;\n return this;\n }", "public void clear()\r\n {\r\n otherValueMap.clear();\r\n }", "public void clearProperties(){\n\t\tcbDataType.setSelectedIndex(DT_INDEX_NONE);\n\t\tchkVisible.setValue(false);\n\t\tchkEnabled.setValue(false);\n\t\tchkLocked.setValue(false);\n\t\tchkRequired.setValue(false);\n\t\ttxtDefaultValue.setText(null);\n\t\ttxtHelpText.setText(null);\n\t\ttxtText.setText(null);\n\t\ttxtBinding.setText(null);\n\t\ttxtDescTemplate.setText(null);\n\t\ttxtCalculation.setText(null);\n\t\ttxtFormKey.setText(null);\n\t}", "public void clear() {\n\t\tsample.clear();\n\t\tcount.set(0);\n\t\t_max.set(Long.MIN_VALUE);\n\t\t_min.set(Long.MAX_VALUE);\n\t\t_sum.set(0);\n\t\tvarianceM.set(-1);\n\t\tvarianceS.set(0);\n\t}", "public void clear() {\n values.clear();\n }", "private void clearSheet() {\n row = null;\n cells = null;\n cellType = null;\n value = null;\n rowIndex = -1;\n }", "public void removeRange(int fromIndex, int toIndex) {\n\t\tpoints.subList(fromIndex, toIndex).clear();\n\t}", "public void setRange(AddressInfo range) {\r\n this.range = range;\r\n }", "public void noPropertyies() {\n\t\tproperties.clear();\r\n\t\tfor(int i = 0; i<groups.length; i++){\r\n\t\t\tgroups[i].clear();\r\n\t\t}\r\n\t}", "public void clear() {\n _sample.clear();\n _count = 0;\n _max = null;\n _min = null;\n _sum = BigDecimal.ZERO;\n _m = -1;\n _s = 0;\n }", "@Override\r\n\tpublic void clearALL() {\n\t\tjavaScriptWindow.propertyTable = null;\r\n\r\n\t}", "void clearSheet();", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n this.offset= 0;\n this.limit= Integer.MAX_VALUE;\n this.sumCol=null;\n this.groupSelClause=null;\n this.groupByClause=null;\n this.forUpdate=false;\n }", "public void setXRange(Range range) {\r\n\t\txRange = new Range(range);\r\n\t}", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n this.offset= 0;\n this.limit= Integer.MAX_VALUE;\n this.sumCol=null;\n this.groupSelClause=null;\n this.groupByClause=null;\n }", "void clearOffset();", "public void setTimeRange(Range range) {\r\n\t\ttimeRange = new Range(range);\r\n\t}", "public void clear()\n\t{\n\t\tif (m_changeSupport != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_changeSupport.fireVetoableChange(PROPERTYNAME, super.size(), 0);\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println (\"CCache.clear - \" + e);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t//\tClear\n\t\tsuper.clear();\n\t\tif (m_expire != 0)\n\t\t{\n\t\t\tlong addMS = 60000L * m_expire;\n\t\t\tm_timeExp = System.currentTimeMillis() + addMS;\n\t\t}\n\t\tm_justReset = true;\n\t}", "public void clear() throws PropertyVetoException {\n setCommandReturned(\"\");\n setExitStateReturned(0);\n setExitStateMsg(\"\");\n \n importView.reset();\n exportView.reset();\n importView.InGroup_MA = IntAttr.valueOf(InGroupMax);\n exportView.OutCollegeGroup_MA = IntAttr.getDefaultValue();\n exportView.OutGroup_MA = IntAttr.getDefaultValue();\n }", "public void clear(){\r\n\t\tsummary \t= null;\r\n\t\tstart\t\t= 0;\r\n\t\tend\t\t\t= 0;\r\n\t\tlocation\t= null;\r\n\t\talarm\t\t= 0;\r\n\t\tnote\t\t= null;\r\n\t\tallDay\t\t= false;\r\n\t\tattendees\t= null;\r\n\t\tfree_busy\t= FB_FREE;\r\n\t\tevent_class\t= CLASS_PRIVATE;\r\n\t\trepeat_type\t= \"\";\r\n\t}", "public void setRange(@IntRange(from = MIN_RANGE) int range) {\n setRange(mRangeStart, range, mIsPositive);\n }", "@Override\r\n\tpublic void clear() {\n\t\tset.clear();\r\n\t}", "public Builder clearProps() {\n if (propsBuilder_ == null) {\n props_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n propsBuilder_.clear();\n }\n return this;\n }", "void unsetOffset();", "void generateResetProperty(Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);", "public void clear()\r\n {\r\n first = null;\r\n last = null;\r\n count = 0;\r\n }", "public void setRange(boolean range) {\r\n this.range = range;\r\n }", "public void reset() {\r\n minX = null;\r\n maxX = null;\r\n minY = null;\r\n maxY = null;\r\n\r\n minIn = null;\r\n maxIn = null;\r\n\r\n inverted = false;\r\n }", "void unsetValue();", "void unsetValue();", "void clearSpecifiedEnds();", "public HopSpec clearRecipients() {\n recipients.clear();\n return this;\n }", "public Builder clearRegion() {\n \n region_ = 0;\n onChanged();\n return this;\n }", "@Override\npublic void removeAllProperties(VirtualContainer widget) {\n\t\n}", "public void clear() {\n synchronized (LOCK) {\n myValues.clear();\n }\n }", "public void resetDamagedRange() {\r\n fDamagedRange[0] = Integer.MAX_VALUE;\r\n fDamagedRange[1] = Integer.MIN_VALUE;\r\n }", "public void clear() {\n payload = null;\n // Leave termBuffer to allow re-use\n termLength = 0;\n termText = null;\n positionIncrement = 1;\n flags = 0;\n // startOffset = endOffset = 0;\n // type = DEFAULT_TYPE;\n }", "public void setRanges(List<Range> ranges) {\n this.ranges = ranges;\n }", "private Range() {\n this.length = 0;\n this.first = 0;\n this.last = -1;\n this.stride = 1;\n this.name = \"EMPTY\";\n }", "void unsetValueAttachment();", "public void setLayerRange(Range range) {\r\n\t\tlayerRange = new Range(range);\r\n\t}", "public void removeAll() {\n start = null;\n _size = 0;\n }", "void invalidateProperties() {\n super.invalidateProperties();\n token_ = null;\n }", "@Override\n public void clear() {\n size = 0;\n first = null;\n last = null;\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void setRange(Uri range)\n {\n this.range = range;\n }", "public void clear() throws RemoteException, Error;", "public Builder clearProperty() {\n\n property_ = getDefaultInstance().getProperty();\n onChanged();\n return this;\n }", "public void clear() {\n oredCriteria.clear();\n }", "public void clear() {\n oredCriteria.clear();\n }", "public void clear() {\n oredCriteria.clear();\n }", "public void clear() {\n oredCriteria.clear();\n }", "public void clear() {\n oredCriteria.clear();\n }", "public void clear() {\n oredCriteria.clear();\n }", "public Builder clearProperty0() {\n bitField0_ = (bitField0_ & ~0x00000004);\n property0_ = 0;\n \n return this;\n }", "public void clearProperty( String name )\n {\n if ( config != null )\n {\n config.clearProperty( name );\n }\n else\n {\n LOG.warn( \"clearProperty invalid config, prop name [{}]\", name );\n }\n }", "public void clear() {\n\t\tthis.set.clear();\n\t\tthis.size = 0;\n\t}", "public void clear() {\n oredCriteria.clear();\n }", "public void removeAttributeMapEntry(Integer rangeAttribute) {\n\tif (rangeAttribute != null) {\n\t rangeToDomainName.remove(rangeAttribute);\n\t rangeToValueMapper.remove(rangeAttribute);\n\t}\n }", "public void clear() {\n map.clear();\n }", "public void clear() {\r\n this.map.clear();\r\n }", "public void clearVars() {\n setLatitude (FLOATNULL);\n setLongitude (FLOATNULL);\n setDepth (FLOATNULL);\n setTemperatureMin (FLOATNULL);\n setTemperatureMax (FLOATNULL);\n setSalinityMin (FLOATNULL);\n setSalinityMax (FLOATNULL);\n setOxygenMin (FLOATNULL);\n setOxygenMax (FLOATNULL);\n setNitrateMin (FLOATNULL);\n setNitrateMax (FLOATNULL);\n setPhosphateMin (FLOATNULL);\n setPhosphateMax (FLOATNULL);\n setSilicateMin (FLOATNULL);\n setSilicateMax (FLOATNULL);\n setChlorophyllMin (FLOATNULL);\n setChlorophyllMax (FLOATNULL);\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\n map.clear();\n }", "private void clearBounds() {\n this.bounds_ = null;\n this.bitField0_ &= -9;\n }", "public void clear()\r\n {\r\n super.clear();\r\n }", "public void clear() throws ChangeVetoException;", "public Builder clearRect2Value() {\n if (rect2ValueBuilder_ == null) {\n if (typeCase_ == 7) {\n typeCase_ = 0;\n type_ = null;\n onChanged();\n }\n } else {\n if (typeCase_ == 7) {\n typeCase_ = 0;\n type_ = null;\n }\n rect2ValueBuilder_.clear();\n }\n return this;\n }", "private void clearInputFieldStyle(){\n nameInput.styleProperty().setValue(\"\");\n cogInput.styleProperty().setValue(\"\");\n wheelBaseInput.styleProperty().setValue(\"\");\n frontRollDistInput.styleProperty().setValue(\"\");\n cornerWeightFLInput.styleProperty().setValue(\"\");\n cornerWeightRLInput.styleProperty().setValue(\"\");\n cornerWeightRRInput.styleProperty().setValue(\"\");\n cornerWeightFRInput.styleProperty().setValue(\"\");\n }", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();" ]
[ "0.6603483", "0.63921726", "0.6137088", "0.60485345", "0.6019733", "0.5988765", "0.59669495", "0.5961277", "0.5913356", "0.5878786", "0.5763435", "0.57630944", "0.57630944", "0.5614269", "0.553759", "0.5508758", "0.5498675", "0.5495206", "0.5405205", "0.5404825", "0.53691953", "0.5354191", "0.5344165", "0.5323244", "0.5319993", "0.52845186", "0.5280979", "0.5279393", "0.5274872", "0.5221398", "0.52084136", "0.5204421", "0.5183771", "0.5173176", "0.51672256", "0.5162433", "0.5157185", "0.51555467", "0.51515424", "0.5143966", "0.51374114", "0.513549", "0.5125361", "0.5125361", "0.5123835", "0.5122313", "0.51198554", "0.5113861", "0.51133806", "0.51115227", "0.50924116", "0.5063283", "0.5058393", "0.50562316", "0.5054585", "0.50527763", "0.5045271", "0.50421643", "0.50341976", "0.50341976", "0.50341976", "0.50341976", "0.50341976", "0.50341976", "0.5033576", "0.50328016", "0.50309175", "0.5027367", "0.5027367", "0.5027367", "0.5027367", "0.5027367", "0.5027367", "0.5024533", "0.5022779", "0.5022113", "0.500978", "0.50078994", "0.5003576", "0.49953187", "0.49888766", "0.49839887", "0.49688128", "0.49674138", "0.49628508", "0.49613464", "0.49585822", "0.49532464", "0.49528602", "0.49528602", "0.49528602", "0.49528602", "0.49528602", "0.49528602", "0.49528602", "0.49528602", "0.49528602", "0.49528602", "0.49528602", "0.49528602" ]
0.6726099
0
Removes all CodeUnits, comments, properties, and references from the listing.
public void clearAll(boolean clearContext, TaskMonitor monitor);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAllItems() {\n contents.clear();\n }", "public final void removeAllCompositeTypes()\n {\n listModel.removeAllElements();\n\tallTypes.removeAllElements();\n }", "@Override\n\tpublic void removeAll() {\n\t\tfor (TestUnit testUnit : findAll()) {\n\t\t\tremove(testUnit);\n\t\t}\n\t}", "public void clean(){\n preprocessorActionsPerFile.clear();\n }", "void unsetComments();", "public void clear() {\n\t\tlists.clear();\n\t}", "public void removeAllComments() {\r\n\t\tBase.removeAll(this.model, this.getResource(), COMMENTS);\r\n\t}", "private void clearLists() {\n\t\tobjects = new ArrayList<Entity>();\n\t\tenemies.clear();\n\t\titemList.clear();\n\t}", "void removeAllRawLicenses();", "public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }", "public void deleteAllItineraryItems() {\n\t\tmEditor.clear();\n\t\tmEditor.commit();\n\t}", "public void clear()\n {\n normalImports.clear();\n wildcardImports.clear();\n }", "public void clearList() {\n\t\tdeletedList.clear();\n\t}", "protected void dispose() {\r\n\t\titems.removeAllElements();\r\n\t\tlist.deleteAll();\r\n\t\tthis.list.removeCommand(add2CartCommand);\r\n\t\tthis.list.removeCommand(previewCommand);\r\n\t}", "public void clearAllDefinitionMappings()\n {\n _lovItemMappings.clear();\n }", "@Override\n\tpublic void removeAll() {\n\t\tfor (LocalRichInfo localRichInfo : findAll()) {\n\t\t\tremove(localRichInfo);\n\t\t}\n\t}", "public void clearList()\n\t{\n\t\tnodeManager.clearList();\n\t}", "void clear() {\n\t\tfor (int list = getFirstList(); list != -1;) {\n\t\t\tlist = deleteList(list);\n\t\t}\n\t}", "public void destructor()\n//\n////////////////////////////////////////////////////////////////////////\n{\n // Free up path\n path.unref();\n\n // The SoDetailList destructor deletes all details in the list, so\n // we don't have to do it here\n}", "public void clear() {\r\n iFormatter = null;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[15]++;\r\n iElementPairs.clear();\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[16]++;\r\n }", "void unsetBranchOfficeList();", "void unsetCustomsDetails();", "@AfterMethod(description = \"After method: deleting all list\")\n public void clearList()\n {\n HTMLReport htmlReport = new HTMLReport();\n TodoMVCWorkFlow flow = new TodoMVCWorkFlow();\n htmlReport.log(\"STARTING AfterMethod\");\n htmlReport.logINFO(\"Clearing of the rows in the list before new session\");\n flow.deleteAllList();\n }", "public void removeAllMetadata() {\n\t\tthis.metadata.clear();\n\t}", "@Override\r\n\tpublic void clearALL() {\n\t\tjavaScriptWindow.propertyTable = null;\r\n\r\n\t}", "public void removeAllOfficialFileWebpage() {\r\n\t\tBase.removeAll(this.model, this.getResource(), OFFICIALFILEWEBPAGE);\r\n\t}", "private void clearLists() {\r\n if (memoryLists == null) return;\r\n\r\n for (int i = 0; i < this.memoryLists.length; i++) {\r\n this.lastChanged[i] = -1;\r\n\r\n // clear list\r\n memoryLists[i].setModel(new DefaultListModel());\r\n }\r\n\r\n this.memoryBlocks = null;\r\n this.memoryLists = null;\r\n }", "public void clear(){\r\n NotesList.clear();\r\n }", "void clear()\n\t{\n\t\tgetItems().clear();\n\t}", "@Override\n protected void dispose(ScanningContext context) {\n getFolder().getRepository().removeFile(mType, this);\n\n // Ask for an ID refresh since we're removing an item that previously generated an ID\n context.requestFullAapt();\n\n // don't need to touch the content, it'll get reclaimed as this objects disappear.\n // In the mean time other objects may need to access it.\n }", "public void clearLists() {\r\n\t\ttweets.clear();\r\n\t}", "public void clear() {\n\t\tnegatedConcepts.clear();\n\t\tnegex.clear();\n\t\tconcepts.clear();\n\t}", "private void expungeAllWatchListsFiles()\r\n {\r\n debug(\"expungeAllWatchListsFiles() - Delete ALL WATCHLIST Files\");\r\n\r\n java.io.File fileList = new java.io.File(\"./\");\r\n String rootName = getString(\"WatchListTableModule.edit.watch_list_basic_name\");\r\n String[] list = fileList.list(new MyFilter(rootName));\r\n for (int i = 0; i < list.length; i++)\r\n {\r\n StockMarketUtils.expungeListsFile(list[i]);\r\n }\r\n\r\n debug(\"expungeAllWatchListsFiles() - Delete ALL WATCHLIST Files - Complete\");\r\n }", "public static void removeAll() {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll() {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll() {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll() {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll() {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll() {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll() {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll() {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll() {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll() {\n\t\tgetPersistence().removeAll();\n\t}", "public void clear() {\n this.layers.clear();\n list.clear();\n }", "public void clearItems(){\n items.clear();\n }", "void clearTypedFeatures();", "public void clear() {\n\t\tstringList = null;\n\t}", "public void removeAllInternationalStandardRecordingCode() {\r\n\t\tBase.removeAll(this.model, this.getResource(), INTERNATIONALSTANDARDRECORDINGCODE);\r\n\t}", "public void clear_defineSetupPage_comments() {\r\n\t\tClearText(DefineSetup_Cmnts_txtBx);\r\n\t}", "protected void clearResolvedObjects() {\n\t\ttype = null;\n\t\tmanagedType = null;\n\t\ttypeDeclaration = null;\n\t}", "public void cleanup() {\n this.index = new TreeMap<String, PostingsList>();\n this.count = 0;\n }", "public void clear()\n {\n dessertList.clear();\n }", "public void clear() {\n\t\tthis.contents.clear();\n\t}", "public void cleanup() {\n if (cleaned) {\n return;\n }\n for (val cleanup : cleanups) {\n cleanup.accept(this);\n }\n clear(true);\n cleanups.clear();\n attributes.clear();\n if (parent != null) {\n parent.remove(this);\n }\n cleaned = true;\n }", "public void clean()\r\n {\r\n this.extension = null;\r\n this.extensionValueList = null;\r\n this.extensionLabelList = null;\r\n this.archivoVO = null;\r\n this.archivoVOValueList = null;\r\n this.archivoVOLabelList = null;\r\n this.nuevoNombre = null;\r\n this.nuevoNombreValueList = null;\r\n this.nuevoNombreLabelList = null;\r\n this.action = null;\r\n this.actionValueList = null;\r\n this.actionLabelList = null;\r\n }", "public void clear() {\n\t\twordList.removeAll(wordList);\n\t\t// TODO Add your code here\n\t}", "void clearFeatures();", "private void cleanGarbageInfos()\r\n\t{\r\n\t\tfinal Iterator<SubscriberInfo> lIter = this.subscriberInfos.iterator();\r\n\t\twhile (lIter.hasNext())\r\n\t\t{\r\n\t\t\tfinal SubscriberInfo lInfo = lIter.next();\r\n\t\t\tif (lInfo.isGarbage())\r\n\t\t\t{\r\n\t\t\t\tlIter.remove();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void clearItems() {\n grabbedItems.clear();\n }", "private void clean() {\n //use iterator\n Iterator<Long> it = nodes.keySet().iterator();\n while (it.hasNext()) {\n Long node = it.next();\n if (nodes.get(node).adjs.isEmpty()) {\n it.remove();\n }\n }\n }", "void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static final void clear ()\n {\n ITEMS.clear();\n }", "public String clear() {\n\t\t\tcollectionsOlders.clear();\n\t\t\treturn \"Коллекция была очищена\";\n\t\t}", "public void clear() {\r\n\t\titems.clear();\r\n\t}", "public void removeAll() {\n\t\tsynchronized (mNpcs) {\n\t\t\tmNpcs = Collections.synchronizedList(new ArrayList<Npc>());\n\t\t\tmDemonCount = 0;\n\t\t\tmHumanCount = 0;\n\t\t}\n\t}", "public void clearItems(){\n\t\tinnerItemShippingStatusList.clear();\n\t}", "public void clearAllResultsAndSummaries() {\r\n for (WjrMethodItem methodItem : methodItems.values()) {\r\n methodItem.clearResult();\r\n }\r\n for (WjrClassItem classItem : classItems.values()) {\r\n classItem.clearSummary();\r\n }\r\n root.clearSummary();\r\n }", "private void clean() {\n nodesToRemove.clear();\n edgesToRemove.clear();\n }", "public void reset() {\n this.list.clear();\n }", "public void clear() {\n\t\t//Kill all entities\n\t\tentities.parallelStream().forEach(e -> e.kill());\n\n\t\t//Clear the lists\n\t\tentities.clear();\n\t\tdrawables.clear();\n\t\tcollidables.clear();\n\t}", "private void removeList()\r\n {\n if (tableCheckBinding != null)\r\n {\r\n tableCheckBinding.dispose();\r\n tableCheckBinding = null;\r\n }\r\n\r\n // m_TableViewer.setInput(null);\r\n WritableList newList = new WritableList(SWTObservables.getRealm(Display.getDefault()));\r\n for (int i = 0; i < 10; ++i)\r\n {\r\n newList.add(this.generateNewDataModelItem());\r\n }\r\n m_TableViewer.setInput(newList);\r\n }", "public void clearPurchaseList()\r\n\t{\r\n\t\tm_purechaseList.clear();\r\n\t}", "public void clearFaceletsHtmlCash() {\r\n \t\tfaceletsHtmlTagInfoCache.clear();\r\n \t\ttldFaceletsHtmlElementsByPrefix.clear();\r\n \t}", "public void cleanup() {\r\n\t\tsuper.cleanup();\r\n\t\tfor (int i = 0; i < _composites.size(); i++) {\r\n\t\t\t_composites.get(i).cleanup();\t\r\n\t\t}\r\n\t}", "public void clear()\n {\n keys.clear();\n comments.clear();\n data.clear();\n }", "private void clearAll(){\r\n List<FantasyMatch> allMatches = fmatchBean.findAll();\r\n for(FantasyMatch fm : allMatches){\r\n fmatchBean.remove(fm);\r\n }\r\n \r\n List<RosterPlayer> allRps= rpBean.findAll();\r\n for(RosterPlayer rp : allRps){\r\n rpBean.remove(rp);\r\n }\r\n \r\n List<FantasyTeam> allTeams = ftBean.findAll();\r\n for(FantasyTeam ft : allTeams){\r\n ftBean.remove(ft);\r\n }\r\n \r\n List<FantasyLeague> allLeagues = flBean.findAll();\r\n for(FantasyLeague fl : allLeagues){\r\n flBean.remove(fl);\r\n }\r\n \r\n List<FantasyUser> allUsers = fUserBean.findAll();\r\n for(FantasyUser fu : allUsers){\r\n fUserBean.remove(fu);\r\n }\r\n }", "public void clear() {\n helpers.clear();\n islandKeysCache.clear();\n setDirty();\n }", "public void clear(){\n this.items.clear();\n }", "static void wipeLocations(){\n\t \tfor (int i= 0; i < places.length; i++){\n\t\t\t\tfor (int j = 0; j < places[i].items.size(); j++)\n\t\t\t\t\tplaces[i].items.clear();\n\t\t\t\tfor (int k = 0; k < places[i].receptacle.size(); k++)\n\t\t\t\t\tplaces[i].receptacle.clear();\n\t \t}\n\t \tContainer.emptyContainer();\n\t }", "public void deleteAll(){\n editor.clear();\n editor.apply();\n }", "@Override\r\n public void dispose() {\r\n synchronized (this) {\r\n Symbol.Renderer renderer = getSymbolRenderer();\r\n if (renderer != null) {\r\n // The renderer may force the removal of an item from the catalog, so \r\n // copy the symbols to array that won't be modified by a possible call \r\n // to removeItem by the Renderer.\r\n Symbol[] array = getItems().toArray(new Symbol[0]);\r\n for (Symbol symbol : array) {\r\n renderer.removeSymbol(symbol);\r\n }\r\n }\r\n }\r\n pendingAdds.clear();\r\n super.dispose();\r\n }", "public void reset() {\n aCollection = this.asciiMathLibraryBlock.getOwnedElement().stream().filter(e -> e instanceof NamedElement).collect(Collectors.toList());\n cCollection = this.customFuncBlock.getOwnedElement().stream().filter(e -> e instanceof NamedElement).collect(Collectors.toList());\n }", "private void clearCollection() {\n \n collection_ = getDefaultInstance().getCollection();\n }", "private void garbageColl(){\n\t\tfor(Page p: pageList){\n\t\t\tp.garbageColl();\n\t\t}\n\t\tpageIndex = 0;\n\t}", "public void cleanAll() {\r\n\t\ttos.clear();\r\n\t\tbcs.clear();\r\n\t\tccs.clear();\r\n\t\tattachments.clear();\r\n\t\tinLines.clear();\r\n\t\tsubject= null;\r\n\t\ttext= null;\r\n\t\tfrom= null;\r\n\t}", "void clearUsageReports();", "public static void clearReceipt()\r\n\t{\r\n\t\tlistModel.removeAllElements();\r\n\t\tsubtotalAmount = 0;\r\n\t\ttaxAmount = 0;\r\n\t\ttotalAmount = 0;\r\n\t}", "public void removeAllItems ();", "public static void reset() {\n parentNameToBlockStubs.clear();\n parentNameToParentBlocks.clear();\n }", "void unsetDescription();", "void unsetDescription();", "public void clear(){\n\n \tlist = new ArrayList();\n\n }", "void unsetDesc();", "public void clear() {\n context = null;\n nestedElements.clear();\n }", "public void removeAllEntries() {\n }", "@Override\n protected Collection<IChunk> clearInternal()\n {\n Collection<IChunk> rtn = super.clearInternal();\n \n setModalityChunk(getFreeChunk());\n setProcessorChunk(getFreeChunk());\n setExecutionChunk(getFreeChunk());\n setPreparationChunk(getFreeChunk());\n return rtn;\n }", "@Override\n\tpublic void removeAll() {\n\t\tfor (Campus campus : findAll()) {\n\t\t\tremove(campus);\n\t\t}\n\t}", "public void deleteWholeList()\n {\n head = null;\n }", "public void unsetSwiftCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SWIFTCODE$8, 0);\n }\n }", "void unsetPublicationList();", "public void removeAllItem() {\n orderList.clear();\n }" ]
[ "0.5739202", "0.572099", "0.5668902", "0.559218", "0.5577195", "0.55632246", "0.5549816", "0.55304164", "0.54789156", "0.54665107", "0.5466021", "0.5464414", "0.54590565", "0.53847694", "0.53625995", "0.5351624", "0.53495324", "0.530661", "0.5299662", "0.5286999", "0.52713645", "0.5253635", "0.5252708", "0.5250347", "0.52471054", "0.5244709", "0.5237635", "0.52243876", "0.52095294", "0.51978326", "0.51894045", "0.517695", "0.5172389", "0.51698583", "0.51698583", "0.51698583", "0.51698583", "0.51698583", "0.51698583", "0.51698583", "0.51698583", "0.51698583", "0.51698583", "0.51639146", "0.51494706", "0.51450336", "0.5140705", "0.5138821", "0.5134348", "0.51294017", "0.5122519", "0.5120767", "0.51150066", "0.51073426", "0.510627", "0.5096186", "0.50807416", "0.50756896", "0.5056718", "0.50521326", "0.5051819", "0.50503296", "0.5050253", "0.5046836", "0.504465", "0.50438064", "0.5043499", "0.5040142", "0.50373197", "0.5035686", "0.5035144", "0.50307196", "0.50273925", "0.5025319", "0.5024606", "0.50230813", "0.50216913", "0.5021099", "0.50180084", "0.5017807", "0.5017305", "0.50158453", "0.5014627", "0.5014212", "0.5008328", "0.500275", "0.5001128", "0.5001045", "0.4998967", "0.49980587", "0.49980587", "0.49935836", "0.4992023", "0.49876863", "0.49844128", "0.49817652", "0.49736327", "0.49717453", "0.4966313", "0.49660107", "0.49612373" ]
0.0
-1
Returns the fragment containing the given address.
public ProgramFragment getFragment(String treeName, Address addr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String fragment();", "com.google.protobuf.ByteString getQueryAddress();", "public ProgramFragment getFragment(String treeName, String name);", "protected abstract Fragment getFragmentByPosition(int position);", "com.google.protobuf.ByteString getAddressBytes();", "public static AddressFragment newInstance(String param1) {\n AddressFragment fragment = new AddressFragment();\n\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n\n return fragment;\n }", "long getAddress(ByteBuffer buffer);", "public static Fragment<CustomerAddressQuery> createFragment(String name, CustomerAddressQueryDefinition queryDef) {\n StringBuilder sb = new StringBuilder();\n queryDef.define(new CustomerAddressQuery(sb));\n return new Fragment<>(name, \"CustomerAddress\", sb.toString());\n }", "com.google.protobuf.ByteString\n getAddressBytes();", "public String getFragment() {\n\t\treturn fragment;\n\t}", "public Fragment findFragment(int position) {\n return fragments[position];\n }", "void fragment(String fragment);", "void fragment(String fragment);", "com.google.protobuf.ByteString\n getAddressBytes();", "com.google.protobuf.ByteString\n getAddressBytes();", "com.google.protobuf.ByteString\n getAddressBytes();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "AddressI getAddress();", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n address_ = s;\n }\n return s;\n }\n }", "public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\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 address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\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 address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "String getAddress();", "String getAddress();", "MessageAddress getMessageAddress();", "public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public abstract Fragment getFragment();", "public com.google.protobuf.StringValue getAddress() {\n if (addressBuilder_ == null) {\n return address_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : address_;\n } else {\n return addressBuilder_.getMessage();\n }\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }", "public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\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 address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\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 address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\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 address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public com.google.protobuf.ByteString\n\t\t\tgetAddressBytes() {\n\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\t\tcom.google.protobuf.ByteString b =\n\t\t\t\t\t\t\tcom.google.protobuf.ByteString.copyFromUtf8(\n\t\t\t\t\t\t\t\t\t(java.lang.String) ref);\n\t\t\t\t\taddress_ = b;\n\t\t\t\t\treturn b;\n\t\t\t\t} else {\n\t\t\t\t\treturn (com.google.protobuf.ByteString) ref;\n\t\t\t\t}\n\t\t\t}", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t} else {\n\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\taddress_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t}\n\t\t\t}", "public String getFragment() {\n return m_fragment;\n }", "public com.google.protobuf.ByteString\n\t\t\t\tgetAddressBytes() {\n\t\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\t\tif (ref instanceof String) {\n\t\t\t\t\t\tcom.google.protobuf.ByteString b =\n\t\t\t\t\t\t\t\tcom.google.protobuf.ByteString.copyFromUtf8(\n\t\t\t\t\t\t\t\t\t\t(java.lang.String) ref);\n\t\t\t\t\t\taddress_ = b;\n\t\t\t\t\t\treturn b;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn (com.google.protobuf.ByteString) ref;\n\t\t\t\t\t}\n\t\t\t\t}", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private String removeFragment(String uri) {\n String result = uri;\n int hashPos = uri.indexOf(\"#\");\n if (hashPos >= 0) {\n result = uri.substring(0, hashPos);\n }\n return result;\n }", "public ByteBuffer read(long address)\n {\n return tryRead(address, null);\n }", "public long getPreviousBlock(long address){\n int marker = readMarkerUpperBits(address - 1);\n int blocksize;\n if(marker == 0) {\n blocksize = readLengthField(address - 2, 1);\n return address - blocksize - 1;\n } else if(marker == 15){\n return address - 1;\n }\n else {\n if (marker >= 9 && marker <= 11) {\n marker -= 8;\n }\n blocksize = readLengthField((address - 1 - marker), marker);\n if (isPreviousBlockUsed(address)) return address - blocksize - 2 * marker - 1;\n else return address - blocksize - 1;\n }\n }", "public Function getFunctionContaining(Address addr);", "String getCompressedAddress();", "public java.lang.String getAddress() {\n\t\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\t\taddress_ = s;\n\t\t\t\t\t\treturn s;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t\t}\n\t\t\t\t}", "com.google.protobuf.ByteString\n\t\t\tgetAddressBytes();", "public String fragmentAt(int index) {\n\t\treturn pathFragments.get(index);\n\t}", "public Friend findFriend(Address addr);", "public com.google.protobuf.ByteString getQueryAddress() {\n return queryAddress_;\n }", "Optional<MemoryAddress> lookup(String name);", "public static AddNewAddressFragment newInstance(int addressid, Boolean editFlag) {\n AddNewAddressFragment fragment = new AddNewAddressFragment();\n Bundle args = new Bundle();\n args.putInt(\"addressid\", addressid);\n args.putBoolean(\"editFlag\", editFlag);\n fragment.setArguments(args);\n return fragment;\n }", "@java.lang.Override\n public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public com.google.protobuf.ByteString getQueryAddress() {\n return queryAddress_;\n }", "public CustomerAddressQuery addFragmentReference(Fragment<CustomerAddressQuery> fragment) {\n startField(\"...\" + fragment.getName());\n return this;\n }", "@Override\n public String getQuery() { return String.format(\"select id from ip_address where address='%s'\", getAddress().substring(0, Math.min(getAddress().length(), 15))); }", "public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }", "public java.lang.String getFromAddress() {\n\t\treturn fromAddress;\n\t}", "public static String getAddressSnippet(String userInfo) {\n String snippet = null;\n try {\n JSONArray jsonArray = new JSONArray(userInfo);\n JSONObject jsonObject = jsonArray.getJSONObject(0);\n JSONObject resid = jsonObject.getJSONObject(\"resid\");\n snippet = resid.getString(\"address\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return snippet;\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(String address, boolean withSum) {\n return getInstantService().balance(address, withSum ? 1 : 0);\n }", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "@java.lang.Override\n public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address, boolean withSum) {\n return getAddressData(address.toString(), withSum);\n }", "private String getValidAddress(String addr) {\n\t\tint length = addr.length();\n\t\tif(length < ADDRESS_BITS) {\n\t\t\tint toAdd = ADDRESS_BITS - length;\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\tfor(int i = 0; i < toAdd; i++) {\n\t\t\t\tbuilder.append(0);\n\t\t\t}\n\t\t\tbuilder.append(addr);\n\t\t\treturn builder.toString();\n\t\t} else {\n\t\t\tint toRemove = length - ADDRESS_BITS;\n\t\t\t\n\t\t\treturn addr.substring(toRemove, length);\n\t\t}\n\t}", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "public AddressDetailFragment() {\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getAddressBytes() {\n java.lang.Object ref = address_;\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 address_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static BankDetailFragment newInstance(long param1) {\n BankDetailFragment fragment = new BankDetailFragment();\n Bundle args = new Bundle();\n args.putLong(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n }", "public Fragment getRegisteredFragment(int position) {\n return registeredFragments.get(position);\n }", "public byte get(int addr) throws ProgramException {\n return getSegment(addr, true).get(addr);\n }", "public static BitFragment newInstance() {\n BitFragment fragment = new BitFragment();\n return fragment;\n }", "@java.lang.Override\n public com.google.protobuf.StringValue getAddress() {\n return address_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : address_;\n }", "String getAddress(int type);", "public Data getDataContaining(Address addr);", "public Fragment getRegisteredFragment(int position) {\n return registeredFragments.get(position);\n }", "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 String getAddress() {\n return definition.getString(ADDRESS);\n }", "public InternetAddress getFromAddress();", "public InetSocketAddress getAddress ( ) {\n\t\treturn extract ( handle -> handle.getAddress ( ) );\n\t}", "public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }", "public Friend createFriendWithAddress(String address);" ]
[ "0.60827136", "0.5908728", "0.5812563", "0.56637996", "0.5625913", "0.55017835", "0.54391265", "0.53532314", "0.5335095", "0.5296087", "0.5292978", "0.52462673", "0.52462673", "0.52142817", "0.52142817", "0.52142817", "0.52070946", "0.52070946", "0.52070946", "0.52070946", "0.52070946", "0.52070946", "0.5174581", "0.5174431", "0.5174431", "0.51724684", "0.51243955", "0.5121052", "0.511038", "0.5097254", "0.5097254", "0.50956", "0.50956", "0.5085457", "0.50826067", "0.5069153", "0.5066556", "0.5034687", "0.5033373", "0.5033373", "0.5033373", "0.50332665", "0.50332665", "0.50332665", "0.5030206", "0.5030206", "0.5029421", "0.50248265", "0.5023549", "0.5023549", "0.5018728", "0.50064003", "0.50064003", "0.50064003", "0.50057834", "0.50024676", "0.4988764", "0.4985336", "0.4976705", "0.49689835", "0.49610794", "0.49538583", "0.49470156", "0.49422687", "0.4937422", "0.49313605", "0.4918421", "0.49179143", "0.49152526", "0.4905164", "0.48784512", "0.48541826", "0.4850555", "0.4841406", "0.48383954", "0.48348093", "0.48319522", "0.48231456", "0.48187736", "0.4817143", "0.4816924", "0.4815803", "0.47986978", "0.4781508", "0.47744069", "0.47736394", "0.4763316", "0.47373053", "0.47361168", "0.4733952", "0.47305906", "0.47240335", "0.47175112", "0.47123355", "0.47123355", "0.46995106", "0.46948317", "0.4694669", "0.46944147", "0.46928608" ]
0.69713175
0
Returns the module with the given name.
public ProgramModule getModule(String treeName, String name);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String module(String name)\n {\n return modules.get(name);\n }", "public Module getModule(String name) {\n\t\tif (this._modules == null)\n\t\t\treturn null;\n\t\treturn _modules.get(name);\n\t}", "public ModuleReference getModule (String name) {\n ModuleReference ref = this.moduleTable.get(name);\n if (ref == null) {\n \tthrow new IllegalArgumentException(\"Module \\\"\" + name + \"\\\" does not exist.\");\n }\n \n return ref;\n }", "public RubyModule getModule(String name) {\n return (RubyModule) objectClass.getConstantAt(name);\n }", "public static Module getModuleForIndex(int index) {\r\n return getModule((String) KEYS.get(index));\r\n }", "ModuleAssembly module( String name );", "@Override\r\n\tpublic List<Modules> getModulesByName(String name) {\n\t\tString hql = \"from Modules m where m.name =?\";\r\n\t\treturn (List<Modules>) getHibernateTemplate().find(hql, name);\r\n\r\n\t}", "public Module findModule(String moduleName) {\n if(modules.containsKey(moduleName))\n return modules.get(moduleName);\n //TODO: search in joined mobiles\n return null;\n }", "public RubyModule defineOrGetModuleUnder(String name) {\n // This method is intended only for defining new modules in Ruby code\n Ruby runtime = getRuntime();\n IRubyObject moduleObj = getConstantAt(name);\n RubyModule module;\n if (moduleObj != null) {\n if (!moduleObj.isModule()) throw runtime.newTypeError(name + \" is not a module\");\n if (runtime.getSafeLevel() >= 4) throw runtime.newSecurityError(\"extending module prohibited\");\n module = (RubyModule)moduleObj;\n } else if (classProviders != null && (module = searchProvidersForModule(name)) != null) {\n // reopen a java module\n } else {\n module = RubyModule.newModule(runtime, name, this, true); \n }\n return module;\n }", "public RubyModule getOrCreateModule(String name) {\n IRubyObject module = objectClass.getConstantAt(name);\n if (module == null) {\n module = defineModule(name);\n } else if (getSafeLevel() >= 4) {\n throw newSecurityError(\"Extending module prohibited.\");\n } else if (!module.isModule()) {\n throw newTypeError(name + \" is not a Module\");\n }\n \n return (RubyModule) module;\n }", "public abstract String getModuleName( );", "public static RegisterModuleType nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }", "public static UpdateModuleType nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }", "public PageModel findModuleByName(String name, int offset, int pagesize) {\n\t\t\n\t\treturn service.getPageModel(\"from Module m where m.name like '%\"+name+\"%'\" , offset, pagesize);\n\t}", "private Module selectModuleFromPath(String path) {\n\n\t\tModule module = modules.get(path);\n\t\tif (module != null)\n\t\t\treturn module;\n\t\telse\n\t\t\treturn new DiscardingModule();\n\t}", "public RubyModule defineModuleUnder(String name) {\n return getRuntime().defineModuleUnder(name, this);\n }", "@Nullable\n PsiElement findExportedName(String name);", "private Optional<String> toPackageName(String name) {\n assert !name.endsWith(\"/\");\n int index = name.lastIndexOf(\"/\");\n if (index == -1) {\n if (name.endsWith(\".class\") && !name.equals(MODULE_INFO)) {\n String msg = name + \" found in top-level directory\"\n + \" (unnamed package not allowed in module)\";\n throw new InvalidModuleDescriptorException(msg);\n }\n return Optional.empty();\n }\n\n String pn = name.substring(0, index).replace('/', '.');\n if (Checks.isPackageName(pn)) {\n return Optional.of(pn);\n } else {\n // not a valid package name\n return Optional.empty();\n }\n }", "public String getName()\n {\n return MODULE_NAME;\n }", "public String getModuleName ()\n\n {\n\n // Returns moduleName when called.\n return moduleName;\n\n }", "public DcModule getModule();", "Value require(String module);", "public static Module getModule(String key) {\r\n Module module = null;\r\n module = (Module) SET.get(key);\r\n module.setSymbol(key);\r\n return module;\r\n }", "public DynamicMethod retrieveMethod(String name) {\n return getMethods().get(name);\n }", "private Package_c getPackage(final String name) {\n\t\tPackage_c communication = Package_c.PackageInstance(modelRoot,\n\t\t\t\tnew ClassQueryInterface_c() {\n\n\t\t\t\t\tpublic boolean evaluate(Object candidate) {\n\t\t\t\t\t\tPackage_c selected = (Package_c) candidate;\n\t\t\t\t\t\treturn selected.getName().equals(name);\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\treturn communication;\n\t}", "private String getModuleName() {\n \t\t// If there is an autoconnect page then it has the module name\n \t\tif (autoconnectPage != null) {\n \t\t\treturn autoconnectPage.getSharing().getRepository();\n \t\t}\n \t\tString moduleName = modulePage.getModuleName();\n \t\tif (moduleName == null) moduleName = project.getName();\n \t\treturn moduleName;\n \t}", "String getModuleId();", "public ProgramModule getRootModule(String treeName);", "public final String getModuleName() {\n return MODULE_NAME;\n }", "public RubyModule defineModule(String name) {\n return defineModuleUnder(name, objectClass);\n }", "public void removeModule(String name){\n\t\tModule m = null;\n\t\tfor(Module mod: modules){\n\t\t\tif(mod.getName().matches(name)){\n\t\t\t\tm = mod;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(m!=null){\n\t\t\tlayer.removeChild(m);\n\t\t\tmodules.remove(m);\n\t\t}\n\t}", "public abstract Source load(ModuleName name);", "Module getModule(ModuleCode modCode) throws CommandException;", "Module getById(Long identifier) throws DBException;", "private String name(String module)\n {\n return module.split(\"%%\")[1];\n }", "private Command getCommandByName(String name) {\n for (Command command : commands) {\n if (command.getName().equals(name)) {\n return command;\n }\n }\n return null;\n }", "public Class<?> lookupClass(String name) throws ClassNotFoundException {\n return getClass().getClassLoader().loadClass(name);\n }", "public String getModuleName() {\n if (repository == null) {\n return baseName;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(baseName);\n return b.toString();\n }\n }", "protected abstract Player getModPlayer(String name);", "Module module() {\n return module;\n }", "public static String getPackageFromName(String name)\n \t{\n \t\tif (name.lastIndexOf('/') != -1)\n \t\t\tname = name.substring(0, name.lastIndexOf('/'));\n \t\tif (name.startsWith(\"/\"))\n \t\t\tname = name.substring(1);\n \t\treturn name.replace('/', '.');\t\t\n \t}", "private static Project findProject(String name) {\r\n \t\tfor (Project project : ProjectPlugin.getPlugin().getProjectRegistry().getProjects()) {\r\n \t\t\tif (project.getName().equals(name)) {\r\n \t\t\t\treturn project;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public Module getModule(Long id) {\n\t\tRecord row = dslContext.selectFrom(table(CmsTable.MODULES.getTableName()))\n\t\t\t\t.where(field(\"id\").equal(id)).fetchOne();\n\t\t\n\t\treturn row == null ? null : row.map(new ModuleRecordMapper());\n\t}", "Module getModuleByFile(@NotNull VirtualFile file);", "String getSubmoduleUrl(String name) throws GitException, InterruptedException;", "public Optional<ModuleData> getModuleData(int moduleId, String name) throws SQLException {\n QueryBuilder<ModuleData, Integer> queryBuilder = DB.MODULE_DATA_DAO.queryBuilder();\n Where<ModuleData, Integer> where = queryBuilder.where();\n where.eq(\"module_id\", moduleId).and().eq(\"name\", name);\n\n PreparedQuery<ModuleData> preparedQuery = queryBuilder.prepare();\n\n\n ModuleData data = DB.MODULE_DATA_DAO.queryForFirst(preparedQuery);\n if (data != null) {\n return Optional.of(data);\n } else {\n return Optional.empty();\n }\n }", "public PgExtension getExtension(final String name) {\n return extensions.get(name);\n }", "Optional<Module> getReadModule();", "public java.lang.CharSequence getModule() {\n return module;\n }", "public IRubyObject getConstantFrom(String name) {\n return fastGetConstantFrom(name.intern());\n }", "public Addon getAddon(final String name){\n\t\tfinal AbstractReloadable ar = this.manager.getAddons().get(name);\n\t\tif(ar == null)\n\t\t\treturn null;\n\t\treturn ar.getAddon();\n\t\t/*for(final AbstractReloadable addon:this.manager.getAddons().values())\n\t\t\tif(addon.getAddon().getName().equals(name))\n\t\t\t\treturn addon.getAddon();\n\t\treturn null;*/\n\t}", "public java.lang.CharSequence getModule() {\n return module;\n }", "public String getModuleName() {\n return moduleNameString;\n }", "Module createModule();", "public int getModuleId();", "@Override\n public String toString() {\n return String.format(\"Module '%s'\", getName());\n }", "public String getLocallyAccessibleName( String name );", "@Override\n public String moduleName() {\n return MODULE_NAME;\n }", "public Optional<T> getModule() {\n return Optional.ofNullable(this.module);\n }", "public PrimObject resolveObject(String name) {\n return findObject(importFor(name));\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 372,\n FQN=\"llvm::Module::getNamedGlobal\", NM=\"_ZN4llvm6Module14getNamedGlobalENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZN4llvm6Module14getNamedGlobalENS_9StringRefE\")\n //</editor-fold>\n public GlobalVariable /*P*/ getNamedGlobal(StringRef Name) {\n return getGlobalVariable(new StringRef(Name), true);\n }", "Object find(String name);", "@Override\n\tpublic Modules selectModulesByModulesName(String modulesName) {\n\t\treturn modulesMapper.selectModulesByModulesName(modulesName);\n\t}", "public Component getComponent(String name) {\n Optional<Component> component = elements.getComponent(name);\n\n if(component.isPresent()) {\n return component.get();\n } else {\n Assert.fail(\"Missing component \" + name);\n return null;\n }\n\n }", "synchronized Repository getRepository(String name) {\n\t\treturn repositoryMap.get(name);\n\t}", "public Object get(String name) {\n\t\tMap<?, ?> bindings = m_bindings.getBindings();\n\t\tif (bindings == null) {\n\t\t\tlog.info(\"get: no bindings!\");\n\t\t\treturn null;\n\t\t}\n\n\t\treturn bindings.get(name);\n\t}", "public Protocol getProtocol(String name) {\n for (Protocol p : mProtocols) {\n if (p.getId() != null && p.getId().equals(name)) {\n return p;\n }\n }\n return null;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 220,\n FQN=\"llvm::Module::getName\", NM=\"_ZNK4llvm6Module7getNameEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module7getNameEv\")\n //</editor-fold>\n public StringRef getName() /*const*/ {\n return new StringRef(ModuleID);\n }", "public Resource getResource(final String name) {\n return resourceRegistry.getEntryValue(name);\n }", "public String getModuleName() {\r\n\t\treturn moduleName;\r\n\t}", "public String getModuleName() {\r\n\t\treturn moduleName;\r\n\t}", "ModuleType type();", "public static ComModule getInstance() {\n\t\ttry {\n\t\t\tClass<?> moduleClass = Class.forName(Constants.MODULE_CLASSNAME);\n\t\t\tMethod getinst = moduleClass.getDeclaredMethod(\"getInstance\");\n\t\t\treturn (ComModule) getinst.invoke(null);\n\t\t} catch (Throwable e) {\n\t\t\tthrow new IllegalStateException(e);\n\t\t}\n\t}", "AbstractModule getGuiceModule();", "public static String getModuleId(File f)\n {\n FileReader fr = null;\n try\n {\n fr = new FileReader(f);\n\n final XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance();\n final XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(fr);\n\n while (xmlStreamReader.hasNext())\n {\n if (xmlStreamReader.next() == XMLStreamReader.START_ELEMENT\n && \"module\".equals(xmlStreamReader.getLocalName()))\n {\n for (int i = 0; i < xmlStreamReader.getAttributeCount(); i++)\n {\n String name = xmlStreamReader.getAttributeLocalName(i);\n if (\"name\".equals(name))\n {\n return xmlStreamReader.getAttributeValue(i);\n }\n }\n }\n }\n }\n catch (Exception e)\n {\n // Nothing to do\n }\n finally\n {\n if (null != fr)\n {\n try\n {\n fr.close();\n }\n catch (IOException ioe)\n {\n // Ignore\n }\n }\n }\n\n return null;\n }", "@GetMapping(\":{name}\")\n public DebPackage info(@PathVariable String name)\n {\n DebPackage p = DemoApplication.cache.computeIfAbsent(name, this::findDebPackage);\n\n // package was not found\n if (p == null)\n throw new PackageNotFoundException(name);\n\n return p;\n }", "public PrimClass resolveClass(String name) {\n return findPrimClass(importFor(name));\n }", "ModuleIdentifier getId();", "public Project getProjectByName(String name);", "public String getmoduleName() {\t\r\n\treturn ModuleName;\t\r\n}", "private Plugin getPlugin(String pluginName) {\r\n PluginManager pluginManager = Bukkit.getServer().getPluginManager();\r\n for (Plugin plugin : pluginManager.getPlugins()) {\r\n if (plugin.getName().toLowerCase().equals(pluginName.toLowerCase())) {\r\n return plugin;\r\n }\r\n }\r\n return null;\r\n }", "public Player getPlayer(String name){ \n\t\tif (players.containsKey(name)) return players.get(name);\n\t\tPlayer player = getModPlayer(name);\n\t\tif (player != null) {\n\t\t\tplayers.put(name, player);\n\t\t\treturn player;\n\t\t}\n\t\treturn player;\n\t}", "@RequestMapping(value = \"/bootcamp/{name}\", method = RequestMethod.GET)\n\t\tResponseEntity<List<Modules>> getModByBootcamp(@PathVariable String name) {\n\t\t\tList<Modules> post = repo.findByBootcampOrderByModNm(name);\n\t\t\treturn ResponseEntity.ok(post);\n\t}", "private Node getNode(String name) {\n for(Iterator<Node> i = nodes.iterator(); i.hasNext();) {\n Node n = i.next();\n if(n.getName().equalsIgnoreCase(name)){\n return n;\n };\n }\n return null;\n }", "String lookupMashFromName(String name);", "@Override\n\tpublic Integer selectModulesByName(String modulesName) {\n\t\treturn modulesMapper.selectModulesByName(modulesName);\n\t}", "public static Object get(String name) {\r\n\t\treturn getInstance().addResource(name);\r\n\t}", "public Lab getLabByName(String name)\n {\n Lab [] labs = getAvailableLabs();\n for (Lab lab : labs)\n if (lab.getLabName().equals(name))\n return lab;\n return null;\n }", "String getModuleDisplayName();", "public <T extends AModule> T getModule(Class<T> moduleId)\n\t{\n\t\treturn getModuleOpt(moduleId)\n\t\t\t\t.orElseThrow(() -> new ModuleNotFoundException(moduleMessage(moduleId, \"not found\")));\n\t}", "public static Object getComponentInstance(String name, HttpServletRequest request) {\r\n\t\tServletContext sc = request.getSession().getServletContext();\r\n\t\tContainerWrapper containerWrapper = scf.findContainer(new ServletContextWrapper(sc));\r\n\t\tif (!containerWrapper.isStart()) {\r\n\t\t\tDebug.logError(\"JdonFramework not yet started, please try later \", module);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn containerWrapper.lookup(name);\r\n\t}", "public IRubyObject getConstant(String name) {\n return fastGetConstant(name.intern());\n }", "TourPackage findByName(@Param(\"name\") String name);", "public Product getProductFromName(String prodName) throws BackendException;", "Object getPerm(String name);", "String getName( String name );", "public DynamicMethod searchMethod(String name) {\n return searchWithCache(name).method;\n }", "public CacheHelper getCacheHelper(String name) {\n return (CacheHelper)cacheHelpers.get(name);\n }", "public static synchronized final MaxModule getModule() {\n if (sModule == null) {\n sModule = new MMXModule();\n }\n return sModule;\n }", "@Override\n\tpublic String getModuleName() {\n\t\treturn \"kerenrh\";\n\t}" ]
[ "0.79919565", "0.7699593", "0.7498875", "0.7380031", "0.66146976", "0.65725124", "0.6522171", "0.64701796", "0.64156973", "0.6408572", "0.63184893", "0.6226574", "0.61698776", "0.60150284", "0.60117036", "0.6011158", "0.5988501", "0.596109", "0.5956917", "0.5921349", "0.5861666", "0.5840699", "0.57710475", "0.57002497", "0.5693168", "0.5690296", "0.56563944", "0.5651601", "0.5638172", "0.5634715", "0.5632574", "0.5629755", "0.5594131", "0.5555453", "0.5539507", "0.55327344", "0.5531286", "0.5516453", "0.55069953", "0.55000156", "0.54802257", "0.54504365", "0.5440658", "0.5425737", "0.54122525", "0.53988343", "0.53777355", "0.5374771", "0.5364819", "0.5356939", "0.5355935", "0.5340289", "0.5321372", "0.5305371", "0.52996737", "0.52966565", "0.52890605", "0.52777594", "0.5267349", "0.5262397", "0.52603555", "0.5247426", "0.52422386", "0.52369964", "0.5234698", "0.5230542", "0.5229511", "0.52214825", "0.52210987", "0.52192307", "0.52192307", "0.5217795", "0.52079713", "0.52024937", "0.51995414", "0.51830393", "0.5178625", "0.5167387", "0.5160106", "0.5154891", "0.5150792", "0.5143892", "0.51366794", "0.5132956", "0.5125175", "0.5122387", "0.511903", "0.5118069", "0.51136756", "0.5107616", "0.5107011", "0.51051027", "0.5099244", "0.50987566", "0.509591", "0.50952935", "0.5089495", "0.50836354", "0.50751245", "0.50740033" ]
0.7102704
4
Returns the fragment with the given name.
public ProgramFragment getFragment(String treeName, String name);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ProgramFragment getFragment(String treeName, Address addr);", "public abstract String getFragmentName();", "public static Fragment getFragmentWithName(Fragment rootFragment,\n String name) {\n if (rootFragment.getName() != null\n && rootFragment.getName().equals(name)) {\n return rootFragment;\n }\n for (Fragment child : rootFragment.getChilds()) {\n Fragment correctFragment = RosebudHelper.getFragmentWithName(child,\n name);\n if (correctFragment != null) {\n return correctFragment;\n }\n }\n throw new RuntimeException(\"Fragment with name \" + name + \" not found\");\n }", "public String getSqlFragment(String sqlFragmentName) {\r\n checkArgument(\r\n !StringUtils.isNullOrWhitespaceOnly(sqlFragmentName),\r\n \"sql fragmentName name cannot be null or empty.\");\r\n\r\n if (sqlFragments.containsKey(sqlFragmentName)) {\r\n return sqlFragments.get(sqlFragmentName);\r\n } else {\r\n throw new CatalogException(\r\n format(\"The fragment of sql %s does not exist.\", sqlFragmentName));\r\n }\r\n }", "protected abstract Fragment getFragmentByPosition(int position);", "private void loadFragment(String name) {\n FragmentTransaction fragmentTransaction = MainActivity.fm.beginTransaction();\n // replace the FrameLayout with the new Fragment\n fragmentTransaction.replace(R.id.mainFrameLayout, MainActivity.currentFragment);\n fragmentTransaction.addToBackStack(name);\n fragmentTransaction.commit();\n }", "public abstract Fragment getFragment();", "String fragment();", "public static DynamicFragment getInstance(String name, int atk){\n DynamicFragment instance = new DynamicFragment();\n Bundle args = new Bundle();\n args.putString(\"name\", name);\n args.putInt(\"attack\", atk);\n instance.setArguments(args);\n return instance;\n }", "public static ProductFragments newInstance(String name) {\n ProductFragments fragment = new ProductFragments();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public String getFragment() {\n\t\treturn fragment;\n\t}", "public Fragment findFragment(int position) {\n return fragments[position];\n }", "public String getFragment() {\n return m_fragment;\n }", "public String fragmentAt(int index) {\n\t\treturn pathFragments.get(index);\n\t}", "private void displaySelectedFragment(Fragment fragment) {\n// if (fragmentName == null || !fragment.getClass().getSimpleName().equals(fragmentName)) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.frame_container, fragment);\n fragmentTransaction.commit();\n fragmentName = fragment.getClass().getSimpleName();\n// }\n }", "@Override\n public Fragment getFragment() {\n// uuid = (UUID)getIntent().getSerializableExtra(UUID);\n// return GoalDetailViewFragment.newInstance(uuid);\n return null;\n }", "public Part getPart(String name) throws IOException {\n if(form == null) {\n form = builder.getInstance();\n }\n return form.getPart(name);\n }", "public Fragment getFragment() {\n return fragment;\n }", "@Override\n\tpublic String getCurrentFragmentName() {\n\t\treturn \"IncomeFragment\";\n\t}", "PersonFinder whereNameContains(String fragment);", "FragmentUserObject(StringBuilder name) {\n \t\t\n \t\tfragname = name;\n \t}", "public Video getVideoByName(String name) {\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\t/*\n\t\t * Cursor cursor = db.query(TABLE_CONTACTS, new String[] { KEY_ID,\n\t\t * KEY_NAME, KEY_PH_NO }, KEY_ID + \"=?\", new String[] {\n\t\t * String.valueOf(id) }, null, null, null, null);\n\t\t */\n\t\tCursor cursor = db.query(VivaFrame.TABLE_NAME, new String[] {\n\t\t\t\tVivaFrame.COLUMN_NAME_VI_ID, VivaFrame.COLUMN_NAME_VI_FOLDER,\n\t\t\t\tVivaFrame.COLUMN_NAME_VI_NAME, VivaFrame.COLUMN_NAME_VI_URL },\n\t\t\t\tVivaFrame.COLUMN_NAME_VI_NAME + \"=?\",\n\t\t\t\tnew String[] { String.valueOf(name) }, null, null, null, null);\n\t\tif (cursor != null)\n\t\t\tcursor.moveToFirst();\n\n\t\tVideo video = new Video(Integer.parseInt(cursor.getString(0)),\n\t\t\t\tInteger.parseInt(cursor.getString(1)), cursor.getString(2),\n\t\t\t\tcursor.getString(3));\n\t\t// return contact\n\t\treturn video;\n\t}", "void fragment(String fragment);", "void fragment(String fragment);", "public Integer get(String name){\n\t\treturn blocks.getLast().get(name);\n\t}", "public List<Resource> findByNameContaining(String nameFragment) {\n\t\tMap<String, Object> nameFilter = new HashMap<>();\n\t\tnameFilter.put(\"name\", new ValueParameter(\"%\" + nameFragment + \"%\"));\n\t\treturn this.filter(nameFilter);\n\t}", "public static NameBitFragment newInstance(int pageIndex) {\n NameBitFragment fragment = new NameBitFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_PARAM1, pageIndex);\n fragment.setArguments(args);\n return fragment;\n }", "public Booking getBooking(String name) {\n\t\t\tint i = 0;\r\n\t\t\tBooking buffer;\r\n\t\t\t\r\n\t\t\twhile(i < Bookings.size()) {\r\n\t\t\t\tbuffer = Bookings.get(i);\r\n\t\t\t\tString Name = buffer.getBooker();\r\n\t\t\t\tif (name.contentEquals(Name)) {\r\n\t\t\t\t\treturn buffer;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}", "IIndexFragmentBinding findBinding(IASTName astName) throws CoreException;", "public String customFragment() {\n return this.customFragment;\n }", "public String resolve(final String name) {\n return name.length() > pathLength ? pathLength > 0 ? name.substring(pathLength) : name : null;\n }", "public String getFragmentTag() {\n return this.getClass().getSimpleName();\n }", "public static NameBallFragment newInstance(String param1, String param2) {\n NameBallFragment fragment = new NameBallFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public ItemDefinition getBlock(String name) {\n\t\tfor (ItemDefinition def : itemsArray)\n\t\t{\n\t\t\tif (def != null)\n\t\t\t\tif (def.getName().equalsIgnoreCase(name))\n\t\t\t\t\treturn def;\n\t\t}\n\t\treturn null;\n\t}", "public AssetRef retrieveRef(String name) throws IOException, SQLException {\n String select = \"select definition_id, name, ref from ASSET_REF where name = ?\";\n try (Connection conn = getDbConnection();\n PreparedStatement stmt = conn.prepareStatement(select)) {\n stmt.setString(1, name);\n try (ResultSet rs = stmt.executeQuery()) {\n if (rs.next()) {\n return new AssetRef(name, rs.getLong(\"definition_id\"), rs.getString(\"ref\"));\n }\n }\n }\n return null;\n }", "public d getCurrentBaseFragment() {\n Fragment findFragmentById = getFragmentManager().findFragmentById(16908290);\n if (findFragmentById == null || !(findFragmentById instanceof d)) {\n return null;\n }\n return (d) findFragmentById;\n }", "private Fragment getFragmentByTag(String tag) {\r\n\r\n if (!StringUtils.isBlank(tag)) {\r\n return getSupportFragmentManager().findFragmentByTag(tag);\r\n }\r\n\r\n return null;\r\n }", "private EditBuildInfoFragment findInfoFragment() {\n\t\tFragmentManager fm = getSupportFragmentManager();\n\t\treturn (EditBuildInfoFragment) fm.findFragmentByTag(FragmentUtils.makeFragmentName(mPager.getId(), 0));\n\t}", "public Fragment getRegisteredFragment(int position) {\n return registeredFragments.get(position);\n }", "@Nullable\n PsiElement findExportedName(String name);", "public T get(String name) {\n for (int i = maps.size() - 1; i >= 0; i--) {\n HashMap<String, T> scope = maps.get(i);\n T t = scope.get(name);\n if (t != null) return t; // Found it!\n }\n return null; // Not found\n }", "@Override\n protected boolean isValidFragment(String fragmentName) {\n return true;\n }", "private GraphFragment getGraphFragment() {\n String tag = this.getString(R.string.fragment_graph_tag);\n Fragment fragment = this.getSupportFragmentManager().findFragmentByTag(tag);\n\n if(fragment == null)\n return null;\n\n return (GraphFragment) fragment;\n }", "public Fragment getRegisteredFragment(int position) {\n return registeredFragments.get(position);\n }", "public Handle search(String name) {\n int homePos = hash(table, name);\n int pos;\n\n // QUADRATIC PROBE\n for (int i = 0; i < table.length; i++) {\n // possibly iterate over entire table, but will\n // likely stop before then\n pos = (homePos + i * i) % table.length;\n if (table[pos] == null) {\n break;\n }\n else if (table[pos] != GRAVESTONE\n && table[pos].getStringAt().equals(name)) {\n return table[pos];\n }\n } // end for\n\n return null;\n }", "@Override\r\n\t\tpublic Fragment getItem(int arg0) {\n\t\t\treturn fragments[arg0];\r\n\t\t}", "public TeleportDestination get(String name) {\n\t\tfor (TeleportDestination warp : destinations) {\n\t\t\tif (warp.getName().equalsIgnoreCase(name)) {\n\t\t\t\treturn warp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Book getBookByName(final String name) {\n final TypedQuery<Book> query = entityManager.createQuery(\"select b from Book b where b.name like :name\",\n Book.class).setParameter(\"name\", name);\n try {\n return query.getSingleResult();\n } catch (final PersistenceException ex) {\n return null;\n }\n }", "public static Fragment Instance() {\n\t\t\n\t\treturn new GCourtInfoDetailsFragment();\n\t}", "void onNameBallFragmentInteraction(Uri uri);", "public static final FileBrowserView fromName(String name) {\n FileBrowserView result = DEFAULT;\n if (name != null) {\n for (FileBrowserView view : FileBrowserView.values()) {\n if (name.equals(view.name)) {\n result = view;\n break;\n }\n }\n }\n return result;\n }", "public static Fragment getFragmentByTagName(FragmentManager fragmentManager, String fragmentTagName) {\n Fragment ret = null;\n\n // Get all Fragment list.\n List<Fragment> fragmentList = fragmentManager.getFragments();\n\n if (fragmentList != null) {\n int size = fragmentList.size();\n for (int i = 0; i < size; i++) {\n Fragment fragment = fragmentList.get(i);\n\n if (fragment != null) {\n String fragmentTag = fragment.getTag();\n\n // If Fragment tag name is equal then return it.\n if (fragmentTag.equals(fragmentTagName)) {\n ret = fragment;\n }\n }\n }\n }\n\n return ret;\n }", "@Override\n\tpublic Fragment getItem(int idx) {\n\t\treturn fragmentList.get(idx);\n\t}", "public static CreativeTabImpl getTab(String name) {\n\t\treturn tabs.get(name.toLowerCase());\n\t}", "FragmentType createFragmentType();", "private Fragment getLast() {\n Fragment last;\n switch (lastFragment) {\n case \"userHomeFragment\":\n last = userHomeFragment;\n break;\n case \"scheduleFragment\":\n last = scheduleFragment;\n break;\n case \"medicineFragment\":\n last = medicineFragment;\n break;\n default:\n last = calendarFragment;\n }\n return last;\n }", "private Fragment getLatestFragmentFromBackStack() {\n int entryCount = mFragmentManager.getBackStackEntryCount();\n if (entryCount > 0) {\n FragmentManager.BackStackEntry entry = mFragmentManager.getBackStackEntryAt(entryCount - 1);\n return mFragmentManager.findFragmentByTag(entry.getName());\n } else {\n return null;\n }\n }", "public abstract @NonNull\n Fragment getItem(int position);", "int getMinorFragmentId();", "public Bitmap getB(String name){\n\t\treturn BitmapFactory.decodeResource(activity.getResources(),\n\t\t\t\tactivity.getResources().getIdentifier(name, \"drawable\", activity.getPackageName()));\n\t\t\n\t}", "public PageBean<Match> find(String name) {\n\t\tif(name==null||\"\".equals(name.trim())){\r\n\t\t\treturn matchDao.find(\"from Match\");\r\n\t\t}else{\r\n\t\t\treturn matchDao.find(\"from Match where nickname like ? or userName like ?\",\r\n\t\t\t\t\tnew Object[]{\"%\"+name+\"%\",\"%\"+name+\"%\"});\r\n\t\t\t\r\n\t\t}\r\n\t}", "public static Fragment selectFragment(int itemId) {\n switch (itemId){\n case R.id.menu_home: {\n return new HomeFragment();\n }\n case R.id.menu_search: {\n return new SearchFragment();\n }\n case R.id.menu_profile: {\n return new ProfileFragment();\n }\n default:\n return null;\n }\n }", "@Override\n\tpublic synchronized MemoryBlock getBlock(String blockName) {\n\t\tMemoryBlock memoryBlock = nameBlockMap.get(blockName);\n\t\tif (memoryBlock != null) {\n\t\t\tif (memoryBlock == NoBlock) {\n\t\t\t\t// found placeholder, have searched and found nothing before\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn memoryBlock;\n\t\t}\n\n\t\tfor (MemoryBlock block : blocks) {\n\t\t\tif (block.getName().equals(blockName)) {\n\t\t\t\tnameBlockMap.put(blockName, block);\n\t\t\t\treturn block;\n\t\t\t}\n\t\t}\n\n\t\t// store placeholder there is no memory block with that name\n\t\tnameBlockMap.put(blockName, NoBlock);\n\t\treturn null;\n\t}", "@NonNull\n public abstract Fragment getItem(int position);", "public abstract int getFragmentView();", "private void getFragment(Fragment fragment) {\n // create a FragmentManager\n FragmentManager fm = getFragmentManager();\n // create a FragmentTransaction to begin the transaction and replace the Fragment\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n // replace the FrameLayout with new Fragment\n fragmentTransaction.replace(R.id.fragment_layout, fragment);\n // save the changes\n fragmentTransaction.commit();\n }", "public void createFragment() {\n\n }", "public String getFragmentNameAtPosition(int position) {\n\t\tif (position <= getBackStackCount()) {\n\t\t\treturn this.getSupportFragmentManager()\n\t\t\t\t\t.getBackStackEntryAt(position - 1).getName();\n\t\t}\n\t\treturn null;\n\t}", "public V fetch(String name) {\n return mCache.fetch(name, mSource);\n }", "public static Object getThingByName (String name) {\n \n Object thing = Item.getByNameOrId(name);\n \n if (thing != null)\n return thing;\n \n thing = Block.getBlockFromName(name);\n \n if (thing != null)\n return thing;\n \n return null;\n }", "@NonNull\n @Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n return FragmentA.newInstance(\"This is First Fragment\");\n case 1:\n return FragmentB.newInstance(\"This is second Fragment\");\n case 2:\n return FragmentC.newInstance(\"This is Third Fragment\");\n }\n return FragmentA.newInstance(\"This is Default Fragment\");\n }", "protected abstract Fragment createFragment();", "@Override\n\tpublic Fragment getItem(int arg0) {\n\t\treturn list_fragments.get(arg0);\n\t}", "public final String mo60917a() {\n return \"tag_fragment_discover\";\n }", "public static ReceiverRequestFragment newInstance(int celukState, String fragmentName) {\n ReceiverRequestFragment fragment = new ReceiverRequestFragment();\n fragment.celukState = celukState;\n fragment.fragmentName = fragmentName;\n return fragment;\n }", "public Value lookup (String name){\n Closure exist = find_var(name);\n return exist.getValues().get(name);\n }", "protected abstract int getFirstFrag();", "public GraphNode<?> get(String name) {\n\t\tfor(GraphNode<?> node : nodes) {\n\t\t\tif(node.data.equals(name))\n\t\t\t\treturn node;\n\t\t}\n\t\treturn null;\n\t}", "public static TGTourFragment newInstance(String userNamez) {\n\n return new TGTourFragment();\n }", "private Fragment getLessonFragment() {\n\t\treturn MediaPlayerFragmentFactory.getMediaPlayerFragment(lesson);\n\t}", "public String bnd(String name) {\n\t\treturn bnd.get(name);\n\t}", "Tag findByName(String name);", "private Vertice getVertex(String name) {\r\n Vertice v = (Vertice) vertices.get(name);\r\n if (v == null) {\r\n v = new Vertice(name);\r\n vertices.put(name, v);\r\n }\r\n return v;\r\n }", "private void loadFragment(String fragmentTag)\n {\n\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction ft = fm.beginTransaction();\n ft.setCustomAnimations(android.R.anim.slide_in_left, android.R.anim.slide_out_right);\n\n Fragment taggedFragment = (Fragment) fm.findFragmentByTag(fragmentTag);\n if (taggedFragment == null)\n {\n\n if (fragmentTag == LondonFragment.TAG)\n {\n taggedFragment = new LondonFragment();\n }\n\n if (fragmentTag == ParisFragment.TAG)\n {\n taggedFragment = new ParisFragment();\n }\n\n if (fragmentTag == CopenhagenFragment.TAG)\n {\n taggedFragment = new CopenhagenFragment();\n }\n\n if (fragmentTag == DualFragment.TAG)\n {\n taggedFragment = new DualFragment();\n }\n\n }\n ft.replace(R.id.container, taggedFragment, fragmentTag);\n ft.commit();\n\n //Ezt fontos hívni\n getSupportFragmentManager().executePendingTransactions();\n\n Fragment frag2 = (Fragment) fm.findFragmentByTag(fragmentTag);\n frag2.getActivity();\n\n\n\n\n\n drawerLayout.closeDrawer(Gravity.LEFT);\n }", "public Part lookupPart(String partName) {\n for(Part part : allParts) {\n if(part.getName().equals(partName)) {\n return part;\n }\n }\n \n return null;\n }", "public String getFragmentPath() {\n return fragmentPath;\n }", "public Element getChild(String name) {\n return getChild(name, null, null);\n }", "protected Fragment waitForFragment(String tag, int timeout) {\r\n long endTime = SystemClock.uptimeMillis() + timeout;\r\n while (SystemClock.uptimeMillis() <= endTime) {\r\n\r\n Fragment fragment = getActivity().getFragmentManager().findFragmentByTag(tag);\r\n if (fragment != null) {\r\n return fragment;\r\n }\r\n }\r\n return null;\r\n }", "@Override\n public Fragment getItem(int arg0) {\n return mFragments.get(arg0);\n }", "private BaseWatchMeFragment openFragment(FragmentManager manager,\n BaseWatchMeFragment fragment,\n Bundle args, String name){\n if(args != null){\n fragment.setArguments(args);\n }\n\n manager.beginTransaction()\n .replace(R.id.container, fragment, name)\n .addToBackStack(name)\n .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)\n .commit();\n\n return fragment;\n }", "@Override\n\tpublic String findId(String name) throws Exception {\n\t\treturn null;\n\t}", "@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }", "@NonNull\n @Override\n public Fragment getItem(int position) {\n switch (position){\n case 0:\n return new MoviesListFragment(tabNames[position]);\n case 1:\n return new MoviesListFragment(tabNames[position]);\n case 2:\n return new MoviesListFragment(tabNames[position]);\n case 3:\n return new MoviesListFragment(tabNames[position]);\n case 4:\n return new MoviesListFragment(tabNames[position]);\n default:\n return new MoviesListFragment(\"General\");\n }\n }", "@Override\n public android.support.v4.app.Fragment getItem(int arg0) {\n return arf.get(arg0);\n }", "private Fragment getWallpaperChooserFragment(int fragmentId) {\n Fragment fragment = mActivity.getFragmentManager().findFragmentById(fragmentId);\n assertTrue(fragment instanceof WallpaperChooserFragment);\n return fragment;\n }", "public SaveGameNode getFirstChild(String name) {\r\n SaveGameNode node;\r\n node = this.children.stream().filter(child -> child.equals(name)).findFirst().get();\r\n return node;\r\n }", "public static String getQueryValue(String name) {\n String result = null;\n Map<String, ArrayList<String>> query = getQuery();\n\n if (query != null) {\n result = query.get(name).get(0);\n }\n\n return result;\n }", "public Fragment getFragment(Class fragmentClass) {\n Fragment fragment = null;\n try {\n fragment = (Fragment) fragmentClass.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n e.printStackTrace();\n }\n\n return fragment;\n }", "public static String parseElId(String name) {\n String patternString = \"(^[GT]\\\\w+\\\\.?\\\\w*):\";\n Pattern pattern = Pattern.compile(patternString);\n java.util.regex.Matcher matcher = pattern.matcher(name);\n if (matcher.find())\n return matcher.group(1);\n else\n return null;\n }", "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }" ]
[ "0.7105678", "0.6778711", "0.64519686", "0.6420626", "0.623299", "0.6231584", "0.6069842", "0.60211265", "0.5860577", "0.58395547", "0.583807", "0.5810378", "0.57932884", "0.5748763", "0.5495412", "0.5456927", "0.54402167", "0.54320353", "0.5411622", "0.5408416", "0.5400744", "0.5391424", "0.5371811", "0.5371811", "0.534041", "0.5319508", "0.5288997", "0.5271276", "0.5255597", "0.52415705", "0.52067995", "0.5194132", "0.5186662", "0.51864576", "0.51653737", "0.5161679", "0.5159432", "0.5159326", "0.5155343", "0.5155264", "0.5128026", "0.51273954", "0.5123905", "0.51128805", "0.5102084", "0.5092334", "0.50828475", "0.5074532", "0.50172627", "0.50160605", "0.5015995", "0.5006799", "0.5005722", "0.500463", "0.4996143", "0.49887553", "0.49865812", "0.49759105", "0.4973569", "0.49614266", "0.49601015", "0.4954199", "0.49541926", "0.49507535", "0.4947393", "0.4945573", "0.4932465", "0.49267662", "0.4919986", "0.4910798", "0.48977327", "0.489656", "0.487996", "0.4872525", "0.48678342", "0.48661757", "0.4865296", "0.48578876", "0.4854669", "0.48484883", "0.48439696", "0.48430973", "0.48360923", "0.4835738", "0.4834236", "0.4832722", "0.48282403", "0.48267502", "0.4826557", "0.48253047", "0.48201507", "0.48151684", "0.48137438", "0.480936", "0.4807801", "0.48004535", "0.47953013", "0.47949204", "0.47933555", "0.47925127" ]
0.76794565
0
Create a new tree that will be identified by the given name. By default, the new root module is populated with fragments based on memory blocks. Note that the root module's name is not the same as its tree name. The root module name defaults to the name of the program.
public ProgramModule createRootModule(String treeName) throws DuplicateNameException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ProgramModule getModule(String treeName, String name);", "public ProgramModule getRootModule(String treeName);", "private final void createAndAddNode(String name) {\n\t}", "public Node createNode(String p_name) {\n\t\tNode n = new Node(p_name, this);\n\t\taddNode(n);\n\t\treturn n;\n\t}", "private void createTree(String Name) {\n DecisionTree tree = new DecisionTree(treeID, Name, mainPanel.getSize(), font);\n mainPanel.addTab(Name + \" *\", tree);\n trees.add(tree);\n }", "public ProgramFragment getFragment(String treeName, String name);", "abstract protected T createModuleNode(NodeDescriptor node);", "public RubyModule defineModule(String name) {\n return defineModuleUnder(name, objectClass);\n }", "ModuleAssembly module( String name );", "public RubyModule defineModuleUnder(String name) {\n return getRuntime().defineModuleUnder(name, this);\n }", "public Node newChild(String name) {\n assert name != null;\n Node n = new Node(name);\n this.e.appendChild(n.e);\n return n;\n }", "Builder(String name) {\n var synthetic = Set.of(ModuleDescriptor.Modifier.SYNTHETIC);\n this.descriptor = ModuleDescriptor.newModule(name, synthetic);\n }", "public TreeNode(String name) {\r\n setName(name);\r\n }", "public ProgramModule getRootModule(long treeID);", "public void createTree() {\n\t\taddNodeToParent(nodeMap);\n\t}", "Module createModule();", "public static Path genSimpleTestTree(Path root, String name) throws IOException {\n Path tmp = root.resolve(name);\n\n Path t1 = tmp.resolve(\"test.txt\");\n Path t2 = tmp.resolve(Paths.get(\"dir\", \"file.txt\"));\n Path t3 = tmp.resolve(Paths.get(\"dir\", \"subDir\", \"child.txt\"));\n\n PathHelper.mkdirs(t2.getParent());\n PathHelper.mkdirs(t3.getParent());\n Files.write(t1, TEST1.getBytes(StandardCharsets.UTF_8));\n Files.write(t2, TEST2.getBytes(StandardCharsets.UTF_8));\n Files.write(t3, TEST3.getBytes(StandardCharsets.UTF_8));\n\n return tmp;\n }", "public RubyModule defineModuleUnder(String name, RubyModule parent) {\n IRubyObject moduleObj = parent.getConstantAt(name);\n \n boolean parentIsObject = parent == objectClass;\n \n if (moduleObj != null ) {\n if (moduleObj.isModule()) return (RubyModule)moduleObj;\n \n if (parentIsObject) {\n throw newTypeError(moduleObj.getMetaClass().getName() + \" is not a module\");\n } else {\n throw newTypeError(parent.getName() + \"::\" + moduleObj.getMetaClass().getName() + \" is not a module\");\n }\n }\n \n return RubyModule.newModule(this, name, parent, !parentIsObject);\n }", "public Module createModule(String bundleName, String moduleTypeName) {\n Bundle bundle = getBundle(bundleName);\n if (bundle == null) {\n return null;\n }\n //System.err.println(\"creating \"+bundleName+\":\"+moduleTypeName);\n CModule newModule = createCModule(bundleName, moduleTypeName);\n //System.err.println(\"done\");\n return newModule;\n }", "public Node(String name) {\n this.name = name;\n }", "public RubyModule defineOrGetModuleUnder(String name) {\n // This method is intended only for defining new modules in Ruby code\n Ruby runtime = getRuntime();\n IRubyObject moduleObj = getConstantAt(name);\n RubyModule module;\n if (moduleObj != null) {\n if (!moduleObj.isModule()) throw runtime.newTypeError(name + \" is not a module\");\n if (runtime.getSafeLevel() >= 4) throw runtime.newSecurityError(\"extending module prohibited\");\n module = (RubyModule)moduleObj;\n } else if (classProviders != null && (module = searchProvidersForModule(name)) != null) {\n // reopen a java module\n } else {\n module = RubyModule.newModule(runtime, name, this, true); \n }\n return module;\n }", "public static void set_root_child_name(String name) {\n\t\tDefaultMutableTreeNode cdir=new DefaultMutableTreeNode(name);\r\n\t\t\r\n\t\troot.add(cdir);\r\n\t\t\r\n//\t\tcurrent_node.add(cdir);\r\n\t\t//JTree ftp_dir_tree = new JTree(root);\r\n\t\t\r\n\t}", "public JTreeImpl(String rootTxt) {\r\n DefaultMutableTreeNode root = new DefaultMutableTreeNode(rootTxt);\r\n tree = new JTree(root);\r\n tree.setShowsRootHandles(true);\r\n memory.push(root);\r\n }", "public void createGroup() {\n\t\tString name = JOptionPane\n\t\t\t\t.showInputDialog(\"Please Enter a new group name:\");\n\t\tif (name.equals(\"\"))\n\t\t\treturn;\n\n\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) getLastSelectedPathComponent();\n\t\tEllowFile pfile = (EllowFile) node.getUserObject(), file;\n\t\tif (pfile.isDirectory()) {\n\t\t\tfile = new EllowFile(pfile.getAbsolutePath() + \"\\\\\\\\\" + name);\n\t\t\tfile.mkdirs();\n\t\t\tmodel.insertNodeInto(new DefaultMutableTreeNode(file), node,\n\t\t\t\t\tnode.getChildCount());\n\t\t} else {\n\t\t\tfile = new EllowFile(pfile.getParent() + \"\\\\\\\\\" + name);\n\t\t\tfile.mkdirs();\n\t\t\tnode = ((DefaultMutableTreeNode) node.getParent());\n\t\t\tmodel.insertNodeInto(new DefaultMutableTreeNode(file), node,\n\n\t\t\tnode.getChildCount());\n\t\t}\n\t\tfile.parentProject = pfile.parentProject;\n\t\tpfile.parentProject.rebuild();\n\t\tmodel.nodeChanged(root);\n\t}", "public ProgramFragment getFragment(String treeName, Address addr);", "public static ForestModel createForest(Tree tree, String name) {\r\n try {\r\n // Create an ur-root node to be the parent for all the trees in the\r\n\t\t\t// forest\r\n final IRNode n = new PlainIRNode();\r\n tree.initNode(n, -1);\r\n\r\n// final SlotFactory sf = JJNode.treeSlotFactory;\r\n final SlotFactory sf = SimpleSlotFactory.prototype; \r\n final IRSequence<IRNode> roots = sf.newSequence(1);\r\n roots.setElementAt(n, 0);\r\n\r\n return (new DelegatingPureForestFactory(tree, roots, true)).create(\r\n name,\r\n sf);\r\n } catch (SlotAlreadyRegisteredException e) {\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }", "public Module(String templateName, String thymeLeafName) {\n\t\tthis.templateName = templateName;\n\t\tthis.thymeLeafName = thymeLeafName;\n\t}", "public HNode createHead(String name) throws InvalidTreeException;", "public Node insertByName(Node bstNode, String name, String sname, String no){\n\t\tif(bstNode == null){\n\t\t\tbstNode = new Node(name, sname, no);\n\t\t\tbstNode.setParent(parent);\n\t\t}\n\t\telse{\n\t\t\tparent = bstNode;\n\t\t\tif(name.compareTo(bstNode.getName())<0)\n\t\t\t\tbstNode.setLeft(insertByName(bstNode.getLeft(),name,sname,no));\t\t\n\t\t\t\n\t\t\telse\n\t\t\t\tbstNode.setRight(insertByName(bstNode.getRight(),name,sname,no));\n\t\t}\n\t\t\n\n\t\treturn bstNode;\n\t\t\n\t}", "public void changeName(String name) {\n this.treeName = name;\n }", "public RubyModule getOrCreateModule(String name) {\n IRubyObject module = objectClass.getConstantAt(name);\n if (module == null) {\n module = defineModule(name);\n } else if (getSafeLevel() >= 4) {\n throw newSecurityError(\"Extending module prohibited.\");\n } else if (!module.isModule()) {\n throw newTypeError(name + \" is not a Module\");\n }\n \n return (RubyModule) module;\n }", "private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = new Node(7);\r\n\t\tb.left.right = new Node(4);\r\n\r\n\t\t//sample nodes which are identical\r\n\t\ta1 = new Node(1);\r\n\t\ta1.left = new Node(3);\r\n\t\ta1.left.left = new Node(5);\r\n\t\ta1.right = new Node(2);\r\n\r\n\r\n\t\tb1 = new Node(1);\r\n\t\tb1.left = new Node(3);\r\n\t\tb1.right = new Node(2);\r\n\t\tb1.left.left = new Node(5); \r\n\t}", "void makeTree()\n \t{\n \t\t\t \n \t\tobj.insert(5,\"spandu\");\n \tobj.insert(4,\"anshu\");\n \tobj.insert(3,\"anu\");\n \tobj.insert(6,\"himani\");\n \t\t\n \t}", "protected void makeTheTree(){\n\n structure.getRootNode().branchList.add(structure.getNode11());\n structure.getRootNode().branchList.add(structure.getNode12());\n structure.getRootNode().branchList.add(structure.getNode13());\n\n structure.getNode11().branchList.add(structure.getNode111());\n structure.getNode11().branchList.add(structure.getNode112());\n structure.getNode11().branchList.add(structure.getNode113());\n\n structure.getNode13().branchList.add(structure.getNode131());\n\n structure.getNode112().branchList.add(structure.getNode1121());\n\n }", "public TreeTest(String name) {\r\n super(name);\r\n }", "private TreeNode createTree() {\n // Map<String, String> map = new HashMap<>();\n // map.put(\"dd\", \"qq\");\n // 叶子节点\n TreeNode G = new TreeNode(\"G\");\n TreeNode D = new TreeNode(\"D\");\n TreeNode E = new TreeNode(\"E\", G, null);\n TreeNode B = new TreeNode(\"B\", D, E);\n TreeNode H = new TreeNode(\"H\");\n TreeNode I = new TreeNode(\"I\");\n TreeNode F = new TreeNode(\"F\", H, I);\n TreeNode C = new TreeNode(\"C\", null, F);\n // 构造根节点\n TreeNode root = new TreeNode(\"A\", B, C);\n return root;\n }", "public static Node createLargeTree() {\n final int dcCount = 2;\n final int rackCount = 6;\n final int snCount = 6;\n final int hdCount = 12;\n\n int id = 0;\n // root\n Node root = new Node();\n root.setName(\"root\");\n root.setId(id++);\n root.setType(Types.ROOT);\n root.setSelection(Selection.STRAW);\n // DC\n List<Node> dcs = new ArrayList<Node>();\n for (int i = 1; i <= dcCount; i++) {\n Node dc = new Node();\n dcs.add(dc);\n dc.setName(\"dc\" + i);\n dc.setId(id++);\n dc.setType(Types.DATA_CENTER);\n dc.setSelection(Selection.STRAW);\n dc.setParent(root);\n // racks\n List<Node> racks = new ArrayList<Node>();\n for (int j = 1; j <= rackCount; j++) {\n Node rack = new Node();\n racks.add(rack);\n rack.setName(dc.getName() + \"rack\" + j);\n rack.setId(id++);\n rack.setType(StorageSystemTypes.RACK);\n rack.setSelection(Selection.STRAW);\n rack.setParent(dc);\n // storage nodes\n List<Node> sns = new ArrayList<Node>();\n for (int k = 1; k <= snCount; k++) {\n Node sn = new Node();\n sns.add(sn);\n sn.setName(rack.getName() + \"sn\" + k);\n sn.setId(id++);\n sn.setType(StorageSystemTypes.STORAGE_NODE);\n sn.setSelection(Selection.STRAW);\n sn.setParent(rack);\n // hds\n List<Node> hds = new ArrayList<Node>();\n for (int l = 1; l <= hdCount; l++) {\n Node hd = new Node();\n hds.add(hd);\n hd.setName(sn.getName() + \"hd\" + l);\n hd.setId(id++);\n hd.setType(StorageSystemTypes.DISK);\n hd.setWeight(100);\n hd.setParent(sn);\n }\n sn.setChildren(hds);\n }\n rack.setChildren(sns);\n }\n dc.setChildren(racks);\n }\n root.setChildren(dcs);\n return root;\n }", "public InternalBranch(String name) {\n this(InternalRefId.ofBranch(name).getId(), name, InternalL1.EMPTY.getMap(), Id.EMPTY, SINGLE_EMPTY_COMMIT, DT.now());\n }", "public Tree(String label) {\n treeName = label;\n root = null;\n }", "public ModuleType(String name) {\r\n super(name, name);\r\n }", "private void createRootNode()\r\n {\r\n root = new Node(\"root\", null);\r\n Node.clear();\r\n }", "private String node(String name) { return prefix + \"AST\" + name + \"Node\"; }", "public Node newSibling(String name) {\n Node n = new Node(name);\n this.e.getParentNode().appendChild(n.e);\n return n;\n }", "public static ProductFragments newInstance(String name) {\n ProductFragments fragment = new ProductFragments();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public static SyntaxForestModel createSyntaxForest(\r\n SyntaxTreeInterface tree,\r\n String name) {\r\n try {\r\n // Create an ur-root node to be the parent for all the trees in the\r\n\t\t\t// forest\r\n IRNode n = new MarkedIRNode(\"Root for forest: \"+name);\r\n tree.initNode(n, Ellipsis.prototype, -1);\r\n // tree.initNode(n, -1);\r\n\r\n// final SlotFactory sf = JJNode.treeSlotFactory;\r\n final SlotFactory sf = SimpleSlotFactory.prototype;\r\n final IRSequence<IRNode> roots = sf.newSequence(~1);\r\n roots.setElementAt(n, 0);\r\n System.err.println(\"Finished init of pure forest at \"+Version.getVersion());\r\n \r\n return (new DelegatingPureSyntaxForestFactory(tree, roots, true)).create(\r\n name,\r\n sf);\r\n } catch (SlotAlreadyRegisteredException e) {\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }", "public void createTree() {\n Node<String> nodeB = new Node<String>(\"B\", null, null);\n Node<String> nodeC = new Node<String>(\"C\", null, null);\n Node<String> nodeD = new Node<String>(\"D\", null, null);\n Node<String> nodeE = new Node<String>(\"E\", null, null);\n Node<String> nodeF = new Node<String>(\"F\", null, null);\n Node<String> nodeG = new Node<String>(\"G\", null, null);\n root.leftChild = nodeB;\n root.rightChild = nodeC;\n nodeB.leftChild = nodeD;\n nodeB.rightChild = nodeE;\n nodeC.leftChild = nodeF;\n nodeC.rightChild = nodeG;\n\n }", "ModuleDefinition createModuleDefinition();", "public void growTree(World par1World, int par2, int par3, int par4, Random par5Random)\n {\n \t int var6 = par1World.getBlockMetadata(par2, par3, par4) & 3;\n //world.setBlock(i, j, k, 0);\n Object obj = null;\n obj = new WorldGenReactionCraftTree();\n\n {\n par1World.setBlockAndMetadata(par2, par3, par4, this.blockID, var6);\n }\n }", "Wood(String treeName, String logName){\n setLogName(logName);\n setTreeName(treeName);\n }", "public Node insertByNumber(Node bstNode, String name, String sname, String no){\n\t\tif(bstNode == null){\n\t\t\tbstNode = new Node(name, sname, no);\n\t\t\tbstNode.setParent(parent);\n\t\t}\n\t\telse{\n\t\t\tparent = bstNode;\n\t\t\tif(no.compareTo(bstNode.getNumber())<0)\n\t\t\t\tbstNode.setLeft(insertByNumber(bstNode.getLeft(),name,sname,no));\n\t\t\telse\n\t\t\t\tbstNode.setRight(insertByNumber(bstNode.getRight(),name,sname,no));\n\t\t}\n\t\treturn bstNode;\n\t\t\n\t}", "public Structure load(String name) {\n \t\treturn null;\n \t}", "private Module createModule(String moduleId, String ownerId, String copyId) throws NoFactoryForModuleException{\n\t\tIModuleFactory factory = factories.get(moduleId);\n\t\tif (factory==null){\n\t\t\tthrow new NoFactoryForModuleException(moduleId);\n\t\t}\n\t\treturn factory.createModule(ownerId, copyId);\n\t}", "public static void addRootCommand(String name) {\n\t\tcommands.put(name, new ArrayList<String>());\n\t\thandler.put(name, new HashMap<String, Handler>());\n\t\thelp.put(name, new HashMap<String,String>());\n\t\thelpargs.put(name, new HashMap<String,String>());\n\t\tpermissions.put(name, new HashMap<String,String>());\n\t}", "public Master(String name) {\n\t\tthis.name=name;\n\t}", "public static NamedEntityGraph loading(String name) {\n return new NamedEntityGraph(EntityGraphType.LOAD, name);\n }", "public Node newChild(String name, String content) {\n Node n = new Node(name);\n n.e.appendChild(d.createTextNode(content));\n this.e.appendChild(n.e);\n return n;\n }", "public BuildTree createBuildTree() {\n BuildTree buildTree = new BuildTree();\n createBuildTree(0, buildTree);\n return buildTree;\n }", "public void addModule(Module module, String name) {\n module.parentMobile = this;\n modules.put(name, module);\n if(module instanceof LightSource)\n Scene.addLightSource((LightSource) module);\n }", "public void addNode(String name, int index) {\n\t\tDefaultTreeModel model = (DefaultTreeModel) getModel();\n\t\tTreeNode root = (TreeNode) model.getRoot();\n\t\tif (index > root.getChildCount() || index < 0){\n\t\t\tindex = root.getChildCount();\n\t\t}\n\n\t\tmodel.insertNodeInto(new TreeNode(name, root.getNodeOption(), index, false), root, index);\n\t\tmodel.reload();\n\n\t\tscrollRowToVisible(index + 1);\n\n\t}", "public static ModuleDef createSyntheticModule(TreeLogger logger,\n String moduleName, String[] inherits, boolean refresh)\n throws UnableToCompleteException {\n ModuleDef moduleDef = tryGetLoadedModule(logger, moduleName, refresh);\n if (moduleDef != null) {\n return moduleDef;\n }\n ModuleDefLoader loader = new ModuleDefLoader(inherits);\n ModuleDef module = loader.doLoadModule(logger, moduleName);\n /*\n * Must reset name override on synthetic modules. Otherwise they'll be\n * incorrectly affected by the last inherits tag, because they have no XML\n * which would reset the name at the end of parse.\n */\n module.setNameOverride(null);\n return module;\n }", "public void createNode()\r\n\t{\r\n\t\tTreeNode first=new TreeNode(1);\r\n\t\tTreeNode second=new TreeNode(2);\r\n\t\tTreeNode third=new TreeNode(3);\r\n\t\tTreeNode fourth=new TreeNode(4);\r\n\t\tTreeNode fifth=new TreeNode(5);\r\n\t\tTreeNode sixth=new TreeNode(6);\r\n\t\tTreeNode seventh=new TreeNode(7);\r\n\t\tTreeNode eight=new TreeNode(8);\r\n\t\tTreeNode nine=new TreeNode(9);\r\n\t\troot=first;\r\n\t\tfirst.left=second;\r\n\t\tfirst.right=third;\r\n\t\tsecond.left=fourth;\r\n\t\tthird.left=fifth;\r\n\t\tthird.right=sixth;\r\n\t\tfifth.left=seventh;\r\n\t\tseventh.right=eight;\r\n\t\teight.left=nine;\r\n\t\t\r\n\t}", "public static Object initialize(String rootClassName, List<String> implementationClassNames) throws Exception {\n Class targetClass = Class.forName(rootClassName);\n var implementationClasses = new ArrayList<Class>();\n\n for (var className : implementationClassNames) {\n implementationClasses.add(Class.forName(className));\n }\n\n return dfsCreate(targetClass, implementationClasses, new HashMap<>());\n }", "public Node(String name, String state) {\n\t\tthis.name = name;\n\t\tthis.state = state;\n\t\tID = (name + state + lon + \"\" + lat).hashCode();\n\n\t\tedgeList = new ArrayList<Edge>();\n\t}", "public RunStmnt(String name) {\r\n\t\tsuper();\r\n\t\tsetName(new Name(name));\r\n\t}", "private BTNode createNode() {\n BTNode btNode;\n btNode = new <DataPair>BTNode ();\n btNode.mIsLeaf = true;\n btNode.mCurrentKeyNum = 0;\n return btNode;\n }", "protected SceneGraphObject createNode( String className ) {\n\tSceneGraphObject ret;\n\n\ttry {\n Class state = Class.forName( className, true, control.getClassLoader() );\n\n\t ret = createNode( state );\n\n\t //System.err.println(\"Created J3D node for \"+className );\n\t} catch(ClassNotFoundException e) {\n if (control.useSuperClassIfNoChildClass())\n ret = createNodeFromSuper( className );\n else\n throw new SGIORuntimeException( \"No Such Class \"+\n\t\t\t\t\t\tclassName );\n\t}\n\n\treturn ret;\n }", "public void insertByName(String name, String sname, String no){\n\t\troot = insertByName(root, name, sname, no);\n\t\tSystem.out.println(\"The node Node(\" + name + \", \" + sname + \", \" + no + \") is inserted to the tree successfully.\");\n\n\t}", "private void insert(String name, boolean checkBalance)\r\n\t{\r\n\t\t// Create the Node with the given String\r\n\t\tNode newNode = new Node(name);\r\n\t\t\r\n\t\t// Check to see if the Tree is currently empty\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\t// Add the Node by setting the root to point to it and increment counter\r\n\t\t\tsetRoot(newNode);\r\n\t\t\tincrementCounter();\r\n\t\t}\r\n\t\t// Tree is not empty so use the insert helper to place the Node in the correct spot\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Passing the Root reference as the starting point for the Node insertion\r\n\t\t\t// as well as the reference to the newly created Node\r\n\t\t\tinsert(getRoot(), newNode);\r\n\t\t\t\r\n\t\t\t// Balance the tree only if necessary - ie. checkBalance is true and\r\n\t\t\t// the current depth of the tree is greater than what it should be based on \r\n\t\t\t// the total amount of Nodes in the tree\r\n\t\t\tif(checkBalance && depth() > howManyLevels())\r\n\t\t\t{\r\n\t\t\t\t// Call the balance method to balance the tree\r\n\t\t\t\tbalance();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Module build() {\n return new Module(moduleCode, moduleTitle, academicYear, semester,\n students, tags);\n }", "public BinaryTree(String expression) {\n \tString[] arr = expression.split(\" \");\n \troot = parse(arr);\n }", "public final void setTreeName(String treeName)\r\n {\r\n _treeName = treeName;\r\n setField(TREE, new SimpleString(treeName));\r\n\r\n }", "@Override\n\tpublic void updateUse(IASTName name) {\n\t\tIMTANode newnode = new MTUseSharedNode(bb, activePThreadnr, name);\n\t\tmtapath.addLast(newnode);\t\t\n\t}", "private void constructTree(List<String> signatures) {\r\n // If no signatures present throw exception\r\n if(signatures.size() == 0){\r\n throw new IllegalArgumentException(\"Must provide a transaction signature to construct Merkle Tree\");\r\n }\r\n\r\n // If only one transaction, return as root node\r\n if(signatures.size() == 1){\r\n root = new Node(Utility.SHA512(signatures.get(0)));\r\n }\r\n\r\n List<Node> parents = constructBase(signatures);\r\n root = constructInternal(parents);\r\n }", "private Model initTreeNode(String refDatasourceName, String refModelName){\r\n\t\tLOG.info(\"initTreeNode\");\r\n\t\t\r\n\t\tModel refModel = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//TODO: source datasource w/o model displayed too?\r\n\t\t\t//1. obtain all model(s) order by datasource name, model name\r\n\t\t\tList<Model> allModels = modelService.findAllOrderByDatasourceName();\r\n\r\n\t\t\t//2. sort by datasource name\r\n\t\t\tCollections.sort(allModels, new ModelComparator());\r\n\t\t\t\r\n\t\t\trefAllModels.clear();\r\n\t\t\trefAllModels.addAll(allModels);\r\n\t\t\t\r\n\t\t\trefModel = rebuildTreeNode(refDatasourceName, refModelName, null);\r\n\t\t}\r\n\t\tcatch (ModelServiceException e) {\r\n\t\t\tLOG.error(\"Failed to load all existing Models.\", e);\r\n\t\t}\r\n\t\t\r\n\t\treturn refModel;\r\n\t}", "private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}", "public MockTopologyNode createManualTree() throws ServiceFactory.ServiceNotAvailableException {\n // get a new submitter to create a new tree\n final TopologyDataSubmissionService3.TopologySubmitter3 mysubmitter = mServiceFactory.getService\n (TopologyDataSubmissionService3.class).getTopologySubmitter();\n\n TopologyNode topnode = mysubmitter.createTopLevelNode(\"__top_of_tree__\", 0);\n MockTopologyNode node = (MockTopologyNode) topnode;\n\n MockTopologyNode node1 = createMockNode(node, \"HostDiscoveryData\", null, 0, 0, false, false);\n MockTopologyValue value1 = (MockTopologyValue) node1.createValue(\"name\");\n value1.setSampleValue(\"HostDiscoveryData\");\n value1.setIsIdentity(true);\n value1.setNodeFrequency(0);\n\n MockTopologyNode node2 = createMockNode(node1, \"host\", \"Host\", 0, 0, false, false);\n MockTopologyValue value2 = (MockTopologyValue) node2.createValue(\"name\");\n value2.setSampleValue(\"198.51.100.0\");\n value2.setIsIdentity(true);\n value2.setNodeFrequency(0);\n\n return node;\n}", "public void newVertex(String name)\r\n\t{\r\n\t\t// new vertex initialized here\r\n\t\tmyGraph[graphSize] = new Vertex();\r\n\t\tmyGraph[graphSize].name = name;\r\n\t\tmyGraph[graphSize].adjVertexHead = null;\r\n\t\t// maintain the size counter\r\n\t\tgraphSize++;\r\n\t}", "public static HashIndexBuilder hashIndex(String name) {\n return new HashIndexBuilderImpl(name);\n }", "private BlankNode createOwnBlankNode(final String name, final String uuid) {\n return new BlankNode() {\n @Override\n public String ntriplesString() {\n return \"_: \" + name;\n }\n\n @Override\n public String uniqueReference() {\n return uuid;\n }\n\n @Override\n public int hashCode() {\n return uuid.hashCode();\n }\n\n @Override\n public boolean equals(final Object obj) {\n if (!(obj instanceof BlankNode)) {\n return false;\n }\n final BlankNode other = (BlankNode) obj;\n return uuid.equals(other.uniqueReference());\n }\n };\n }", "public native long createSceneManager(final String name);", "void createNode(String path);", "public NodeTest(String name) {\n\t\tsuper(name);\n\t}", "private void createTree() {\n\n // custom brown color\n Color brown = new Color(149, 99, 57);\n\n // trunk\n NscComponent trunk = new NscRectangle(49, 164, 13, 51);\n createShape(trunk, brown, true);\n\n // branches\n drawLine(50, 125, 50, 165, 10, brown);\n drawLine(25, 125, 50, 165, 10, brown);\n drawLine(75, 125, 50, 165, 10, brown);\n\n // branch outlines\n drawLine(49, 125, 49, 150, 1, Color.black);\n drawLine(60, 125, 60, 150, 1, Color.black);\n drawLine(24, 125, 49, 165, 1, Color.black);\n drawLine(35, 125, 50, 150, 1, Color.black);\n drawLine(85, 125, 60, 165, 1, Color.black);\n drawLine(74, 125, 60, 150, 1, Color.black);\n\n // leafs\n NscEllipse leafs2 = new NscEllipse(0, 5, 60, 122);\n NscEllipse leafs3 = new NscEllipse(50, 5, 60, 122);\n NscEllipse leafs = new NscEllipse(25, 0, 60, 127);\n NscEllipse leafs4 = new NscEllipse(25, 1, 60, 124);\n createShape(leafs2, treeColor, true);\n createShape(leafs3, treeColor, true);\n createShape(leafs, treeColor, true);\n createShape(leafs4, treeColor, false);\n\n repaint();\n }", "ModulePackage createModulePackage();", "public HeapCacheBuilder name(final String name) {\n checkNotEmpty(name, \"name can't be empty\");\n this.name = name;\n return this;\n }", "static Obj NewObj (String name,int kind) {\r\n\t\tObj p, obj = new Obj();\r\n obj.name = new String(name); \r\n\t\tobj.type = null; obj.kind = kind;\r\n\t\tobj.level = curLevel;\r\n\t\tp = topScope.locals;\r\n\t\t/*Para buscar si el nb de la variable nueva ya esta!!!*/\r\n\t\twhile (p != null) { \r\n \t \tif (p.name.equals(name)) Parser.SemError(1);\r\n\t\t\tp = p.next;\r\n\t\t}\r\n \t//FILO!!\r\n obj.next = topScope.locals; \r\n\t\ttopScope.locals = obj;\r\n \t//if (kind == vars) {}\r\n \t//obj.adr = topScope.nextAdr; topScope.nextAdr++;\r\n \t//obj.view();\r\n\t\treturn obj;\r\n }", "public void BuildTree() {\n MerkleTree tmpMerkleTree = new MerkleTree();\n\n //assign core information into this block from merkleTree\n this.merkleRoot = tmpMerkleTree.getMerkleRoot();\n this.blockBody = tmpMerkleTree;\n }", "public static Treenode createBinaryTree() {\n\t\tTreenode rootnode = new Treenode(40);\r\n\t\tTreenode r40 = new Treenode(50);\r\n\t\tTreenode l40 = new Treenode(20);\r\n\t\tTreenode r50 = new Treenode(60);\r\n\t\tTreenode l50 = new Treenode(45);\r\n\t\tTreenode r20 = new Treenode(30);\r\n\t\tTreenode l20 = new Treenode(10);\r\n\t\trootnode.right = r40;\r\n\t\trootnode.left = l40;\r\n\t\tr40.right=r50;\r\n\t\tr40.left = l50;\r\n\t\tl40.right=r20;\r\n\t\tl40.left=l20;\r\n\t\t r40.parent=rootnode; l40.parent= rootnode;\r\n\t\t r50.parent=r40;\r\n\t\tl50.parent=r40 ;\r\n\t\t r20.parent=l40;\r\n\t\t l20.parent=l40 ;\r\n\t\treturn rootnode;\r\n\t\t\r\n\t}", "public void renameTree(String oldName, String newName) throws DuplicateNameException;", "public Node insertBySName(Node bstNode, String name, String sname, String no){\n\t\tif(bstNode == null){\n\t\t\tbstNode = new Node(name, sname, no);\n\t\t\tbstNode.setParent(parent);\n\t\t}\n\t\telse{\n\t\t\tparent = bstNode;\n\t\t\tif(sname.compareTo(bstNode.getSurname())<0)\n\t\t\t\tbstNode.setLeft(insertBySName(bstNode.getLeft(),name,sname,no));\n\t\t\telse\n\t\t\t\tbstNode.setRight(insertBySName(bstNode.getRight(),name,sname,no));\n\t\t}\n\t\treturn bstNode;\n\t\t\n\t}", "public MainModel(String levelname) {\r\n LevelData level = LevelData.parseLevelFromName(levelname);\r\n\r\n this.history = new ModelHistory(levelname);\r\n\r\n this.jumper = new Jumper(level.getPlayerPosition());\r\n\r\n this.blocks = new ArrayList<>();\r\n for (Quad quad : level.getQuadData()) {\r\n blocks.add(Block.fromQuad(quad, BlockType.STICKY));\r\n }\r\n blocks.add(Block.fromQuad(level.getFinishQuad(), BlockType.FINISH));\r\n\r\n }", "public int addBlock(Directory root, String name, String type, int rootIndex) {\n\t\tint freeBlock = freeBlock(); // #1\n\t\tif(freeBlock != Constants.NEGATIVE) {\n\t\t\tint dirList = root.checkDirListing();\n\t\t\tif(dirList != Constants.NEGATIVE) {\n\t\t\t\tcreateFiOrDi(root, type, freeBlock);\n\t\t\t\troot.makeDirListEntry(type, name, freeBlock, Constants.EMPTY_FILE, dirList);\n\t\t\t\treturn freeBlock;\n\t\t\t} else {//Current directory Directory_listing is exhausted so we need to create new directory and set OldDirectory-FRWD pointer to point to new Directory(if FRWD pointer of current directory is zero).\n\t\t\t\tif(root.getFrwd() != 0) {//Then check in the directory pointed by FRWD\n\t\t\t\t\treturn addBlock((Directory)sector.get(root.getFrwd()), name, type, root.getFrwd());\n\t\t\t\t} else {\n\t\t\t\t\tsector.put(freeBlock, new Directory());\n\t\t\t\t\tDirectory newRoot = (Directory) sector.get(freeBlock);\n\t\t\t\t\troot.setFrwd(freeBlock);\n\t\t\t\t\tnewRoot.setBack(rootIndex);\n\t\t\t\t\t\n\t\t\t\t\t//As we have already used freeBlock got in #1 so we are going to get new freeBlock if any.\n\t\t\t\t\tfreeBlock = freeBlock();\n\t\t\t\t\tdirList = newRoot.checkDirListing();\n\t\t\t\t\tif(freeBlock != Constants.NEGATIVE) {\n\t\t\t\t\t\tcreateFiOrDi(newRoot, type, freeBlock);\n\t\t\t\t\t\tnewRoot.makeDirListEntry(type, name, freeBlock, Constants.EMPTY_FILE, dirList);\n\t\t\t\t\t\treturn freeBlock;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn ErrorType.SECTOR_FULL.getErrorId();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//return ErrorType.DIRECTORY_LISTING_FULL.getErrorId();\n\t\t\t\t\n\t\t\t}\n\t\t} else {\n\t\t\treturn ErrorType.SECTOR_FULL.getErrorId();\n\t\t}\n\t}", "public String module(String name)\n {\n return modules.get(name);\n }", "CommunicationLink getNodeByName(String name)\n {\n return getNodeById(Objects.hash(name));\n }", "public Node(String name, boolean isSource) {\n\t\tthis.name = name;\n\t\tthis.isSource = isSource;\n\t\tif (name.endsWith(\"}\")) {\n\t\t\tthis.name = name.substring(0, name.lastIndexOf(\"{\"));\n\t\t\tString [] split = name.substring(name.lastIndexOf(\"{\") + 1, name.length() - 1).split(\"\\\\-\");\n\t\t\tsourceStart = Integer.parseInt(split[0]);\n\t\t\tsourceEnd = Integer.parseInt(split[1]);\n\t\t}\n\t}", "public ConfigTreeBuilder(@Nullable ConfigTree parent, @Nullable String name) {\n\t\tsuper(parent, name);\n\t\tthis.parent = parent;\n\t\tthis.name = name;\n\t}", "public static RegisterModuleType nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }", "public void createProject(String name) {\n Project project = new Project(name);\n Leader leader = new Leader(this, project);\n project.addLeader(leader);\n }", "public Branch(String name, Commit root, Gitlet git){\n\t\tmyRoot = root;\n\t\tmyName = name;\n\t\tmyLeaf = root;\n\t\tmyGit = git;\n\t\tmyGit.getMyBranches().put(myName, this);\n\t}", "public Modul(String modulname) {\n\t\tthis.modulname=modulname;\n\t}" ]
[ "0.6330526", "0.6126209", "0.59867406", "0.58350515", "0.56869024", "0.56311774", "0.5627545", "0.56053096", "0.5594925", "0.5578913", "0.5578211", "0.5547059", "0.54330355", "0.5403641", "0.53879166", "0.53091735", "0.5305013", "0.5302903", "0.5289183", "0.52888346", "0.5256009", "0.52515554", "0.5232725", "0.5224357", "0.5185783", "0.5159565", "0.5121597", "0.51152194", "0.5076889", "0.50638986", "0.5046641", "0.50442183", "0.5043692", "0.498405", "0.49810952", "0.49798092", "0.49795243", "0.49551105", "0.49511805", "0.49452525", "0.49420813", "0.49409762", "0.49373683", "0.49303836", "0.49086726", "0.4883358", "0.48726544", "0.48251668", "0.47937992", "0.47873783", "0.4786583", "0.4782385", "0.476915", "0.47644007", "0.47496673", "0.4743816", "0.47314763", "0.47094053", "0.46954185", "0.4695055", "0.4685695", "0.46802777", "0.46780276", "0.46779758", "0.46775684", "0.46756008", "0.46733543", "0.46664742", "0.4652299", "0.46340817", "0.46339232", "0.4627514", "0.46210295", "0.4620486", "0.46153796", "0.46147355", "0.46052963", "0.45975345", "0.45912066", "0.45853597", "0.458496", "0.458281", "0.4582745", "0.4582304", "0.4574267", "0.45739585", "0.4572339", "0.45571905", "0.45558125", "0.45526502", "0.4549232", "0.45456794", "0.45299178", "0.4529439", "0.45224527", "0.4521238", "0.451977", "0.45179382", "0.4498588", "0.44918585" ]
0.7694574
0
Gets the root module for a tree in this listing.
public ProgramModule getRootModule(String treeName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ProgramModule getRootModule(long treeID);", "public String getRoot();", "@Override\n\tpublic List<Module> listRootModule() {\n\t\treturn moduleDao.listRootModule();\n\t}", "public String getRoot() {\n return root;\n }", "public Object getRoot(){\r\n\t\treturn _root;\r\n\t}", "public Node getRoot() {\n return root;\n }", "public Object getRoot() {\n\t\treturn null;\n\t}", "public static ParseTree getRoot(ParseTree tree) {\n\t\tParseTree parent = tree.getParent();\n\t\tif (parent == null) {\n\t\t\treturn tree;\n\t\t}\n\t\treturn getRoot(parent);\n\t}", "public Node getRoot() {\r\n\r\n\t\treturn root;\r\n\t}", "public Node getRoot() {\n return root;\n }", "public Node getRoot() {\n return root;\n }", "public Node getRoot() {\n return root;\n }", "public String getRoot() {\n\t\treturn null;\n\t}", "public int getRoot(){\n\t\t\treturn root;\n\t\t}", "public AVLNode getRoot() {\n return root;\n }", "public ObjectTreeNode getRoot() {\n return root;\n }", "public Node getRoot(){\r\n return this.root;\r\n }", "public RBNode<T, E> getRoot() {\r\n\t\treturn root;\r\n\t}", "public BSTNode<T> getRoot() {\n // DO NOT MODIFY THIS METHOD!\n return root;\n }", "public TreeNode<E> getRoot() {\n return root;\n }", "ILitePackCollection getRoot();", "public Git.Entry getRoot() { \n Node c = this; \n while (c.par != null) c = c.par;\n return c.getObject();\n }", "public TreeNode<E> getRoot() {\r\n\t\treturn root;\r\n\t}", "public Node<T> getRoot() {\n\t\treturn root;\n\t}", "public DefaultMutableTreeNode getRoot()\n {\n return root;\n }", "<T> T getRoot();", "protected IsamIndexNode getRoot() {\n\t\treturn root;\n\t}", "T getRoot();", "protected TreeNode<E> getRoot() {\n\t\treturn root;\n\t}", "public int getRoot() {\n return _root;\n }", "public Node<T> getRoot() {\n return root;\n }", "public pt.ist.fenixframework.adt.bplustree.AbstractNodeArray getRoot() {\n return this.root.get();\n }", "public ContentScanner getRootLevel(\n )\n {\n ContentScanner level = this;\n while(true)\n {\n ContentScanner parentLevel = level.getParentLevel();\n if(parentLevel == null)\n return level;\n\n level = parentLevel;\n }\n }", "public TreeNode root() {\n\t\treturn root;\n\t}", "public AVLNode<T> getRoot() {\n return root;\n }", "private HtmlElement getRoot()\n\t{\n\t\treturn getBaseRootElement( ROOT_BY );\n\t}", "public KeyedItem getRoot() throws TreeException {\r\n\r\n\t\tif (root != null) {\r\n\t\t\treturn root;\r\n\t\t} else\r\n\t\t\tthrow new TreeException(\"Tree is empty\");\r\n\t}", "public WAVLNode getRoot() // return the root of the tree\r\n {\r\n return root;\r\n }", "public DialogueNode getRoot() {\n\t\treturn root;\n\t}", "public Object getRootItem();", "private RBNode<T> getRoot(){\n return root.getLeft();\n }", "public SVGElementModel getRoot() {\n \t\treturn store.getRootItems().get(0);\n \t}", "public PackageName getRootPackageName() {\n return rootPackageName;\n }", "public IAVLNode getRoot() {\n\t\treturn this.root;\n\t}", "java.lang.String getRoot();", "BTNode<T> getRoot();", "public PhyloTreeNode getOverallRoot() {\n return overallRoot;\n }", "public BSTNode<T> getRoot() {\n return root;\n }", "@Override\n public Object getRoot() {\n if (this.getParent() == null) {\n return this;\n }\n return this.getParent().getRoot();\n }", "public WAVLNode getRoot()\r\n\t {\r\n\t\t return this.root;\r\n\t }", "@Override\r\n public NamedTreeNode<T> getRoot()\r\n {\r\n return head;\r\n }", "public IRNode getRoot(IRNode subtree);", "protected BSTNode root() {\n\t\treturn root;\n\t}", "public Loop getRoot() {\n\t\tfor (Loop lp : parent.keySet()) {\n\t\t\tif (parent.get(lp)==null) return lp;\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\tpublic TreeNode getRootProject() {\n\t\treturn null;\r\n\t}", "public String getRootName() {\n\t\treturn rootName;\n\t}", "public MyBinNode<Type> getRoot(){\n return this.root;\n }", "public ProgramModule getDefaultRootModule();", "public File getRoot() {\n return this.root;\n }", "public DefaultMutableTreeNode gettree()\n\t{\n\t\treturn root;\n\t}", "public ProgramModule createRootModule(String treeName) throws DuplicateNameException;", "public Object\tgetRoot() {\n \treturn root;\n }", "@Override\r\n public FileName getRoot() {\r\n FileName root = this;\r\n while (root.getParent() != null) {\r\n root = root.getParent();\r\n }\r\n\r\n return root;\r\n }", "public Integer getRoot(){\n\t\tif(root != null) {\n\t\t\treturn root.element;\n\t\t}\n\t\treturn null;\n\t}", "protected final XmlAntTask getRoot() {\n\t\tXmlAntTask tmp1 = parent;\n\t\tXmlAntTask tmp2 = this;\n\t\twhile (tmp1 != null) {\n\t\t\ttmp2 = tmp1;\n\t\t\ttmp1 = tmp2.getParent();\n\t\t}\n\t\treturn tmp2;\n\t}", "private EObject getRoot(Object receiver) {\r\n\t\tEObject root = null;\r\n\r\n\t\tif(receiver instanceof ISelection) {\r\n\t\t\tISelection selection = (ISelection)receiver;\r\n\t\t\tif(selection.isEmpty()) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\t//this is the case where the selection is on the Project Explorer\r\n\t\t\t\tIStructuredSelection selectionstructured = (IStructuredSelection)selection;\r\n\r\n\t\t\t\tObject selectedElement = selectionstructured.getFirstElement();\r\n\r\n\t\t\t\tObject selectedAdapter = Platform.getAdapterManager().getAdapter(selectedElement, IFile.class);\r\n\r\n\r\n\t\t\t\tif(selectedAdapter instanceof IFile) {\r\n\t\t\t\t\tfinal IFile selectedFile = (IFile)selectedAdapter;\r\n\t\t\t\t\tModelSet modelSet = new ModelSet();\r\n\t\t\t\t\tModelsReader reader = new ModelsReader();\r\n\t\t\t\t\treader.readModel(modelSet);\r\n\r\n\r\n\t\t\t\t\tIPath workspacePath = selectedFile.getFullPath();\r\n\r\n\t\t\t\t\tURI workspaceURI = URI.createPlatformResourceURI(workspacePath.toString(), true);\r\n\t\t\t\t\tmodelSet.loadModels(workspaceURI);\r\n\r\n\t\t\t\t\tUmlModel openedModel = (UmlModel)modelSet.getModel(UmlModel.MODEL_ID);\r\n\t\t\t\t\tif(openedModel != null) {\r\n\t\t\t\t\t\troot = openedModel.lookupRoot();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//this is the case where the selection is on the Model Explorer\r\n\t\t\t\t\tServiceUtilsForSelection serviceUtils = ServiceUtilsForSelection.getInstance();\r\n\t\t\t\t\tUmlModel openedModel = (UmlModel)serviceUtils.getModelSet(selection).getModel(UmlModel.MODEL_ID);\r\n\t\t\t\t\tif(openedModel != null) {\r\n\t\t\t\t\t\troot = openedModel.lookupRoot();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t//Ignored: The selection cannot be used to retrieve the ServicesRegistry.\r\n\t\t\t\t//Do not log exceptions: this is just not a Papyrus/RobotML model\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn root;\r\n\t}", "public MappingRoot getRoot() { return _root; }", "@Override\r\n\tpublic Node<T> getRoot() {\r\n\t\treturn raiz;\r\n\t}", "public Optional<T> getModule() {\n return Optional.ofNullable(this.module);\n }", "public Group getRoot(){\n assert(root != null);\n return root;\n }", "public BTNode getRootNode() {\n return mRoot;\n }", "public BinaryTreeNode<T> getRootNode(){\n\t\treturn root;\n\t}", "public MoveTrieNode getRoot() {\n return root;\n }", "public HPTNode<K, V> root() {\n return root;\n }", "public Pane getRoot() {\n \treturn _root;\n }", "public Object getRoot() {\n\t\treturn _adaptee;\n\t}", "protected String getRootName() {\r\n\t\treturn ROOT_NAME;\r\n\t}", "public final Node getRootContext() {\n return rootContext;\n }", "public static Object getRoot(Map context) {\n return context.get(OgnlContext.ROOT_CONTEXT_KEY);\n }", "public Entity getLeafEntity() {\n Entity e = root;\n if (e == null) {\n if (parent != null) {\n e = parent.get(ContentType.EntityType, null);\n }\n }\n return e;\n }", "String getDefaultRoot() {\n return mDefaultRoot;\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }", "public final Node GetRootNode(){\n return m_pRoot;\n }", "public String getRootPath() {\n return root.getPath();\n }", "private Group getRoot() throws GeppettoExecutionException\n\t{\n\t\treturn (Group) ((javax.swing.tree.DefaultMutableTreeNode) recordingsH5File.getRootNode()).getUserObject();\n\t}", "public ProgramModule getModule(String treeName, String name);", "public Region getRoot() {\r\n return root;\r\n }", "public EntryTree tree() {\n return tree;\n }", "@Basic @Raw\r\npublic FileSystem getRoot() {\r\n\tif (dir == null) {\r\n\t\treturn this;\r\n\t}\r\n\telse {\r\n\t\tFileSystem root = this.getDir();\r\n\t\twhile (root != null) {\r\n\t\t\troot = root.getDir();\r\n\t\t}\r\n\t\treturn root;\r\n\t\t\r\n\t}\r\n}", "public String getRootElement() {\n int index = mRootElementCombo.getSelectionIndex();\n if (index >= 0) {\n return mRootElementCombo.getItem(index);\n }\n return null;\n }", "public abstract MetricTreeNode getRoot();", "public I_LogicalAddress getRoot() {\n return root;\n }", "@Override\n public Object root() {\n return root;\n }", "@Override\n public Object root() {\n return root;\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent();\n }" ]
[ "0.78240657", "0.64793473", "0.6472735", "0.6459961", "0.6397743", "0.6360756", "0.63546544", "0.6344232", "0.6320369", "0.6318567", "0.6318567", "0.6318567", "0.63170946", "0.6291621", "0.62613577", "0.62579644", "0.62571687", "0.6250647", "0.6242335", "0.62363833", "0.6233157", "0.6220286", "0.6217573", "0.6197695", "0.619645", "0.6190048", "0.61899245", "0.6186484", "0.6182028", "0.6176962", "0.61655414", "0.6152307", "0.61327124", "0.61254525", "0.6116568", "0.6113919", "0.6108589", "0.61055183", "0.6095109", "0.6093047", "0.6074456", "0.6061752", "0.60420007", "0.6039895", "0.6035195", "0.6015519", "0.6004457", "0.59855455", "0.597981", "0.5952018", "0.59492105", "0.59399694", "0.59347343", "0.5890509", "0.5877757", "0.58466357", "0.5842751", "0.5840622", "0.582373", "0.58045226", "0.57742786", "0.57638806", "0.575896", "0.5752564", "0.57458735", "0.5726638", "0.5719943", "0.5708258", "0.5702248", "0.5688771", "0.56858695", "0.56854355", "0.5679104", "0.5672867", "0.5671639", "0.5670011", "0.56637067", "0.5660615", "0.5599858", "0.55961597", "0.5594531", "0.55888987", "0.55888987", "0.55888987", "0.55888987", "0.55818456", "0.55797243", "0.5561552", "0.5559162", "0.5558427", "0.55485237", "0.5537496", "0.5533893", "0.5529884", "0.5515051", "0.55075455", "0.55075455", "0.5496599", "0.5496599", "0.5496599" ]
0.7738124
1
Returns the root module of the program tree with the given name;
public ProgramModule getRootModule(long treeID);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ProgramModule getRootModule(String treeName);", "public ProgramModule getModule(String treeName, String name);", "public ProgramModule createRootModule(String treeName) throws DuplicateNameException;", "public String module(String name)\n {\n return modules.get(name);\n }", "public ProgramModule getDefaultRootModule();", "public Module getModule(String name) {\n\t\tif (this._modules == null)\n\t\t\treturn null;\n\t\treturn _modules.get(name);\n\t}", "ModuleAssembly module( String name );", "public RubyModule getModule(String name) {\n return (RubyModule) objectClass.getConstantAt(name);\n }", "public ProgramFragment getFragment(String treeName, String name);", "private Optional<String> toPackageName(String name) {\n assert !name.endsWith(\"/\");\n int index = name.lastIndexOf(\"/\");\n if (index == -1) {\n if (name.endsWith(\".class\") && !name.equals(MODULE_INFO)) {\n String msg = name + \" found in top-level directory\"\n + \" (unnamed package not allowed in module)\";\n throw new InvalidModuleDescriptorException(msg);\n }\n return Optional.empty();\n }\n\n String pn = name.substring(0, index).replace('/', '.');\n if (Checks.isPackageName(pn)) {\n return Optional.of(pn);\n } else {\n // not a valid package name\n return Optional.empty();\n }\n }", "public abstract String getModuleName( );", "public ModuleReference getModule (String name) {\n ModuleReference ref = this.moduleTable.get(name);\n if (ref == null) {\n \tthrow new IllegalArgumentException(\"Module \\\"\" + name + \"\\\" does not exist.\");\n }\n \n return ref;\n }", "public String getModuleName() {\n if (repository == null) {\n return baseName;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(baseName);\n return b.toString();\n }\n }", "public SaveGameNode getFirstChild(String name) {\r\n SaveGameNode node;\r\n node = this.children.stream().filter(child -> child.equals(name)).findFirst().get();\r\n return node;\r\n }", "public static String getPackageFromName(String name)\n \t{\n \t\tif (name.lastIndexOf('/') != -1)\n \t\t\tname = name.substring(0, name.lastIndexOf('/'));\n \t\tif (name.startsWith(\"/\"))\n \t\t\tname = name.substring(1);\n \t\treturn name.replace('/', '.');\t\t\n \t}", "public RubyModule defineOrGetModuleUnder(String name) {\n // This method is intended only for defining new modules in Ruby code\n Ruby runtime = getRuntime();\n IRubyObject moduleObj = getConstantAt(name);\n RubyModule module;\n if (moduleObj != null) {\n if (!moduleObj.isModule()) throw runtime.newTypeError(name + \" is not a module\");\n if (runtime.getSafeLevel() >= 4) throw runtime.newSecurityError(\"extending module prohibited\");\n module = (RubyModule)moduleObj;\n } else if (classProviders != null && (module = searchProvidersForModule(name)) != null) {\n // reopen a java module\n } else {\n module = RubyModule.newModule(runtime, name, this, true); \n }\n return module;\n }", "public String getRoot();", "public RubyModule defineModuleUnder(String name) {\n return getRuntime().defineModuleUnder(name, this);\n }", "public String getModuleName ()\n\n {\n\n // Returns moduleName when called.\n return moduleName;\n\n }", "private String getModuleName() {\n \t\t// If there is an autoconnect page then it has the module name\n \t\tif (autoconnectPage != null) {\n \t\t\treturn autoconnectPage.getSharing().getRepository();\n \t\t}\n \t\tString moduleName = modulePage.getModuleName();\n \t\tif (moduleName == null) moduleName = project.getName();\n \t\treturn moduleName;\n \t}", "public String getRootName() {\n\t\treturn rootName;\n\t}", "public PackageName getRootPackageName() {\n return rootPackageName;\n }", "java.lang.String getRoot();", "public ProgramFragment getFragment(String treeName, Address addr);", "@Override\n\tpublic String getModuleName() {\n\t\treturn \"kerenrh\";\n\t}", "private static Project findProject(String name) {\r\n \t\tfor (Project project : ProjectPlugin.getPlugin().getProjectRegistry().getProjects()) {\r\n \t\t\tif (project.getName().equals(name)) {\r\n \t\t\t\treturn project;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "String getPackageName() {\n final int lastSlash = name.lastIndexOf('/');\n final String parentPath = name.substring(0, lastSlash);\n return parentPath.replace('/', '.');\n }", "public final String getModuleName() {\n return MODULE_NAME;\n }", "public static ProgramMode getProgramMode(String name) {\n return getProgramMode(name, DEFAULT);\n }", "String getSubmoduleUrl(String name) throws GitException, InterruptedException;", "public String getName()\n {\n return MODULE_NAME;\n }", "ModulePath getModulePath();", "public void removeModule(String name){\n\t\tModule m = null;\n\t\tfor(Module mod: modules){\n\t\t\tif(mod.getName().matches(name)){\n\t\t\t\tm = mod;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(m!=null){\n\t\t\tlayer.removeChild(m);\n\t\t\tmodules.remove(m);\n\t\t}\n\t}", "private ProjectMgr getPmNameTrueLoadActualProject() {\n ProjectMgr pm = null;\n try {\n pm = new ProjectMgr(\"Example\", true);\n\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (SAXException e) {\n e.printStackTrace();\n }\n\n IOException e;\n return pm;\n }", "@Override\r\n\tpublic List<Modules> getModulesByName(String name) {\n\t\tString hql = \"from Modules m where m.name =?\";\r\n\t\treturn (List<Modules>) getHibernateTemplate().find(hql, name);\r\n\r\n\t}", "protected String getRootName() {\r\n\t\treturn ROOT_NAME;\r\n\t}", "public Symbol findEntryGlobal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null)\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "public Node getNode(String root, String name){\n\t\tNodeList userData = returnChildNodes(root, name);\n\t\t\n\t\tfor(int i = 0; i < userData.getLength(); i++){ //cycle through the family and find the node that equals to the node parameter\n\t\t\tNode node = userData.item(i);\n\t\t\tif(name.equals(node.getNodeName())){\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic String getModuleName() {\n\t\treturn MenuType.GA_READ.getNodeName();\n\t}", "public static Module getModuleForIndex(int index) {\r\n return getModule((String) KEYS.get(index));\r\n }", "public static UpdateModuleType nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }", "@Override\n public String getModuleName() {\n return \"kerencore\";\n }", "public TreePath findByName(JTree tree, String name) {\r\n TreeNode root = (TreeNode)tree.getModel().getRoot();\r\n TreePath result = find2(tree, new TreePath(root), name.trim());\r\n return result;\r\n }", "public File getCodeRoot( File dirPackage )\n\t{\n\t\tif( (dirPackage == null) || (!dirPackage.exists()) || (!dirPackage.isDirectory()) ) return null;\n\n\t\tString strPathFragment = this.packagename.replace( '.', File.separatorChar );\n\t\t//System.out.println( \"\\t strPathFragment \" + strPathFragment );\n\n\t\tif( dirPackage.getPath().endsWith( strPathFragment ) )\n\t\t{\n\t\t\tString[] strSplit = this.packagename.split( \"\\\\.\" );\n\t\t\tFile current = dirPackage;\n\t\t\tfor( int i=0; (i<strSplit.length) && (current != null); i++ ) current = current.getParentFile();\n\t\t\t//System.out.println( \"\\t returning \" + current.getPath() );\n\t\t\treturn current;\n\t\t}\n\t\telse return null;\n\t}", "String getChildPackage(String childName) {\n\t\tint childEnd = childName.indexOf(getDelimiter(), childStart);\r\n\r\n\t\tif (childEnd != -1) {\r\n\t\t\treturn childName.substring(childStart, childEnd);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Element loadModel(String name){\n\t\tElement load = FactoryManager.getFactoryManager().getScriptManager()\r\n\t\t\t.getReadScript().getRootElement(allModels);\r\n\t\t\r\n\t\t//get the model wanted\r\n\t\tload = load.getChild(name);\r\n\t\t\r\n\t\t//return the element wanted\r\n\t\treturn load;\t\t\r\n\t}", "public String getProgramName()\r\n \t{\r\n \t\treturn m_program.m_csSimpleName;\r\n \t}", "public RubyModule getOrCreateModule(String name) {\n IRubyObject module = objectClass.getConstantAt(name);\n if (module == null) {\n module = defineModule(name);\n } else if (getSafeLevel() >= 4) {\n throw newSecurityError(\"Extending module prohibited.\");\n } else if (!module.isModule()) {\n throw newTypeError(name + \" is not a Module\");\n }\n \n return (RubyModule) module;\n }", "String pkg();", "public RubyModule defineModule(String name) {\n return defineModuleUnder(name, objectClass);\n }", "public T lookupCurrLevelOnly(String name) {\n\t\tif (encSymTable != null && encSymTable.containsName(name)) {\n\t\t\treturn encSymTable.lookupCurrLevelOnly(name);\n\t\t} else {\n\t\t\tif (containsName(name)) {\n\t\t\t\treturn dict.get(getSize() - 1).get(name); // in dict\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}", "@Nullable\n Application getApplication(String name);", "String getModuleId();", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 372,\n FQN=\"llvm::Module::getNamedGlobal\", NM=\"_ZN4llvm6Module14getNamedGlobalENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZN4llvm6Module14getNamedGlobalENS_9StringRefE\")\n //</editor-fold>\n public GlobalVariable /*P*/ getNamedGlobal(StringRef Name) {\n return getGlobalVariable(new StringRef(Name), true);\n }", "public Module findModule(String moduleName) {\n if(modules.containsKey(moduleName))\n return modules.get(moduleName);\n //TODO: search in joined mobiles\n return null;\n }", "public PageModel findModuleByName(String name, int offset, int pagesize) {\n\t\t\n\t\treturn service.getPageModel(\"from Module m where m.name like '%\"+name+\"%'\" , offset, pagesize);\n\t}", "public String getPackageName() {\n final var lastDotIdx = name.lastIndexOf('.');\n\n if (lastDotIdx > 0) {\n return name.substring(0, lastDotIdx);\n } else {\n throw new CodeGenException(String.format(\"Couldn't determine package name of '%s'\", name));\n }\n }", "public static RegisterModuleType nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }", "Value require(String module);", "public Variable get(String rootName) {\n//\t\tSystem.out.println(\"symbolTable get \"+n);\n\t\tNameSSA ssa = name.get(rootName);\t\n//\t\tSystem.out.println(\"ssa \" + ssa);\n\t\tif (ssa != null) \n\t\t\treturn var.get(ssa.current());\n\t\telse\n\t\t\treturn null;\n\t}", "public FrameLayout getModuleLayoutRoot();", "@Override\n public String toString() {\n return String.format(\"Module '%s'\", getName());\n }", "public static Node lookupNode(Universe universe, String name) {\n return getAutoNodeIndex(universe).get(\"name\", name).getSingle();\n }", "public Symbol findEntryLocal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null || (l.get(0).level < scopeLevel))\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "public static ParkourKit getParkourKit(String name) {\n name = name.toLowerCase();\n\n if (loaded.containsKey(name)) {\n return loaded.get(name);\n }\n\n if (!ParkourKitInfo.doesParkourKitExist(name)) {\n return null;\n }\n\n ParkourKit kit = new ParkourKit(name);\n loaded.put(name, kit);\n return kit;\n }", "public String key(String name) {\r\n String value;\r\n value = this.children.stream().filter(child -> child.equals(name)).findFirst().get().children.get(0).data;\r\n return value;\r\n }", "public static Path genSimpleTestTree(Path root, String name) throws IOException {\n Path tmp = root.resolve(name);\n\n Path t1 = tmp.resolve(\"test.txt\");\n Path t2 = tmp.resolve(Paths.get(\"dir\", \"file.txt\"));\n Path t3 = tmp.resolve(Paths.get(\"dir\", \"subDir\", \"child.txt\"));\n\n PathHelper.mkdirs(t2.getParent());\n PathHelper.mkdirs(t3.getParent());\n Files.write(t1, TEST1.getBytes(StandardCharsets.UTF_8));\n Files.write(t2, TEST2.getBytes(StandardCharsets.UTF_8));\n Files.write(t3, TEST3.getBytes(StandardCharsets.UTF_8));\n\n return tmp;\n }", "public abstract FilesystemEntry getNamedChild(String name);", "public static String getModuleId(File f)\n {\n FileReader fr = null;\n try\n {\n fr = new FileReader(f);\n\n final XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance();\n final XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(fr);\n\n while (xmlStreamReader.hasNext())\n {\n if (xmlStreamReader.next() == XMLStreamReader.START_ELEMENT\n && \"module\".equals(xmlStreamReader.getLocalName()))\n {\n for (int i = 0; i < xmlStreamReader.getAttributeCount(); i++)\n {\n String name = xmlStreamReader.getAttributeLocalName(i);\n if (\"name\".equals(name))\n {\n return xmlStreamReader.getAttributeValue(i);\n }\n }\n }\n }\n }\n catch (Exception e)\n {\n // Nothing to do\n }\n finally\n {\n if (null != fr)\n {\n try\n {\n fr.close();\n }\n catch (IOException ioe)\n {\n // Ignore\n }\n }\n }\n\n return null;\n }", "public PackageNode getPackage();", "public Project getProjectByName(String name);", "private String getSimpleName(String name) {\n\t\tint i = name.lastIndexOf(\".\");\n\t\treturn name.substring(i + 1);\n\t}", "private Module selectModuleFromPath(String path) {\n\n\t\tModule module = modules.get(path);\n\t\tif (module != null)\n\t\t\treturn module;\n\t\telse\n\t\t\treturn new DiscardingModule();\n\t}", "Module createModule();", "public static String getName() {\n\t\treturn ProjectMain._name;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public typekey.CalcRoutineParamName getRoot();", "public IDirectory getChild(String name) {\n // Loops through the children directories of the current directory\n for (IDirectory element : this.children) {\n // If the name equals to the name of the directory you're searching for,\n // return it\n if (element.getName().equals(name)) {\n return element;\n }\n }\n // Return null otherwise\n return null;\n }", "public static Node findByName (Node bst, String name){\n\t\tif(bst != null){\n\t\t\tif(bst.getName().equals(name)){\n\t\t\t\tSystem.out.println(\"The node \" + bst + \" is found!\");\n\t\t\t\treturn bst;\t\t\t\t\t\t\t\n\t\t\t}else if(bst.getName().compareTo(name)>0){\n\t\t\t\tSystem.out.println(bst.getLeft().getName() + \" <- \" + bst.getName());\n\t\t\t\treturn findByName(bst.getLeft(), name);\n\t\t\t}else{ \n\t\t\t\tSystem.out.println(bst.getName() + \" -> \" + bst.getRight().getName());\n\t\t\t\treturn findByName(bst.getRight(), name);\n\t\t\t\n\t\t\t}\n\t\t}else\n\t\treturn null;\n\t}", "public ConfigurationTreeNode findChild(String name) {\r\n\t\treturn children.get(name);\r\n\t}", "protected String retrieveRbFile() {\r\n\t\tString className = this.getClass().getName();\r\n\t\tString packageName = this.getClass().getPackage().getName() + \".\";\r\n\t\treturn className.replaceFirst(packageName, \"\");\r\n\t}", "public Variable get(String rootName, int ssaNum) {\n\t\treturn var.get(rootName + \"_\" + ssaNum);\n\t}", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }", "protected VcsRoot getRoot(String branchName) throws IOException {\n return getRoot(branchName, false);\n }", "public Object getGlobal(String name) {\n return globals.get(name);\n }", "public static ProgramStatus getProgramStatus(String name) {\n return getProgramStatus(name, DEFAULT);\n }", "public String getStructure(String name) {\n\t\tDynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(JournalArticleImpl.class, \"structure\",\n\t\t\t\tPortalClassLoaderUtil.getClassLoader());\n\t\t// dynamicQuery.add(PropertyFactoryUtil.forName(\"structureId\").eq(\"40684\"));\n\t\tString structure = \"\";\n\t\ttry {\n\t\t\tList<JournalArticle> articles = JournalArticleLocalServiceUtil.dynamicQuery(dynamicQuery);\n\t\t\tfor (JournalArticle article : articles) {\n\t\t\t\tif (article.getFolderId() == getFolder(\"ratesr\")) {\n\t\t\t\t\tstructure = article.getArticleId();\n\t\t\t\t\tlog.info(article);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e.getMessage());\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn structure;\n\t}", "public String getModuleName() {\n return moduleNameString;\n }", "public static void addRootCommand(String name) {\n\t\tcommands.put(name, new ArrayList<String>());\n\t\thandler.put(name, new HashMap<String, Handler>());\n\t\thelp.put(name, new HashMap<String,String>());\n\t\thelpargs.put(name, new HashMap<String,String>());\n\t\tpermissions.put(name, new HashMap<String,String>());\n\t}", "public int getModuleId();", "public String getRoot() {\n\t\treturn null;\n\t}", "java.lang.String getPackage();", "public static FileTree getFileStorage(String name) {\n // See if we have a storage directory\n String fwdir = System.getProperty(\"org.osgi.framework.dir\");\n if (fwdir == null) {\n return null;\n }\n FileTree dir = new FileTree((new File(fwdir)).getAbsoluteFile(), name);\n if (dir != null) {\n if (dir.exists()) {\n\tif (!dir.isDirectory()) {\n\t throw new RuntimeException(\"Not a directory: \" + dir);\n\t}\n } else {\n\tif (!dir.mkdirs()) {\n\t throw new RuntimeException(\"Cannot create directory: \" + dir);\n\t}\n }\n }\n return dir;\n }", "protected File getSourceFile(String name) {\n String fileName = name.replace('.', File.separatorChar) + \".tea\";\n\n File file = new File(mRootSourceDir, fileName);\n return file;\n }", "ModulePackage createModulePackage();", "public static int getModule1L5() {\r\n return Module1L5;\r\n }", "public void getResults(String name)\n {\n try\n {\n Module m = compileModule(modules.get(name));\n m.displayResults();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "private static Path getConfig(String modName)\n\t{\n\t\treturn Paths.get(\"config\"+File.separator+modName+\".cfg\").toAbsolutePath();\n\t}" ]
[ "0.8437788", "0.7680956", "0.7318133", "0.6871878", "0.6568879", "0.6047169", "0.5900187", "0.5773397", "0.5704095", "0.57031626", "0.5659684", "0.56263024", "0.5458147", "0.53900504", "0.53652185", "0.53480136", "0.5317614", "0.52717686", "0.5254189", "0.52468157", "0.52194756", "0.5179605", "0.51741904", "0.51688427", "0.5147641", "0.5145192", "0.5140255", "0.5059277", "0.50524455", "0.50477153", "0.5030011", "0.5001855", "0.49783063", "0.49693945", "0.49684998", "0.4967492", "0.49592486", "0.4951642", "0.49085402", "0.49063092", "0.4872186", "0.48648408", "0.48612088", "0.48398328", "0.48265386", "0.4821281", "0.48163423", "0.47927612", "0.4791627", "0.47900328", "0.47741064", "0.477004", "0.47700375", "0.47683287", "0.47669291", "0.47637758", "0.4763665", "0.4761744", "0.4761598", "0.47540647", "0.4747032", "0.4734438", "0.47251138", "0.47174197", "0.47065106", "0.4703287", "0.46946603", "0.46800408", "0.4678381", "0.4671629", "0.46655196", "0.46063185", "0.4606206", "0.45976576", "0.45943564", "0.4589142", "0.45878604", "0.4587116", "0.45866042", "0.45852807", "0.45798457", "0.4579183", "0.4579183", "0.4579183", "0.4579183", "0.45770335", "0.4569958", "0.4569062", "0.45646334", "0.45581645", "0.45483035", "0.45422763", "0.45363528", "0.4528217", "0.45274326", "0.45164752", "0.45149612", "0.45080107", "0.45065188", "0.45050222" ]
0.7467457
2
Returns the root module for the default program tree. This would be the program tree that has existed the longest.
public ProgramModule getDefaultRootModule();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ProgramModule getRootModule(String treeName);", "public ProgramModule getRootModule(long treeID);", "public ProgramModule createRootModule(String treeName) throws DuplicateNameException;", "public String getRoot();", "String getDefaultRoot() {\n return mDefaultRoot;\n }", "public String getRoot() {\n\t\treturn null;\n\t}", "public ProgramModule getModule(String treeName, String name);", "java.lang.String getRoot();", "@Override\r\n\tpublic TreeNode getRootProject() {\n\t\treturn null;\r\n\t}", "public PackageName getRootPackageName() {\n return rootPackageName;\n }", "public String getRoot() {\n return root;\n }", "public int getRoot(){\n\t\t\treturn root;\n\t\t}", "public Object getRoot() {\n\t\treturn null;\n\t}", "public Loop getRoot() {\n\t\tfor (Loop lp : parent.keySet()) {\n\t\t\tif (parent.get(lp)==null) return lp;\n\t\t}\n\t\treturn null;\n\t}", "public abstract ModularConfigurationModule<T> getDefaultModule();", "protected IsamIndexNode getRoot() {\n\t\treturn root;\n\t}", "public AVLNode getRoot() {\n return root;\n }", "public String getRootName() {\n\t\treturn rootName;\n\t}", "protected String getRootName() {\r\n\t\treturn ROOT_NAME;\r\n\t}", "public PhyloTreeNode getOverallRoot() {\n return overallRoot;\n }", "T getRoot();", "ValueNode getDefaultTree()\n\t{\n\t\treturn defaultTree;\n\t}", "public I_LogicalAddress getRoot() {\n return root;\n }", "CyRootNetwork getRootNetwork();", "public Node getRoot() {\r\n\r\n\t\treturn root;\r\n\t}", "public FrameLayout getModuleLayoutRoot();", "public DialogueNode getRoot() {\n\t\treturn root;\n\t}", "BTNode<T> getRoot();", "protected static DefaultMutableTreeNode getDefaultTreeModel()\n {\n // New root node\n DefaultMutableTreeNode root =\n new DefaultMutableTreeNode(\"Root\");\n \n // First level\n for (int i = 1; i <= 5; i++)\n {\n // New node\n DefaultMutableTreeNode folder =\n new DefaultMutableTreeNode(\"Folder-\" + i);\n \n // Add node to root\n root.add(folder);\n \n // Second level\n for (int j = 1; j <= 3; j++)\n {\n // New node\n DefaultMutableTreeNode subfolder =\n new DefaultMutableTreeNode(\"Subfolder-\" + j);\n \n // Add node to parent node\n folder.add(subfolder);\n \n // Third level\n for (int k = 1; k <= 3; k++)\n {\n // New anchor\n A a = new A(\"http://jakarta.apache.org\");\n a.setTarget(\"target\").addElement(\"Document-\" + k);\n \n // New node (leaf)\n DefaultMutableTreeNode document =\n new DefaultMutableTreeNode(a.toString());\n \n // Add node to parent node\n subfolder.add(document);\n }\n }\n }\n \n // Return root node\n return root;\n }", "public int getRoot() {\n return _root;\n }", "uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode getAstRoot();", "protected final XmlAntTask getRoot() {\n\t\tXmlAntTask tmp1 = parent;\n\t\tXmlAntTask tmp2 = this;\n\t\twhile (tmp1 != null) {\n\t\t\ttmp2 = tmp1;\n\t\t\ttmp1 = tmp2.getParent();\n\t\t}\n\t\treturn tmp2;\n\t}", "private ISiteEntry getRootSite() {\n \t\tISitePolicy defaultPolicy = createSitePolicy(DEFAULT_POLICY_TYPE, DEFAULT_POLICY_LIST);\n \t\tURL siteURL = null;\n \t\ttry {\n \t\t\tsiteURL = new URL(PlatformURLBaseConnection.PLATFORM_URL_STRING); // try using platform-relative URL\n \t\t} catch (MalformedURLException e) {\n \t\t\tsiteURL = BootLoader.getInstallURL(); // ensure we come up ... use absolute file URL\n \t\t}\n \t\tISiteEntry defaultSite = createSiteEntry(siteURL, defaultPolicy);\n \t\treturn defaultSite;\n \t}", "public static ParseTree getRoot(ParseTree tree) {\n\t\tParseTree parent = tree.getParent();\n\t\tif (parent == null) {\n\t\t\treturn tree;\n\t\t}\n\t\treturn getRoot(parent);\n\t}", "public Node getRoot() {\n return root;\n }", "public Object getRoot(){\r\n\t\treturn _root;\r\n\t}", "<T> T getRoot();", "public static int getModule1L5() {\r\n return Module1L5;\r\n }", "public int getModuleType() {\n\t\treturn 0;\n\t}", "public Node getRoot() {\n return root;\n }", "public Node getRoot() {\n return root;\n }", "public Node getRoot() {\n return root;\n }", "public String getDefaultApp()\n {\n if (defaultApp == null)\n {\n return apps.get(0).getName();\n }\n\n return defaultApp;\n }", "public TreeNode root() {\n\t\treturn root;\n\t}", "public static int getModule1L6() {\r\n return Module1L6;\r\n }", "public static Object getRoot(Map context) {\n return context.get(OgnlContext.ROOT_CONTEXT_KEY);\n }", "public final Node getRootContext() {\n return rootContext;\n }", "@Override\n\tpublic List<Module> listRootModule() {\n\t\treturn moduleDao.listRootModule();\n\t}", "public DefaultMutableTreeNode getRoot()\n {\n return root;\n }", "public pt.ist.fenixframework.adt.bplustree.AbstractNodeArray getRoot() {\n return this.root.get();\n }", "public RBNode<T, E> getRoot() {\r\n\t\treturn root;\r\n\t}", "public ContentScanner getRootLevel(\n )\n {\n ContentScanner level = this;\n while(true)\n {\n ContentScanner parentLevel = level.getParentLevel();\n if(parentLevel == null)\n return level;\n\n level = parentLevel;\n }\n }", "public String describeRoot();", "public Node getRoot(){\r\n return this.root;\r\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public typekey.CalcRoutineParamName getRoot();", "private Folder getRootFolder() {\n if(!MigrationProperties.get(MigrationProperties.PROP_MIGRATION_PROFILE).equalsIgnoreCase(\"DELTA\")) {\n String folderPath = MigrationProperties.get(MigrationProperties.PROP_SOURCE_LOCATION);\n\n if (folderPath != null && folderPath.contains(\"/\")) {\n Folder rootFolder = CmisHelper.getFolder(jobParameters.getSessionSource(), folderPath);\n return rootFolder;\n\n } else\n return null;\n } else\n return null;\n }", "private HtmlElement getRoot()\n\t{\n\t\treturn getBaseRootElement( ROOT_BY );\n\t}", "private EObject getRoot(Object receiver) {\r\n\t\tEObject root = null;\r\n\r\n\t\tif(receiver instanceof ISelection) {\r\n\t\t\tISelection selection = (ISelection)receiver;\r\n\t\t\tif(selection.isEmpty()) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\t//this is the case where the selection is on the Project Explorer\r\n\t\t\t\tIStructuredSelection selectionstructured = (IStructuredSelection)selection;\r\n\r\n\t\t\t\tObject selectedElement = selectionstructured.getFirstElement();\r\n\r\n\t\t\t\tObject selectedAdapter = Platform.getAdapterManager().getAdapter(selectedElement, IFile.class);\r\n\r\n\r\n\t\t\t\tif(selectedAdapter instanceof IFile) {\r\n\t\t\t\t\tfinal IFile selectedFile = (IFile)selectedAdapter;\r\n\t\t\t\t\tModelSet modelSet = new ModelSet();\r\n\t\t\t\t\tModelsReader reader = new ModelsReader();\r\n\t\t\t\t\treader.readModel(modelSet);\r\n\r\n\r\n\t\t\t\t\tIPath workspacePath = selectedFile.getFullPath();\r\n\r\n\t\t\t\t\tURI workspaceURI = URI.createPlatformResourceURI(workspacePath.toString(), true);\r\n\t\t\t\t\tmodelSet.loadModels(workspaceURI);\r\n\r\n\t\t\t\t\tUmlModel openedModel = (UmlModel)modelSet.getModel(UmlModel.MODEL_ID);\r\n\t\t\t\t\tif(openedModel != null) {\r\n\t\t\t\t\t\troot = openedModel.lookupRoot();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//this is the case where the selection is on the Model Explorer\r\n\t\t\t\t\tServiceUtilsForSelection serviceUtils = ServiceUtilsForSelection.getInstance();\r\n\t\t\t\t\tUmlModel openedModel = (UmlModel)serviceUtils.getModelSet(selection).getModel(UmlModel.MODEL_ID);\r\n\t\t\t\t\tif(openedModel != null) {\r\n\t\t\t\t\t\troot = openedModel.lookupRoot();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t//Ignored: The selection cannot be used to retrieve the ServicesRegistry.\r\n\t\t\t\t//Do not log exceptions: this is just not a Papyrus/RobotML model\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn root;\r\n\t}", "public WAVLNode getRoot() // return the root of the tree\r\n {\r\n return root;\r\n }", "public String getRoot(String kmer, generateHash g, long base) {\n\t\tint hashed = (int) g.hashFunction(base, kmer);\n\t\tint count = 0;\n\t\twhile(this.parent[hashed]!= '\\0') {\n\t\t\tif(count > 500) break;\n\t\t\tcount++;\n\t\t\tkmer = this.getParent(kmer, hashed);\n\t\t\thashed = (int) g.hashFunction(base, kmer);\n\t\t}\n\t\treturn kmer;\n\t}", "public Git.Entry getRoot() { \n Node c = this; \n while (c.par != null) c = c.par;\n return c.getObject();\n }", "public Optional<T> getModule() {\n return Optional.ofNullable(this.module);\n }", "ILitePackCollection getRoot();", "public static File getRootDirectory() {\n\t\treturn ROOT_DIRECTORY;\n\t}", "public ObjectTreeNode getRoot() {\n return root;\n }", "protected Program getProgram() {\n final Holder<Program> holder = Holder.of( null );\n Hook.PROGRAM.run( holder );\n if ( holder.get() != null ) {\n return holder.get();\n }\n\n return Programs.standard();\n }", "public Group getRoot(){\n assert(root != null);\n return root;\n }", "public IAVLNode getRoot() {\n\t\treturn this.root;\n\t}", "public AVLNode<T> getRoot() {\n return root;\n }", "private Root getBuiltinsRoot(String builtinsBzlPath) {\n if (builtinsBzlPath.isEmpty()) {\n throw new IllegalStateException(\"Requested builtins root, but injection is disabled\");\n }\n\n // TODO(#11437): For the non-bundled case, should we consider interning the Root rather than\n // constructing a new one each time?\n Root root;\n if (builtinsBzlPath.equals(\"%bundled%\")) {\n // May be null in tests, but in that case the builtins path shouldn't be set to %bundled%.\n root =\n Preconditions.checkNotNull(\n ruleClassProvider.getBundledBuiltinsRoot(),\n \"rule class provider does not specify a builtins root; either call\"\n + \" setBuiltinsBzlZipResource() or else set --experimental_builtins_bzl_path to\"\n + \" a root\");\n } else if (builtinsBzlPath.equals(\"%workspace%\")) {\n String packagePath =\n Preconditions.checkNotNull(\n ruleClassProvider.getBuiltinsBzlPackagePathInSource(),\n \"rule class provider does not specify a canonical package path to a builtins root;\"\n + \" either call setBuiltinsBzlPackagePathInSource() or else do not set\"\n + \"--experimental_builtins_bzl_path to %workspace%\");\n // TODO(brandjon): Here we return a root that is underneath a package root. Since the root is\n // itself not a package root, we don't get the benefit of any special DiffAwareness handling.\n // This case probably isn't important since it doesn't occur in production Bazel, but\n // presumably we might be able to add a special DiffAwareness for it if we wanted.\n root = Root.fromPath(directories.getWorkspace().getRelative(packagePath));\n } else {\n root = Root.fromPath(directories.getWorkspace().getRelative(builtinsBzlPath));\n }\n return root;\n }", "private String getCodeRoot(boolean cloningRepo) {\n\t\tString rootDir;\n\t\tJFrame frame = new JFrame();\n\t\tJFileChooser chooser = new JFileChooser();\n\t\t// Set proper options for root selector\n\t\tchooser.setCurrentDirectory(new File(\"..\"));\n\n\t\tif (cloningRepo) {\n\t\t\tchooser.setDialogTitle(\"Please Select Directory to Create Temporary Git Repo\");\n\t\t} else {\n\t\t\tchooser.setDialogTitle(\"Please Select Codebase Root Directory\");\n\t\t}\n\n\t\tchooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\tchooser.setAcceptAllFileFilterUsed(false);\n\t\t// If they hit cancel shutdown system\n\t\tif (chooser.showOpenDialog(frame) == JFileChooser.CANCEL_OPTION) {\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\t// If this happens we have other issues, but to be safe :)\n\t\tif (chooser.getSelectedFile() == null)\n\t\t\treturn null;\n\n\t\trootDir = chooser.getSelectedFile().getAbsolutePath();\n\t\tframe.dispose();\n\t\treturn rootDir;\n\t}", "public MoveTrieNode getRoot() {\n return root;\n }", "public static int getModule1L4() {\r\n return Module1L4;\r\n }", "public SVGElementModel getRoot() {\n \t\treturn store.getRootItems().get(0);\n \t}", "private Group getRoot() throws GeppettoExecutionException\n\t{\n\t\treturn (Group) ((javax.swing.tree.DefaultMutableTreeNode) recordingsH5File.getRootNode()).getUserObject();\n\t}", "public File getCodeRoot( File dirPackage )\n\t{\n\t\tif( (dirPackage == null) || (!dirPackage.exists()) || (!dirPackage.isDirectory()) ) return null;\n\n\t\tString strPathFragment = this.packagename.replace( '.', File.separatorChar );\n\t\t//System.out.println( \"\\t strPathFragment \" + strPathFragment );\n\n\t\tif( dirPackage.getPath().endsWith( strPathFragment ) )\n\t\t{\n\t\t\tString[] strSplit = this.packagename.split( \"\\\\.\" );\n\t\t\tFile current = dirPackage;\n\t\t\tfor( int i=0; (i<strSplit.length) && (current != null); i++ ) current = current.getParentFile();\n\t\t\t//System.out.println( \"\\t returning \" + current.getPath() );\n\t\t\treturn current;\n\t\t}\n\t\telse return null;\n\t}", "synchronized Module getCurrentModule()\n {\n return m_modules.get(m_modules.size() - 1);\n }", "Path getRootPath();", "public java.lang.String getRootId() {\n java.lang.Object ref = rootId_;\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 rootId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static String rootDir()\n {\n read_if_needed_();\n \n return _root;\n }", "public Node<T> getRoot() {\n\t\treturn root;\n\t}", "public int root(){\n\t\tRandom r1=new Random();\n\t\tint r2= r1.nextInt((9) + 1) + 1;\n\t\treturn r2*100;\n\t}", "public static org.slf4j.Logger getRootLogger() {\n\t\treturn LoggerFactory.getLogger(\"ROOT\");\n\t}", "@Override\r\n\tpublic Node<T> getRoot() {\r\n\t\treturn raiz;\r\n\t}", "OntologyTerm getRoot();", "String getRootId();", "String getRootId();", "public WAVLNode getRoot()\r\n\t {\r\n\t\t return this.root;\r\n\t }", "public BSTNode<T> getRoot() {\n // DO NOT MODIFY THIS METHOD!\n return root;\n }", "public TreeNode<E> getRoot() {\r\n\t\treturn root;\r\n\t}", "protected BSTNode root() {\n\t\treturn root;\n\t}", "final public IASTPKGStatement TopLevelStatement() throws ParseException {\r\n IASTPKGStatement node = null;\r\n Token start = token;\r\n try {\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case LANGUAGE_START:\r\n node = LanguageStatement();\r\n break;\r\n case PACKAGE_HEADER_START:\r\n node = PackageHeaderStatement();\r\n break;\r\n case MULTILINGUAL_VENDOR_START:\r\n case UNIQUE_VENDOR_START:\r\n node = VendorStatement();\r\n break;\r\n case EQUAL:\r\n node = LogoStatement();\r\n break;\r\n default:\r\n jj_la1[0] = jj_gen;\r\n if (jj_2_1(2147483647)) {\r\n node = PackageSignatureStatement();\r\n } else {\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case OPEN_SQUARE_BRACKET:\r\n node = HardwareDependencyStatement();\r\n break;\r\n case OPEN_PARENTHESIS:\r\n node = SoftwareDependencyOrVersionCompatiblityStatement();\r\n break;\r\n case OPEN_CURLY_BRACE:\r\n case AMPERSAND:\r\n case STRING:\r\n case IF:\r\n case COMMENT_START:\r\n case OPTIONSLIST_START:\r\n case PLUS:\r\n node = ConditionalStatement();\r\n break;\r\n default:\r\n jj_la1[1] = jj_gen;\r\n jj_consume_token(-1);\r\n throw new ParseException();\r\n }\r\n }\r\n }\r\n {if (true) return node;}\r\n } catch (ParseException e) {\r\n {if (true) return createProblemStatement(start, null, e);}\r\n }\r\n throw new Error(\"Missing return statement in function\");\r\n }", "public String getTopPackage() {\n return mActivityManager.getRunningTasks(1).get(0).topActivity.getPackageName();\n }", "public String getDefaultBuilder() {\n\n\t\treturn this.defaultBuilder;\n\t}", "public String getRootPath() {\n return root.getPath();\n }", "public String getModuleName() {\n if (repository == null) {\n return baseName;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(baseName);\n return b.toString();\n }\n }", "@java.lang.Override\n public java.lang.String getRootId() {\n java.lang.Object ref = rootId_;\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 rootId_ = s;\n return s;\n }\n }", "public String getStateRoot() {\n\t\tint count = accounts.size();\n\t\tArrayList<String> previousTreeLayer = new ArrayList<String>();\n\t\tfor(AccountInterface account : accounts) {\n\t\t\tpreviousTreeLayer.add(account.getAddress());\n\t\t}\n\t\t\n\t\tArrayList<String> treeLayer = previousTreeLayer;\n\t\twhile(count > 1) {\n\t\t\ttreeLayer = new ArrayList<String>();\n\t\t\tfor(int i=1; i < previousTreeLayer.size(); i++) {\n\t\t\t\ttreeLayer.add(CryptoUtil.applySha256(previousTreeLayer.get(i-1) + previousTreeLayer.get(i)));\n\t\t\t}\n\t\t\tcount = treeLayer.size();\n\t\t\tpreviousTreeLayer = treeLayer;\n\t\t}\n\t\tString merkleRoot = (treeLayer.size() == 1) ? treeLayer.get(0) : \"\";\n\t\treturn merkleRoot;\t\t\n\t}", "public TreeNode<E> getRoot() {\n return root;\n }", "protected TreeNode<E> getRoot() {\n\t\treturn root;\n\t}" ]
[ "0.82243985", "0.81420565", "0.65861845", "0.634595", "0.6198116", "0.61868334", "0.6142905", "0.6037674", "0.59502906", "0.5808029", "0.5704548", "0.5703653", "0.56462944", "0.559733", "0.5574566", "0.5545586", "0.55135137", "0.5494915", "0.5490275", "0.54828495", "0.5459198", "0.5450785", "0.54475373", "0.54256725", "0.5422074", "0.5415577", "0.5400737", "0.539221", "0.5391799", "0.5388179", "0.5371972", "0.53475857", "0.5331514", "0.53250813", "0.5322854", "0.5303063", "0.529317", "0.52891415", "0.5274294", "0.5270198", "0.5270198", "0.5270198", "0.52685565", "0.5253268", "0.5245546", "0.52244467", "0.5215162", "0.52104443", "0.5204646", "0.51894945", "0.5188452", "0.5180285", "0.5176793", "0.5170354", "0.51670927", "0.5159944", "0.515757", "0.5155556", "0.5146128", "0.51378757", "0.51353675", "0.51308566", "0.5122081", "0.5111882", "0.51009476", "0.5098957", "0.5082926", "0.5077449", "0.5073903", "0.507273", "0.506416", "0.5063534", "0.5050979", "0.5048203", "0.5045948", "0.5044997", "0.5044776", "0.50430286", "0.5042413", "0.5040012", "0.5025049", "0.49992612", "0.49976984", "0.49948385", "0.49932027", "0.4992296", "0.4992296", "0.4988285", "0.49837202", "0.49828956", "0.49779835", "0.4970639", "0.49670556", "0.496372", "0.49588013", "0.49532866", "0.4952517", "0.49457", "0.49442676", "0.49378544" ]
0.75713056
2
Get the names of all the trees defined in this listing.
public String[] getTreeNames();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<String> getTrees();", "public String[] getTrees(){\n LinkedList l = new LinkedList();\n for(TreeInfo t : TreeInfo.values()){\n l.add(t.getTreeType());\n }\n return Arrays.copyOf(l.toArray(), l.toArray().length, String[].class);\n }", "public List<Tree> getTrees() {\n return trees;\n }", "public String getTreeName() {\n return treeName;\n }", "Collection<Tree<V, E>> getTrees();", "@JsonIgnore\n public List<String> getAncestorTypeNames() {\n if(ancestorDefs != null && !ancestorDefs.isEmpty()) {\n return ancestorDefs.values().stream().map(type -> type.asTypeString()).collect(Collectors.toList());\n } else if (ancestors != null) {\n return ancestors;\n } else {\n return new ArrayList<>();\n }\n }", "public List<String> getChildNames() {\n\t\treturn _childNames;\n\t}", "@Override\n\tpublic String getTreeDisplayName() {\n\t\treturn getFirstName()+\" \"+getLastName();\n\t}", "public static String printTree()\r\n {\r\n String result = \"\";\r\n for (String s: tree.toArrayList())\r\n result = result + \" \" + s;\r\n return result;\r\n }", "@Generated(hash = 1128962199)\r\n public List<Trunk> getTrees() {\r\n if (trees == null) {\r\n final DaoSession daoSession = this.daoSession;\r\n if (daoSession == null) {\r\n throw new DaoException(\"Entity is detached from DAO context\");\r\n }\r\n TrunkDao targetDao = daoSession.getTrunkDao();\r\n List<Trunk> treesNew = targetDao._queryTree_Trees(id);\r\n synchronized (this) {\r\n if (trees == null) {\r\n trees = treesNew;\r\n }\r\n }\r\n }\r\n return trees;\r\n }", "public void printTreeNodes(){\n logger.trace(\"Name: \"+this.getName());\n for(int i=0;i<this.getChildCount();i++){\n SearchBaseNode node = (SearchBaseNode) this.getChildAt(i);\n node.printTreeNodes();\n }\n }", "List<String> getNodeNames()\n {\n return allNodes.values().stream().map(CommunicationLink::getName).collect(Collectors.toList());\n }", "public List<String> useTreeOnData() {\n\t\tList<String> classifierWithData = new ArrayList<String>();\n\t\tString header = \"LEARND\\tACTUAL\";\n\t\tfor (String s : attributeNames) {\n\t\t\tchar[] truncated = Arrays.copyOf(s.toCharArray(),5);\n\t\t\tString tr = \"\";\n\t\t\tfor (int i = 0; i < 5 && Character.isAlphabetic(truncated[i]); i++) {\n\t\t\t\ttr += truncated[i];\n\t\t\t}\n\t\t\theader += \"\\t\"+ tr +\".\";\n\t\t}\n\t\tclassifierWithData.add(header);\n\t\tif (root == null || data == null || attributeNames.size() == 0) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tfor (Instance inst : data) {\n\t\t\tString s = root.classify(inst) +\"\\t\"+ inst.toString();\n\t\t\tclassifierWithData.add(s);\n\t\t}\n\t\treturn classifierWithData;\n\t}", "public String toString() {\n return tree.toString();\n }", "public String getTreeType();", "public List<TbNode> getAll() {\n return qureyNodeList(new NodeParam());\n }", "public String toString() {\n if (subTrees.isEmpty()) return rootToString();\n StringBuilder result = new StringBuilder(rootToString() + \"(\" + subTrees.get(0).toString());\n for (int i = 1; i < subTrees.size(); i++) result.append(\",\").append(subTrees.get(i).toString());\n return result + \")\";\n }", "public Set<String> getNames() {\n\t\t//\t\tArrayList<String> names = new ArrayList<String>();\n\t\t//\t\tfor (NameSSA n : name.values())\n\t\t//\t\t\tnames.add(n.current());\n\t\treturn name.keySet();\n\t}", "public String treeType();", "public List<? extends Name> getAllNames() {\n\t\treturn null;\n\t}", "public List<PackerTreeNode<T>> getAllLeafNodes() {\n if (children.isEmpty()) {\n return Collections.singletonList(this);\n }\n return children\n .stream()\n .map(PackerTreeNode::getAllLeafNodes)\n .flatMap(Collection::stream)\n .collect(Collectors.toList());\n }", "public List<INode> getAllNodes();", "List<UmsMenuNode> treeList();", "public String getTree ( ) {\n\n String tree;\n StringWriter s = new StringWriter();\n PrintWriter out = null;\n\n try {\n out = new PrintWriter(s);\n } catch ( Exception ex ) {};\n\n program.printIndividual(param.Parameters.STATE, out);\n\n tree = s.toString();\n String list2[] = tree.split(\"\\n\");\n\n out.close();\n try { s.close(); } catch ( Exception e ) {};\n\n return list2[list2.length - 1];\n\n }", "@Override\r\n public String toString() {\r\n Queue<List<Node>> queue = new LinkedList<List<Node>>();\r\n queue.add(Arrays.asList(root));\r\n StringBuilder sb = new StringBuilder();\r\n while (!queue.isEmpty()) {\r\n Queue<List<Node>> nextQueue = new LinkedList<List<Node>>();\r\n while (!queue.isEmpty()) {\r\n List<Node> nodes = queue.remove();\r\n sb.append('{');\r\n Iterator<Node> it = nodes.iterator();\r\n while (it.hasNext()) {\r\n Node node = it.next();\r\n sb.append(node.toString());\r\n if (it.hasNext())\r\n sb.append(\", \");\r\n if (node instanceof BPTree.InternalNode)\r\n nextQueue.add(((InternalNode) node).children);\r\n }\r\n sb.append('}');\r\n if (!queue.isEmpty())\r\n sb.append(\", \");\r\n else {\r\n sb.append('\\n');\r\n }\r\n }\r\n queue = nextQueue;\r\n }\r\n return sb.toString();\r\n }", "public Iterator<String> listRootClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listHierarchyRootClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\t\t\r\n\t}", "@Override\n\tpublic ArrayList<String> getName() {\n\t\tArrayList<String> l = new ArrayList<String>();\n\t\tl.addAll(leftTable.getName());\n\t\tl.addAll(rightTable.getName());\n\t\treturn l;\n\t}", "public String[] getNames() {\r\n\t\treturn this.context.getNames();\r\n\t}", "Collection<String> names();", "@Override\n\tpublic String toString() {\n\t\t/*\n\t\t * Just materializing the complete tag map is the simplest implementation.\n\t\t * This is not performance-critical code, so we aim for code simplicity rather than performance.\n\t\t * We are constructing a TreeMap in order to force display in sorted order.\n\t\t */\n\t\tMap<String, Object> sorted = new TreeMap<>();\n\t\tList<Namespace> namespaces = namespaces();\n\t\tfor (Namespace ns : namespaces)\n\t\t\tfor (OwnerTag tag = ns.data.tags; tag != null; tag = tag.next)\n\t\t\t\tsorted.put(ns.name + \".\" + tag.key, tag.value);\n\t\treturn namespaces.stream().map(ns -> ns.name).collect(joining(\".\")) + sorted;\n\t}", "public String toString() {\n if (root == null) {\n return (treeName + \" Empty tree\\n\");\n } else {\n String space = \"\";\n return treeName + \"\\n\" + toStringRecur(root.right, space) + \"\\n\" + root.element +\n \"[No Parent so sad]\" + toStringRecur(root.left, space) + \"\\n\";\n }\n }", "public LinkedList<String> getNames() {\r\n return names;\r\n }", "public ArrayList<String> getNames(){\r\n \t\tArrayList<String> names = new ArrayList<String>();\r\n \t\tfor (Enumeration<Tag> temp = tags.elements(); temp.hasMoreElements();) \r\n \t\t\tnames.add(temp.nextElement().getName());\r\n \t\treturn names;\r\n \t}", "private String[][] childrenNames(LinkedList<QuadTree> Linked) {\n LinkedList<Double> latName = new LinkedList<>();\n Map<Double, LinkedList<String>> res = new HashMap<>();\n for (QuadTree q : Linked) {\n if (!res.containsKey(q.ullat)) {\n res.put(q.ullat, new LinkedList<>());\n latName.addLast(q.ullat);\n }\n res.get(q.ullat).addLast(q.name);\n }\n\n String[][] emptyTree = twoDArray(Linked);\n for (int row = 0; row < emptyTree.length; row++) {\n for (int col = 0; col < emptyTree[0].length; col++) {\n emptyTree[row][col] = \"img/\" + res.get(latName.get(row)).get(col) + \".png\";\n }\n }\n return emptyTree;\n }", "public Set<String> getAllNodes() {\n return this.graph.keySet();\n }", "public String[] listChildren()\n/* */ {\n/* 519 */ int childCount = getChildCount();\n/* 520 */ String[] outgoing = new String[childCount];\n/* 521 */ for (int i = 0; i < childCount; i++) {\n/* 522 */ outgoing[i] = getChild(i).getName();\n/* */ }\n/* 524 */ return outgoing;\n/* */ }", "public String getThymeLeafName() {\n\t\treturn thymeLeafName;\n\t}", "public List<Component> getAllTree() {\n\t\tList<Component> ret = new ArrayList<>();\n\t\tret.add(this);\n\t\tfor (Component c : getChilds()) {\n\t\t\tList<Component> childs = c.getAllTree();\n\t\t\t// retire les doublons\n\t\t\tfor (Component c1 : childs) {\n\t\t\t\tif (!ret.contains(c1)) {\n\t\t\t\t\tret.add(c1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public List<HashMap<String, Object>> getMenuTreeRetrieve() {\n\t\treturn mapper.getMenuTreeRetrieve();\r\n\t}", "public java.util.ArrayList<Species> getAllSpecies() {\n ArrayList<Species> answer = new ArrayList<Species>();\n getAllDescendantSpecies(overallRoot, answer);\n return answer;\n \n }", "@Override\n public ArrayList<Node> getAllNodes() {\n return getAllNodesRecursive(root);\n\n }", "public String treeJSON() {\n\t\ttry{\r\n\t\tList trees = this.getTransedTrees();\r\n\t\tString result = this.treeJSON(trees);\r\n\t\treturn result;\r\n\t\t}catch(Exception e){\r\n\t\t\tlog.info(\">>>>faceye error in method:treeJSON() is\"+e.toString());\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tpreOrderTraverse(expression.root, 1, sb);\n\t\t\treturn sb.toString();\n\t\t}", "SortedSet<String> getNames();", "private List<String> getTagNames() {\n String query = \"SELECT DISTINCT ?tagName WHERE { ?thing isa:tag [isa:tagName ?tagName; isa:tagDetail ?tagDetail]}\";\n List<Map<String, String>> results = moduleContext.getModel().executeSelectQuery(query);\n List<String> tags = new ArrayList<>();\n results.forEach(solution -> tags.add(solution.get(\"tagName\")));\n return tags;\n }", "public String toTreeString() {\n return toTreeString(overallRoot);\n }", "public static String printTree()\n {\n \tString tree = \"\";\n ArrayList<String> letters = converter.toArrayList();\n for(int i = 0; i < letters.size(); i++)\n {\n tree += letters.get(i);\n if(i + 1 < letters.size())\n \t tree += \" \";\n }\n \n return tree;\n }", "@Override\n public String toString() { // display subtree in order traversal\n String output = \"[\";\n LinkedList<Node<T>> q = new LinkedList<>();\n q.add(this);\n while(!q.isEmpty()) {\n Node<T> next = q.removeFirst();\n if(next.leftChild != null) q.add(next.leftChild);\n if(next.rightChild != null) q.add(next.rightChild);\n output += next.data.toString();\n if(!q.isEmpty()) output += \", \";\n }\n return output + \"]\";\n }", "Collection<Node> allNodes();", "public IAstTopLevelNode[] getTopLevelNodes();", "public String[] getNodeTypes()\r\n {\r\n\treturn ntMap.keySet().toArray(new String[ntMap.size()]);\r\n }", "public static String listFather() {\n\t\tString s = \"\";\n\t\tString i1 = \" \";\n\t\tfor (Entry<String, TreeMap<String, Set<String>>> en:getFatherMap().entrySet()) {\n\t\t\ts = s + en.getKey() + \":\\n\";\n\t\t\tTreeMap<String, Set<String>> fathers = en.getValue();\n\t\t\tfor (Entry<String, Set<String>> father:fathers.entrySet()) {\n\t\t\t\ts = s + i1 + father.getKey() + \" ( \";\n\t\t\t\tfor (String root:father.getValue()) {\n\t\t\t\t\ts = s + root + \" \";\n\t\t\t\t}\n\t\t\t\ts = s + \")\\n\";\n\t\t\t}\n\t\t}\n\t\treturn s;\n\t}", "@Override\r\n\tpublic List<String> agentAllName() {\n\t\treturn agentMapper.agentAllName();\r\n\t}", "public ArrayList<Node> getList(){\n \treturn this.children;\n }", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Position<FileElement> p : toPrint)\n\t\t{\n\t\t\tint depth = fileSystem.getDepth(p);\n\t\t\tfor (int i = 0; i < depth; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(p.getValue());\n\t\t}\n\t}", "public List<Node> getNodes() {\n List<Node> list = getNodes(false, false);\n return list;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n traverseNode(sb, \"\", \"\", root, false);\n return sb.toString();\n }", "public List<String> getNames() {\n return names;\n }", "public List<Node> getAllNodes() {\n return nodeRepository.findAll();\n }", "public List<NodeTypeDescription> nodeTypes() {\n return this.nodeTypes;\n }", "public List<String> getQueryNames() throws SettingsException {\n\t\ttry {\n\t\t\tsearchPrefs.sync();\n\t\t\t\n\t\t\tString[] children = searchPrefs.childrenNames();\n\t\t\tArrayList<String> names = new ArrayList<String>(children.length);\n\t\t\tfor( String child : children ) {\n\t\t\t\tString name = searchPrefs.node(child).get(NAME_KEY, null);\n\t\t\t\tif( name != null )\n\t\t\t\t\tnames.add(name);\n\t\t\t\telse\n\t\t\t\t\t_log.warn(\"No name for search key: \" + child);\n\t\t\t}\n\t\t\t\n\t\t\treturn names;\n\t\t\t\n\t\t} catch( BackingStoreException e ) {\n\t\t\tfinal String MSG = \"Could not load queries from store.\";\n\t\t\t_log.error(MSG, e);\n\t\t\tthrow new SettingsException(MSG, e);\n\t\t}\n\t}", "public List<String> stringy() {\n\t\t\tList<String> temp = new ArrayList<>();\n\t\t\t// add all the file names\n\t\t\ttemp.addAll(getFileNames());\n\t\t\t// add all the directories [indicated by a \"-\"]\n\t\t\tfor (DirectoryObjects t : subdirectories) {\n\t\t\t\ttemp.add(t.name);\n\t\t\t}\n\n\t\t\treturn temp;\n\t\t}", "public String makeTree() {\r\n // Create a stack to store the files/directories in the tree\r\n Stack<DirectoryTreeNode> itemStack = new Stack<>();\r\n // Initialize a string variable to store the tree diagram\r\n String tree = \"\";\r\n // Push the root directory into the stack\r\n itemStack.push(this.rootDir);\r\n\r\n // Loop through the items in the Stack until all the items have been\r\n // traversed (this is similar to the pre-order traversal of the tree)\r\n while (!itemStack.isEmpty()) {\r\n // Get the item on the top of the stack and store it in current\r\n DirectoryTreeNode current = (DirectoryTreeNode) itemStack.pop();\r\n // Get the number of tabs required in the output for this item\r\n int numTabs = this.getNumberOfAncestors((E) current);\r\n // Get the string of tabs needed to put before current's name\r\n String tabs = this.getNumberOfTabs(numTabs);\r\n // Add the required number of tabs, the current item's of name and a\r\n // newline\r\n tree += tabs + current.getName() + \"\\n\";\r\n\r\n // Check if current is a Directory (in which case it may have\r\n // sub directories and files)\r\n if (current instanceof Directory) {\r\n // Get the list of files and directories of current directory\r\n ArrayList<DirectoryTreeNode> contents =\r\n ((Directory) current).getContents();\r\n // Loop through the contents of current and add them to the stack\r\n for (int i = contents.size() - 1; i >= 0; i--) {\r\n itemStack.add(contents.get(i));\r\n }\r\n }\r\n }\r\n // Return the generated tree diagram\r\n return tree;\r\n }", "public String ls()\n\t{\n\t\tString toReturn = \"\";\n\t\tIterable<Position<FileElement>> kids = fileSystem.children(currentFileElement);\n\t\tif (kids == null) return \"Nothing to list\";\n\t\t{\n\t\t\tfor (Position<FileElement> fe : kids)\n\t\t\t{\n\t\t\t\ttoReturn += fe.toString() + \", \";\n\t\t\t}\n\t\t}\n\t\treturn toReturn;\n\t}", "public List<Node<E>> leaves() {\n return this.children;\n }", "public int nodesInTree() \n { \n return nodesInTree(header.rightChild); \n }", "@Nonnull List<String> getNameList();", "public Collection<String> getNodeNames (Collection<CyNode> nodes) {\n return nodes.stream().map(node -> getNodeName(node)).collect(Collectors.toList());\n }", "public Set<Node<E>> getNodes(){\n return nodes.keySet();\n }", "public static ArrayList<String> getReglesNoms() throws IOException{\n return ctrl_Persistencia.llistaFitxers(\"@../../Dades\",\"regles\");\n }", "Iterable<String> getModuleNames();", "public java.util.List<entities.Torrent.NodeId.Builder>\n getNodesBuilderList() {\n return getNodesFieldBuilder().getBuilderList();\n }", "public String printTree() {\n printSideways();\n return \"\";\n }", "public List<MarkedUpText> getDescendantTexts() {\n List<MarkedUpText> texts = this.getChildrenTexts();\n \n Enumeration<DefaultMutableTreeNode> children = this.children();\n while (children.hasMoreElements()) {\n DefaultMutableTreeNode curChild = children.nextElement();\n if(curChild.getAllowsChildren()) {\n texts.addAll(((Folder) curChild).getDescendantTexts());\n }\n }\n return texts;\n }", "public ArrayList<String> getAllVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values()){\n\t\t\tString root = n.name();\n\t\t\tfor (int i=0;i<=n.cpt;i++)\n\t\t\t\tnames.add(root+\"_\"+i);\n\t\t}\n\t\treturn names;\n\t}", "public ResultMap<BaseNode> listChildren();", "public List<Node> getNodes();", "public final String name() {\n return node.getNodeName();\n }", "public Set<?> getChildrenNames(Fqn fqn) throws Exception\n {\n\n return (Set<?>) invokeWithRetries(GET_CHILDREN_METHOD, fqn);\n }", "protected static List<String> flatTree(List<ObjectInFolderContainer> tree) throws Exception {\n if (tree == null) {\n return null;\n }\n List<String> r = new LinkedList<>();\n for (ObjectInFolderContainer child : tree) {\n String name = getString(child.getObject().getObject(), PropertyIds.NAME);\n String elem = name;\n List<String> sub = flatTree(child.getChildren());\n if (sub != null) {\n elem += \"[\" + StringUtils.join(sub, \", \") + \"]\";\n }\n r.add(elem);\n }\n Collections.sort(r);\n return r.isEmpty() ? null : r;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn (this.id + \"\\t\" + this.name + \"\\t\" + this.nodeType);\r\n\t}", "public EntryTree tree() {\n return tree;\n }", "public String findAllNames(Node node,String allnames)\n {\n //Scroll through tree and add all names to arraylist\n int size = node.children.size();\n \n if (size > 0){ //If children\n for(int i = 0 ; i<size; i++){\n allnames = findAllNames(node.children.get(i),allnames); \n }\n }\n \n if (!node.getName().equals(\"\")){ //If the node has a name - could change this to use only internal nodes too\n if (allnames == \"\"){\n allnames = allnames + node.getName();\n }\n else{\n allnames = allnames + \",\" + node.getName();\n }\n }\n \n return allnames;\n }", "public MyTree getTree() {\r\n\t\treturn tree;\r\n\t}", "public List<String> children() {\n return this.children;\n }", "public Symbol[] getLeaves() {\n\t\tif (leaves == null) {\n\t\t\tif (numChildren == 0) {\n\t\t\t\tleaves = new Symbol[] {label};\n\t\t\t\treturn leaves;\n\t\t\t}\n\t\t\tSymbol[][] leafSets = new Symbol[numChildren][];\n\t\t\tint numItems = 0;\n\t\t\t// gather the arrays\n\t\t\tfor (int i = 0; i < numChildren; i++) {\n\t\t\t\tleafSets[i] = ((TreeItem)children[i]).getLeaves();\n\t\t\t\tnumItems += leafSets[i].length; \n\t\t\t}\n\t\t\t// compress them into one, then give it to the above\n\t\t\tleaves = new Symbol[numItems];\n\t\t\tint currItem = 0;\n\t\t\tfor (int i = 0; i < numChildren; i++) {\n\t\t\t\tfor (int j = 0; j < leafSets[i].length; j++) {\n\t\t\t\t\tleaves[currItem++] = leafSets[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn leaves;\n\t}", "@Override\n\tpublic <K extends BasePojo> List<K> getTreeViewList() throws Exception {\n\t\treturn null;\n\t}", "public String[] getTags() {\n WindowManager wm = TopManager.getDefault().getWindowManager();\n Workspace[] wss = wm.getWorkspaces();\n if (!namesInitialized) {\n namesInitialized = true;\n initializeNamesMap(wss);\n }\n // exclude browsing, running and debugging workspaces\n java.util.Vector tagList = new java.util.Vector ();\n for (int i = wss.length; --i >= 0; ) {\n String name = wss[i].getName();\n if (!(\"Browsing\".equals (name) || \"Running\".equals (name) || \"Debugging\".equals (name))) { // NOI18N\n tagList.add(name);\n }\n }\n // XXX(-tdt)\n // tagList.add(NbBundle.getBundle(WorkspaceEditor.class).getString(\"VALUE_WORKSPACE_NONE\"));\n String[] names = new String [tagList.size()];\n for (int i=0, n=tagList.size(); i<n; i++)\n names[i] = (String)namesMap.get(tagList.get(i));\n return names;\n }", "public final ArrayList<String> getNames() {\r\n\t\tArrayList<String> names = new ArrayList<String>();\r\n\r\n\t\t// for every workout in our workoutList\r\n\t\tfor (Workout i : workoutList) {\r\n\t\t\t// get the name and add it to our ArrayList names\r\n\t\t\tnames.add(i.getName());\r\n\t\t}\r\n\r\n\t\treturn names;\r\n\t}", "public List<String> getBranchTags() {\n\t\tCVSTag[] branches = logEntry.getBranches();\n\t\tArrayList<String> branchList = new ArrayList<String>(branches.length);\n\t\tfor (CVSTag br : branches) {\n\t\t\tbranchList.add(br.getName());\n\t\t}\n\t\treturn branchList;\n\t}", "public Map<String, Node> nodes() {\n return this.nodes;\n }", "public String toString() {\n return toString(root) + \" \";//call helper method for in-order traversal representation\n }", "public List<Node> toList() {\n return tree.toList();\n }", "public Set<String> loadAllSubstanceNames();", "Set<String> getNames();", "@Override\n\tpublic List<Node> chilren() {\n\t\treturn children;\n\t}", "public ArrayList<String> getNames() {\n return names;\n }", "List<Node> getNodes();", "public void printTree(){ \n System.out.format(\"The suffix tree for S = %s is: %n\",this.text); \n this.print(0, this.root); \n }", "public void printTree() {\n\t\tSystem.out.println(printHelp(root));\r\n\t\t\r\n\t}" ]
[ "0.706169", "0.6788371", "0.67352754", "0.6593549", "0.6506627", "0.62352586", "0.60895395", "0.60863066", "0.60860294", "0.60257316", "0.6002149", "0.5979312", "0.59288543", "0.5927663", "0.5900662", "0.5866402", "0.5856516", "0.5801481", "0.5787973", "0.5769553", "0.57101786", "0.56829077", "0.56612927", "0.5660467", "0.5658372", "0.5645265", "0.56259173", "0.5617786", "0.559202", "0.55907047", "0.558712", "0.55707854", "0.554225", "0.55384755", "0.5520825", "0.55148935", "0.55126727", "0.5495885", "0.54944366", "0.54920727", "0.5489188", "0.548428", "0.54770845", "0.5423419", "0.5407349", "0.5406495", "0.53811836", "0.53680074", "0.5361039", "0.5358457", "0.5349812", "0.53468305", "0.534204", "0.5330608", "0.53292054", "0.5324213", "0.53201437", "0.5313631", "0.53079605", "0.5302894", "0.5294005", "0.52877384", "0.5286648", "0.52831495", "0.5282325", "0.5281442", "0.5276655", "0.5275989", "0.52651083", "0.5263442", "0.52633077", "0.5259453", "0.52590567", "0.52539617", "0.52303016", "0.52225786", "0.521068", "0.5206325", "0.5200751", "0.5198192", "0.5195417", "0.51889443", "0.5188374", "0.51868725", "0.51864433", "0.5184635", "0.517705", "0.5175413", "0.51749754", "0.5164404", "0.51624817", "0.51621443", "0.5159717", "0.51570094", "0.51569235", "0.51542604", "0.5154229", "0.51517755", "0.5148625", "0.51485366" ]
0.7995301
0
Remove the tree rooted at the given name.
public boolean removeTree(String treeName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Node safeRemoveNamedItem(String name) {\n return internalRemoveNamedItem(name, false);\n }", "public boolean delete(String name)\r\n\t{\r\n\t\t// Find the location of the Node with the search method and assign it to current\r\n\t\tNode current = search(name);\r\n\t\t\r\n\t\t// Return False if the Node was not found\r\n\t\tif(current == null)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Special case of deleting the root Node\r\n\t\tif(current == getRoot())\r\n\t\t{\r\n\t\t\t// Root has no children (aka is a leaf)\r\n\t\t\tif(getRoot().isLeaf())\r\n\t\t\t{\r\n\t\t\t\t// Deleting the Root (aka destroying the Binary Tree)\r\n\t\t\t\tdestroy();\r\n\t\t\t}\r\n\t\t\t// Root only has a left child\r\n\t\t\telse if(getRoot().getRightChild() == null)\r\n\t\t\t{\r\n\t\t\t\t// Make the left child of the deleted Root the new Root\r\n\t\t\t\tsetRoot(current.getLeftChild());\r\n\t\t\t\tcurrent.getLeftChild().setParent(null);\r\n\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Root only has a right child\r\n\t\t\telse if(getRoot().getLeftChild() == null)\r\n\t\t\t{\r\n\t\t\t\t// Make the right child of the deleted Root the new Root\r\n\t\t\t\tsetRoot(current.getRightChild());\r\n\t\t\t\tcurrent.getRightChild().setParent(null);\r\n\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Root has two children\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Find the minimum of the Right Subtree of the Node to delete to use as the replacement\r\n\t\t\t\tNode minimum = findMinimum(current.getRightChild());\r\n\t\t\t\t\r\n\t\t\t\t// Copy the String from the minimum Node to the original Node we were supposed to delete\r\n\t\t\t\tcurrent.setName(minimum.getName());\r\n\t\t\t\t\r\n\t\t\t\t// Delete what used to be the minimum from the Tree\r\n\t\t\t\t// The minimum is the right child of its parent\r\n\t\t\t\tif(minimum.getParent().getRightChild() == minimum)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Minimum by definition cannot have a left child, however:\r\n\t\t\t\t\t// The minimum has no children\r\n\t\t\t\t\tif(minimum.getRightChild() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Just delete the minimum\r\n\t\t\t\t\t\tminimum.getParent().setRightChild(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// The minimum has a right child\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Delete the minimum but connect its child and its parent\r\n\t\t\t\t\t\tminimum.getParent().setRightChild(minimum.getRightChild());\r\n\t\t\t\t\t\tminimum.getRightChild().setParent(minimum.getParent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t\t}\r\n\t\t\t\t// The minimum is the left child of its parent\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Minimum by definition cannot have a left child, however:\r\n\t\t\t\t\t// The minimum has no children\r\n\t\t\t\t\tif(minimum.getRightChild() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Just delete the minimum\r\n\t\t\t\t\t\tminimum.getParent().setLeftChild(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// The minimum has a right child\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Delete the minimum but connect its child and its parent\r\n\t\t\t\t\t\tminimum.getParent().setLeftChild(minimum.getRightChild());\r\n\t\t\t\t\t\tminimum.getRightChild().setParent(minimum.getParent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}// END special root case\r\n\t\t// Deleting any other Node besides the root\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Node to delete has no children (aka is a leaf)\r\n\t\t\tif(current.isLeaf())\r\n\t\t\t{\r\n\t\t\t\t// Delete the Node by finding out what type of child it is\r\n\t\t\t\t// Node is a left child\r\n\t\t\t\tif(current.getParent().getLeftChild() == current)\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getParent().setLeftChild(null);\r\n\t\t\t\t}\r\n\t\t\t\t// Node is a right child\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getParent().setRightChild(null);\r\n\t\t\t\t}\r\n\t\t\t\t// Node was deleted so adjust the counter accordingly\t\r\n\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Node to delete only has a left child\r\n\t\t\telse if(current.getRightChild() == null)\r\n\t\t\t{\r\n\t\t\t\t// Connect the Node to delete's parent and left child\r\n\t\t\t\t// Need to first find out what type of child the Node to delete is\r\n\t\t\t\t// Node is a left child\r\n\t\t\t\tif(current.getParent().getLeftChild() == current)\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getLeftChild().setParent(current.getParent());\r\n\t\t\t\t\tcurrent.getParent().setLeftChild(current.getLeftChild());\r\n\t\t\t\t}\r\n\t\t\t\t// Node is a right child\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getLeftChild().setParent(current.getParent());\r\n\t\t\t\t\tcurrent.getParent().setRightChild(current.getLeftChild());\r\n\t\t\t\t}\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Node to delete only has a right child\r\n\t\t\telse if(current.getLeftChild() == null)\r\n\t\t\t{\r\n\t\t\t\t// Connect the Node to delete's parent and right child\r\n\t\t\t\t// Need to first find out what type of child the Node to delete is\r\n\t\t\t\t// Node is a left child\r\n\t\t\t\tif(current.getParent().getLeftChild() == current)\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getRightChild().setParent(current.getParent());\r\n\t\t\t\t\tcurrent.getParent().setLeftChild(current.getRightChild());\r\n\t\t\t\t}\r\n\t\t\t\t// Node is a right child\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getRightChild().setParent(current.getParent());\r\n\t\t\t\t\tcurrent.getParent().setRightChild(current.getRightChild());\r\n\t\t\t\t}\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Node to delete has two children\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Find the minimum of the Right Subtree of the Node to delete to use as the replacement\r\n\t\t\t\tNode minimum = findMinimum(current.getRightChild());\r\n\t\t\t\t\r\n\t\t\t\t// Copy the String from the minimum Node to the Node we were supposed to delete\r\n\t\t\t\tcurrent.setName(minimum.getName());\r\n\t\t\t\t\r\n\t\t\t\t// Delete what used to be the minimum from the Tree\r\n\t\t\t\t// The minimum is the right child of its parent\r\n\t\t\t\tif(minimum.getParent().getRightChild() == minimum)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Minimum by definition cannot have a left child, however:\r\n\t\t\t\t\t// The minimum has no children\r\n\t\t\t\t\tif(minimum.getRightChild() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Just delete the minimum\r\n\t\t\t\t\t\tminimum.getParent().setRightChild(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// The minimum has a right child\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Delete the minimum but connect its child and its parent\r\n\t\t\t\t\t\tminimum.getParent().setRightChild(minimum.getRightChild());\r\n\t\t\t\t\t\tminimum.getRightChild().setParent(minimum.getParent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t\t}\r\n\t\t\t\t// The minimum is the left child of its parent\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Minimum by definition cannot have a left child, however:\r\n\t\t\t\t\t// The minimum has no children\r\n\t\t\t\t\tif(minimum.getRightChild() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Just delete the minimum\r\n\t\t\t\t\t\tminimum.getParent().setLeftChild(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// The minimum has a right child\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Delete the minimum but connect its child and its parent\r\n\t\t\t\t\t\tminimum.getParent().setLeftChild(minimum.getRightChild());\r\n\t\t\t\t\t\tminimum.getRightChild().setParent(minimum.getParent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}// END of deleting any case except for Root\r\n\t\t\r\n\t\t// Balance the tree only if necessary - the current depth of the tree is greater than what it should be based on \r\n\t\t// the total amount of Nodes in the tree\r\n\t\tif(depth() > howManyLevels())\r\n\t\t{\r\n\t\t\tbalance();\r\n\t\t}\r\n\t\t// A Node was deleted so return true\r\n\t\treturn true;\r\n\t}", "public void remove(String name);", "public static Object remove(String name) {\n PersistentRootEntry entry = (PersistentRootEntry)Native.getPersistentMemoryTable();\n while (entry != null) {\n String ename = entry.name;\n if (ename != null && ename.equals(name)) {\n Object o = entry.value;\n entry.name = null;\n entry.value = null;\n return o;\n }\n entry = entry.next;\n }\n return null;\n }", "public void removeLevel(String name) {\n levels.remove(name);\n }", "public Node removeNamedItem(String name)\n throws DOMException {\n return internalRemoveNamedItem(name, true);\n }", "public void removeChildByName(String n) {\n\t\tfor(int i=0; i<children.size(); i++)\n\t\t\tif(getChild(i).name.equals(n)) children.removeElementAt(i);\n\t}", "public T remove(String name) {\n\t\tint idx = indexOf(name, 0);\n\t\tif (idx != -1)\n\t\t\treturn remove(idx);\n\t\treturn null;\n\t}", "void remove(String name);", "void remove(String name);", "public static Node delete (BST bst, String name){\n\t\tNode bstRoot = bst.getRoot();\n\t\tNode deletedNode = findByName(bstRoot, name); // The node to be removed from the bst.\n\t\tNode substituteNode = floorOrCeiling(deletedNode); // The substitute node for the removed one.\n\t\t\n\t\t\n\t\tSystem.out.println(\"\\nThe node to be deleted:\");\n\t\tSystem.out.println(deletedNode);\n\n\t\tSystem.out.println(\"\\nThe substitute for the deleted node:\");\n\t\tSystem.out.println(substituteNode);\n\t\t\n\t\t/* If the node to be removed is an external node, which has no children nodes,\n\t\t then there is no need for the substitute node. Thus, we can simply set the nodes\n\t\t that point to the external nodes to null to remove the node.\n\t\t*/\n\t\tif ((deletedNode.getRight()==null)&&(deletedNode.getLeft()==null)){\n\t\t\tif(deletedNode.getName().compareTo(deletedNode.getParent().getName())<0)\n\t\t\t\tdeletedNode.getParent().setLeft(null);\t\t\t\n\t\t\telse\n\t\t\t\tdeletedNode.getParent().setRight(null);\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t\t\n\t\t\treturn bstRoot;\n\t\t}\n\t\t\n\t\t/* If the node to be removed is not a root node, we'll apply the general approach.\n\t\t*/\n\t\tif (deletedNode.getParent()!=null){\n\n\t\t\t/* If the name of the parent node of the substitute node precedes the one of the substitute,\n\t\t\t * then, set the right child of the parent node to a null unless the substitute node is a child\n\t\t\t * of the deleted node.\n\t\t\t */\n\t\t\tif(substituteNode.getParent().getName().compareTo(substituteNode.getName())<0)\t\t\t\n\t\t\t\tif(substituteNode == deletedNode.getRight())\n\t\t\t\t\tsubstituteNode.getParent().setRight(substituteNode.getRight());\n\t\t\t\telse\t\n\t\t\t\tsubstituteNode.getParent().setRight(null);\n\t\t\t\n\t\t\t/* If the name of the parent node of the substitute node succeeds the one of the substitute,\n\t\t\t * then, set the left child of the parent node to a null unless the substitute node is a child\n\t\t\t * of the deleted node.\n\t\t\t */\n\t\t\telse\n\t\t\t\tif(substituteNode == deletedNode.getLeft())\n\t\t\t\t\tsubstituteNode.getParent().setLeft(substituteNode.getLeft());\n\t\t\t\telse\n\t\t\t\t\tsubstituteNode.getParent().setLeft(null);\n\t\t\t\n\t\t\t\n\t\t\t/* If the name of the parent node of the deleted node succeed the one of the substitute,\n\t\t\t * then, set substitute node as the left child of the parent node of the deleted node.\n\t\t\t * Otherwise, set the substitute to the right child.\n\t\t\t */\n\t\t\tif(deletedNode.getParent().getName().compareTo(substituteNode.getName())>0)\n\t\t\t\tdeletedNode.getParent().setLeft(substituteNode);\n\t\t\t\t\n\t\t\telse\n\t\t\t\tdeletedNode.getParent().setRight(substituteNode);\t\t\t\n\t\t\t\n\n\t\t\t/* Duplicates the binding that the deleted node previously had.\n\t\t\t */\n\t\t\tsubstituteNode.setLeft(deletedNode.getLeft());\n\t\t\tsubstituteNode.setRight(deletedNode.getRight());\n\t\t\tsubstituteNode.setParent(deletedNode.getParent());\n\t\t\t\n\t\t\t\n\t\t\t/* If the deleted node has any child, then set the substitute node as their parent node.\n\t\t\t */\n\t\t\tif (deletedNode.getRight()!=null)\n\t\t\t\tdeletedNode.getRight().setParent(substituteNode);\n\t\t\t\n\t\t\tif (deletedNode.getLeft()!=null)\n\t\t\tdeletedNode.getLeft().setParent(substituteNode);\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t}\t\n\t\t/* If the node to be removed is a root node, we'll approach a bit differently.\n\t\t*/\t\t\t\n\t\telse{\n\t\t\t/* Sets the child node of the parent of the substitute one to null.\n\t\t\t*/\t\t\t\n\t\t\tif(substituteNode.getParent().getName().compareTo(substituteNode.getName())<0)\n\t\t\t\tsubstituteNode.getParent().setRight(null);\n\t\t\telse\n\t\t\t\tsubstituteNode.getParent().setLeft(null);\n\t\t\t\n\t\t\t/* Duplicates the binding that the deleted node previously had without setting the parent node.\n\t\t\t */\n\t\t\tsubstituteNode.setLeft(deletedNode.getLeft());\n\t\t\tsubstituteNode.setRight(deletedNode.getRight());\n\t\t\t\n\t\t\t\n\t\t\t/* If the deleted node has any child, then set the substitute node as their parent node.\n\t\t\t*/\t\t\t\n\t\t\tif (deletedNode.getRight()!=null)\n\t\t\t\tdeletedNode.getRight().setParent(substituteNode);\n\t\t\t\n\t\t\tif (deletedNode.getLeft()!=null)\n\t\t\tdeletedNode.getLeft().setParent(substituteNode);\t\n\t\t\t\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t\t\n\t\t\tSystem.out.println(\"\\nThe node \" + deletedNode + \" is removed from the tree successfully\\n\");\n\t\t\t\n\t\t\treturn substituteNode;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\nThe node \" + deletedNode + \" is removed from the tree successfully\\n\");\n\n\n\t\treturn bstRoot;\n\t\t\n\t}", "public Node remove(String name) {\n\t\tif (name.equalsIgnoreCase(\"Admin\")) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif (head != null) {\n\t\t\tNode current = head;\n\t\t\tNode temp = null;\n\t\t\tif (current.user.getUsername().equals(name) || current.user.getName().equalsIgnoreCase(name)) {\n\t\t\t\ttemp = current;\n\t\t\t\thead = current.next;\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t\t\n\t\t\twhile (current.next != null) {\n\t\t\t\tif (current.next.user.getUsername().equals(name) || current.next.user.getName().equalsIgnoreCase(name)) {\n\t\t\t\t\ttemp = current.next;\n\t\t\t\t\tcurrent.next = current.next.next;\n\t\t\t\t\treturn temp; \n\t\t\t\t}\n\t\t\t\tcurrent = current.next;\n\t\t\t}\n\t\t} \n\t\treturn null;\n\t}", "public void remove(final String name) {\r\n\t\tremove(names.indexOf(name));\r\n\t}", "public void removeByname(java.lang.String name)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "void remove(String name) throws Exception;", "void removePathItem(String name);", "public abstract boolean remove(String name);", "public void delete(String name)\r\n\t{\r\n\t\tOntResource res = this.obtainOntResource(name);\r\n\t\tres.remove();\r\n\t}", "public boolean remove(String name) {\n LinkedNode current = head;\n while (current != null && !current.value().getName().equals(name)) {\n current = current.next();\n }\n if (current != null) {\n if (current.previous() != null) {\n current.previous().setNext(current.next());\n } \n else {\n head = current.next();\n }\n if (current.next() != null) {\n current.next().setPrevious(current.previous());\n } \n else {\n tail = current.previous();\n }\n length--;\n return true;\n }\n return false;\n }", "boolean remove(String name);", "public void removeModule(String name){\n\t\tModule m = null;\n\t\tfor(Module mod: modules){\n\t\t\tif(mod.getName().matches(name)){\n\t\t\t\tm = mod;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(m!=null){\n\t\t\tlayer.removeChild(m);\n\t\t\tmodules.remove(m);\n\t\t}\n\t}", "public void removePatient(String name){\r\n current = front;\r\n afterCurrent = front.getNext();\r\n \r\n if (current.getPatient().getName().trim().equalsIgnoreCase(name)){\r\n front = afterCurrent;\r\n current = null;\r\n counter--;\r\n }\r\n else {\r\n while (!afterCurrent.getPatient().getName().trim().equalsIgnoreCase(name)){\r\n afterCurrent = afterCurrent.getNext();\r\n current = current.getNext();\r\n }\r\n if (afterCurrent.getNext() == null){\r\n current.setNext(null);\r\n back = current;\r\n afterCurrent = null;\r\n counter--;\r\n }\r\n else{\r\n current.setNext(afterCurrent.getNext());\r\n afterCurrent = null;\r\n counter--;\r\n }\r\n }\r\n }", "@Override\n\tpublic void delete(String name) {\n\t\tdocument.removeChild(document.getElementsByTagName(name).item(0));\n\t\tsaveDocument();\n\t}", "Node safeRemoveNamedItemNS(String namespaceURI, String name) {\n return internalRemoveNamedItemNS(namespaceURI, name, false);\n }", "public void remove(String item) {\n synchronized(this) {\n _treeSet.remove(item);\n }\n }", "public void deleteSelectedAccount(String name){\n DatabaseReference dR = FirebaseDatabase.getInstance().getReference(\"user_information\").child(name);\n dR.getParent().child(name).removeValue();\n }", "public void unsetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NAME$8, 0);\n }\n }", "public static void removeChildren(Node node, String name) {\r\n if (node == null)\r\n return;\r\n\r\n for (Node item : getChildrenByTagName(node, name)) {\r\n node.removeChild(item);\r\n }\r\n }", "public void remove(int k) throws IOException {\n root = removeHelper(root, k);\r\n }", "public void remove(ResourceLocation name) {\n data.remove(name.toString());\n }", "public void wsdelete_node(String name) throws HibernateException \r\n\t\t\t\t{ \r\n\t\t\t\t\tNode node_del = null; \r\n\t\t\t\t\tString i=null;\r\n\t\t\t\t\tlong id_node=0;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t try \r\n\t\t\t\t\t { \r\n\t\t\t\t\t iniciaOperacion(); \r\n\r\n\t\t\t\t\t i= sesion.createQuery(\"SELECT u.id_node FROM Node u WHERE u.node_name ='\"+name+\"'\").uniqueResult().toString();\r\n\t\t\t\t\t \t //una vez encontrado el id del user puedo buscarlo\r\n\t\t\t\t\t \t id_node= Integer.parseInt(i);\r\n\t\t\t\t\t \t node_del = (Node) sesion.get(Node.class, id_node); \t \r\n\t\t\t\t\t sesion.delete(node_del); //le pasamos todo el objeto a eliminar\r\n\t\t\t\t\t tx.commit(); \r\n\t\t\t\t\t } catch (HibernateException he) \r\n\t\t\t\t\t { \r\n\t\t\t\t\t manejaExcepcion(he); \r\n\t\t\t\t\t throw he; \r\n\t\t\t\t\t } finally \r\n\t\t\t\t\t { \r\n\t\t\t\t\t sesion.close(); \r\n\t\t\t\t\t } \r\n\t\t\t\t\t }", "public BinaryNode removeNode(BinaryNode node){\n if(isLeaf(node)){//base case\n BinaryNode parent = (BinaryNode) node.getParent();\n if(parent == null){\n root = null;\n }\n else{\n parent.removeChild(node);\n }\n size--;\n return parent;\n }\n BinaryNode lower = descendant(node);\n promote(lower, node);\n return removeNode(lower);\n }", "public Himmelskoerper remove(String name) {\r\n\t\tHimmelskoerper himmelskoerper = null;\r\n\t\tfor (Himmelskoerper hTemp : ladung.keySet()) {\r\n\t\t\tif (hTemp.getName().equals(name)) {\r\n\t\t\t\thimmelskoerper = hTemp;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (himmelskoerper != null) {\r\n\t\t\tthis.aktuelleLast -= this.ladung.get(himmelskoerper).getGewicht();\r\n\t\t\tthis.ladung.remove(himmelskoerper);\r\n\t\t}\r\n\r\n\t\treturn himmelskoerper;\r\n\t}", "final protected Node internalRemoveNamedItem(String name, boolean raiseEx){\n \tif (isReadOnly()) {\n throw\n new DOMExceptionImpl(DOMException.NO_MODIFICATION_ALLOWED_ERR,\n \"DOM001 Modification not allowed\");\n }\n \tint i = findNamePoint(name,0);\n \tif (i < 0) {\n if (raiseEx) {\n throw new DOMExceptionImpl(DOMException.NOT_FOUND_ERR,\n \"DOM008 Not found\");\n } else {\n return null;\n }\n }\n\n NodeImpl n = (NodeImpl)nodes.elementAt(i);\n // If there's a default, add it instead\n if (hasDefaults()) {\n NamedNodeMapImpl defaults =\n ((ElementImpl) ownerNode).getDefaultAttributes();\n Node d;\n if (defaults != null && (d = defaults.getNamedItem(name)) != null\n && findNamePoint(name, i+1) < 0) {\n \n NodeImpl clone = (NodeImpl)d.cloneNode(true);\n clone.ownerNode = ownerNode;\n clone.isOwned(true);\n clone.isSpecified(false);\n nodes.setElementAt(clone, i);\n } else {\n nodes.removeElementAt(i);\n }\n } else {\n nodes.removeElementAt(i);\n }\n\n // changed(true);\n\n // remove owning element\n n.ownerNode = ownerNode.ownerDocument();\n n.isOwned(false);\n // make sure it won't be mistaken with defaults in case it's reused\n n.isSpecified(true);\n return n;\n\n }", "public void rm(String name) throws IsDirectoryException, NoSuchFileException\n\t{\n\t\tIterable<Position<FileElement>> toCheck = fileSystem.children(currentFileElement);\n\t\tif (toCheck != null)\n\t\t{\n\t\t\tfor (Position<FileElement> fe : toCheck )\n\t\t\t{\n\t\t\t\tif (fe.toString().equals(name) && fe.getValue().isDirectory() )\n\t\t\t\t{\n\t\t\t\t\tthrow new IsDirectoryException();\n\t\t\t\t}\n\t\t\t\tif (fe.toString().equals(name) && fe.getValue().isDirectory() == false)\n\t\t\t\t{\n\t\t\t\t\tfileSystem.remove(fe);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {throw new NoSuchFileException();}\n\t}", "void deleteTree(TreeNode node) \n {\n root = null; \n }", "public T remove(T x) {\n\t\tEntry<T> node = getSplay(find(x));\n\t\tT result;\n\t\tresult = node.element;\n\t\tif(node == null)\n\t\t\treturn null;\n\t\tsplay(node);\n\t\tif(node.left != null && node.right != null) {\n\t\t\tEntry<T> tmp = getSplay(node.left);\n\t\t\twhile(tmp.right != null)\n\t\t\t\ttmp = getSplay(tmp.right);\n\t\t\t\n\t\t\ttmp.right = node.right;\n\t\t\tgetSplay(node.right).parent = tmp;\n\t\t\tgetSplay(node.left).parent = null;\n\t\t\troot = node.right;\n\t\t\t \n\t\t}\n\t\telse if(node.right != null) {\n\t\t\tgetSplay(node.right).parent = null;\n\t\t\troot = node.right;\n\t\t}\n\t\telse if(node.left != null) {\n\t\t\tgetSplay(node.left).parent = null;\n\t\t\troot = node.left;\n\t\t}\n\t\telse {\n\t\t\troot = null;\n\t\t}\n\t\tnode.parent = null;\n node.left = null;\n node.right = null;\n node = null;\n return result;\n\t}", "@Override\r\n\tpublic void deleteByName(String name) {\n\t\tint del = name.toUpperCase().charAt(0) - 'A';\r\n\t\tfor (int i = 0; i < array[del].size(); i++) {\r\n\t\t\tif (array[del].get(i).name == name) {\r\n\t\t\t\tarray[del].remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void removeChild(WSLNode node) {children.removeElement(node);}", "public final void removeFromChest(String name) {\n chestCharacters.remove(name);\n }", "void removeClass(final String name);", "public void unsetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NAME$0, 0);\n }\n }", "public void unsetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NAME$0, 0);\n }\n }", "public void unsetName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(NAME$0, 0);\r\n }\r\n }", "public void delete() {\n this.root = null;\n }", "public static void removeVisitor(String name){\n\t\t\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tvisitorListMap.remove(name);\n\t\t\t\tvisitorListModel.removeElement(name);\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public void removeTerm(String name) {\n ArrayList<String> temp = new ArrayList<>();\n\n for (Term t: listOfTerms) {\n String termName = t.getTermName();\n temp.add(termName);\n }\n\n int index = temp.indexOf(name);\n listOfTerms.remove(index);\n }", "@Override\n\tpublic TreeNode remove() {\n\t\treturn null;\n\t}", "public void removeFile(String filename){\r\n\t\t//take it out of the input node\r\n\t\tFileInfo f = (FileInfo) input.getFirstChild();\r\n\t\t//go through all the files of the input node\r\n\t\twhile(f != null){\r\n\t\t\t//check the file\r\n\t\t\tif(filename.equals(f.toString())){\r\n\t\t\t\t\t//remove the node\r\n\t\t\t\t\tf.removeFromParent();\r\n\t\t\t\t\t//notify the tree that the node\r\n\t\t\t\t\t//...has changed\r\n\t\t\t\t\tif(parentTree != null)\r\n\t\t\t\t\t\tparentTree.nodeStructureChanged(input);\r\n\t\t\t}\r\n\t\t\t//check the rest of the files\r\n\t\t\tf = (FileInfo)f.getNextSibling();\r\n\t\t}\r\n\t\t\r\n\t\t//take it out of the output note\r\n\t\tf = (FileInfo) output.getFirstChild();\r\n\t\t\r\n\t\twhile(f != null){\r\n\t\t\tif(filename.equals(f.toString())){\r\n\t\t\t\tf.removeFromParent();\r\n\t\t\t\tif(parentTree != null)\r\n\t\t\t\t\tparentTree.nodeStructureChanged(output);\r\n\t\t\r\n\t\t\t}\r\n\t\t\tf = (FileInfo)f.getNextSibling();\r\n\t\t}\r\n\t\t\r\n\t}", "Object removeTemp(String name);", "public void removeGroup(String name) {\n if(isGroup(name) == true) {\n /* Now remove the tab from the tabbedpain */\n tbMain.remove((JPanel)grouptabs.get(name));\n \n /* Remove the group from the hashmap */\n grouptabs.remove(name);\n }\n }", "public T remove(Node<T> u) {\n\t\tif (u == nil || u == null)\n\t\t\treturn null;\n\n\t\tT element = u.x;\n\n\t\t// merge children of removed node\n\t\tNode<T> subroot = merge(u.left, u.right);\n\t\tif (subroot != nil)\n\t\t\tsubroot.parent = u.parent;\n\n\t\tif (u == r) // root was removed\n\t\t\tu = subroot;\n\t\telse if (u.parent.left == u)\n\t\t\tu.parent.left = subroot;\n\t\telse\n\t\t\tu.parent.right = subroot;\n\t\tn--;\n\t\treturn element;\n\t}", "public void deleteByName(String name){\r\n repository.deleteByName(name);\r\n }", "public Node removeFromChain();", "public void remove(String name)\n/* */ {\n/* 1177 */ for (int i = 0; i < this.attributes.size(); i++) {\n/* 1178 */ XMLAttribute attr = (XMLAttribute)this.attributes.elementAt(i);\n/* 1179 */ if (attr.getName().equals(name)) {\n/* 1180 */ this.attributes.removeElementAt(i);\n/* 1181 */ return;\n/* */ }\n/* */ }\n/* */ }", "public void remove() {\n removeNode(this);\n }", "public void removeFromParent();", "public String remove()\n\t{\n\t\tString result = null;\n\t\tif (pointer > 0)\n\t\t{\n\t\t\tif (pointer == 1)\n\t\t\t{\n\t\t\t\tpointer--;\n\t\t\t\tresult = data[pointer];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tString oldRoot = data[0];\n\t\t\t\tString oldLast = data[pointer - 1];\n\t\t\t\tdata[0] = oldLast;\n\t\t\t\tdata[pointer - 1] = oldRoot;\n\t\t\t\tpointer--;\n\t\t\t\tresult = data[pointer];\n\t\t\t\tint parent = 0;\n\t\t\t\t//left child\n\t\t\t\tint childLeft = parent * 2 + 1;\n\n\t\t\t\twhile (childLeft < pointer)\n\t\t\t\t{\n\t\t\t\t\t//right child\n\t\t\t\t\tint childRight = parent * 2 + 2;\n\t\t\t\t\t//assume the mininum of the two children is left child\n\t\t\t\t\tint childMin = childLeft;\n\t\t\t\t\tif (childRight < pointer)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (smallerThan(childRight, childLeft))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchildMin = childRight;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (smallerThan(childMin, parent))\n\t\t\t\t\t{\n\t\t\t\t\t\t//downheap\n\t\t\t\t\t\tswap(childMin, parent);\n\t\t\t\t\t\tparent = childMin;\n\t\t\t\t\t\tchildLeft = parent * 2 + 1;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public void removeWorld(String name){\n worlds.remove(getWorld(name));\n }", "abstract AbstractTree<T> removeSubtree(Node<T> subtreeRoot);", "protected void xremove(Node<T> u) {\n\t\tif (u == r) {\n\t\t\tremove();\n\t\t} else {\n\t\t\tif (u == u.parent.left) {\n\t\t\t\tu.parent.left = nil;\n\t\t\t} else {\n\t\t\t\tu.parent.right = nil;\n\t\t\t}\n\t\t\tu.parent = nil;\n\t\t\tr = merge(r, u.left);\n\t\t\tr = merge(r, u.right);\n\t\t\tr.parent = nil;\n\t\t\tn--;\n\t\t}\n\t}", "public void Remove(String depName) {\n\t\tcurr = head;\n\t\tdNode temp = curr;\n\t\twhile (curr != null && !curr.data.name.equals(depName)) {\n\t\t\ttemp = curr;\n\t\t\tcurr = curr.next;\n\t\t\tdepCount--;\n\t\t}\n\t\ttry {\n\t\t\tif (curr.data.name.equals(head.data.name)) {\n\t\t\t\thead = head.next;\n\t\t\t} else if (curr.data.name.equals(depName)) {\n\t\t\t\ttemp.next = curr.next;\n\t\t\t} else { // could not find\n\t\t\t\tSystem.out.println(\"Could not find Node @ Remove Function\");\n\t\t\t}\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.out.println(\"Sorry Canoot Delete What not Exists: DepName \" + depName);\n\t\t}\n\t}", "public void removeMember (String name) {\r\n\t\tgetMemberList().remove(name);\r\n\t\tsaveMemberList();\r\n\t}", "private void remove(String name) {\n if (team.getPokemon(name) != null) {\n System.out.println(\"You are going to remove \" + name);\n System.out.println(\"This process is inrevertable, are you sure? [y/n]\");\n String command = input.next();\n if (command.equals(\"y\") || command.equals(\"yes\")) {\n team.remove(name);\n System.out.println(name + \" has been removed form your team\");\n System.out.println(\"You currently have \" + team.count() + \" pokemons in your team\");\n }\n } else {\n System.out.println(name + \" is not found within your team\");\n }\n }", "public void remove( AnyType x )\r\n\t{\r\n\t\troot = remove( x, root );\r\n\t}", "@Override\n\tpublic Object remove(String name) {\n\t\tMap<String, Object> scope = threadLocal.get();\n\t\treturn scope.remove(name);\n\t}", "public void removeBranch(String branchName) {\n File removedBranch = new File(Main.ALL_BRANCHES, branchName);\n if (!removedBranch.exists()) {\n System.out.println(\"A branch with that name does not exist.\");\n } else {\n if (branchName.equals(Utils.readObject(HEADNAME, String.class))) {\n System.out.println(\"Cannot remove the current branch.\");\n } else {\n removedBranch.delete();\n }\n }\n }", "@Override\n\tpublic void eliminarUsuaris(String name) {\n\t\treposUsuarios.deleteById(name);\n\t}", "public boolean removeNodes(String name)\n {\n if (nodes != null && name != null)\n {\n List<ConfigurationNode> lst = namedNodes.remove(name);\n if (lst != null)\n {\n detachNodes(lst);\n nodes.removeAll(lst);\n return true;\n }\n }\n return false;\n }", "@Override\n\tpublic void deleteByName(String name) {\n\t\t\n\t}", "public void rmBranch(String branchName) {\n\t\tif (branchName.equals(myHead.branchName())) {\n\t\t\tSystem.out.println(\"Cannot remove the current branch.\");\n\t\t} else if (myBranch.containsKey(branchName)) {\n\t\t\tmyBranch.remove(branchName);\n\t\t} else {\n\t\t\tSystem.out.println(\"A branch with that name does not exist.\");\n\t\t}\n\t\tSerialization();\n\t}", "public static void doRemove(String fileName) {\n Stage fromSave = Utils.readObject(STAGED_FILES,\n Stage.class);\n HashSet<String> stagedFiles = fromSave.getStagedFiles();\n Commit currHead = Utils.readObject(TREE_DIR, Tree.class).\n getCurrHead();\n if (stagedFiles.contains(fileName) && currHead.getBlobs().\n containsKey(fileName)) {\n File stagedFile = Utils.join(STAGE_DIR, fileName);\n addToStageRemoval(fileName);\n removeFromWorking(fileName);\n stagedFile.delete();\n\n stagedFiles.remove(fileName);\n Stage.save(fromSave);\n } else if (stagedFiles.contains(fileName) && !currHead.getBlobs().\n containsKey(fileName)) {\n File stagedFile = Utils.join(STAGE_DIR, fileName);\n stagedFile.delete();\n\n stagedFiles.remove(fileName);\n Stage.save(fromSave);\n } else if (!stagedFiles.contains(fileName) && currHead.getBlobs().\n containsKey(fileName)) {\n if (!Utils.filesSet(WORKING_DIR).contains(fileName)) {\n File removedFile = Utils.join(STAGE_RM_DIR, fileName);\n try {\n removedFile.createNewFile();\n } catch (IOException ignored) {\n return;\n }\n String contents = currHead.getBlobs().get(fileName).\n getContents();\n Utils.writeContents(removedFile, contents);\n } else {\n addToStageRemoval(fileName);\n removeFromWorking(fileName);\n }\n } else {\n System.out.println(\"No reason to remove the file.\");\n System.exit(0);\n }\n }", "public abstract void removedFromWidgetTree();", "public void removeName(Name arg0) {\n\n\t}", "public void removeNode()\n\t{\n\t\tif (parent != null)\n\t\t\tparent.removeChild(this);\n\t}", "public boolean delete(String name){\n\t\t// this first line is given in the assignment file\n\t\tBankAccount toRemove = lookUp(name);\n\t\t// complete this:\n\t\tif(toRemove == null)\t// Verifying the account name exists in names tree, returns false if not\n\t\t\treturn false;\n\n\t\tint numberToRemove = toRemove.getAccountNumber();\n\t\tif(lookUp(numberToRemove) == null)\t// Verifying the account number exists in account numbers tree, returns false if not\n\t\t\treturn false;\n\n\t\t// Removing the account from both trees:\n\t\tnamesTree.remove(toRemove);\n\t\taccountNumbersTree.remove(toRemove);\n\t\treturn true;\n\t}", "public abstract void removeChild(Node node);", "private void removeWord(Node root,String word,int index){\n if(index == word.length()){ //not word.length()-1 because starts from empty root\n //visiting the last Node to Remove\n //but need to remove later when com back to its paren root.removeChild(ch);\n //cause need to check weather node has children or not\n System.out.println(root.value);\n root.isEndOfWord = false; //CARE can only physically 'E' but CAR Node R has E children so R.isEndOfWord =false\n return;\n }\n\n //1st get the 'ch' at the index of th word\n var ch = word.charAt(index);\n\n //get the child Node of ch in root/children\n var child = root.getChild(ch);\n\n //if word doesn't exist/ no any Characters\n if(child == null) return;\n\n //post order traversal visiting child 1st\n removeWord(child,word,index+1); //recursively remove/ go to the next indexes of the word\n\n //then visit root to remove last index\n System.out.println(root.value);\n // if the child doesn't have any children\n // or no any characters related to end of the removing word\n //ex: cant remove word 'CAT' cause 'CATEGORY' exist.\n //if doesnt have any children and it's not the end of another word, physically remove it\n if(!child.hasChildren() && !child.isEndOfWord)\n root.removeChild(ch); //CARE can only physically 'E' but CAR Node R has E children\n\n }", "public void removeChildAt(int index) {children.removeElementAt(index);}", "public E remove(K k)\n\t{\n\t\tE temp = searchhelp(root, k); // find it\n\t\tif (temp != null)\n\t\t{\n\t\t\troot = removehelp(root, k); // remove it\n\t\t\tnodecount--;\n\t\t}\n\t\treturn temp;\n\t}", "public UUID remove(String name) {\n\t\tUUID id = getId(name);\n\t\tif (id != null) {\n\t\t\tnames.remove(name);\n\t\t\tE t = dict.get(id);\n\t\t\tif (t != null) {\n\t\t\t\tlist.remove(t);\n\t\t\t} else {\n\t\t\t\tExits.Log.logp(Exits.Level.Warning, Exits.Common.Name, Exits.Common.Warning, \"Failed to remove unknown id {0}\", id);\n\t\t\t}\n\t\t\tdict.remove(id);\n\t\t\tConfig.serialize();\n\t\t}\n\t\treturn id;\n\t}", "private void deleteTree(tnode root){\n if (root != null)\n root = null;\n }", "public void removeOperation(String name)\n {\n nameToOperation.remove(name);\n }", "public boolean removeNode(Node n);", "public void delete(SplayNode n) {\n\t\t this.splay(n);\n\n\t\t SplayTree leftSubtree = new SplayTree();\n\t\t leftSubtree.root = this.root.left;\n\t\t if(leftSubtree.root != null)\n\t\t leftSubtree.root.parent = null;\n\n\t\t SplayTree rightSubtree = new SplayTree();\n\t\t rightSubtree.root = this.root.right;\n\t\t if(rightSubtree.root != null)\n\t\t rightSubtree.root.parent = null;\n\n\t\t if(leftSubtree.root != null) {\n\t\t \tSplayNode m = leftSubtree.maximum(leftSubtree.root);\n\t\t leftSubtree.splay(m);\n\t\t leftSubtree.root.right = rightSubtree.root;\n\t\t this.root = leftSubtree.root;\n\t\t }\n\t\t else {\n\t\t this.root = rightSubtree.root;\n\t\t }\n\t\t }", "public void removeEntry(String name) throws NotPresentException {\n\t\tString key = name.toUpperCase();\n\t\trequireKeyExists(key);\n\t\tentries.remove(key);\n\t}", "public void removeUsedPermission(final String name) {\n final List<Element> elementsToRemove = new LinkedList<Element>();\n for (final Element child : manifestElement.getChildren(ELEMENT_USES_PERMISSION)) {\n if (name.equals(child.getAttributeValue(ATTRIBUTE_NAME))) {\n elementsToRemove.add(child);\n }\n }\n\n for (final Element element : elementsToRemove) {\n removeElementAndPrefix(element);\n }\n }", "void unsetName();", "@SuppressWarnings(\"serial\")\n\tpublic void delGroup(final String name) throws Exception{\n\t\tUserRegistry ur = UserRegistry.findOrCreate(doc);\n\t\tGroups groups = Groups.findOrCreate(ur);\n\t\tgroups.deleteChildren(Group.TAG,new HashMap<String,String>(){{\n\t\t\tput(\"name\",name);\n\t\t}});\n\t}", "void remove(String group, String name);", "public void deleteMapName(String name){\n\t\tLinkedList<String> names=new LinkedList<String>();\n\t\t\n\t\tboolean present = false;\n\t\tFileReader r;\n\t\ttry {\n\t\t\tr = new FileReader (\"mapRecords.txt\");\n\t\t\tBufferedReader b = new BufferedReader (r);\n\t\t\tString s=b.readLine();\n\t\t\t\n\t\t\twhile(s!=null){\n\t\t\t\tif(s.equals(name))\n\t\t\t\t\tpresent =true; \n\t\t\t\t\n\t\t\t\tnames.add(s);\n\t\t\t\ts=b.readLine();\n\t\t\t\t\n\t\t\t}\n\n\t\t\tr.close();\n\t\t\tb.close();\n\t\t\t\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found\");\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//e.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.out.println(\"Can't read file\");\n\t\t}\n\t\t\n\n\t\tif (present){\n\t\t\tnames.remove(name);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tFileWriter w= new FileWriter(new File(\"mapRecords.txt\"));\n\t\t\t\tfor (String n: names){\n\t\t\t\t\tw.write(n+\"\\n\");\n\t\t\t\t\tw.write(System.lineSeparator())\t;\n\t\t\t\t}\t\n\t\t\t\tw.flush();\n\t\t\t\tw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t//e.printStackTrace();\n\t\t\t\tSystem.out.println(\"Can't write to the file\");\n\t\t\t}\n\t\t}\n\t\telse //there is nothing to remove the file is not present \n\t\t\treturn;\n\t\t\n\t}", "public void prune() {\n this.getTree().prune();\n }", "public void deleteNode ()\n {\n ConfigTreeNode node = _tree.getSelectedNode();\n ConfigTreeNode parent = (ConfigTreeNode)node.getParent();\n int index = parent.getIndex(node);\n ((DefaultTreeModel)_tree.getModel()).removeNodeFromParent(node);\n int ccount = parent.getChildCount();\n node = (ccount > 0) ?\n (ConfigTreeNode)parent.getChildAt(Math.min(index, ccount - 1)) : parent;\n if (node != _tree.getModel().getRoot()) {\n _tree.setSelectionPath(new TreePath(node.getPath()));\n }\n DirtyGroupManager.setDirty(group, true);\n }", "private void delete(String name) {\n File f = new File(name);\n if (f.exists()) {\n f.delete();\n }\n }", "@Override\n public boolean removeChild(String childName)\n {\n return children.removeNodes(childName);\n }", "public void remove(String name) {\n jobs.remove(name);\n }", "public void removeN(K k){\n root = removeVn(root, k);\n deleting = false;\n }", "void removeNode(ANode<T> a) {\n if (this.equals(a)) {\n this.remove();\n }\n else {\n this.next.removeNode(a);\n }\n }", "public static ActivityNode removeActivityNode(Activity activity, String name) {\n\t\tActivityNode actNode = (ActivityNode) getActivityNode(activity, name);\n\t\tif (actNode != null) {\n\t\t\tactivity.getNodes().remove(actNode);\n\t\t}\n\t\treturn actNode;\n\t}", "private static void delTree(BoardTree root) {\n if (root.children == null) return;\n for (BoardTree child : root.children) {\n delTree(child);\n }\n root.children.clear();\n root = null;\n }" ]
[ "0.7307859", "0.68984354", "0.6788459", "0.6782809", "0.67823744", "0.67672", "0.6688719", "0.66192174", "0.65556294", "0.65556294", "0.6445579", "0.63954365", "0.6339341", "0.63182926", "0.62926316", "0.6282362", "0.6244035", "0.62162894", "0.61633605", "0.6150773", "0.6130172", "0.6044295", "0.6032265", "0.60293466", "0.6023461", "0.6020307", "0.6016233", "0.60159516", "0.6008837", "0.6001354", "0.6000007", "0.5997103", "0.5995889", "0.5990253", "0.59435654", "0.59309626", "0.59222853", "0.59213996", "0.59155875", "0.59129417", "0.5910314", "0.58944845", "0.58944845", "0.58920544", "0.5871819", "0.58668077", "0.58535975", "0.5849865", "0.5847597", "0.5845526", "0.5842239", "0.5835354", "0.5831803", "0.5810674", "0.58098257", "0.58013475", "0.5789764", "0.5775431", "0.57748556", "0.57716006", "0.5766299", "0.576354", "0.57465404", "0.5725217", "0.5722214", "0.5715062", "0.57149434", "0.5710838", "0.57091296", "0.5706129", "0.5704293", "0.5703578", "0.57018334", "0.57000446", "0.56713617", "0.5669425", "0.5657771", "0.56467164", "0.56273776", "0.56232476", "0.56222165", "0.5618876", "0.560669", "0.5605191", "0.55836576", "0.5565728", "0.5559151", "0.5558573", "0.55584735", "0.55453783", "0.55397433", "0.55161554", "0.55136603", "0.55128556", "0.5511599", "0.5503703", "0.54933655", "0.54803544", "0.5466893", "0.5466859" ]
0.8003497
0
Rename the tree. This method does not change the root module's name only the identifier for the tree.
public void renameTree(String oldName, String newName) throws DuplicateNameException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeName(String name) {\n this.treeName = name;\n }", "protected void renameNode( String workspaceName,\n NodeKey key,\n Path newPath,\n Segment oldSegment,\n Name primaryType,\n Set<Name> mixinTypes ) {\n\n }", "private void renameRoot(String id, VJoint avatarAnimationRootJoint )\r\n {\r\n //ensure appropriate IDs: the Sid should be Hanim.HumanoidRoot; ID should be unique for this particular virtual human!\r\n \r\n avatarAnimationRootJoint.setId(Hanim.HumanoidRoot+\"_\"+id);\r\n avatarAnimationRootJoint.setSid(Hanim.HumanoidRoot);\r\n avatarAnimationRootJoint.setName(\"The \" + Hanim.HumanoidRoot +\" \"+id);\r\n }", "public void rename()\n\t{\n\t\t// get the object within the node\n\t\tObject string = this.getUserObject();\n\n\t\t// should always be a string, given the constructor\n\t\tif (string instanceof String)\n\t\t{\n\t\t\tstring = JOptionPane.showInputDialog(\"Enter a New Name\");\n\n\t\t\tif (string != null && string instanceof String)\n\t\t\t{\n\t\t\t\tthis.setUserObject(string);\n\t\t\t\tthis.name = (String) string;\n\t\t\t}\n\t\t}\n\t}", "private void renameTreeView(String value, TreeNode selectedNode, TreeNode parentNode) {\n VMResource resource = fileTreeNodeFactory.getResource(selectedNode);\n String tabId = selectedNode.getAttribute(\"UniqueId\");\n if (resource instanceof VMFile) {\n int index = value.lastIndexOf(\".\");\n if (index != -1) {\n String newBaseName = value.substring(0, index);\n String newExtension = value.substring(index + 1);\n resource.setName(newBaseName);\n ((VMFile) resource).setExtension(Extension.getByCode(newExtension));\n selectedNode.setIcon(((VMFile) resource).getExtension().getImgPath());\n } else {\n SC.warn(\"Extension is lost!\");\n return;\n }\n } else {\n resource.setName(value);\n }\n TreeNode treeNode;\n if (\"/\".equals(tree.getPath(parentNode))) {\n treeNode = fileTreeNodeFactory.getFileTreeNode(tree, rootId, resource);\n } else {\n treeNode = fileTreeNodeFactory.getFileTreeNode(tree, ((FileTreeNode) parentNode).getResource().getId(), resource);\n }\n if (tabId != null) {\n treeNode.setAttribute(\"UniqueId\", tabId);\n if (editorTabSet.getTab(tabId) != null) {\n editorTabSet.getTab(tabId).setTitle(getTabImgTitle(value, ((VMFile) resource).getExtension()));\n editorTabSet.getTab(tabId).setAttribute(\"ref\", resource.getId());\n editorTabSet.getTab(tabId).setAttribute(\"TabName\", value);\n }\n }\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }", "@Override\n\tpublic void rename(String newName) {\n\t\tint lastDot = newName.lastIndexOf('.');\n\t\tif (lastDot == -1) {\n\t\t\tclsInfo.changeShortName(newName);\n\t\t\treturn;\n\t\t}\n\t\tif (isInner()) {\n\t\t\taddWarn(\"Can't change package for inner class: \" + this + \" to \" + newName);\n\t\t\treturn;\n\t\t}\n\t\t// change class package\n\t\tString newPkg = newName.substring(0, lastDot);\n\t\tString newShortName = newName.substring(lastDot + 1);\n\t\tif (changeClassNodePackage(newPkg)) {\n\t\t\tclsInfo.changePkgAndName(newPkg, newShortName);\n\t\t} else {\n\t\t\tclsInfo.changeShortName(newShortName);\n\t\t}\n\t}", "public ProgramModule createRootModule(String treeName) throws DuplicateNameException;", "public void updateMapModuleName() {\n\t\tgetMapModule().rename();\n\t\taddToOrChangeInMapModules(getMapModule().toString(), getMapModule());\n\t\tsetMapModule(getMapModule(), getMapModule().getMode());\n\t}", "@FXML\n public void onRename(ActionEvent event) {\n try {\n folders.update(oldName.getText(), newName.getText());\n stage.close();\n tree.displayTree();\n } catch (SQLException ex) {\n errorRename.setText(ex.getMessage());\n }\n }", "private RestNodeModel renameNode(ContentModel node)\n {\n String newName = node.getName() + \"_updated\";\n JsonObject renameJson = Json.createObjectBuilder().add(\"properties\",\n Json.createObjectBuilder().add(\"cm:name\", newName)).build();\n return restClient.authenticateUser(testUser).withCoreAPI().usingNode(node).updateNode(renameJson.toString());\n }", "public void rename(String n){\n name = n;\r\n }", "private void changeGroupName() {\r\n //Added for Case#2445 - proposal development print forms linked to indiv sponsor, should link to sponsor hierarchy - Start\r\n //To check sponsor form is exists for the group,exists - group name is made non-editable\r\n boolean isFormExist = false;\r\n try{\r\n TreePath existTreepath = findEmptyGroup(sponsorHierarchyTree, sponsorHierarchyTree.getSelectionPath());\r\n if( existTreepath == null){\r\n isFormExist = isFormsExistInGroup(selectedNode.toString());\r\n }\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n if(isPrintingHierarchy && selectedNode.getLevel() == 1 && isFormExist){\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(CANNOT_RENAME_LEVEL1));\r\n \r\n }else {//CAse#2445 - End\r\n if(!selectedNode.getAllowsChildren() || selectedNode.isRoot() ) {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1251\"));\r\n return;\r\n }\r\n sponsorHierarchyTree.startEditingAtPath(selTreePath);\r\n }\r\n }", "public final void setTreeName(String treeName)\r\n {\r\n _treeName = treeName;\r\n setField(TREE, new SimpleString(treeName));\r\n\r\n }", "public void rename (String newName) throws Exception;", "public abstract void rename(String newName);", "public void testPackageRename2() throws Exception {\n IPackageFragment fragment = getRoot().createPackageFragment(\"org.test\", true, null);\n StringBuffer buf = new StringBuffer();\n buf.append(\"package org.test;\\n\");\n buf.append(\"public class A {\\n\");\n buf.append(\"}\\n\");\n ICompilationUnit cu1 = fragment.createCompilationUnit(\"A.java\", buf.toString(), true, null);\n setReadOnly(cu1);\n buf = new StringBuffer();\n buf.append(\"package org.test;\\n\");\n buf.append(\"public class B {\\n\");\n buf.append(\"}\\n\");\n fragment.createCompilationUnit(\"B.java\", buf.toString(), true, null);\n // not read only\n IPackageFragment fragment2 = getRoot().createPackageFragment(\"org.other\", true, null);\n buf = new StringBuffer();\n buf.append(\"package org.other;\\n\");\n buf.append(\"public class C extends org.test.A {\\n\");\n buf.append(\"}\\n\");\n ICompilationUnit cu3 = fragment2.createCompilationUnit(\"C.java\", buf.toString(), true, null);\n setReadOnly(cu3);\n RenameJavaElementDescriptor descriptor = RefactoringSignatureDescriptorFactory.createRenameJavaElementDescriptor(IJavaRefactorings.RENAME_PACKAGE);\n descriptor.setJavaElement(fragment);\n descriptor.setNewName(\"org.test2\");\n descriptor.setUpdateReferences(true);\n RefactoringStatus status = performRefactoring(descriptor);\n if (status != null)\n assertTrue(status.toString(), status.isOK());\n Collection<IPath> validatedEditPaths = RefactoringTestRepositoryProvider.getValidatedEditPaths(getRoot().getJavaProject().getProject());\n assertEquals(2, validatedEditPaths.size());\n assertTrue(validatedEditPaths.contains(cu1.getPath()));\n assertTrue(validatedEditPaths.contains(cu3.getPath()));\n }", "private void renameDirectory() {\n ProjectDirectory dir = (ProjectDirectory) viewer.getSelectedNode();\n String oldName = dir.toFile().getName();\n String newName = (String)\n JOptionPane.showInputDialog(\n viewer,\n \"Enter the new name of the directory:\",\n \"Rename directory\",\n JOptionPane.PLAIN_MESSAGE,\n null,\n null,\n oldName\n );\n \n if (newName != null && !oldName.equals(newName)) {\n if (!dir.changeName(newName)) {\n JOptionPane.showMessageDialog(\n viewer,\n \"Could not rename selected file!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE\n );\n } else {\n viewer.refresh();\n }\n }\n \n }", "private void renameFile() {\n ProjectFile file = (ProjectFile) viewer.getSelectedNode();\n String newName = (String)\n JOptionPane.showInputDialog(\n viewer,\n \"Enter the new name of the file:\",\n \"Rename file\",\n JOptionPane.PLAIN_MESSAGE,\n null,\n null,\n file.toFile().getName()\n );\n \n if (newName != null) {\n Project p = viewer.getCurrentProject();\n \n File oldFile = file.toFile();\n\n Buffer b = jEdit.getBuffer(oldFile.getAbsolutePath());\n if (b != null) {\n jEdit.closeBuffer(viewer.getView(),b);\n }\n \n File newFile = new File(oldFile.getParent() + File.separator + newName);\n if (!oldFile.renameTo(newFile)) {\n JOptionPane.showMessageDialog(\n viewer,\n \"Could not rename selected file!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE\n );\n }\n \n if (b != null) {\n jEdit.openFile(viewer.getView(),newFile.getAbsolutePath());\n }\n \n p.removeFile(file);\n p.importFile(new ProjectFile(newFile.getAbsolutePath()));\n }\n }", "public void rename(String newName)\n\t{\n\t\t// get the object within the node\n\t\tObject object = this.getUserObject();\n\n\t\tif (newName == null)\n\t\t\tnewName = StyleEditorUtility.DEFAULT_STYLE_NODE_NAME;\n\n\t\t// should always be a string, given the constructor\n\t\tif (object instanceof String)\n\t\t{\n\t\t\tobject = newName;\n\n\t\t\tif (object != null && object instanceof String)\n\t\t\t{\n\t\t\t\tthis.setUserObject(object);\n\t\t\t\tthis.name = (String) object;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void transform(CtExecutable method) {\n reset();\r\n \r\n // Get setup for renaming\r\n setDefs(getChildrenOfType(method, CtLocalVariable.class));\r\n setSubtokens(topTargetSubtokens);\r\n \r\n // Select some percentage of things to rename\r\n takePercentage(RENAME_PERCENT);\r\n\r\n // Build new names and apply them\r\n applyRenaming(method, false, generateRenaming(\r\n method, SHUFFLE_MODE, NAME_MIN_LENGTH, NAME_MAX_LENGTH\r\n ));\r\n\t}", "@Override\r\n\tpublic void updateName(int eno, String newName) {\n\r\n\t}", "@Override\n\tpublic void rename(String name) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void setName(String newname) {\n name=newname;\n }", "@Override\n\tpublic void rename(String oldName, String newName) {\n\n\t}", "public void rename(String Path, String name, String newName);", "public void rename(String title) {\n setTitle(title);\n xlList.setChanged();\n }", "public void setName(String newname)\n {\n name = newname;\n \n }", "public abstract String toName(Object inNode);", "public void setName(String newName){\n name=newName;\n }", "public void rename(String name){\n this.name = name;\n }", "public void setName(String newName) {\n this.name = newName;\n }", "public void setName(String newName){\n name = newName;\n }", "private void renameProduct(int id, String newName)\n {\n manager.renameProduct(id, newName);\n }", "private void renameFileWithExtension() {\n TreeNode node = treeGrid.getSelectedRecord();\n VMResource resource = ((FileTreeNode) node).getResource();\n String resourceFullName;\n if (resource instanceof VMFile) {\n String resourceExtension = ((VMFile) resource).getExtensionStr();\n resourceFullName = resource.getName() + \".\" + resourceExtension;\n } else {\n resourceFullName = resource.getName();\n }\n\n final Window winModal = new Window();\n winModal.setHeight(100);\n winModal.setWidth(310);\n winModal.setTitle(\"Rename Resource\");\n winModal.setShowMinimizeButton(false);\n winModal.setIsModal(true);\n winModal.setShowModalMask(true);\n winModal.setKeepInParentRect(true);\n winModal.setAutoCenter(true);\n winModal.addCloseClickHandler(e -> winModal.markForDestroy());\n\n DynamicForm form = new DynamicForm();\n form.setHeight100();\n form.setWidth100();\n form.setPadding(5);\n form.setNumCols(5);\n form.setColWidths(70, 70, 5, 70, 70);\n form.setLayoutAlign(VerticalAlignment.BOTTOM);\n form.setAutoFocus(true);\n\n TextItem renameText = new TextItem();\n renameText.setTitle(\"New Name\");\n renameText.setTitleColSpan(1);\n renameText.setColSpan(4);\n renameText.setValue(resourceFullName);\n\n ButtonItem okButton = new ButtonItem();\n okButton.setTitle(\"OK\");\n okButton.setColSpan(2);\n okButton.setWidth(80);\n okButton.setAlign(Alignment.RIGHT);\n okButton.setStartRow(false);\n okButton.setEndRow(false);\n okButton.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {\n @Override\n public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event) {\n String inputValue = renameText.getValueAsString();\n\n if (inputValue == null || inputValue.isEmpty()) {\n // \"\"を入力する際に、もう一度入力を要求する\n SC.warn(\"Please enter the new name.\");\n return;\n } else {\n String newFileFullName = inputValue.trim();\n TreeNode selectedNode = treeGrid.getSelectedRecord();\n TreeNode parentNode = tree.getParent(selectedNode);\n TreeNode[] nodes = tree.getChildren(parentNode);\n ArrayList<TreeNode> nodeList = new ArrayList<TreeNode>();\n for (TreeNode treeNode : nodes) {\n if (!treeNode.equals(node)) {\n nodeList.add(treeNode);\n }\n }\n VMResource resource = fileTreeNodeFactory.getResource(selectedNode);\n\n if (resource instanceof VMFile) {\n // check the inputed extension if it is correct\n if ((newFileFullName.lastIndexOf(\".\") == -1) || newFileFullName.substring(newFileFullName.lastIndexOf(\".\") + 1).isEmpty()) {\n winModal.markForDestroy();\n renameFileWithExtension();\n SC.warn(\"There is no Extension with your file! Please write a correct file name.\");\n return;\n } else if (!isAbailableExtension(newFileFullName.substring(newFileFullName.lastIndexOf(\".\") + 1))) {\n winModal.markForDestroy();\n renameFileWithExtension();\n SC.warn(\"The Extension you inputed is not available! Please write a correct file name.\");\n return;\n } else if (newFileFullName.substring(0, newFileFullName.lastIndexOf(\".\")).isEmpty()) {\n winModal.markForDestroy();\n renameFileWithExtension();\n SC.warn(\"Please enter the new name.\");\n return;\n }\n }\n int index = newFileFullName.lastIndexOf(\".\");\n String newBaseName = newFileFullName.substring(0, newFileFullName.lastIndexOf(\".\"));\n String newExtension = newFileFullName.substring(newFileFullName.lastIndexOf(\".\") + 1);\n if (!checkSameName(nodeList.toArray(new TreeNode[nodeList.size()]), index != -1 ? newBaseName : newFileFullName, resource instanceof VMDirectory,\n resource instanceof VMFile ? newExtension : \"\")) {\n winModal.markForDestroy();\n renameFileWithExtension();\n SC.warn(\"An item with this name has been already existed. Please change a new name and try again.\");\n return;\n }\n\n ZGRenameCommand renameCommand = new ZGRenameCommand(editResourceService, viewHandler, resource.getId(), newFileFullName, resource.getName());\n renameCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void executeEvent() {\n renameTreeView(renameCommand.getNewName(), selectedNode, parentNode);\n }\n\n @Override\n public void undoEvent() {\n renameTreeView(renameCommand.getOldName(), selectedNode, parentNode);\n }\n\n @Override\n public void redoEvent() {\n renameTreeView(renameCommand.getNewName(), selectedNode, parentNode);\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n });\n CompoundCommand c = new CompoundCommand();\n c.append(renameCommand);\n manager.execute(c.unwrap());\n }\n winModal.markForDestroy();\n }\n });\n ButtonItem canselButton = new ButtonItem();\n canselButton.setTitle(\"Cancel\");\n canselButton.setColSpan(2);\n canselButton.setWidth(80);\n canselButton.setStartRow(false);\n canselButton.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {\n\n @Override\n public void onClick(ClickEvent event) {\n winModal.markForDestroy();\n }\n });\n SpacerItem space = new SpacerItem();\n space.setWidth(5);\n form.setFields(renameText, okButton, space, canselButton);\n form.addKeyPressHandler(new KeyPressHandler() {\n @Override\n public void onKeyPress(KeyPressEvent event) {\n if (KeyNames.ENTER.equals(event.getKeyName())) {\n okButton.fireEvent(new com.smartgwt.client.widgets.form.fields.events.ClickEvent(okButton.getJsObj()));\n }\n }\n });\n winModal.addItem(form);\n winModal.show();\n renameText.setSelectionRange(0, renameText.getValueAsString().indexOf(\".\"));\n }", "public void setParentModule(EObject newValue);", "public void setName(String newName) {\n this.name = newName;\n }", "public void setName(String newName) {\n this.name = newName;\n }", "public void setName(String new_name) {\n\t\t_name = new_name;\n\t}", "public void setName(String newName) {\n name = newName;\n }", "public void rename( String newName ) {\n this.name = newName;\n }", "public void setName (String n){\n\t\tname = n;\n\t}", "public void setName (String n) {\n name = n;\n }", "private void setName(){\r\n\t\tString tagString = new String();\r\n\t\tfor (String k : tags.keySet()){\r\n\t\t\ttagString += \"@\" + k;\r\n\t\t}\r\n\t\tString newName = originalName + tagString +\".\"+ extension;\r\n\t\tif (!newName.equals(name)){\r\n\t\t\tremovePrevNames(newName); //if the new name is a previous name\r\n\t\t\taddPrevNames(name);\r\n\t\t\tupdateLog(newName);\r\n\t\t\tname = newName;\r\n\t\t\t//notify the tag observer\r\n\t\t\tsetChanged();\r\n\t\t\tnotifyObservers();\r\n\t\t\tclearChanged();\r\n\t\t}\r\n\t}", "public static boolean renameRootTarget(String path, String oldname, String name) {\n File file = new File(path + File.separator + oldname);\n File newf = new File(path + File.separator + name);\n\n if (name.length() < 1)\n return false;\n\n try {\n if (!readReadWriteFile())\n RootTools.remount(path, \"rw\");\n\n execute(\"mv \" + getCommandLineString(file.getAbsolutePath()) + \" \"\n + getCommandLineString(newf.getAbsolutePath()));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "public void setName(String newName) {\n name = newName;\n }", "public void setName(String newName) {\n name = newName;\n }", "@Override\n public void rename(String name) throws SQLException, ElementExistException {\n \n }", "public String getTreeName() {\n return treeName;\n }", "public void changeName(String newName){\n\t\tname = newName;\n\t}", "public void setName(String newName) {\n this.name = newName;\n }", "public void setName(String newName) {\n this.name = newName;\n }", "public void setName(String name) {\n this.name = name;\n incModCount();\n }", "@Test(timeout = SWIFT_TEST_TIMEOUT)\n public void testRenameDirToSelf() throws Throwable {\n assumeRenameSupported();\n Path parentdir = path(\"/test/parentdir\");\n fs.mkdirs(parentdir);\n Path child = new Path(parentdir, \"child\");\n createFile(child);\n\n rename(parentdir, parentdir, false, true, true);\n //verify the child is still there\n assertIsFile(child);\n }", "private void editPipelineDefChangeNodeModule(PipelineDefinition pipelineDef) {\n pipelineDef.getRootNodes()\n .get(0)\n .setPipelineModuleDefinition(expectedModuleDef3);\n }", "public void setName(String n) {\r\n name = n;\r\n }", "public static void set_root_child_name(String name) {\n\t\tDefaultMutableTreeNode cdir=new DefaultMutableTreeNode(name);\r\n\t\t\r\n\t\troot.add(cdir);\r\n\t\t\r\n//\t\tcurrent_node.add(cdir);\r\n\t\t//JTree ftp_dir_tree = new JTree(root);\r\n\t\t\r\n\t}", "public void adjustName() {\n Item item = getItem();\n if (!item.isFixedName()) {\n if (item.getSchemaComponent().type() == SchemaBase.SEQUENCE_TYPE) {\n if (m_values.size() > 0) {\n Item childitem = ((DataNode)m_values.get(0)).getItem();\n if (item != childitem) {\n item.setName(childitem.getEffectiveName());\n }\n }\n }\n }\n }", "public void setNameExpr(JExpr anExpr)\n {\n replaceChild(_nameExpr, _nameExpr = anExpr);\n }", "@Override\r\n\tpublic void setName(String newName) \r\n\t{\r\n\t\tthis._name = newName;\r\n\t}", "public void setName(String newName) {\r\n\t\tname = newName;\r\n\t}", "public void rename(String newName) {\n\t\tname = newName;\n\t}", "protected void setName(String newName) {\n\t\tname = newName;\n\t}", "protected void changeNode( String workspaceName,\n NodeKey key,\n Path path,\n Name primaryType,\n Set<Name> mixinTypes ) {\n }", "public void stage_rename(String name, String new_name) {\r\n\t\tcontroller.rename_stage(name, new_name);\r\n\t}", "public void setName(String new_name){\n this.name=new_name;\n }", "public void setName(String newName) {\n\t\tthis.name = newName;\n\t}", "public void setName(String newName)\n\t{\n\t\tthis.name = newName;\n\t}", "public void setName(java.lang.String newName) {\n\tname = newName;\n}", "public void setName(java.lang.String newName) {\n\tname = newName;\n}", "public void setName(java.lang.String newName) {\n\tname = newName;\n}", "private String newName(Folder targetFolder) {\n HashSet<String> nameSet = targetFolder.hashSet();\n String currName = this.getName();\n while (nameSet.contains(currName)) {\n currName = \"(copy)\" + currName;\n }\n return currName;\n }", "public void setName(String newName)\n\t\t{\n\t\t\tname = newName;\n\t\t}", "private void rename(File file, String name) {\n\t\t\r\n\t}", "public void setName(String n) {\r\n\t\tthis.name = n;\r\n\t}", "public void setName(SimpleName name) {\n if (name == null) {\n throw new IllegalArgumentException();\n }\n ASTNode oldChild = this.methodName;\n preReplaceChild(oldChild, name, NAME_PROPERTY);\n this.methodName = name;\n postReplaceChild(oldChild, name, NAME_PROPERTY);\n }", "public void setName(String n) {\n this.name = n;\n }", "public static void setName(String n){\n\t\tname = n;\n\t}", "public final void setName(final String nameNew) {\n this.name = nameNew;\n }", "public ProgramModule getRootModule(String treeName);", "public ProgramModule getModule(String treeName, String name);", "public void renameClassName(String oldClassName, String newClassName) {\n\t\tClassNameRenamer renamer = buildClassNameRenamer(oldClassName, newClassName);\n\t\tgetStateObject().accept(renamer);\n\t}", "public static void renameRubyProject(IProject rubyProjectResource, String newName) {\r\n //computes names of AWE and Ruby Project\r\n String rubyProjectName = rubyProjectResource.getName();\r\n String aweProjectName = getAWEprojectNameFromResource(rubyProjectResource);\r\n \r\n //get AWE and Ruby Elements from EMF structure\r\n Project aweProject = findProject(aweProjectName);\r\n RubyProject rubyProject = findRubyProject(aweProject, rubyProjectName);\r\n \r\n //create a new Ruby Project with a newName\r\n createProjectIfNotExist(aweProject, newName);\r\n RubyProject newProject = findRubyProject(aweProject, newName);\r\n //add elements to new Ruby Project\r\n newProject.getRubyElementsInternal().addAll(rubyProject.getRubyElementsInternal());\r\n \r\n AweProjectService service = NeoCorePlugin.getDefault().getProjectService();\r\n service.renameRubyProject(aweProjectName, rubyProjectName, newName);\r\n }", "public void setName(String newname){\n name = newname; \n }", "public final void setName(final GenericName name) {\n this.value = name.toString();\n final NameSpace scope = name.scope();\n if (scope != null && !scope.isGlobal()) {\n codeSpace = scope.name().toString();\n }\n }", "protected void rename(String oldname, String newname) throws IOException { //TODO map this to the FileSystem\n\t\tthrow new IOException( \"not implemented\" ); //TODO map this to the FileSystem\n\t}", "public void changeName(String newName) {\n this.name = newName;\n }", "public static void setOldTree(RootedTree t) {\r\n\t\tsetOldNewickString(createNewickString(t)); // Added by Madhu, it is where I save the newick\r\n\t\t// string for the uploaded tree.\r\n\t\tSystem.out.println(\"OLD NODE:\" + getOldNewickString());\r\n\t\toldTree = t;\r\n\t}", "public void setNewName(String newName) \n {\n this.newName = getFileName() + \".\" + getType();\n }", "public void setName(Identifier name) throws SourceException;", "public void setName(String newName){\n\n //assigns the value newName to the name field\n this.name = newName;\n }", "@Override\n public void rename(Name oldName, Name newName) throws NamingException {\n validSupportName(oldName);\n validSupportName(newName);\n\n if (oldName == newName || oldName.equals(newName))\n return;\n String nn = newName.get(newName.size());\n\n\n }", "private void thisToNameExpression(Expression replacee) {\n NameExpression replacer = eFactory().createNeioNameExpression(lastElement);\n replacee.replaceWith(replacer);\n }", "public TreeNode(String name) {\r\n setName(name);\r\n }", "public void setParentName(String name) { m_parentName = name; }", "public void setName(String n);", "private void setName() {\n\t\t//MAKE SURE NOT TO GET ACCIDENTAL RECURSION HERE\n\t\t//DO NOT JUST MAKE A NEW TRIAD AND COMPARE TO CURRENT TRIAD\n\t\t//UNLESS ??? MAYBEDON\"T PUT SET NAME IN THE CONSTRUCTOR?\n\t\t//SIMILAR PROBLEM TO SETINVERSION\n\t\t\n\t\t//major, minor, diminished, augmented\n\t\t//this.name = name;\n\t}", "public void setName(String name) {\n internalGroup.setName(name);\n }", "public void changeName(String name) {\n this.name = name;\n }", "@Override\r\n public void renameContainer(String oldName, String newName) \r\n throws NoSuchElementException, IllegalArgumentException\r\n {\r\n \tif (oldName == null)\r\n {\r\n throw new IllegalArgumentException(\"Old name cannot be null!\");\r\n }\r\n if (!isValidName(newName))\r\n {\r\n throw new IllegalArgumentException(\"New name is invalid!\");\r\n }\r\n ChangableProductContainer foundProductGroup = \r\n getChangableProductContainer(oldName);\r\n if (foundProductGroup == null)\r\n {\r\n throw new NoSuchElementException(oldName+\" does not exist!\");\r\n }\r\n foundProductGroup.rename(newName);\r\n }", "public void rename(Name oldName, Name newName) throws NamingException {\n }" ]
[ "0.69600624", "0.6470542", "0.6222027", "0.61861974", "0.61669576", "0.6156423", "0.6057131", "0.6052734", "0.60161704", "0.5999297", "0.59752035", "0.59118885", "0.5868344", "0.5841132", "0.5826229", "0.5723178", "0.5694435", "0.5639077", "0.56078994", "0.55901515", "0.55900323", "0.5517744", "0.5509232", "0.5498126", "0.54792583", "0.54737824", "0.546505", "0.54432255", "0.5441481", "0.54177725", "0.540548", "0.5402582", "0.53651065", "0.5329038", "0.5323029", "0.53219116", "0.53219116", "0.53185433", "0.53121156", "0.52937675", "0.52931356", "0.5290873", "0.52891165", "0.5288857", "0.52841234", "0.52841234", "0.52800125", "0.5276786", "0.52693367", "0.5265384", "0.5265384", "0.52529424", "0.52506304", "0.5244504", "0.52389634", "0.5232326", "0.5218203", "0.52181274", "0.52149236", "0.52060884", "0.5205076", "0.5193138", "0.5192487", "0.51914954", "0.5190893", "0.518158", "0.518035", "0.51766866", "0.51766866", "0.51766866", "0.5175157", "0.51721466", "0.5169333", "0.51580584", "0.51506925", "0.5146948", "0.51359594", "0.51219547", "0.5118829", "0.5116843", "0.5116684", "0.51110756", "0.5110962", "0.5106249", "0.5106019", "0.5103362", "0.51004237", "0.50961137", "0.5078593", "0.5077707", "0.5074929", "0.50672054", "0.50670266", "0.5062997", "0.5060706", "0.5052573", "0.50502044", "0.50285983", "0.50227314", "0.5016477" ]
0.7398887
0
gets the total number of CodeUnits (Instructions, defined Data, and undefined Data)
public long getNumCodeUnits();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getNumInstructions();", "private int getNumberOfMachineUnits() {\r\n\t\tint machineUnitsCount = 0;\r\n\r\n\t\tfor (UnitType unitType : RepairableUnitTypes) {\r\n\t\t\tmachineUnitsCount += this.informationStorage.getCurrentGameInformation().getCurrentUnitCounts()\r\n\t\t\t\t\t.getOrDefault(unitType, 0);\r\n\t\t}\r\n\t\treturn machineUnitsCount;\r\n\t}", "static int size_of_code(String instruction){\n\t\tint size = 0;\n\t\tString code = instruction.split(\" \")[0];\n\t\tswitch(code){\n\t\tcase \"MOV\":\n\t\t\tsize = size_of_mov(instruction);\n\t\t\tbreak;\n\t\tcase \"MVI\":\n\t\t\tsize = size_of_mvi(instruction);\n\t\t\tbreak;\n\t\tcase \"LXI\":\n\t\t\tsize = size_of_lxi(instruction);\n\t\t\tbreak;\n\t\tcase \"LDA\":\n\t\t\tsize = size_of_lda(instruction);\n\t\t\tbreak;\n\t\tcase \"STA\":\n\t\t\tsize = size_of_sta(instruction);\n\t\t\tbreak;\n\t\tcase \"LHLD\":\n\t\t\tsize = size_of_lhld(instruction);\n\t\t\tbreak;\n\t\tcase \"SHLD\":\n\t\t\tsize = size_of_shld(instruction);\n\t\t\tbreak;\n\t\tcase \"LDAX\":\n\t\t\tsize = size_of_ldax(instruction);\n\t\t\tbreak;\n\t\tcase \"STAX\": \n\t\t\tsize = size_of_stax(instruction);\n\t\t\tbreak;\n\t\tcase \"XCHG\":\n\t\t\tsize = size_of_xchg(instruction);\n\t\t\tbreak;\n\t\tcase \"ADD\":\n\t\t\tsize = size_of_add(instruction);\n\t\t\tbreak;\n\t\tcase \"ADC\":\n\t\t\tsize = size_of_adc(instruction);\n\t\t\tbreak;\n\t\tcase \"ADI\":\n\t\t\tsize = size_of_adi(instruction);\n\t\t\tbreak;\n\t\tcase \"ACI\":\n\t\t\tsize = size_of_aci(instruction);\n\t\t\tbreak;\n\t\tcase \"DAD\":\n\t\t\tsize = size_of_dad(instruction);\n\t\t\tbreak;\n\t\tcase \"SUB\":\n\t\t\tsize = size_of_sub(instruction);\n\t\t\tbreak;\n\t\tcase \"SBB\":\n\t\t\tsize = size_of_sbb(instruction);\n\t\t\tbreak;\n\t\tcase \"SUI\":\n\t\t\tsize = size_of_sui(instruction);\n\t\t\tbreak;\n\t\tcase \"INR\":\n\t\t\tsize = size_of_inr(instruction);\n\t\t\tbreak;\n\t\tcase \"DCR\":\n\t\t\tsize = size_of_dcr(instruction);\n\t\t\tbreak;\n\t\tcase \"INX\":\n\t\t\tsize = size_of_inx(instruction);\n\t\t\tbreak;\n\t\tcase \"DCX\":\n\t\t\tsize = size_of_dcx(instruction);\n\t\t\tbreak;\n\t\tcase \"DAA\":\n\t\t\tsize = size_of_daa(instruction);\n\t\tcase \"ANA\":\n\t\t\tsize = size_of_ana(instruction);\n\t\t\tbreak;\n\t\tcase \"ANI\":\n\t\t\tsize = size_of_ani(instruction);\n\t\t\tbreak;\n\t\tcase \"ORA\":\n\t\t\tsize = size_of_ora(instruction);\n\t\t\tbreak;\n\t\tcase \"ORI\":\n\t\t\tsize = size_of_ori(instruction);\n\t\t\tbreak;\n\t\tcase \"XRA\":\n\t\t\tsize = size_of_xra(instruction);\n\t\t\tbreak;\n\t\tcase \"XRI\":\n\t\t\tsize = size_of_xri(instruction);\n\t\t\tbreak;\n\t\tcase \"CMA\":\n\t\t\tsize = size_of_cma(instruction);\n\t\t\tbreak;\n\t\tcase \"CMC\":\n\t\t\tsize = size_of_cmc(instruction);\n\t\t\tbreak;\n\t\tcase \"STC\":\n\t\t\tsize = size_of_stc(instruction);\n\t\t\tbreak;\n\t\tcase \"CMP\":\n\t\t\tsize = size_of_cmp(instruction);\n\t\t\tbreak;\n\t\tcase \"CPI\":\n\t\t\tsize = size_of_cpi(instruction);\n\t\t\tbreak;\n\t\tcase \"RLC\":\n\t\t\tsize = size_of_rlc(instruction);\n\t\t\tbreak;\n\t\tcase \"RRC\":\n\t\t\tsize = size_of_rrc(instruction);\n\t\t\tbreak;\n\t\tcase \"RAL\":\n\t\t\tsize = size_of_ral(instruction);\n\t\t\tbreak;\n\t\tcase \"RAR\":\n\t\t\tsize = size_of_rar(instruction);\n\t\t\tbreak;\n\t\tcase \"JMP\":\n\t\t\tsize = size_of_jmp(instruction);\n\t\t\tbreak;\n\t\tcase \"JZ\":\n\t\t\tsize = size_of_jz(instruction);\n\t\t\tbreak;\n\t\tcase \"JNZ\":\n\t\t\tsize = size_of_jnz(instruction);\n\t\t\tbreak;\n\t\tcase \"JC\":\n\t\t\tsize = size_of_jc(instruction);\n\t\t\tbreak;\n\t\tcase \"JNC\":\n\t\t\tsize = size_of_jnc(instruction);\n\t\t\tbreak;\n\t\tcase \"JP\":\n\t\t\tsize = size_of_jp(instruction);\n\t\t\tbreak;\n\t\tcase \"JM\":\n\t\t\tsize = size_of_jm(instruction);\n\t\t\tbreak;\n\t\tcase \"JPE\":\n\t\t\tsize = size_of_jpe(instruction);\n\t\t\tbreak;\n\t\tcase \"JPO\":\n\t\t\tsize = size_of_jpo(instruction);\n\t\t\tbreak;\n\t\tcase \"CALL\":\n\t\t\tsize = size_of_call(instruction);\n\t\t\tbreak;\n\t\tcase \"CZ\":\n\t\t\tsize = size_of_cz(instruction);\n\t\t\tbreak;\n\t\tcase \"CNZ\":\n\t\t\tsize = size_of_cnz(instruction);\n\t\t\tbreak;\n\t\tcase \"CC\":\n\t\t\tsize = size_of_cc(instruction);\n\t\t\tbreak;\n\t\tcase \"CNC\":\n\t\t\tsize = size_of_cnc(instruction);\n\t\t\tbreak;\n\t\tcase \"CP\":\n\t\t\tsize = size_of_cp(instruction);\n\t\t\tbreak;\n\t\tcase \"CM\":\n\t\t\tsize = size_of_cm(instruction);\n\t\t\tbreak;\n\t\tcase \"CPE\":\n\t\t\tsize = size_of_cpe(instruction);\n\t\t\tbreak;\n\t\tcase \"CPO\":\n\t\t\tsize = size_of_cpo(instruction);\n\t\t\tbreak;\n\t\tcase \"RET\":\n\t\t\tsize = size_of_ret(instruction);\n\t\t\tbreak;\n\t\tcase \"RZ\":\n\t\t\tsize = size_of_rz(instruction);\n\t\t\tbreak;\n\t\tcase \"RNZ\":\n\t\t\tsize = size_of_rnz(instruction);\n\t\t\tbreak;\n\t\tcase \"RC\":\n\t\t\tsize = size_of_rc(instruction);\n\t\t\tbreak;\n\t\tcase \"RNC\":\n\t\t\tsize = size_of_rnc(instruction);\n\t\t\tbreak;\n\t\tcase \"RP\":\n\t\t\tsize = size_of_rp(instruction);\n\t\t\tbreak;\n\t\tcase \"RM\":\n\t\t\tsize = size_of_rm(instruction);\n\t\t\tbreak;\n\t\tcase \"RPE\":\n\t\t\tsize = size_of_rpe(instruction);\n\t\t\tbreak;\n\t\tcase \"RPO\":\n\t\t\tsize = size_of_rpo(instruction);\n\t\t\tbreak;\n\t\tcase \"PCHL\":\n\t\t\tsize = size_of_pchl(instruction);\n\t\t\tbreak;\n\t\tcase \"IN\":\n\t\t\tsize = size_of_in(instruction);\n\t\t\tbreak;\n\t\tcase \"OUT\":\n\t\t\tsize = size_of_out(instruction);\n\t\t\tbreak;\n\t\tcase \"PUSH\":\n\t\t\tsize = size_of_push(instruction);\n\t\t\tbreak;\n\t\tcase \"POP\":\n\t\t\tsize = size_of_pop(instruction);\n\t\t\tbreak;\n\t\tcase \"XTHL\":\n\t\t\tsize = size_of_xthl(instruction);\n\t\t\tbreak;\n\t\tcase \"SPHL\":\n\t\t\tsize = size_of_sphl(instruction);\n\t\t\tbreak;\n\t\t}\n\t\treturn size;\n\t}", "public NM getNumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public int getUnitCount() {\n return _elements.length;\n }", "int getInstrumentCount();", "public int getSize() {\n int size = 5; // 1 (code) + 2 (data length) + 2 (# of constants)\n try {\n for (Iterator<String> i = constants.iterator(); i.hasNext();) {\n size += (i.next().getBytes(\"UTF-8\").length + 1); // Unicode, null-terminated\n }\n } catch (UnsupportedEncodingException e) {\n // UTF-8 should be available..\n }\n return size;\n }", "public double getTotalUnits() {\n int total = 0;\n for(int i = 0; i < courses.size(); i++) {\n // don't count if units are null? idk how defensive I need to be (I choose not to check, units should never be null)\n // TODO: test with System.out\n Course course = courses.get(i);\n //if(!course.getUnits().equals(null))\n total += course.getUnits();\n }\n return total;\n }", "public NM getPsl14_NumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "@Override\n public int count() {\n return this.bench.size();\n }", "public long getNumDefinedData();", "TraceCodeUnitsView codeUnits();", "int getBlockNumbersCount();", "public int getSize() {\r\n\t\treturn 5; // 1 (code) + 2 (data length) + 2 (branch offset)\r\n\t}", "private int getUnitListValue() {\r\n\t\tint value = 0;\r\n\t\tfor (Unit unit : this.unitList) {\r\n\t\t\tvalue += unit.getValue();\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "int getBlockNumsCount();", "int getBlockNumsCount();", "private int getTotalTestCase() {\n\t\treturn passedtests.size() + failedtests.size() + skippedtests.size();\n\t}", "public int getTotalVariables() ;", "public int getSizeOfCode()\n throws IOException, EndOfStreamException\n {\n return peFile_.readInt32(relpos(Offsets.SIZE_OF_CODE.position));\n }", "int getDataCount();", "int getDataCount();", "int getDataCount();", "int getDataCount();", "int getDataCount();", "int getChunksCount();", "int getChunksCount();", "public int sizeOfRealmCodeArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(REALMCODE$0);\n }\n }", "public long getCount() {\n long count = 0L;\n \n for (GTSEncoder encoder: chunks) {\n if (null != encoder) {\n count += encoder.getCount();\n }\n }\n \n return count;\n }", "public int getUnitSize() {\n\t\n\treturn 254; // A d64 block is 254 bytes (256 - pointer to the next sector).\n }", "public int getEntryCount() {\n return mem.getChar(34);\n }", "public int getNumActiveCashUnits() {\n int numActiveUnits = 0 ;\n for( final Trade buyTrade : this.posHldCashTrades ) {\n numActiveUnits += buyTrade.getNumActiveUnits() ;\n }\n return numActiveUnits ;\n }", "public int nrOfExpressions();", "public int getUnits()\n {\n return m_cUnits;\n }", "int getTotalCount();", "public int total_maps() {\r\n\t\tcheck( 1 );\r\n\r\n\t\treturn total_maps;\r\n\t}", "public int getMemberSize() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: idiv \n // 1: istore_0 /* this */\n // 2: aconst_null \n // 3: nop \n // 4: fload_1 \n // 5: dadd \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -------------------------------------------\n // 0 6 0 this Lcom/sun/xml/xsom/impl/UnionSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "public int count() {\n\t\treturn sizeC;\n\t}", "int getSourceFileCount();", "public static int size_count() {\n return (16 / 8);\n }", "@Override\n\tpublic int sount() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int getTotalCount(Integer cate_code) {\n\t\treturn mapper.getTotalCount(cate_code);\n\t}", "int getChunksLocationCount();", "public int qureyNumOfInspectors() {\r\n\t\tif (DBConnection.conn == null) {\r\n\t\t\tDBConnection.openConn();\r\n\t\t}\r\n\t\tint sum = 0;\r\n\t\ttry {\r\n\t\t\tString sql = \"select count(*) from InspectionPersonnel\";\r\n\t\t\tps = DBConnection.conn.prepareStatement(sql);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tsum = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tDBConnection.closeResultSet(rs);\r\n\t\t\tDBConnection.closeStatement(ps);\r\n\t\t\tDBConnection.closeConn();\r\n\t\t\treturn sum;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "int getMonstersCount();", "int getMonstersCount();", "static int size_of_cm(String passed){\n\t\treturn 3;\n\t}", "public int getLenCodewords() {\n\t\treturn this.lenCodewords;\n\t}", "public static int sizeOf()\n {\n return 4;\n }", "int getSystemCount();", "public int getNumberOfStructures() {\n\t\tSet<String> cs = this.getMainInstance().getConfig().getConfigurationSection(\"Schematics\").getKeys(false);\n\t\treturn cs.size();\n\t}", "int getTotalCaseNumbers();", "@Test\n public void shouldCountLinesOfTestCode() throws Exception {\n initializeOSGiProjectWithTestCodeInsideBundles();\n resetOutput();\n getShell().execute(\"osgi lot\");\n assertTrue(getOutput().contains(\"Total lines of test code:4\"));\n }", "public static int size() {\n\t\treturn (anonymousSize() + registeredSize());\n\t}", "public int getTotalSize();", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "public long getAllLiteralCount();", "public static int size_counter() {\n return (32 / 8);\n }", "private int totalCount(Piece side) {\n int sum = 0;\n for (int i = 0; i < M; i++) {\n for (int j = 0; j < M; j++) {\n if (boardArr[i][j].abbrev().equals(sideAbbrev)) {\n sum++;\n }\n }\n }\n return sum;\n }", "int getInfoCount();", "int getInfoCount();", "int getInfoCount();", "@com.guidewire.pl.persistence.codegen.annotation.OverridesAccessor\n @gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getTotalNumChecks() {\n return ((com.guidewire.pl.domain.database.DBConsistCheckRunPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.database.DBConsistCheckRunPublicMethods\")).getTotalNumChecks();\n }", "public int getCount(){\n int c = 0;\n for(String s : this.counts){\n c += Integer.parseInt(s);\n }\n return c;\n }", "int getBlockLocationsCount();", "int sizeOfFinancialStatementsArray();", "@com.guidewire.pl.persistence.codegen.annotation.OverridesAccessor\n @gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getTotalNumChecks() {\n return ((com.guidewire.pl.domain.database.DBConsistCheckRunPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.database.DBConsistCheckRunPublicMethods\")).getTotalNumChecks();\n }", "@Override\r\n\tpublic long getTotal() {\n\t\treturn 0;\r\n\t}", "public int totalCostOfComponents( ){\n\t\tint total=0;\n\t\tfor (Component temp : components){\n\t\t\ttotal+=temp.getCost();\n\t\t}\n\t\treturn total;\n\t}", "public static int count() {\n\t\treturn definitions.length;\n\t}", "public int getUnits() {\r\n\r\n\t\treturn this.units;\r\n\t}", "public int cardinality() {\n\t\tint counter = 0;\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\twhile (i.hasNext()) {\n\t\t\tRunningLengthWord localrlw = i.next();\n\t\t\tif (localrlw.getRunningBit()) {\n\t\t\t\tcounter += wordinbits * localrlw.getRunningLength();\n\t\t\t}\n\t\t\tfor (int j = 0; j < localrlw.getNumberOfLiteralWords(); ++j) {\n\t\t\t\tcounter += Long.bitCount(i.buffer()[i.dirtyWords() + j]);\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}", "public int getUnits() {\r\n return units;\r\n }", "public static int getWorkingUnitsCount()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getService().getWorkingUnitsCount();\n\t}", "int sizeOfCrashDataArray();", "java.math.BigInteger getNumberOfInstallments();", "public int count()\r\n {\r\n return this.classNameToJavaSourceFileMap.size();\r\n }", "int getNumOfChunks();", "int getDataScansCount();", "int getSnInfoCount();", "int getSnInfoCount();", "int getSnInfoCount();", "public double getTotalUnits() {\n double totalUnits = 0;\n for (int i = 0; i < quarters.size(); i++) {\n totalUnits += quarters.get(i).getTotalUnits();\n }\n return totalUnits;\n }", "public int discCount() {\n\t\tint countBLACK = discBlackCount();\n\t\tint countWHITE = discWhiteCount();\n\n\t\treturn countBLACK + countWHITE;\n\t\t\n\t}", "int getStatMetadataCount();", "public int GetSize() \n\t{\n\t\treturn numEntries; //dummy return so file would compile\n\t}", "int getTotalSize();", "Integer getTotalStepCount();", "int getWifisCount();", "int getMetricCostsCount();", "public static int getErrorTotal() {\n return errorCount;\n }", "@Override\n\tpublic int numUses() {\n\t\treturn this.use;\n\t}", "@FameProperty(name = \"numberOfLinesOfCodeWithMoreThanOneCharacter\", derived = true)\n public Number getNumberOfLinesOfCodeWithMoreThanOneCharacter() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "private int digitCount(String text, int position, int amount) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[605]++;\r\n int limit = Math.min(text.length() - position, amount);\r\n amount = 0;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[606]++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[607]++;\nbyte CodeCoverTryBranchHelper_L18 = 0;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[52]++;\n\n\nint CodeCoverConditionCoverageHelper_C182;\r\n for (;(((((CodeCoverConditionCoverageHelper_C182 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C182 |= (2)) == 0 || true) &&\n ((limit > 0) && \n ((CodeCoverConditionCoverageHelper_C182 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[182].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C182, 1) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[182].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C182, 1) && false); limit--) {\nif (CodeCoverTryBranchHelper_L18 == 0) {\n CodeCoverTryBranchHelper_L18++;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[52]--;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[53]++;\n} else if (CodeCoverTryBranchHelper_L18 == 1) {\n CodeCoverTryBranchHelper_L18++;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[53]--;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[54]++;\n}\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[608]++;\r\n char c = text.charAt(position + amount);\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[609]++;\nint CodeCoverConditionCoverageHelper_C183;\r\n if ((((((CodeCoverConditionCoverageHelper_C183 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C183 |= (8)) == 0 || true) &&\n ((c < '0') && \n ((CodeCoverConditionCoverageHelper_C183 |= (4)) == 0 || true)))\n || \n(((CodeCoverConditionCoverageHelper_C183 |= (2)) == 0 || true) &&\n ((c > '9') && \n ((CodeCoverConditionCoverageHelper_C183 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[183].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C183, 2) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[183].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C183, 2) && false)) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[389]++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[610]++;\r\n break;\n\r\n } else {\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[390]++;}\r\n amount++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[611]++;\r\n }\r\n return amount;\r\n }", "public static int size_source() {\n return (8 / 8);\n }", "public int sizeOfDataChckArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DATACHCK$14);\n }\n }", "static int size_of_cc(String passed){\n\t\treturn 3;\n\t}", "public int getUnits()\n {\n return m_cCurUnits;\n }", "public static int numTypes(){\n byte[] types = genAllTypes();\n return types.length;\n }", "public long count() {\n\t\treturn 0;\n\t}" ]
[ "0.6980624", "0.6751323", "0.6568254", "0.6555968", "0.6488732", "0.6363734", "0.6282756", "0.6260544", "0.62351316", "0.6201035", "0.6176931", "0.61567193", "0.61530334", "0.6138688", "0.61287475", "0.6127612", "0.6127612", "0.61257696", "0.60721564", "0.6047754", "0.6002532", "0.6002532", "0.6002532", "0.6002532", "0.6002532", "0.59980565", "0.59980565", "0.5941084", "0.59109753", "0.58991194", "0.58859634", "0.58788884", "0.5866346", "0.58659303", "0.58451164", "0.58363694", "0.58138496", "0.58116853", "0.5799406", "0.57927424", "0.5786708", "0.5782921", "0.5778898", "0.57773423", "0.57659227", "0.57659227", "0.57519", "0.57481885", "0.5747317", "0.57444406", "0.57356876", "0.57334214", "0.5722099", "0.5721081", "0.571411", "0.5702682", "0.57000554", "0.5696629", "0.5688008", "0.5687557", "0.5687557", "0.5687557", "0.56867266", "0.56828314", "0.5681551", "0.5675934", "0.5675907", "0.5673869", "0.56704754", "0.5666721", "0.56649077", "0.5663689", "0.5661959", "0.5660224", "0.5658577", "0.56585485", "0.56560314", "0.56542504", "0.56501293", "0.5647739", "0.5647739", "0.5647739", "0.56476766", "0.5642584", "0.5641585", "0.5637226", "0.5629362", "0.5626178", "0.56255335", "0.5619826", "0.5619298", "0.5612292", "0.56121993", "0.5611409", "0.56106514", "0.5609241", "0.5607242", "0.5604509", "0.5601553", "0.5598685" ]
0.79623735
0
gets the total number of defined Data objects in the listing.
public long getNumDefinedData();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCount() {\n\t\t\treturn dataList.size();\r\n\t\t}", "public int getDataCount() {\n return data_.size();\n }", "public int getCountOfData (){\n return getData() == null ? 0 : getData().size();\n }", "int getDataCount();", "int getDataCount();", "int getDataCount();", "int getDataCount();", "int getDataCount();", "@Override\r\n\tpublic int getCollectionTotalCount() {\n\t\treturn data != null ? data.recordCount : 0;\r\n\t}", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getCount() {\n\t\treturn data.size();\r\n\t}", "public int getCount() {\n\t\t\treturn mlistData.size();\n\t\t}", "public int getCount() {\n\t\t\treturn data.size();\n\t\t}", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getCount() {\n return dataList.size();\n }", "public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}", "public int listAmount() {\n return count;\n }", "int getItemsCount();", "int getItemsCount();", "public int getCount() {\n return datalist.size();\n }", "public int getCount() {\n return _data.size();\n }", "public int getCount() {\n return definition.getInteger(COUNT, 1);\n }", "public int getObjectCount() {\n\t\treturn objects.size(); // Replace with your code\n\t}", "@Override\n\tpublic int getDataCount() {\n\t\treturn list_fr.size();\n\t}", "Long getAllCount();", "public int getDataCount() {\n if (dataBuilder_ == null) {\n return data_.size();\n } else {\n return dataBuilder_.getCount();\n }\n }", "public int getDataCount() {\n if (dataBuilder_ == null) {\n return data_.size();\n } else {\n return dataBuilder_.getCount();\n }\n }", "public int getCount(){\n\t\treturn mDataObjects.size();\n\t}", "int getListCount();", "@Override\r\n\tpublic int getCollectionCount() {\n\t\treturn data != null && data.list != null ? data.list.size() : 0;\r\n\t}", "public int getCount() {\n if(data.size()<=0) return 1;\n return data.size();\n }", "public long getItemCount() {\n\t\treturn this.getSize(data);\n\t}", "private int infoCount() {\n return data.size();\n }", "int getDetailsCount();", "int getDetailsCount();", "public int getNumberOfEntries();", "int getTotalCount();", "@Override\n\tpublic int countNumberOfDatas() {\n\t\treturn 0;\n\t}", "int getEntryCount();", "public int getCount() {\n\n if(data.size()<=0)\n return 1;\n return filteredList.size();\n }", "public int getCount() {\n\t\treturn _mData.size();\n\t}", "public int numberOfItems()\n {\n return dessertList.size();\n }", "public int getTotalSPEntries() {\n\t\tList<SalePurchase> list = new ArrayList<>(salePurchaseEntries.values());\n\t\treturn list.size();\n\t}", "public int getTotalCount() {\n return totalCount;\n }", "@Override\r\n\tpublic int totalCount() {\n\t\treturn sqlSession.selectOne(namespace + \".totalCount\");\r\n\t}", "@Override\r\n\tpublic int totalCount() {\n\t\treturn sqlSession.selectOne(namespace + \".totalCount\");\r\n\t}", "public int dataCount() {\n return this.root.dataCount();\n }", "public int getCount() {\n return objects.size();\n }", "public int getNumberOfEntries() ;", "public int getCount() {\n\t\treturn OReportOne.size();\n\t}", "int findAllCount() ;", "public int numberOfEntries();", "public int size(){\n int size = 0;\n for(LinkedList<E> item : this.data){\n size += item.size();\n }\n return size;\n }", "int getNumItems();", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public int getTotalItems()\n {\n return totalItems;\n }", "public int getCount() {\n\t\t\treturn list.size();\r\n\t\t}", "public int size()\r\n {\r\n return nItems;\r\n }", "public int size() {\n return numItems;\n }", "public int getTotalCount() {\r\n return root.getTotalCount();\r\n }", "public int size() {\n return nItems;\n }", "public int selectListCount() {\n\t\tConnection conn = getConnection();\n\t\tint listCount = new SaleDao().selectListCount(conn);\n\t\tclose(conn);\n\t\treturn listCount;\n\t}", "public Long getTotalCount() {\r\n return totalCount;\r\n }", "public int getListCount() {\n\t\tConnection con = getConnection();\r\n\t\tMemberDAO memberDao = MemberDAO.getInstance();\r\n\t\tmemberDao.setConnection(con);\r\n\r\n\t\tint listCount = memberDao.selectRatingCount();\r\n\r\n\t\tclose(con);\r\n\t\treturn listCount;\r\n\t}", "public Integer getNumberOfEntries() {\n return this.numberOfEntries;\n }", "@Override\r\n\tpublic int countData(PageCriteria pCri) throws Exception {\n\t\treturn ss.selectOne(\"countData\", pCri);\r\n\t}", "public int size() {\r\n return theData.size();\r\n }", "@Override\n public int size() {\n int totalSize = 0;\n // iterating over collectionList\n for (Collection<E> coll : collectionList)\n totalSize += coll.size();\n return totalSize;\n }", "int getInfoCount();", "int getInfoCount();", "int getInfoCount();", "public int listSize(){\r\n return counter;\r\n }", "public int size() {\n \treturn numItems;\n }", "public int getCount() {\n if (mDataValid) {\n return mCount;\n } else {\n return 0;\n }\n }", "public long getTotalCount() {\n return _totalCount;\n }", "public int totalNum(){\n return wp.size();\n }", "public int size(){\n return numItems;\n }", "public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}", "int getRecordCount();", "public long getCount()\n\t{\n\t\treturn count;\n\t}", "@Override\r\n\t\tpublic int getCount() {\n\t\t\treturn listData.size();\r\n\t\t}", "int getContentsCount();", "protected long getObjectCount() {\r\n return objectCount;\r\n }", "public Long getCount() {\n return count;\n }", "public int get_count();", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}" ]
[ "0.75405544", "0.74717444", "0.7462418", "0.7442303", "0.7442303", "0.7442303", "0.7442303", "0.7442303", "0.74422264", "0.7403371", "0.7403371", "0.7403371", "0.7403371", "0.7403371", "0.7353949", "0.7352661", "0.7329984", "0.73290086", "0.73290086", "0.73015213", "0.7286247", "0.727666", "0.72478414", "0.72478414", "0.7247828", "0.7206941", "0.7205889", "0.7181761", "0.7179263", "0.71427333", "0.7129267", "0.7129267", "0.710339", "0.7101996", "0.7100455", "0.7080347", "0.70758575", "0.7063264", "0.70189345", "0.70189345", "0.70030546", "0.700111", "0.69622177", "0.69447327", "0.69435483", "0.6926497", "0.6910755", "0.69005924", "0.6886618", "0.68864733", "0.68864733", "0.6876201", "0.68738145", "0.68622804", "0.68607885", "0.6839077", "0.6831982", "0.6767174", "0.676704", "0.6764232", "0.6764232", "0.6764232", "0.67636603", "0.6761805", "0.67563415", "0.67343575", "0.67259896", "0.67128545", "0.6700321", "0.66966695", "0.6692947", "0.66837037", "0.66760176", "0.6674046", "0.667159", "0.6668074", "0.6668074", "0.6668074", "0.6657704", "0.665342", "0.6651901", "0.6651385", "0.6649169", "0.6638604", "0.66376704", "0.6635722", "0.6635017", "0.66341454", "0.6626534", "0.662307", "0.6621586", "0.66133827", "0.6605179", "0.6605179", "0.6605179", "0.6605179", "0.6605179", "0.6605179", "0.6605179", "0.6605179" ]
0.6613684
91
gets the total number of Instructions in the listing.
public long getNumInstructions();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int listAmount() {\n return count;\n }", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "int getTotalCount();", "int getDetailsCount();", "int getDetailsCount();", "int getSnInfoCount();", "int getSnInfoCount();", "int getSnInfoCount();", "public int getEntryCount() {\n return mem.getChar(34);\n }", "int getInfoCount();", "int getInfoCount();", "int getInfoCount();", "public int getNumberOfEntries();", "int getEntryCount();", "public int getTotalSPEntries() {\n\t\tList<SalePurchase> list = new ArrayList<>(salePurchaseEntries.values());\n\t\treturn list.size();\n\t}", "public int getCount(){\n int c = 0;\n for(String s : this.counts){\n c += Integer.parseInt(s);\n }\n return c;\n }", "public int listSize(){\r\n return counter;\r\n }", "long getRecipesCount();", "public int getTotalCount() {\n return totalCount;\n }", "int getTaskDetailsCount();", "public int numItemInList() {\n return nextindex - startIndex;\n }", "public int getNumberOfEntries() ;", "int getItemsCount();", "int getItemsCount();", "public int numberOfItems()\n {\n return dessertList.size();\n }", "int getListCount();", "public int getSize(){\n\t\tint size = list.size();\n\t\treturn size;\n\n\t}", "public NM getNumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public int totalNum(){\n return wp.size();\n }", "public int getCount() {\n return definition.getInteger(COUNT, 1);\n }", "public int numberOfEntries();", "int getContentsCount();", "public int getTotalItems()\n {\n return totalItems;\n }", "int getInstrumentCount();", "int getNumItems();", "public int getNumTotal() {\n return nucleiSelected.size();\n }", "int getInCount();", "public int size() {\n int counter = 1;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n iter = iter.next;\n counter += 1;\n }\n return counter;\n }", "public int size()\r\n {\r\n return nItems;\r\n }", "public int getNumberOfEntries()\r\n\t{\r\n\t\treturn tr.size();\r\n\t}", "public int getTotal () {\r\n\t\treturn total;\r\n\t}", "public int getTotal () {\r\n\t\treturn total;\r\n\t}", "int getNewsindentifydetailCount();", "public int getTotal()\n\t{\n\t\treturn total;\n\t\t\n\t}", "public int getSnInfoCount() {\n if (snInfoBuilder_ == null) {\n return snInfo_.size();\n } else {\n return snInfoBuilder_.getCount();\n }\n }", "public int getSnInfoCount() {\n if (snInfoBuilder_ == null) {\n return snInfo_.size();\n } else {\n return snInfoBuilder_.getCount();\n }\n }", "public int getSnInfoCount() {\n if (snInfoBuilder_ == null) {\n return snInfo_.size();\n } else {\n return snInfoBuilder_.getCount();\n }\n }", "public int getTotal () {\n\t\treturn total;\n\t}", "public Integer getInterestedInItemsCount();", "public Integer getNumberOfEntries() {\n return this.numberOfEntries;\n }", "public int getSize()\n\t{\n\t\t// returns n, the number of strings in the list: O(n).\n\t\tint count = 0;\n \t\tnode p = head; \n\t\twhile (p != null)\n \t\t{\n \t\tcount ++;\n \t\tp = p.next;\n \t\t}\n \t\treturn count;\n\t}", "public int size() {\n return nItems;\n }", "public int size(){\n\t\treturn howMany; \n\t}", "int getWifisCount();", "private int numberOfStudents() {\n int sum = 0;\n for (int student : this.studentList) {\n sum += student;\n }\n return sum;\n }", "public int size()\n { \t\n \t//initialize a counter to measure the size of the list\n int sizeVar = 0;\n //create local node variable to update in while loop\n LinkedListNode<T> localNode = getFirstNode();\n \n //update counter while there are still nodes\n while(localNode != null)\n {\n sizeVar += 1;\n localNode = localNode.getNext();\n }\n \n return sizeVar;\n }", "public int getTotal() {\n\t\treturn total;\n\t}", "public int getCount() \r\n\t{\r\n\t\tSystem.out.print(\"The number of book in the Array is \");\r\n\t\treturn numItems;\r\n\t\t\r\n\t}", "public Integer getTotalItemCount() {\n return totalItemCount;\n }", "public static int count() {\n return segmentList.size();\n }", "public int getStudentListSize() throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n String queryString = \"select count(*) from \" + Student.class.getName();\n Query query = hibernateTemplate.createQuery(queryString);\n List list = hibernateTemplate.list(query);\n Integer countResult = (Integer) list.get(0);\n return countResult.intValue();\n } finally {\n log.debug(\"finished getStudentListSize()\");\n }\n }", "Long getNumberOfElement();", "int getActAmountCount();", "public int getTotal () {\n return total;\n }", "@Override\n public int size() {\n\n Node nodePointer = listHead;\n int size = 0;\n while (nodePointer != null) {\n size += 1;\n nodePointer = nodePointer.next;\n }\n return size;\n }", "public int getTotal() {\n return total;\n }", "public int getTotal() {\n return total;\n }", "public int size() {\r\n\t\t\tint size = 0;\r\n\t\t\tListNode counter = header;\r\n\t\t\twhile (counter != null) {\r\n\t\t\t\tsize++;\r\n\t\t\t\tcounter = counter.next;\r\n\t\t\t}\r\n\t\t\treturn size;\r\n\t\t}", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public int getPlanMedioMesListSize() {\r\n Query countQuery = manager.createQuery(\"select count(*) from PlanMedioMesEJB\");\r\n List countQueryResult = countQuery.getResultList();\r\n Integer countResult = (Integer) countQueryResult.get(0);\r\n log.debug(\"The list size is: \" + countResult.intValue());\r\n return countResult.intValue();\r\n }", "int getBlockNumbersCount();", "public int size(){\n\t\tListMapEntry temp = first;\n\t\tint c=0;\n\t\twhile(temp!=null){\n\t\t\tc++;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn c;\n\t}", "public int getSize() {\n synchronized (itemsList) {\n return itemsList.size();\n }\n }", "public synchronized int getNumberOfItems(){\n int totalItems=0;\n \n for(ShoppingCartItem item : getItems()){\n //we sum the quantity of products for each item\n totalItems += item.getQuantity();\n }\n \n return totalItems;\n }", "int getTotalElements();", "public int get_count();", "public int getSnInfoCount() {\n return snInfo_.size();\n }", "public int getSnInfoCount() {\n return snInfo_.size();\n }", "public int getSnInfoCount() {\n return snInfo_.size();\n }", "public int getTotal() {\n\t\t\treturn total;\n\t\t}", "private int kiemtrasopt (List list){\n int dem = list.size();\n return dem;\n }", "int getNumberOfResults();", "public int sizeOf() {\n BookList target = this;\n int count = 0;\n if (isEmpty()){\n count= 0;\n }\n else if (!isEmpty()){\n count = 1;\n while (target.next != null){\n target = target.next;\n if(target.next == null){\n }\n \n ++count;\n }\n \n }\n\t\treturn count;\n\t}", "public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}", "Integer getTotalStepCount();", "public int size() {\n return numItems;\n }", "private int infoCount() {\n return data.size();\n }", "public int size()\n\t{\n\t\tint size = 0;\n\t\t\n\t\tfor (LinkedList<Entry> list : entries)\n\t\t\tsize += (list == null) ? 0 : list.size();\n\t\t\n\t\treturn size;\n\t}", "public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}", "public int getTotalCount() {\r\n return root.getTotalCount();\r\n }", "public int getTotal() {\n return total;\n }", "public int size()\n\t{\n\t\treturn listSize;\n\t}", "int getReqCount();", "int getBlockNumsCount();", "int getBlockNumsCount();", "public NM getPsl14_NumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public int sizeOfList(){\n return tasks.size();\n }", "public String getCount() {\r\n\t\treturn this.count;\r\n\t}", "public int getNbOperation(){\n return this.listOperation.size();\n }", "public int getSize() {\n return list.size();\n }", "public int selectListCount() {\n\t\tConnection conn = getConnection();\n\t\tint listCount = new SaleDao().selectListCount(conn);\n\t\tclose(conn);\n\t\treturn listCount;\n\t}" ]
[ "0.70508856", "0.681856", "0.67995816", "0.6760811", "0.6760811", "0.6758937", "0.6758937", "0.6758937", "0.67575264", "0.6727858", "0.6727858", "0.6727858", "0.668107", "0.6675179", "0.66577834", "0.65798885", "0.65572804", "0.6538632", "0.652831", "0.65025616", "0.65024", "0.6500702", "0.6485471", "0.6485471", "0.6472307", "0.64669096", "0.6464174", "0.64595234", "0.6455267", "0.6454278", "0.64449954", "0.6442172", "0.6441758", "0.64378345", "0.64311373", "0.6406415", "0.6381191", "0.63732463", "0.6369691", "0.63575673", "0.6345192", "0.6345192", "0.63438064", "0.6343461", "0.6337097", "0.6337097", "0.6337097", "0.63231933", "0.6320853", "0.63030505", "0.63027894", "0.6289499", "0.62846076", "0.6284183", "0.62744796", "0.626346", "0.6254915", "0.6243423", "0.6237298", "0.6235723", "0.62305224", "0.62246215", "0.6219137", "0.62190586", "0.62128377", "0.62106705", "0.62106705", "0.6209509", "0.62088037", "0.6203279", "0.6196701", "0.6191316", "0.6186864", "0.6185265", "0.61798805", "0.6179756", "0.6179756", "0.6179756", "0.6178239", "0.61728376", "0.6170987", "0.6168315", "0.61646724", "0.61591476", "0.61588395", "0.61587566", "0.6141795", "0.61403954", "0.613931", "0.61392134", "0.6135831", "0.6134836", "0.6132903", "0.6132903", "0.61250854", "0.6121201", "0.612071", "0.6118942", "0.61184615", "0.61181235" ]
0.73488325
0
Get the data type manager for the program.
public DataTypeManager getDataTypeManager();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TypeManager getTypeManager() {\n return types;\n }", "@Override\n\tpublic DataType getDataType() {\n\t\tif (dataType == null) {\n\t\t\tdataType = getDataType(getProgram());\n\t\t}\n\t\treturn dataType;\n\t}", "public static DataManager getInstance()\n\t{\n\t\tDataManager pManager = null;\n\t\tObject pObject = UiStorage.getEntity(DataManager.class);\n\t\tif ( null == pObject )\n\t\t{\n\t\t\tpManager = new DataManager();\n\t\t\tUiStorage.setEntity(pManager);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpManager = (DataManager)pObject;\n\t\t}\n\t\t\n\t\treturn pManager;\n\t}", "public DraftDataManager getDataManager() {\n return dataManager;\n }", "public PcodeDataTypeManager(Program prog) {\n\n\t\tprogram = prog;\n\t\tprogDataTypes = prog.getDataTypeManager();\n\t\tdataOrganization = progDataTypes.getDataOrganization();\n\t\tvoidInputIsVarargs = true;\t\t\t\t// By default, do not lock-in void parameter lists\n\t\tdisplayLanguage = prog.getCompilerSpec().getDecompilerOutputLanguage();\n\t\tif (displayLanguage != DecompilerLanguage.C_LANGUAGE) {\n\t\t\tvoidInputIsVarargs = false;\n\t\t}\n\t\tgenerateCoreTypes();\n\t\tsortCoreTypes();\n\t\tpointerWordSize = ((SleighLanguage) prog.getLanguage()).getDefaultPointerWordSize();\n\t}", "public DataStoreType getDataStoreType() {\n return dataStoreType;\n }", "public Class getDataType() {\n return datatype;\n }", "DataType createDataType();", "protected SchemaTypeLoader getSchemaTypeLoader() {\n return Connector15DCBRoot.SCHEMA_TYPE_LOADER;\n }", "final protected TypeConversionManager getTypeConversionManager() {\r\n return typeConversionManager;\r\n }", "public static DataType getDataType(Program program) {\n\n\t\tDataTypeManager dataTypeManager = program.getDataTypeManager();\n\t\tboolean isRelative = isRelative(program);\n\t\tCategoryPath categoryPath = new CategoryPath(CATEGORY_PATH);\n\t\tStructureDataType struct =\n\t\t\tgetAlignedPack4Structure(dataTypeManager, categoryPath, STRUCTURE_NAME);\n\n\t\t// Add the components.\n\t\tDataType compDt;\n\n\t\t/* comps[0] */\n\t\tDataType ehStateDt = MSDataTypeUtils.getEHStateDataType(program);\n\t\tif (ehStateDt == null) {\n\t\t\tehStateDt = new IntegerDataType(dataTypeManager);\n\t\t}\n\t\tstruct.add(ehStateDt, \"toState\", null);\n\n\t\t/* comps[1] */\n\t\tif (isRelative) {\n\t\t\tcompDt = new IBO32DataType(dataTypeManager);\n\t\t}\n\t\telse {\n\n\t\t\tFunctionDefinitionDataType functionDefDt = new FunctionDefinitionDataType(\n\t\t\t\tnew CategoryPath(\"/ehdata.h/functions\"), \"action\", dataTypeManager);\n\t\t\tfunctionDefDt.setReturnType(new VoidDataType(dataTypeManager));\n\t\t\tcompDt = new PointerDataType(functionDefDt, dataTypeManager);\n\t\t}\n\t\tstruct.add(compDt, \"action\", null);\n\n\t\tTypedefDataType typedefDt =\n\t\t\tnew TypedefDataType(categoryPath, DATA_TYPE_NAME, struct, dataTypeManager);\n\n\t\treturn MSDataTypeUtils.getMatchingDataType(program, typedefDt);\n\t}", "public static DataManager getInstance() {\n return instance == null ? (instance = new DataManager()) : instance;\n }", "DatabaseTypes getDatabaseType();", "public Hashtable getDataTypeDefinitions() {\n return ComponentHelper.getComponentHelper(this).getDataTypeDefinitions();\n }", "DatatypesType createDatatypesType();", "UmType getUserManager();", "@Override\n public DatabaseType getDatabaseType() {\n return mappings.getDatabaseType();\n }", "TypePackage getTypePackage();", "public DataType getType() {\n return type;\n }", "public final DATATYPE getDataType(){\n\t\t\n\t\treturn wDataType;\n\t}", "java.lang.String getAppType();", "public DataBufferType getType()\r\n {\r\n return type;\r\n }", "public Class dataType() {\n return this.dataType;\n }", "public static DataType get(String type)\n {\n return lookup.get(type);\n }", "OsType getObjectStore();", "public ObjType getType () {\n\t\tif (type == null) {\n\t\t\ttype = Virtue.getInstance().getConfigProvider().getObjTypes().list(id);\n\t\t}\n\t\treturn type;\n\t}", "public final PersistenceManager getPersistenceManager (){\n//\t\tSystem.out.println (\"returning persistent manager for properties \"+\tthis._dataStoreEnvironment.getDataStoreProperties ());\n\t\treturn this.pm;\n\t}", "int getDataType();", "public final T getManager() {\n return this.manager;\n }", "public String getDataType() ;", "protected abstract DbType getDatabaseType();", "public static ITypeAnalyzer getTypeAnalyzer() {\n return typeAnalyzer;\n }", "public DataType getDataType() {\r\n\t\treturn dataType;\r\n\t}", "public int getData_type_id() {\n return data_type_id;\n }", "public TypeData getTypeData(MigrationType type);", "public DataType getDataType() {\n return this.dataType;\n }", "public String getDataType() {\r\n return dataType;\r\n }", "public String getDataType() {\n return dataType;\n }", "protected String getDataType()\n {\n return dataType;\n }", "SchemaManager getSchemaManager();", "public Type getType() {\n \t\tif(type == null) {\n \t\t\ttry {\n \t\t\t\tsetType(B3BackendActivator.instance.getBundle().loadClass(getQualifiedName()));\n \t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO: ?? Need to handle this, so the \"not found\" surfaces to the user...\n\t\t\t\t// Handled via model validation - type can not be null\n \t\t\t}\n \t\t}\n \t\treturn type;\n \t}", "public MemoryType getMemoryType() {\n Long __key = this.memoryTypeId;\n if (memoryType__resolvedKey == null || !memoryType__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n MemoryTypeDao targetDao = daoSession.getMemoryTypeDao();\n MemoryType memoryTypeNew = targetDao.load(__key);\n synchronized (this) {\n memoryType = memoryTypeNew;\n \tmemoryType__resolvedKey = __key;\n }\n }\n return memoryType;\n }", "public Class getRunTimeType() {\n return lho.getRuntimeType();\n }", "public static MetaDataManager getInstance() {\n return instance;\n }", "public ObjectType getJVMType();", "private JsonSchema getDataUseInstance() {\n String schemaString = getDataUseSchemaV3();\n JsonSchemaFactory factory = JsonSchemaFactory.getInstance(VersionFlag.V7);\n return factory.getSchema(schemaString);\n }", "public int getDataType();", "public String getDataType() \n {\n System.out.println(dataType.getValue().toString());\n return dataType.getValue().toString(); \n }", "public Class<? extends AttributeDescription> getDataType();", "@SuppressWarnings(\"rawtypes\")\n \tpublic static Class getDataWatcherClass() {\n \t\treturn getMinecraftClass(\"DataWatcher\");\n \t}", "java.lang.String getDataType();", "public Class getDataClass();", "TypeSystemDefinition createTypeSystemDefinition();", "public static DataModule getInstance() {\n return Holder.INSTANCE;\n }", "FdmType getFacetDescriptorManager();", "public DbType getDbType()\n {\n String dbTypeStr = this.getDbTypeStr();\n DbType dType = DbType.getDbTypeByDbName(dbTypeStr);\n return dType;\n }", "@NonNull\n public static ProtocolManager manager() {\n return ProtocolLibrary.getProtocolManager();\n }", "Manager getManager() {\n return Manager.getInstance();\n }", "Manager getManager() {\n return Manager.getInstance();\n }", "Manager getManager() {\n return Manager.getInstance();\n }", "public static TooType get(ISPProgram prog) {\n return ((SPProgram) prog.getDataObject()).getTooType();\n }", "private static Class<? extends DataStore> getSpecificDataStore(\n Type datastoreType) {\n switch (datastoreType) {\n case DYNAMODB:\n return DynamoDBStore.class;\n case CASSANDRA:\n case HBASE:\n case ACCUMULO:\n case MONGO:\n //return MongoStore.class;\n default:\n throw new IllegalStateException(\"DataStore not supported yet.\");\n }\n }", "public String getDatabaseType() {\r\n return m_databaseType;\r\n }", "public static DsDbmsTypes createEntity(EntityManager em) {\n DsDbmsTypes dsDbmsTypes = new DsDbmsTypes()\n .dbmsTypeName(DEFAULT_DBMS_TYPE_NAME)\n .dbsmTypeDescription(DEFAULT_DBSM_TYPE_DESCRIPTION);\n return dsDbmsTypes;\n }", "DatatypeType createDatatypeType();", "public <T> T createDomainManager() throws LauncherException {\n return (T)domainManager(\".\");\n }", "public MapDataManager getMapDataManager(String mapId) {\n if (mapId == null) {\n return defaultMapDataManager;\n }\n MapDataManager manager = mapDataManagers.get(mapId);\n if (manager == null) {\n manager = new MapDataManager();\n mapDataManagers.put(mapId, manager);\n }\n return manager;\n }", "private TypeMapper getTypeMapper() {\n\t\tif (JjsUtils.closureStyleLiteralsNeeded(this.options)) {\n\t\t\treturn new ClosureUniqueIdTypeMapper(jprogram);\n\t\t}\n\t\tif (this.options.useDetailedTypeIds()) {\n\t\t\treturn new StringTypeMapper(jprogram);\n\t\t}\n\t\treturn this.options.isIncrementalCompileEnabled()\n\t\t\t\t? compilerContext.getMinimalRebuildCache().getTypeMapper()\n\t\t\t\t: new IntTypeMapper();\n\t}", "public TypeAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = TypePackage.eINSTANCE;\n\t\t}\n\t}", "DType getType();", "@RestrictTo(RestrictTo.Scope.LIBRARY)\n @DataType\n public int getDataType() {\n return mBundle.getInt(DATA_TYPE_FIELD, -1);\n }", "public String datatype() {\n\t\treturn datatype;\n\t}", "public int getDatabaseType()\n {\n return Constants.LOCAL | Constants.SHARED_DATA | Constants.LOCALIZABLE;\n }", "CodeSetsType createCodeSetsType();", "public static DatabaseManager getDatabaseManager() {\r\n return dbManager;\r\n }", "public DatabaseManager getDatabase() {\n\t\treturn (db);\n\t}", "public ParserType getParserType() {\n\t\treturn parser;\n\t}", "@Override\n\tpublic java.lang.String getAppType() {\n\t\treturn _scienceApp.getAppType();\n\t}", "public Type getValue() {\n Type ret = null;\n try {\n Constructor constructor = valueClass.getConstructor(new Class[] { String.class });\n ret = (Type) constructor.newInstance(data);\n } catch (Exception e) {\n throw new ClassCastException();\n }\n return ret;\n }", "public String getDatatype()\n {\n return mDatatype;\n }", "@Override\n\tpublic Class<?>[] getSupportedDataTypes() {\n\t\treturn new Class[] { Program.class };\n\t}", "public PackageManager getPackageManager() {\r\n\t\treturn mPm;\r\n\t}", "public MetadataType getType();", "public static DepartmentManager getInstance() {\n if (instance == null) {\n instance = new DepartmentManager();\n }\n return instance;\n }", "Type getForPersistentMapping_Type() {\n return type;\n }", "@Override\r\n public GenericManager<TraitSalaire, Long> getManager() {\r\n return manager;\r\n }", "DataTypeInstance getDataInstance();", "public Type getType(Context context, boolean generate) {\n if (type == null) {\n type = new PrimitiveType(data.getClass());\n }\n return type; \n }", "MachineType getType();", "public MetadataType getType() {\n return type;\n }", "public static DBManager getInstance() {\n return DB_MANAGER;\n }", "ImplementationManager createManager();", "public abstract <T extends Manager> T getManager(Class<T> expected);", "public TypeManager()\n {\n\tlistModel = new DefaultListModel();\n\tallTypes = new Vector();\n setupPrimitiveTypes();\n }", "public synchronized String getManager()\r\n {\r\n return manager;\r\n }", "@SuppressWarnings(\"unchecked\")\n private Class<? extends BaseDataParserInterface> getDataParserClass(Integer baseType) {\n Class<? extends BaseDataParserInterface> c = null;\n\n if (baseDataParserClasses.get(baseType) == null) {\n String cname = context.getPackageName() + \".bases.b\" + baseType + \".BaseDataParser\";\n if (cname != null) {\n try {\n c = (Class<? extends BaseDataParserInterface>) Class.forName(cname);\n }\n catch (ClassNotFoundException e) {\n Log.e(TAG, \"Looking for BaseDataParser Class (\" + cname + \"), not found: \" + e.getMessage());\n }\n catch (Exception e) {\n Log.e(TAG, \"Looking for BaseDataParser Class Error: \" + e.getMessage());\n }\n }\n if (c != null) {\n baseDataParserClasses.put(baseType, c);\n }\n }\n else {\n c = baseDataParserClasses.get(baseType);\n }\n\n return c;\n }", "private DataManager() {\n databaseManager = DatabaseManager.getInstance();\n }", "public TypesAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = TypesPackage.eINSTANCE;\n\t\t}\n\t}", "public String getModuleTypeClass();", "public Class getContextType();" ]
[ "0.65205866", "0.64527774", "0.5865182", "0.5797112", "0.5687261", "0.5663989", "0.5572427", "0.55251837", "0.54934424", "0.5487025", "0.54624254", "0.54623246", "0.5451854", "0.54323864", "0.54166216", "0.54111373", "0.5292336", "0.52419287", "0.52241075", "0.52218723", "0.5221242", "0.5218435", "0.5217047", "0.5212792", "0.52100885", "0.5198287", "0.51910144", "0.5189427", "0.51795006", "0.51749545", "0.51670825", "0.51598626", "0.5158537", "0.5152826", "0.5148624", "0.5130101", "0.5126725", "0.51213706", "0.51053953", "0.50820124", "0.5079308", "0.50759524", "0.50748396", "0.5067965", "0.5062548", "0.50615793", "0.50563693", "0.5051089", "0.5050622", "0.50479436", "0.50442165", "0.5030826", "0.50250334", "0.5021718", "0.50170505", "0.50143045", "0.50121796", "0.5006478", "0.5006478", "0.5006478", "0.5001347", "0.49999478", "0.4994894", "0.4990298", "0.49843258", "0.49749807", "0.49665093", "0.49650982", "0.4951707", "0.49327493", "0.49286553", "0.49178064", "0.49145487", "0.49114516", "0.49034533", "0.4886612", "0.48843837", "0.48831522", "0.48806325", "0.48698562", "0.48603773", "0.48498347", "0.4842979", "0.48373938", "0.4836718", "0.48295584", "0.48276994", "0.4827436", "0.48135462", "0.481193", "0.48061797", "0.48029208", "0.4802148", "0.47990385", "0.47939125", "0.47861844", "0.47771168", "0.4768036", "0.47647673", "0.47625342" ]
0.7733786
0
Create a function with an entry point and a body of addresses.
public Function createFunction(String name, Address entryPoint, AddressSetView body, SourceType source) throws InvalidInputException, OverlappingFunctionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Function createFunction(String name, Namespace nameSpace, Address entryPoint,\n\t\t\tAddressSetView body, SourceType source)\n\t\t\tthrows InvalidInputException, OverlappingFunctionException;", "public Function getFunctionAt(Address entryPoint);", "Address createAddress();", "EntryPoint createEntryPoint();", "Function createFunction();", "public Address createAddress(String address);", "abstract public Address createAddress(String addr);", "Adresse createAdresse();", "FunctionExtract createFunctionExtract();", "public Function getFunctionContaining(Address addr);", "public static void main(String[] args) {\n\t\tnameAndAddress();\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\"This is the first method that I have ever created! Cool stuff!\");\n\t}", "private LispSimpleAddressStringifier() {\n }", "public @NotNull Address newAddress();", "void genAddressCode(FuncDecl curFunc) {\n\tif (index == null) {\n\t Code.genInstr(\"\", \"leal\", declRef.assemblerName+\",%eax\", varName);\n\t} else {\n\t index.genCode(curFunc);\n\t if (declRef.type instanceof ArrayType) {\n\t\tCode.genInstr(\"\", \"leal\", declRef.assemblerName+\",%edx\", \n\t\t\t varName+\"[...]\");\n\t } else {\n\t\tCode.genInstr(\"\", \"movl\", declRef.assemblerName+\",%edx\", \n\t\t\t varName+\"[...]\");\n\t }\n\t Code.genInstr(\"\", \"leal\", \"(%edx,%eax,4),%eax\", \"\");\n\t}\n }", "public Address add() {\n console.promptForPrintPrompt(\" ++++++++++++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER INFORMATION FOR A NEW ENTRY +\");\n console.promptForPrintPrompt(\" ++++++++++++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String firstName = console.promptForString(\" FIRST NAME: \");\n String lastName = console.promptForString(\" LAST NAME: \");\n String street = console.promptForString(\" STREET: \");\n String city = console.promptForString(\" CITY: \");\n String state = console.promptForString(\" STATE: \");\n String zip = console.promptForString(\" ZIPCODE: \");\n\n Address add = new Address(utils.nameFormatter(firstName), utils.nameFormatter(lastName), street, city, state, zip);\n\n return add;\n }", "public static Address addAddress() {\r\n\r\n\t\tSystem.out.println(\"Please enter the building number of the supplier:\");\r\n\r\n\t\tint bldNum = Validation.intValidation();\r\n\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the supplier's street name:\");\r\n\t\tString bldStreet = Validation.stringNoIntsValidation();\r\n\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the town the supplier is in:\");\r\n\t\tString bldTown = Validation.stringNoIntsValidation();\t\t\r\n\r\n\t\tSystem.out.println(\"Please enter the postcode for the supplier:\");\r\n\t\tString bldPCode = Validation.stringValidation();\r\n\r\n\t\tSystem.out.println(\"Please enter the country the supplier is in:\");\r\n\t\tString bldCountry = Validation.stringNoIntsValidation();\r\n\r\n\t\tAddress newAddress = new Address(bldNum, bldStreet, bldTown, bldPCode, bldCountry);\r\n\r\n\t\treturn newAddress;\r\n\r\n\t}", "public void generate(){\n\t// Write constants/static vars section\n\twriteln(\".data\");\n\tfor ( String global : globalVars ) {\n\t // Initialized to zero. Why not?\n\t writeln(global+\":\\t.word 0\");\n\t}\n\twriteln(\"nl:\\t.asciiz \\\"\\\\n\\\"\");\n writeln(\"\\t.align\\t4\");\n\n\t// Write the prefix\n\twriteln(\".text\");\n\twriteln(\"entry:\");\n writeln(\"\\tjal main\");\n writeln(\"\\tli $v0, 10\");\n writeln(\"\\tsyscall\");\n\twriteln(\"printint:\");\n writeln(\"\\tli $v0, 1\");\n writeln(\"\\tsyscall\");\n writeln(\"\\tla $a0, nl\");\n writeln(\"\\tli $v0, 4\");\n writeln(\"\\tsyscall\");\n writeln(\"\\tjr $ra\");\n\n\tString defun = \"\";\t// Holds the place of the current function\n\tint spDisplacement=0;\t// Stores any displacement we do with $sp\n\n\tfor ( int i=0; i<codeTable.size(); i++ ) {\n\t CodeEntry line = codeTable.get(i);\n\n\t if ( line instanceof Label ) {\n\t\tLabel label = (Label)line;\n\t\twriteln( line.toString() );\n\t\tif ( label.isFunction() )\n\t\t makeFrame( defun = label.name() );\n\t }\n\t else if ( line instanceof Tuple ) {\n\t\tTuple tuple = (Tuple)line;\n\t\t// \n\t\t// Pushing arguments onto the stack (op = \"pusharg\"|\"pushaddr\")\n\t\t// \n\t\tif ( tuple.op.equals(\"pusharg\") || tuple.op.equals(\"pushaddr\") ) {\n\t\t ArrayList<Tuple> argLines = new ArrayList<Tuple>();\n\t\t ArrayList<String> lvOrAddr = new ArrayList<String>();\n\t\t while ( (tuple.op.equals(\"pusharg\") || tuple.op.equals(\"pushaddr\") )\n\t\t\t && i < codeTable.size() ) {\n\t\t\targLines.add( tuple );\n\t\t\tlvOrAddr.add( tuple.op );\n\t\t\tline = codeTable.get( ++i );\n\t\t\tif ( line instanceof Tuple )\n\t\t\t tuple = (Tuple)line;\n\t\t }\n\t\t // Move the stack pointer to accomodate args\n\t\t writeInst(\"subi\t$sp, $sp, \"+(4*argLines.size()));\n\t\t spDisplacement = 4;\n\t\t for ( int j=0; j < argLines.size(); j++ ) {\n\t\t\tTuple argLine = argLines.get(j);\n\t\t\tString theOp = lvOrAddr.get(j);\n\t\t\t// Pass a copy of the argument\n\t\t\tif ( theOp.equals(\"pusharg\") ) {\n\t\t\t if ( isNumber(argLine.place) )\n\t\t\t\twriteInst(\"li\t$t0, \"+argLine.place);\n\t\t\t else\n\t\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, argLine.place ));\n\t\t\t}\n\t\t\t// Pass-by-reference\n\t\t\telse {\n\t\t\t writeInst(\"la\t$t0, \"+printOffset( defun, argLine.place));\n\t\t\t}\n\t\t\twriteInst(\"sw\t$t0, \"+spDisplacement+\"($sp)\");\n\t\t\tspDisplacement+=4;\n\t\t }\n\t\t spDisplacement-=4;\n\n\t\t // Reset counter, put back instruction we didn't use.\n\t\t i--;\n\t\t continue;\n\t\t}\n\t\t// \n\t\t// Calling a function\n\t\t// \n\t\telse if ( tuple.op.equals(\"jal\") ) {\n\t\t writeInst(\"jal\t\"+tuple.arg1);\n\t\t if ( ! tuple.place.equals(\"\") )\n\t\t\twriteInst(\"sw\t$v0, \"+printOffset( defun, tuple.place ));\n\t\t // Move back the $sp from all the \"pushargs\" we probably did\n\t\t if ( spDisplacement > 0 )\n\t\t\twriteInst(\"addi\t$sp, $sp, \"+spDisplacement);\n\t\t}\n\t\t//\n\t\t// Returning from a function (\"return\")\n\t\t//\n\t\telse if ( tuple.op.equals(\"return\") ) {\n\t\t if ( ! tuple.place.equals(\"\") ) {\n\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t\twriteInst(\"move\t$v0, $t0\");\n\t\t }\n\t\t writeInst(\"move\t$sp, $fp\");\n\t\t writeInst(\"lw\t$ra, -4($sp)\");\n\t\t writeInst(\"lw\t$fp, 0($fp)\");\n\t\t writeInst(\"jr\t$ra\");\n\t\t \n\t\t}\n\t\t//\n\t\t// Arithmetic operations requiring two registers for operands\n\t\t//\n\t\telse if ( tuple.op.equals(\"sub\") ||\n\t\t\t tuple.op.equals(\"mul\") ||\n\t\t\t tuple.op.equals(\"div\") ||\n\t\t\t tuple.op.equals(\"rem\") ) {\n\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t if ( tuple.op.equals(\"sub\") && isNumber(tuple.arg2) ) {\n\t\t\twriteInst(\"subi\t$t0, $t1, \"+tuple.arg2);\n\t\t }\n\t\t else {\n\t\t\tif ( isNumber(tuple.arg2) )\n\t\t\t writeInst(\"li\t$t2, \"+tuple.arg2);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"\\t$t0, $t1, $t2\");\n\t\t }\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t// \n\t\t// Arithmetic operations that have a separate 'immediate' function,\n\t\t// and where we can reduce # of instructions\n\t\t//\n\t\telse if ( tuple.op.equals(\"add\") ||\n\t\t\t tuple.op.equals(\"and\") ||\n\t\t\t tuple.op.equals(\"or\") ) {\n\t\t if ( isNumber(tuple.arg2) ) {\n\t\t\tif ( isNumber(tuple.arg1) )\n\t\t\t writeInst(\"li\t$t1, \"+tuple.arg1);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t\twriteInst(tuple.op+\"i\t$t0, $t1, \"+tuple.arg2);\n\t\t }\n\t\t else if ( isNumber(tuple.arg1) ) {\n\t\t\tif ( isNumber(tuple.arg2) )\n\t\t\t writeInst(\"li\t$t1, \"+tuple.arg2);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"i\t$t0, $t1, \"+tuple.arg1);\n\t\t }\n\t\t else {\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t\twriteInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"\t$t0, $t1, $t2\");\n\t\t }\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Arithmetic operations requiring only one register for an operand\n\t\t// \n\t\telse if ( tuple.op.equals(\"not\") ||\n\t\t\t tuple.op.equals(\"neg\") ) {\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Immediate arithmetic expressions\n\t\t//\n\t\telse if ( tuple.op.equals(\"addi\") ||\n\t\t\t tuple.op.equals(\"subi\") ) {\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1, \"+tuple.arg2);\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Assignment and other stuff that does '='\n\t\t//\n\t\telse if ( tuple.op.equals(\"copy\") ) {\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t0, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Loading arrays\n\t\t//\n\t\telse if ( tuple.op.equals(\"lw\") ) {\n\t\t // Find the location of the base address, put it in t0\n\t\t // writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\n\t\t // The base address of the array gets loaded into $t0\n\t\t writeInst(\"la\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\t\t // Add to it the precalculated address offset\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sub\t$t0, $t0, $t1\");\n\t\t // Store a[n] into a temp\n\t\t writeInst(\"lw\t$t0, 0($t0)\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Loading arrays that are passed by reference\n\t\t//\n\t\telse if ( tuple.op.equals(\"la\") ) {\n\t\t // The base address of the array gets loaded into $t0\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\t\t // Add to it the precalculated address offset\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sub\t$t0, $t0, $t1\");\n\t\t // Store a[n] into a temp\n\t\t writeInst(\"lw\t$t0, 0($t0)\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Writing to arrays\n\t\t//\n\t\telse if ( tuple.op.equals(\"putarray\") || tuple.op.equals(\"putarrayref\") ) {\n\t\t // tuple.place = thing to be stored\n\t\t // tuple.arg1 = base address\n\t\t // tuple.arg2 = offset\n\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t if ( tuple.op.equals(\"putarray\") )\n\t\t\twriteInst(\"la\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t writeInst(\"sub\t$t1, $t1, $t2\");\n\t\t writeInst(\"sw\t$t0, 0($t1)\");\n\t\t}\n\t\t//\n\t\t// Writing to pointers\n\t\t//\n\t\telse if ( tuple.op.equals(\"putpointer\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, ($t1)\");\n\t\t}\n\t\t//\n\t\t// Performing conditional branches\n\t\t// \n\t\telse if ( tuple.op.equals(\"ble\") ||\n\t\t\t tuple.op.equals(\"bge\") ||\n\t\t\t tuple.op.equals(\"beq\") ||\n\t\t\t tuple.op.equals(\"bne\") ||\n\t\t\t tuple.op.equals(\"bgt\") ||\n\t\t\t tuple.op.equals(\"blt\") ||\n\t\t\t tuple.op.equals(\"beq\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1, \"+tuple.arg2);\n\t\t}\n\t\t//\n\t\t// Unconditional branch\n\t\t//\n\t\telse if ( tuple.op.equals(\"b\") ) {\n\t\t writeInst(\"b\t\"+tuple.place);\n\t\t}\n\t\t//\n\t\t// Branch equal to zero\n\t\t//\n\t\telse if ( tuple.op.equals(\"beqz\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"beqz\t$t0, \"+tuple.arg1);\n\t\t}\n\t\t//\n\t\t// Dereferences\n\t\t//\n\t\telse if ( tuple.op.equals(\"deref\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"lw\t$t0, ($t1)\");\n\t\t}\n\t\t//\n\t\t// Address-of (&)\n\t\t//\n\t\telse if ( tuple.op.equals(\"addrof\") ) {\n\t\t writeInst(\"la\t$t0, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t }\n\t}\n\n }", "public Call inviteAddress(Address addr);", "FunCall createFunCall();", "public static void pinAddresses(HashMap<String, Object> argVals, HashMap<String, Object> retVals){\n\t\t\n\t\tLinkedList<String> addresses = (LinkedList<String>)argVals.get(\"address\");\n\t\tLinkedList<String> comments = (LinkedList<String>) argVals.get(\"addressInfo\");\n\t\tshowMap(addresses,comments,false);\t\n\t}", "public static void main(String [] args) \n {\n \tStreetAddress one = new StreetAddress(\"Hank Street\", 443);\n \tSystem.out.println(one);\n }", "SerialResponse createRecipient(PinRecipientPost pinRecipientPost);", "public static void main(String[] args) {\n\t\tAddress addr = new Address();\n\t\taddr.setCity(\"Louisville\");\n\t\taddr.setState(\"KY\");\n\t\taddr.setZipCode(\"40219\");\n\t\taddr.setStreet(\"123 Main Street\");\n\t\tSystem.out.println(addr);\n\t}", "public Friend createFriendWithAddress(String address);", "EndPoint createEndPoint();", "public static void main(String args[]) throws Exception {\n new AddressApplication().run(args);\n }", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static void main(String[] args) {\n\t\tHelloService helloService=(String firstname, String lastname) -> \r\n\t\t{ String hello=\"Hello \" + firstname + \" \" + lastname; return hello; };\r\n\t\tSystem.out.println(helloService.hello(args[0], args[1]));\r\n\t\t \r\n\r\n\t\t \r\n\t}", "EntryPointResult evaluate(Object data, String entryPointName);", "public static void main(String[] args) {\n Employee employee1 = Controller.createEmployee(\"John\",\n \"Doe\",\n \"Test Street\",\n \"+41 41 000 00 00\",\n \"12345678\");\n\n /**\n * 2) Print the employee name, surname and ID.\n */\n View.printEmployee(employee1);\n\n /**\n * 3) Update the employee address\n */\n View.updateAddress(employee1, \"Test Street 456\");\n\n /**\n * 4) Print the new address\n */\n View.printAddress(employee1);\n\n /**\n * 5) Update the employee phone number\n */\n View.updatePhoneNumber(employee1, \"+41 41 111 11 11\");\n\n /**\n * 6) Print the new phone number\n */\n View.printPhoneNumber(employee1);\n\n }", "private void buildFunctionBody(IFunction nd) {\n this.ctxt.push((Node) nd);\n\n // build a list of all parameters and default expressions in order, with\n // the default expressions preceding their corresponding parameter\n List<Expression> paramsAndDefaults = new ArrayList<Expression>();\n for (int j = 0, n = nd.getParams().size(); j < n; ++j) {\n if (nd.hasDefault(j)) paramsAndDefaults.add(nd.getDefault(j));\n paramsAndDefaults.add((Expression) nd.getParams().get(j));\n }\n if (nd.hasRest()) paramsAndDefaults.add((Expression) nd.getRest());\n\n Node entry = getEntryNode(nd);\n List<Identifier> fns = HoistedFunDecls.of(nd);\n hoistedFns.addAll(fns);\n\n // if this is the constructor of a class without a superclass, we need to\n // initialise all fields before running the body of the constructor\n // (for classes with a superclass, that initialisation only happens after\n // `super` calls)\n AClass klass = constructor2Class.get(nd);\n FieldDefinition firstField = null;\n if (klass != null && !klass.hasSuperClass()) {\n Pair<FieldDefinition, FieldDefinition> p = instanceFields.peek();\n if (p != null) {\n firstField = p.fst();\n writeSuccessor(p.snd(), First.of(nd.getBody()));\n }\n }\n\n Collection<Node> fst = visitSequence(nd.getBody(), this.getExitNode(nd));\n if (firstField != null) fst = Collections.singleton(First.of(firstField));\n fst =\n visitSequence(\n nd instanceof FunctionDeclaration ? null : nd.getId(), paramsAndDefaults, fns, fst);\n writeSuccessors(entry, fst);\n\n this.ctxt.pop();\n }", "@Override\n public final void noteAbsoluteEntryPoint(int address) {\n }", "public @NotNull Address newAddress(@NotNull @Size(min = 1, max = 255) final String street,\r\n\t\t\t@NotNull @Size(min = 1, max = 255) final String city, @NotNull final State state, @NotNull Integer zipcode);", "public abstract Endpoint createAndPublishEndpoint(String address, Object implementor);", "public static Address createInvalidAddressFixture() {\n Map<String, Object> objectMap = new HashMap<String, Object>();\n objectMap.put(\"name\", \"Undefault New Wu\");\n objectMap.put(\"street1\", \"Clayton St.\");\n objectMap.put(\"street_no\", \"215215\");\n objectMap.put(\"street2\", null);\n objectMap.put(\"city\", \"San Francisco\");\n objectMap.put(\"state\", \"CA\");\n objectMap.put(\"zip\", \"94117\");\n objectMap.put(\"country\", \"US\");\n objectMap.put(\"phone\", \"+1 555 341 9393\");\n objectMap.put(\"email\", \"[email protected]\");\n objectMap.put(\"is_residential\", false);\n objectMap.put(\"metadata\", \"Customer ID 123456\");\n objectMap.put(\"validate\", true);\n\n try {\n return Address.create(objectMap);\n } catch (ShippoException e) {\n e.printStackTrace();\n }\n return null;\n }", "public Call inviteAddressWithParams(Address addr, CallParams params);", "public void removeFunction(Address entryPoint);", "Pin createPin();", "public static void main(String[] args) {\n\t\tZhangSan zs = new ZhangSan();\n\t\tzs.eat();\n\t\tzs.print();\n\t\tSystem.out.println(zs.address);\n\t}", "public CALL(Exp f, ExpList a) {func=f; args=a;}", "public static void main(String[] args) {\n Website websiteInfo = collectInput();\n creator(websiteInfo);\n }", "public static void main(String[] args) {\n FunctionFactory<Integer, Integer> functionFactory = new FunctionFactory<>();\n // 1. add simple functions \"square\", \"increment\", \"decrement\", \"negative\"\n // 2. get each function by name, and apply to argument 5, print a result (should be 25, 6, 4,-5 accordingly)\n // 3. add simple function \"abs\" using method reference (use class Math)\n // 4. add try/catch block, catch InvalidFunctionNameException and print some error message to the console\n // 5. try to get function with invalid name\n\n functionFactory.addFunction(\"square\", n -> n * n);\n functionFactory.addFunction(\"abs\", Math::abs);\n\n functionFactory.getFunction(\"square\").apply(5);\n try{\n functionFactory.getFunction(\"abs\").apply(5);\n }catch (InvalidFunctionNameException e){\n System.out.println(e.getMessage());\n }\n\n\n\n\n }", "public static void main(String[] args) {\n\t\tPoint point = new Point(2, 3, CoordinateSystem.CARTESIAN);\n\n\t\t// singleton access\n\t\tPoint origin = Point.ORIGIN;\n\n\t\t// Inner factory class\n\t\tPoint innerFactoryClass = Point.Factory.newCartesianPoint(1, 2);\n\n\t\t// External factory class\n\t\tPoint externalFactoryClass = PointFactory.newCartesianPoint(1, 2);\n\n\t}", "public Function( String name, Hex hex, String notes )\n {\n this.name = name;\n data = hex;\n this.notes = notes;\n }", "EntryPointResult evaluate(Object data, String entryPointName, EvaluationConfig evaluationConfig);", "public static void main(String[] args) {\n\t\tPerson person=new Person(){\n\t\t\tvoid eat(){\n\t\t\t\tSystem.out.println(\"i am eating ice cream\");\n\t\t\t\n\t\t\t}\n\t\t};\n\t\tperson.eat();\n\t}", "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 }", "Point createPoint();", "public static void main(String[] args) \n\t{\n\t\tdisplayAddress();\n\t\tdisplayAddress2();\n\t\tSystem.out.print(\"First!!!!\");\n\t}", "AionAddress createAccount(String password);", "@Override\r\n\tpublic FuncCallProgramPoint addFuncCallProgramPoint(String name,\r\n\t\t\tString lineNo) {\n\t\treturn null;\r\n\t}", "public interface AddressFactory<A extends Address, P extends PhoneNumber> {\n\n\tpublic A createAddress();\n\n\tpublic P createPhoneNumber();\n\n}", "AExpArgs createAExpArgs();", "public Address runAddressRules(Address addr) throws RuleException, BusinessException;", "public static <TDelegate> FunctionExpression<TDelegate> lambda(Expression body, String name, boolean tailCall, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }", "Program createProgram();", "Program createProgram();", "Program createProgram();", "public static String buildPostAddressRequestBody() {\n\t\tStringWriter sw = new StringWriter();\n\t\tPrintWriter pw = new PrintWriter( sw );\n\t\tpw.println(\"{\");\n\t\tpw.println(\" \\\"address\\\": {\");\n\t\tpw.println(\" \\\"address1\\\":\\\"12345 Ramsfell Court\\\",\");\n\t\tpw.println(\" \\\"address2\\\":null,\");\n\t\tpw.println(\" \\\"city\\\":\\\"San Diego\\\",\");\n\t\tpw.println(\" \\\"postalCode\\\":\\\"92131\\\",\");\n\t\tpw.println(\" \\\"state\\\":\\\"CA\\\",\");\n\t\tpw.println(\" \\\"country\\\":\\\"US\\\"\");\t\t\t\n\t\tpw.println(\" }\");\n\t\tpw.println(\"}\");\n\t\treturn sw.toString();\n\t}", "private Function createLambdaFunction()\n {\n return lambdaFunctionBuilder().build();\n }", "public static void main(String[] args){\t \n\t FunctionTest ft = ()-> System.out.println(\"Hola Mundo\");\n ft.saludar();\n\t}", "public static LambdaExpression lambdaE(Expression body, String name, boolean tailCall, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }", "Coordinate createCoordinate();", "public FuncBody func_body() {\n Declaration dec = decl(null, 2);\n ArrayList<Stmt> alstmt = null;\n alstmt = stmt_list(alstmt);\n\n return new FuncBody(dec, new StmtList(alstmt));\n }", "public static void main(String[] args) {\n\n PersonFactory.<PersonFactoryStudentImpl>getFactory(Student.class)\n .createStuden(\"123\")\n .ifPresent(student -> student.tell(\"Stundent 123\"));\n\n }", "public static void main(String[] args) {\n\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t\n\t\t\tSystem.out.println(\"From Name: \");\n\t\t\tString name = scanner.nextLine();\t\n\t\t\tSystem.out.println(\"From Address Line 1: \");\n\t\t\tString line1 = scanner.nextLine();\n\t\t\tSystem.out.println(\"From Address Line 2: \");\t\t\n\t\t\tString line2 = scanner.nextLine();\n\t\t\tSystem.out.println(\"From City: \");\n\t\t\tString city = scanner.nextLine();\n\t\t\tSystem.out.println(\"From State: \");\n\t\t\tString state = scanner.nextLine();\n\t\t\tSystem.out.println(\"From Country: \");\n\t\t\tString country = scanner.nextLine();\n\t\t\tSystem.out.println(\"From Zip Code: \");\n\t\t\tString zip = scanner.nextLine();\n\t\t\tSystem.out.println(\"From Message: \");\n\t\t\tString message = scanner.nextLine();\n\t\t\t\n\t\t\tscanner.close(); \n\t\t\t\n\t\t\t// Basic conditions to test whether the input is valid\n\t\t\tif(name.length() > 0 && country.length() > 0 && zip.matches(\"[0-9]{5}|([0-9]{5}-[0-9]{4})\")\n\t\t\t\t\t&& city.length() > 0 && line1.length() > 0 && message.length() > 0 && state.matches(\"[a-zA-z]{2}\")) {\n\t\t\t\t\n\t\t\t\t// Constructs the from address object and html message\n\t\t\t\tfrom = new Address(name, country, zip, city, state, line2, line1);\n\t\t\t\thtml += message + \"</html>\";\n\n\t\t\t\ttry {\n\t\t\t\t\t// Fetches the address of the closest official with input address\n\t\t\t\t\tto = getOfficialByAddress(line1 + \" \" + line2 + \" \" + city);\n\t\t\t\t\t\n\t\t\t\t\tLetter toSend = new Letter(from, to, message);\n\t\t\t\t\t\n\t\t\t\t\t// PDF of letter if all fields are valid\n\t\t\t\t\tpdfUrl = sendLetterGeneratePDF(toSend);\n\t\t\t\t\t\n\t\t\t\t\tif(pdfUrl != null && pdfUrl.length() > 0)\n\t\t\t\t\t\tSystem.out.println(\"Success! Generated PDF below:\\n\" + pdfUrl);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\tSystem.out.println(\"Error. Input address was invalid. Please try again.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Error. There was a problem with the given input. Please\"\n\t\t\t\t\t\t+ \" check all fields and try again.\");\n\t\t\t}\n\t}", "Location createLocation();", "Location createLocation();", "Location createLocation();", "public static void main(String[] args) {\n\t\tEmployeeBean employeeBean = new EmployeeBean(\"Dileep\", \"Software Engineer\");\r\n\t\t//System.out.println(employeeBean.ADDRESS);\r\n\r\n\t}", "org.globus.swift.language.Function addNewFunction();", "BODY createBODY();", "FunctionName createStartFunction() throws IOException {\n return new SyntheticFunctionName( \"\", \"<start>\", \"()V\" ) {\n /**\n * {@inheritDoc}\n */\n @Override\n protected boolean hasWasmCode() {\n return true;\n }\n\n /**\n * {@inheritDoc}\n */\n @Override\n protected WasmCodeBuilder getCodeBuilder( WatParser watParser ) {\n watParser.reset( null, null, getSignature( null ) );\n\n while( !clinits.isEmpty() ) {\n FunctionName name = clinits.pop();\n watParser.addCallInstruction( name, 0, -1 );\n scanAndPatchIfNeeded( name );\n }\n return watParser;\n }\n };\n }", "@Override\r\n\tpublic ExecutedFunctionsProgramPoint addExecutedFuncsProgramPoint(\r\n\t\t\tString name, String lineNo) {\n\t\treturn null;\r\n\t}", "public void createBillingAddress() throws Exception{\n\t\t\n\t\ttype(firstNameTextBox,\"bob\");\n\t\ttype(lastNameTextBox,\"test\");\n\t\ttype(addressLine1TextBox,\"2716 Ocean Park Blvd Suite 1030\");\n\t\ttype(addressLine2TextBox,\"test house\");\n\t\ttype(cityTextBox,\"Santa Monica\");\n\t\ttype(zipcodeTextBox,\"90405\");\n\t\tselect(stateSelectBox,8);\n\t\ttype(phoneTextField,\"6666654686\");\n\t\ttype(companyTextField,\"test company\");\n\t\n\t}", "public void create(T e);", "public final void entryRuleFunctionBody() throws RecognitionException {\r\n try {\r\n // InternalGo.g:2980:1: ( ruleFunctionBody EOF )\r\n // InternalGo.g:2981:1: ruleFunctionBody EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getFunctionBodyRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleFunctionBody();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getFunctionBodyRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public void addAddress(String Address, Coord coord);", "public static void main(String[] args) {\n testFactoryMethod();\n }", "Offset createOffset();", "@Override\n public String visit(Goal n) {\n this.addHelperFunc();\n String _ret = null;\n this.procedureName = \"main\";\n this.calcStackSize(Integer.parseInt(n.f2.f0.tokenImage),\n Integer.parseInt(n.f5.f0.tokenImage),\n Integer.parseInt(n.f8.f0.tokenImage));\n this.addProcedureHead();\n n.f10.accept(this);\n this.addProcedureTail();\n n.f12.accept(this);\n return _ret;\n }", "@Override\n public String codeGen() {\n\n\tString labelFun = \"labelFun\" + MiniFunLib.getLabIndex();\n\tString popParSequence = \"\";\n\tString popLocalVariable = \"\";\n\tString localVariableCodeGen = \"\";\n\n\tfor (int i = 0; i < funParams.size(); i++) {\n\t NodeType nt = this.funParams.get(i).getType().getNodeType();\n\n\t if (nt == NodeType.ARROWTYPE_NODE)\n\t\tpopParSequence += VMCommands.POP + \"\\n\" + VMCommands.POP + \"\\n\";\n\t else\n\t\tpopParSequence += VMCommands.POP + \"\\n\";\n\t}\n\n\tfor (int i = 0; i < funLocalVariables.size(); i++) {\n\t localVariableCodeGen += funLocalVariables.get(i).codeGen();\n\t popLocalVariable += VMCommands.POP + \"\\n\";\n\t}\n\n\tString code = labelFun + \" :\\n\" +\n\t// Preparo parte bassa dell'activation Record\n\n\t\t// Il registro FP punterà al nuovo Activation Record\n\t\tVMCommands.CFP + \"\\n\"\n\n\t\t// PUSH dei dati Locali\n\t\t+ localVariableCodeGen +\n\n\t\t// PUSH return address del chiamante\n\t\tVMCommands.LRA + \"\\n\"\n\n\t\t// Corpo della funzione\n\t\t+ funBody.codeGen() +\n\n\t\t// POP RV e salvo nel registro\n\t\tVMCommands.SRV + \"\\n\" +\n\n\t\t// POP RA e salvo nel registro\n\t\tVMCommands.SRA + \"\\n\" +\n\n\t\t// Rimuovo variabili locali\n\t\tpopLocalVariable +\n\t\t// Rimuovo Access Link\n\t\tVMCommands.POP + \"\\n\" +\n\t\t// Rimuovo Pametri\n\t\tpopParSequence +\n\n\t\t// Ripristino il Registro FP che punterà all'Activation Record\n\t\t// del chiamante\n\t\tVMCommands.SFP + \"\\n\" +\n\n\t\t// PUSH valore di ritorno\n\t\tVMCommands.LRV + \"\\n\" +\n\t\t// PUSH indirizzo di ritorno\n\t\tVMCommands.LRA + \"\\n\" +\n\n\t\t// Salto al Chiamante\n\t\tVMCommands.JS + \"\\n\";\n\n\tMiniFunLib.addFunctionCode(code);\n\n\treturn VMCommands.PUSH + \" \" + labelFun + \"\\n\";\n }", "interface WithReturnAddress {\n /**\n * Specifies the returnAddress property: Specifies the return address information for the job..\n *\n * @param returnAddress Specifies the return address information for the job.\n * @return the next definition stage.\n */\n Update withReturnAddress(ReturnAddress returnAddress);\n }", "public Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;", "public static void main(String[] args) {\n\t\t\r\n\t\tAddress add = new Address(\"Sonari\" , \"Jamshedpur\");\t\r\n\t\tAddress add1 = new Address(\"Dhurva\" , \"Ranchi\");\t\r\n\t\tCustomer cust=new Customer();\r\n\t\tcust.setcustomerName(\"Ankit\");\r\n\t\tcust.setresidentialAddress(add);\r\n\t\tcust.setofficialAddress(add1);\r\n\t\t\r\n\t\tSystem.out.println(cust.getCustomerDetails());\r\n\r\n\t}", "FuncDecl createFuncDecl();", "public void newAddress(lnrpc.Rpc.NewAddressRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.NewAddressResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getNewAddressMethod(), getCallOptions()), request, responseObserver);\n }", "private void buildFunctionCreation(IFunction nd, SuccessorInfo i) {\n // `tail` is the last CFG node in the function creation\n INode tail = nd;\n if (!(nd instanceof AFunctionExpression) && !hoistedFns.contains(nd.getId())) {\n writeSuccessor(tail, nd.getId());\n tail = nd.getId();\n }\n writeSuccessors(tail, nd instanceof AFunctionExpression ? i.getSuccessors(true) : i.getAllSuccessors());\n }", "public boolean addFunction(Accessibility pPAccess, SubRoutine pExec, MoreData pMoreData);", "public static void main(String[] args) {\n\t\tEmp emp = new Address();\n\t\temp.show();\n\t\temp.stop();\n\t\t\n\t\t\n\t\tAddress address = (Address) emp;\n\t\taddress.run();\n\n\t}", "@Override\n public String codeGeneration() {\n StringBuilder localDeclarations = new StringBuilder();\n StringBuilder popLocalDeclarations = new StringBuilder();\n\n if (declarationsArrayList.size() > 0) {\n for (INode dec : declarationsArrayList) {\n localDeclarations.append(dec.codeGeneration());\n popLocalDeclarations.append(\"pop\\n\");\n }\n }\n\n //parametri in input da togliere dallo stack al termine del record di attivazione\n StringBuilder popInputParameters = new StringBuilder();\n for (int i = 0; i < parameterNodeArrayList.size(); i++) {\n popInputParameters.append(\"pop\\n\");\n }\n\n\n String funLabel = Label.nuovaLabelFunzioneString(idFunzione.toUpperCase());\n\n if (returnType instanceof VoidType) {\n // siccome il return è Void vengono rimosse le operazioni per restituire returnvalue\n FunctionCode.insertFunctionsCode(funLabel + \":\\n\" +\n \"cfp\\n\" + //$fp diventa uguale al valore di $sp\n \"lra\\n\" + //push return address\n localDeclarations + //push dichiarazioni locali\n body.codeGeneration() +\n popLocalDeclarations +\n \"sra\\n\" + // pop del return address\n \"pop\\n\" + // pop dell'access link, per ritornare al vecchio livello di scope\n popInputParameters +\n \"sfp\\n\" + // $fp diventa uguale al valore del control link\n \"lra\\n\" + // push del return address\n \"js\\n\" // jump al return address per continuare dall'istruzione dopo\n );\n } else {\n //inserisco il codice della funzione in fondo al main, davanti alla label\n FunctionCode.insertFunctionsCode(funLabel + \":\\n\" +\n \"cfp\\n\" + //$fp diventa uguale al valore di $sp\n \"lra\\n\" + //push return address\n localDeclarations + //push dichiarazioni locali\n body.codeGeneration() +\n \"srv\\n\" + //pop del return value\n popLocalDeclarations +\n \"sra\\n\" + // pop del return address\n \"pop\\n\" + // pop dell'access link, per ritornare al vecchio livello di scope\n popInputParameters +\n \"sfp\\n\" + // $fp diventa uguale al valore del control link\n \"lrv\\n\" + // push del risultato\n \"lra\\n\" + // push del return address\n \"js\\n\" // jump al return address per continuare dall'istruzione dopo\n );\n }\n\n return \"push \" + funLabel + \"\\n\";\n }", "FunctionDecl createFunctionDecl();", "private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }", "Link createLink();", "public static void main(String[] args) {\n\t\tLambdaExpression le = (String name) ->{\n\t\t\tSystem.out.println(\"Hello\" + name);\n\t\t};\n\t\tle.randomMethod(\"samarth\");\n\t\t\n\t\t\n\t\t\n\n\t}", "@Override\n\tpublic void entry(Object... params) {\n\n\t}", "public static <TDelegate> FunctionExpression<TDelegate> lambda(Expression body, String name, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }", "public abstract Endpoint createEndpoint(String bindingId, Object implementor);", "public static void main(String[] args) {\n System.out.println(\"Welcome to the Address Book\");\n }", "Value worker(String main, String address);" ]
[ "0.6625541", "0.64521086", "0.627569", "0.6191586", "0.56924915", "0.56659895", "0.5612602", "0.55123633", "0.5309553", "0.53089184", "0.52711594", "0.5266362", "0.52186143", "0.5078283", "0.50492865", "0.501938", "0.50118214", "0.50100803", "0.5007298", "0.50033176", "0.49827006", "0.49720395", "0.4942332", "0.49357602", "0.492701", "0.49082592", "0.4903274", "0.4871801", "0.48489913", "0.48433167", "0.48398617", "0.47981125", "0.47952834", "0.47865856", "0.47748107", "0.47668996", "0.47327557", "0.4707743", "0.46681046", "0.46611702", "0.46587998", "0.46554425", "0.4614431", "0.46104324", "0.45980507", "0.45837694", "0.45721197", "0.456917", "0.45610023", "0.4540972", "0.45339185", "0.4531486", "0.45298064", "0.45216438", "0.45069873", "0.45052102", "0.45052102", "0.45052102", "0.45024925", "0.4495895", "0.44843075", "0.4484135", "0.44824025", "0.44794858", "0.4476266", "0.44756588", "0.44756407", "0.44756407", "0.44756407", "0.44701898", "0.44682148", "0.44680682", "0.44605836", "0.4454157", "0.4449206", "0.44476262", "0.4444642", "0.44422805", "0.44392452", "0.44338813", "0.4428917", "0.44283077", "0.4419762", "0.44078737", "0.44048947", "0.44005832", "0.43987033", "0.43904492", "0.43894812", "0.43764177", "0.43759584", "0.43745556", "0.43713832", "0.4367994", "0.4359423", "0.43558142", "0.4352681", "0.43501872", "0.4347167", "0.43462315" ]
0.6849456
0
Create a function in the specified namespace with an entry point and a body of addresses.
public Function createFunction(String name, Namespace nameSpace, Address entryPoint, AddressSetView body, SourceType source) throws InvalidInputException, OverlappingFunctionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Function createFunction(String name, Address entryPoint, AddressSetView body,\n\t\t\tSourceType source) throws InvalidInputException, OverlappingFunctionException;", "public Function getFunctionAt(Address entryPoint);", "Function createFunction();", "EntryPoint createEntryPoint();", "FunctionExtract createFunctionExtract();", "Address createAddress();", "public Function getFunctionContaining(Address addr);", "FuncDecl createFuncDecl();", "FunctionDecl createFunctionDecl();", "FunCall createFunCall();", "org.globus.swift.language.Function addNewFunction();", "private void buildFunctionBody(IFunction nd) {\n this.ctxt.push((Node) nd);\n\n // build a list of all parameters and default expressions in order, with\n // the default expressions preceding their corresponding parameter\n List<Expression> paramsAndDefaults = new ArrayList<Expression>();\n for (int j = 0, n = nd.getParams().size(); j < n; ++j) {\n if (nd.hasDefault(j)) paramsAndDefaults.add(nd.getDefault(j));\n paramsAndDefaults.add((Expression) nd.getParams().get(j));\n }\n if (nd.hasRest()) paramsAndDefaults.add((Expression) nd.getRest());\n\n Node entry = getEntryNode(nd);\n List<Identifier> fns = HoistedFunDecls.of(nd);\n hoistedFns.addAll(fns);\n\n // if this is the constructor of a class without a superclass, we need to\n // initialise all fields before running the body of the constructor\n // (for classes with a superclass, that initialisation only happens after\n // `super` calls)\n AClass klass = constructor2Class.get(nd);\n FieldDefinition firstField = null;\n if (klass != null && !klass.hasSuperClass()) {\n Pair<FieldDefinition, FieldDefinition> p = instanceFields.peek();\n if (p != null) {\n firstField = p.fst();\n writeSuccessor(p.snd(), First.of(nd.getBody()));\n }\n }\n\n Collection<Node> fst = visitSequence(nd.getBody(), this.getExitNode(nd));\n if (firstField != null) fst = Collections.singleton(First.of(firstField));\n fst =\n visitSequence(\n nd instanceof FunctionDeclaration ? null : nd.getId(), paramsAndDefaults, fns, fst);\n writeSuccessors(entry, fst);\n\n this.ctxt.pop();\n }", "public Address createAddress(String address);", "OpFunction createOpFunction();", "static Identifier makeFunction(final QualifiedName name) {\r\n if (name == null) {\r\n return null;\r\n } else {\r\n return new Identifier(Category.TOP_LEVEL_FUNCTION, name);\r\n }\r\n }", "private void createFile(String packageName, String enclosingName, String methodName, String returnType) {\n try {\n JavaFileObject jfo = mFiler.createSourceFile(enclosingName, new Element[]{});\n Writer writer = jfo.openWriter();\n writer.write(brewCode(packageName, enclosingName, methodName, returnType));\n writer.flush();\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void generate(){\n\t// Write constants/static vars section\n\twriteln(\".data\");\n\tfor ( String global : globalVars ) {\n\t // Initialized to zero. Why not?\n\t writeln(global+\":\\t.word 0\");\n\t}\n\twriteln(\"nl:\\t.asciiz \\\"\\\\n\\\"\");\n writeln(\"\\t.align\\t4\");\n\n\t// Write the prefix\n\twriteln(\".text\");\n\twriteln(\"entry:\");\n writeln(\"\\tjal main\");\n writeln(\"\\tli $v0, 10\");\n writeln(\"\\tsyscall\");\n\twriteln(\"printint:\");\n writeln(\"\\tli $v0, 1\");\n writeln(\"\\tsyscall\");\n writeln(\"\\tla $a0, nl\");\n writeln(\"\\tli $v0, 4\");\n writeln(\"\\tsyscall\");\n writeln(\"\\tjr $ra\");\n\n\tString defun = \"\";\t// Holds the place of the current function\n\tint spDisplacement=0;\t// Stores any displacement we do with $sp\n\n\tfor ( int i=0; i<codeTable.size(); i++ ) {\n\t CodeEntry line = codeTable.get(i);\n\n\t if ( line instanceof Label ) {\n\t\tLabel label = (Label)line;\n\t\twriteln( line.toString() );\n\t\tif ( label.isFunction() )\n\t\t makeFrame( defun = label.name() );\n\t }\n\t else if ( line instanceof Tuple ) {\n\t\tTuple tuple = (Tuple)line;\n\t\t// \n\t\t// Pushing arguments onto the stack (op = \"pusharg\"|\"pushaddr\")\n\t\t// \n\t\tif ( tuple.op.equals(\"pusharg\") || tuple.op.equals(\"pushaddr\") ) {\n\t\t ArrayList<Tuple> argLines = new ArrayList<Tuple>();\n\t\t ArrayList<String> lvOrAddr = new ArrayList<String>();\n\t\t while ( (tuple.op.equals(\"pusharg\") || tuple.op.equals(\"pushaddr\") )\n\t\t\t && i < codeTable.size() ) {\n\t\t\targLines.add( tuple );\n\t\t\tlvOrAddr.add( tuple.op );\n\t\t\tline = codeTable.get( ++i );\n\t\t\tif ( line instanceof Tuple )\n\t\t\t tuple = (Tuple)line;\n\t\t }\n\t\t // Move the stack pointer to accomodate args\n\t\t writeInst(\"subi\t$sp, $sp, \"+(4*argLines.size()));\n\t\t spDisplacement = 4;\n\t\t for ( int j=0; j < argLines.size(); j++ ) {\n\t\t\tTuple argLine = argLines.get(j);\n\t\t\tString theOp = lvOrAddr.get(j);\n\t\t\t// Pass a copy of the argument\n\t\t\tif ( theOp.equals(\"pusharg\") ) {\n\t\t\t if ( isNumber(argLine.place) )\n\t\t\t\twriteInst(\"li\t$t0, \"+argLine.place);\n\t\t\t else\n\t\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, argLine.place ));\n\t\t\t}\n\t\t\t// Pass-by-reference\n\t\t\telse {\n\t\t\t writeInst(\"la\t$t0, \"+printOffset( defun, argLine.place));\n\t\t\t}\n\t\t\twriteInst(\"sw\t$t0, \"+spDisplacement+\"($sp)\");\n\t\t\tspDisplacement+=4;\n\t\t }\n\t\t spDisplacement-=4;\n\n\t\t // Reset counter, put back instruction we didn't use.\n\t\t i--;\n\t\t continue;\n\t\t}\n\t\t// \n\t\t// Calling a function\n\t\t// \n\t\telse if ( tuple.op.equals(\"jal\") ) {\n\t\t writeInst(\"jal\t\"+tuple.arg1);\n\t\t if ( ! tuple.place.equals(\"\") )\n\t\t\twriteInst(\"sw\t$v0, \"+printOffset( defun, tuple.place ));\n\t\t // Move back the $sp from all the \"pushargs\" we probably did\n\t\t if ( spDisplacement > 0 )\n\t\t\twriteInst(\"addi\t$sp, $sp, \"+spDisplacement);\n\t\t}\n\t\t//\n\t\t// Returning from a function (\"return\")\n\t\t//\n\t\telse if ( tuple.op.equals(\"return\") ) {\n\t\t if ( ! tuple.place.equals(\"\") ) {\n\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t\twriteInst(\"move\t$v0, $t0\");\n\t\t }\n\t\t writeInst(\"move\t$sp, $fp\");\n\t\t writeInst(\"lw\t$ra, -4($sp)\");\n\t\t writeInst(\"lw\t$fp, 0($fp)\");\n\t\t writeInst(\"jr\t$ra\");\n\t\t \n\t\t}\n\t\t//\n\t\t// Arithmetic operations requiring two registers for operands\n\t\t//\n\t\telse if ( tuple.op.equals(\"sub\") ||\n\t\t\t tuple.op.equals(\"mul\") ||\n\t\t\t tuple.op.equals(\"div\") ||\n\t\t\t tuple.op.equals(\"rem\") ) {\n\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t if ( tuple.op.equals(\"sub\") && isNumber(tuple.arg2) ) {\n\t\t\twriteInst(\"subi\t$t0, $t1, \"+tuple.arg2);\n\t\t }\n\t\t else {\n\t\t\tif ( isNumber(tuple.arg2) )\n\t\t\t writeInst(\"li\t$t2, \"+tuple.arg2);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"\\t$t0, $t1, $t2\");\n\t\t }\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t// \n\t\t// Arithmetic operations that have a separate 'immediate' function,\n\t\t// and where we can reduce # of instructions\n\t\t//\n\t\telse if ( tuple.op.equals(\"add\") ||\n\t\t\t tuple.op.equals(\"and\") ||\n\t\t\t tuple.op.equals(\"or\") ) {\n\t\t if ( isNumber(tuple.arg2) ) {\n\t\t\tif ( isNumber(tuple.arg1) )\n\t\t\t writeInst(\"li\t$t1, \"+tuple.arg1);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t\twriteInst(tuple.op+\"i\t$t0, $t1, \"+tuple.arg2);\n\t\t }\n\t\t else if ( isNumber(tuple.arg1) ) {\n\t\t\tif ( isNumber(tuple.arg2) )\n\t\t\t writeInst(\"li\t$t1, \"+tuple.arg2);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"i\t$t0, $t1, \"+tuple.arg1);\n\t\t }\n\t\t else {\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t\twriteInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"\t$t0, $t1, $t2\");\n\t\t }\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Arithmetic operations requiring only one register for an operand\n\t\t// \n\t\telse if ( tuple.op.equals(\"not\") ||\n\t\t\t tuple.op.equals(\"neg\") ) {\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Immediate arithmetic expressions\n\t\t//\n\t\telse if ( tuple.op.equals(\"addi\") ||\n\t\t\t tuple.op.equals(\"subi\") ) {\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1, \"+tuple.arg2);\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Assignment and other stuff that does '='\n\t\t//\n\t\telse if ( tuple.op.equals(\"copy\") ) {\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t0, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Loading arrays\n\t\t//\n\t\telse if ( tuple.op.equals(\"lw\") ) {\n\t\t // Find the location of the base address, put it in t0\n\t\t // writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\n\t\t // The base address of the array gets loaded into $t0\n\t\t writeInst(\"la\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\t\t // Add to it the precalculated address offset\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sub\t$t0, $t0, $t1\");\n\t\t // Store a[n] into a temp\n\t\t writeInst(\"lw\t$t0, 0($t0)\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Loading arrays that are passed by reference\n\t\t//\n\t\telse if ( tuple.op.equals(\"la\") ) {\n\t\t // The base address of the array gets loaded into $t0\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\t\t // Add to it the precalculated address offset\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sub\t$t0, $t0, $t1\");\n\t\t // Store a[n] into a temp\n\t\t writeInst(\"lw\t$t0, 0($t0)\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Writing to arrays\n\t\t//\n\t\telse if ( tuple.op.equals(\"putarray\") || tuple.op.equals(\"putarrayref\") ) {\n\t\t // tuple.place = thing to be stored\n\t\t // tuple.arg1 = base address\n\t\t // tuple.arg2 = offset\n\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t if ( tuple.op.equals(\"putarray\") )\n\t\t\twriteInst(\"la\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t writeInst(\"sub\t$t1, $t1, $t2\");\n\t\t writeInst(\"sw\t$t0, 0($t1)\");\n\t\t}\n\t\t//\n\t\t// Writing to pointers\n\t\t//\n\t\telse if ( tuple.op.equals(\"putpointer\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, ($t1)\");\n\t\t}\n\t\t//\n\t\t// Performing conditional branches\n\t\t// \n\t\telse if ( tuple.op.equals(\"ble\") ||\n\t\t\t tuple.op.equals(\"bge\") ||\n\t\t\t tuple.op.equals(\"beq\") ||\n\t\t\t tuple.op.equals(\"bne\") ||\n\t\t\t tuple.op.equals(\"bgt\") ||\n\t\t\t tuple.op.equals(\"blt\") ||\n\t\t\t tuple.op.equals(\"beq\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1, \"+tuple.arg2);\n\t\t}\n\t\t//\n\t\t// Unconditional branch\n\t\t//\n\t\telse if ( tuple.op.equals(\"b\") ) {\n\t\t writeInst(\"b\t\"+tuple.place);\n\t\t}\n\t\t//\n\t\t// Branch equal to zero\n\t\t//\n\t\telse if ( tuple.op.equals(\"beqz\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"beqz\t$t0, \"+tuple.arg1);\n\t\t}\n\t\t//\n\t\t// Dereferences\n\t\t//\n\t\telse if ( tuple.op.equals(\"deref\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"lw\t$t0, ($t1)\");\n\t\t}\n\t\t//\n\t\t// Address-of (&)\n\t\t//\n\t\telse if ( tuple.op.equals(\"addrof\") ) {\n\t\t writeInst(\"la\t$t0, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t }\n\t}\n\n }", "public void defineFunction(String prefix, String function, String className, String methodName)\n/* */ throws ClassNotFoundException, NoSuchMethodException\n/* */ {\n/* 87 */ if ((prefix == null) || (function == null) || (className == null) || (methodName == null))\n/* */ {\n/* 89 */ throw new NullPointerException(Util.message(this.context, \"elProcessor.defineFunctionNullParams\", new Object[0]));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 94 */ Class<?> clazz = this.context.getImportHandler().resolveClass(className);\n/* */ \n/* 96 */ if (clazz == null) {\n/* 97 */ clazz = Class.forName(className, true, \n/* 98 */ Thread.currentThread().getContextClassLoader());\n/* */ }\n/* */ \n/* 101 */ if (!Modifier.isPublic(clazz.getModifiers())) {\n/* 102 */ throw new ClassNotFoundException(Util.message(this.context, \"elProcessor.defineFunctionInvalidClass\", new Object[] { className }));\n/* */ }\n/* */ \n/* */ \n/* 106 */ MethodSignature sig = new MethodSignature(this.context, methodName, className);\n/* */ \n/* */ \n/* 109 */ if (function.length() == 0) {\n/* 110 */ function = sig.getName();\n/* */ }\n/* */ \n/* 113 */ Method[] methods = clazz.getMethods();\n/* 114 */ for (Method method : methods) {\n/* 115 */ if (Modifier.isStatic(method.getModifiers()))\n/* */ {\n/* */ \n/* 118 */ if (method.getName().equals(sig.getName())) {\n/* 119 */ if (sig.getParamTypeNames() == null)\n/* */ {\n/* */ \n/* 122 */ this.manager.mapFunction(prefix, function, method);\n/* 123 */ return;\n/* */ }\n/* 125 */ if (sig.getParamTypeNames().length == method.getParameterTypes().length)\n/* */ {\n/* */ \n/* 128 */ if (sig.getParamTypeNames().length == 0) {\n/* 129 */ this.manager.mapFunction(prefix, function, method);\n/* 130 */ return;\n/* */ }\n/* 132 */ Class<?>[] types = method.getParameterTypes();\n/* 133 */ String[] typeNames = sig.getParamTypeNames();\n/* 134 */ if (types.length == typeNames.length) {\n/* 135 */ boolean match = true;\n/* 136 */ for (int i = 0; i < types.length; i++) {\n/* 137 */ if ((i == types.length - 1) && (method.isVarArgs())) {\n/* 138 */ String typeName = typeNames[i];\n/* 139 */ if (typeName.endsWith(\"...\")) {\n/* 140 */ typeName = typeName.substring(0, typeName.length() - 3);\n/* 141 */ if (!typeName.equals(types[i].getName())) {\n/* 142 */ match = false;\n/* */ }\n/* */ } else {\n/* 145 */ match = false;\n/* */ }\n/* 147 */ } else if (!types[i].getName().equals(typeNames[i])) {\n/* 148 */ match = false;\n/* 149 */ break;\n/* */ }\n/* */ }\n/* 152 */ if (match) {\n/* 153 */ this.manager.mapFunction(prefix, function, method);\n/* 154 */ return;\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* 161 */ throw new NoSuchMethodException(Util.message(this.context, \"elProcessor.defineFunctionNoMethod\", new Object[] { methodName, className }));\n/* */ }", "abstract public Address createAddress(String addr);", "public void actionFUNCTION_DECL(Node<TokenAttributes> node) {\n String tmapCode = BIB.getTmapCodeFromFile(auxTmapsDir, \"mainCtoJava.tmap\");\n List<Node<TokenAttributes>> nodes = BIB.tmapOneRuleCodeCall(tmapCode, node);\n if (nodes.get(0).getNodeData().getText().equals(\"FUNCTION_DECL\")) {\n BIB.replaceNode(node, nodes.get(0));\n } else {\n if (!nodes.get(0).getNodeData().getText().equals(node.getChildren().get(0).getNodeData().getText())) {\n nodes.get(0).setParent(node);\n node.addChildAt(nodes.get(0), 0);\n }\n }\n }", "void createFunctionLibrary(FunctionLibrary functionLibrary, String tenantDomain)\n throws FunctionLibraryManagementException;", "Adresse createAdresse();", "@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n @Function Element createElementNS(String namespaceURI, String qualifiedName);", "public boolean addFunction(Accessibility pPAccess, SubRoutine pExec, MoreData pMoreData);", "private Node newInstrumentationNode(NodeTraversal traversal, Node node, String fnName) {\n\n String type = \"Type.FUNCTION\";\n\n String encodedParam = parameterMapping.getEncodedParam(traversal.getSourceName(), fnName, type);\n\n Node innerProp = IR.getprop(IR.name(MODULE_RENAMING), IR.string(INSTRUMENT_CODE_INSTANCE));\n Node outerProp = IR.getprop(innerProp, IR.string(INSTRUMENT_CODE_FUNCTION_NAME));\n Node functionCall = IR.call(outerProp, IR.string(encodedParam), IR.number(node.getLineno()));\n Node exprNode = IR.exprResult(functionCall);\n\n return exprNode.useSourceInfoIfMissingFromForTree(node);\n }", "@Override\r\n public void visit(FunctionDeclaration n, functionStruct fStruct) {\r\n String myName = n.f1.f0.toString();\r\n fStruct.functionName = myName;\r\n loopArray.clear();\r\n \r\n HashMap<String, String> rt= new HashMap<String, String>();\r\n HashMap<String, String> vt= new HashMap<String, String>();\r\n variableTable.put(myName, vt);\r\n registerTable.put(myName, rt);\r\n HashMap <String, Pair> myMap= new HashMap<String, Pair>();\r\n aBounds.put(myName, myMap);\r\n\r\n //we want to add a2-a7, also the passed ids to have a use at line 0\r\n if ( n.f3.present() ) {\r\n Enumeration <Node> nodeListEnum=n.f3.elements();\r\n while(nodeListEnum.hasMoreElements() ){\r\n String singleParameter= ((Identifier)nodeListEnum.nextElement()).f0.toString();\r\n addId(singleParameter, myName, 0); //give function parameters a line number of 0\r\n }\r\n }\r\n\r\n\r\n n.f5.accept(this, fStruct);\r\n lineCount=1;\r\n\r\n HashMap<String, Pair> range= new HashMap<String, Pair>();\r\n HashMap<String, Pair> aArgRange= new HashMap<String, Pair>();\r\n ArrayList<Pair> events= new ArrayList<Pair>();\r\n\r\n for(String id: fTable.get(myName).keySet()){\r\n int startPos= fTable.get(myName).get(id);\r\n int endPos= pTable.get(myName).get(id);\r\n for(Pair p: loopArray){\r\n if((p.first() <= startPos && p.second() >= startPos) || (p.first() <= endPos && p.second()>= endPos) ){\r\n startPos = Math.min(p.first(), startPos);\r\n endPos = Math.max(p.second(), endPos);\r\n }\r\n }\r\n events.add(new Pair(startPos, -1, id,0));\r\n events.add(new Pair(-1, endPos, id, 1));\r\n range.put(id, new Pair(startPos, endPos));\r\n }\r\n\r\n for(String id: aBounds.get(myName).keySet()){\r\n int startPos= aBounds.get(myName).get(id).first();\r\n int endPos= aBounds.get(myName).get(id).second();\r\n for(Pair p: loopArray){\r\n if((p.first() <= startPos && p.second() >= startPos) || (p.first() <= endPos && p.second()>= endPos) ){\r\n startPos = Math.min(p.first(), startPos);\r\n endPos = Math.max(p.second(), endPos);\r\n }\r\n }\r\n\r\n aArgRange.put(id, new Pair(startPos, endPos));\r\n }\r\n\r\n rangeTable.put(myName, range);\r\n aRangeTable.put(myName, aArgRange);\r\n\r\n Collections.sort(events, Pair.myComparator);\r\n\r\n ArrayDeque <String> available= new ArrayDeque<String>();\r\n List<String> cList = Arrays.asList(\"t0\",\"t1\",\"t2\",\"t3\",\"t4\",\"t5\",\"s1\",\"s2\",\"s3\",\"s4\",\"s5\",\"s6\",\"s7\",\"s8\");\r\n for(String ss :cList){available.add(ss);}\r\n HashMap <String, String> temp= new HashMap<String, String>();\r\n HashMap <String, String> assignment= new HashMap<String, String>();\r\n\r\n for(Pair p: events){\r\n String id = p.id;\r\n if(p.op == 1){\r\n if(temp.containsKey(id)){\r\n assignment.put(id, temp.get(id));\r\n available.add(temp.get(id));\r\n temp.remove(id);\r\n }\r\n } \r\n else{\r\n if(!available.isEmpty()){\r\n String myReg= available.poll();\r\n temp.put(id, myReg);\r\n }\r\n else{\r\n int myEnd= range.get(id).second();\r\n int otherEnd= myEnd;\r\n String otherName= id;\r\n for(String candidate: temp.keySet()){\r\n int tEnd= range.get(candidate).second();\r\n if(tEnd > otherEnd){\r\n otherEnd = tEnd;\r\n otherName = candidate;\r\n }\r\n }\r\n if(!otherName.equals(id)){\r\n String spitReg= temp.get(otherName);\r\n temp.remove(otherName);\r\n temp.put(id, spitReg);\r\n }\r\n }\r\n }\r\n }\r\n for(String name: temp.keySet()){\r\n assignment.put(name, temp.get(name));\r\n }\r\n\r\n linearTable.put(myName, assignment);\r\n }", "Script createScript();", "public abstract Endpoint createAndPublishEndpoint(String address, Object implementor);", "org.globus.swift.language.Function insertNewFunction(int i);", "public FunctionDeclaration(SimpleReference name, int start, int end) {\n\tthis(name.getName(), name.sourceStart(), name.sourceEnd(), start, end);\n }", "public void removeFunction(Address entryPoint);", "public static void main(String[] args) {\n\t\tnameAndAddress();\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\"This is the first method that I have ever created! Cool stuff!\");\n\t}", "FunctionName createStartFunction() throws IOException {\n return new SyntheticFunctionName( \"\", \"<start>\", \"()V\" ) {\n /**\n * {@inheritDoc}\n */\n @Override\n protected boolean hasWasmCode() {\n return true;\n }\n\n /**\n * {@inheritDoc}\n */\n @Override\n protected WasmCodeBuilder getCodeBuilder( WatParser watParser ) {\n watParser.reset( null, null, getSignature( null ) );\n\n while( !clinits.isEmpty() ) {\n FunctionName name = clinits.pop();\n watParser.addCallInstruction( name, 0, -1 );\n scanAndPatchIfNeeded( name );\n }\n return watParser;\n }\n };\n }", "FunctionAnalytical createFunctionAnalytical();", "public static void main(String[] args) {\n FunctionFactory<Integer, Integer> functionFactory = new FunctionFactory<>();\n // 1. add simple functions \"square\", \"increment\", \"decrement\", \"negative\"\n // 2. get each function by name, and apply to argument 5, print a result (should be 25, 6, 4,-5 accordingly)\n // 3. add simple function \"abs\" using method reference (use class Math)\n // 4. add try/catch block, catch InvalidFunctionNameException and print some error message to the console\n // 5. try to get function with invalid name\n\n functionFactory.addFunction(\"square\", n -> n * n);\n functionFactory.addFunction(\"abs\", Math::abs);\n\n functionFactory.getFunction(\"square\").apply(5);\n try{\n functionFactory.getFunction(\"abs\").apply(5);\n }catch (InvalidFunctionNameException e){\n System.out.println(e.getMessage());\n }\n\n\n\n\n }", "public static QualifiedName create(final String namespace, final String name) {\n\t\treturn create(namespace + name);\n\t}", "public FunctionDeclaration(String name, int nameStart, int nameEnd,\n\t int start, int end) {\n\tsuper(name, nameStart, nameEnd, start, end);\n }", "public List<Function> getFunctions(String namespace, String name);", "private void buildFunctionCreation(IFunction nd, SuccessorInfo i) {\n // `tail` is the last CFG node in the function creation\n INode tail = nd;\n if (!(nd instanceof AFunctionExpression) && !hoistedFns.contains(nd.getId())) {\n writeSuccessor(tail, nd.getId());\n tail = nd.getId();\n }\n writeSuccessors(tail, nd instanceof AFunctionExpression ? i.getSuccessors(true) : i.getAllSuccessors());\n }", "private Function createLambdaFunction()\n {\n return lambdaFunctionBuilder().build();\n }", "void genAddressCode(FuncDecl curFunc) {\n\tif (index == null) {\n\t Code.genInstr(\"\", \"leal\", declRef.assemblerName+\",%eax\", varName);\n\t} else {\n\t index.genCode(curFunc);\n\t if (declRef.type instanceof ArrayType) {\n\t\tCode.genInstr(\"\", \"leal\", declRef.assemblerName+\",%edx\", \n\t\t\t varName+\"[...]\");\n\t } else {\n\t\tCode.genInstr(\"\", \"movl\", declRef.assemblerName+\",%edx\", \n\t\t\t varName+\"[...]\");\n\t }\n\t Code.genInstr(\"\", \"leal\", \"(%edx,%eax,4),%eax\", \"\");\n\t}\n }", "public void defineFunction(String prefix, String function, Method method)\n/* */ throws NoSuchMethodException\n/* */ {\n/* 181 */ if ((prefix == null) || (function == null) || (method == null)) {\n/* 182 */ throw new NullPointerException(Util.message(this.context, \"elProcessor.defineFunctionNullParams\", new Object[0]));\n/* */ }\n/* */ \n/* */ \n/* 186 */ int modifiers = method.getModifiers();\n/* */ \n/* */ \n/* 189 */ if ((!Modifier.isStatic(modifiers)) || (!Modifier.isPublic(modifiers))) {\n/* 190 */ throw new NoSuchMethodException(Util.message(this.context, \"elProcessor.defineFunctionInvalidMethod\", new Object[] {method\n/* 191 */ .getName(), method\n/* 192 */ .getDeclaringClass().getName() }));\n/* */ }\n/* */ \n/* 195 */ this.manager.mapFunction(prefix, function, method);\n/* */ }", "public Friend createFriendWithAddress(String address);", "public abstract Endpoint createEndpoint(String bindingId, Object implementor);", "private LispSimpleAddressStringifier() {\n }", "OpFunctionArg createOpFunctionArg();", "public Expression bind(SymbolicName functionName, Expression[] arguments, StaticContext env)\n throws XPathException {\n final String uri = functionName.getComponentName().getURI();\n final String localName = functionName.getComponentName().getLocalPart();\n boolean builtInNamespace = uri.equals(NamespaceConstant.SCHEMA);\n if (builtInNamespace) {\n // it's a constructor function: treat it as shorthand for a cast expression\n if (functionName.getArity() != 1) {\n throw new XPathException(\"A constructor function must have exactly one argument\");\n }\n SimpleType type = Type.getBuiltInSimpleType(uri, localName);\n if (type != null) {\n if (type.isAtomicType()) {\n if (((AtomicType) type).isAbstract()) {\n XPathException err = new XPathException(\"Abstract type used in constructor function: {\" + uri + '}' + localName);\n err.setErrorCode(\"XPST0017\");\n err.setIsStaticError(true);\n throw err;\n } else {\n CastExpression cast = new CastExpression(arguments[0], (AtomicType) type, true);\n if (arguments[0] instanceof StringLiteral) {\n cast.setOperandIsStringLiteral(true);\n }\n return cast;\n }\n } else if (type.isUnionType()) {\n NamespaceResolver resolver = env.getNamespaceResolver();\n UnionConstructorFunction ucf = new UnionConstructorFunction((UnionType) type, resolver, true);\n return new StaticFunctionCall(ucf, arguments);\n } else {\n NamespaceResolver resolver = env.getNamespaceResolver();\n ListConstructorFunction lcf = new ListConstructorFunction((ListType)type, resolver, true);\n return new StaticFunctionCall(lcf, arguments);\n }\n } else {\n XPathException err = new XPathException(\"Unknown constructor function: {\" + uri + '}' + localName);\n err.setErrorCode(\"XPST0017\");\n err.setIsStaticError(true);\n throw err;\n }\n\n }\n\n // Now see if it's a constructor function for a user-defined type\n\n if (arguments.length == 1) {\n SchemaType st = config.getSchemaType(new StructuredQName(\"\", uri, localName));\n if (st instanceof SimpleType) {\n if (st instanceof AtomicType) {\n return new CastExpression(arguments[0], (AtomicType) st, true);\n } else if (st instanceof ListType && env.getXPathVersion() >= 30) {\n NamespaceResolver resolver = env.getNamespaceResolver();\n ListConstructorFunction lcf = new ListConstructorFunction((ListType) st, resolver, true);\n return new StaticFunctionCall(lcf, arguments);\n } else if (((SimpleType) st).isUnionType() && env.getXPathVersion() >= 30) {\n NamespaceResolver resolver = env.getNamespaceResolver();\n UnionConstructorFunction ucf = new UnionConstructorFunction((UnionType) st, resolver, true);\n return new StaticFunctionCall(ucf, arguments);\n }\n }\n }\n\n return null;\n }", "public static void main(String[] args){\t \n\t FunctionTest ft = ()-> System.out.println(\"Hola Mundo\");\n ft.saludar();\n\t}", "public void createContract() {\n\r\n\t}", "public static void main(String[] args) {\n\t\tHelloService helloService=(String firstname, String lastname) -> \r\n\t\t{ String hello=\"Hello \" + firstname + \" \" + lastname; return hello; };\r\n\t\tSystem.out.println(helloService.hello(args[0], args[1]));\r\n\t\t \r\n\r\n\t\t \r\n\t}", "@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n\t@Function Attr createAttributeNS(String namespaceURI, String qualifiedName);", "Rule Function() {\n // Push 1 FunctionNode onto the value stack\n StringVar functionName = new StringVar(\"\");\n return Sequence(\n Optional(\"oneway \"),\n FunctionType(),\n Identifier(),\n actions.pop(),\n ACTION(functionName.set(match())),\n \"( \",\n ZeroOrMore(Field()),\n \") \",\n Optional(Throws()),\n Optional(ListSeparator()),\n push(new IdentifierNode(functionName.get())),\n actions.pushFunctionNode());\n }", "@Override\n public String codeGen() {\n\n\tString labelFun = \"labelFun\" + MiniFunLib.getLabIndex();\n\tString popParSequence = \"\";\n\tString popLocalVariable = \"\";\n\tString localVariableCodeGen = \"\";\n\n\tfor (int i = 0; i < funParams.size(); i++) {\n\t NodeType nt = this.funParams.get(i).getType().getNodeType();\n\n\t if (nt == NodeType.ARROWTYPE_NODE)\n\t\tpopParSequence += VMCommands.POP + \"\\n\" + VMCommands.POP + \"\\n\";\n\t else\n\t\tpopParSequence += VMCommands.POP + \"\\n\";\n\t}\n\n\tfor (int i = 0; i < funLocalVariables.size(); i++) {\n\t localVariableCodeGen += funLocalVariables.get(i).codeGen();\n\t popLocalVariable += VMCommands.POP + \"\\n\";\n\t}\n\n\tString code = labelFun + \" :\\n\" +\n\t// Preparo parte bassa dell'activation Record\n\n\t\t// Il registro FP punterà al nuovo Activation Record\n\t\tVMCommands.CFP + \"\\n\"\n\n\t\t// PUSH dei dati Locali\n\t\t+ localVariableCodeGen +\n\n\t\t// PUSH return address del chiamante\n\t\tVMCommands.LRA + \"\\n\"\n\n\t\t// Corpo della funzione\n\t\t+ funBody.codeGen() +\n\n\t\t// POP RV e salvo nel registro\n\t\tVMCommands.SRV + \"\\n\" +\n\n\t\t// POP RA e salvo nel registro\n\t\tVMCommands.SRA + \"\\n\" +\n\n\t\t// Rimuovo variabili locali\n\t\tpopLocalVariable +\n\t\t// Rimuovo Access Link\n\t\tVMCommands.POP + \"\\n\" +\n\t\t// Rimuovo Pametri\n\t\tpopParSequence +\n\n\t\t// Ripristino il Registro FP che punterà all'Activation Record\n\t\t// del chiamante\n\t\tVMCommands.SFP + \"\\n\" +\n\n\t\t// PUSH valore di ritorno\n\t\tVMCommands.LRV + \"\\n\" +\n\t\t// PUSH indirizzo di ritorno\n\t\tVMCommands.LRA + \"\\n\" +\n\n\t\t// Salto al Chiamante\n\t\tVMCommands.JS + \"\\n\";\n\n\tMiniFunLib.addFunctionCode(code);\n\n\treturn VMCommands.PUSH + \" \" + labelFun + \"\\n\";\n }", "public static <R> function<R> $(RNArgsInterface<R> body) {\n\t\treturn new function<R>(body);\n\t}", "public Scriptable construct(Context cx, Scriptable scope, Object[] args);", "EndPoint createEndPoint();", "EntryPointResult evaluate(Object data, String entryPointName);", "public void MIPSme()\n {\n System.out.println(\"Took func from offset: \" + offset);\n TEMP label_address = TEMP_FACTORY.getInstance().getFreshTEMP();\n sir_MIPS_a_lot.getInstance().load(label_address, src);\n sir_MIPS_a_lot.getInstance().addi(label_address,label_address,4*offset);\n sir_MIPS_a_lot.getInstance().load(dst,label_address); //take the function address to dst\n }", "@Test\r\n\tpublic void createFunctionTest(){\r\n\t\tSystem.out.println(\"TEST STARTED: createFunctionTest()\");\r\n\t\tLong orgId = null;\r\n\t\tLong funcId = null;\r\n\t\ttry{\r\n\t\t\t//create the test organization \r\n\t\t\tString createOrgResp = org_service.createOrganization(CREATE_ORG_REQ_1);\r\n\t\t\torgId = getRecordId(createOrgResp);\r\n\t\t\tSystem.out.println(createOrgResp);\r\n\t\t\t\r\n\t\t\t//create the test function linked to the organization test\r\n\t\t\tString createFuncResp = func_service.createFunction(CREATE_FUNCTION_REQ_1.replace(\"$ID_ORG\", orgId.toString()));\r\n\t\t\tSystem.out.println(\"CreateFunction Response: \"+createFuncResp);\r\n\t\t\t\r\n\t\t\t//get the new function ID\r\n\t\t\tfuncId = getRecordId(createFuncResp);\r\n\t\t\t\r\n\t\t\t//check if the createFuncResp is a well formed JSON object.\t\t\t\r\n\t\t\tcheckJsonWellFormed(createFuncResp);\r\n\t\t\t\r\n\t\t\t//Assert the JSON response does not have an error field\r\n\t\t\tAssert.assertTrue(!createFuncResp.contains(\"\\\"status\\\":\\\"error\\\"\"));\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tAssert.fail();\r\n\t\t}finally{\t\t\t\r\n\t\t\t//delete the test organization created\r\n\t\t\torg_service.deleteOrganization(DELETE_ORG_REQ_1+orgId+REQ_END);\r\n\r\n\t\t\tSystem.out.println(\"TEST ENDED: createFunctionTest()\");\r\n\t\t}\r\n\t}", "public @NotNull Address newAddress();", "public void create(NetworkNode networkNode);", "@Override\n public String codeGeneration() {\n StringBuilder localDeclarations = new StringBuilder();\n StringBuilder popLocalDeclarations = new StringBuilder();\n\n if (declarationsArrayList.size() > 0) {\n for (INode dec : declarationsArrayList) {\n localDeclarations.append(dec.codeGeneration());\n popLocalDeclarations.append(\"pop\\n\");\n }\n }\n\n //parametri in input da togliere dallo stack al termine del record di attivazione\n StringBuilder popInputParameters = new StringBuilder();\n for (int i = 0; i < parameterNodeArrayList.size(); i++) {\n popInputParameters.append(\"pop\\n\");\n }\n\n\n String funLabel = Label.nuovaLabelFunzioneString(idFunzione.toUpperCase());\n\n if (returnType instanceof VoidType) {\n // siccome il return è Void vengono rimosse le operazioni per restituire returnvalue\n FunctionCode.insertFunctionsCode(funLabel + \":\\n\" +\n \"cfp\\n\" + //$fp diventa uguale al valore di $sp\n \"lra\\n\" + //push return address\n localDeclarations + //push dichiarazioni locali\n body.codeGeneration() +\n popLocalDeclarations +\n \"sra\\n\" + // pop del return address\n \"pop\\n\" + // pop dell'access link, per ritornare al vecchio livello di scope\n popInputParameters +\n \"sfp\\n\" + // $fp diventa uguale al valore del control link\n \"lra\\n\" + // push del return address\n \"js\\n\" // jump al return address per continuare dall'istruzione dopo\n );\n } else {\n //inserisco il codice della funzione in fondo al main, davanti alla label\n FunctionCode.insertFunctionsCode(funLabel + \":\\n\" +\n \"cfp\\n\" + //$fp diventa uguale al valore di $sp\n \"lra\\n\" + //push return address\n localDeclarations + //push dichiarazioni locali\n body.codeGeneration() +\n \"srv\\n\" + //pop del return value\n popLocalDeclarations +\n \"sra\\n\" + // pop del return address\n \"pop\\n\" + // pop dell'access link, per ritornare al vecchio livello di scope\n popInputParameters +\n \"sfp\\n\" + // $fp diventa uguale al valore del control link\n \"lrv\\n\" + // push del risultato\n \"lra\\n\" + // push del return address\n \"js\\n\" // jump al return address per continuare dall'istruzione dopo\n );\n }\n\n return \"push \" + funLabel + \"\\n\";\n }", "private void addFuncArgument(ST template, String reg, String id, String argtype) {\n ST alloca = this.group.getInstanceOf(\"localdeclare\");\n alloca.add(\"reg\", reg);\n alloca.add(\"type\", argtype);\n template.add(\"allocaargs\", alloca.render() + \"\\n\");\n\n ST store = this.group.getInstanceOf(\"store\");\n store.add(\"type\", argtype);\n store.add(\"reg\", id);\n store.add(\"where\", reg);\n template.add(\"storeargs\", store.render() + \"\\n\");\n }", "void createFunction(ObjectPath functionPath, CatalogFunction function, boolean ignoreIfExists)\n throws FunctionAlreadyExistException, DatabaseNotExistException, CatalogException;", "public boolean addFuncDynamic(Accessibility pAccess, ExecSignature pES, MoreData pMoreData);", "abstract /*package*/ Object executeRVMFunction(Function func, IValue[] posArgs, Map<String,IValue> kwArgs);", "public Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;", "Expression functionApplication() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tToken name = match(functionName);\r\n\t\tif (isKind(LPAREN)) {\r\n\t\t\tconsume();\r\n\t\t\tExpression e = expression();\r\n\t\t\tmatch(RPAREN);\r\n\t\t\treturn new ExpressionFunctionAppWithExpressionArg(first, name, e);\r\n\t\t}\r\n\t\tif (isKind(LSQUARE)) {\r\n\t\t\tconsume();\r\n\t\t\tExpression e0 = expression();\r\n\t\t\tmatch(COMMA);\r\n\t\t\tExpression e1 = expression();\r\n\t\t\tmatch(RSQUARE);\r\n\t\t\treturn new ExpressionFunctionAppWithPixel(first, name, e0, e1);\r\n\t\t}\r\n\t\terror(t, \"bug in parser\");\r\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\n sayHello();\n\n //run code from anon class\n Runnable r1 = new Runnable() {\n @Override\n public void run() {\n System.out.println(\"Hello from anon Class\");\n }\n };\n r1.run();\n\n\n //run code from anon function\n //Lambda, Java 8 only\n Runnable r2 = () -> System.out.println(\"hello from anon Function\");\n r2.run();\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 }", "public static void main(String[] args) {\n\t\tPerson person=new Person(){\n\t\t\tvoid eat(){\n\t\t\t\tSystem.out.println(\"i am eating ice cream\");\n\t\t\t\n\t\t\t}\n\t\t};\n\t\tperson.eat();\n\t}", "public Function( String name )\n {\n this.name = name;\n }", "public Element createElement(String namespaceURI, String qualifiedName,\n Attributes attributes, Element parent);", "public com.google.cloud.servicedirectory.v1beta1.Namespace createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateNamespaceMethod(), getCallOptions(), request);\n }", "protected String createContract(String code, Object[] args, String filename) throws APIException, InterruptedException {\n TransactionResult result = contractService.create(null, code, ContractService.CodeType.solidity, args, null, null, null,\n filename, true, \"byzantium\", null);\n assertNotNull(result);\n assertNotNull(result.getId());\n assertTrue(!result.getId().isEmpty());\n\n Transaction tx = transactionService.waitForTx(result, 50, TimeUnit.MILLISECONDS);\n return tx.getContractAddress();\n }", "public void put(String uri, FunctionFactory f) { registry.put(uri,f) ; }", "public static void main(String[] args) {\n NonStaticFuncExample nsfe = new NonStaticFuncExample();\n\n // invoking the fucntion without return type and witout input parameter\n nsfe.noreturn();\n\n // invoking the function with input parameter and without return value\n nsfe.sayHello(\"Savitha\");\n\n // invoking the function with parameter and with return value\n String fullName = nsfe.getFullName(\"Savitha\", \"Konda\");\n System.out.println(\"The full name is : \" + fullName);\n\n // invoking the fucntion without input parameter and with return value\n int a = nsfe.withreturn();\n System.out.println(\"The value is \" + a);\n\n\n // print the non static global int varaible\n System.out.println(\"This is a non static global value : \" + nsfe.globalInt);\n System.out.println(\"This is a static global value: \" + globalInt2);\n\n }", "public static TreeNode makeFunction(String function,\n List<TreeNode> children,\n ArrowType retType) {\n return new FunctionNode(function, children, retType);\n }", "Definition createDefinition();", "static public interface FunctionHandler\r\n {\r\n public double evaluateFunction(String nam, ArgParser args) throws ArithmeticException;\r\n }", "static String makeNode(String id,\n String function,\n String label) {\n label = label.replace(\"&\", \"&amp;\");\n label = label.replace(\"\\\"\", \"&quot;\");\n label = label.replace(\"'\", \"&apos;\");\n return format(NODE_FMT, id, function, label);\n }", "SerialResponse createRecipient(PinRecipientPost pinRecipientPost);", "EPackage createEPackage();", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Namespace>\n createNamespace(com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()), request);\n }", "FunctionLibraryDefinition<T> registerFunction(T registerFunction);", "Offset createOffset();", "AionAddress createAccount(String password);", "final public void function() throws ParseException {\n String name = \"\";\n LinkedList<String> params = new LinkedList<String>();\n jj_consume_token(TO);\n jj_consume_token(VARIABLE);\n name = token.image;\n label_8:\n while (true) {\n if (jj_2_44(4)) {\n ;\n } else {\n break label_8;\n }\n jj_consume_token(PARAM);\n params.add(token.image);\n }\n //retorna el viejo valor (si ya habia uno con esa misma key) y null si es la primera vez que se inserta.\n if(functions.put(name,params)!=null) {\n {if (true) throw new ParseException(\"La funcion: \"+ name +\" ya fue previamente definida.\");}\n }\n funparams = params;\n label_9:\n while (true) {\n if (jj_2_45(4)) {\n ;\n } else {\n break label_9;\n }\n jj_consume_token(34);\n }\n jj_consume_token(OUTPUT);\n label_10:\n while (true) {\n if (jj_2_46(4)) {\n ;\n } else {\n break label_10;\n }\n jj_consume_token(34);\n }\n command(salidaS);\n label_11:\n while (true) {\n if (jj_2_47(4)) {\n ;\n } else {\n break label_11;\n }\n jj_consume_token(34);\n }\n jj_consume_token(END);\n funparams = null;\n }", "public void testCreateMethodWithBody() {\n IDOMMethod method = this.domFactory.createMethod();\n method.setName(\"foo\");\n method.setBody(\" {\\n\" + \"\\t...method body...\\n\" + \"}\\n\");\n assertSourceEquals(\"source code incorrect\", \"public void foo() {\\n\" + \"\\t...method body...\\n\" + \"}\\n\", method.getContents());\n }", "public static JTensor addr(JType b, JTensor t, JType a, JTensor vec1, JTensor vec2) {\n JTensor r = new JTensor();\n TH.THTensor_(addr)(r, b, t, a, vec1, vec2);\n return r;\n }", "public interface AsrtFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tAsrtFactory eINSTANCE = asrt.impl.AsrtFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Assert Method</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Assert Method</em>'.\n\t * @generated\n\t */\n\tAssertMethod createAssertMethod();\n\n\t/**\n\t * Returns a new object of class '<em>Parameter</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Parameter</em>'.\n\t * @generated\n\t */\n\tParameter createParameter();\n\n\t/**\n\t * Returns a new object of class '<em>UOp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>UOp</em>'.\n\t * @generated\n\t */\n\tUOp createUOp();\n\n\t/**\n\t * Returns a new object of class '<em>NULL</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>NULL</em>'.\n\t * @generated\n\t */\n\tNULL createNULL();\n\n\t/**\n\t * Returns a new object of class '<em>Id</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Id</em>'.\n\t * @generated\n\t */\n\tId createId();\n\n\t/**\n\t * Returns a new object of class '<em>BOp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>BOp</em>'.\n\t * @generated\n\t */\n\tBOp createBOp();\n\n\t/**\n\t * Returns a new object of class '<em>BOp Method</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>BOp Method</em>'.\n\t * @generated\n\t */\n\tBOpMethod createBOpMethod();\n\n\t/**\n\t * Returns a new object of class '<em>Fun Call</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Fun Call</em>'.\n\t * @generated\n\t */\n\tFunCall createFunCall();\n\n\t/**\n\t * Returns a new object of class '<em>Model</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Model</em>'.\n\t * @generated\n\t */\n\tModel createModel();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tAsrtPackage getAsrtPackage();\n\n}", "public FuncBody func_body() {\n Declaration dec = decl(null, 2);\n ArrayList<Stmt> alstmt = null;\n alstmt = stmt_list(alstmt);\n\n return new FuncBody(dec, new StmtList(alstmt));\n }", "private void BlockDeclarationInstantiation(Collection<Declaration> declarations,\n StatementVisitor mv) {\n // stack: [env] -> [env, envRec]\n mv.dup();\n mv.invoke(Methods.LexicalEnvironment_getEnvRec);\n \n for (Declaration d : declarations) {\n for (String dn : BoundNames(d)) {\n if (IsConstantDeclaration(d)) {\n mv.dup();\n mv.aconst(dn);\n // FIXME: spec bug (CreateImmutableBinding concrete method of `env`)\n mv.invoke(Methods.EnvironmentRecord_createImmutableBinding);\n } else {\n mv.dup();\n mv.aconst(dn);\n mv.iconst(false);\n // FIXME: spec bug (CreateMutableBinding concrete method of `env`)\n mv.invoke(Methods.EnvironmentRecord_createMutableBinding);\n }\n }\n }\n \n // stack: [env, envRec] -> [envRec, env]\n mv.swap();\n \n for (Declaration d : declarations) {\n if (d instanceof FunctionDeclaration) {\n FunctionDeclaration f = (FunctionDeclaration) d;\n codegen.compile(f);\n String fn = BoundName(f);\n \n // stack: [envRec, env] -> [envRec, env, envRec, realm, env, fd]\n mv.dup2();\n mv.loadExecutionContext();\n mv.swap();\n mv.invokestatic(codegen.getClassName(), codegen.methodName(f) + \"_rti\",\n Type.getMethodDescriptor(Types.RuntimeInfo$Function));\n \n // stack: [envRec, env, envRec, realm, env, fd] -> [envRec, env, envRec, fo]\n mv.invoke(Methods.ScriptRuntime_InstantiateFunctionObject);\n \n // stack: [envRec, env, envRec, fn, fo] -> [envRec, env]\n mv.aconst(fn);\n mv.swap();\n mv.invoke(Methods.EnvironmentRecord_initialiseBinding);\n } else if (d instanceof GeneratorDeclaration) {\n GeneratorDeclaration f = (GeneratorDeclaration) d;\n codegen.compile(f);\n String fn = BoundName(f);\n \n // stack: [envRec, env] -> [envRec, env, envRec, realm, env, fd]\n mv.dup2();\n mv.loadExecutionContext();\n mv.swap();\n mv.invokestatic(codegen.getClassName(), codegen.methodName(f) + \"_rti\",\n Type.getMethodDescriptor(Types.RuntimeInfo$Function));\n \n // stack: [envRec, env, envRec, realm, env, fd] -> [envRec, env, envRec, fo]\n mv.invoke(Methods.ScriptRuntime_InstantiateGeneratorObject);\n \n // stack: [envRec, env, envRec, fn, fo] -> [envRec, env]\n mv.aconst(fn);\n mv.swap();\n mv.invoke(Methods.EnvironmentRecord_initialiseBinding);\n }\n }\n \n // stack: [envRec, env] -> [env]\n mv.swap();\n mv.pop();\n }", "public static void main(String[] args) {\n\t\tmyFunction();\r\n\t\t\r\n\r\n\t}", "public final void entryRuleFunctionBody() throws RecognitionException {\r\n try {\r\n // InternalGo.g:2980:1: ( ruleFunctionBody EOF )\r\n // InternalGo.g:2981:1: ruleFunctionBody EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getFunctionBodyRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleFunctionBody();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getFunctionBodyRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public static void main(String[] args) {\n NonStaticFunctions objRef= new NonStaticFunctions(); \n \n int add=objRef.sum(10, 20);\n System.out.println(objRef.age);\n \n message();\n System.out.println(name);\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic void createReturnType(AST ast, AbstractTypeDeclaration td,\r\n\t\t\tMethodDeclaration md, String umlTypeName,\r\n\t\t\tString umlQualifiedTypeName, String sourceDirectoryPackageName) {\r\n\t\t// Choose type\r\n\t\tType chosenType = getChosenType(ast, umlTypeName, umlQualifiedTypeName,\r\n\t\t\t\tsourceDirectoryPackageName);\r\n\r\n\t\tmd.setReturnType2(chosenType);\r\n\t\ttd.bodyDeclarations().add(md);\r\n\t}", "public void actionFUNCTION_CALL(Node<TokenAttributes> node) {\n String tmapCode = BIB.getTmapCodeFromFile(auxTmapsDir, \"printfCtoJava.tmap\");\n List<Node<TokenAttributes>> nodes = BIB.tmapOneRuleCodeCall(tmapCode, node);\n if (!nodes.isEmpty()) {\n BIB.replaceNode(BIB.getChildByText(node.getChildren(), \"NAME\"), nodes.get(0));\n }\n }", "Program createProgram();", "Program createProgram();" ]
[ "0.65101993", "0.59966445", "0.5896775", "0.5522315", "0.53063184", "0.5249121", "0.5170126", "0.5138406", "0.5054914", "0.49889985", "0.48563188", "0.4849005", "0.48461336", "0.48303148", "0.48203444", "0.47974727", "0.47886196", "0.47685295", "0.4741787", "0.47135", "0.46803883", "0.46794045", "0.46361363", "0.46347225", "0.46301088", "0.45946252", "0.4584498", "0.45840645", "0.45782703", "0.45629314", "0.4535808", "0.45292547", "0.4527399", "0.45080513", "0.45074704", "0.45074043", "0.45006326", "0.44939256", "0.44639757", "0.4445502", "0.44285595", "0.44281456", "0.4420417", "0.4416663", "0.4411202", "0.4401324", "0.4399317", "0.4366436", "0.43376553", "0.4335076", "0.43121594", "0.42982203", "0.42818442", "0.42703748", "0.42675525", "0.4259582", "0.42581597", "0.42534566", "0.42533138", "0.4252553", "0.42401412", "0.42360607", "0.42345405", "0.42344338", "0.42208496", "0.4220493", "0.42195958", "0.4217063", "0.42123663", "0.42080572", "0.41954887", "0.41734198", "0.41723317", "0.41639346", "0.41632465", "0.4143184", "0.414254", "0.41241094", "0.41209918", "0.4120901", "0.41175908", "0.41162586", "0.41110888", "0.41076544", "0.40961584", "0.40899196", "0.40863088", "0.40822726", "0.40787417", "0.40721467", "0.40553316", "0.4053591", "0.40518618", "0.40421194", "0.4039621", "0.4038293", "0.40340576", "0.40296143", "0.4021319", "0.4021319" ]
0.6798834
0